Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide pkg_resources warning about invalid versions #720

Closed
pawamoy opened this issue Nov 5, 2021 · 5 comments
Closed

Hide pkg_resources warning about invalid versions #720

pawamoy opened this issue Nov 5, 2021 · 5 comments

Comments

@pawamoy
Copy link
Contributor

pawamoy commented Nov 5, 2021

/media/data/dev/griffe/__pypackages__/3.9/lib/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning:
0.3.2.linux-x86_64 is an invalid version and will not be supported in a future release

I recently started getting a lot of these warnings when resolving dependencies. Would be nice if PDM would discard/ignore them itself, as this is non-actionable by the user anyway.

Also, the warning says "will not be supported in a future release". Do you know what this means concretely? Will future versions stop working with how PDM resolves dependencies?

@frostming
Copy link
Collaborator

frostming commented Nov 9, 2021

The warning comes from https://github.com/pypa/setuptools/blob/8af23a41194ae747faf3e60f9cc19141b5e7ad24/pkg_resources/__init__.py#L112-L121

It seems some of your dependencies are using legacy version strings.

I don't know if a48976d fixes this problem. Appreciate it if you can have a try.

@pawamoy
Copy link
Contributor Author

pawamoy commented Nov 9, 2021

Patched my local version of PDM with the diff: it seems it's not enough, I still get the warnings.

@pawamoy
Copy link
Contributor Author

pawamoy commented Nov 9, 2021

I also changed the import in models/repositories.py and it seems to do the trick 🙂

@frostming
Copy link
Collaborator

frostming commented Nov 9, 2021

I also changed the import in models/repositories.py and it seems to do the trick 🙂

Do you mean the newest release is working? then this issue can be closed.

@pawamoy
Copy link
Contributor Author

pawamoy commented Nov 10, 2021

If this last mentioned change is effective in the new version, then the first change completes the fix, yes. Thanks a lot!

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

No branches or pull requests

2 participants