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:
335cd3e | Replace all uses of is_IntegerModRing by isinstance(..., sage.rings.abc.IntegerModRing) |
Commit: 335cd3e
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:
f596395 | sage.rings.finite_rings.integer_mod_ring: Fixup |
Should the is_... function be deprecated?
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.
Branch pushed to git repo; I updated commit sha1. New commits:
af06e5b | is_IntegerModRing: Deprecate |
One more is_* function down. Thank you.
Reviewer: Travis Scrimshaw
Merge conflict
Branch pushed to git repo; I updated commit sha1. New commits:
1b0a5ab | src/sage/modules/vector_space_morphism.py: Do not fail if sage.symbol is not present |
83b5038 | src/sage/modules/free_module_element.pyx: Move import from sage.misc.derivative into method |
acca6c2 | src/sage/matrix/matrix2.pyx: Move import from sage.misc.derivative into method |
907b57c | Merge #32593 |