-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Replace deprecated imp module with importlib #2137
Comments
Hi @hugovk Please note that https://github.com/pantsbuild/pex/blob/ff220b9e41484450e0c78136f98d6899f2e2325c/pyproject.toml#L19-L28 |
Fair enough, some compatibility code will be needed. Heads up: GitHub Actions is removing Python 2.7 in a couple of weeks: actions/runner-images#7401 |
Unfortunately compatibility code will not do the trick. All the imp use is in vendored code:
IOW Pex vendors an old single-file version of virtualenv to support Pythons without -mvenv support and a bootstrap Pip that works with all versions of Python Pex supports. It uses the vendored Pip to upgrade to newer versions of Pip it supports when asked, but the baseline vendored Pip must work with all versions of Python we support. I had not created a tracking issue yet for the Pex 3.x release, but that fundamentally needs to decide what to do about vendored Pip and legacy support; i.e.: maintain two release branches - one supporting Thanks for the GHA heads up, I'll switch to pyenv-action where needed. Pex already uses pyenv to maintain a pool of always-available |
This ensures support for CPython 2.7, PyPy 2.7 and any other versions we test against that GHA images may decide to discontinue at any point. Prompted by pex-tool#2137
Ah - this threw me for a loop. It's true that pre-installed Python 2.7 in the tool cache on the image goes away, but then |
Thank you! |
This project uses the
imp
module which has been deprecated since Python 3.4 and removed in 3.12:PendingDeprecationWarning
since 3.4 (2014)DeprecationWarning
since 3.5 (2015)DeprecationWarning
to say removal in 3.12 since 3.10 (2021)Python 3.12 is set for release on 2023-10-02 and this library is one of the top 5,000 most-downloaded from PyPI.
Please could you upgrade to use
importlib
? Theimp
docs have suggestions on what to use to replace each function and constant.The text was updated successfully, but these errors were encountered: