Skip to content

Conversation

@aliavni
Copy link
Contributor

@aliavni aliavni commented May 15, 2025

Description

luigid fails to start in Python 3:12 due to missing setuptools.

Motivation and Context

Fix #3350

Have you tested this? If so, how?

Yes. I installed this code on a fresh virtual environment with the following:

pip install https://github.com/aliavni/luigi/archive/add-setuptools.zip

And the issue is resolved. lugid starts without issues

@aliavni
Copy link
Contributor Author

aliavni commented May 15, 2025

@dlstadther I think this PR looks good. Can you please take a look

@EugeneYushin
Copy link

Great job! As alternative solution, we can replace deprecated API calls with importlib calls as suggested here

pkg_resources is used in 2 places only

Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this can work, i'd prefer seeing the deprecated API calls replaced. The less dependencies, the better.

Copy link

@EugeneYushin EugeneYushin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@aliavni aliavni changed the title Add setuptools Remove pkg_resources May 17, 2025
@aliavni aliavni requested a review from dlstadther May 17, 2025 12:12
dlstadther
dlstadther previously approved these changes May 17, 2025
Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for making this change and for identifying/fixing our issue with 3.12 support!

@dlstadther
Copy link
Collaborator

@RRap0so , could we update merge rules to not require that codecov/* checks be passing? I've seen inconsistencies in their reliability.


def get_template_path(self):
return pkg_resources.resource_filename(__name__, 'templates')
return importlib.resources.files("templates").name
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlstadther this change caused coverage to fail. Not sure why this is happening since this is an existing function. Do you know where would be a good place to add a test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw your other comment.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests for server.py live in https://github.com/spotify/luigi/blob/master/test/server_test.py . It looks like multiple of these "Handler" classes are currently untested.

aliavni added 3 commits May 19, 2025 16:41
This PR adds setuptools to pyproject.toml
@alexeiverbny
Copy link

Hi team, do you plan on merging this PR? I am using luigi with python 3.13. Currently I am using pip to install setuptools in order to get luigid to start. I see this warning:

The pkg_resources package is slated for removal as early as 2025-11-30

So I am wondering if can expect this PR to be merged or if I should roll back to an earlier python (or setuptools) version.

Thank you.

@dlstadther
Copy link
Collaborator

@alexeiverbny This project has fallen off my radar. I see that this PR's last CI failed tests. I'm not sure what has happened since then, but it appears that I no longer have permissions to rerun the Github Actions pipelines like i used to.

The latest changes LGTM, i'd just like to see the test suite succeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

luigi server fails to start with python 3.12

4 participants