Skip to content

Commit

Permalink
sagemathgh-37115: Remove check for deprecated attribute _no_generic_b…
Browse files Browse the repository at this point in the history
…asering_coercion

    
In `sage.categories.unital_algebras.UnitalAlgebras`, remove the check
for the attribute `_no_generic_basering_coercion`, which was deprecated
in sagemath#19225. This means that this attribute is now completely ignored by
the coercion framework.
    
URL: sagemath#37115
Reported by: Peter Bruin
Reviewer(s): Marc Mezzarobba
  • Loading branch information
Release Manager committed Jan 24, 2024
2 parents aaa7796 + ae58cdd commit 0709d70
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 0709d70

Please sign in to comment.