(experimental) Compile Cython code with binding=True
jdemeyer opened this issue · 59 comments
When using the Cython compiler directive binding=True, Cython uses a custom type to implement functions and methods. This custom type supports more Python features. The most important changes lie in inspect support.
We find several Cython bugs regarding binding=True:
- cython/cython#1658 (not an issue for Sage)
- cython/cython#1724 (see #23155)
- cython/cython#1728 (see #23155)
Depends on #25842
Depends on #25845
Depends on #25848
Upstream: Reported upstream. No feedback yet.
CC: @kwankyu
Component: cython
Author: Jeroen Demeyer
Branch/Commit: u/jdemeyer/ticket/22747 @ d962040
Reviewer: Michael Orlitzky
Issue created by migration from https://trac.sagemath.org/ticket/22747
Description changed:
---
+++
@@ -1 +1 @@
-When using the Cython compiler directive `binding=True`, Cython uses a custom type to implement functions and methods. This custom type supports more Python features, such as `inspect` support.
+When using the Cython compiler directive `binding=True`, Cython uses a custom type to implement functions and methods. This custom type supports more Python features. The most important changes lie in `inspect` support.Branch: u/jdemeyer/ticket/22747
Commit: 2b70327
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2b70327 | Compile Cython code with binding=True |
Description changed:
---
+++
@@ -1 +1,3 @@
When using the Cython compiler directive `binding=True`, Cython uses a custom type to implement functions and methods. This custom type supports more Python features. The most important changes lie in `inspect` support.
+
+Unfortunately, this behaves badly if there are import cycles and there are many in Sage (#21636).Description changed:
---
+++
@@ -1,3 +1,7 @@
When using the Cython compiler directive `binding=True`, Cython uses a custom type to implement functions and methods. This custom type supports more Python features. The most important changes lie in `inspect` support.
Unfortunately, this behaves badly if there are import cycles and there are many in Sage (#21636).
+
+We find several Cython bugs regarding `binding=True`:
+- https://github.com/cython/cython/issues/1658
+- https://github.com/cython/cython/issues/1679Upstream: Reported upstream. No feedback yet.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
ee13351 | Compile Cython code with binding=True |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
1e78314 | Compile Cython code with binding=True |
Description changed:
---
+++
@@ -3,5 +3,5 @@
Unfortunately, this behaves badly if there are import cycles and there are many in Sage (#21636).
We find several Cython bugs regarding `binding=True`:
-- https://github.com/cython/cython/issues/1658
-- https://github.com/cython/cython/issues/1679
+- https://github.com/cython/cython/issues/1658 (not a big problem for Sage)
+- https://github.com/cython/cython/pull/1724 (patch submitted upstream)Description changed:
---
+++
@@ -1,6 +1,4 @@
When using the Cython compiler directive `binding=True`, Cython uses a custom type to implement functions and methods. This custom type supports more Python features. The most important changes lie in `inspect` support.
-
-Unfortunately, this behaves badly if there are import cycles and there are many in Sage (#21636).
We find several Cython bugs regarding `binding=True`:
- https://github.com/cython/cython/issues/1658 (not a big problem for Sage)Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
256bf19 | Move richcmp stuff to new file richcmp.pyx |
7629851 | Merge tag '8.0.beta9' into t/23103/move_richcmp_stuff_to_new_file |
031761f | Fix two more imports |
f159d41 | Add Cython patch to fix decorators with binding=True |
680f4a7 | Compile Cython code with binding=True |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
d59afe3 | Load the correct zlib library |
db3b5eb | Merge commit '031761f6ead116e4fa0a0fd3bf21fca5546df6d7' into HEAD |
4c5cc9c | Add Cython patch to fix decorators with binding=True |
116030b | Compile Cython code with binding=True |
b24e4c8 | Sage library fixes for binding=True |
Description changed:
---
+++
@@ -2,4 +2,4 @@
We find several Cython bugs regarding `binding=True`:
- https://github.com/cython/cython/issues/1658 (not a big problem for Sage)
-- https://github.com/cython/cython/pull/1724 (patch submitted upstream)
+- https://github.com/cython/cython/pull/1724 (patch submitted upstream, no feedback yet)Description changed:
---
+++
@@ -1,5 +1,5 @@
When using the Cython compiler directive `binding=True`, Cython uses a custom type to implement functions and methods. This custom type supports more Python features. The most important changes lie in `inspect` support.
We find several Cython bugs regarding `binding=True`:
-- https://github.com/cython/cython/issues/1658 (not a big problem for Sage)
-- https://github.com/cython/cython/pull/1724 (patch submitted upstream, no feedback yet)
+- https://github.com/cython/cython/issues/1658 (not an issue for Sage)
+- https://github.com/cython/cython/pull/1724 (see #23155)Description changed:
---
+++
@@ -3,3 +3,4 @@
We find several Cython bugs regarding `binding=True`:
- https://github.com/cython/cython/issues/1658 (not an issue for Sage)
- https://github.com/cython/cython/pull/1724 (see #23155)
+- https://github.com/cython/cython/pull/1728 (see #23155)Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2e2339b | Add Cython patch to fix decorators with binding=True |
091657d | Add Cython patch to fix method calls with binding=True |
8f29430 | _lmul_ and _rmul_: scalar should be Element instead of RingElement |
d288f41 | Give deprecation warning for #5930 unconditionally |
6bd7e9f | Merge commit '031761f6ead116e4fa0a0fd3bf21fca5546df6d7'; commit 'd59afe3bf4ee03da91184ae6183a6dd6a9d3656f'; commit '091657d270e422bfc7f27efa7d6944a5c3fd96f2'; commit '8f294308f8b85b233ffdc9df3f20c404ee6431c9'; commit 'd288f414bf0f8d785c1928fd1bdce89ec1bdc033' into HEAD |
8ebd184 | Compile Cython code with binding=True |
37975ed | Sage library fixes for binding=True |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
4062ec6 | Sage library fixes for binding=True |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
13068eb | Move Set_PythonType to a new file |
We can close this ticket in favor of #26254.
The only commit from the branch here that is useful is sagemath/sagetrac-mirror@d962040 -- not really "Sage library fixes" but just some updates of doctest outputs.
Reviewer: Michael Orlitzky