sagemath/sage

Upgrade cypari2 to 2.1.3

Closed this issue · 27 comments

kliem commented

This is needed for python 3.11 support (#33842) and to make cypari compatible with current pari version

https://groups.google.com/g/sage-devel/c/jqmr6bDjDrk/m/XE2GlB_GBgAJ

Necessary follow ups:

  • make cypari thread safe: see cypari2 #116
  • remove optional build time dependency of cysignals on pari: see cypari2 #130

Depends on #33864

CC: @videlec @dimpase

Component: build

Author: Matthias Koeppe

Branch/Commit: 0ac9905

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/33878

kliem commented

Dependencies: #33864

kliem commented

Branch: public/33878

kliem commented

Commit: f3f1b5d

kliem commented

New commits:

92e9cffbuild/pkgs/cython: Update to 0.29.30
f3f1b5dtest new changes to pari
comment:3

Is there any reason you are using snapshots from your fork of cypari2? Or is it just for testing and development?

kliem commented
comment:4

Just for testing and development. My own GitHub account is lots faster with the GitHub actions than sagemath. Also I use this trac ticket for cysignal's CI. Once cypari and possibly cysignal are ready, we switch back to the official sources.

comment:5

Still getting

[cypari-2.1.3b1]   [7/7] Cythonizing cypari2/string_utils.pyx
[cypari-2.1.3b1]   cypari2/convert.c:3347:21: error: cannot take the address of an rvalue of type 'Py_ssize_t' (aka 'long')
[cypari-2.1.3b1]     __pyx_v_sizeptr = &Py_SIZE(((PyObject *)__pyx_v_x));
[cypari-2.1.3b1]                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

with this ticket

kliem commented
comment:6

Sorry about that. I messed up with the tags. I'm rather confident the fix is working, it's just that the fix is not contained in the tag I created.

kliem commented
comment:7

The new commit contains the recent changes.

The test release contains basically the following:

Changed commit from f3f1b5d to 481d782

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

481d782test cypari update

Changed commit from 481d782 to b494326

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

11a0e57build/bin/write-dockerfile.sh: Add bootstrap-conda
b494326Merge branch 'u/mkoeppe/fix_tox_docker_builds' of git://trac.sagemath.org/sage into public/33878

Description changed:

--- 
+++ 
@@ -1,4 +1,6 @@
-This is needed for #33842, but the new release of cypari (and possibly cysignals) might also make
-- cypari thread safe
-- cypari compatible with current pari version
+This is needed for python 3.11 support (#33842) and to make cypari compatible with current pari version
+
+Necessary follow ups:
+- make cypari thread safe
 - remove optional build time dependency of cysignals on pari
+

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

0ac9905build/pkgs/cypari: Update to 2.1.3

Changed commit from b494326 to 0ac9905

Description changed:

--- 
+++ 
@@ -1,4 +1,6 @@
 This is needed for python 3.11 support (#33842) and to make cypari compatible with current pari version
+
+https://groups.google.com/g/sage-devel/c/jqmr6bDjDrk/m/XE2GlB_GBgAJ
 
 Necessary follow ups:
 - make cypari thread safe
comment:16

Regarding the ticket description: to make pari threadsafe, the only way I explored so far was to use a "thread pool executor", see sagemath/cypari2#116. Because of its stack management, pari needs some care when used within threads.

Description changed:

--- 
+++ 
@@ -3,6 +3,6 @@
 https://groups.google.com/g/sage-devel/c/jqmr6bDjDrk/m/XE2GlB_GBgAJ
 
 Necessary follow ups:
-- make cypari thread safe
-- remove optional build time dependency of cysignals on pari
+- make cypari thread safe: see [cypari2 #116](https://github.com/sagemath/cypari2/pull/116)
+- remove optional build time dependency of cysignals on pari: see [cypari2 #130](https://github.com/sagemath/cypari2/pull/130)
 
comment:18

I don't remember the details about this, but there is also a separate related ticket: #28800

Author: Matthias Koeppe

comment:21

Tests look OK, let's get this in

comment:22

lgtm - tested with Pari 2.,15.1

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/3448209182 to Dima Pasechnik

comment:23

Thanks!

Changed branch from public/33878 to 0ac9905