Skip to content

Commit 08aa2f8

Browse files
author
Release Manager
committed
Trac #33842: Upgrade python to 3.11
Issues - sagemath/memory_allocator#6 - sagemath/cypari2#114 - fplll/fpylll#230 URL: https://trac.sagemath.org/33842 Reported by: mkoeppe Ticket author(s): Gonzalo Tornaría, Matthias Koeppe, Andrey Belgorodski Reviewer(s): Matthias Koeppe, Dima Pasechnik
2 parents 75bedf9 + ac0105e commit 08aa2f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+617
-281
lines changed

.github/workflows/docker.yml

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ on:
4646
"centos-stream-9-python3.9",
4747
"gentoo-python3.9",
4848
"gentoo-python3.10",
49+
"gentoo-python3.11",
4950
"archlinux-latest",
5051
"opensuse-15.3-gcc_11-python3.9",
5152
"opensuse-15.4-gcc_11-python3.10",

build/pkgs/babel/checksums.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tarball=Babel-VERSION.tar.gz
2-
sha1=1ce15f82eba5184cabe6ac1491cb58262e27adfd
3-
md5=7166099733d78aa857d74fa50d8ff58c
4-
cksum=1695340328
2+
sha1=75baeb68d7481a67ba203191aa460c56b0221fda
3+
md5=9ee7784fd452d456206ecd3a12694010
4+
cksum=227595701
55
upstream_url=https://pypi.io/packages/source/b/babel/Babel-VERSION.tar.gz

build/pkgs/babel/package-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.1
1+
2.11.0

build/pkgs/cython/package-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.29.32.p1
1+
0.29.32.p2

build/pkgs/cython/patches/trashcan.patch

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
See https://github.com/cython/cython/pull/2842
22

3+
and https://github.com/cython/cython/pull/4475
4+
35
commit c47c4ef735c4b7f1863b21bbe6f112b06c4aad05
46
Author: Jeroen Demeyer <[email protected]>
57
Date: Thu Feb 14 10:02:41 2019 +0100
@@ -128,7 +130,7 @@ diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c
128130
index 50d0e21..ca2adbe 100644
129131
--- a/Cython/Utility/ExtensionTypes.c
130132
+++ b/Cython/Utility/ExtensionTypes.c
131-
@@ -74,6 +74,49 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
133+
@@ -74,6 +74,54 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
132134
return r;
133135
}
134136

@@ -140,7 +142,12 @@ index 50d0e21..ca2adbe 100644
140142
+
141143
+// This requires CPython version >= 2.7.4
142144
+// (or >= 3.2.4 but we don't support such old Python 3 versions anyway)
143-
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070400
145+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03080000
146+
+// https://github.com/python/cpython/pull/11841 merged so Cython reimplementation
147+
+// is no longer necessary
148+
+#define __Pyx_TRASHCAN_BEGIN Py_TRASHCAN_BEGIN
149+
+#define __Pyx_TRASHCAN_END Py_TRASHCAN_END
150+
+#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070400
144151
+#define __Pyx_TRASHCAN_BEGIN_CONDITION(op, cond) \
145152
+ do { \
146153
+ PyThreadState *_tstate = NULL; \

build/pkgs/kiwisolver/checksums.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tarball=kiwisolver-VERSION.tar.gz
2-
sha1=61811685031328a8a2a77f45593d8238432ce35e
3-
md5=98d746f558685c6b6658cefc39be14df
4-
cksum=1915059157
2+
sha1=157556602639eb6cc8546463f56feaa9023e3bcd
3+
md5=73a4e57c33ded99dbe9a5cabca5be04b
4+
cksum=3382585353
55
upstream_url=https://files.pythonhosted.org/packages/source/k/kiwisolver/kiwisolver-VERSION.tar.gz
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.2
1+
1.4.3

build/pkgs/python3/checksums.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tarball=Python-VERSION.tar.xz
2-
sha1=49ca7a5be7f13375e863442fbd9ead893ace3238
3-
md5=e92356b012ed4d0e09675131d39b1bde
4-
cksum=3450973870
2+
sha1=89ee31611b73dc0c32c178d15aa208734b462c5a
3+
md5=4efe92adf28875c77d3b9b2e8d3bc44a
4+
cksum=2916176597
55
upstream_url=https://www.python.org/ftp/python/VERSION/Python-VERSION.tar.xz
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10.8
1+
3.11.1

build/pkgs/python3/patches/cygwin-socket-tcpnodelay-21649.patch

-36
This file was deleted.

build/pkgs/python3/spkg-configure.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
SAGE_SPKG_CONFIGURE([python3], [
22
m4_pushdef([MIN_VERSION], [3.8.0])
33
m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.8.0])
4-
m4_pushdef([LT_STABLE_VERSION], [3.11.0])
5-
m4_pushdef([LT_VERSION], [3.11.0])
4+
m4_pushdef([LT_STABLE_VERSION], [3.12.0])
5+
m4_pushdef([LT_VERSION], [3.12.0])
66
AC_ARG_WITH([python],
77
[AS_HELP_STRING([--with-python=PYTHON3],
88
[Python 3 executable to use for the Sage venv; default: python3])])

pkgs/sage-docbuild/setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers =
2020
Programming Language :: Python :: 3.8
2121
Programming Language :: Python :: 3.9
2222
Programming Language :: Python :: 3.10
23+
Programming Language :: Python :: 3.11
2324
Programming Language :: Python :: Implementation :: CPython
2425
Topic :: Scientific/Engineering :: Mathematics
2526

pkgs/sage-setup/setup.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers =
2020
Programming Language :: Python :: 3.8
2121
Programming Language :: Python :: 3.9
2222
Programming Language :: Python :: 3.10
23+
Programming Language :: Python :: 3.11
2324
Programming Language :: Python :: Implementation :: CPython
2425
Topic :: Scientific/Engineering :: Mathematics
2526

@@ -31,7 +32,7 @@ packages =
3132
sage_setup.autogen.interpreters.specs
3233
sage_setup.command
3334

34-
python_requires = >=3.8, <3.11
35+
python_requires = >=3.8, <3.12
3536

3637
install_requires =
3738
pkgconfig

pkgs/sagemath-categories/setup.cfg.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ classifiers =
2121
Programming Language :: Python :: 3.8
2222
Programming Language :: Python :: 3.9
2323
Programming Language :: Python :: 3.10
24+
Programming Language :: Python :: 3.11
2425
Programming Language :: Python :: Implementation :: CPython
2526
Topic :: Scientific/Engineering :: Mathematics
2627

2728
[options]
28-
python_requires = >=3.8, <3.11
29+
python_requires = >=3.8, <3.12
2930
install_requires =
3031
esyscmd(`sage-get-system-packages install-requires \
3132
sagemath_objects \

pkgs/sagemath-environment/setup.cfg.m4

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ classifiers =
1818
Operating System :: POSIX
1919
Operating System :: MacOS :: MacOS X
2020
Programming Language :: Python :: 3 :: Only
21-
Programming Language :: Python :: 3.7
2221
Programming Language :: Python :: 3.8
2322
Programming Language :: Python :: 3.9
23+
Programming Language :: Python :: 3.10
24+
Programming Language :: Python :: 3.11
2425
Programming Language :: Python :: Implementation :: CPython
2526
Topic :: Scientific/Engineering :: Mathematics
2627

2728
[options]
28-
python_requires = >=3.7, <3.11
29+
python_requires = >=3.8, <3.12
2930
install_requires =
3031
esyscmd(`sage-get-system-packages install-requires \
3132
| sed "2,\$s/^/ /;"')dnl

pkgs/sagemath-objects/setup.cfg.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ classifiers =
2121
Programming Language :: Python :: 3.8
2222
Programming Language :: Python :: 3.9
2323
Programming Language :: Python :: 3.10
24+
Programming Language :: Python :: 3.11
2425
Programming Language :: Python :: Implementation :: CPython
2526
Topic :: Scientific/Engineering :: Mathematics
2627

2728
[options]
28-
python_requires = >=3.8, <3.11
29+
python_requires = >=3.8, <3.12
2930
install_requires =
3031
esyscmd(`sage-get-system-packages install-requires \
3132
gmpy2 \

pkgs/sagemath-repl/setup.cfg.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ classifiers =
2121
Programming Language :: Python :: 3.8
2222
Programming Language :: Python :: 3.9
2323
Programming Language :: Python :: 3.10
24+
Programming Language :: Python :: 3.11
2425
Programming Language :: Python :: Implementation :: CPython
2526
Topic :: Scientific/Engineering :: Mathematics
2627

2728
[options]
28-
python_requires = >=3.8, <3.11
29+
python_requires = >=3.8, <3.12
2930
install_requires =
3031
esyscmd(`sage-get-system-packages install-requires \
3132
sagemath_objects \

src/sage/all.py

+26
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,32 @@
104104
message='The distutils(.sysconfig module| package) is deprecated',
105105
module='Cython|distutils|numpy|sage.env|sage.features')
106106

107+
# triggered by cython 0.29.32
108+
warnings.filterwarnings('ignore', category=DeprecationWarning,
109+
message="'cgi' is deprecated and slated for removal in Python 3.13",
110+
module='Cython')
111+
112+
# triggered by pyparsing 2.4.7
113+
warnings.filterwarnings('ignore', category=DeprecationWarning,
114+
message="module 'sre_constants' is deprecated",
115+
module='pyparsing')
116+
117+
# importlib.resources.path and ...read_binary are deprecated in python 3.11,
118+
# but the replacement importlib.resources.files needs python 3.9
119+
warnings.filterwarnings('ignore', category=DeprecationWarning,
120+
message=r'(path|read_binary) is deprecated\. Use files\(\) instead\.',
121+
module='sage.repl.rich_output.output_(graphics|graphics3d|video)')
122+
123+
# triggered by sphinx
124+
warnings.filterwarnings('ignore', category=DeprecationWarning,
125+
message="'imghdr' is deprecated and slated for removal in Python 3.13",
126+
module='sphinx.util.images')
127+
128+
# triggered by docutils 0.19 on Python 3.11
129+
warnings.filterwarnings('ignore', category=DeprecationWarning,
130+
message=r"Use setlocale\(\), getencoding\(\) and getlocale\(\) instead",
131+
module='docutils.io')
132+
107133
################ end setup warnings ###############################
108134

109135

0 commit comments

Comments
 (0)