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
unimport
crashes on py3.12 due to distutils
removal
#297
Comments
Hi thanks for the issue but officially, unimport does not yet support versions after Python 3.10. |
Do you mind clarifying? I believe unimport already works on py3.11 (at least |
Phrased another way - if we don't want to support py312 then the right thing is to configure that in python_requires (currently we allow an install but crash at runtime) |
If all packages support Python 3.11 and 3.12, we can make the necessary changes in Unimport and provide support for these versions, there is no problem with this. Do you want to do this job or should I do it? |
I don't know what you mean by "if all packages". According to https://endoflife.date/python python3.11 and python3.12 are supported officially by Python maintainers I can update this project to run in CI for python 3.11 |
When I say all packages, I mean other 3rd party packages that unimport uses. |
You don't need to do anything additional for now, I will check your PR. |
I think we are mixing up two things A) Whether (A) is enforced by setting (B) does not have a standard way of enforcement. At the time of the bug report in #291, the match statement (new to py310) could not be processed by libcst even though I opened this ticket in response to issue (A) but it sounds like you want to resolve both (A) and (B)? What I can do is check if the dependencies run on py311 and/or set a ceiling for |
Yes, I understand you, you are right. 1 -) There was a mistake when determining python_requires, we should update it to include only versions that we guarantee to support. 2 -) If we want to support Python 3.11 or a higher Python version, we must check the packages we currently use, update our setup file, add new tests to ensure that we support new features, and fix any issues related to these versions, if exists. There are two separate jobs, they must be done in order. |
I think we are still not totally aligned, or at least the use of 'supports' is overloaded. I may be guilty of this too. Let's use the terminology "runs under" and "language version" to delineate the two. For example
Now applied to It would be straightforward to fix Let me know your thoughts |
Ok I understand, thank you for your effort, and sorry for getting back late. |
Now you can install and use version 1.0.1 -> https://pypi.org/project/unimport/1.0.1/ |
Thanks! |
Repro steps:
Environment (from here):
sys.version
:'3.12.0 (main, Oct 2 2023, 12:03:24) [Clang 15.0.0 (clang-1500.0.40.1)]'
os.name
:'posix'
sys.platform
:'darwin'
platform.system()
:'Darwin'
platform.python_implementation()
:'CPython'
sys.implementation.name
:'cpython'
sysconfig.get_platform()
:'macosx-14-arm64'
See https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated for more info
The text was updated successfully, but these errors were encountered: