-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
imp is deprecated #479
Copy link
Copy link
Closed
Labels
Needs ImplementationIssues that are ready to be implemented.Issues that are ready to be implemented.Needs InvestigationIssues which are likely in scope but need investigation to figure out the causeIssues which are likely in scope but need investigation to figure out the causebughelp wantedmajor
Metadata
Metadata
Assignees
Labels
Needs ImplementationIssues that are ready to be implemented.Issues that are ready to be implemented.Needs InvestigationIssues which are likely in scope but need investigation to figure out the causeIssues which are likely in scope but need investigation to figure out the causebughelp wantedmajor
Originally reported by: jaraco (Bitbucket: jaraco, GitHub: jaraco)
According to the docs, imp is deprecated since Python 3.4. Yet
pkg_resourcesrelies on it. In particular, it relies on theacquire_lockandrelease_lockfunctions, 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?