Skip to content

Commit

Permalink
Remove check for deprecated attribute _no_generic_basering_coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbruin committed Jan 19, 2024
1 parent 439065e commit ae58cdd
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/sage/categories/unital_algebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,7 @@ def __init_extra__(self):
0
sage: F(3)
3*B[0]
sage: class Bar(Parent):
....: _no_generic_basering_coercion = True
sage: Bar(category=Algebras(QQ))
doctest:warning...:
DeprecationWarning: the attribute _no_generic_basering_coercion is deprecated, implement _coerce_map_from_base_ring() instead
See https://github.com/sagemath/sage/issues/19225 for details.
<__main__.Bar_with_category object at 0x...>
"""
if getattr(self, '_no_generic_basering_coercion', False):
from sage.misc.superseded import deprecation
deprecation(19225, "the attribute _no_generic_basering_coercion is deprecated, implement _coerce_map_from_base_ring() instead")
return

base_ring = self.base_ring()
if base_ring is self:
# There are rings that are their own base rings. No need to register that.
Expand Down

0 comments on commit ae58cdd

Please sign in to comment.