Skip to content

Commit 16fa6aa

Browse files
Release Managervbraun
Release Manager
authored andcommitted
Trac #26866: remove various old deprecated stuff
from #15808 #15560 #15095 #15601 URL: https://trac.sagemath.org/26866 Reported by: chapoton Ticket author(s): Frédéric Chapoton Reviewer(s): Travis Scrimshaw
2 parents 8290f93 + dfaa9ec commit 16fa6aa

File tree

4 files changed

+21
-135
lines changed

4 files changed

+21
-135
lines changed

src/sage/categories/classical_crystals.py

+7-26
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
r"""
22
Classical Crystals
33
"""
4-
#*****************************************************************************
4+
# ****************************************************************************
55
# Copyright (C) 2010 Anne Schilling <anne at math.ucdavis.edu>
66
#
77
# Distributed under the terms of the GNU General Public License (GPL)
8-
# http://www.gnu.org/licenses/
9-
#******************************************************************************
8+
# https://www.gnu.org/licenses/
9+
# *****************************************************************************
1010

1111
from sage.misc.cachefunc import cached_method
1212
from sage.categories.category_singleton import Category_singleton
@@ -16,6 +16,7 @@
1616
from sage.categories.highest_weight_crystals import HighestWeightCrystals
1717
from sage.categories.tensor import TensorProductsCategory
1818

19+
1920
class ClassicalCrystals(Category_singleton):
2021
"""
2122
The category of classical crystals, that is crystals of finite Cartan type.
@@ -76,7 +77,7 @@ def super_categories(self):
7677
"""
7778
return [RegularCrystals(), FiniteCrystals(), HighestWeightCrystals()]
7879

79-
def example(self, n = 3):
80+
def example(self, n=3):
8081
"""
8182
Returns an example of highest weight crystals, as per
8283
:meth:`Category.example`.
@@ -108,28 +109,9 @@ def additional_structure(self):
108109

109110
class ParentMethods:
110111

111-
def opposition_automorphism(self):
112-
r"""
113-
Deprecated in :trac:`15560`. Use the corresponding method in
114-
Cartan type.
115-
116-
EXAMPLES::
117-
118-
sage: T = crystals.Tableaux(['A',5],shape=[1])
119-
sage: T.opposition_automorphism()
120-
doctest:...: DeprecationWarning: opposition_automorphism is deprecated.
121-
Use opposition_automorphism from the Cartan type instead.
122-
See http://trac.sagemath.org/15560 for details.
123-
Finite family {1: 5, 2: 4, 3: 3, 4: 2, 5: 1}
124-
"""
125-
from sage.misc.superseded import deprecation
126-
deprecation(15560, 'opposition_automorphism is deprecated. Use'
127-
' opposition_automorphism from the Cartan type instead.')
128-
return self.cartan_type().opposition_automorphism()
129-
130112
def demazure_character(self, w, f = None):
131113
r"""
132-
Returns the Demazure character associated to ``w``.
114+
Return the Demazure character associated to ``w``.
133115
134116
INPUT:
135117
@@ -190,7 +172,6 @@ def demazure_character(self, w, f = None):
190172
"""
191173
from sage.misc.misc_c import prod
192174
from sage.rings.integer_ring import ZZ
193-
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
194175
if hasattr(w, 'reduced_word'):
195176
word = w.reduced_word()
196177
else:
@@ -204,7 +185,7 @@ def demazure_character(self, w, f = None):
204185
# TODO: use P.linear_combination when PolynomialRing will be a ModulesWithBasis
205186
return sum((coeff*prod((x[i]**(c.weight()[i]) for i in range(n)), P.one()) for c, coeff in u), P.zero())
206187
else:
207-
return sum((coeff*f(c)) for c, coeff in u)
188+
return sum(coeff * f(c) for c, coeff in u)
208189

209190
def character(self, R=None):
210191
"""

src/sage/functions/transcendental.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Number-Theoretic Functions
33
"""
44

5-
#*****************************************************************************
5+
# ****************************************************************************
66
# Copyright (C) 2005 William Stein <[email protected]>
77
#
88
# Distributed under the terms of the GNU General Public License (GPL)
@@ -14,8 +14,8 @@
1414
#
1515
# The full text of the GPL is available at:
1616
#
17-
# http://www.gnu.org/licenses/
18-
#*****************************************************************************
17+
# https://www.gnu.org/licenses/
18+
# ****************************************************************************
1919

2020
import sys
2121
import sage.rings.complex_field as complex_field
@@ -27,7 +27,6 @@
2727
from sage.symbolic.function import GinacFunction, BuiltinFunction
2828

2929
import sage.libs.mpmath.utils as mpmath_utils
30-
from sage.misc.superseded import deprecation
3130
from sage.combinat.combinat import bernoulli_polynomial
3231

3332
from .gamma import psi
@@ -261,20 +260,20 @@ def _derivative_(self, s, x, diff_param):
261260
hurwitz_zeta_func = Function_HurwitzZeta()
262261

263262

264-
def hurwitz_zeta(s, x, prec=None, **kwargs):
263+
def hurwitz_zeta(s, x, **kwargs):
265264
r"""
266265
The Hurwitz zeta function `\zeta(s, x)`, where `s` and `x` are complex.
267266
268267
The Hurwitz zeta function is one of the many zeta functions. It
269-
defined as
268+
is defined as
270269
271270
.. MATH::
272271
273272
\zeta(s, x) = \sum_{k=0}^{\infty} (k + x)^{-s}.
274273
275274
276275
When `x = 1`, this coincides with Riemann's zeta function.
277-
The Dirichlet L-functions may be expressed as a linear combination
276+
The Dirichlet L-functions may be expressed as linear combinations
278277
of Hurwitz zeta functions.
279278
280279
EXAMPLES:
@@ -307,11 +306,6 @@ def hurwitz_zeta(s, x, prec=None, **kwargs):
307306
308307
- :wikipedia:`Hurwitz_zeta_function`
309308
"""
310-
if prec:
311-
deprecation(15095, 'the syntax hurwitz_zeta(s, x, prec) has been '
312-
'deprecated. Use hurwitz_zeta(s, x).n(digits=prec) '
313-
'instead.')
314-
return hurwitz_zeta_func(s, x).n(digits=prec)
315309
return hurwitz_zeta_func(s, x, **kwargs)
316310

317311

src/sage/interfaces/genus2reduction.py

+7-77
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
and for people to modify the C source code however they want.
2222
"""
2323

24-
#*****************************************************************************
24+
# ****************************************************************************
2525
# Copyright (C) 2006 William Stein <[email protected]>
2626
# Copyright (C) 2014 Jeroen Demeyer <[email protected]>
2727
#
2828
# This program is free software: you can redistribute it and/or modify
2929
# it under the terms of the GNU General Public License as published by
3030
# the Free Software Foundation, either version 2 of the License, or
3131
# (at your option) any later version.
32-
# http://www.gnu.org/licenses/
33-
#*****************************************************************************
32+
# https://www.gnu.org/licenses/
33+
# ****************************************************************************
3434
from __future__ import print_function
3535

3636
from sage.structure.sage_object import SageObject
@@ -359,76 +359,6 @@ def _repr_(self):
359359
"""
360360
return "Genus 2 reduction PARI interface"
361361

362-
def raw(self, Q, P):
363-
r"""
364-
Return a string emulating the raw output of running the old
365-
``genus2reduction`` program on the hyperelliptic curve
366-
`y^2 + Q(x)y = P(x)`.
367-
368-
INPUT:
369-
370-
- ``Q`` - something coercible to a univariate
371-
polynomial over Q.
372-
373-
- ``P`` - something coercible to a univariate
374-
polynomial over Q.
375-
376-
OUTPUT:
377-
378-
- ``string`` - raw output
379-
380-
- ``Q`` - what Q was actually input to auxiliary
381-
genus2reduction program
382-
383-
- ``P`` - what P was actually input to auxiliary
384-
genus2reduction program
385-
386-
EXAMPLES::
387-
388-
sage: x = QQ['x'].0
389-
sage: print(genus2reduction.raw(x^3 - 2*x^2 - 2*x + 1, -5*x^5)[0])
390-
doctest:...: DeprecationWarning: the raw() method is provided for backwards compatibility only, use the result of the genus2reduction() call instead of parsing strings
391-
See http://trac.sagemath.org/15808 for details.
392-
a minimal equation over Z[1/2] is :
393-
y^2 = x^6-240*x^4-2550*x^3-11400*x^2-24100*x-19855
394-
<BLANKLINE>
395-
factorization of the minimal (away from 2) discriminant :
396-
[2,3;5,5;2267,1]
397-
<BLANKLINE>
398-
p=2
399-
(potential) stable reduction : (II), j=1
400-
p=5
401-
(potential) stable reduction : (I)
402-
reduction at p : [V] page 156, (3), f=4
403-
p=2267
404-
(potential) stable reduction : (II), j=432
405-
reduction at p : [I{1-0-0}] page 170, (1), f=1
406-
<BLANKLINE>
407-
the prime to 2 part of the conductor is 1416875
408-
in factorized form : [5,4;2267,1]
409-
"""
410-
from sage.misc.superseded import deprecation
411-
deprecation(15808, 'the raw() method is provided for backwards compatibility only, use the result of the genus2reduction() call instead of parsing strings')
412-
413-
d = self(Q, P)
414-
415-
s = "a minimal equation over Z[1/2] is :\n"
416-
s += "y^2 = %s\n\n" % str(d.minimal_equation).replace(" ", "")
417-
s += "factorization of the minimal (away from 2) discriminant :\n"
418-
s += "%s\n\n" % str(pari(d.minimal_disc).factor()).replace(" ", "")
419-
420-
for p in sorted(d.local_data.keys()):
421-
s += "p=%s\n" % p
422-
s += d.local_data[p].replace(":", " :") + "\n"
423-
424-
if d.prime_to_2_conductor_only:
425-
s += "the prime to 2 part of the conductor is %s\n" % d.conductor
426-
else:
427-
s += "the conductor is %s\n" % d.conductor
428-
s += "in factorized form : %s" % str(pari(d.conductor).factor()).replace(" ", "")
429-
430-
return s, d.Q, d.P
431-
432362
def __call__(self, Q, P):
433363
"""
434364
Compute and return the :class:`ReductionData` corresponding to
@@ -501,11 +431,11 @@ def __call__(self, Q, P):
501431
P = R(P)
502432
Q = R(Q)
503433
if P.degree() > 6:
504-
raise ValueError("P (=%s) must have degree at most 6"%P)
505-
if Q.degree() >=4:
506-
raise ValueError("Q (=%s) must have degree at most 3"%Q)
434+
raise ValueError("P (=%s) must have degree at most 6" % P)
435+
if Q.degree() >= 4:
436+
raise ValueError("Q (=%s) must have degree at most 3" % Q)
507437

508-
res = pari.genus2red([P,Q])
438+
res = pari.genus2red([P, Q])
509439

510440
conductor = ZZ(res[0])
511441
minimal_equation = R(res[2])

src/sage/rings/power_series_ring.py

+1-20
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
from sage.interfaces.magma import MagmaElement
135135
from sage.rings.fraction_field_element import FractionFieldElement
136136
from sage.misc.sage_eval import sage_eval
137-
from sage.misc.superseded import deprecation
138137

139138
from sage.structure.unique_representation import UniqueRepresentation
140139
from sage.structure.category_object import normalize_names
@@ -458,8 +457,7 @@ class PowerSeriesRing_generic(UniqueRepresentation, ring.CommutativeRing, Nonexa
458457
"""
459458

460459
def __init__(self, base_ring, name=None, default_prec=None, sparse=False,
461-
use_lazy_mpoly_ring=None, implementation=None,
462-
category=None):
460+
implementation=None, category=None):
463461
"""
464462
Initializes a power series ring.
465463
@@ -479,9 +477,6 @@ def __init__(self, base_ring, name=None, default_prec=None, sparse=False,
479477
``'pari'``. The default is ``'pari'`` if the base field is
480478
a PARI finite field, and ``'poly'`` otherwise.
481479
482-
- ``use_lazy_mpoly_ring`` -- This option is deprecated; use
483-
``implementation='mpoly'`` instead.
484-
485480
If the base ring is a polynomial ring, then the option
486481
``implementation='mpoly'`` causes computations to be done with
487482
multivariate polynomials instead of a univariate polynomial
@@ -522,17 +517,11 @@ def __init__(self, base_ring, name=None, default_prec=None, sparse=False,
522517
ValueError: default_prec (= -5) must be non-negative
523518
524519
"""
525-
if use_lazy_mpoly_ring is not None:
526-
deprecation(15601, 'The option use_lazy_mpoly_ring is deprecated; use implementation="mpoly" instead')
527-
528520
from sage.rings.finite_rings.finite_field_pari_ffelt import FiniteField_pari_ffelt
529521

530522
if implementation is None:
531523
if isinstance(base_ring, FiniteField_pari_ffelt):
532524
implementation = 'pari'
533-
elif use_lazy_mpoly_ring and (is_MPolynomialRing(base_ring) or
534-
is_PolynomialRing(base_ring)):
535-
implementation = 'mpoly'
536525
else:
537526
implementation = 'poly'
538527

@@ -939,13 +928,6 @@ def _poly_ring(self):
939928
"""
940929
return self.__poly_ring
941930

942-
def _mpoly_ring(self):
943-
"""
944-
Return the polynomial ring that we use if ``use_lazy_mpoly_ring``
945-
was set.
946-
"""
947-
return self.__mpoly_ring
948-
949931
def base_extend(self, R):
950932
"""
951933
Return the power series ring over R in the same variable as self,
@@ -1275,4 +1257,3 @@ def unpickle_power_series_ring_v0(base_ring, name, default_prec, sparse):
12751257
True
12761258
"""
12771259
return PowerSeriesRing(base_ring, name=name, default_prec = default_prec, sparse=sparse)
1278-

0 commit comments

Comments
 (0)