diff --git a/src/sage/algebras/algebra.py b/src/sage/algebras/algebra.py deleted file mode 100644 index 8d9395a3176..00000000000 --- a/src/sage/algebras/algebra.py +++ /dev/null @@ -1,40 +0,0 @@ -# sage.doctest: needs sage.combinat sage.modules -""" -Abstract base class for algebras -""" - -#***************************************************************************** -# Copyright (C) 2005 William Stein -# -# Distributed under the terms of the GNU General Public License (GPL) -# -# This code is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# The full text of the GPL is available at: -# -# http://www.gnu.org/licenses/ -#***************************************************************************** - -from sage.categories.algebras import Algebras - - -def is_Algebra(x): - r""" - Return ``True`` if `x` is an Algebra. - - EXAMPLES:: - - sage: from sage.algebras.algebra import is_Algebra - sage: R. = FreeAlgebra(QQ,2) - sage: is_Algebra(R) - doctest:warning... - DeprecationWarning: the function is_Algebra is deprecated; use '... in Algebras(base_ring)' instead - See https://github.com/sagemath/sage/issues/35253 for details. - True - """ - from sage.misc.superseded import deprecation - deprecation(35253, "the function is_Algebra is deprecated; use '... in Algebras(base_ring)' instead") - return x in Algebras(x.base_ring()) diff --git a/src/sage/algebras/meson.build b/src/sage/algebras/meson.build index d3483851743..bad93c41abf 100644 --- a/src/sage/algebras/meson.build +++ b/src/sage/algebras/meson.build @@ -1,7 +1,6 @@ py.install_sources( '__init__.py', 'affine_nil_temperley_lieb.py', - 'algebra.py', 'all.py', 'askey_wilson.py', 'associated_graded.py', diff --git a/src/sage/categories/modules.py b/src/sage/categories/modules.py index f9bc036910f..0f7ec03001a 100644 --- a/src/sage/categories/modules.py +++ b/src/sage/categories/modules.py @@ -967,16 +967,10 @@ def construction(self): (Free Algebra on 2 generators (None0, None1) over Rational Field, Free Algebra on 2 generators (None0, None1) over Rational Field)) """ - try: - factors = self.tensor_factors() - except (TypeError, NotImplementedError): - from sage.misc.superseded import deprecation - deprecation(34393, "implementations of Modules().TensorProducts() now must define the method tensor_factors") - return None - return (TensorProductFunctor(), - factors) - - @abstract_method(optional=True) + factors = self.tensor_factors() + return (TensorProductFunctor(), factors) + + @abstract_method def tensor_factors(self): """ Return the tensor factors of this tensor product. @@ -992,16 +986,4 @@ def tensor_factors(self): F # G sage: T.tensor_factors() (F, G) - - TESTS:: - - sage: Cat = ModulesWithBasis(ZZ).FiniteDimensional().TensorProducts() - sage: M = CombinatorialFreeModule(ZZ, # needs sage.modules - ....: ((1, 1), (1, 2), (2, 1), (2, 2)), - ....: category=Cat) - sage: M.construction() # needs sage.modules - doctest:warning... - DeprecationWarning: implementations of Modules().TensorProducts() now must define the method tensor_factors - See https://github.com/sagemath/sage/issues/34393 for details. - (VectorFunctor, Integer Ring) """