-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
imp is deprecated #479
Comments
Python 3.6 upgrades the PendingDeprecationWarning to a full DeprecationWarning, which in practical terms means nothing, only some psychological pressure not to forget about this issue. ;) |
Is it acceptable to temporarily suppress the warnings in setuptools using |
I'm not sure what you're asking. Are you asking if you can suppress the warnings in your code? Well, sure. If you're asking about suppressing the warnings in setuptools, it feels like that might just kick the can down the road. And besides, most applications have these warnings disabled by default anyway, so if a user is enabling them, I would expect them to want to see them. |
I enable these warnings in my own code to fix issues before they become breaking changes. But when the number of them grows, it becomes hard to keep an eye on them and detecting the new ones become harder. That's why I thought about suppressing some of those that are already reported and known to be rather harmless for the time being... I'm not sure if this whole thing is a good idea or not, and if it is, whether it is better to be done through the upstream libraries ( Anyway, I can see why Thanks for the reply. |
Right now I use this hack in psutil in order to avoid this (and others) deprecation warnings issued by setuptools, which is annoying:
|
Setuptools now only supports non-EOL Python versions: 2.7 and 3.4+.
Can |
@hugovk: You're welcome to give it a try. Perhaps the project should try simply removing the locks and hope that nothing breaks. Please feel free to investigate. |
I started work on the easier parts of this in #1798 -- would appreciate a review :) |
Originally reported by: jaraco (Bitbucket: jaraco, GitHub: jaraco)
According to the docs, imp is deprecated since Python 3.4. Yet
pkg_resources
relies on it. In particular, it relies on theacquire_lock
andrelease_lock
functions, which don't have an equivalent in importlib.The docs do say, "Changed in version 3.3: The locking scheme has changed to per-module locks for the most part. A global import lock is kept for some critical tasks, such as initializing the per-module locks."
What does that mean for the usage in
pkg_resources
? Is it possible to eliminate the usage of locks on Python 3.3+ in declare_namespace and fixup_namespace_packages?This issue was revealed in Pull Request 129, but the resolution was to keep it and the deprecation warnings. What's the proper solution here?
The text was updated successfully, but these errors were encountered: