Skip to content

Commit e3f7c7f

Browse files
author
Release Manager
committed
gh-37156: using Parent in integer rings instead of ParentWithGens Let's try to get rid of the last direct inheritance to `ParentWithGens`. (not quite the last one, see #37158 ) There remains many indirect inheritance, mostly through `Ring`, `Algebra`, `CommutativeRing` and their subclasses. This is a step towards cleaning and simplifying the old coercion framework. The present changes is close to the heart of sage, so appropriate timings should be checked. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. URL: #37156 Reported by: Frédéric Chapoton Reviewer(s): Kwankyu Lee
2 parents 42ac5ef + 04a196a commit e3f7c7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/rings/integer_ring.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets
6161
from sage.rings.number_field.number_field_element_base import NumberFieldElement_base
6262
from sage.structure.coerce cimport is_numpy_type
6363
from sage.structure.element cimport parent
64-
from sage.structure.parent_gens import ParentWithGens
64+
from sage.structure.parent cimport Parent
6565
from sage.structure.richcmp cimport rich_to_bool
6666

6767
from sage.misc.misc_c import prod
@@ -311,8 +311,8 @@ cdef class IntegerRing_class(PrincipalIdealDomain):
311311
sage: A in InfiniteEnumeratedSets()
312312
True
313313
"""
314-
ParentWithGens.__init__(self, self, ('x',), normalize=False,
315-
category=(EuclideanDomains(), InfiniteEnumeratedSets().Metric()))
314+
Parent.__init__(self, base=self, names=('x',), normalize=False,
315+
category=(EuclideanDomains(), InfiniteEnumeratedSets().Metric()))
316316
self._populate_coercion_lists_(init_no_parent=True,
317317
convert_method_name='_integer_')
318318

0 commit comments

Comments
 (0)