Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace relative imports by absolute ones in sage.libs.ntl #36605

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/GF2.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport GF2_c
from sage.libs.ntl.types cimport GF2_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/GF2E.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport GF2E_c, GF2X_c, GF2_c, GF2XModulus_c, ZZ_c
from sage.libs.ntl.types cimport GF2E_c, GF2X_c, GF2_c, GF2XModulus_c, ZZ_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/GF2EX.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport GF2EX_c
from sage.libs.ntl.types cimport GF2EX_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/GF2X.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport GF2X_c, GF2_c, GF2XModulus_c, vec_GF2_c, ZZ_c
from sage.libs.ntl.types cimport GF2X_c, GF2_c, GF2XModulus_c, vec_GF2_c, ZZ_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ZZ.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: depends = NTL/ZZ.h

from .types cimport ZZ_c
from sage.libs.ntl.types cimport ZZ_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ZZX.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# distutils: depends = NTL/ZZ.h

from sage.libs.gmp.types cimport mpz_t
from .types cimport ZZ_c, vec_ZZ_c, ZZX_c
from sage.libs.ntl.types cimport ZZ_c, vec_ZZ_c, ZZX_c


cdef extern from *:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ZZ_p.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: depends = NTL/ZZ.h

from .types cimport ZZ_c, ZZ_p_c
from sage.libs.ntl.types cimport ZZ_c, ZZ_p_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ZZ_pE.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: depends = NTL/ZZ.h

from .types cimport ZZ_c, ZZ_p_c, ZZ_pX_c, ZZ_pE_c
from sage.libs.ntl.types cimport ZZ_c, ZZ_p_c, ZZ_pX_c, ZZ_pE_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ZZ_pEX.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: depends = NTL/ZZ.h

from .types cimport (ZZ_c, ZZ_p_c, ZZ_pContext_c, ZZ_pE_c, vec_ZZ_p_c,
from sage.libs.ntl.types cimport (ZZ_c, ZZ_p_c, ZZ_pContext_c, ZZ_pE_c, vec_ZZ_p_c,
vec_ZZ_pE_c, ZZ_pEX_c, ZZ_pEX_Modulus_c)


Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ZZ_pX.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: depends = NTL/ZZ.h

from .types cimport (ZZ_c, ZZX_c, ZZ_p_c, vec_ZZ_p_c, ZZ_pContext_c,
from sage.libs.ntl.types cimport (ZZ_c, ZZX_c, ZZ_p_c, vec_ZZ_p_c, ZZ_pContext_c,
ZZ_pX_c, ZZ_pX_Modulus_c, ZZ_pX_Multiplier_c)


Expand Down
3 changes: 2 additions & 1 deletion src/sage/libs/ntl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from .error import setup_NTL_error_callback
from sage.libs.ntl.error import setup_NTL_error_callback

setup_NTL_error_callback()
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/conversion.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ conventions for conversion functions
# http://www.gnu.org/licenses/
#*****************************************************************************

from .types cimport mat_ZZ_p_c
from sage.libs.ntl.types cimport mat_ZZ_p_c
from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class
from sage.libs.ntl.ntl_ZZ_p cimport ntl_ZZ_p

Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/convert.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport ZZ_c
from sage.libs.ntl.types cimport ZZ_c
from sage.libs.gmp.types cimport mpz_t, mpz_srcptr

cdef void ZZ_to_mpz(mpz_t output, ZZ_c* x) noexcept
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/error.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ AUTHOR:
#*****************************************************************************


from .ntl_tools cimport ErrorMsgCallback
from ...cpython.string cimport char_to_str
from sage.libs.ntl.ntl_tools cimport ErrorMsgCallback
from sage.cpython.string cimport char_to_str


class NTLError(RuntimeError):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/lzz_p.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: depends = NTL/ZZ.h

from .types cimport zz_p_c
from sage.libs.ntl.types cimport zz_p_c

cdef extern from "ntlwrap.h":
long zz_p_rep "rep"(zz_p_c x)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/lzz_pX.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: depends = NTL/ZZ.h

from .types cimport ZZ_c, zz_p_c, zz_pX_c, zz_pX_Modulus_c
from sage.libs.ntl.types cimport ZZ_c, zz_p_c, zz_pX_c, zz_pX_Modulus_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/mat_GF2.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport mat_GF2_c, vec_GF2_c, GF2_c
from sage.libs.ntl.types cimport mat_GF2_c, vec_GF2_c, GF2_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/mat_GF2E.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport mat_GF2E_c, vec_GF2E_c, GF2E_c
from sage.libs.ntl.types cimport mat_GF2E_c, vec_GF2E_c, GF2E_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/mat_ZZ.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport mat_ZZ_c, ZZ_c, ZZX_c
from sage.libs.ntl.types cimport mat_ZZ_c, ZZ_c, ZZX_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_GF2.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport GF2_c
from sage.libs.ntl.types cimport GF2_c

cdef class ntl_GF2():
cdef GF2_c x
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_GF2E.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .types cimport GF2E_c
from .ntl_GF2EContext cimport ntl_GF2EContext_class
from sage.libs.ntl.types cimport GF2E_c
from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class

cdef class ntl_GF2E():
cdef GF2E_c x
Expand Down
10 changes: 5 additions & 5 deletions src/sage/libs/ntl/ntl_GF2E.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ include 'misc.pxi'
include 'decl.pxi'

from cpython.object cimport Py_EQ, Py_NE
from .ntl_ZZ cimport ntl_ZZ
from .ntl_GF2 cimport ntl_GF2
from .ntl_GF2X cimport ntl_GF2X
from .ntl_GF2EContext cimport ntl_GF2EContext_class
from .ntl_GF2EContext import ntl_GF2EContext
from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ
from sage.libs.ntl.ntl_GF2 cimport ntl_GF2
from sage.libs.ntl.ntl_GF2X cimport ntl_GF2X
from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class
from sage.libs.ntl.ntl_GF2EContext import ntl_GF2EContext
from sage.libs.ntl.ntl_ZZ import unpickle_class_args
from sage.misc.randstate cimport current_randstate

Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_GF2EContext.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .types cimport GF2EContext_c
from .ntl_GF2X cimport ntl_GF2X
from sage.libs.ntl.types cimport GF2EContext_c
from sage.libs.ntl.ntl_GF2X cimport ntl_GF2X

cdef class ntl_GF2EContext_class():
cdef GF2EContext_c x
Expand Down
6 changes: 3 additions & 3 deletions src/sage/libs/ntl/ntl_GF2EX.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .types cimport GF2EX_c
from .ntl_GF2EContext cimport ntl_GF2EContext_class
from .ntl_GF2E cimport ntl_GF2E
from sage.libs.ntl.types cimport GF2EX_c
from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class
from sage.libs.ntl.ntl_GF2E cimport ntl_GF2E

cdef class ntl_GF2EX():
cdef GF2EX_c x
Expand Down
8 changes: 4 additions & 4 deletions src/sage/libs/ntl/ntl_GF2EX.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ include 'misc.pxi'
include 'decl.pxi'

from cpython.object cimport Py_EQ, Py_NE
from .ntl_ZZ import unpickle_class_args
from .ntl_GF2EContext import ntl_GF2EContext
from .ntl_GF2EContext cimport ntl_GF2EContext_class
from .ntl_GF2E cimport ntl_GF2E
from sage.libs.ntl.ntl_ZZ import unpickle_class_args
from sage.libs.ntl.ntl_GF2EContext import ntl_GF2EContext
from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class
from sage.libs.ntl.ntl_GF2E cimport ntl_GF2E

##############################################################################
#
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_GF2X.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport GF2X_c
from sage.libs.ntl.types cimport GF2X_c

cdef class ntl_GF2X():
cdef GF2X_c x
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_GF2X.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ include 'decl.pxi'
from cpython.object cimport Py_EQ, Py_NE
from sage.rings.integer cimport Integer

from .ntl_ZZ import unpickle_class_value
from .ntl_GF2 cimport ntl_GF2
from sage.libs.ntl.ntl_ZZ import unpickle_class_value
from sage.libs.ntl.ntl_GF2 cimport ntl_GF2


##############################################################################
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_ZZX.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport ZZX_c
from sage.libs.ntl.types cimport ZZX_c

cdef class ntl_ZZX():
cdef ZZX_c x
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_ZZ_p.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .types cimport ZZ_p_c
from .ntl_ZZ_pContext cimport ntl_ZZ_pContext_class
from sage.libs.ntl.types cimport ZZ_p_c
from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class

cdef class ntl_ZZ_p():
cdef ZZ_p_c x
Expand Down
6 changes: 3 additions & 3 deletions src/sage/libs/ntl/ntl_ZZ_pContext.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .types cimport ZZ_pContext_c
from .ntl_ZZ cimport ntl_ZZ
from .types cimport ZZ_c
from sage.libs.ntl.types cimport ZZ_pContext_c
from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ
from sage.libs.ntl.types cimport ZZ_c


cdef class ntl_ZZ_pContext_class():
Expand Down
6 changes: 3 additions & 3 deletions src/sage/libs/ntl/ntl_ZZ_pE.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .types cimport ZZ_pE_c
from .ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class
from .ntl_ZZ_pX cimport ntl_ZZ_pX
from sage.libs.ntl.types cimport ZZ_pE_c
from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class
from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX

cdef class ntl_ZZ_pE():
cdef ZZ_pE_c x
Expand Down
8 changes: 4 additions & 4 deletions src/sage/libs/ntl/ntl_ZZ_pEContext.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .types cimport ZZ_pContext_c, ZZ_pEContext_c
from .ntl_ZZ_pContext cimport ntl_ZZ_pContext_class
from .ntl_ZZ_pX cimport ntl_ZZ_pX
from .types cimport ZZ_pX_Modulus_c
from sage.libs.ntl.types cimport ZZ_pContext_c, ZZ_pEContext_c
from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class
from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX
from sage.libs.ntl.types cimport ZZ_pX_Modulus_c


cdef struct ZZ_pEContext_ptrs:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_ZZ_pEContext.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ cdef class ntl_ZZ_pEContext_class():
sage: c.ZZ_pE([4,3])
[4 3]
"""
from .ntl_ZZ_pE import ntl_ZZ_pE
from sage.libs.ntl.ntl_ZZ_pE import ntl_ZZ_pE
return ntl_ZZ_pE(v,modulus=self)

def ZZ_pEX(self, v = None):
Expand All @@ -161,7 +161,7 @@ cdef class ntl_ZZ_pEContext_class():
sage: c.ZZ_pEX([4,3])
[[4] [3]]
"""
from .ntl_ZZ_pEX import ntl_ZZ_pEX
from sage.libs.ntl.ntl_ZZ_pEX import ntl_ZZ_pEX
return ntl_ZZ_pEX(v, modulus=self)

cpdef void _assert_is_current_modulus(self) except *:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_ZZ_pEX.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .types cimport ZZ_pEX_c
from .ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class
from sage.libs.ntl.types cimport ZZ_pEX_c
from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class

cdef class ntl_ZZ_pEX():
cdef ZZ_pEX_c x
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_ZZ_pX.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .ZZ_pX cimport *
from sage.libs.ntl.ZZ_pX cimport *
from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class

cdef class ntl_ZZ_pX():
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_lzz_p.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .lzz_p cimport *
from .ntl_lzz_pContext cimport ntl_zz_pContext_class
from sage.libs.ntl.lzz_p cimport *
from sage.libs.ntl.ntl_lzz_pContext cimport ntl_zz_pContext_class

cdef class ntl_zz_p():
cdef zz_p_c x
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_lzz_pContext.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport zz_pContext_c
from sage.libs.ntl.types cimport zz_pContext_c

cdef class ntl_zz_pContext_class():
cdef zz_pContext_c x
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/ntl/ntl_mat_GF2.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .types cimport mat_GF2_c
from .ntl_GF2 cimport ntl_GF2
from sage.libs.ntl.types cimport mat_GF2_c
from sage.libs.ntl.ntl_GF2 cimport ntl_GF2

cdef class ntl_mat_GF2():
cdef mat_GF2_c x
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_mat_GF2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include 'misc.pxi'
include 'decl.pxi'

from cpython.object cimport Py_EQ, Py_NE
from .ntl_GF2 cimport ntl_GF2
from sage.libs.ntl.ntl_GF2 cimport ntl_GF2
from sage.rings.integer cimport Integer
from sage.libs.ntl.ntl_ZZ import unpickle_class_args

Expand Down
6 changes: 3 additions & 3 deletions src/sage/libs/ntl/ntl_mat_GF2E.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .types cimport mat_GF2E_c
from .ntl_GF2EContext cimport ntl_GF2EContext_class
from .ntl_GF2E cimport ntl_GF2E
from sage.libs.ntl.types cimport mat_GF2E_c
from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class
from sage.libs.ntl.ntl_GF2E cimport ntl_GF2E

cdef class ntl_mat_GF2E():
cdef mat_GF2E_c x
Expand Down
6 changes: 3 additions & 3 deletions src/sage/libs/ntl/ntl_mat_GF2E.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ include 'misc.pxi'
include 'decl.pxi'

from cpython.object cimport Py_EQ, Py_NE
from .ntl_GF2E cimport ntl_GF2E
from .ntl_GF2EContext import ntl_GF2EContext
from .ntl_GF2EContext cimport ntl_GF2EContext_class
from sage.libs.ntl.ntl_GF2E cimport ntl_GF2E
from sage.libs.ntl.ntl_GF2EContext import ntl_GF2EContext
from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class
from sage.rings.integer cimport Integer
from sage.misc.randstate cimport randstate, current_randstate

Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_mat_ZZ.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport mat_ZZ_c
from sage.libs.ntl.types cimport mat_ZZ_c

cdef class ntl_mat_ZZ():
cdef mat_ZZ_c x
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/ntl_mat_ZZ.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ
from sage.libs.ntl.ntl_ZZX cimport ntl_ZZX
from cpython.object cimport PyObject_RichCompare

from .ntl_ZZ import unpickle_class_args
from sage.libs.ntl.ntl_ZZ import unpickle_class_args

cdef inline ntl_ZZ make_ZZ(ZZ_c* x) noexcept:
cdef ntl_ZZ y
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/vec_GF2.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .types cimport vec_GF2_c, GF2_c
from sage.libs.ntl.types cimport vec_GF2_c, GF2_c


cdef extern from "ntlwrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/ntl/vec_GF2E.pxd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .types cimport vec_GF2E_c
from sage.libs.ntl.types cimport vec_GF2E_c
Loading