Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage.rings: Remove code deprecated in #23204, #24483, #24371, #24511, #25848, #26105, #28481, #29010, #29412, #30332, #30372, #31345, #32375, #32606, #32610, #32612, #32641, #32660, #32750, #32869, #33602 #36307

Merged
merged 24 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8dd7c3c
src/sage/rings/all.py: Remove imports deprecated in #33602 (2022)
mkoeppe Sep 21, 2023
f0a3d1a
src/sage/rings/complex_arb.pyx: Remove method aliases deprecated in #…
mkoeppe Sep 21, 2023
56b00fc
src/sage/rings/{{complex,real}_{double,mpfr}.pyx, qqbar.py}: Remove f…
mkoeppe Sep 21, 2023
ad80dfa
src/sage/rings/complex_field.py: Remove; deprecated in #24483 (2020)
mkoeppe Sep 21, 2023
0b4b4fe
src/sage/rings/complex_interval_field.py: Remove function deprecated …
mkoeppe Sep 21, 2023
1b12b5f
src/sage/rings/complex_{mpc,mpfr}.pyx: Remove method aliases deprecat…
mkoeppe Sep 21, 2023
c91d21e
src/sage/rings/complex_number.pyx: Remove; deprecated in #24483 (2020)
mkoeppe Sep 21, 2023
c0e33fd
src/sage/rings/finite_rings/finite_field_base.pyx: Remove deprecated …
mkoeppe Sep 21, 2023
29401c6
src/sage/rings/finite_rings/integer_mod_ring.py: Remove function depr…
mkoeppe Sep 21, 2023
bdedb4b
src/sage/rings/finite_rings/integer_mod.pyx: Remove keyword deprecate…
mkoeppe Sep 21, 2023
beac80e
src/sage/rings/morphism.pyx: Remove class and function deprecated in …
mkoeppe Sep 21, 2023
5a91453
src/sage/rings/number_field/homset.py: Remove keyword deprecated in #…
mkoeppe Sep 21, 2023
c50325c
src/sage/rings/number_field/morphism.py: Remove import deprecated in …
mkoeppe Sep 21, 2023
851468f
src/sage/rings/number_field/number_field.py: Remove functions depreca…
mkoeppe Sep 21, 2023
a815d62
src/sage/rings/number_field/number_field.py: Remove method deprecated…
mkoeppe Sep 21, 2023
fca78ce
src/sage/rings/number_field/number_field.py: Remove method alias depr…
mkoeppe Sep 21, 2023
bf78977
src/sage/rings/number_field/number_field_element.pyx: Remove unpickli…
mkoeppe Sep 21, 2023
0f9219c
src/sage/rings/numbers_abc.py: Remove function deprecated in #32641 (…
mkoeppe Sep 21, 2023
a9d1ec9
src/sage/rings/padics/generic_nodes.py: Remove functions deprecated i…
mkoeppe Sep 21, 2023
73bcbbc
src/sage/rings/polynomial/pbori/__init__.py: Remove imports deprecate…
mkoeppe Sep 21, 2023
a7992bd
src/sage/rings/real_interval_field.py: Remove; deprecated in #24371 (…
mkoeppe Sep 21, 2023
56181f5
src/sage/rings/real_mpfr.pyx: Remove function deprecated in #24511 (2…
mkoeppe Sep 21, 2023
004bec9
src/sage/rings/padics/all.py: Remove imports of removed functions
mkoeppe Sep 21, 2023
5cecd1c
src/sage/rings/power_series_ring_element.pyx: Add import in doctest
mkoeppe Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions src/sage/rings/all.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
"""
Rings

Tests for deprecations of imports in global namespace from :trac:`33602`::

sage: PowerSeries
doctest:warning...:
DeprecationWarning:
Importing PowerSeries from here is deprecated;
please use "from sage.rings.power_series_ring_element import PowerSeries" instead.
See https://github.com/sagemath/sage/issues/33602 for details.
...
sage: PuiseuxSeries
doctest:warning...:
DeprecationWarning:
Importing PuiseuxSeries from here is deprecated;
please use "from sage.rings.puiseux_series_ring_element import PuiseuxSeries" instead.
See https://github.com/sagemath/sage/issues/33602 for details.
...
sage: LaurentSeries
doctest:warning...:
DeprecationWarning:
Importing LaurentSeries from here is deprecated;
please use "from sage.rings.laurent_series_ring_element import LaurentSeries" instead.
See https://github.com/sagemath/sage/issues/33602 for details.
...
"""
# ****************************************************************************
# Copyright (C) 2005 William Stein <wstein@gmail.com>
Expand Down Expand Up @@ -139,11 +115,9 @@

# Power series rings
from .power_series_ring import PowerSeriesRing
lazy_import('sage.rings.power_series_ring_element', 'PowerSeries', deprecation=33602)

# Laurent series ring in one variable
from .laurent_series_ring import LaurentSeriesRing
lazy_import('sage.rings.laurent_series_ring_element', 'LaurentSeries', deprecation=33602)

# Lazy Laurent series ring
lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing',
Expand All @@ -154,7 +128,6 @@

# Puiseux series ring
from .puiseux_series_ring import PuiseuxSeriesRing
lazy_import('sage.rings.puiseux_series_ring_element', 'PuiseuxSeries', deprecation=33602)

# Pseudo-ring of PARI objects.
from .pari_ring import PariRing, Pari
Expand Down
12 changes: 1 addition & 11 deletions src/sage/rings/complex_arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ from sage.structure.unique_representation import UniqueRepresentation
from sage.arith.long cimport is_small_python_int

from sage.misc.lazy_string import lazy_string
from sage.misc.superseded import deprecated_function_alias
from sage.rings.complex_interval_field import ComplexIntervalField, ComplexIntervalField_class
from sage.rings.integer_ring import ZZ


cdef void ComplexIntervalFieldElement_to_acb(
acb_t target,
ComplexIntervalFieldElement source):
Expand Down Expand Up @@ -4229,8 +4229,6 @@ cdef class ComplexBall(RingElement):
if _do_sig(prec(self)): sig_off()
return result

ei = deprecated_function_alias(32869, Ei)

def Si(self):
"""
Return the sine integral with argument ``self``.
Expand All @@ -4255,8 +4253,6 @@ cdef class ComplexBall(RingElement):

sin_integral = Si # as for the symbolic function

si = deprecated_function_alias(32869, Si)

def Ci(self):
"""
Return the cosine integral with argument ``self``.
Expand All @@ -4281,8 +4277,6 @@ cdef class ComplexBall(RingElement):

cos_integral = Ci # as for the symbolic function

ci = deprecated_function_alias(32869, Ci)

def Shi(self):
"""
Return the hyperbolic sine integral with argument ``self``.
Expand All @@ -4307,8 +4301,6 @@ cdef class ComplexBall(RingElement):

sinh_integral = Shi

shi = deprecated_function_alias(32869, Shi)

def Chi(self):
"""
Return the hyperbolic cosine integral with argument ``self``.
Expand All @@ -4333,8 +4325,6 @@ cdef class ComplexBall(RingElement):

cosh_integral = Chi

chi = deprecated_function_alias(32869, Chi)

def li(self, bint offset=False):
"""
Return the logarithmic integral with argument ``self``.
Expand Down
24 changes: 0 additions & 24 deletions src/sage/rings/complex_double.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -116,30 +116,6 @@ cimport gmpy2
gmpy2.import_gmpy2()


def is_ComplexDoubleField(x):
"""
Return ``True`` if ``x`` is the complex double field.

This function is deprecated. Use :func:`isinstance` with
:class:`~sage.rings.abc.ComplexDoubleField` instead.

EXAMPLES::

sage: from sage.rings.complex_double import is_ComplexDoubleField
sage: is_ComplexDoubleField(CDF)
doctest:warning...
DeprecationWarning: is_ComplexDoubleField is deprecated;
use isinstance(..., sage.rings.abc.ComplexDoubleField) instead
See https://github.com/sagemath/sage/issues/32610 for details.
True
sage: is_ComplexDoubleField(ComplexField(53))
False
"""
from sage.misc.superseded import deprecation
deprecation(32610, 'is_ComplexDoubleField is deprecated; use isinstance(..., sage.rings.abc.ComplexDoubleField) instead')
return isinstance(x, ComplexDoubleField_class)


cdef class ComplexDoubleField_class(sage.rings.abc.ComplexDoubleField):
"""
An approximation to the field of complex numbers using double
Expand Down
17 changes: 0 additions & 17 deletions src/sage/rings/complex_field.py

This file was deleted.

21 changes: 0 additions & 21 deletions src/sage/rings/complex_interval_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,6 @@
from sage.misc.cachefunc import cached_method


def is_ComplexIntervalField(x):
"""
Check if ``x`` is a :class:`ComplexIntervalField`.

EXAMPLES::

sage: from sage.rings.complex_interval_field import is_ComplexIntervalField as is_CIF
sage: is_CIF(CIF)
doctest:warning...
DeprecationWarning: is_ComplexIntervalField is deprecated;
use isinstance(..., sage.rings.abc.ComplexIntervalField) instead
See https://github.com/sagemath/sage/issues/32612 for details.
True
sage: is_CIF(CC)
False
"""
from sage.misc.superseded import deprecation
deprecation(32612, 'is_ComplexIntervalField is deprecated; use isinstance(..., sage.rings.abc.ComplexIntervalField) instead')
return isinstance(x, ComplexIntervalField_class)


cache = {}
def ComplexIntervalField(prec=53, names=None):
"""
Expand Down
4 changes: 0 additions & 4 deletions src/sage/rings/complex_mpc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ from .real_mpfr import mpfr_prec_min, mpfr_prec_max
from sage.structure.richcmp cimport rich_to_bool, richcmp
from sage.categories.fields import Fields

from sage.misc.superseded import deprecated_function_alias

cimport gmpy2
gmpy2.import_gmpy2()

Expand Down Expand Up @@ -1949,8 +1947,6 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
"""
return ~(self.tan())

cotan = deprecated_function_alias(29412, cot)

################################
# Other functions
################################
Expand Down
30 changes: 0 additions & 30 deletions src/sage/rings/complex_mpfr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ from sage.libs.gsl.complex cimport *
from sage.libs.mpmath.utils cimport mpfr_to_mpfval
from sage.rings.integer_ring import ZZ

from sage.misc.superseded import deprecated_function_alias

cimport gmpy2
gmpy2.import_gmpy2()

Expand Down Expand Up @@ -157,32 +155,6 @@ def is_ComplexNumber(x):
return isinstance(x, ComplexNumber)


def is_ComplexField(x):
"""
Check if ``x`` is a :class:`complex field <ComplexField_class>`.

This function is deprecated. Use :func:`isinstance` with
:class:`~sage.rings.abc.ComplexField` instead.

EXAMPLES::

sage: from sage.rings.complex_mpfr import is_ComplexField as is_CF
sage: is_CF(ComplexField())
doctest:warning...
DeprecationWarning: is_ComplexField is deprecated;
use isinstance(..., sage.rings.abc.ComplexField) instead
See https://github.com/sagemath/sage/issues/32610 for details.
True
sage: is_CF(ComplexField(12))
True
sage: is_CF(CC)
True
"""
from sage.misc.superseded import deprecation
deprecation(32610, 'is_ComplexField is deprecated; use isinstance(..., sage.rings.abc.ComplexField) instead')
return isinstance(x, ComplexField_class)


cache = {}
def ComplexField(prec=53, names=None):
"""
Expand Down Expand Up @@ -2267,8 +2239,6 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
"""
return ~(self.tan())

cotan = deprecated_function_alias(29412, cot)

def cos(self):
"""
Return the cosine of ``self``.
Expand Down
14 changes: 0 additions & 14 deletions src/sage/rings/complex_number.pyx

This file was deleted.

11 changes: 1 addition & 10 deletions src/sage/rings/finite_rings/finite_field_base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ cdef class FiniteField(Field):
else:
return PolynomialRing(GF(self.characteristic()), variable_name)

def free_module(self, base=None, basis=None, map=None, subfield=None):
def free_module(self, base=None, basis=None, map=True):
"""
Return the vector space over the subfield isomorphic to this
finite field as a vector space, along with the isomorphisms.
Expand Down Expand Up @@ -1253,15 +1253,6 @@ cdef class FiniteField(Field):
sage: all(to_V(h(c) * e) == c * to_V(e) for e in E for c in F)
True
"""
if subfield is not None:
if base is not None:
raise ValueError
deprecation(28481, "The subfield keyword argument has been renamed to base")
base = subfield
if map is None:
deprecation(28481, "The default value for map will be changing to True. To keep the current behavior, explicitly pass map=False.")
map = False

if base is None and self.__vector_space is not None and not map:
# A very common case: return as early as possible.
return self.__vector_space
Expand Down
7 changes: 1 addition & 6 deletions src/sage/rings/finite_rings/integer_mod.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ cdef class IntegerMod_abstract(FiniteRingElement):
else:
return sib(self.parent())(v)

def log(self, b=None, logarithm_exists=None):
def log(self, b=None):
r"""
Compute the discrete logarithm of this element to base `b`,
that is,
Expand Down Expand Up @@ -759,11 +759,6 @@ cdef class IntegerMod_abstract(FiniteRingElement):

- Lorenz Panny (2021): speedups for composite moduli
"""

if logarithm_exists is not None:
from sage.misc.superseded import deprecation
deprecation(32375, 'The "logarithm_exists" argument to .log() is no longer necessary and will be removed at some point.')

if not self.is_unit():
raise ValueError(f"logarithm of {self} is not defined since it is not a unit modulo {self.modulus()}")

Expand Down
32 changes: 0 additions & 32 deletions src/sage/rings/finite_rings/integer_mod_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,38 +246,6 @@ def create_object(self, version, order, **kwds):
Zmod = Integers = IntegerModRing = IntegerModFactory("IntegerModRing")


def is_IntegerModRing(x):
"""
Return ``True`` if ``x`` is an integer modulo ring.

This function is deprecated. Use :func:`isinstance` with
:class:`sage.rings.abc.IntegerModRing` instead.

EXAMPLES::

sage: from sage.rings.finite_rings.integer_mod_ring import is_IntegerModRing
sage: R = IntegerModRing(17)
sage: is_IntegerModRing(R)
doctest:warning...
DeprecationWarning: the function is_IntegerModRing is deprecated.
Use isinstance(..., sage.rings.abc.IntegerModRing) instead.
See https://github.com/sagemath/sage/issues/32606 for details.
True
sage: is_IntegerModRing(GF(13))
True
sage: is_IntegerModRing(GF(4, 'a')) # needs sage.rings.finite_rings
False
sage: is_IntegerModRing(10)
False
sage: is_IntegerModRing(ZZ)
False
"""
from sage.misc.superseded import deprecation
deprecation(32606, "the function is_IntegerModRing is deprecated. "
"Use isinstance(..., sage.rings.abc.IntegerModRing) instead.")
return isinstance(x, IntegerModRing_generic)


from sage.categories.commutative_rings import CommutativeRings
from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
from sage.categories.category import JoinCategory
Expand Down
Loading
Loading