Skip to content
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

Require Python 3.11 or newer; remove outdated workarounds #39251

Merged
merged 4 commits into from
Feb 21, 2025

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Jan 3, 2025

In line with Spec 0, we remove support for Python 3.9 and 3.10. 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. Nothing in sage-the-distro is touched.

For next years cleaning job:

  • Search for 3.11, 311, PY_VERSION, PY_MINOR_VERSION and sys.version_info
  • Change version in pyproject.toml

📝 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

@dimpase
Copy link
Member

dimpase commented Jan 3, 2025

it seems that the CI needs a fix here?

@tobiasdiez
Copy link
Contributor Author

it seems that the CI needs a fix here?

Let's see if upgrading from ubuntu jammy to noble works. (And the conda issues are fixed by #39164).

Copy link

github-actions bot commented Jan 3, 2025

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

@tobiasdiez
Copy link
Contributor Author

@dimpase tests are passing now (apart from the usual timeouts)

@tobiasdiez
Copy link
Contributor Author

Thanks!

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 18, 2025
sagemathgh-39251: Require Python 3.11 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, we remove support for Python 3.9 and 3.10. 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. Nothing in sage-the-distro is touched.

For next years cleaning job:
- Search for `3.11`, `311`, `PY_VERSION`, `PY_MINOR_VERSION` and
`sys.version_info`
- Change version in `pyproject.toml`


### 📝 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: ... -->
    
URL: sagemath#39251
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
@tobiasdiez tobiasdiez mentioned this pull request Feb 20, 2025
5 tasks
@kiwifb
Copy link
Member

kiwifb commented Feb 21, 2025

There is more <py3.11 clutter in sage_autodoc.py coming from 57f5d16 and 9783ba7 but I am quite happy to do them as a follow up. I won't be sorry to see the back of them.

@tobiasdiez
Copy link
Contributor Author

There is more <py3.11 clutter in sage_autodoc.py coming from 57f5d16 and 9783ba7 but I am quite happy to do them as a follow up. I won't be sorry to see the back of them.

That would be awesome! Happy to review your PR once its finished.

@vbraun vbraun merged commit e080610 into sagemath:develop Feb 21, 2025
19 of 23 checks passed
@dimpase
Copy link
Member

dimpase commented Feb 23, 2025

hmm, how did it happen that nothing in build/ was changed?
What's certainly missing is

--- a/build/pkgs/python3/spkg-configure.m4
+++ b/build/pkgs/python3/spkg-configure.m4
@@ -1,6 +1,6 @@
 SAGE_SPKG_CONFIGURE([python3], [
-   m4_pushdef([MIN_VERSION],               [3.9.0])
-   m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.9.0])
+   m4_pushdef([MIN_VERSION],               [3.11.0])
+   m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.11.0])
    m4_pushdef([LT_STABLE_VERSION],         [3.14.0])
    m4_pushdef([LT_VERSION],                [3.14.0])
    AC_ARG_WITH([python],

dimpase added a commit to dimpase/sage that referenced this pull request Feb 23, 2025
@tobiasdiez tobiasdiez deleted the py-upgrade branch February 23, 2025 08:37
@kiwifb
Copy link
Member

kiwifb commented Feb 23, 2025

There is more <py3.11 clutter in sage_autodoc.py coming from 57f5d16 and 9783ba7 but I am quite happy to do them as a follow up. I won't be sorry to see the back of them.

That would be awesome! Happy to review your PR once its finished.

I have started and will push an initial PR soon, but looking at thing, I will also update sphinx to at least 8.1.3, what I have currently in stable on my gentoo machine - I have not looked at sphinx 8.2.x yet and whether sage_autodoc will need further rebasing with it. But removing the support for old python will also remove support for the sphinx currently shipped with sage I think.

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 24, 2025
this 2-line fix was  missing on sagemath#39251

### 📝 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.
- [x] 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: ... -->

URL: sagemath#39570
Reported by: Dima Pasechnik
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 27, 2025
sagemathgh-39570: bump python to at least 3.11 in spkg-configure.m4
    
this 2-line fix was  missing on sagemath#39251

### 📝 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.
- [x] 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: ... -->
    
URL: sagemath#39570
Reported by: Dima Pasechnik
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 27, 2025
sagemathgh-39577: py3.9 support cleanup in sage_autodoc and sphinx bump
    
This is a follow up to sagemath#39251
This PR removes work around to support older python during the last two
synchronization of sage_autodoc.py with upstream. python 3.9/3.10
support removal also enable us to move to a newer version of sphinx.


### 📝 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.
- [x] 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: ... -->
    
URL: sagemath#39577
Reported by: François Bissey
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 1, 2025
sagemathgh-39467: Disable broken and outdated CI
    
<!-- ^ 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". -->

Many of the CI runs after a new release are failing, for months now, see
eg https://github.com/sagemath/sage/actions/runs/12979684199/job/3621812
6145. Some of these failures are genuine (eg a certain package cannot be
built on a certain system) and some others are due to constraints of the
build system (eg running out of free space). Since there is very little
point in senselessly burning energy, all runs that were failing for the
last releases are disabled. Once the underlying issues are fixed, they
can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are
installed and most are build using sage are removed, keeping only the
"standard" where all available system packages (corresponding to
standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/1319937223
2/job/36847711005

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

- sagemath#39251 (to resolve merge conflicts)

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39467
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Tobias Diez, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 1, 2025
sagemathgh-39467: Disable broken and outdated CI
    
<!-- ^ 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". -->

Many of the CI runs after a new release are failing, for months now, see
eg https://github.com/sagemath/sage/actions/runs/12979684199/job/3621812
6145. Some of these failures are genuine (eg a certain package cannot be
built on a certain system) and some others are due to constraints of the
build system (eg running out of free space). Since there is very little
point in senselessly burning energy, all runs that were failing for the
last releases are disabled. Once the underlying issues are fixed, they
can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are
installed and most are build using sage are removed, keeping only the
"standard" where all available system packages (corresponding to
standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/1319937223
2/job/36847711005

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

- sagemath#39251 (to resolve merge conflicts)

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39467
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Tobias Diez, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 2, 2025
sagemathgh-39467: Disable broken and outdated CI
    
<!-- ^ 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". -->

Many of the CI runs after a new release are failing, for months now, see
eg https://github.com/sagemath/sage/actions/runs/12979684199/job/3621812
6145. Some of these failures are genuine (eg a certain package cannot be
built on a certain system) and some others are due to constraints of the
build system (eg running out of free space). Since there is very little
point in senselessly burning energy, all runs that were failing for the
last releases are disabled. Once the underlying issues are fixed, they
can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are
installed and most are build using sage are removed, keeping only the
"standard" where all available system packages (corresponding to
standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/1319937223
2/job/36847711005

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

- sagemath#39251 (to resolve merge conflicts)

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39467
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Tobias Diez, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 3, 2025
sagemathgh-39467: Disable broken and outdated CI
    
<!-- ^ 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". -->

Many of the CI runs after a new release are failing, for months now, see
eg https://github.com/sagemath/sage/actions/runs/12979684199/job/3621812
6145. Some of these failures are genuine (eg a certain package cannot be
built on a certain system) and some others are due to constraints of the
build system (eg running out of free space). Since there is very little
point in senselessly burning energy, all runs that were failing for the
last releases are disabled. Once the underlying issues are fixed, they
can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are
installed and most are build using sage are removed, keeping only the
"standard" where all available system packages (corresponding to
standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/1319937223
2/job/36847711005

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

- sagemath#39251 (to resolve merge conflicts)

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39467
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Tobias Diez, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 9, 2025
sagemathgh-39467: Disable broken and outdated CI
    
<!-- ^ 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". -->

Many of the CI runs after a new release are failing, for months now, see
eg https://github.com/sagemath/sage/actions/runs/12979684199/job/3621812
6145. Some of these failures are genuine (eg a certain package cannot be
built on a certain system) and some others are due to constraints of the
build system (eg running out of free space). Since there is very little
point in senselessly burning energy, all runs that were failing for the
last releases are disabled. Once the underlying issues are fixed, they
can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are
installed and most are build using sage are removed, keeping only the
"standard" where all available system packages (corresponding to
standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/1319937223
2/job/36847711005

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

- sagemath#39251 (to resolve merge conflicts)

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39467
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Tobias Diez, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 9, 2025
sagemathgh-39467: Disable broken and outdated CI
    
<!-- ^ 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". -->

Many of the CI runs after a new release are failing, for months now, see
eg https://github.com/sagemath/sage/actions/runs/12979684199/job/3621812
6145. Some of these failures are genuine (eg a certain package cannot be
built on a certain system) and some others are due to constraints of the
build system (eg running out of free space). Since there is very little
point in senselessly burning energy, all runs that were failing for the
last releases are disabled. Once the underlying issues are fixed, they
can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are
installed and most are build using sage are removed, keeping only the
"standard" where all available system packages (corresponding to
standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/1319937223
2/job/36847711005

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

- sagemath#39251 (to resolve merge conflicts)

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39467
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Tobias Diez, user202729
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.

4 participants