-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
Python 3.12.x #36181
Conversation
1971170
to
6a80e78
Compare
6a80e78
to
e94b71a
Compare
See: sagemath/cypari2#138 and fplll/fpylll#254. |
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) |
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. |
The branch develop...tornaria:sage:py312 seems to be working for me. I'll do some testing overnight, then make a PR tomorrow. |
…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
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
Had "fun" with Python 3.12 : python/cpython#112282 |
Are 102 commits necessary to switch to python 3.12? Sagemath works fine with python 3.12 (I shipped 10.2 and now 10.3 using python 3.12). It should only take a small change in |
Also, a lot of tests fail. |
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. |
I'm setting to "needs work" for now because of the merge conflict. |
I think you would be surprised if you cared to look at the disputed PRs. |
-1 vote from me here. |
…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
…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
…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):
…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):
…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):
…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):
Closing as completed |
Continuation of:
📝 Checklist
⌛ Dependencies
pkgs/sage-conf
: Move metadata fromsetup.cfg
topyproject.toml
#36561m4/pyproject_toml_metadata.m4
: Allow Python 3.12 #36869gmp
6.3.0,mpc
1.3.1,mpfr
4.2.1,mpfrcx
0.6.3,gmpy2
2.2.0a1 #36351gmp
6.3.0,mpc
1.3.1,mpfr
4.2.1,mpfrcx
0.6.3 #36775build/pkgs/gmpy2
: Fix install-requires after #36351 #36945 (absorbed ingmp
6.3.0,mpc
1.3.1,mpfr
4.2.1,mpfrcx
0.6.3,gmpy2
2.2.0a1 #36351)spkg-configure.m4
for Python 3.12 (setuptools instead of distutils) #36983build/pkgs/python3
: Update to 3.12.4; declare support of Python 3.12.x stable #37834 (split out from here, to be merged)build/pkgs/{python3,setuptools}
: Update fedora distro info #37833 (split out from here)Related / follow-ups:
exceptiongroup
,importlib_metadata
,importlib_resources
,typing_extensions
: Require 3.12 features #37402src/environment.yml
, minimize conda environments #35593