8000 Compatibility with Python 3.12 / 3.13 by mbehrle · Pull Request #2577 · debops/debops · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Compatibility with Python 3.12 / 3.13 #2577

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbehrle
Copy link
Contributor
@mbehrle mbehrle commented Feb 27, 2025

No description provided.

@mbehrle
Copy link
Contributor Author
mbehrle commented Mar 11, 2025

Probably only part of all necessary fixes, s.a. https://github.com/search?q=repo%3Adebops%2Fdebops%20distutils&type=code

@mbehrle
Copy link
Contributor Author
mbehrle commented Mar 11, 2025

S.a. #2512

@mbehrle
Copy link
Contributor Author
mbehrle commented Mar 12, 2025

Another MR which uses rather package looseversion instead of packaging: #2550

I don't know which one to prefer, but leaving this one open for the time being.

@prahal
Copy link
Contributor
prahal commented Mar 17, 2025

I believe using packaging instead of looseversion is fine as this is only used to parse __ansible_version__ which from https://release-monitoring.org/project/165410/ is always PEP-440 compliant. And it avoids adding a dependency on pypi looseversion.

Your push request adds the python 3.12 and 3.13 to the list of supported ones in setup.py (and also 3.10 and 3.11) than mine #2550.

Also, my strtobool implementation uses a MAP. I don't remind why, maybe because I took it from this reimplementation networktocode/netutils#280. That is the cpython implementation https://github.com/python/cpython/blob/3.10/Lib/distutils/util.py#L308 and pypa https://github.com/pypa/distutils/blob/main/distutils/util.py#L337 ones are like yours and don't use MAP.

So I will close my PR.

Thanks for your work.

@mbehrle
Copy link
Contributor Author
mbehrle commented Mar 17, 2025

I believe using packaging instead of looseversion is fine as this is only used to parse __ansible_version__ which from https://release-monitoring.org/project/165410/ is always PEP-440 compliant. And it avoids adding a dependency on pypi looseversion.

Well, it adds a dependency on packaging instead. Which is only available for Python >= 3.8 (nevertheless already EOL).

Your push request adds the python 3.12 and 3.13 to the list of supported ones in setup.py (and also 3.10 and 3.11) than mine #2550.

I updated this MR accordingly, adapting also the then supported Python versions.

So I will close my PR.

Since I don't know the scope of desired Python versions for debops perhaps yours is more adequate...

Thanks for your work.

And yours as well.

@mbehrle mbehrle changed the title Compatibility with Python3.12/3.13 Compatibility with Python 3.12 / 3.13 Mar 17, 2025
@prahal
Copy link
Contributor
prahal commented Mar 18, 2025

I updated this MR accordingly, adapting also the then supported Python versions.

So I will close my PR.

Since I don't know the scope of desired Python versions for debops perhaps yours is more adequate...

I believe the desired Python version depends on the oldest Debian releases referenced in debops playbooks.

python2 is likely not supported anymore so that would be at least >= 3.4 with the previous python_requires.

v3.1.0 tells "

  • Support for end-of-life Debian and Ubuntu releases has been removed from
    Ansible roles included in the DebOps project. The releases dropped are:
    "Debian Wheezy", "Debian Jessie", "Ubuntu Precise Pangolin". The support is
    still available in stable DebOps releases up to v3.0.x if needed.
    "

That is debops only references wheezy and jessie in the Vagrantfile and apt roles. So we might assume that the lowest supported Debian release is likely Stretch for Debian.

The oldest supported release by Debian is bullseye (python 3.9.2) but the Debian LTS goes back to jessie (and even buster is python 3.7.3)
https://www.debian.org/releases/index.html
From https://wiki.debian.org/LTS/Extended Jessie LTS supports ends 30th of June 2025.
So Debian Stretch seems a fair bet.
Which is AFAIK python 3.5.

So you might want to reintroduce a form of above python3.4 like >=3.5 in python_requires.

For Ubuntu, I did not check.

So yes, requiring python 3.8 with packaging might be a no go.
Would you mind reworking your patch set to switch to pypi looseversion? Or maybe wait for a confirmation that indeed Stretch support is required, and then do the switch?
Your PR is more complete than mine.

@mbehrle
Copy link
Contributor Author
mbehrle commented Mar 18, 2025

So yes, requiring python 3.8 with packaging might be a no go.
Would you mind reworking your patch set to switch to pypi looseversion? Or maybe wait for a confirmation that indeed Stretch support is required, and then do the switch?

Yes, waiting for confirmation which way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0