sagemath/sage

sage.rings.abc: Add pAdicRing, pAdicField; deprecate is_pAdic...

Closed this issue · 30 comments

This change will allow use to eliminate imports from sage.rings.padics in sage.rings.polynomial.polynomial_element.

Part of Meta-ticket #32414.

Depends on #32665

CC: @EnderWannabe @bhutz

Component: refactoring

Author: Matthias Koeppe, Alexander Galarraga

Branch/Commit: 03b24bd

Reviewer: Jonathan Kliem

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

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

1893620src/sage/dynamics/arithmetic_dynamics/projective_ds.py: Use sage.rings.abc.pAdicRing, pAdicField
8422015src/sage/modular/overconvergent/genus0.py: Use sage.rings.abc.pAdicField
c32b3a2src/sage/schemes/berkovich: Use sage.rings.abc.pAdicField
96a778bsrc/sage/schemes/elliptic_curves/constructor.py: Use sage.rings.abc.pAdicField
b672836src/sage/schemes/hyperelliptic_curves: Use sage.rings.abc.pAdicField
e1412c7src/sage/schemes/projective/projective_morphism.py: Use sage.rings.abc.pAdicField

Description changed:

--- 
+++ 
@@ -1,2 +1,4 @@
-This change will allow use to eliminate the imports from `sage.rings.padics` in `sage.rings.polynomial.polynomial_element`
+This change will allow use to eliminate imports from `sage.rings.padics` in `sage.rings.polynomial.polynomial_element`.
 
+Part of Meta-ticket #32414.
+

Author: Matthias Koeppe

Changed commit from e1412c7 to fc7025a

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

fc7025asrc/sage/rings/padics/generic_nodes.py: Update doctests with deprecation warning output

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

070d05bsrc/sage/schemes/projective/projective_morphism.py: Avoid merge conflict

Changed commit from fc7025a to 070d05b

Changed commit from 070d05b to 59271be

comment:7

Added missing imports in src/sage/modular/overconvergent/genus0.py and src/sage/schemes/hyperelliptic_curves/constructor.py. Hopefully this passes patchbot now; the rest of the changes looked good to me.


New commits:

59271be32750: added missing imports
comment:8

Thanks for fixing this!

comment:9

The remaining failure, from src/sage/rings/integer.pyx, is not from this ticket. It is fixed in #32737.

kliem commented
comment:10

pyflakes detects that the import from sage.rings.ring import EuclideanDomain, Field in generic_nodes.py can probably be removed now.

Changed commit from 59271be to 0a1b9ac

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

59271be32750: added missing imports
0a1b9acsrc/sage/rings/padics/generic_nodes.py: Remove unused imports
comment:13

Rebased on top of gh-EnderWannabe's fixes.

Changed commit from 0a1b9ac to c46eb46

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

b484d51src/sage/symbolic/callable.py: Fixup
fad87c0Expression.is_callable: New
4bc059bsrc/sage/ext/fast_callable.pyx: Remove use of is_CallableSymbolicExpression
8624925src/sage/symbolic/ring.pyx: Update doctest output with deprecation warning
37da733src/sage/sets/condition_set.py: Remove use of is_CallableSymbolicExpression
80a8f9esage.plot: Remove use of is_CallableSymbolicExpression, is_SymbolicEquation
a287531src/sage/schemes/elliptic_curves/constructor.py: Remove use of SR, is_SymbolicEquation; add test for symbolic input
c9861d1src/sage/interfaces/qepcad.py: Remove use of is_SymbolicEquation
341337asrc/sage/ext/fast_callable.pyx: Remove use of is_SymbolicVariable
c46eb46Merge #32665
comment:15

Merged #32665 to resolve merge conflict.

Dependencies: #32665

kliem commented
comment:16

If we are touching this line anyway, we might as well add the second space before #:

+        elif isinstance(base, sage.rings.abc.pAdicField): # change base to Qpbar

Once done, you can put it on positive review on my behalf.

kliem commented

Reviewer: Jonathan Kliem

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

03b24bdsrc/sage/schemes/berkovich/berkovich_space.py: Whitespace fix

Changed commit from c46eb46 to 03b24bd

Changed author from Matthias Koeppe to Matthias Koeppe, Alexander Galarraga

comment:18

Thank you!