Use sage.rings.abc.RealField, sage.rings.abc.ComplexField more
Closed this issue · 24 comments
As a follow-up on #32566 and #32610, we replace isinstance tests with RealField_class by the sage.rings.abc.RealField.
git grep -E 'isinstance.*(Real|Complex)Field_class' finds these uses.
Depends on #32665
Depends on #32758
Depends on #32635
CC: @tobiasdiez @tscrim @EnderWannabe @bhutz
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: 29e784b
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/32742
Description changed:
---
+++
@@ -1,2 +1,3 @@
As a follow-up on #32566 and #32610, we replace `isinstance` tests with `RealField_class` by the `sage.rings.abc.RealField`.
+`git grep -E 'isinstance.*(Real|Complex)Field_class'` finds these uses.Commit: 7e8f0bb
Author: Matthias Koeppe
Branch pushed to git repo; I updated commit sha1. New commits:
fbf6666 | src/sage/rings/continued_fraction.py: Use sage.rings.abc |
9f17894 | src/sage/matrix/matrix_space.py: Use sage.rings.abc |
2dd97ba | src/sage/rings/asymptotic/asymptotic_ring.py: Use sage.rings.abc |
41b7860 | src/sage/rings/convert/mpfi.pyx: Use sage.rings.abc |
5d2e72c | src/sage/rings/infinity.py: Use sage.rings.abc |
a665529 | src/sage/rings/polynomial/polynomial_ring.py: Use sage.rings.abc |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
fad87c0 | Expression.is_callable: New |
4bc059b | src/sage/ext/fast_callable.pyx: Remove use of is_CallableSymbolicExpression |
8624925 | src/sage/symbolic/ring.pyx: Update doctest output with deprecation warning |
37da733 | src/sage/sets/condition_set.py: Remove use of is_CallableSymbolicExpression |
80a8f9e | sage.plot: Remove use of is_CallableSymbolicExpression, is_SymbolicEquation |
a287531 | src/sage/schemes/elliptic_curves/constructor.py: Remove use of SR, is_SymbolicEquation; add test for symbolic input |
c9861d1 | src/sage/interfaces/qepcad.py: Remove use of is_SymbolicEquation |
341337a | src/sage/ext/fast_callable.pyx: Remove use of is_SymbolicVariable |
1ee09aa | Merge #32665 |
8c38baf | src/sage/rings/continued_fraction.py: Add missing import |
The doctest failure in integer.pyx is not from this ticket.
Branch pushed to git repo; I updated commit sha1. New commits:
ce8687b | Merge #32612 |
15884f3 | src/sage/matrix/matrix_space.py: Import element classes on demand, fall back to generic on ImportError |
ac58286 | Matrix.gram_schmidt: Use sage.rings.abc |
6d4ee6e | Matrix.gram_schmidt: Use sage.rings.abc (fixup) |
a1362ee | Merge #32635 |
LGTM.
Reviewer: Travis Scrimshaw
Thank you!
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
29e784b | Merge tag '9.5.beta5' into t/32742/use_sage_rings_abc_realfield__sage_rings_abc_complexfield_more |
trivial merge
Changed branch from u/mkoeppe/use_sage_rings_abc_realfield__sage_rings_abc_complexfield_more to 29e784b