sagemath/sage

Some preparations for binding=True

jdemeyer opened this issue · 10 comments

These are a few assorted fixes to enable binding=True:

  1. Enable binding=True on some non-performance-critical unpickling functions. These regularly occur in __reduce__ doctests, causing annoying doctest failures. In a few cases, the unpickling function can be removed completely.

  2. Compile __getmetaclass__ with binding=False otherwise it won't work.

  3. Resolve a cyclic import involving sage.rings.convert.mpfi by explicitly importing it.

  4. In src/sage/categories/category.py, assign the helpers as staticmethod to prevent binding.

Component: cython

Author: Jeroen Demeyer

Branch/Commit: e240df3

Reviewer: Travis Scrimshaw

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

Description changed:

--- 
+++ 
@@ -1 +1,9 @@
-This are a few assorted fixes to enable `binding=True`. 
+These are a few assorted fixes to enable `binding=True`:
+
+1. Enable `binding=True` on some non-performance-critical unpickling functions. These regularly occur in `__reduce__` doctests, causing annoying doctest failures. In a few cases, the unpickling function can be removed completely.
+
+2. Compile `__getmetaclass__` with `binding=False` otherwise it won't work.
+
+3. Resolve a cyclic import involving `sage.rings.convert.mpfi` by explicitly importing it.
+
+4. In `src/sage/categories/category.py`, assign the helpers as staticmethod to prevent binding.

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

6e6e1ebSome preparations for binding=True

Reviewer: Travis Scrimshaw

comment:5

Green bot => positive review.

comment:6

Looks like one real failure from the patchbot:

sage -t --long src/sage/modular/modsym/p1list.pyx  # 2 doctests failed

Changed commit from 6e6e1eb to e240df3

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

e240df3Some preparations for binding=True