Opened 10 months ago

Closed 7 months ago

Last modified 7 months ago

#30184 closed task (fixed)

Support Python 3.9

Reported by: slelievre Owned by:
Priority: blocker Milestone: sage-9.2
Component: packages: standard Keywords: upgrade, python
Cc: arojas, embray, fbissey, gh-kliem, gh-timokau, isuruf, jhpalmieri, mkoeppe, slelievre, thansen, tscrim, jdemeyer, dimpase Merged in:
Authors: Matthias Koeppe Reviewers: John Palmieri, Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 9d06080 (Commits, GitHub, GitLab) Commit:
Dependencies: #27754, #28012, #30590, #30053, #30595, #30576, #29500, #30546 Stopgaps:

Status badges

Description (last modified by mkoeppe)

We should support Python 3.9 (expected to be released 2020-10-05) in Sage 9.2.

The present ticket is for the patches necessary to support Python 3.9 in addition to 3.7 and 3.8.

It does not include the actual upgrade to Python 3.9 - to test, merge #30589.

Change History (69)

comment:1 Changed 10 months ago by slelievre

Python 3.9.0.beta5, the last of five planned beta release previews, was released on 2020-07-20.

It would be nice to test and report any issues to the Python bug tracker.

comment:2 Changed 10 months ago by jhpalmieri

I can't even get 3.8 to work (#27754). :(

comment:3 Changed 9 months ago by slelievre

Python 3.9.0 is *almost* ready, with *3.9.0rc1*, the penultimate release preview, released.

comment:4 Changed 9 months ago by mkoeppe

  • Description modified (diff)

comment:5 Changed 9 months ago by mkoeppe

  • Dependencies set to #27754
  • Description modified (diff)

comment:6 Changed 9 months ago by mkoeppe

  • Dependencies changed from #27754 to #27754, #28012

comment:7 Changed 8 months ago by slelievre

Python 3.9.0rc2 announced today on python-announce:

Python 3.9.0 is almost ready. This release, 3.9.0rc2, is the last planned preview before the final release of Python 3.9.0 on 2020-10-05. Get it here:

https://www.python.org/downloads/release/python-390rc2/

In the mean time, we strongly encourage maintainers of third-party Python projects to prepare their projects for 3.9 compatibility during this phase. As always, report any issues to the Python bug tracker <https://bugs.python.org/>.

comment:8 Changed 8 months ago by mkoeppe

  • Description modified (diff)

comment:9 Changed 8 months ago by mkoeppe

With #30589 (Python 3.9.0rc2), the build goes smoothly up to here:

[sagelib-9.2.beta12] [1/1] gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -I/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src -I/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/ext -I/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/include/python3.9 -I/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/site-packages/numpy/core/include -Ibuild/cythonized -I/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/include/python3.9 -c build/cythonized/sage/cpython/debug.c -o build/temp.macosx-10.9-x86_64-3.9/build/cythonized/sage/cpython/debug.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c99
[sagelib-9.2.beta12] In file included from build/cythonized/sage/cpython/debug.c:1446:
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:86:32: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     pointer_check_constant(tp->attr, NULL) \
[sagelib-9.2.beta12]                            ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:87:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, PyType_GenericAlloc) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:88:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, PyType_GenericNew) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:89:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, PyObject_Del) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:90:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, PyObject_GC_Del) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:91:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, PyObject_GenericGetAttr) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:92:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, PyObject_GenericSetAttr) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:93:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, _Py_HashPointer) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:94:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, PyObject_HashNotImplemented) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:95:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, subtype_traverse) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:96:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, subtype_clear) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:97:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     else pointer_check_constant(tp->attr, subtype_dealloc) \
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:78:9: note: expanded from macro 'pointer_check_constant'
[sagelib-9.2.beta12]     if (ptr == (void*)(val)) \
[sagelib-9.2.beta12]         ^~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:108:39: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]                 if (subtp->sub && tp->attr == subtp->attr) \
[sagelib-9.2.beta12]                                   ~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:108:54: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]                 if (subtp->sub && tp->attr == subtp->attr) \
[sagelib-9.2.beta12]                                               ~~~~~  ^
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:188:18: error: no member named 'tp_print' in 'struct _typeobject'
[sagelib-9.2.beta12]     attr_pointer(tp_print);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~^~~~~~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:123:24: note: expanded from macro 'attr_pointer'
[sagelib-9.2.beta12]     attr_pointer_value(attr);
[sagelib-9.2.beta12]     ~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:119:65: note: expanded from macro 'attr_pointer_value'
[sagelib-9.2.beta12] #define attr_pointer_value(attr) subattr_pointer_value(tp_name, attr);
[sagelib-9.2.beta12]                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
[sagelib-9.2.beta12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/build/pkgs/sagelib/src/sage/cpython/debugimpl.c:117:37: note: expanded from macro 'subattr_pointer_value'
[sagelib-9.2.beta12]     if (special) printf("%p\n", tp->attr);
[sagelib-9.2.beta12]                                 ~~  ^
[sagelib-9.2.beta12] 15 errors generated.
[sagelib-9.2.beta12] error: command '/usr/bin/gcc' failed with exit code 1
[sagelib-9.2.beta12] Exception ignored in: <function Pool.__del__ at 0x1196803a0>
[sagelib-9.2.beta12] Traceback (most recent call last):
[sagelib-9.2.beta12]   File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/multiprocessing/pool.py", line 268, in __del__
[sagelib-9.2.beta12]     self._change_notifier.put(None)
[sagelib-9.2.beta12]   File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/multiprocessing/queues.py", line 378, in put
[sagelib-9.2.beta12]     self._writer.send_bytes(obj)
[sagelib-9.2.beta12]   File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/multiprocessing/connection.py", line 205, in send_bytes
[sagelib-9.2.beta12]     self._send_bytes(m[offset:offset + size])
[sagelib-9.2.beta12]   File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/multiprocessing/connection.py", line 416, in _send_bytes
[sagelib-9.2.beta12]     self._send(header + buf)
[sagelib-9.2.beta12]   File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/multiprocessing/connection.py", line 373, in _send
[sagelib-9.2.beta12]     n = write(self._handle, buf)
[sagelib-9.2.beta12] OSError: [Errno 9] Bad file descriptor
[sagelib-9.2.beta12] 
[sagelib-9.2.beta12] real	0m7.479s
[sagelib-9.2.beta12] user	0m4.042s
[sagelib-9.2.beta12] sys	0m2.327s

comment:10 Changed 8 months ago by mkoeppe

  • Cc jdemeyer added

comment:11 Changed 8 months ago by mkoeppe

There is little evidence that anyone but the author of type_debug has used this facility. Candidate for removal. Surely there must be something like this on PyPI somewhere?

comment:12 Changed 8 months ago by mkoeppe

  • Dependencies changed from #27754, #28012 to #27754, #28012, #30590

comment:13 Changed 8 months ago by mkoeppe

  • Branch set to u/mkoeppe/support_python_3_9

comment:14 follow-up: Changed 8 months ago by mkoeppe

  • Commit set to 0d00d0ab6b574b6e03f62f1ec6cf2f7e6fb5539f

Deprecation warnings in docbuild:

[dochtml] <frozen importlib._bootstrap>:228: DeprecationWarning: The parser module is deprecated and will be removed in future versions of Python
[dochtml] [arithgrou] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/ast.py:407: DeprecationWarning: visit_NameConstant is deprecated; add visit_Constant
[dochtml] [arithgrou]   return visitor(node)
[dochtml] [plot3d   ] /Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/ast.py:407: DeprecationWarning: visit_Str is deprecated; add visit_Constant

New commits:

3e3c0eabuild/pkgs/python3: Update to 3.9.0rc2
8f71b29src/sage/cpython/debugimpl.c: Remove python2 code
25b2b05Merge branch 't/30590/src_sage_cpython_debugimpl_c__remove_python2_code' into t/30184/support_python_3_9
0d00d0asrc/sage/cpython/debugimpl.c: Disable _type_debug for Python 3.9

comment:15 Changed 8 months ago by mkoeppe

  • Dependencies changed from #27754, #28012, #30590 to #27754, #28012, #30590, #30053

comment:16 Changed 8 months ago by mkoeppe

make ptestlong also has various failures due to new warnings DeprecationWarning: visit_Str is deprecated; add visit_Constant and similar

comment:17 Changed 8 months ago by mkoeppe

Any warning-suppression specialists here?

comment:18 Changed 8 months ago by jhpalmieri

Can you add to the relevant section of src/sage/all.py? There are lines like

# scipy 1.18 introduced reprecation warnings on a number of things they are moving to
# numpy, e.g. DeprecationWarning: scipy.array is deprecated
#             and will be removed in SciPy 2.0.0, use numpy.array instead
# This affects networkx 2.2 up and including 2.4 (cf. :trac:29766)
warnings.filterwarnings('ignore', category=DeprecationWarning,
    module='.*(scipy|networkx)')

comment:19 Changed 8 months ago by mkoeppe

Thanks!

comment:20 Changed 8 months ago by git

  • Commit changed from 0d00d0ab6b574b6e03f62f1ec6cf2f7e6fb5539f to 4a8c19135881ec97c45e65dba859c8dfe44e1158

Branch pushed to git repo; I updated commit sha1. New commits:

4a8c191src/sage/all.py: Filter out Python 3.9 deprecation warnings from ast

comment:21 in reply to: ↑ 14 Changed 8 months ago by mkoeppe

Replying to mkoeppe:

Deprecation warnings in docbuild:

[dochtml] <frozen importlib._bootstrap>:228: DeprecationWarning: The parser module is deprecated and will be removed in future versions of Python

This one also shows up on normal startup. Coming from here:

$ git grep 'import parser'
src/sage/symbolic/ring.pyx:import parser

(Implementation of isidentifier.)

Last edited 8 months ago by mkoeppe (previous) (diff)

comment:22 Changed 8 months ago by mkoeppe

comment:23 Changed 8 months ago by git

  • Commit changed from 4a8c19135881ec97c45e65dba859c8dfe44e1158 to c3d080504b708b9363e1a0d6be77f97c25e2c380

Branch pushed to git repo; I updated commit sha1. New commits:

c3d0805src/sage/symbolic/ring.pyx (isidentifier): Remove py2-only code, use of deprecated parser module

comment:24 Changed 8 months ago by git

  • Commit changed from c3d080504b708b9363e1a0d6be77f97c25e2c380 to 463e90d4c66be3a945d1817c5fe06502f0bf9012

Branch pushed to git repo; I updated commit sha1. New commits:

463e90dsrc/sage/misc/sageinspect.py: Adjust doctest for sage_getsourcelines for Python 3.9 - decorators are now part of the definition

comment:25 follow-up: Changed 8 months ago by mkoeppe

More doctest failures:

sage -t --long --random-seed=0 src/sage/rings/polynomial/pbori/randompoly.py
**********************************************************************
File "src/sage/rings/polynomial/pbori/randompoly.py", line 46, in sage.rings.polynomial.pbori.randompoly.?
Failed example:
    s=sparse_random_system(r, number_of_polynomials = 20, variables_per_polynomial = 3, degree=2, random_seed=123)
    DeprecationWarning: Seeding based on hashing is deprecated
    since Python 3.9 and will be removed in a subsequent version. The only 
    supported seed types are: None, int, float, str, bytes, and bytearray.
**********************************************************************
File "src/sage/functions/other.py", line 1629, in sage.functions.other.Function_factorial._eval_
Failed example:
    factorial(float(3.2))        # abs tol 1e-14
      File "<doctest sage.functions.other.Function_factorial._eval_[8]>", line 1, in <module>
        factorial(float(RealNumber('3.2')))        # abs tol 1e-14
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    DeprecationWarning: Using factorial() with floats is deprecated
    7.756689535793181
sage -t --long --random-seed=0 src/sage/misc/sageinspect.py
**********************************************************************
File "src/sage/misc/sageinspect.py", line 428, in sage.misc.sageinspect.SageArgSpecVisitor
Failed example:
    v = ast.parse("jc = ['veni', 'vidi', 'vici']").body[0]; v
Expected:
    <_ast.Assign object at ...>
Got:
    <ast.Assign object at 0x11ce58a00>
sage -t --long --random-seed=0 src/sage/combinat/root_system/pieri_factors.py
**********************************************************************
File "src/sage/combinat/root_system/pieri_factors.py", line 150, in sage.combinat.root_system.pieri_factors.PieriFactors.elements
Failed example:
    [w.reduced_word() for w in PF.elements()]
Expected:
    [[3, 2, 1], [2, 1], [3, 1], [3, 2], [2], [1], [3], []]
Got:
    [[3, 2, 1], [2, 1], [3, 1], [2], [1], [3], [3, 2], []]

sage -t --long --random-seed=0 src/sage/misc/latex.py
**********************************************************************
File "src/sage/misc/latex.py", line 556, in sage.misc.latex.has_latex_attr
Failed example:
    T._latex_()
Expected:
    Traceback (most recent call last):
    ...
    TypeError: descriptor '_latex_' of 'sage.matrix.matrix0.Matrix' object needs an argument
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 720, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 1145, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.latex.has_latex_attr[5]>", line 1, in <module>
        T._latex_()
    TypeError: unbound method Matrix._latex_() needs an argument

comment:26 Changed 8 months ago by git

  • Commit changed from 463e90d4c66be3a945d1817c5fe06502f0bf9012 to 130819f69fffb9134a46cf66d9684478ae6765d5

Branch pushed to git repo; I updated commit sha1. New commits:

130819fsrc/sage/misc/sageinspect.py (SageArgSpecVisitor): Relax doctest pattern for python 3.9

comment:27 Changed 8 months ago by git

  • Commit changed from 130819f69fffb9134a46cf66d9684478ae6765d5 to 6bedc45b34fd07fdb89eb050bdb7d1c606bce67c

Branch pushed to git repo; I updated commit sha1. New commits:

6bedc45src/sage/misc/latex.py (has_latex_attr): Relax doctest pattern for python 3.9

comment:28 Changed 8 months ago by git

  • Commit changed from 6bedc45b34fd07fdb89eb050bdb7d1c606bce67c to 1e38f98e06941d9b11e67c669342115b953390c5

Branch pushed to git repo; I updated commit sha1. New commits:

1e38f98src/sage/combinat/root_system/pieri_factors.py: Use sorted in doctest for python 3.9

comment:29 follow-up: Changed 8 months ago by mkoeppe

Also various doctest errors because the order of deprecation warning and output changed in sage.libs.ppl:

9 items had failures:
   1 of   9 in sage.libs.ppl.Constraint.ascii_dump
   1 of   9 in sage.libs.ppl.Constraint_System.ascii_dump
   1 of   9 in sage.libs.ppl.Generator.ascii_dump
   1 of   9 in sage.libs.ppl.Generator_System.ascii_dump
   1 of   9 in sage.libs.ppl.Linear_Expression.ascii_dump
   1 of   6 in sage.libs.ppl.Poly_Con_Relation.ascii_dump
   1 of   6 in sage.libs.ppl.Poly_Gen_Relation.ascii_dump
   1 of  10 in sage.libs.ppl.Polyhedron.ascii_dump
   1 of   8 in sage.libs.ppl.Variables_Set.ascii_dump

comment:30 in reply to: ↑ 29 Changed 8 months ago by mkoeppe

Replying to mkoeppe:

Also various doctest errors because the order of deprecation warning and output changed in sage.libs.ppl:

I think we can just remove sage.libs.ppl - #30595

comment:31 Changed 8 months ago by mkoeppe

  • Dependencies changed from #27754, #28012, #30590, #30053 to #27754, #28012, #30590, #30053, #30595
  • Description modified (diff)

comment:32 Changed 8 months ago by git

  • Commit changed from 1e38f98e06941d9b11e67c669342115b953390c5 to 867a96b8b67d4d1a027e29e5ce8e145942d5b796

Branch pushed to git repo; I updated commit sha1. New commits:

27de60fsage.libs.ppl: Remove
12e0f72Merge branch 't/30595/remove_deprecated_sage_libs_ppl' into t/30184/support_python_3_9
867a96bsrc/sage/geometry/polyhedron/palp_database.py: Relax doctest pattern for python 3.9

comment:33 follow-up: Changed 8 months ago by mkoeppe

Only these two remain. Perhaps "good enough for 9.2"?

sage -t --long --random-seed=0 src/sage/functions/other.py  # 1 doctest failed
sage -t --long --random-seed=0 src/sage/rings/polynomial/pbori/randompoly.py  # 1 doctest failed

comment:34 Changed 8 months ago by mkoeppe

  • Description modified (diff)
  • Milestone changed from sage-9.3 to sage-9.2

comment:35 Changed 8 months ago by git

  • Commit changed from 867a96b8b67d4d1a027e29e5ce8e145942d5b796 to ee7f8bdcebfec9aca6c2d6901640709a88c789bb

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

d3dd329Merge branch 't/30595/remove_deprecated_sage_libs_ppl' into t/30184/support_python_3_9
f60629bbuild/pkgs/python3: Update to 3.9.0rc2
d92a915src/sage/cpython/debugimpl.c: Disable _type_debug for Python 3.9
c4a9c51src/sage/all.py: Filter out Python 3.9 deprecation warnings from ast
586cf82src/sage/symbolic/ring.pyx (isidentifier): Remove py2-only code, use of deprecated parser module
5a92bb4src/sage/misc/sageinspect.py: Adjust doctest for sage_getsourcelines for Python 3.9 - decorators are now part of the definition
6fd4f25src/sage/misc/sageinspect.py (SageArgSpecVisitor): Relax doctest pattern for python 3.9
edabf6dsrc/sage/misc/latex.py (has_latex_attr): Relax doctest pattern for python 3.9
bc707eesrc/sage/combinat/root_system/pieri_factors.py: Use sorted in doctest for python 3.9
ee7f8bdsrc/sage/geometry/polyhedron/palp_database.py: Relax doctest pattern for python 3.9

comment:36 Changed 8 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Description modified (diff)
  • Status changed from new to needs_review

comment:37 Changed 8 months ago by git

  • Commit changed from ee7f8bdcebfec9aca6c2d6901640709a88c789bb to 49eccd9521d9cdbe6cafbb30ceb784669461bc10

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

68ef4c5src/sage/cpython/debugimpl.c: Disable _type_debug for Python 3.9
f3cb571src/sage/all.py: Filter out Python 3.9 deprecation warnings from ast
e16ded2src/sage/symbolic/ring.pyx (isidentifier): Remove py2-only code, use of deprecated parser module
27a57bcsrc/sage/misc/sageinspect.py: Adjust doctest for sage_getsourcelines for Python 3.9 - decorators are now part of the definition
39416fbsrc/sage/misc/sageinspect.py (SageArgSpecVisitor): Relax doctest pattern for python 3.9
5548c0dsrc/sage/misc/latex.py (has_latex_attr): Relax doctest pattern for python 3.9
4a9362esrc/sage/combinat/root_system/pieri_factors.py: Use sorted in doctest for python 3.9
49eccd9src/sage/geometry/polyhedron/palp_database.py: Relax doctest pattern for python 3.9

comment:38 Changed 8 months ago by mkoeppe

  • Priority changed from major to critical

comment:39 Changed 8 months ago by git

  • Commit changed from 49eccd9521d9cdbe6cafbb30ceb784669461bc10 to 7d66baf52316d1133eb21cdf7b05c9e0b8c65a3b

Branch pushed to git repo; I updated commit sha1. New commits:

7d66bafbuild/pkgs/python3/spkg-configure.m4: Accept Python 3.9.x (but do not look for a python3.9 executable)

comment:40 in reply to: ↑ 33 ; follow-up: Changed 8 months ago by fbissey

Replying to mkoeppe:

Only these two remain. Perhaps "good enough for 9.2"?

sage -t --long --random-seed=0 src/sage/functions/other.py  # 1 doctest failed
sage -t --long --random-seed=0 src/sage/rings/polynomial/pbori/randompoly.py  # 1 doctest failed

I can take ownership of the pbori one, I'll see what I can do.

comment:41 in reply to: ↑ 25 Changed 8 months ago by mkoeppe

Replying to mkoeppe:

File "src/sage/functions/other.py", line 1629, in sage.functions.other.Function_factorial._eval_
Failed example:
    factorial(float(3.2))        # abs tol 1e-14
      File "<doctest sage.functions.other.Function_factorial._eval_[8]>", line 1, in <module>
        factorial(float(RealNumber('3.2')))        # abs tol 1e-14
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-py39/local/lib/python3.9/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    DeprecationWarning: Using factorial() with floats is deprecated
    7.756689535793181
sage -t --long --random-seed=0 src/sage/misc/sageinspect.py
**********************************************************************

https://docs.python.org/3.9/library/math.html#math.factorial "Deprecated since version 3.9: Accepting floats with integral values (like 5.0) is deprecated."

comment:42 Changed 8 months ago by jhpalmieri

Shouldn't this be using Sage's factorial function, as defined in that file by the line factorial = Function_factorial()? Why is math.factorial being used?

comment:43 Changed 8 months ago by mkoeppe

Yes, this is using Function_factorial. Its _eval_ method does not seem to handle floats. My guess is that it is delegated to pynac or sympy, one of which eventually delegates to math.factorial.

comment:44 Changed 8 months ago by git

  • Commit changed from 7d66baf52316d1133eb21cdf7b05c9e0b8c65a3b to 8aa88cce2944ac7de660f64b94885f4765226889

Branch pushed to git repo; I updated commit sha1. New commits:

8c5124230595: remove sage/libs/ppl from doc
8aa88ccMerge branch 'public/30595' of git://trac.sagemath.org/sage into t/30184/support_python_3_9

comment:45 Changed 8 months ago by mkoeppe

Let's get this ticket in please. The two remaining issues can be done in follow-up tickets.

comment:46 Changed 8 months ago by git

  • Commit changed from 8aa88cce2944ac7de660f64b94885f4765226889 to 60137bc815d4f897d0ce3507efa89b17c9f1c4c6

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

b07596dfixup
b21ed97build/pkgs/python3/spkg-configure.m4: Ensure that PYTHON_FOR_VENV is a full path
49aa061Revert "build/pkgs/python3/spkg-configure.m4: Use 'python >= 3.7'; keep checking for 'python3.8, python3.7'"
a8b77cdRevert "only test python3, to be 3.7 or 3.8"
9403629build/bin/sage-system-python: Work around LC_ALL=C
ff0dbc6build/sage_bootstrap/uncompress/tar_file.py: Fix encoding to utf-8
f05a110Merge branch 't/30008/after__30053__sphinx_3_1_2_does_not_build_on_ubuntu__trusty_xenial_bionic___debian_jessie__centos_7__again_' into t/30576/public/30576
945c8c5build/bin/sage-site (--docbuild): Set an English locale suuch as C.utf-8, but not the C locale, to ensure correct operation on Python 3.6
8906897Merge branch 't/30576/public/30576' into t/30546/build/py3x_conf
60137bcMerge branch 't/30546/build/py3x_conf' into t/30184/support_python_3_9

comment:47 Changed 8 months ago by mkoeppe

  • Cc dimpase added
  • Dependencies changed from #27754, #28012, #30590, #30053, #30595 to #27754, #28012, #30590, #30053, #30595, #30576, #30546

Last 10 new commits:

b07596dfixup
b21ed97build/pkgs/python3/spkg-configure.m4: Ensure that PYTHON_FOR_VENV is a full path
49aa061Revert "build/pkgs/python3/spkg-configure.m4: Use 'python >= 3.7'; keep checking for 'python3.8, python3.7'"
a8b77cdRevert "only test python3, to be 3.7 or 3.8"
9403629build/bin/sage-system-python: Work around LC_ALL=C
ff0dbc6build/sage_bootstrap/uncompress/tar_file.py: Fix encoding to utf-8
f05a110Merge branch 't/30008/after__30053__sphinx_3_1_2_does_not_build_on_ubuntu__trusty_xenial_bionic___debian_jessie__centos_7__again_' into t/30576/public/30576
945c8c5build/bin/sage-site (--docbuild): Set an English locale suuch as C.utf-8, but not the C locale, to ensure correct operation on Python 3.6
8906897Merge branch 't/30576/public/30576' into t/30546/build/py3x_conf
60137bcMerge branch 't/30546/build/py3x_conf' into t/30184/support_python_3_9

comment:48 Changed 8 months ago by git

  • Commit changed from 60137bc815d4f897d0ce3507efa89b17c9f1c4c6 to 8c756edbd6d5f88dbb7b2c89169044daf23fb012

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

0a64674build/pkgs/gambit/spkg-install.in: Install via bdist_wheel
ca58693build/pkgs/pillow/spkg-install.in: Install via bdist_wheel
5a747c4build/bin/sage-pip-{install,uninstall}: Remove pip2 support
9ee2110build/bin/sage-dist-helpers: Also use $sudo for storing the wheel file
d7aac84src/doc/en/developer/packaging.rst: Update sdh_... documentation
9b7c7a0build/bin/sage-pip-{install,uninstall}: Fix typo in comment
4135e8bbuild/bin/sage-pip-install: Remove an outdated comment
f2e7075Merge tag '9.2.beta13' into t/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels
a2dbb8dMerge branch 't/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels' into t/30546/build/py3x_conf
8c756edMerge branch 't/30546/build/py3x_conf' into t/30184/support_python_3_9

comment:49 Changed 8 months ago by mkoeppe

  • Dependencies changed from #27754, #28012, #30590, #30053, #30595, #30576, #30546 to #27754, #28012, #30590, #30053, #30595, #30576, #29500, #30546

comment:50 Changed 8 months ago by chapoton

  • Cc chapoton removed

comment:51 Changed 8 months ago by git

  • Commit changed from 8c756edbd6d5f88dbb7b2c89169044daf23fb012 to 4f7d5886e28b7c23be3c6efbce4686e8c43ea664

Branch pushed to git repo; I updated commit sha1. New commits:

f19d9a4allow absolute names as arguments to --with-python
4f7d588Merge branch 't/30546/build/py3x_conf' into t/30184/support_python_3_9

comment:52 Changed 8 months ago by mkoeppe

  • Priority changed from critical to blocker

comment:53 Changed 8 months ago by jhpalmieri

  • Reviewers set to John Palmieri
  • Status changed from needs_review to positive_review

The changes look okay to me, and doctests pass. I'm not sure why it's a blocker, though.

comment:54 Changed 8 months ago by mkoeppe

Thanks!

I marked it a blocker because we won't be able to release 9.2 before Python 3.9 is released and our new release would therefore already be outdated.

comment:55 Changed 8 months ago by dimpase

I've tested this with system Python 3.9.rc2 on Gentoo, and got

sage -t --random-seed=0 src/sage/rings/polynomial/pbori/randompoly.py
**********************************************************************
File "src/sage/rings/polynomial/pbori/randompoly.py", line 46, in sage.rings.polynomial.pbori.randompoly.?
Failed example:
    s=sparse_random_system(r, number_of_polynomials = 20, variables_per_polynomial = 3, degree=2, random_seed=123)
Expected nothing
Got:
    doctest:warning
      File "/mnt/opt/Sage/sage-clang/src/bin/sage-runtests", line 182, in <module>
        err = DC.run()
...
      File "/mnt/opt/Sage/sage-clang/local/lib/python3.9/site-packages/sage/rings/polynomial/pbori/randompoly.py", line 54, in sparse_random_system
        random_generator = Random(random_seed)
      File "/usr/lib/python3.9/random.py", line 122, in __init__
        self.seed(x)
      File "/usr/lib/python3.9/random.py", line 158, in seed
        _warn('Seeding based on hashing is deprecated\n'
      File "/usr/lib/python3.9/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    DeprecationWarning: Seeding based on hashing is deprecated
    since Python 3.9 and will be removed in a subsequent version. The only 
    supported seed types are: None, int, float, str, bytes, and bytearray.

and also

File "src/sage/misc/sageinspect.py", line 2275, in sage.misc.sageinspect.sage_getsourcelines
Failed example:
    sage_getsourcelines(I)
Expected:
    (...['class MPolynomialIdeal( MPolynomialIdeal_singular_repr, \\\n',
    ...)
Got:
    (['@richcmp_method\n', 'class MPolynomialIdeal( MPolynomialIdeal_singular_repr, \\\n', '                        MPolynomialIdeal_macaulay2_repr, \\\n', '  ....
...
Last edited 8 months ago by dimpase (previous) (diff)

comment:56 Changed 8 months ago by dimpase

  • Reviewers changed from John Palmieri to John Palmieri, Dima Pasechnik
  • Status changed from positive_review to needs_work

comment:57 Changed 8 months ago by git

  • Commit changed from 4f7d5886e28b7c23be3c6efbce4686e8c43ea664 to 9d06080f334ad6e9b15072a0ca524ed02b1d0953

Branch pushed to git repo; I updated commit sha1. New commits:

9d06080src/sage/misc/sageinspect.py: Fix doctest pattern

comment:58 follow-up: Changed 8 months ago by mkoeppe

  • Status changed from needs_work to needs_review

See comment 45.

comment:59 in reply to: ↑ 58 Changed 8 months ago by dimpase

Replying to mkoeppe:

See comment 45.

oops, sorry, I was somewhat late to the party. Another problem I'm investigating is that this upgrade seems to lead to zombie Maxima and ECL processes.

comment:60 Changed 8 months ago by dimpase

  • Status changed from needs_review to positive_review

ok, good (Zombies have nothing to do with this update)

comment:61 Changed 8 months ago by mkoeppe

Thanks.

comment:62 Changed 7 months ago by vbraun

  • Branch changed from u/mkoeppe/support_python_3_9 to 9d06080f334ad6e9b15072a0ca524ed02b1d0953
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:63 in reply to: ↑ 40 ; follow-up: Changed 7 months ago by slelievre

  • Commit 9d06080f334ad6e9b15072a0ca524ed02b1d0953 deleted

Replying to fbissey:

Replying to mkoeppe:

Only these two remain. Perhaps "good enough for 9.2"?

sage -t --long --random-seed=0 src/sage/functions/other.py  # 1 doctest failed
sage -t --long --random-seed=0 src/sage/rings/polynomial/pbori/randompoly.py  # 1 doctest failed

I can take ownership of the pbori one, I'll see what I can do.

Should a follow-up ticket for each of these two issues be opened?

Meta-ticket for all Python 3.9 issues?

Too early for a ticket for Python 3.10 support? Python 3.10.0a1 is out:

comment:64 in reply to: ↑ 63 Changed 7 months ago by mkoeppe

Replying to slelievre:

Replying to fbissey:

Replying to mkoeppe:

Only these two remain. Perhaps "good enough for 9.2"?

sage -t --long --random-seed=0 src/sage/functions/other.py  # 1 doctest failed
sage -t --long --random-seed=0 src/sage/rings/polynomial/pbori/randompoly.py  # 1 doctest failed

I can take ownership of the pbori one, I'll see what I can do.

Should a follow-up ticket for each of these two issues be opened?

Yes please

Meta-ticket for all Python 3.9 issues?

I don't think this is necessary

Too early for a ticket for Python 3.10 support? Python 3.10.0a1 is out:

Sure, please open a ticket

comment:65 Changed 7 months ago by slelievre

Follow-up tickets:

  • #30764: Adapt to float factorial deprecation in Python 3.9
  • #30765: Adapt to deprecation of seeding based on hashing in Python 3.9
  • #30766: Support Python 3.10
  • #30767: Test ticket: Python 3.10 development releases

comment:66 Changed 7 months ago by dimpase

you might have seen this: https://github.com/python/cpython/pull/22670 - a critical incompatibility with pybind11

comment:67 Changed 7 months ago by dimpase

From https://pybind11.readthedocs.io/en/latest/

Warning

Combining older versions of pybind11 (< 2.6.0) with the brand-new Python 3.9.0 will trigger undefined behavior that typically manifests as crashes during interpreter shutdown (but could also destroy your data. You have been warned.)

We recommend that you wait for Python 3.9.1 slated for release in December, which will include a fix that resolves this problem. In the meantime, please update to the latest version of pybind11 (2.6.0 or newer), which includes a temporary workaround specifically when Python 3.9.0 is detected at runtime.

should we hold off 3.9.0 (in spkg-configure.m4 of python3) ?

comment:68 follow-up: Changed 7 months ago by mkoeppe

We can do the pybind11 upgrade

comment:69 in reply to: ↑ 68 Changed 7 months ago by mkoeppe

Replying to mkoeppe:

We can do the pybind11 upgrade

Created #30803 for this

Note: See TracTickets for help on using tickets.