-
Notifications
You must be signed in to change notification settings - Fork 2k
Remove distutils usage, as is not available anymore on Python 3.12
#2912
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
Conversation
caadfb2 to
3099c4d
Compare
|
@Julian-O , I've seen I touched some of your code, so added you as a reviewer 😉 |
Julian-O
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good to me.
There were some failing MacOs tests - I cant read the full logs from this tablet, but I assume they are unrelated.
AndreMiras
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks
|
|
||
|
|
||
| MIN_PYTHON_MAJOR_VERSION = 3 | ||
| MIN_PYTHON_MINOR_VERSION = 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope, but I'm wondering, is 3.6 still the minor recommended version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd encourage upgrading to Python 3.8 as a minimum, but I see that as a project decision.
-
Python 3.6 and Python 3.7 are end of life. Python 3.8 has just under a year left of security support.
-
The latest released version of Buildozer claims to support back to 3.6. The in-dev version is 3.8 minimum.
-
The latest released version of Kivy claims to support back to 3.7. The in-dev version is 3.7 minimum.
-
p4a's setup.py advertises 3.7, not 3.6.
My attitude is if you don't test it, you aren't really supporting it, so whatever the decision, please ensure the CI tests cover what setup.py advertises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About this specific issue (the one suggested by @AndreMiras ):
I will (immediately, so we do not miss it), open a new issue, and target with a separate proper PR.
Generally, about the minimum Python version:
kivy/kivy: We still need to include3.7even if reached EOL, at least for2.3.0aspiwheelsstill requires3.7wheels (due to debian buster). Then, I will check out withpiwheelsmaintainer, if there's a chance to avoid distributing wheels for debian buster.- Same applies for
kivy/pyobjus,kivy/pyjniusandkivy/plyer, as are quite tied withkivy/kivy. - For
kivy/python-for-android,kivy/kivy-iosandkivy/buildozer: what are we waiting to set the minimum version to3.8? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great insight, thanks @misl6
And yeah of course it makes sense to address that in dedicated PR, it caught my attention in this PR, but it's totally out of this scope
Recently, our CI pipeline began failing due to the default Python version provided by
actions/setup-pythonbeing set to3.12. This issue stems from the removal ofdistutilsin Python3.12.Changes:
To address the Python 3.12 compatibility issue, this pull request introduces the following changes:
distutils.spawn.find_executablewithshutil.whichfor locating executables.distutils.version.LooseVersionwithpackaging.version.versionfor version comparisons.build_tools_version_sort_keyandmax_build_tool_version, in thepythonforandroid.utilsmodule. These additions not only resolve DRY (Don't Repeat Yourself) violations but also enhance testability.setuptoolsinstead ofdistutils.setuptoolsdependencyThese changes ensure that our codebase remains compatible with Python 3.12 and eliminates any reliance on deprecated
distutilsfunctionality.