-
Notifications
You must be signed in to change notification settings - Fork 190
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
Rename distutils.sysconfig
to sysconfig
#1068
Conversation
- Required for Python 3.12 as distutils is removed.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1068 +/- ##
=======================================
Coverage 67.75% 67.75%
=======================================
Files 20 20
Lines 2025 2025
=======================================
Hits 1372 1372
Misses 653 653
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Then it will break earlier versions? Can you try both names in a try-catch block? |
This sysconfig module was introduced by itself in Python 3.2. distutils has basically been a symlink to it since 3.2, then deprecated in 3.10 and 3.11, and removed in 3.12. But sysconfig has been there since 3.2. |
We still support older versions. |
Even before Python 3.2? I don’t think they are even supported from Python itself anymore:
Python 2.7 is also retired and has no support from Python itself. I could add a try catch if you want though? |
2.7 was retired in 2020 after a decade of maintenance patches:
https://www.python.org/doc/sunset-python-2/ We dropped support for 2.7 in PyJulia because of this. Maybe could do the same in PyCall.jl? |
If someone really wants to use an unmaintained, 10+ year old version of Python, with all of its security issues, I assume they would be technically skilled enough to also install an old version of PyCall that does support it, right? And if they don’t have the technical knowledge to do that, I think it’s actually safer to throw an error about unsupported Python, than to let themselves put themselves at risk. |
@stevengj I realise this is likely something to discuss in a future PR though. So to help speed up this fix I have implemented a try-catch for earlier Python. FYI the Python 2.7 CI failures look to be from 2.7 not being available. |
Thanks, LGTM. Indeed, I would prefer having a conversation about dropping older Python versions in a separate PR. |
[Diff since v1.96.3](JuliaPy/PyCall.jl@v1.96.3...v1.96.4) **Merged pull requests:** - Rename `distutils.sysconfig` to `sysconfig` (JuliaPy#1068) (@MilesCranmer) - bump to 1.96.4 (JuliaPy#1070) (@stevengj)
Required for Python 3.12 as distutils is removed.
@stevengj do you think you review and merge this when you get a chance? It's only a one-word change and is required for 3.12 compatibility in PyJulia.
cc @mkitti
Fixes JuliaPy/pyjulia#538 (hopefully)