sagemath/sage

Replace is_IntegerModRing by isinstance with new class sage.rings.abc.IntegerModRing

Closed this issue · 18 comments

(partially cherry-picked from #32432)

Part of Meta-ticket #32414

Depends on #32593

CC: @tscrim @fchapoton

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 907b57c

Reviewer: Travis Scrimshaw

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

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

335cd3eReplace all uses of is_IntegerModRing by isinstance(..., sage.rings.abc.IntegerModRing)

Description changed:

--- 
+++ 
@@ -1 +1,4 @@
+(partially cherry-picked from #32432)
 
+Part of Meta-ticket #32414
+

Author: Matthias Koeppe

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

f596395sage.rings.finite_rings.integer_mod_ring: Fixup

Changed commit from 335cd3e to f596395

comment:7

Should the is_... function be deprecated?

comment:8

I think we can just remove it altogether. It has been semi-officially deprecated and is only used internally (well, supposed to be). Perhaps better practice is to formally deprecate it though. So +1 to at least a deprecation.

Changed commit from f596395 to af06e5b

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

af06e5bis_IntegerModRing: Deprecate
comment:10

One more is_* function down. Thank you.

Reviewer: Travis Scrimshaw

comment:11

Merge conflict

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

1b0a5absrc/sage/modules/vector_space_morphism.py: Do not fail if sage.symbol is not present
83b5038src/sage/modules/free_module_element.pyx: Move import from sage.misc.derivative into method
acca6c2src/sage/matrix/matrix2.pyx: Move import from sage.misc.derivative into method
907b57cMerge #32593

Changed commit from af06e5b to 907b57c

Changed dependencies from #32566 to #32593