-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Replace Python 3.9 by 3.12 in Conda workflow #36431
base: develop
Are you sure you want to change the base?
Commits on Oct 4, 2023
-
py312: fix AttributeError doctests (sed changes)
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 commit has the bulk of the changes, obtained with: git grep -l "AttributeError:" src | xargs sed -ie \ 's/^ *\(AttributeError: .*\)\?has no attribute.*$/&.../'
Configuration menu - View commit details
-
Copy full SHA for bf4b9e5 - Browse repository at this point
Copy the full SHA bf4b9e5View commit details -
py312: fix AttributeError doctests (manual changes)
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 commit has a few manual changes which didn't match the sed pattern in the previous commit.
Configuration menu - View commit details
-
Copy full SHA for f1b77b1 - Browse repository at this point
Copy the full SHA f1b77b1View commit details -
py312: changes in PyLong internals
The layout for python integers changed in python 3.12. We add a module `sage.cpython.pycore_long` which copies the new (internal) api of PyLong from python 3.12. We also implement fallback version of these functions suitable for python pre-3.12. Note the files implementing the `pycore_long` module (`pycore_long.pxd` and `pycore_long.h`) are shared with fpylll and cypari2.
Configuration menu - View commit details
-
Copy full SHA for 4e05725 - Browse repository at this point
Copy the full SHA 4e05725View commit details -
In python 3.12, the `struct atexit_callback` was renamed to `struct atexit_py_callback`. The easiest workaround is to add `#define atexit_callback atexit_py_callback` in the right place when building using python 3.12 or newer.
Configuration menu - View commit details
-
Copy full SHA for 4ace19f - Browse repository at this point
Copy the full SHA 4ace19fView commit details -
py312: disable cython profile=true in one file
Tracing has changed in python 3.12 in such a way that cython doesn't support it properly anymore. This one file sets `profile=true` for cython which won't work anymore (and it fails to build, at least with cython 0.29). We just disable that line. See also: cython/cython#5450
Configuration menu - View commit details
-
Copy full SHA for a676f6b - Browse repository at this point
Copy the full SHA a676f6bView commit details -
py312: fix issue when including internal python header
To use some (internal) declarations related to dict type, we have to include `<internal/pycore_dict.h>` which needs `#define Py_BUILD_CORE` to be loaded. This causes trouble when `Python.h` was included before defining `Py_BUILD_CORE`, due to a macro `_PyGC_FINALIZED`. We fix it by undefining said macro.
Configuration menu - View commit details
-
Copy full SHA for 6c69383 - Browse repository at this point
Copy the full SHA 6c69383View commit details -
Some changes in ast, the old `node.n` and `node.s` are deprecated in favour of a common `node.value`. Making this change seems better than just ignoring the deprecation warning.
Configuration menu - View commit details
-
Copy full SHA for 3b32f12 - Browse repository at this point
Copy the full SHA 3b32f12View commit details -
py312: filter deprecation warnings
This adds some filterwarnings that trigger with python 3.12. - deprecation of `datetime.datetime.utcfromtimestamp()` this is triggered by python modules `dateutil` and `sphinx`. - `os.fork()` and `os.ptyfork()` are deprecated when running multi-threaded; I don't see an easy way out of this, so ignore it. - itertools won't support pickling in python 3.14; let's ignore this for now with the hope there's an alternative before 3.14.
Configuration menu - View commit details
-
Copy full SHA for 1a43ad6 - Browse repository at this point
Copy the full SHA 1a43ad6View commit details
Commits on Oct 5, 2023
-
py312: don't use
pkgutil.find_loader()
Is deprecated, and it can be replaced just fine with `importlib.util.find_spec()`.
Configuration menu - View commit details
-
Copy full SHA for e46eec6 - Browse repository at this point
Copy the full SHA e46eec6View commit details -
py312: fix
sage.misc.dev_tools.load_submodules()
Since `importer.find_module(...)` was removed in 3.12. We just follow the suggestion from https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly Note that the last three added lines here could be replaced instead by spec.loader.load_module(module_name) which works; however this is deprecated so it's better to use the recommended way using `importlib.util.module_from_spec(...)` and `spec.loader.execute_module(...)`.
Configuration menu - View commit details
-
Copy full SHA for 7fc35a6 - Browse repository at this point
Copy the full SHA 7fc35a6View commit details -
py312: sum changed in python 3.12, fix doctest
In python < 3.12 we have sage: a = delta_qexp(1000) sage: sum(a[n]/float(n)^14 for n in range(1,1000)) 0.9985830631627459 This changed in python 3.12 to sage: sum(a[n]/float(n)^14 for n in range(1,1000)) 0.9985830631627461 The latter is the correct one as can be seen using rationals: sage: float(sum(a[n]/n^14 for n in range(1,1000))) 0.9985830631627461 As a workaround, we do the sum in reverse (from small to large terms), which gives the correct result in any case: sage: sum(a[n]/float(n)^14 for n in reversed(range(1,1000))) 0.9985830631627461
Configuration menu - View commit details
-
Copy full SHA for 409c5bc - Browse repository at this point
Copy the full SHA 409c5bcView commit details -
py312: use dict instead of OrderedDict for consistent printing
In python 3.12 the printing of OrderedDict has been changed. As of Python 3.7, regular dicts are guaranteed to be ordered, so it's safe to replace OrderedDict by dict. Maybe convenient to replace other uses of OrderedDict, although this is out of scope of python 3.12 support.
Configuration menu - View commit details
-
Copy full SHA for 9c1c7a0 - Browse repository at this point
Copy the full SHA 9c1c7a0View commit details -
py312: fix crash in polyhedron face iterator
Running sage: g = Polyhedron().face_generator() sage: g.__next__() A -1-dimensional face of a Polyhedron in ZZ^0 sage: g.__next__() is supposed to raise `StopIteration`. However in python 3.12 the second call to `__next__()` leads to a crash. This is caused by a `return -1` in `next_face_loop()` which is supposed to mean `raise StopIteration`. Using raise explicitly fixes the crash.
Configuration menu - View commit details
-
Copy full SHA for 93614fc - Browse repository at this point
Copy the full SHA 93614fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 352a4b6 - Browse repository at this point
Copy the full SHA 352a4b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef85779 - Browse repository at this point
Copy the full SHA ef85779View commit details
Commits on Oct 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 34cc4d5 - Browse repository at this point
Copy the full SHA 34cc4d5View commit details
Commits on Oct 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 38d206d - Browse repository at this point
Copy the full SHA 38d206dView commit details
Commits on Oct 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f064baf - Browse repository at this point
Copy the full SHA f064bafView commit details
Commits on Oct 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7c1ac21 - Browse repository at this point
Copy the full SHA 7c1ac21View commit details -
Configuration menu - View commit details
-
Copy full SHA for f324e31 - Browse repository at this point
Copy the full SHA f324e31View commit details
Commits on Nov 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 33c20af - Browse repository at this point
Copy the full SHA 33c20afView commit details
Commits on Dec 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e984bf0 - Browse repository at this point
Copy the full SHA e984bf0View commit details
Commits on Dec 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2809a33 - Browse repository at this point
Copy the full SHA 2809a33View commit details
Commits on Dec 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 42cf706 - Browse repository at this point
Copy the full SHA 42cf706View commit details
Commits on Feb 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 555ca00 - Browse repository at this point
Copy the full SHA 555ca00View commit details
Commits on Feb 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e0cd6bb - Browse repository at this point
Copy the full SHA e0cd6bbView commit details