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

Python 3.12.x #36181

Closed
Closed

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Sep 3, 2023

Continuation of:

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • 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 accordingly.

⌛ Dependencies

Related / follow-ups:

@mkoeppe mkoeppe changed the title Python 3.12 Python 3.12rc1 Sep 3, 2023
@mkoeppe mkoeppe force-pushed the t/34788/test_ticket__python_3_12 branch from 1971170 to 6a80e78 Compare September 15, 2023 01:43
@mkoeppe mkoeppe force-pushed the t/34788/test_ticket__python_3_12 branch from 6a80e78 to e94b71a Compare September 28, 2023 05:29
@mkoeppe mkoeppe changed the title Python 3.12rc1 Python 3.12rc3 Sep 28, 2023
@tornaria
Copy link
Contributor

tornaria commented Oct 4, 2023

See: sagemath/cypari2#138 and fplll/fpylll#254.

@tornaria
Copy link
Contributor

tornaria commented Oct 4, 2023

See also WIP: develop...tornaria:sage:py312

With that branch I'm down to ~ 20 test failures (needs to patch fpylll and cypari2 as in the PRs in my comment above)

@tornaria
Copy link
Contributor

tornaria commented Oct 4, 2023

I'm down to 2 doctest failures (only tested x86_64 for now) and I will do a proper "support python 3.12" PR soon.

Meanwhile, I've split a trivial (but long) part of the necessary changes into #36403, which should be trivial to review.

@tornaria
Copy link
Contributor

tornaria commented Oct 5, 2023

The branch develop...tornaria:sage:py312 seems to be working for me. I'll do some testing overnight, then make a PR tomorrow.

vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 12, 2023
…suggestion (part of python 3.12 support)

    
In python 3.12, attribute errors add a suggestion at the end of the
usual error message ("Did you mean ...?").

We add ... at the end of these doctest outputs to fix it.

This PR is split in two commits:

 - The bulk of the changes, in the first commit, was obtained
automatically with:
    ```
    git grep -l "AttributeError:" src | xargs sed -ie \
        's/^ *\(AttributeError: .*\)\?has no attribute.*$/&.../'
    ```
 - The second commit includes 3 changes not catched by the sed pattern
above.

Since this changes a lot of files and is bound to get old, I'd
appreciate a quick review + merge to avoid trouble (the PR is long but
almost trivial and the review should be easy).

I'll soon make a separate PR (on top of this one) with the rest of the
support python 3.12 changes, which are maybe not so trivial but much
shorter than this one.

Related: sagemath#36181

@mkoeppe 🙏
    
URL: sagemath#36403
Reported by: Gonzalo Tornaría
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 19, 2023
    
This PR adds support for running with python 3.12 from system. This has
been tested on the python 3.12 branch of void linux (x86_64, x86_64-musl
and i686).

The first two commits correspond to sagemath#36403. The rest is split is small
pieces and I tried to add reasonable explanations in the commit
messages. Reviewing by commit may be easier (ignoring the first two,
already reviewed).

See also: sagemath#36181

### ⌛ Dependencies

sagemath#36403
    
URL: sagemath#36407
Reported by: Gonzalo Tornaría
Reviewer(s): Matthias Köppe
@dimpase
Copy link
Member

dimpase commented Nov 20, 2023

Had "fun" with Python 3.12 : python/cpython#112282
they hardcoded C stack limit, in the process they broke everything that relies on sys.setrecursionlimit and recursive calls of C modules, e.g. @cache decorator.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 27, 2024

Are 102 commits necessary to switch to python 3.12?

What's your point here, if any? This PR, as I am sure if obvious to you, is an integration PR that has merged numerous PRs where the main work happened.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 27, 2024

I'm setting to "needs work" for now because of the merge conflict.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 27, 2024

I'm sure nobody would oppose to that.

I think you would be surprised if you cared to look at the disputed PRs.

@tornaria
Copy link
Contributor

I'm sure nobody would oppose to that.

I think you would be surprised if you cared to look at the disputed PRs.

-1 vote from me here.

@tornaria tornaria added the disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ label Mar 27, 2024
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 28, 2024
…stro info

    
<!-- ^ 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". -->

- Cherry-picked from sagemath#36181

### 📝 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: ... -->
    
URL: sagemath#37833
Reported by: Matthias Köppe
Reviewer(s): Enrique Manuel Artal Bartolo
vbraun pushed a commit to vbraun/sage that referenced this pull request May 2, 2024
…stro info

    
<!-- ^ 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". -->

- Cherry-picked from sagemath#36181

### 📝 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: ... -->
    
URL: sagemath#37833
Reported by: Matthias Köppe
Reviewer(s): Enrique Manuel Artal Bartolo
vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 10, 2024
…port of Python 3.12.x stable

    
<!-- ^ 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". -->

https://docs.python.org/3/whatsnew/changelog.html#python-3-12-4-final

- In part cherry-picked from sagemath#36181

### 📝 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: ... -->
- Depends on sagemath#37914 (merged here)
- Depends on sagemath#37951 (merged here for sagemath#37026)
- Depends on sagemath#38144 (merged here for testing)
    
URL: sagemath#37834
Reported by: Matthias Köppe
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 16, 2024
…port of Python 3.12.x stable

    
<!-- ^ 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". -->

https://docs.python.org/3/whatsnew/changelog.html#python-3-12-4-final

- In part cherry-picked from sagemath#36181

### 📝 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: ... -->
- Depends on sagemath#37914 (merged here)
- Depends on sagemath#37951 (merged here for sagemath#37026)
- Depends on sagemath#38144 (merged here for testing)
    
URL: sagemath#37834
Reported by: Matthias Köppe
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 16, 2024
…port of Python 3.12.x stable

    
<!-- ^ 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". -->

https://docs.python.org/3/whatsnew/changelog.html#python-3-12-4-final

- In part cherry-picked from sagemath#36181

### 📝 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: ... -->
- Depends on sagemath#37914 (merged here)
- Depends on sagemath#37951 (merged here for sagemath#37026)
- Depends on sagemath#38144 (merged here for testing)
    
URL: sagemath#37834
Reported by: Matthias Köppe
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 17, 2024
…port of Python 3.12.x stable

    
<!-- ^ 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". -->

https://docs.python.org/3/whatsnew/changelog.html#python-3-12-4-final

- In part cherry-picked from sagemath#36181

### 📝 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: ... -->
- Depends on sagemath#37914 (merged here)
- Depends on sagemath#37951 (merged here for sagemath#37026)
- Depends on sagemath#38144 (merged here for testing)
    
URL: sagemath#37834
Reported by: Matthias Köppe
Reviewer(s):
@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 23, 2024

Closing as completed

@mkoeppe mkoeppe closed this Jun 23, 2024
@mkoeppe mkoeppe added this to the sage-10.4 milestone Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: packages: standard disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ p: critical / 2 v: moderate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants