Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge #33842
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Nov 25, 2022
2 parents 84f02af + c928c2c commit a1c4ebb
Show file tree
Hide file tree
Showing 44 changed files with 496 additions and 268 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ on:
"centos-stream-9-python3.9",
"gentoo-python3.9",
"gentoo-python3.10",
"gentoo-python3.11",
"archlinux-latest",
"opensuse-15.3-gcc_11-python3.9",
"opensuse-15.4-gcc_11-python3.10",
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/babel/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=Babel-VERSION.tar.gz
sha1=1ce15f82eba5184cabe6ac1491cb58262e27adfd
md5=7166099733d78aa857d74fa50d8ff58c
cksum=1695340328
sha1=75baeb68d7481a67ba203191aa460c56b0221fda
md5=9ee7784fd452d456206ecd3a12694010
cksum=227595701
upstream_url=https://pypi.io/packages/source/b/babel/Babel-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/babel/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.9.1
2.11.0
6 changes: 3 additions & 3 deletions build/pkgs/cppy/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=cppy-VERSION.tar.gz
sha1=3af4f5f14ef1f9b49d7457e2fa5c241c721db29c
md5=2110891d75aa12551deebba1603428c6
cksum=793876648
sha1=c82ee7a4f38e302bfe4de2a695d2bdfefb69951f
md5=7c1f825c43dd66454440932a35b9969c
cksum=1879136901
upstream_url=https://files.pythonhosted.org/packages/source/c/cppy/cppy-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/cppy/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.1
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.29.32.p1
0.29.32.p2
11 changes: 9 additions & 2 deletions build/pkgs/cython/patches/trashcan.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
See https://github.com/cython/cython/pull/2842

and https://github.com/cython/cython/pull/4475

commit c47c4ef735c4b7f1863b21bbe6f112b06c4aad05
Author: Jeroen Demeyer <J.Demeyer@UGent.be>
Date: Thu Feb 14 10:02:41 2019 +0100
Expand Down Expand Up @@ -128,7 +130,7 @@ diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c
index 50d0e21..ca2adbe 100644
--- a/Cython/Utility/ExtensionTypes.c
+++ b/Cython/Utility/ExtensionTypes.c
@@ -74,6 +74,49 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
@@ -74,6 +74,54 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
return r;
}

Expand All @@ -140,7 +142,12 @@ index 50d0e21..ca2adbe 100644
+
+// This requires CPython version >= 2.7.4
+// (or >= 3.2.4 but we don't support such old Python 3 versions anyway)
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070400
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03080000
+// https://github.com/python/cpython/pull/11841 merged so Cython reimplementation
+// is no longer necessary
+#define __Pyx_TRASHCAN_BEGIN Py_TRASHCAN_BEGIN
+#define __Pyx_TRASHCAN_END Py_TRASHCAN_END
+#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070400
+#define __Pyx_TRASHCAN_BEGIN_CONDITION(op, cond) \
+ do { \
+ PyThreadState *_tstate = NULL; \
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/kiwisolver/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=kiwisolver-VERSION.tar.gz
sha1=61811685031328a8a2a77f45593d8238432ce35e
md5=98d746f558685c6b6658cefc39be14df
cksum=1915059157
sha1=157556602639eb6cc8546463f56feaa9023e3bcd
md5=73a4e57c33ded99dbe9a5cabca5be04b
cksum=3382585353
upstream_url=https://files.pythonhosted.org/packages/source/k/kiwisolver/kiwisolver-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/kiwisolver/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.2
1.4.3
8 changes: 4 additions & 4 deletions build/pkgs/python3/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=Python-VERSION.tar.xz
sha1=49ca7a5be7f13375e863442fbd9ead893ace3238
md5=e92356b012ed4d0e09675131d39b1bde
cksum=3450973870
upstream_url=https://www.python.org/ftp/python/VERSION/Python-VERSION.tar.xz
sha1=474838615eab658fc15c87d4bee6bf85a02b424d
md5=fe92acfa0db9b9f5044958edb451d463
cksum=1490492967
upstream_url=https://www.python.org/ftp/python/3.11.0/Python-VERSION.tar.xz
2 changes: 1 addition & 1 deletion build/pkgs/python3/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.8
3.11.0
36 changes: 0 additions & 36 deletions build/pkgs/python3/patches/cygwin-socket-tcpnodelay-21649.patch

This file was deleted.

4 changes: 2 additions & 2 deletions build/pkgs/python3/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SAGE_SPKG_CONFIGURE([python3], [
m4_pushdef([MIN_VERSION], [3.8.0])
m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.8.0])
m4_pushdef([LT_STABLE_VERSION], [3.11.0])
m4_pushdef([LT_VERSION], [3.11.0])
m4_pushdef([LT_STABLE_VERSION], [3.12.0])
m4_pushdef([LT_VERSION], [3.12.0])
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python=PYTHON3],
[Python 3 executable to use for the Sage venv; default: python3])])
Expand Down
1 change: 1 addition & 0 deletions pkgs/sage-docbuild/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering :: Mathematics

Expand Down
3 changes: 2 additions & 1 deletion pkgs/sage-setup/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering :: Mathematics

Expand All @@ -31,7 +32,7 @@ packages =
sage_setup.autogen.interpreters.specs
sage_setup.command

python_requires = >=3.8, <3.11
python_requires = >=3.8, <3.12

install_requires =
pkgconfig
Expand Down
3 changes: 2 additions & 1 deletion pkgs/sagemath-categories/setup.cfg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering :: Mathematics

[options]
python_requires = >=3.8, <3.11
python_requires = >=3.8, <3.12
install_requires =
esyscmd(`sage-get-system-packages install-requires \
sagemath_objects \
Expand Down
5 changes: 3 additions & 2 deletions pkgs/sagemath-environment/setup.cfg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ classifiers =
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering :: Mathematics

[options]
python_requires = >=3.7, <3.11
python_requires = >=3.8, <3.12
install_requires =
esyscmd(`sage-get-system-packages install-requires \
| sed "2,\$s/^/ /;"')dnl
Expand Down
3 changes: 2 additions & 1 deletion pkgs/sagemath-objects/setup.cfg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering :: Mathematics

[options]
python_requires = >=3.8, <3.11
python_requires = >=3.8, <3.12
install_requires =
esyscmd(`sage-get-system-packages install-requires \
gmpy2 \
Expand Down
3 changes: 2 additions & 1 deletion pkgs/sagemath-repl/setup.cfg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering :: Mathematics

[options]
python_requires = >=3.8, <3.11
python_requires = >=3.8, <3.12
install_requires =
esyscmd(`sage-get-system-packages install-requires \
sagemath_objects \
Expand Down
21 changes: 21 additions & 0 deletions src/sage/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,27 @@
message='The distutils(.sysconfig module| package) is deprecated',
module='Cython|distutils|numpy|sage.env|sage.features')

# triggered by cython 0.29.32
warnings.filterwarnings('ignore', category=DeprecationWarning,
message="'cgi' is deprecated and slated for removal in Python 3.13",
module='Cython')

# triggered by pyparsing 2.4.7
warnings.filterwarnings('ignore', category=DeprecationWarning,
message="module 'sre_constants' is deprecated",
module='pyparsing')

# importlib.resources.path and ...read_binary are deprecated in python 3.11,
# but the replacement importlib.resources.files needs python 3.9
warnings.filterwarnings('ignore', category=DeprecationWarning,
message=r'(path|read_binary) is deprecated\. Use files\(\) instead\.',
module='sage.repl.rich_output.output_(graphics|graphics3d|video)')

# triggered by sphinx
warnings.filterwarnings('ignore', category=DeprecationWarning,
message="'imghdr' is deprecated and slated for removal in Python 3.13",
module='sphinx.util.images')

################ end setup warnings ###############################


Expand Down
2 changes: 1 addition & 1 deletion src/sage/coding/abstract_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _explain_constructor(cl):
reqs = "The constructor requires the arguments {}.".format(args)
else:
reqs = "The constructor requires no arguments."
if argspec.varargs or argspec.keywords:
if argspec.varargs or argspec.varkw:
var = "It accepts unspecified arguments as well.\n"
else:
var = ""
Expand Down
9 changes: 8 additions & 1 deletion src/sage/cpython/cython_metaclass.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
* http://www.gnu.org/licenses/
*****************************************************************************/

/* Compatibility for python 3.8, can be removed later */
#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)
static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
{ ob->ob_type = type; }
#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)
#endif

/* Tuple (None, None, None), initialized as needed */
static PyObject* NoneNoneNone;

Expand Down Expand Up @@ -66,7 +73,7 @@ static CYTHON_INLINE int Sage_PyType_Ready(PyTypeObject* t)
}

/* Now, set t.__class__ to metaclass */
Py_TYPE(t) = metaclass;
Py_SET_TYPE(t, metaclass);
PyType_Modified(t);
}
else
Expand Down
Loading

0 comments on commit a1c4ebb

Please sign in to comment.