sagemath/sage

sage.matrix.matrix_space: Import element classes on demand, fall back to generic on ImportError

Closed this issue · 20 comments

This is to support modularization.

Also, in extension of #32566, we switch another method to use sage.rings.abc for isinstance testing.

(cherry-picked from #32432)

Depends on #32566
Depends on #32606
Depends on #32612

CC: @kliem @tscrim @roed314

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 6d4ee6e

Reviewer: Travis Scrimshaw

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

Dependencies: #32606

Description changed:

--- 
+++ 
@@ -1,2 +1,9 @@
+This is to support modularization.
+
+We also fix a self-delegation bug when no matrix element classes other than the generic ones are present, as tested in #32432.
+
+Also, in extension of #32566, we switch another method to use `sage.rings.abc` for `isinstance` testing.
+
+
 (cherry-picked from #32432)
 

Changed dependencies from #32606 to #32566, #32606

Last 10 new commits:

9e74b6asage.rings.abc: Add IntegerModRing, Order; use them in sage.matrix, sage.modules
8ef2b35sage.structure, sage.rings, sage.matrix: Use sage.rings.abc for IntegerModRing
335cd3eReplace all uses of is_IntegerModRing by isinstance(..., sage.rings.abc.IntegerModRing)
f596395sage.rings.finite_rings.integer_mod_ring: Fixup
af06e5bis_IntegerModRing: Deprecate
ebf396cMerge #32606
4f65c85src/sage/matrix/matrix_space.py: Import element classes on demand, fall back to generic on ImportError
a657670Matrix._echelonize_ring: Break infinite self-delegation recursion
bfc4d4cMatrix.gram_schmidt: Use sage.rings.abc
cd7486dMatrix.gram_schmidt: Use sage.rings.abc (fixup)

Commit: cd7486d

Changed dependencies from #32566, #32606 to #32566, #32606, #32612

Work Issues: merge #32612

Changed commit from cd7486d to 5b7900b

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

1e5a6aaMerge #32610
be1db02src/sage/rings/abc.pxd: Add cdef class RealIntervalField
13607cbsrc/sage/dynamics/arithmetic_dynamics/projective_ds.py: Remove unused import
85a6a0bMerge #32610
271e044src/sage/rings/real_interval_absolute.pyx: Fix imports
fc039f1src/sage/symbolic/ring.pyx: Fix imports
19ac6fdsrc/sage/rings/complex_interval_field.py: Fixup deprecation warning in doctest output
f31deb3src/sage/rings/qqbar.py: Remove unused import
362f5c0Merge branch 't/32606/replace_is_integermodring_by_isinstance_with_new_class_sage_rings_abc_integermodring' into t/32612/sage_rings_abc__real_complex__interval_ball_field__deprecate_is__real_complex_intervalfield
5b7900bMerge #32612

Changed work issues from merge #32612 to none

Changed commit from 5b7900b to 6d4ee6e

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

ce8687bMerge #32612
15884f3src/sage/matrix/matrix_space.py: Import element classes on demand, fall back to generic on ImportError
ac58286Matrix.gram_schmidt: Use sage.rings.abc
6d4ee6eMatrix.gram_schmidt: Use sage.rings.abc (fixup)

Description changed:

--- 
+++ 
@@ -1,6 +1,4 @@
 This is to support modularization.
-
-We also fix a self-delegation bug when no matrix element classes other than the generic ones are present, as tested in #32432.
 
 Also, in extension of #32566, we switch another method to use `sage.rings.abc` for `isinstance` testing.
 
comment:9

Backed out a65767062b Matrix._echelonize_ring: Break infinite self-delegation recursion, which broke stuff

comment:11

The doctest failure in src/sage/rings/integer.pyx is not from this ticket

comment:12

LGTM.

Reviewer: Travis Scrimshaw

comment:13

Thank you!