diff --git a/src/sage/structure/all.py b/src/sage/structure/all.py index 311bf869ef2..df0114c8382 100644 --- a/src/sage/structure/all.py +++ b/src/sage/structure/all.py @@ -1,12 +1,12 @@ -from .factorization import Factorization +from sage.structure.factorization import Factorization -from .sequence import Sequence, seq +from sage.structure.sequence import Sequence, seq -from .unique_representation import UniqueRepresentation +from sage.structure.unique_representation import UniqueRepresentation -from .sage_object import SageObject +from sage.structure.sage_object import SageObject -from .element import ( +from sage.structure.element import ( canonical_coercion, coercion_model, get_coercion_model, @@ -14,16 +14,16 @@ parent ) -from .parent import Parent +from sage.structure.parent import Parent -from .parent_gens import localvars +from sage.structure.parent_gens import localvars -from .proof import all as proof +from sage.structure.proof import all as proof from sage.misc.lazy_import import lazy_import lazy_import('sage.structure.formal_sum', ['FormalSums', 'FormalSum']) del lazy_import -from .mutability import Mutability +from sage.structure.mutability import Mutability -from .element_wrapper import ElementWrapper +from sage.structure.element_wrapper import ElementWrapper diff --git a/src/sage/structure/coerce.pxd b/src/sage/structure/coerce.pxd index e070d1c32e4..812cb5d5c7c 100644 --- a/src/sage/structure/coerce.pxd +++ b/src/sage/structure/coerce.pxd @@ -1,5 +1,5 @@ -from .parent cimport Parent -from .coerce_dict cimport TripleDict +from sage.structure.parent cimport Parent +from sage.structure.coerce_dict cimport TripleDict cpdef py_scalar_parent(py_type) cpdef py_scalar_to_element(py) diff --git a/src/sage/structure/coerce.pyx b/src/sage/structure/coerce.pyx index d8c3f684217..8f98085ba8d 100644 --- a/src/sage/structure/coerce.pyx +++ b/src/sage/structure/coerce.pyx @@ -84,11 +84,11 @@ cimport gmpy2 cdef mul, truediv from operator import mul, truediv -from .richcmp cimport rich_to_bool, revop -from .sage_object cimport SageObject -from .parent cimport Parent_richcmp_element_without_coercion -from .element cimport bin_op_exception, parent, Element -from .coerce_exceptions import CoercionException +from sage.structure.richcmp cimport rich_to_bool, revop +from sage.structure.sage_object cimport SageObject +from sage.structure.parent cimport Parent_richcmp_element_without_coercion +from sage.structure.element cimport bin_op_exception, parent, Element +from sage.structure.coerce_exceptions import CoercionException from sage.rings.integer_fake cimport is_Integer from sage.categories.map cimport Map from sage.categories.morphism import IdentityMorphism diff --git a/src/sage/structure/coerce_actions.pyx b/src/sage/structure/coerce_actions.pyx index 6df2aec6695..3c17ac858e6 100644 --- a/src/sage/structure/coerce_actions.pyx +++ b/src/sage/structure/coerce_actions.pyx @@ -18,10 +18,10 @@ from cpython.long cimport * from cpython.number cimport * from cysignals.signals cimport sig_check -from .coerce cimport coercion_model -from .element cimport parent, Element, ModuleElement -from .parent cimport Parent -from .coerce_exceptions import CoercionException +from sage.structure.coerce cimport coercion_model +from sage.structure.element cimport parent, Element, ModuleElement +from sage.structure.parent cimport Parent +from sage.structure.coerce_exceptions import CoercionException from sage.categories.action cimport InverseAction, PrecomposedAction from sage.arith.long cimport integer_check_long diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index 20c556b985e..6be65bb1f50 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -1,5 +1,5 @@ -from .sage_object cimport SageObject -from .parent cimport Parent +from sage.structure.sage_object cimport SageObject +from sage.structure.parent cimport Parent from sage.misc.inherit_comparison cimport InheritComparisonMetaclass diff --git a/src/sage/structure/factory.pyx b/src/sage/structure/factory.pyx index ddb55501d94..50d5374e79e 100644 --- a/src/sage/structure/factory.pyx +++ b/src/sage/structure/factory.pyx @@ -56,7 +56,7 @@ AUTHORS: import types -from .sage_object cimport SageObject +from sage.structure.sage_object cimport SageObject cdef sage_version from sage.version import version as sage_version diff --git a/src/sage/structure/parent.pyx b/src/sage/structure/parent.pyx index 6548d8a3656..d40caa03307 100644 --- a/src/sage/structure/parent.pyx +++ b/src/sage/structure/parent.pyx @@ -119,13 +119,13 @@ from sage.misc.lazy_attribute import lazy_attribute from sage.categories.sets_cat import Sets, EmptySetError from sage.misc.lazy_string cimport _LazyString from sage.sets.pythonclass cimport Set_PythonType_class -from .category_object import CategoryObject -from .coerce cimport coercion_model -from .coerce cimport parent_is_integers -from .coerce_exceptions import CoercionException -from .coerce_maps cimport (NamedConvertMap, DefaultConvertMap, +from sage.structure.category_object import CategoryObject +from sage.structure.coerce cimport coercion_model +from sage.structure.coerce cimport parent_is_integers +from sage.structure.coerce_exceptions import CoercionException +from sage.structure.coerce_maps cimport (NamedConvertMap, DefaultConvertMap, DefaultConvertMap_unique, CallableConvertMap) -from .element cimport parent +from sage.structure.element cimport parent cdef _record_exception(): diff --git a/src/sage/structure/parent_base.pxd b/src/sage/structure/parent_base.pxd index 225fccabcae..8ffac64eff2 100644 --- a/src/sage/structure/parent_base.pxd +++ b/src/sage/structure/parent_base.pxd @@ -6,7 +6,7 @@ # https://www.gnu.org/licenses/ ############################################################################### -from .parent_old cimport Parent as Parent_old +from sage.structure.parent_old cimport Parent as Parent_old cdef class ParentWithBase(Parent_old): pass diff --git a/src/sage/structure/parent_base.pyx b/src/sage/structure/parent_base.pyx index dd697f90135..b41175b5bff 100644 --- a/src/sage/structure/parent_base.pyx +++ b/src/sage/structure/parent_base.pyx @@ -12,7 +12,7 @@ Base class for old-style parent objects with a base ring # **************************************************************************** cimport sage.structure.parent as parent -from .coerce_exceptions import CoercionException +from sage.structure.coerce_exceptions import CoercionException cdef inline check_old_coerce(parent.Parent p): if p._element_constructor is not None: diff --git a/src/sage/structure/parent_gens.pxd b/src/sage/structure/parent_gens.pxd index 6ec0e6e83f0..cf3b416317f 100644 --- a/src/sage/structure/parent_gens.pxd +++ b/src/sage/structure/parent_gens.pxd @@ -12,7 +12,7 @@ Parent objects with generators # http://www.gnu.org/licenses/ #***************************************************************************** -from .parent_base cimport ParentWithBase +from sage.structure.parent_base cimport ParentWithBase cdef class ParentWithGens(ParentWithBase): diff --git a/src/sage/structure/parent_old.pyx b/src/sage/structure/parent_old.pyx index 77a7888d3b8..82bf9ead04b 100644 --- a/src/sage/structure/parent_old.pyx +++ b/src/sage/structure/parent_old.pyx @@ -27,7 +27,7 @@ This came up in some subtle bug once:: # https://www.gnu.org/licenses/ # **************************************************************************** from sage.misc.superseded import deprecation -from .coerce cimport py_scalar_parent +from sage.structure.coerce cimport py_scalar_parent from sage.ext.stdsage cimport HAS_DICTIONARY from sage.sets.pythonclass cimport Set_PythonType, Set_PythonType_class diff --git a/src/sage/structure/sage_object_test.py b/src/sage/structure/sage_object_test.py index 0922545a62c..721c1ad7719 100644 --- a/src/sage/structure/sage_object_test.py +++ b/src/sage/structure/sage_object_test.py @@ -1,6 +1,7 @@ import pytest -from .sage_object import SageObject +from sage.structure.sage_object import SageObject + class SageObjectTests: