Skip to content

Commit 751bf5a

Browse files
author
Release Manager
committed
gh-39227: deprecate fully the auld class IntegralDomain as another little step towards removing the auld coercion framework ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. URL: #39227 Reported by: Frédéric Chapoton Reviewer(s): Martin Rubey
2 parents 1364815 + 813a84f commit 751bf5a

File tree

2 files changed

+7
-46
lines changed

2 files changed

+7
-46
lines changed

src/sage/rings/polynomial/polynomial_quotient_ring.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
# it under the terms of the GNU General Public License as published by
3535
# the Free Software Foundation, either version 2 of the License, or
3636
# (at your option) any later version.
37-
# http://www.gnu.org/licenses/
37+
# https://www.gnu.org/licenses/
3838
#*****************************************************************************
3939

4040

4141
from . import polynomial_element
4242
import sage.rings.rational_field
4343

4444
from sage.arith.misc import crt
45-
from sage.rings.ring import Field, IntegralDomain, CommutativeRing
45+
from sage.rings.ring import Field, CommutativeRing
4646

4747
from sage.misc.cachefunc import cached_method
4848
from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement
@@ -2277,7 +2277,7 @@ def _richcmp_(self, other, op):
22772277
return richcmp(self.parent(), other.parent(), op)
22782278

22792279

2280-
class PolynomialQuotientRing_domain(PolynomialQuotientRing_generic, IntegralDomain):
2280+
class PolynomialQuotientRing_domain(PolynomialQuotientRing_generic, CommutativeRing):
22812281
"""
22822282
EXAMPLES::
22832283

src/sage/rings/ring.pyx

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The class inheritance hierarchy is:
2323
2424
- :class:`NoetherianRing` (deprecated and essentially removed)
2525
- :class:`CommutativeAlgebra` (deprecated and essentially removed)
26-
- :class:`IntegralDomain` (deprecated)
26+
- :class:`IntegralDomain` (deprecated and essentially removed)
2727
2828
- :class:`DedekindDomain` (deprecated and essentially removed)
2929
- :class:`PrincipalIdealDomain` (deprecated and essentially removed)
@@ -954,50 +954,11 @@ cdef class CommutativeRing(Ring):
954954

955955

956956
cdef class IntegralDomain(CommutativeRing):
957-
"""
958-
Generic integral domain class.
959-
960-
This class is deprecated. Please use the
961-
:class:`sage.categories.integral_domains.IntegralDomains`
962-
category instead.
963-
"""
964957
_default_category = IntegralDomains()
965958

966-
def __init__(self, base_ring, names=None, normalize=True, category=None):
967-
"""
968-
Initialize ``self``.
969-
970-
INPUT:
971-
972-
- ``category`` -- (default: ``None``) a category, or ``None``
973-
974-
This method is used by all the abstract subclasses of
975-
:class:`IntegralDomain`, like :class:`Field`, ... in order to
976-
avoid cascade calls Field.__init__ ->
977-
IntegralDomain.__init__ ->
978-
...
979-
980-
EXAMPLES::
981-
982-
sage: F = IntegralDomain(QQ)
983-
sage: F.category()
984-
Category of integral domains
985-
986-
sage: F = Field(QQ)
987-
sage: F.category()
988-
Category of fields
989-
990-
The default value for the category is specified by the class
991-
attribute ``default_category``::
992-
993-
sage: IntegralDomain._default_category
994-
Category of integral domains
995-
996-
sage: Field._default_category
997-
Category of fields
998-
"""
999-
CommutativeRing.__init__(self, base_ring, names=names, normalize=normalize,
1000-
category=category)
959+
def __init__(self, *args, **kwds):
960+
deprecation(39227, "use the category IntegralDomains")
961+
super().__init__(*args, **kwds)
1001962

1002963

1003964
cdef class NoetherianRing(CommutativeRing):

0 commit comments

Comments
 (0)