Skip to content

Conversation

@tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Sep 30, 2025

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.toml and build/pkgs/python3/spkg-configure.m4
  • Search for 3.12, 312,3,12, PY_VERSION, PY_MINOR_VERSION and sys.version_info

Similar PRs:

📝 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.

⌛ Dependencies

@github-actions
Copy link

github-actions bot commented Sep 30, 2025

Documentation preview for this PR (built with commit 6bb49a8; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@tobiasdiez
Copy link
Contributor Author

Failure in the pdf docs seems to be unrelated (so are the other CI failures)

@tobiasdiez tobiasdiez requested review from cxzhong and dimpase November 1, 2025 02:55
@cxzhong
Copy link
Contributor

cxzhong commented Nov 1, 2025

You should delete 3.11 conda ci

@tobiasdiez
Copy link
Contributor Author

You should delete 3.11 conda ci

I think I did this already, but might have missed something. What do you mean precisely?

@cxzhong
Copy link
Contributor

cxzhong commented Nov 1, 2025

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

@cxzhong
Copy link
Contributor

cxzhong commented Nov 1, 2025

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'

vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 2, 2025
This provides support for Python 3.14, and drops Python 3.11

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass

URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
@dimpase
Copy link
Member

dimpase commented Nov 4, 2025

@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 ci

You 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
Copy link
Contributor

cxzhong commented Nov 4, 2025

@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 ci

You 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.

@dimpase
Copy link
Member

dimpase commented Nov 4, 2025

also, how about removing build/pkgs/_python3.11/ ?

@cxzhong
Copy link
Contributor

cxzhong commented Nov 4, 2025

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

@dimpase
Copy link
Member

dimpase commented Nov 4, 2025

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"

@dimpase
Copy link
Member

dimpase commented Nov 4, 2025

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

@cxzhong
Copy link
Contributor

cxzhong commented Nov 4, 2025

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

typing_extensions is a dependency for newer version of beatifulsoup4. We can not remove this

@dimpase
Copy link
Member

dimpase commented Nov 4, 2025

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

@cxzhong
Copy link
Contributor

cxzhong commented Nov 4, 2025

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

@dimpase
Copy link
Member

dimpase commented Nov 4, 2025

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...

vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 5, 2025
sagemathgh-41116: bump cysignals to 1.12.6, cypari to 2.2.4
    
This provides support for Python 3.14, and drops Python 3.11


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass
    
URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 8, 2025
sagemathgh-41116: bump cysignals to 1.12.6, cypari to 2.2.4
    
This provides support for Python 3.14, and drops Python 3.11


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass
    
URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 8, 2025
sagemathgh-41116: bump cysignals to 1.12.6, cypari to 2.2.4
    
This provides support for Python 3.14, and drops Python 3.11


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass
    
URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 9, 2025
sagemathgh-41116: bump cysignals to 1.12.6, cypari to 2.2.4
    
This provides support for Python 3.14, and drops Python 3.11


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass
    
URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 9, 2025
sagemathgh-41116: bump cysignals to 1.12.6, cypari to 2.2.4
    
This provides support for Python 3.14, and drops Python 3.11


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass
    
URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 10, 2025
sagemathgh-41116: bump cysignals to 1.12.6, cypari to 2.2.4
    
This provides support for Python 3.14, and drops Python 3.11


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass
    
URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 11, 2025
sagemathgh-41116: bump cysignals to 1.12.6, cypari to 2.2.4
    
This provides support for Python 3.14, and drops Python 3.11


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- sagemath#40936: needed for CI to pass
    
URL: sagemath#41116
Reported by: Dima Pasechnik
Reviewer(s): Chenxin Zhong
@cxzhong
Copy link
Contributor

cxzhong commented Nov 14, 2025

@tobiasdiez Reslove conflict and merge the lastest develop please.

#if PY_VERSION_HEX >= 0x030e0000
// Python 3.14+: atexit uses a PyList
static PyObject* get_atexit_callbacks_list(PyObject *self) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not correct

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

030e is python 3.14

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the correct one then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this (correct) change something already merged?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,it is correct already

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this (correct) change something already merged?

I have fixed it last time. to make it run in python 3.14

Copy link
Member

@dimpase dimpase Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fixed by a70ec5a - I've put the author as you; this is basically the diff of this file with the 10.8.beta9 version

@cxzhong
Copy link
Contributor

cxzhong commented Nov 20, 2025

change

# One run for oldest supported Python
          - os: 'ubuntu'
            python: '3.11'
            tests: 'all'

in ci-menson.yml

@cxzhong
Copy link
Contributor

cxzhong commented Nov 20, 2025

@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 ci

You 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

Removed configuration for Python 3.11 from CI workflow.
@cxzhong
Copy link
Contributor

cxzhong commented Nov 20, 2025

I have made a PR to this branch. Besides, can we remove check update-menson workflow?

Remove Python 3.11 from CI configuration
@cxzhong
Copy link
Contributor

cxzhong commented Nov 20, 2025

Then wait for CI agree this

@dimpase
Copy link
Member

dimpase commented Nov 20, 2025

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

@tobiasdiez
Copy link
Contributor Author

Tests are passing now, modulo the known random failures.

@dimpase
Copy link
Member

dimpase commented Nov 21, 2025

I think the instructions from tools/update_meson should mention that they apply to Conda venvs only.

@cxzhong
Copy link
Contributor

cxzhong commented Nov 22, 2025

Can we add python 3.14 support before the 10.8 stable version?

@tobiasdiez
Copy link
Contributor Author

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.

@dimpase
Copy link
Member

dimpase commented Nov 23, 2025

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.

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?

@tobiasdiez
Copy link
Contributor Author

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.

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?

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.

vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 26, 2025
sagemathgh-40936: Require Python 3.12 or newer; remove outdated workarounds
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

In line with [Spec 0](https://scientific-
python.org/specs/spec-0000/#drop-schedule), 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.toml` and `build/pkgs/python3/spkg-
configure.m4`
- Search for `3.12`, `312`,`3,12`, `PY_VERSION`, `PY_MINOR_VERSION` and
`sys.version_info`

Similar PRs:
- sagemath#39251

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] 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.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- sagemath#39163
    
URL: sagemath#40936
Reported by: Tobias Diez
Reviewer(s): Chenxin Zhong, Dima Pasechnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants