Require Python 3.12 or newer; remove outdated workarounds
In line with Spec 0, we remove support for Python 3.11. Many outdated patches/workarounds for these older (or even older) Python versions are removed, but I cannot guarantee that I've found all obsolete ones. Also CI tests for systems using Python 3.11 are removed.
For next years cleaning job:
- Change version in
pyproject.tomlandbuild/pkgs/python3/spkg-configure.m4 - Search for
3.12,312,3,12,PY_VERSION,PY_MINOR_VERSIONandsys.version_info
Similar PRs:
- https://github.com/sagemath/sage/pull/39251
:memo: Checklist
- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation preview.
:hourglass: Dependencies
- #39163
Documentation preview for this PR (built with commit 6bb49a85687b177b46169b9d8f94dbfec5611a64; changes) is ready! :tada: This preview will update shortly after each push to this PR.
Failure in the pdf docs seems to be unrelated (so are the other CI failures)
You should delete 3.11 conda ci
You should delete 3.11 conda ci
I think I did this already, but might have missed something. What do you mean precisely?
You should delete 3.11 conda ci
I think I did this already, but might have missed something. What do you mean precisely?
In ci-meson.yml, you should delete the 3.11 conda ci
You should delete 3.11 conda ci
I think I did this already, but might have missed something. What do you mean precisely?
In
ci-meson.yml, you should delete the 3.11 conda ci
You need to delete
include:
# One run for oldest supported Python
- os: 'ubuntu'
python: '3.11'
tests: 'all'
@cxzhong
You should delete 3.11 conda ci
I think I did this already, but might have missed something. What do you mean precisely?
In
ci-meson.yml, you should delete the 3.11 conda ciYou need to delete
include: # One run for oldest supported Python - os: 'ubuntu' python: '3.11' tests: 'all'
will
--- a/.github/workflows/ci-meson.yml
+++ b/.github/workflows/ci-meson.yml
@@ -35,7 +35,7 @@ jobs:
include:
# One run for oldest supported Python
- os: 'ubuntu'
- python: '3.11'
+ python: '3.12'
tests: 'all'
# Test only changed files
- os: 'ubuntu'
do?
@cxzhong
You should delete 3.11 conda ci
I think I did this already, but might have missed something. What do you mean precisely?
In
ci-meson.yml, you should delete the 3.11 conda ciYou need to delete
include: # One run for oldest supported Python - os: 'ubuntu' python: '3.11' tests: 'all'will
--- a/.github/workflows/ci-meson.yml +++ b/.github/workflows/ci-meson.yml @@ -35,7 +35,7 @@ jobs: include: # One run for oldest supported Python - os: 'ubuntu' - python: '3.11' + python: '3.12' tests: 'all' # Test only changed files - os: 'ubuntu'do?
yes. Because in this PR, all conda lock files about python 3.11 are deleted. It is failed.
also, how about removing build/pkgs/_python3.11/ ?
also, how about removing
build/pkgs/_python3.11/?
I do not know this. I think these files are not useful. But I can not confirm
there is also build/pkgs/exceptiongroup/ overdue to remove, as it's only installed for Python version <3.11, see
build/pkgs/exceptiongroup/version_requirements.txt exceptiongroup; python_version<"3.11"
also to remove:
importlib_metadata
importlib_resources
typing_extensions
according to build/pkgs/typing_extensions/spkg-configure.m4 and src/doc/en/developer/coding_in_python.rst
also to remove:
importlib_metadata importlib_resources typing_extensionsaccording to
build/pkgs/typing_extensions/spkg-configure.m4andsrc/doc/en/developer/coding_in_python.rst
typing_extensions is a dependency for newer version of beatifulsoup4. We can not remove this
it might be listed in our settings as a dependency, but it's not even installed with python 3.12+, as far as I can see
it might be listed in our settings as a dependency, but it's not even installed with python 3.12+, as far as I can see
Because in sage-distro We use a old version bs4. You can download the tar ball and look the pyproject.toml
it might be listed in our settings as a dependency, but it's not even installed with python 3.12+, as far as I can see
Because in sage-distro We use a old version bs4. You can download the tar ball and look the pyproject.toml
I just checked this - sorry, you are right. Indeed they still use typing_extensions unconditionally (even in the master branch). Probably all typing_extensions there can be replaced by typing, but OK...
@tobiasdiez Reslove conflict and merge the lastest develop please.
change
# One run for oldest supported Python
- os: 'ubuntu'
python: '3.11'
tests: 'all'
in ci-menson.yml
@cxzhong
You should delete 3.11 conda ci
I think I did this already, but might have missed something. What do you mean precisely?
In
ci-meson.yml, you should delete the 3.11 conda ciYou need to delete
include: # One run for oldest supported Python - os: 'ubuntu' python: '3.11' tests: 'all'will
--- a/.github/workflows/ci-meson.yml +++ b/.github/workflows/ci-meson.yml @@ -35,7 +35,7 @@ jobs: include: # One run for oldest supported Python - os: 'ubuntu' - python: '3.11' + python: '3.12' tests: 'all' # Test only changed files - os: 'ubuntu'do?
You forget this @dimpase You just delete this. because we already have python3.12 Ubuntu test
I have made a PR to this branch. Besides, can we remove check update-menson workflow?
Then wait for CI agree this
now I'm not 100% sure that [./tools/update-meson.py](https://github.com/sagemath/sage/pull/40936/commits/84f27b87a8df3ed752bd8b5532e0d10bb8fafd25) is correct thing for non-Conda installs, but let's see
Tests are passing now, modulo the known random failures.
I think the instructions from tools/update_meson should mention that they apply to Conda venvs only.
Can we add python 3.14 support before the 10.8 stable version?
I think the instructions from tools/update_meson should mention that they apply to Conda venvs only.
It's not conda specific. But the test that update_meson was run is only part of the conda tests.
I think the instructions from tools/update_meson should mention that they apply to Conda venvs only.
It's not conda specific. But the test that
update_mesonwas run is only part of the conda tests.
perhaps I'm not well-informed on the current coding practices, but are you saying that tools/update_meson must be run on every potential PR which changes a meson.build file? Is this documented?
I think the instructions from tools/update_meson should mention that they apply to Conda venvs only.
It's not conda specific. But the test that
update_mesonwas run is only part of the conda tests.perhaps I'm not well-informed on the current coding practices, but are you saying that tools/update_meson must be run on every potential PR which changes a
meson.buildfile? Is this documented?
If you add a python/cython file, it needs to be added to the meson file. This test is there to check that this was done.