diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx index 8f6576b477d..f78b522dc4a 100644 --- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx @@ -15,7 +15,6 @@ AUTHOR: - Simon King (2011-03-23): Trac ticket :trac:`7797` """ -from __future__ import print_function from sage.libs.singular.function import lib, singular_function from sage.misc.misc import repr_lincomb diff --git a/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx b/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx index 70400ef13a7..49ab368313b 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx +++ b/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx @@ -20,7 +20,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ diff --git a/src/sage/arith/multi_modular.pyx b/src/sage/arith/multi_modular.pyx index 1d0c1500bc4..846b8968c9f 100644 --- a/src/sage/arith/multi_modular.pyx +++ b/src/sage/arith/multi_modular.pyx @@ -11,7 +11,6 @@ Utility classes for multi-modular algorithms # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport check_allocarray, check_reallocarray, sig_free diff --git a/src/sage/arith/srange.pyx b/src/sage/arith/srange.pyx index 77124322c63..1c2e224a57c 100644 --- a/src/sage/arith/srange.pyx +++ b/src/sage/arith/srange.pyx @@ -1,3 +1,4 @@ +# cython: language_level=2 """ Ranges and the ``[1,2,..,n]`` notation diff --git a/src/sage/calculus/integration.pyx b/src/sage/calculus/integration.pyx index 276615bdc0b..28ddf298854 100644 --- a/src/sage/calculus/integration.pyx +++ b/src/sage/calculus/integration.pyx @@ -25,7 +25,6 @@ AUTHORS: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cysignals.signals cimport sig_on, sig_off from sage.rings.real_double import RDF diff --git a/src/sage/calculus/interpolators.pyx b/src/sage/calculus/interpolators.pyx index cef315dddb9..36ee8df1f1e 100644 --- a/src/sage/calculus/interpolators.pyx +++ b/src/sage/calculus/interpolators.pyx @@ -22,7 +22,6 @@ Development supported by NSF award No. 0702939. # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import numpy as np cimport numpy as np diff --git a/src/sage/calculus/ode.pyx b/src/sage/calculus/ode.pyx index 6ffaa5428c1..cc1b544e1ae 100644 --- a/src/sage/calculus/ode.pyx +++ b/src/sage/calculus/ode.pyx @@ -18,7 +18,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport sig_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx index 4ac3dedf1df..dfd27266265 100644 --- a/src/sage/calculus/riemann.pyx +++ b/src/sage/calculus/riemann.pyx @@ -24,7 +24,6 @@ Development supported by NSF award No. 0702939. # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/calculus/transforms/dwt.pyx b/src/sage/calculus/transforms/dwt.pyx index 77b6b029eaa..cb24f071ad7 100644 --- a/src/sage/calculus/transforms/dwt.pyx +++ b/src/sage/calculus/transforms/dwt.pyx @@ -20,7 +20,6 @@ AUTHOR: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import sage.plot.all diff --git a/src/sage/calculus/transforms/fft.pyx b/src/sage/calculus/transforms/fft.pyx index ca2b2fcc536..46fcfae0195 100644 --- a/src/sage/calculus/transforms/fft.pyx +++ b/src/sage/calculus/transforms/fft.pyx @@ -19,7 +19,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/categories/action.pyx b/src/sage/categories/action.pyx index 64f9422d478..7a007b4dba1 100644 --- a/src/sage/categories/action.pyx +++ b/src/sage/categories/action.pyx @@ -53,8 +53,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from cpython.tuple cimport PyTuple_GET_ITEM from .functor cimport Functor diff --git a/src/sage/categories/coercion_methods.pyx b/src/sage/categories/coercion_methods.pyx index 17a5108cecd..830bd238c66 100644 --- a/src/sage/categories/coercion_methods.pyx +++ b/src/sage/categories/coercion_methods.pyx @@ -5,8 +5,6 @@ The purpose of this Cython module is to hold special coercion methods, which are inserted by their respective categories. """ -from __future__ import absolute_import, division, print_function - from sage.structure.element cimport Element cimport cython diff --git a/src/sage/categories/functor.pyx b/src/sage/categories/functor.pyx index 91fe24f29e4..fee6d9de4a1 100644 --- a/src/sage/categories/functor.pyx +++ b/src/sage/categories/functor.pyx @@ -32,7 +32,6 @@ AUTHORS: # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from . import category diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index f45429eeb48..0d0b7a3e6ae 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -22,8 +22,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from . import homset import weakref from sage.ext.stdsage cimport HAS_DICTIONARY diff --git a/src/sage/categories/morphism.pyx b/src/sage/categories/morphism.pyx index 5b045156990..8ce72276765 100644 --- a/src/sage/categories/morphism.pyx +++ b/src/sage/categories/morphism.pyx @@ -19,7 +19,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cpython.object cimport * from sage.misc.constant_function import ConstantFunction diff --git a/src/sage/coding/binary_code.pyx b/src/sage/coding/binary_code.pyx index 536ae116227..b1d30d36ce8 100644 --- a/src/sage/coding/binary_code.pyx +++ b/src/sage/coding/binary_code.pyx @@ -40,8 +40,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from libc.string cimport memcpy from cpython.mem cimport * from cpython.object cimport PyObject_RichCompare diff --git a/src/sage/coding/codecan/codecan.pyx b/src/sage/coding/codecan/codecan.pyx index 3ed173abbc9..abccedfdf47 100644 --- a/src/sage/coding/codecan/codecan.pyx +++ b/src/sage/coding/codecan/codecan.pyx @@ -91,7 +91,6 @@ is returned by generators:: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #******************************************************************************* -from __future__ import absolute_import from copy import copy from cysignals.memory cimport check_allocarray, sig_free diff --git a/src/sage/combinat/crystals/pbw_datum.pyx b/src/sage/combinat/crystals/pbw_datum.pyx index 7e9a041361c..3866f0f857d 100644 --- a/src/sage/combinat/crystals/pbw_datum.pyx +++ b/src/sage/combinat/crystals/pbw_datum.pyx @@ -21,7 +21,6 @@ AUTHORS: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import #from sage.misc.lazy_attribute import lazy_attribute from sage.misc.cachefunc import cached_method diff --git a/src/sage/combinat/crystals/spins.pyx b/src/sage/combinat/crystals/spins.pyx index 6c6d57aa4bf..1417a728502 100644 --- a/src/sage/combinat/crystals/spins.pyx +++ b/src/sage/combinat/crystals/spins.pyx @@ -41,7 +41,6 @@ representing the elements of the spin crystal by sequences of signs # # http://www.gnu.org/licenses/ #**************************************************************************** -from __future__ import print_function from cpython.object cimport Py_EQ, Py_NE, Py_LE, Py_GE, Py_LT, Py_GT from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/combinat/crystals/tensor_product_element.pyx b/src/sage/combinat/crystals/tensor_product_element.pyx index 76403efd53e..83b0bb4a823 100644 --- a/src/sage/combinat/crystals/tensor_product_element.pyx +++ b/src/sage/combinat/crystals/tensor_product_element.pyx @@ -29,7 +29,6 @@ AUTHORS: # # https://www.gnu.org/licenses/ #**************************************************************************** -from __future__ import print_function, absolute_import from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE from sage.structure.parent cimport Parent diff --git a/src/sage/combinat/designs/designs_pyx.pyx b/src/sage/combinat/designs/designs_pyx.pyx index 4b9f3cc7fa4..2098f33b6aa 100644 --- a/src/sage/combinat/designs/designs_pyx.pyx +++ b/src/sage/combinat/designs/designs_pyx.pyx @@ -6,7 +6,6 @@ This module implements the design methods that need to be somewhat efficient. Functions --------- """ -from __future__ import print_function, absolute_import, division include "sage/data_structures/bitset.pxi" diff --git a/src/sage/combinat/designs/evenly_distributed_sets.pyx b/src/sage/combinat/designs/evenly_distributed_sets.pyx index b4f7176ecc0..5eeb02df81e 100644 --- a/src/sage/combinat/designs/evenly_distributed_sets.pyx +++ b/src/sage/combinat/designs/evenly_distributed_sets.pyx @@ -15,7 +15,6 @@ might want to update this database with more values. Classes and methods ------------------- """ -from __future__ import print_function, absolute_import cimport cython diff --git a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx index d9f79201602..d1cd3561a1c 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx +++ b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx @@ -44,7 +44,6 @@ REFERENCES: Functions --------- """ -from __future__ import print_function, absolute_import from sage.misc.cachefunc import cached_function from .orthogonal_arrays import orthogonal_array diff --git a/src/sage/combinat/integer_lists/invlex.pyx b/src/sage/combinat/integer_lists/invlex.pyx index 7782bb1d643..052c850a6d7 100644 --- a/src/sage/combinat/integer_lists/invlex.pyx +++ b/src/sage/combinat/integer_lists/invlex.pyx @@ -28,8 +28,6 @@ limitations and lack of robustness w.r.t. input. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import - import builtins from sage.misc.classcall_metaclass import ClasscallMetaclass, typecall diff --git a/src/sage/combinat/matrices/dancing_links.pyx b/src/sage/combinat/matrices/dancing_links.pyx index 2c949f97e97..d1e407c8933 100644 --- a/src/sage/combinat/matrices/dancing_links.pyx +++ b/src/sage/combinat/matrices/dancing_links.pyx @@ -77,7 +77,6 @@ There is also a method ``reinitialize`` to reinitialize the algorithm:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from cpython.object cimport PyObject_RichCompare from libcpp.vector cimport vector diff --git a/src/sage/combinat/partitions.pyx b/src/sage/combinat/partitions.pyx index c7c893ca6de..feff1823b81 100644 --- a/src/sage/combinat/partitions.pyx +++ b/src/sage/combinat/partitions.pyx @@ -23,7 +23,6 @@ AUTHOR: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import import sys diff --git a/src/sage/combinat/permutation_cython.pyx b/src/sage/combinat/permutation_cython.pyx index 7063b35c2ad..eb5e805bf3e 100644 --- a/src/sage/combinat/permutation_cython.pyx +++ b/src/sage/combinat/permutation_cython.pyx @@ -33,8 +33,6 @@ speed, we provide a class that wraps our struct. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - cimport cython from cpython.object cimport PyObject diff --git a/src/sage/combinat/root_system/reflection_group_element.pyx b/src/sage/combinat/root_system/reflection_group_element.pyx index 444209753dd..ed552674922 100644 --- a/src/sage/combinat/root_system/reflection_group_element.pyx +++ b/src/sage/combinat/root_system/reflection_group_element.pyx @@ -22,8 +22,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.misc.misc_c import prod diff --git a/src/sage/combinat/words/word_char.pyx b/src/sage/combinat/words/word_char.pyx index 1c2a4a5dc5c..052b3855764 100644 --- a/src/sage/combinat/words/word_char.pyx +++ b/src/sage/combinat/words/word_char.pyx @@ -10,7 +10,6 @@ Fast word datatype using an array of unsigned char # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cysignals.memory cimport check_allocarray, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/combinat/words/word_datatypes.pyx b/src/sage/combinat/words/word_datatypes.pyx index 85199ddf82c..e58810bd9eb 100644 --- a/src/sage/combinat/words/word_datatypes.pyx +++ b/src/sage/combinat/words/word_datatypes.pyx @@ -11,7 +11,6 @@ Datatypes for finite words # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cpython.object cimport Py_EQ, Py_NE from itertools import islice diff --git a/src/sage/cpython/atexit.pyx b/src/sage/cpython/atexit.pyx index 0a20f14e2a3..d88fc2de828 100644 --- a/src/sage/cpython/atexit.pyx +++ b/src/sage/cpython/atexit.pyx @@ -12,9 +12,6 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - - import atexit diff --git a/src/sage/cpython/dict_del_by_value.pyx b/src/sage/cpython/dict_del_by_value.pyx index 86830779bda..b79b93095d5 100644 --- a/src/sage/cpython/dict_del_by_value.pyx +++ b/src/sage/cpython/dict_del_by_value.pyx @@ -16,7 +16,7 @@ AUTHORS: - Nils Bruin (2017-05) """ -#***************************************************************************** +# **************************************************************************** # Copyright (C) 2017 Nils Bruin # # This program is free software: you can redistribute it and/or modify @@ -24,9 +24,7 @@ AUTHORS: # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # https://www.gnu.org/licenses/ -#***************************************************************************** - -from __future__ import print_function, absolute_import +# **************************************************************************** import weakref from weakref import KeyedRef @@ -34,7 +32,7 @@ from weakref import KeyedRef from cpython.list cimport PyList_New from cpython cimport Py_XINCREF, Py_XDECREF -IF PY_VERSION_HEX<=0x02ffffff: +IF PY_VERSION_HEX <= 0x02ffffff: cdef extern from "Python.h": ctypedef struct PyDictEntry: Py_ssize_t me_hash diff --git a/src/sage/cpython/string.pyx b/src/sage/cpython/string.pyx index 1455a09b7ca..b855f99a1e6 100644 --- a/src/sage/cpython/string.pyx +++ b/src/sage/cpython/string.pyx @@ -23,8 +23,6 @@ Check that this can be used outside of Sage (see :trac:`25549`):: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - import sys diff --git a/src/sage/crypto/boolean_function.pyx b/src/sage/crypto/boolean_function.pyx index 4595eb46e15..50814e9bca0 100644 --- a/src/sage/crypto/boolean_function.pyx +++ b/src/sage/crypto/boolean_function.pyx @@ -28,7 +28,6 @@ AUTHOR: - Yann Laigle-Chapuy (2009-08-28): first implementation """ -from __future__ import absolute_import from cysignals.signals cimport sig_check from libc.string cimport memcpy diff --git a/src/sage/data_structures/bitset.pyx b/src/sage/data_structures/bitset.pyx index 5bdf20dbdaa..0821d3a80fb 100644 --- a/src/sage/data_structures/bitset.pyx +++ b/src/sage/data_structures/bitset.pyx @@ -30,7 +30,6 @@ linear in ``capacity``. # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function include "bitset.pxi" from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE diff --git a/src/sage/data_structures/bounded_integer_sequences.pyx b/src/sage/data_structures/bounded_integer_sequences.pyx index 1ca0f7955ed..393d8e7577d 100644 --- a/src/sage/data_structures/bounded_integer_sequences.pyx +++ b/src/sage/data_structures/bounded_integer_sequences.pyx @@ -106,7 +106,6 @@ AUTHORS: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cysignals.signals cimport sig_check, sig_on, sig_off include 'sage/data_structures/bitset.pxi' diff --git a/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx b/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx index ef0312c37bd..b2fd901f36d 100644 --- a/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx +++ b/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx @@ -20,7 +20,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division from sage.plot.colors import Color from sage.repl.image import Image from copy import copy diff --git a/src/sage/ext/fast_callable.pyx b/src/sage/ext/fast_callable.pyx index 51ac14d451b..7c37796afbf 100644 --- a/src/sage/ext/fast_callable.pyx +++ b/src/sage/ext/fast_callable.pyx @@ -299,7 +299,6 @@ AUTHOR: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import operator from copy import copy diff --git a/src/sage/ext/fast_eval.pyx b/src/sage/ext/fast_eval.pyx index 8ce6ae2d3e8..0743f3052ca 100644 --- a/src/sage/ext/fast_eval.pyx +++ b/src/sage/ext/fast_eval.pyx @@ -86,7 +86,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/finance/fractal.pyx b/src/sage/finance/fractal.pyx index 68598f343d2..90da765eaac 100644 --- a/src/sage/finance/fractal.pyx +++ b/src/sage/finance/fractal.pyx @@ -20,7 +20,6 @@ AUTHOR: - William Stein (2008) """ -from __future__ import absolute_import from sage.rings.all import RDF, CDF, Integer from sage.modules.all import vector diff --git a/src/sage/finance/markov_multifractal_cython.pyx b/src/sage/finance/markov_multifractal_cython.pyx index 59adc8ecf7d..0bdc32c1d6f 100644 --- a/src/sage/finance/markov_multifractal_cython.pyx +++ b/src/sage/finance/markov_multifractal_cython.pyx @@ -3,7 +3,6 @@ Markov Switching Multifractal model Cython code """ -from __future__ import absolute_import from sage.misc.randstate cimport randstate, current_randstate diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx index 3ab02828612..0bd56dab101 100644 --- a/src/sage/finance/time_series.pyx +++ b/src/sage/finance/time_series.pyx @@ -46,8 +46,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - cimport cython from cpython.bytes cimport PyBytes_FromStringAndSize, PyBytes_AsString from libc.math cimport exp, floor, log, pow, sqrt diff --git a/src/sage/functions/prime_pi.pyx b/src/sage/functions/prime_pi.pyx index 2d7f928f385..a29dce47bff 100644 --- a/src/sage/functions/prime_pi.pyx +++ b/src/sage/functions/prime_pi.pyx @@ -27,7 +27,6 @@ EXAMPLES:: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cypari2.paridecl cimport * from cysignals.signals cimport * diff --git a/src/sage/games/sudoku_backtrack.pyx b/src/sage/games/sudoku_backtrack.pyx index ad28e31c150..9d02c4fcf9a 100644 --- a/src/sage/games/sudoku_backtrack.pyx +++ b/src/sage/games/sudoku_backtrack.pyx @@ -3,8 +3,6 @@ This module contains Cython code for a backtracking algorithm to solve Sudoku pu Once Cython implements closures and the ``yield`` keyword is possible, this can be moved into the ``sage.games.sudoku`` module, as part of the ``Sudoku.backtrack`` method, and this module can be banned. """ -from __future__ import print_function - def backtrack_all(n, puzzle): r""" diff --git a/src/sage/geometry/integral_points.pyx b/src/sage/geometry/integral_points.pyx index 6640e85e6f9..d11ddb67523 100644 --- a/src/sage/geometry/integral_points.pyx +++ b/src/sage/geometry/integral_points.pyx @@ -12,7 +12,6 @@ Cython helper methods to compute integral points in polyhedra. # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cysignals.signals cimport sig_check import copy diff --git a/src/sage/geometry/point_collection.pyx b/src/sage/geometry/point_collection.pyx index ed813c3281c..f04fe59d042 100644 --- a/src/sage/geometry/point_collection.pyx +++ b/src/sage/geometry/point_collection.pyx @@ -75,7 +75,6 @@ need to spend time and memory four times. # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.structure.sage_object cimport SageObject from sage.structure.richcmp cimport richcmp_not_equal, richcmp diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx index 8f0a22f501c..6ca05b3ff4c 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx @@ -64,8 +64,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - import numbers from sage.rings.integer cimport smallInteger from .conversions cimport bit_repr_to_Vrepr_list diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx index 0c56308d17d..339747d5c64 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx @@ -157,8 +157,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from sage.rings.integer cimport smallInteger from cysignals.signals cimport sig_check, sig_on, sig_off from .conversions cimport bit_repr_to_Vrepr_list diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx index 6da064e1bce..3a67d1fc5d5 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx @@ -59,7 +59,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function from .conversions \ import facets_tuple_to_bit_repr_of_facets, \ facets_tuple_to_bit_repr_of_Vrepr diff --git a/src/sage/geometry/triangulation/base.pyx b/src/sage/geometry/triangulation/base.pyx index a435f61a97b..a4b8aaccff7 100644 --- a/src/sage/geometry/triangulation/base.pyx +++ b/src/sage/geometry/triangulation/base.pyx @@ -16,7 +16,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ ######################################################################## -from __future__ import absolute_import from sage.misc.fast_methods cimport hash_by_id from sage.structure.sage_object cimport SageObject diff --git a/src/sage/graphs/base/boost_graph.pyx b/src/sage/graphs/base/boost_graph.pyx index 38b57b2e84d..6ba0a44c9af 100644 --- a/src/sage/graphs/base/boost_graph.pyx +++ b/src/sage/graphs/base/boost_graph.pyx @@ -48,7 +48,6 @@ Functions # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import cimport cython from cysignals.signals cimport sig_check, sig_on, sig_off diff --git a/src/sage/graphs/base/c_graph.pyx b/src/sage/graphs/base/c_graph.pyx index 480e2db9ad5..8f6857bd379 100644 --- a/src/sage/graphs/base/c_graph.pyx +++ b/src/sage/graphs/base/c_graph.pyx @@ -42,8 +42,6 @@ method :meth:`realloc `. # https://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import, division - include "sage/data_structures/bitset.pxi" from sage.rings.integer cimport Integer diff --git a/src/sage/graphs/base/dense_graph.pyx b/src/sage/graphs/base/dense_graph.pyx index 74498ec171e..8e9769f0d62 100644 --- a/src/sage/graphs/base/dense_graph.pyx +++ b/src/sage/graphs/base/dense_graph.pyx @@ -116,7 +116,6 @@ vertices. For more details about this, refer to the documentation for # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import include 'sage/data_structures/bitset.pxi' diff --git a/src/sage/graphs/base/graph_backends.pyx b/src/sage/graphs/base/graph_backends.pyx index 049c8fb6018..79705778590 100644 --- a/src/sage/graphs/base/graph_backends.pyx +++ b/src/sage/graphs/base/graph_backends.pyx @@ -58,7 +58,6 @@ Classes and methods # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from .c_graph cimport CGraphBackend, CGraph diff --git a/src/sage/graphs/base/static_sparse_backend.pyx b/src/sage/graphs/base/static_sparse_backend.pyx index f3948a3be55..0258c5a0bab 100644 --- a/src/sage/graphs/base/static_sparse_backend.pyx +++ b/src/sage/graphs/base/static_sparse_backend.pyx @@ -34,7 +34,6 @@ This module implements two classes Classes and methods ------------------- """ -from __future__ import print_function from cysignals.memory cimport check_calloc, sig_free diff --git a/src/sage/graphs/base/static_sparse_graph.pyx b/src/sage/graphs/base/static_sparse_graph.pyx index 4af6f31d116..0c5cf907c66 100644 --- a/src/sage/graphs/base/static_sparse_graph.pyx +++ b/src/sage/graphs/base/static_sparse_graph.pyx @@ -180,7 +180,6 @@ with C arguments). # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import include "sage/data_structures/bitset.pxi" cimport cpython diff --git a/src/sage/graphs/centrality.pyx b/src/sage/graphs/centrality.pyx index 06d556d6bd4..ee6c1b291b8 100755 --- a/src/sage/graphs/centrality.pyx +++ b/src/sage/graphs/centrality.pyx @@ -15,7 +15,6 @@ This module is meant for all functions related to centrality in networks. Functions --------- """ -from __future__ import print_function, absolute_import from libc.string cimport memset from libc.stdint cimport uint32_t diff --git a/src/sage/graphs/comparability.pyx b/src/sage/graphs/comparability.pyx index 0306ea0350c..b4ed4396824 100644 --- a/src/sage/graphs/comparability.pyx +++ b/src/sage/graphs/comparability.pyx @@ -211,8 +211,6 @@ Methods # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from cysignals.memory cimport sig_free from copy import copy diff --git a/src/sage/graphs/connectivity.pyx b/src/sage/graphs/connectivity.pyx index 04a2c29eb37..c3e4a312cbb 100644 --- a/src/sage/graphs/connectivity.pyx +++ b/src/sage/graphs/connectivity.pyx @@ -57,7 +57,7 @@ Here is what the module can do: Methods ------- """ -from __future__ import absolute_import + from sage.rings.integer cimport Integer from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/graphs/convexity_properties.pyx b/src/sage/graphs/convexity_properties.pyx index 71d5e495518..8e49d228ed2 100644 --- a/src/sage/graphs/convexity_properties.pyx +++ b/src/sage/graphs/convexity_properties.pyx @@ -29,7 +29,6 @@ Methods # The full text of the GPL is available at: # http://www.gnu.org/licenses/ ############################################################################## -from __future__ import print_function include "sage/data_structures/binary_matrix.pxi" from sage.numerical.backends.generic_backend cimport GenericBackend diff --git a/src/sage/graphs/distances_all_pairs.pyx b/src/sage/graphs/distances_all_pairs.pyx index ed984d10477..4a1a51c6948 100644 --- a/src/sage/graphs/distances_all_pairs.pyx +++ b/src/sage/graphs/distances_all_pairs.pyx @@ -121,7 +121,6 @@ Functions # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function include "sage/data_structures/binary_matrix.pxi" from libc.string cimport memset diff --git a/src/sage/graphs/generic_graph_pyx.pyx b/src/sage/graphs/generic_graph_pyx.pyx index a8264f96b4e..7832c261088 100644 --- a/src/sage/graphs/generic_graph_pyx.pyx +++ b/src/sage/graphs/generic_graph_pyx.pyx @@ -20,8 +20,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.memory cimport check_allocarray, check_calloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/graphs/genus.pyx b/src/sage/graphs/genus.pyx index fd2292a0258..1a9f5e6ede6 100644 --- a/src/sage/graphs/genus.pyx +++ b/src/sage/graphs/genus.pyx @@ -36,7 +36,6 @@ described throughout the file. # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from libc.string cimport memcpy from sage.ext.memory_allocator cimport MemoryAllocator diff --git a/src/sage/graphs/graph_coloring.pyx b/src/sage/graphs/graph_coloring.pyx index 229e1520b92..c02c96f7aa4 100644 --- a/src/sage/graphs/graph_coloring.pyx +++ b/src/sage/graphs/graph_coloring.pyx @@ -53,8 +53,7 @@ Methods # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function -from __future__ import absolute_import + from six.moves import range from copy import copy diff --git a/src/sage/graphs/graph_decompositions/cutwidth.pyx b/src/sage/graphs/graph_decompositions/cutwidth.pyx index fce1bd4c7c8..f0588b0fcc5 100644 --- a/src/sage/graphs/graph_decompositions/cutwidth.pyx +++ b/src/sage/graphs/graph_decompositions/cutwidth.pyx @@ -167,8 +167,6 @@ Methods # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from libc.stdint cimport uint8_t from libc.string cimport memset from cysignals.memory cimport check_allocarray, sig_free diff --git a/src/sage/graphs/graph_decompositions/fast_digraph.pyx b/src/sage/graphs/graph_decompositions/fast_digraph.pyx index 5a91443dc0b..1cb012dffd7 100644 --- a/src/sage/graphs/graph_decompositions/fast_digraph.pyx +++ b/src/sage/graphs/graph_decompositions/fast_digraph.pyx @@ -12,7 +12,6 @@ cardinality). In the following code, sets are represented as integers, where the ith bit is set if element i belongs to the set. """ -from __future__ import print_function from libc.stdint cimport uint8_t from cysignals.memory cimport check_allocarray, check_calloc, sig_free diff --git a/src/sage/graphs/graph_decompositions/rankwidth.pyx b/src/sage/graphs/graph_decompositions/rankwidth.pyx index 81518934079..1e933cd3ce7 100644 --- a/src/sage/graphs/graph_decompositions/rankwidth.pyx +++ b/src/sage/graphs/graph_decompositions/rankwidth.pyx @@ -128,8 +128,6 @@ Methods # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from cysignals.memory cimport check_allocarray, sig_free from cysignals.signals cimport * diff --git a/src/sage/graphs/graph_decompositions/vertex_separation.pyx b/src/sage/graphs/graph_decompositions/vertex_separation.pyx index 8a2714a7483..8243d5aea43 100644 --- a/src/sage/graphs/graph_decompositions/vertex_separation.pyx +++ b/src/sage/graphs/graph_decompositions/vertex_separation.pyx @@ -282,8 +282,6 @@ Methods # http://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function - from libc.string cimport memset from cysignals.memory cimport check_malloc, sig_malloc, sig_free from cysignals.signals cimport sig_check, sig_on, sig_off diff --git a/src/sage/graphs/hyperbolicity.pyx b/src/sage/graphs/hyperbolicity.pyx index 8793966cbe5..28bd865c567 100644 --- a/src/sage/graphs/hyperbolicity.pyx +++ b/src/sage/graphs/hyperbolicity.pyx @@ -147,7 +147,6 @@ Methods # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from libc.string cimport memset from cysignals.memory cimport check_allocarray, sig_free diff --git a/src/sage/graphs/independent_sets.pyx b/src/sage/graphs/independent_sets.pyx index 5fd21ee62a0..63cf7b7ac97 100644 --- a/src/sage/graphs/independent_sets.pyx +++ b/src/sage/graphs/independent_sets.pyx @@ -14,7 +14,6 @@ Classes and methods ------------------- """ -from __future__ import print_function include "sage/data_structures/binary_matrix.pxi" from sage.misc.cachefunc import cached_method diff --git a/src/sage/graphs/line_graph.pyx b/src/sage/graphs/line_graph.pyx index 3b8a764cb44..714e2531272 100644 --- a/src/sage/graphs/line_graph.pyx +++ b/src/sage/graphs/line_graph.pyx @@ -126,7 +126,6 @@ This decomposition turns out to be very easy to implement :-) Functions --------- """ -from __future__ import print_function def is_line_graph(g, certificate=False): r""" diff --git a/src/sage/graphs/mcqd.pyx b/src/sage/graphs/mcqd.pyx index 4316c18bcb5..0ed4ac68959 100644 --- a/src/sage/graphs/mcqd.pyx +++ b/src/sage/graphs/mcqd.pyx @@ -1,4 +1,3 @@ -from __future__ import print_function from sage.ext.memory_allocator cimport MemoryAllocator diff --git a/src/sage/graphs/path_enumeration.pyx b/src/sage/graphs/path_enumeration.pyx index 86b6d0011ff..5b252b06285 100644 --- a/src/sage/graphs/path_enumeration.pyx +++ b/src/sage/graphs/path_enumeration.pyx @@ -31,7 +31,6 @@ Functions # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from sage.categories.cartesian_product import cartesian_product from sage.misc.misc_c import prod from libcpp.vector cimport vector diff --git a/src/sage/graphs/spanning_tree.pyx b/src/sage/graphs/spanning_tree.pyx index 8095df4dfde..65233fa25bf 100644 --- a/src/sage/graphs/spanning_tree.pyx +++ b/src/sage/graphs/spanning_tree.pyx @@ -60,7 +60,6 @@ Methods # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import cimport cython from sage.ext.memory_allocator cimport MemoryAllocator diff --git a/src/sage/graphs/strongly_regular_db.pyx b/src/sage/graphs/strongly_regular_db.pyx index 617543083f5..7e735dc9de1 100644 --- a/src/sage/graphs/strongly_regular_db.pyx +++ b/src/sage/graphs/strongly_regular_db.pyx @@ -30,7 +30,6 @@ REFERENCES: Functions --------- """ -from __future__ import print_function, absolute_import, division import json import os diff --git a/src/sage/graphs/trees.pyx b/src/sage/graphs/trees.pyx index 316818f0566..c9d296a833a 100644 --- a/src/sage/graphs/trees.pyx +++ b/src/sage/graphs/trees.pyx @@ -16,7 +16,6 @@ REFERENCES: Constant time generation of free trees. SIAM J. Comput. 15 (1986), no. 2, 540--548. """ -from __future__ import print_function from libc.limits cimport INT_MAX from cysignals.memory cimport check_allocarray, sig_free diff --git a/src/sage/groups/group.pyx b/src/sage/groups/group.pyx index 7e70a3de136..362eaf7c226 100644 --- a/src/sage/groups/group.pyx +++ b/src/sage/groups/group.pyx @@ -16,7 +16,6 @@ Base class for groups # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import import random diff --git a/src/sage/groups/matrix_gps/group_element.pyx b/src/sage/groups/matrix_gps/group_element.pyx index 8387292bcc9..1bf2b88e6d5 100644 --- a/src/sage/groups/matrix_gps/group_element.pyx +++ b/src/sage/groups/matrix_gps/group_element.pyx @@ -74,7 +74,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.structure.element cimport MultiplicativeGroupElement, Element, MonoidElement, Matrix from sage.structure.parent cimport Parent diff --git a/src/sage/groups/old.pyx b/src/sage/groups/old.pyx index 47b5e5da736..7b522f0cb15 100644 --- a/src/sage/groups/old.pyx +++ b/src/sage/groups/old.pyx @@ -16,7 +16,6 @@ Base class for groups # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import doc=""" Base class for all groups diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx index 35c441ab0c7..92443eda909 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx @@ -109,8 +109,6 @@ REFERENCE: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from libc.string cimport memcmp, memcpy from cysignals.memory cimport sig_malloc, sig_realloc, sig_free diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx index b4aa2bcbcf8..1c66f55146f 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx @@ -26,8 +26,6 @@ REFERENCE: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - include "sage/data_structures/bitset.pxi" from .data_structures cimport * from sage.rings.integer cimport Integer diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx index 5674b00f34b..fd37c682127 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx @@ -21,8 +21,6 @@ REFERENCE: # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function - from .data_structures cimport * include "sage/data_structures/bitset.pxi" from sage.rings.integer cimport Integer diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx index 55b6799792f..d1123e426d0 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx @@ -26,8 +26,6 @@ REFERENCE: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from libc.string cimport memcmp from .data_structures cimport * diff --git a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx index 78fcb36ce6f..2af474f9401 100644 --- a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx +++ b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx @@ -181,8 +181,6 @@ REFERENCES: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from copy import copy from cysignals.memory cimport sig_malloc, sig_realloc, sig_free diff --git a/src/sage/groups/perm_gps/permgroup_element.pyx b/src/sage/groups/perm_gps/permgroup_element.pyx index 893ebfbb3d5..f2630b01a66 100644 --- a/src/sage/groups/perm_gps/permgroup_element.pyx +++ b/src/sage/groups/perm_gps/permgroup_element.pyx @@ -99,8 +99,6 @@ We create element of a permutation group of large degree:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - import copy import random diff --git a/src/sage/interfaces/process.pyx b/src/sage/interfaces/process.pyx index cd1eb0d5958..f289b14c8c9 100644 --- a/src/sage/interfaces/process.pyx +++ b/src/sage/interfaces/process.pyx @@ -11,7 +11,6 @@ Utilities for subprocess management. # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import errno import signal diff --git a/src/sage/lfunctions/zero_sums.pyx b/src/sage/lfunctions/zero_sums.pyx index e61d1b9172b..3a0bb20caa3 100644 --- a/src/sage/lfunctions/zero_sums.pyx +++ b/src/sage/lfunctions/zero_sums.pyx @@ -17,7 +17,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from sage.structure.sage_object cimport SageObject from sage.rings.integer_ring import ZZ diff --git a/src/sage/libs/ecl.pyx b/src/sage/libs/ecl.pyx index ee5cc783550..16b4e030613 100644 --- a/src/sage/libs/ecl.pyx +++ b/src/sage/libs/ecl.pyx @@ -9,7 +9,6 @@ Library interface to Embeddable Common Lisp (ECL) # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import #This version of the library interface prefers to convert ECL integers and #rationals to SAGE types Integer and Rational. These parts could easily be diff --git a/src/sage/libs/eclib/homspace.pyx b/src/sage/libs/eclib/homspace.pyx index 9de07af4595..b891d77fb8f 100644 --- a/src/sage/libs/eclib/homspace.pyx +++ b/src/sage/libs/eclib/homspace.pyx @@ -1,5 +1,4 @@ "Cremona modular symbols" -from __future__ import absolute_import, print_function from cysignals.signals cimport sig_on, sig_off from cython.operator cimport dereference as deref diff --git a/src/sage/libs/eclib/mat.pyx b/src/sage/libs/eclib/mat.pyx index 49ac89bf99d..b061982110e 100644 --- a/src/sage/libs/eclib/mat.pyx +++ b/src/sage/libs/eclib/mat.pyx @@ -1,7 +1,6 @@ """ Cremona matrices """ -from __future__ import print_function from ..eclib cimport scalar, addscalar diff --git a/src/sage/libs/eclib/mwrank.pyx b/src/sage/libs/eclib/mwrank.pyx index 6f7dbbe9077..b82831dc5fd 100644 --- a/src/sage/libs/eclib/mwrank.pyx +++ b/src/sage/libs/eclib/mwrank.pyx @@ -19,8 +19,6 @@ EXAMPLES:: [[1:2:1]] """ -from __future__ import print_function, absolute_import - import os import sys diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx index 5bb9efda608..8114ae97cb8 100644 --- a/src/sage/libs/fes.pyx +++ b/src/sage/libs/fes.pyx @@ -62,8 +62,6 @@ REFERENCES: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from libc.stdint cimport uint64_t from cysignals.memory cimport sig_calloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/flint/flint.pyx b/src/sage/libs/flint/flint.pyx index 276e233d46d..09b0693ff51 100644 --- a/src/sage/libs/flint/flint.pyx +++ b/src/sage/libs/flint/flint.pyx @@ -16,7 +16,6 @@ We verify that :trac:`6919` is correctly fixed:: sage: a == b True """ -from __future__ import absolute_import # cimport all .pxd files to make sure they compile cimport sage.libs.flint.arith diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx index b8668371f57..0fbb62da782 100644 --- a/src/sage/libs/gap/element.pyx +++ b/src/sage/libs/gap/element.pyx @@ -16,8 +16,6 @@ elements. For general information about GAP, you should read the # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function - from cpython.object cimport Py_EQ, Py_NE, Py_LE, Py_GE, Py_LT, Py_GT from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/gap/libgap.pyx b/src/sage/libs/gap/libgap.pyx index 3e5928f9145..b492ff467bd 100644 --- a/src/sage/libs/gap/libgap.pyx +++ b/src/sage/libs/gap/libgap.pyx @@ -211,8 +211,6 @@ AUTHORS: # ############################################################################## -from __future__ import print_function, absolute_import - from .gap_includes cimport * from .util cimport * from .element cimport * diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx index aa99c52ac71..6446c57f317 100644 --- a/src/sage/libs/gap/util.pyx +++ b/src/sage/libs/gap/util.pyx @@ -12,8 +12,6 @@ Utility functions for GAP # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import - from libc.signal cimport signal, SIGCHLD, SIG_DFL from posix.dlfcn cimport dlopen, dlclose, RTLD_NOW, RTLD_GLOBAL diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pyx b/src/sage/libs/lcalc/lcalc_Lfunction.pyx index c572b4216bf..a90d2e5d6be 100644 --- a/src/sage/libs/lcalc/lcalc_Lfunction.pyx +++ b/src/sage/libs/lcalc/lcalc_Lfunction.pyx @@ -20,7 +20,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/libecm.pyx b/src/sage/libs/libecm.pyx index 3d2ba80bae4..41a788aca3f 100644 --- a/src/sage/libs/libecm.pyx +++ b/src/sage/libs/libecm.pyx @@ -43,8 +43,6 @@ EXAMPLES:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.signals cimport sig_on, sig_off from sage.libs.gmp.mpz cimport * diff --git a/src/sage/libs/linbox/linbox_flint_interface.pyx b/src/sage/libs/linbox/linbox_flint_interface.pyx index 4c209fb9b03..337cdf65754 100644 --- a/src/sage/libs/linbox/linbox_flint_interface.pyx +++ b/src/sage/libs/linbox/linbox_flint_interface.pyx @@ -33,8 +33,6 @@ and C. Pernet. The functions available are: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from sage.libs.gmp.types cimport mpz_t, mpz_srcptr, mpz_ptr from sage.libs.gmp.mpz cimport mpz_set from sage.libs.flint.types cimport fmpz, fmpz_t diff --git a/src/sage/libs/mpmath/ext_impl.pyx b/src/sage/libs/mpmath/ext_impl.pyx index 576da16d9ed..7a8c8ae73ed 100644 --- a/src/sage/libs/mpmath/ext_impl.pyx +++ b/src/sage/libs/mpmath/ext_impl.pyx @@ -25,8 +25,6 @@ See if :trac:`15118` is fixed:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cpython.int cimport * from cpython.long cimport * from cpython.float cimport * diff --git a/src/sage/libs/mpmath/ext_libmp.pyx b/src/sage/libs/mpmath/ext_libmp.pyx index 35fb7462019..22c608fda56 100644 --- a/src/sage/libs/mpmath/ext_libmp.pyx +++ b/src/sage/libs/mpmath/ext_libmp.pyx @@ -1,7 +1,6 @@ """ Faster versions of some key functions in mpmath.libmp. """ -from __future__ import print_function, absolute_import from .ext_impl cimport * from sage.libs.gmp.all cimport * diff --git a/src/sage/libs/mpmath/ext_main.pyx b/src/sage/libs/mpmath/ext_main.pyx index fada430b7c9..8c7a95ce3d9 100644 --- a/src/sage/libs/mpmath/ext_main.pyx +++ b/src/sage/libs/mpmath/ext_main.pyx @@ -14,8 +14,6 @@ context class, and related utilities. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cpython.int cimport * from cpython.long cimport * from cpython.float cimport * diff --git a/src/sage/libs/mpmath/utils.pyx b/src/sage/libs/mpmath/utils.pyx index 63cb2c4972b..f1a4740aed2 100644 --- a/src/sage/libs/mpmath/utils.pyx +++ b/src/sage/libs/mpmath/utils.pyx @@ -3,7 +3,6 @@ Utilities for Sage-mpmath interaction Also patches some mpmath functions for speed """ -from __future__ import print_function, absolute_import from sage.ext.stdsage cimport PY_NEW diff --git a/src/sage/libs/ntl/ntl_GF2.pyx b/src/sage/libs/ntl/ntl_GF2.pyx index c7083501620..5aa701f451f 100644 --- a/src/sage/libs/ntl/ntl_GF2.pyx +++ b/src/sage/libs/ntl/ntl_GF2.pyx @@ -13,8 +13,6 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import division - from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/libs/ntl/ntl_GF2E.pyx b/src/sage/libs/ntl/ntl_GF2E.pyx index 8c0f5583d18..ee6ab1c6adc 100644 --- a/src/sage/libs/ntl/ntl_GF2E.pyx +++ b/src/sage/libs/ntl/ntl_GF2E.pyx @@ -14,8 +14,6 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division - from sage.ext.cplusplus cimport ccrepr include 'misc.pxi' diff --git a/src/sage/libs/ntl/ntl_GF2EContext.pyx b/src/sage/libs/ntl/ntl_GF2EContext.pyx index 68f911fa121..ab0ea3b9d0e 100644 --- a/src/sage/libs/ntl/ntl_GF2EContext.pyx +++ b/src/sage/libs/ntl/ntl_GF2EContext.pyx @@ -12,7 +12,6 @@ # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import include 'misc.pxi' include 'decl.pxi' diff --git a/src/sage/libs/ntl/ntl_GF2EX.pyx b/src/sage/libs/ntl/ntl_GF2EX.pyx index 3b17d720388..19956e0043f 100644 --- a/src/sage/libs/ntl/ntl_GF2EX.pyx +++ b/src/sage/libs/ntl/ntl_GF2EX.pyx @@ -12,7 +12,6 @@ # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/libs/ntl/ntl_GF2X.pyx b/src/sage/libs/ntl/ntl_GF2X.pyx index 9eec2c213eb..19dee747696 100644 --- a/src/sage/libs/ntl/ntl_GF2X.pyx +++ b/src/sage/libs/ntl/ntl_GF2X.pyx @@ -13,7 +13,6 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, division from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/libs/ntl/ntl_ZZ.pyx b/src/sage/libs/ntl/ntl_ZZ.pyx index b504501ca8e..6ee51d44e2a 100644 --- a/src/sage/libs/ntl/ntl_ZZ.pyx +++ b/src/sage/libs/ntl/ntl_ZZ.pyx @@ -12,7 +12,6 @@ # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/libs/ntl/ntl_ZZX.pyx b/src/sage/libs/ntl/ntl_ZZX.pyx index 1ee992279b3..228da080442 100644 --- a/src/sage/libs/ntl/ntl_ZZX.pyx +++ b/src/sage/libs/ntl/ntl_ZZX.pyx @@ -12,7 +12,6 @@ # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import division, print_function, absolute_import from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/ntl/ntl_ZZ_p.pyx b/src/sage/libs/ntl/ntl_ZZ_p.pyx index 50ea48dace6..5dd7b7bad9e 100644 --- a/src/sage/libs/ntl/ntl_ZZ_p.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_p.pyx @@ -12,7 +12,6 @@ # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/libs/ntl/ntl_ZZ_pContext.pyx b/src/sage/libs/ntl/ntl_ZZ_pContext.pyx index 09abc82949c..274500ec0f7 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pContext.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pContext.pyx @@ -12,7 +12,6 @@ # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import include 'misc.pxi' include 'decl.pxi' diff --git a/src/sage/libs/ntl/ntl_ZZ_pE.pyx b/src/sage/libs/ntl/ntl_ZZ_pE.pyx index bbb9ef8c8d3..47bebfcc608 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pE.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pE.pyx @@ -13,8 +13,6 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/libs/ntl/ntl_ZZ_pEX.pyx b/src/sage/libs/ntl/ntl_ZZ_pEX.pyx index 2d4c740fe48..9910523e9b9 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pEX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pEX.pyx @@ -20,7 +20,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import division, absolute_import, print_function from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pyx b/src/sage/libs/ntl/ntl_ZZ_pX.pyx index befb0e6788d..169313e272e 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pyx @@ -12,7 +12,6 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, division, print_function from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/libs/ntl/ntl_lzz_p.pyx b/src/sage/libs/ntl/ntl_lzz_p.pyx index b5cd62502c4..7809288152f 100644 --- a/src/sage/libs/ntl/ntl_lzz_p.pyx +++ b/src/sage/libs/ntl/ntl_lzz_p.pyx @@ -25,8 +25,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division - from cysignals.signals cimport sig_on, sig_off include 'misc.pxi' diff --git a/src/sage/libs/ntl/ntl_lzz_pX.pyx b/src/sage/libs/ntl/ntl_lzz_pX.pyx index f8d45641693..c063e30548b 100644 --- a/src/sage/libs/ntl/ntl_lzz_pX.pyx +++ b/src/sage/libs/ntl/ntl_lzz_pX.pyx @@ -17,8 +17,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division - from cysignals.signals cimport sig_on, sig_off include 'misc.pxi' diff --git a/src/sage/libs/ntl/ntl_mat_GF2E.pyx b/src/sage/libs/ntl/ntl_mat_GF2E.pyx index c48f28dffbc..123dc81e3c0 100644 --- a/src/sage/libs/ntl/ntl_mat_GF2E.pyx +++ b/src/sage/libs/ntl/ntl_mat_GF2E.pyx @@ -22,7 +22,6 @@ # 2006-01: initial version (based on code by William Stein) # ############################################################################## -from __future__ import absolute_import from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr diff --git a/src/sage/libs/pari/convert_flint.pyx b/src/sage/libs/pari/convert_flint.pyx index 270b3e5bea3..4c4be33ccef 100644 --- a/src/sage/libs/pari/convert_flint.pyx +++ b/src/sage/libs/pari/convert_flint.pyx @@ -19,8 +19,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from cysignals.signals cimport sig_on from sage.libs.flint.fmpz cimport fmpz_get_mpz, COEFF_IS_MPZ, COEFF_TO_PTR, fmpz_is_one diff --git a/src/sage/libs/pari/convert_gmp.pyx b/src/sage/libs/pari/convert_gmp.pyx index bb81c785a25..fe23a00cdc7 100644 --- a/src/sage/libs/pari/convert_gmp.pyx +++ b/src/sage/libs/pari/convert_gmp.pyx @@ -20,8 +20,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from cysignals.signals cimport sig_on, sig_off from sage.libs.gmp.all cimport * diff --git a/src/sage/libs/ppl.pyx b/src/sage/libs/ppl.pyx index ca2734b6c62..c8aee8fe7e8 100644 --- a/src/sage/libs/ppl.pyx +++ b/src/sage/libs/ppl.pyx @@ -153,7 +153,7 @@ AUTHORS: # the License, or (at youroption) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function + from sage.misc.superseded import deprecation from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/pynac/constant.pyx b/src/sage/libs/pynac/constant.pyx index 48ce02fc594..31364da5e66 100644 --- a/src/sage/libs/pynac/constant.pyx +++ b/src/sage/libs/pynac/constant.pyx @@ -14,8 +14,6 @@ Wrapper around Pynac's constants # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from .pynac cimport * from sage.symbolic.expression cimport new_Expression_from_GEx from sage.symbolic.ring import SR diff --git a/src/sage/libs/pynac/pynac.pyx b/src/sage/libs/pynac/pynac.pyx index 0dc5b44f3bd..081006a6ae1 100644 --- a/src/sage/libs/pynac/pynac.pyx +++ b/src/sage/libs/pynac/pynac.pyx @@ -13,7 +13,6 @@ Pynac interface # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function from cpython cimport * from libc cimport math diff --git a/src/sage/libs/ratpoints.pyx b/src/sage/libs/ratpoints.pyx index f1da9aa9ea5..33911901166 100644 --- a/src/sage/libs/ratpoints.pyx +++ b/src/sage/libs/ratpoints.pyx @@ -9,8 +9,6 @@ This module is deprecated, use PARI instead:: [[-2, 0], [-2, -1], [-1, 1], [-1, -2], [0, 0], [0, -1], [1, 0], [1, -1], [3, 5], [3, -6], [4, 8], [4, -9], [-3/4, 7/8], [-3/4, -15/8]] """ -from __future__ import print_function - from cysignals.memory cimport sig_malloc, sig_realloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/readline.pyx b/src/sage/libs/readline.pyx index ba186067c24..2012f77191b 100644 --- a/src/sage/libs/readline.pyx +++ b/src/sage/libs/readline.pyx @@ -49,7 +49,7 @@ Finally, clear the current line for the remaining doctests:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function + from sage.cpython.string cimport str_to_bytes, bytes_to_str diff --git a/src/sage/libs/singular/function.pyx b/src/sage/libs/singular/function.pyx index 87342e8a639..29946aed4cb 100644 --- a/src/sage/libs/singular/function.pyx +++ b/src/sage/libs/singular/function.pyx @@ -74,7 +74,6 @@ TESTS:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from libc.string cimport memcpy from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/singular/option.pyx b/src/sage/libs/singular/option.pyx index 6243a179646..edfcb2ef44b 100644 --- a/src/sage/libs/singular/option.pyx +++ b/src/sage/libs/singular/option.pyx @@ -99,7 +99,6 @@ AUTHOR: # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.libs.singular.decl cimport singular_options, singular_verbose_options, Kstd1_deg, Kstd1_mu diff --git a/src/sage/libs/singular/polynomial.pyx b/src/sage/libs/singular/polynomial.pyx index d6829795d5d..1a74c2765dd 100644 --- a/src/sage/libs/singular/polynomial.pyx +++ b/src/sage/libs/singular/polynomial.pyx @@ -15,7 +15,6 @@ AUTHOR: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/singular/ring.pyx b/src/sage/libs/singular/ring.pyx index 5dd992fbb75..44d9efd1755 100644 --- a/src/sage/libs/singular/ring.pyx +++ b/src/sage/libs/singular/ring.pyx @@ -13,7 +13,6 @@ AUTHORS: # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.cpython.string cimport str_to_bytes diff --git a/src/sage/libs/singular/singular.pyx b/src/sage/libs/singular/singular.pyx index 78900675a3d..51251d31578 100644 --- a/src/sage/libs/singular/singular.pyx +++ b/src/sage/libs/singular/singular.pyx @@ -15,7 +15,6 @@ AUTHOR: # (at your option) any later version. # http://www.gnu.org/licenses/ ############################################################################### -from __future__ import print_function, absolute_import include "sage/libs/ntl/decl.pxi" diff --git a/src/sage/matrix/action.pyx b/src/sage/matrix/action.pyx index ee8cee75dd8..2611f9b0aa2 100644 --- a/src/sage/matrix/action.pyx +++ b/src/sage/matrix/action.pyx @@ -59,7 +59,6 @@ AUTHOR: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import operator diff --git a/src/sage/matrix/args.pyx b/src/sage/matrix/args.pyx index 8bb38e43a3c..359a342a191 100644 --- a/src/sage/matrix/args.pyx +++ b/src/sage/matrix/args.pyx @@ -14,8 +14,6 @@ Helpers for creating matrices # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, generator_stop - cimport cython from cpython.sequence cimport PySequence_Fast from cysignals.signals cimport sig_check diff --git a/src/sage/matrix/change_ring.pyx b/src/sage/matrix/change_ring.pyx index 76e7275d5ec..9dfacbff574 100644 --- a/src/sage/matrix/change_ring.pyx +++ b/src/sage/matrix/change_ring.pyx @@ -1,7 +1,6 @@ """ Functions for changing the base ring of matrices quickly. """ -from __future__ import absolute_import from .matrix_space import MatrixSpace from .matrix_real_double_dense cimport Matrix_real_double_dense diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx index 491bf22e627..939e8a6c4f9 100644 --- a/src/sage/matrix/constructor.pyx +++ b/src/sage/matrix/constructor.pyx @@ -14,8 +14,6 @@ General matrix Constructor # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from .args cimport MatrixArgs diff --git a/src/sage/matrix/echelon_matrix.pyx b/src/sage/matrix/echelon_matrix.pyx index bc062747621..1b329b6a423 100644 --- a/src/sage/matrix/echelon_matrix.pyx +++ b/src/sage/matrix/echelon_matrix.pyx @@ -9,7 +9,6 @@ Echelon matrices over finite fields. # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.matrix.matrix0 cimport Matrix diff --git a/src/sage/matrix/matrix0.pyx b/src/sage/matrix/matrix0.pyx index d367a11ef82..c4b7161020c 100644 --- a/src/sage/matrix/matrix0.pyx +++ b/src/sage/matrix/matrix0.pyx @@ -21,7 +21,6 @@ EXAMPLES:: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import from cpython cimport * from cysignals.signals cimport sig_check diff --git a/src/sage/matrix/matrix1.pyx b/src/sage/matrix/matrix1.pyx index e40239b0d26..e1496769507 100644 --- a/src/sage/matrix/matrix1.pyx +++ b/src/sage/matrix/matrix1.pyx @@ -19,8 +19,6 @@ TESTS:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from cpython.sequence cimport PySequence_Fast import sage.modules.free_module diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx index 893eb1aa7ec..9a199b6f1a4 100644 --- a/src/sage/matrix/matrix2.pyx +++ b/src/sage/matrix/matrix2.pyx @@ -33,7 +33,6 @@ AUTHORS: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import, division from cpython cimport * from cysignals.signals cimport sig_check diff --git a/src/sage/matrix/matrix_complex_double_dense.pyx b/src/sage/matrix/matrix_complex_double_dense.pyx index 3e3a85a76b1..fbf27492fdb 100644 --- a/src/sage/matrix/matrix_complex_double_dense.pyx +++ b/src/sage/matrix/matrix_complex_double_dense.pyx @@ -36,7 +36,6 @@ AUTHORS: # The full text of the GPL is available at: # http://www.gnu.org/licenses/ ############################################################################## -from __future__ import absolute_import from sage.rings.complex_double import CDF diff --git a/src/sage/matrix/matrix_cyclo_dense.pyx b/src/sage/matrix/matrix_cyclo_dense.pyx index b60b14b26b3..e472d676d5c 100644 --- a/src/sage/matrix/matrix_cyclo_dense.pyx +++ b/src/sage/matrix/matrix_cyclo_dense.pyx @@ -36,7 +36,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/matrix/matrix_dense.pyx b/src/sage/matrix/matrix_dense.pyx index 960a7a96c79..1ebed3a439c 100644 --- a/src/sage/matrix/matrix_dense.pyx +++ b/src/sage/matrix/matrix_dense.pyx @@ -7,8 +7,6 @@ TESTS:: sage: m = matrix(R,2,[0,a,b,b^2]) sage: TestSuite(m).run() """ -from __future__ import absolute_import -from __future__ import print_function cimport sage.matrix.matrix as matrix diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx index 15cd631bcc6..506bb84a0d9 100644 --- a/src/sage/matrix/matrix_double_dense.pyx +++ b/src/sage/matrix/matrix_double_dense.pyx @@ -43,7 +43,6 @@ TESTS:: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import import math diff --git a/src/sage/matrix/matrix_gap.pyx b/src/sage/matrix/matrix_gap.pyx index a5a453992c0..92d7da402d2 100644 --- a/src/sage/matrix/matrix_gap.pyx +++ b/src/sage/matrix/matrix_gap.pyx @@ -11,8 +11,6 @@ Wrappers on GAP matrices # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import - from sage.libs.gap.libgap import libgap from . import matrix_space from sage.structure.element cimport Matrix diff --git a/src/sage/matrix/matrix_generic_dense.pyx b/src/sage/matrix/matrix_generic_dense.pyx index 41ff970ff51..49322d88ff2 100644 --- a/src/sage/matrix/matrix_generic_dense.pyx +++ b/src/sage/matrix/matrix_generic_dense.pyx @@ -1,7 +1,6 @@ """ Dense Matrices over a general ring """ -from __future__ import absolute_import cimport cython from cpython.list cimport * diff --git a/src/sage/matrix/matrix_generic_sparse.pyx b/src/sage/matrix/matrix_generic_sparse.pyx index 207d98c86b2..fba0f8292be 100644 --- a/src/sage/matrix/matrix_generic_sparse.pyx +++ b/src/sage/matrix/matrix_generic_sparse.pyx @@ -52,7 +52,6 @@ EXAMPLES:: sage: c.is_sparse() True """ -from __future__ import absolute_import cimport sage.matrix.matrix as matrix cimport sage.matrix.matrix_sparse as matrix_sparse diff --git a/src/sage/matrix/matrix_gf2e_dense.pyx b/src/sage/matrix/matrix_gf2e_dense.pyx index a22671f532e..da4a98f32c7 100644 --- a/src/sage/matrix/matrix_gf2e_dense.pyx +++ b/src/sage/matrix/matrix_gf2e_dense.pyx @@ -81,7 +81,6 @@ REFERENCES: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.signals cimport sig_check, sig_on, sig_off diff --git a/src/sage/matrix/matrix_gfpn_dense.pyx b/src/sage/matrix/matrix_gfpn_dense.pyx index 85636aa1c5a..3437c9093ba 100644 --- a/src/sage/matrix/matrix_gfpn_dense.pyx +++ b/src/sage/matrix/matrix_gfpn_dense.pyx @@ -26,7 +26,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import, division from cysignals.memory cimport check_realloc, check_malloc, sig_free from cpython.bytes cimport PyBytes_AsString, PyBytes_FromStringAndSize diff --git a/src/sage/matrix/matrix_integer_dense.pyx b/src/sage/matrix/matrix_integer_dense.pyx index ec666b7b8c8..8ba20d3bbbc 100644 --- a/src/sage/matrix/matrix_integer_dense.pyx +++ b/src/sage/matrix/matrix_integer_dense.pyx @@ -58,8 +58,6 @@ TESTS:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from libc.stdint cimport int64_t from libc.string cimport strcpy, strlen diff --git a/src/sage/matrix/matrix_integer_sparse.pyx b/src/sage/matrix/matrix_integer_sparse.pyx index 4f143103265..735e0bf2f1d 100644 --- a/src/sage/matrix/matrix_integer_sparse.pyx +++ b/src/sage/matrix/matrix_integer_sparse.pyx @@ -25,8 +25,6 @@ TESTS:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from cysignals.memory cimport check_calloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/matrix/matrix_mod2_dense.pyx b/src/sage/matrix/matrix_mod2_dense.pyx index eb642728904..6212e664576 100644 --- a/src/sage/matrix/matrix_mod2_dense.pyx +++ b/src/sage/matrix/matrix_mod2_dense.pyx @@ -99,7 +99,6 @@ TESTS:: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport check_malloc, sig_free from cysignals.signals cimport sig_check, sig_on, sig_str, sig_off diff --git a/src/sage/matrix/matrix_modn_sparse.pyx b/src/sage/matrix/matrix_modn_sparse.pyx index 9b4184fb508..1490123a123 100644 --- a/src/sage/matrix/matrix_modn_sparse.pyx +++ b/src/sage/matrix/matrix_modn_sparse.pyx @@ -78,8 +78,6 @@ TESTS:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from collections import Iterator, Sequence from libc.stdint cimport uint64_t diff --git a/src/sage/matrix/matrix_rational_dense.pyx b/src/sage/matrix/matrix_rational_dense.pyx index 680c0a8a389..ee63c26917c 100644 --- a/src/sage/matrix/matrix_rational_dense.pyx +++ b/src/sage/matrix/matrix_rational_dense.pyx @@ -64,8 +64,6 @@ Test hashing:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from libc.string cimport strcpy, strlen from sage.cpython.string cimport char_to_str, str_to_bytes diff --git a/src/sage/matrix/matrix_rational_sparse.pyx b/src/sage/matrix/matrix_rational_sparse.pyx index afc24f70481..da9c73db7d9 100644 --- a/src/sage/matrix/matrix_rational_sparse.pyx +++ b/src/sage/matrix/matrix_rational_sparse.pyx @@ -24,8 +24,6 @@ TESTS:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from cysignals.signals cimport sig_on, sig_off from cysignals.memory cimport check_calloc, sig_free diff --git a/src/sage/matrix/matrix_real_double_dense.pyx b/src/sage/matrix/matrix_real_double_dense.pyx index a6886b152d3..4cfeac84cf0 100644 --- a/src/sage/matrix/matrix_real_double_dense.pyx +++ b/src/sage/matrix/matrix_real_double_dense.pyx @@ -38,7 +38,6 @@ AUTHORS: # The full text of the GPL is available at: # http://www.gnu.org/licenses/ ############################################################################## -from __future__ import absolute_import from sage.rings.real_double import RDF diff --git a/src/sage/matrix/matrix_sparse.pyx b/src/sage/matrix/matrix_sparse.pyx index 10de0a590ea..ab000709a87 100644 --- a/src/sage/matrix/matrix_sparse.pyx +++ b/src/sage/matrix/matrix_sparse.pyx @@ -10,8 +10,6 @@ Base class for sparse matrices # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - cimport cython from cysignals.memory cimport check_allocarray, sig_free from cysignals.signals cimport sig_check diff --git a/src/sage/matrix/matrix_symbolic_dense.pyx b/src/sage/matrix/matrix_symbolic_dense.pyx index 1996b2a8857..2065a61e844 100644 --- a/src/sage/matrix/matrix_symbolic_dense.pyx +++ b/src/sage/matrix/matrix_symbolic_dense.pyx @@ -153,7 +153,6 @@ Check that :trac:`12778` is fixed:: sage: parent(M) Full MatrixSpace of 3 by 4 dense matrices over Symbolic Ring """ -from __future__ import absolute_import from sage.rings.polynomial.all import PolynomialRing from sage.structure.element cimport ModuleElement, RingElement, Element diff --git a/src/sage/matrix/misc.pyx b/src/sage/matrix/misc.pyx index 1cbbd94c365..c3b833eb10b 100644 --- a/src/sage/matrix/misc.pyx +++ b/src/sage/matrix/misc.pyx @@ -9,7 +9,6 @@ existence of this file -- is now a non-issue, since some bugs in Cython were fixed. Probably all this code should be moved into the relevant classes and this file deleted. """ -from __future__ import absolute_import from cysignals.signals cimport sig_check diff --git a/src/sage/matrix/strassen.pyx b/src/sage/matrix/strassen.pyx index 5b87046c3f3..18089543d64 100644 --- a/src/sage/matrix/strassen.pyx +++ b/src/sage/matrix/strassen.pyx @@ -14,7 +14,6 @@ multiplication algorithms. # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from .matrix_window cimport MatrixWindow diff --git a/src/sage/matroids/basis_exchange_matroid.pyx b/src/sage/matroids/basis_exchange_matroid.pyx index c0045a364a5..b280bc7f434 100644 --- a/src/sage/matroids/basis_exchange_matroid.pyx +++ b/src/sage/matroids/basis_exchange_matroid.pyx @@ -37,7 +37,6 @@ Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import include 'sage/data_structures/bitset.pxi' diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index e19830d7a78..04d3bd2f0dd 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -71,7 +71,6 @@ Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import include 'sage/data_structures/bitset.pxi' diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index 70ad85c5718..b46e32faa28 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -65,7 +65,6 @@ Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.structure.richcmp cimport rich_to_bool, richcmp from .matroid cimport Matroid diff --git a/src/sage/matroids/extension.pyx b/src/sage/matroids/extension.pyx index 64cfb36c553..c0156678def 100644 --- a/src/sage/matroids/extension.pyx +++ b/src/sage/matroids/extension.pyx @@ -28,7 +28,6 @@ Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function include 'sage/data_structures/bitset.pxi' from .basis_matroid cimport BasisMatroid diff --git a/src/sage/matroids/lean_matrix.pyx b/src/sage/matroids/lean_matrix.pyx index d041c1af00a..cf7d4db0b09 100644 --- a/src/sage/matroids/lean_matrix.pyx +++ b/src/sage/matroids/lean_matrix.pyx @@ -29,7 +29,6 @@ AUTHORS: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import include 'sage/data_structures/bitset.pxi' from libc.string cimport memcpy, memset diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index 4113a8a13ec..45958353936 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -108,7 +108,6 @@ Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import include 'sage/data_structures/bitset.pxi' from cpython.object cimport Py_EQ, Py_NE diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 2b698d7a1fd..51e394d9952 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -327,7 +327,6 @@ Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cpython.object cimport Py_EQ, Py_NE diff --git a/src/sage/matroids/set_system.pyx b/src/sage/matroids/set_system.pyx index 62cfc4d359a..b4f9a7fd368 100644 --- a/src/sage/matroids/set_system.pyx +++ b/src/sage/matroids/set_system.pyx @@ -25,7 +25,6 @@ Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from cysignals.memory cimport check_allocarray, check_reallocarray, sig_free include 'sage/data_structures/bitset.pxi' diff --git a/src/sage/matroids/union_matroid.pyx b/src/sage/matroids/union_matroid.pyx index 96052420b99..89991b65af2 100644 --- a/src/sage/matroids/union_matroid.pyx +++ b/src/sage/matroids/union_matroid.pyx @@ -1,4 +1,3 @@ -from __future__ import absolute_import from .matroid cimport Matroid diff --git a/src/sage/matroids/unpickling.pyx b/src/sage/matroids/unpickling.pyx index 05cc6100738..841e82d1c8f 100644 --- a/src/sage/matroids/unpickling.pyx +++ b/src/sage/matroids/unpickling.pyx @@ -24,7 +24,6 @@ AUTHORS: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import include 'sage/data_structures/bitset.pxi' import sage.matroids.matroid diff --git a/src/sage/misc/binary_tree.pyx b/src/sage/misc/binary_tree.pyx index b4b60453a1f..0a2131298b8 100644 --- a/src/sage/misc/binary_tree.pyx +++ b/src/sage/misc/binary_tree.pyx @@ -7,7 +7,6 @@ AUTHORS: - Tom Boothby (2007-02-15). Initial version free for any use (public domain). """ -from __future__ import print_function from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/misc/cachefunc.pyx b/src/sage/misc/cachefunc.pyx index 4d9a6fed93e..3db839c7bf3 100644 --- a/src/sage/misc/cachefunc.pyx +++ b/src/sage/misc/cachefunc.pyx @@ -414,7 +414,6 @@ the parent as its first argument:: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import cdef extern from "methodobject.h": cdef int METH_NOARGS, METH_O diff --git a/src/sage/misc/citation.pyx b/src/sage/misc/citation.pyx index 3145a599f38..2de53c19053 100644 --- a/src/sage/misc/citation.pyx +++ b/src/sage/misc/citation.pyx @@ -2,7 +2,6 @@ """ Dependency usage tracking for citations """ -from __future__ import absolute_import from sage.misc.all import tmp_filename from sage.env import SAGE_LOCAL diff --git a/src/sage/misc/classcall_metaclass.pyx b/src/sage/misc/classcall_metaclass.pyx index 25eac5b0204..025efb36812 100644 --- a/src/sage/misc/classcall_metaclass.pyx +++ b/src/sage/misc/classcall_metaclass.pyx @@ -19,7 +19,6 @@ AUTHORS: # (at your option) any later version. # https://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from cpython.object cimport * from cpython.type cimport type as pytype diff --git a/src/sage/misc/fast_methods.pyx b/src/sage/misc/fast_methods.pyx index 99d7c553125..1165b7caccc 100644 --- a/src/sage/misc/fast_methods.pyx +++ b/src/sage/misc/fast_methods.pyx @@ -28,8 +28,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from sage.misc.classcall_metaclass import ClasscallMetaclass, typecall from sage.misc.constant_function import ConstantFunction diff --git a/src/sage/misc/fpickle.pyx b/src/sage/misc/fpickle.pyx index 2f4fed80caf..93f18854397 100644 --- a/src/sage/misc/fpickle.pyx +++ b/src/sage/misc/fpickle.pyx @@ -5,7 +5,6 @@ Function pickling REFERENCE: The python cookbook. """ -from __future__ import absolute_import import types import six diff --git a/src/sage/misc/function_mangling.pyx b/src/sage/misc/function_mangling.pyx index 93d2b9fd34c..0ac03cf0715 100644 --- a/src/sage/misc/function_mangling.pyx +++ b/src/sage/misc/function_mangling.pyx @@ -36,7 +36,6 @@ AUTHORS: - Simon King (2011): Use Cython. Speedup of ``fix_to_pos``, cleaning documentation. """ -from __future__ import print_function from sage.misc.sageinspect import sage_getargspec diff --git a/src/sage/misc/lazy_attribute.pyx b/src/sage/misc/lazy_attribute.pyx index 0b8e7a61d2c..f9191797377 100644 --- a/src/sage/misc/lazy_attribute.pyx +++ b/src/sage/misc/lazy_attribute.pyx @@ -21,8 +21,6 @@ AUTHORS: # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function - cdef class _lazy_attribute(object): """ diff --git a/src/sage/misc/lazy_import.pyx b/src/sage/misc/lazy_import.pyx index 4233a3287da..0fb97f04858 100644 --- a/src/sage/misc/lazy_import.pyx +++ b/src/sage/misc/lazy_import.pyx @@ -54,7 +54,6 @@ AUTHOR: # Keep OLD division semantics for Python 2 compatibility, such that # lazy imports support old and true division. -from __future__ import absolute_import cimport cython from cpython.object cimport PyObject_RichCompare diff --git a/src/sage/misc/lazy_list.pyx b/src/sage/misc/lazy_list.pyx index 30ebdc79142..539c2bd7135 100644 --- a/src/sage/misc/lazy_list.pyx +++ b/src/sage/misc/lazy_list.pyx @@ -103,7 +103,6 @@ Classes and Methods # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function cdef extern from "Python.h": Py_ssize_t PY_SSIZE_T_MAX diff --git a/src/sage/misc/lazy_string.pyx b/src/sage/misc/lazy_string.pyx index bbf9497b135..a731d861981 100644 --- a/src/sage/misc/lazy_string.pyx +++ b/src/sage/misc/lazy_string.pyx @@ -61,7 +61,6 @@ Note that the function is recomputed each time:: #THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT #(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE #OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function, absolute_import from cpython.object cimport PyObject_Call, PyObject_RichCompare diff --git a/src/sage/misc/misc_c.pyx b/src/sage/misc/misc_c.pyx index d45327a9985..a22db16a03f 100644 --- a/src/sage/misc/misc_c.pyx +++ b/src/sage/misc/misc_c.pyx @@ -22,7 +22,6 @@ AUTHORS: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import import sys diff --git a/src/sage/misc/nested_class.pyx b/src/sage/misc/nested_class.pyx index c197486e314..b164a049108 100644 --- a/src/sage/misc/nested_class.pyx +++ b/src/sage/misc/nested_class.pyx @@ -99,7 +99,6 @@ All of this is not perfect. In the following scenario:: The name for ``"A1.A2"`` could potentially be set to ``"B1.A2"``. But that will work anyway. """ -from __future__ import print_function, absolute_import import sys cdef dict sys_modules = sys.modules diff --git a/src/sage/misc/parser.pyx b/src/sage/misc/parser.pyx index 3b4c6b1686b..f6da5f1ce29 100644 --- a/src/sage/misc/parser.pyx +++ b/src/sage/misc/parser.pyx @@ -19,7 +19,6 @@ AUTHOR: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from libc.string cimport strchr from cpython.bytes cimport PyBytes_FromStringAndSize diff --git a/src/sage/misc/persist.pyx b/src/sage/misc/persist.pyx index b413db13018..21b1de0c247 100644 --- a/src/sage/misc/persist.pyx +++ b/src/sage/misc/persist.pyx @@ -26,7 +26,6 @@ save member functions and commands. - Objects are zlib compressed for space efficiency. """ -from __future__ import absolute_import import io import os diff --git a/src/sage/misc/pickle_old.pyx b/src/sage/misc/pickle_old.pyx index 87927c0889a..29dc1add948 100644 --- a/src/sage/misc/pickle_old.pyx +++ b/src/sage/misc/pickle_old.pyx @@ -1,4 +1,3 @@ -from __future__ import absolute_import from sage.misc.superseded import deprecation import sage.rings.fraction_field_element diff --git a/src/sage/misc/randstate.pyx b/src/sage/misc/randstate.pyx index 0e13d604542..3a845fbabbf 100644 --- a/src/sage/misc/randstate.pyx +++ b/src/sage/misc/randstate.pyx @@ -407,7 +407,6 @@ Otherwise, it depends on what random number generator you want to use. Classes and methods =================== """ -from __future__ import absolute_import cdef extern from "stdlib.h": long c_libc_random "random"() diff --git a/src/sage/misc/reset.pyx b/src/sage/misc/reset.pyx index 902b51c7fe0..487873b1b4c 100644 --- a/src/sage/misc/reset.pyx +++ b/src/sage/misc/reset.pyx @@ -2,7 +2,6 @@ """ Interpreter reset """ -from __future__ import absolute_import import sys diff --git a/src/sage/misc/sage_timeit_class.pyx b/src/sage/misc/sage_timeit_class.pyx index 99723d506dc..d6b038c9de9 100644 --- a/src/sage/misc/sage_timeit_class.pyx +++ b/src/sage/misc/sage_timeit_class.pyx @@ -5,7 +5,6 @@ The ``timeit`` command This uses the function :func:`~sage.misc.sage_timeit.sage_timeit`. """ -from __future__ import absolute_import from . import sage_timeit diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index c030fb42406..782ad7727e8 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -2246,7 +2246,7 @@ def sage_getsourcelines(obj): sage: from sage.misc.sageinspect import sage_getsourcelines sage: sage_getsourcelines(matrix)[1] - 22 + 20 sage: sage_getsourcelines(matrix)[0][0] 'def matrix(*args, **kwds):\n' diff --git a/src/sage/misc/search.pyx b/src/sage/misc/search.pyx index c1b9cb4fc83..a9e7149113e 100644 --- a/src/sage/misc/search.pyx +++ b/src/sage/misc/search.pyx @@ -21,7 +21,6 @@ extra comparison. Also, the function names make more sense. # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import import bisect diff --git a/src/sage/misc/session.pyx b/src/sage/misc/session.pyx index 8d7e05e5d1b..9e600373a49 100644 --- a/src/sage/misc/session.pyx +++ b/src/sage/misc/session.pyx @@ -57,7 +57,6 @@ AUTHOR: # The full text of the GPL is available at: # http://www.gnu.org/licenses/ ############################################################################# -from __future__ import print_function, absolute_import # Standard python imports import os diff --git a/src/sage/misc/stopgap.pyx b/src/sage/misc/stopgap.pyx index c4ca7b517db..555d80915b6 100644 --- a/src/sage/misc/stopgap.pyx +++ b/src/sage/misc/stopgap.pyx @@ -11,7 +11,6 @@ Stopgaps # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import warnings diff --git a/src/sage/misc/weak_dict.pyx b/src/sage/misc/weak_dict.pyx index 48122f291c4..0dc1d203cfe 100644 --- a/src/sage/misc/weak_dict.pyx +++ b/src/sage/misc/weak_dict.pyx @@ -117,7 +117,6 @@ See :trac:`13394` for a discussion of some of the design considerations. # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function import weakref import six diff --git a/src/sage/modular/arithgroup/arithgroup_element.pyx b/src/sage/modular/arithgroup/arithgroup_element.pyx index 19fbe618b22..61875fc6161 100644 --- a/src/sage/modular/arithgroup/arithgroup_element.pyx +++ b/src/sage/modular/arithgroup/arithgroup_element.pyx @@ -13,7 +13,6 @@ Elements of Arithmetic Subgroups # https://www.gnu.org/licenses/ # ################################################################################ -from __future__ import absolute_import from sage.structure.element cimport MultiplicativeGroupElement, MonoidElement, Element from sage.structure.richcmp cimport richcmp diff --git a/src/sage/modular/arithgroup/congroup.pyx b/src/sage/modular/arithgroup/congroup.pyx index 45c8219ae27..cc6c8a557c0 100644 --- a/src/sage/modular/arithgroup/congroup.pyx +++ b/src/sage/modular/arithgroup/congroup.pyx @@ -14,8 +14,6 @@ functions are for internal use by routines elsewhere in the Sage library. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from cysignals.memory cimport check_allocarray, sig_free import random diff --git a/src/sage/modular/arithgroup/farey_symbol.pyx b/src/sage/modular/arithgroup/farey_symbol.pyx index f216975c5fa..5924f08fd92 100644 --- a/src/sage/modular/arithgroup/farey_symbol.pyx +++ b/src/sage/modular/arithgroup/farey_symbol.pyx @@ -20,8 +20,6 @@ for speed. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division - from cpython.object cimport PyObject_RichCompare from itertools import groupby from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/modular/modsym/heilbronn.pyx b/src/sage/modular/modsym/heilbronn.pyx index 9d3bc0f3e89..823458318e3 100644 --- a/src/sage/modular/modsym/heilbronn.pyx +++ b/src/sage/modular/modsym/heilbronn.pyx @@ -15,7 +15,6 @@ Heilbronn matrix computation # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport check_allocarray, sig_malloc, sig_free from cysignals.signals cimport sig_on, sig_off, sig_check diff --git a/src/sage/modular/modsym/p1list.pyx b/src/sage/modular/modsym/p1list.pyx index 52d95115bc8..841b920f68e 100644 --- a/src/sage/modular/modsym/p1list.pyx +++ b/src/sage/modular/modsym/p1list.pyx @@ -1,7 +1,6 @@ r""" Lists of Manin symbols (elements of `\mathbb{P}^1(\ZZ/N\ZZ)`) over `\QQ` """ -from __future__ import absolute_import from cysignals.memory cimport check_allocarray, sig_free from cysignals.signals cimport sig_check diff --git a/src/sage/modular/modsym/relation_matrix_pyx.pyx b/src/sage/modular/modsym/relation_matrix_pyx.pyx index 808a4ff4295..cb1f0419873 100644 --- a/src/sage/modular/modsym/relation_matrix_pyx.pyx +++ b/src/sage/modular/modsym/relation_matrix_pyx.pyx @@ -8,7 +8,6 @@ Optimized Cython code for computing relation matrices in certain cases. # The full text of the GPL is available at: # https://www.gnu.org/licenses/ ############################################################################# -from __future__ import absolute_import import sage.misc.misc as misc from sage.rings.rational cimport Rational diff --git a/src/sage/modular/pollack_stevens/dist.pyx b/src/sage/modular/pollack_stevens/dist.pyx index 65153849a4b..fba0e43f392 100644 --- a/src/sage/modular/pollack_stevens/dist.pyx +++ b/src/sage/modular/pollack_stevens/dist.pyx @@ -24,7 +24,6 @@ REFERENCES: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from sage.structure.sage_object cimport SageObject from sage.structure.richcmp cimport richcmp_not_equal, rich_to_bool diff --git a/src/sage/modules/finite_submodule_iter.pyx b/src/sage/modules/finite_submodule_iter.pyx index 83764ba97ec..eb433546f23 100644 --- a/src/sage/modules/finite_submodule_iter.pyx +++ b/src/sage/modules/finite_submodule_iter.pyx @@ -64,8 +64,6 @@ will result in improved running times:: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - cdef class FiniteZZsubmodule_iterator: r""" diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx index d47607707e8..d2a68bcfa37 100644 --- a/src/sage/modules/free_module_element.pyx +++ b/src/sage/modules/free_module_element.pyx @@ -109,7 +109,6 @@ This is a test from :trac:`20211`:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import cimport cython from cpython.slice cimport PySlice_GetIndicesEx diff --git a/src/sage/modules/vector_complex_double_dense.pyx b/src/sage/modules/vector_complex_double_dense.pyx index 95da06bd693..1a690e95184 100644 --- a/src/sage/modules/vector_complex_double_dense.pyx +++ b/src/sage/modules/vector_complex_double_dense.pyx @@ -39,7 +39,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.rings.complex_double import CDF diff --git a/src/sage/modules/vector_double_dense.pyx b/src/sage/modules/vector_double_dense.pyx index 2badf982848..c5a027a3448 100644 --- a/src/sage/modules/vector_double_dense.pyx +++ b/src/sage/modules/vector_double_dense.pyx @@ -40,7 +40,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import cimport numpy import numpy diff --git a/src/sage/modules/vector_integer_dense.pyx b/src/sage/modules/vector_integer_dense.pyx index 45529a95f09..02d6a840995 100644 --- a/src/sage/modules/vector_integer_dense.pyx +++ b/src/sage/modules/vector_integer_dense.pyx @@ -52,7 +52,6 @@ TESTS:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport check_allocarray, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/modules/vector_mod2_dense.pyx b/src/sage/modules/vector_mod2_dense.pyx index 31ea3e161b3..ee394565334 100644 --- a/src/sage/modules/vector_mod2_dense.pyx +++ b/src/sage/modules/vector_mod2_dense.pyx @@ -33,7 +33,6 @@ TESTS:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.rings.finite_rings.integer_mod cimport IntegerMod_int, IntegerMod_abstract from sage.rings.integer cimport Integer diff --git a/src/sage/modules/vector_modn_dense.pyx b/src/sage/modules/vector_modn_dense.pyx index 1b1ae62a262..7095226a700 100644 --- a/src/sage/modules/vector_modn_dense.pyx +++ b/src/sage/modules/vector_modn_dense.pyx @@ -111,7 +111,6 @@ AUTHOR: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport check_allocarray, sig_free diff --git a/src/sage/modules/vector_rational_dense.pyx b/src/sage/modules/vector_rational_dense.pyx index 5efa8269465..8aac5009671 100644 --- a/src/sage/modules/vector_rational_dense.pyx +++ b/src/sage/modules/vector_rational_dense.pyx @@ -54,8 +54,6 @@ TESTS:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.memory cimport check_allocarray, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/modules/vector_real_double_dense.pyx b/src/sage/modules/vector_real_double_dense.pyx index 9f96f23af38..045c0e02620 100644 --- a/src/sage/modules/vector_real_double_dense.pyx +++ b/src/sage/modules/vector_real_double_dense.pyx @@ -30,7 +30,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.rings.real_double import RDF diff --git a/src/sage/modules/with_basis/indexed_element.pyx b/src/sage/modules/with_basis/indexed_element.pyx index 6e57c1b96cc..95bfa10e3d9 100644 --- a/src/sage/modules/with_basis/indexed_element.pyx +++ b/src/sage/modules/with_basis/indexed_element.pyx @@ -17,8 +17,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from sage.structure.element cimport parent from sage.structure.richcmp cimport richcmp, rich_to_bool from cpython.object cimport Py_NE, Py_EQ diff --git a/src/sage/numerical/backends/coin_backend.pyx b/src/sage/numerical/backends/coin_backend.pyx index d012f8a9d21..a8b191ed502 100644 --- a/src/sage/numerical/backends/coin_backend.pyx +++ b/src/sage/numerical/backends/coin_backend.pyx @@ -20,8 +20,6 @@ AUTHORS: # https://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import - from cysignals.memory cimport check_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/numerical/backends/cvxopt_backend.pyx b/src/sage/numerical/backends/cvxopt_backend.pyx index 419c5f69cbd..4c3f4e1757d 100644 --- a/src/sage/numerical/backends/cvxopt_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_backend.pyx @@ -16,7 +16,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.numerical.mip import MIPSolverException from .generic_backend cimport GenericBackend diff --git a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx index 8f6c97e979e..6eb9eebe14b 100644 --- a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx @@ -18,7 +18,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.numerical.sdp import SDPSolverException from sage.matrix.all import Matrix diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 18ad51acc63..646c16dc75f 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -29,8 +29,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from copy import copy cdef class GenericBackend: diff --git a/src/sage/numerical/backends/generic_sdp_backend.pyx b/src/sage/numerical/backends/generic_sdp_backend.pyx index 33b27eb2416..0af4a9317a8 100644 --- a/src/sage/numerical/backends/generic_sdp_backend.pyx +++ b/src/sage/numerical/backends/generic_sdp_backend.pyx @@ -26,8 +26,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - cdef class GenericSDPBackend: diff --git a/src/sage/numerical/backends/glpk_backend.pyx b/src/sage/numerical/backends/glpk_backend.pyx index 55ac3485bf1..130eb44e38b 100644 --- a/src/sage/numerical/backends/glpk_backend.pyx +++ b/src/sage/numerical/backends/glpk_backend.pyx @@ -18,7 +18,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from cysignals.memory cimport sig_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/numerical/backends/glpk_exact_backend.pyx b/src/sage/numerical/backends/glpk_exact_backend.pyx index 7a76667ea77..078f72ac4be 100644 --- a/src/sage/numerical/backends/glpk_exact_backend.pyx +++ b/src/sage/numerical/backends/glpk_exact_backend.pyx @@ -13,7 +13,6 @@ AUTHORS: # The full text of the GPL is available at: # http://www.gnu.org/licenses/ ############################################################################## -from __future__ import absolute_import cdef class GLPKExactBackend(GLPKBackend): diff --git a/src/sage/numerical/backends/glpk_graph_backend.pyx b/src/sage/numerical/backends/glpk_graph_backend.pyx index facff9ead2b..a248591d405 100644 --- a/src/sage/numerical/backends/glpk_graph_backend.pyx +++ b/src/sage/numerical/backends/glpk_graph_backend.pyx @@ -68,8 +68,6 @@ Classes and methods # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.memory cimport check_allocarray, sig_free from sage.cpython.string cimport str_to_bytes, char_to_str diff --git a/src/sage/numerical/backends/gurobi_backend.pyx b/src/sage/numerical/backends/gurobi_backend.pyx index 74e6e52001c..fe98d7a5f90 100644 --- a/src/sage/numerical/backends/gurobi_backend.pyx +++ b/src/sage/numerical/backends/gurobi_backend.pyx @@ -29,8 +29,6 @@ Methods # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from cysignals.memory cimport sig_malloc, sig_free from sage.cpython.string cimport char_to_str, str_to_bytes diff --git a/src/sage/numerical/backends/interactivelp_backend.pyx b/src/sage/numerical/backends/interactivelp_backend.pyx index dafc8472489..8f0a042f73b 100644 --- a/src/sage/numerical/backends/interactivelp_backend.pyx +++ b/src/sage/numerical/backends/interactivelp_backend.pyx @@ -18,7 +18,6 @@ AUTHORS: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function from sage.numerical.mip import MIPSolverException from sage.numerical.interactive_simplex_method import InteractiveLPProblem, default_variable_name diff --git a/src/sage/numerical/backends/ppl_backend.pyx b/src/sage/numerical/backends/ppl_backend.pyx index c01ade1ba9c..6769082385c 100644 --- a/src/sage/numerical/backends/ppl_backend.pyx +++ b/src/sage/numerical/backends/ppl_backend.pyx @@ -18,7 +18,6 @@ AUTHORS: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.numerical.mip import MIPSolverException from ppl import MIP_Problem, Variable, Variables_Set, Linear_Expression, Constraint, Generator diff --git a/src/sage/numerical/gauss_legendre.pyx b/src/sage/numerical/gauss_legendre.pyx index 4d7292e0601..cb71b558f95 100644 --- a/src/sage/numerical/gauss_legendre.pyx +++ b/src/sage/numerical/gauss_legendre.pyx @@ -31,7 +31,7 @@ optimized routine to compute the nodes. #want to we can optimize this further, probably to a point where #we don't have to bother with node computation routines that have a better order #than this naive approach (which is quadratic) -from __future__ import absolute_import, division, print_function + from sage.libs.mpfr cimport * import math from sage.rings.real_mpfr import RealField diff --git a/src/sage/numerical/linear_functions.pyx b/src/sage/numerical/linear_functions.pyx index cd0e11457a4..b7e8fcf6666 100644 --- a/src/sage/numerical/linear_functions.pyx +++ b/src/sage/numerical/linear_functions.pyx @@ -100,7 +100,6 @@ See :trac:`12091`:: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function from cpython.object cimport Py_EQ, Py_GE, Py_LE, Py_GT, Py_LT diff --git a/src/sage/numerical/mip.pyx b/src/sage/numerical/mip.pyx index cfa53149b71..69f2f7d0ccd 100644 --- a/src/sage/numerical/mip.pyx +++ b/src/sage/numerical/mip.pyx @@ -232,7 +232,6 @@ AUTHORS: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function from copy import copy from sage.structure.parent cimport Parent diff --git a/src/sage/numerical/sdp.pyx b/src/sage/numerical/sdp.pyx index 0697e0d2392..f69798888ec 100644 --- a/src/sage/numerical/sdp.pyx +++ b/src/sage/numerical/sdp.pyx @@ -217,7 +217,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.structure.parent cimport Parent from sage.structure.element cimport Element diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx index d8fae1bdf07..e4a8c7fcae3 100644 --- a/src/sage/plot/complex_plot.pyx +++ b/src/sage/plot/complex_plot.pyx @@ -15,7 +15,6 @@ Complex Plots # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, division # TODO: use NumPy buffers and complex fast_callable (when supported) from cysignals.signals cimport sig_on, sig_off, sig_check diff --git a/src/sage/plot/plot3d/base.pyx b/src/sage/plot/plot3d/base.pyx index fbb63a243a8..959bd03029a 100644 --- a/src/sage/plot/plot3d/base.pyx +++ b/src/sage/plot/plot3d/base.pyx @@ -30,7 +30,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cpython.list cimport * from cpython.object cimport PyObject diff --git a/src/sage/plot/plot3d/implicit_surface.pyx b/src/sage/plot/plot3d/implicit_surface.pyx index 8c0fb164581..c55246f6674 100644 --- a/src/sage/plot/plot3d/implicit_surface.pyx +++ b/src/sage/plot/plot3d/implicit_surface.pyx @@ -76,7 +76,6 @@ AUTHORS: # n^3 memory when it reads the JVXL file, but that might be on a different # computer; Tachyon would only allocate memory proportional to the # output size.) -from __future__ import absolute_import cimport numpy as np import numpy as np diff --git a/src/sage/plot/plot3d/index_face_set.pyx b/src/sage/plot/plot3d/index_face_set.pyx index c1d5e3656e1..418d9e1a9d7 100644 --- a/src/sage/plot/plot3d/index_face_set.pyx +++ b/src/sage/plot/plot3d/index_face_set.pyx @@ -30,7 +30,6 @@ AUTHORS: # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import from textwrap import dedent from sage.misc.superseded import deprecation diff --git a/src/sage/plot/plot3d/shapes.pyx b/src/sage/plot/plot3d/shapes.pyx index e5c7516a1de..038453d004f 100644 --- a/src/sage/plot/plot3d/shapes.pyx +++ b/src/sage/plot/plot3d/shapes.pyx @@ -49,7 +49,6 @@ EXAMPLES:: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from libc.math cimport sqrt, sin, cos, tan, asin, acos, atan, M_PI from sage.rings.real_double import RDF diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx index 3290b006953..10b5614680b 100644 --- a/src/sage/probability/probability_distribution.pyx +++ b/src/sage/probability/probability_distribution.pyx @@ -39,7 +39,6 @@ REFERENCES: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import sys from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/quadratic_forms/count_local_2.pyx b/src/sage/quadratic_forms/count_local_2.pyx index 8600f4f91d7..71e07e0c035 100644 --- a/src/sage/quadratic_forms/count_local_2.pyx +++ b/src/sage/quadratic_forms/count_local_2.pyx @@ -1,7 +1,6 @@ r""" Optimised Cython code for counting congruence solutions """ -from __future__ import print_function from sage.arith.all import valuation, kronecker_symbol, is_prime from sage.rings.finite_rings.integer_mod import Mod diff --git a/src/sage/quadratic_forms/ternary.pyx b/src/sage/quadratic_forms/ternary.pyx index f5095198f0f..ec7a00e0919 100644 --- a/src/sage/quadratic_forms/ternary.pyx +++ b/src/sage/quadratic_forms/ternary.pyx @@ -11,8 +11,6 @@ Helper code for ternary quadratic forms # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from sage.rings.integer_ring import ZZ from sage.matrix.constructor import matrix, identity_matrix, diagonal_matrix diff --git a/src/sage/quivers/algebra_elements.pyx b/src/sage/quivers/algebra_elements.pyx index eb8ba72251a..c51316d60b8 100644 --- a/src/sage/quivers/algebra_elements.pyx +++ b/src/sage/quivers/algebra_elements.pyx @@ -15,9 +15,8 @@ AUTHORS: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import division, print_function - include "algebra_elements.pxi" + from sage.misc.cachefunc import cached_method from sage.misc.misc import repr_lincomb from sage.structure.richcmp cimport richcmp_not_equal, rich_to_bool diff --git a/src/sage/quivers/paths.pyx b/src/sage/quivers/paths.pyx index 0cc6564ac2b..84e335d270d 100644 --- a/src/sage/quivers/paths.pyx +++ b/src/sage/quivers/paths.pyx @@ -18,8 +18,6 @@ Quiver Paths # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function - cimport cython from cysignals.signals cimport sig_check, sig_on, sig_off diff --git a/src/sage/rings/bernoulli_mod_p.pyx b/src/sage/rings/bernoulli_mod_p.pyx index 9bf15b6f72a..406dd332811 100644 --- a/src/sage/rings/bernoulli_mod_p.pyx +++ b/src/sage/rings/bernoulli_mod_p.pyx @@ -17,7 +17,6 @@ AUTHOR: # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import cimport sage.rings.fast_arith import sage.rings.fast_arith diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx index ff55f6814bb..524754ddf39 100644 --- a/src/sage/rings/complex_arb.pyx +++ b/src/sage/rings/complex_arb.pyx @@ -141,7 +141,6 @@ Classes and Methods # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import operator, sys, warnings from cysignals.signals cimport sig_on, sig_str, sig_off, sig_error diff --git a/src/sage/rings/complex_double.pyx b/src/sage/rings/complex_double.pyx index ec43d0e1992..3ea4869f608 100644 --- a/src/sage/rings/complex_double.pyx +++ b/src/sage/rings/complex_double.pyx @@ -66,8 +66,6 @@ AUTHORS: # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function - import operator from cpython.object cimport Py_NE from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/complex_interval.pyx b/src/sage/rings/complex_interval.pyx index a6a556fa056..852728dc59a 100644 --- a/src/sage/rings/complex_interval.pyx +++ b/src/sage/rings/complex_interval.pyx @@ -39,8 +39,6 @@ heavily modified: # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function - from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/complex_mpc.pyx b/src/sage/rings/complex_mpc.pyx index 0baee83bd0c..734017e4553 100644 --- a/src/sage/rings/complex_mpc.pyx +++ b/src/sage/rings/complex_mpc.pyx @@ -57,7 +57,6 @@ EXAMPLES:: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function import re from . import real_mpfr diff --git a/src/sage/rings/complex_number.pyx b/src/sage/rings/complex_number.pyx index e908849e006..c069a0c2c79 100644 --- a/src/sage/rings/complex_number.pyx +++ b/src/sage/rings/complex_number.pyx @@ -26,8 +26,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - import math import operator diff --git a/src/sage/rings/finite_rings/element_givaro.pyx b/src/sage/rings/finite_rings/element_givaro.pyx index 1bd35cff0a4..22e03c806dd 100644 --- a/src/sage/rings/finite_rings/element_givaro.pyx +++ b/src/sage/rings/finite_rings/element_givaro.pyx @@ -50,8 +50,6 @@ AUTHORS: # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.signals cimport sig_on, sig_off include "sage/libs/ntl/decl.pxi" diff --git a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx index c21dddc7ab3..ca9324fe53f 100644 --- a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx +++ b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx @@ -18,7 +18,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport check_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pyx b/src/sage/rings/finite_rings/element_pari_ffelt.pyx index 2fcd3a11eca..e694fd0810b 100644 --- a/src/sage/rings/finite_rings/element_pari_ffelt.pyx +++ b/src/sage/rings/finite_rings/element_pari_ffelt.pyx @@ -16,7 +16,6 @@ AUTHORS: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/finite_rings/finite_field_base.pyx b/src/sage/rings/finite_rings/finite_field_base.pyx index 0b7d91ba632..3f4ef4603ec 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pyx +++ b/src/sage/rings/finite_rings/finite_field_base.pyx @@ -30,8 +30,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - cimport cython from cysignals.signals cimport sig_check from cpython.array cimport array diff --git a/src/sage/rings/finite_rings/hom_finite_field.pyx b/src/sage/rings/finite_rings/hom_finite_field.pyx index f60572ea5e1..317c68ff1d8 100644 --- a/src/sage/rings/finite_rings/hom_finite_field.pyx +++ b/src/sage/rings/finite_rings/hom_finite_field.pyx @@ -100,7 +100,6 @@ AUTHOR: # # http://www.gnu.org/licenses/ #**************************************************************************** -from __future__ import absolute_import from sage.rings.integer cimport Integer diff --git a/src/sage/rings/finite_rings/hom_prime_finite_field.pyx b/src/sage/rings/finite_rings/hom_prime_finite_field.pyx index a79ea2fdf9a..8c5cbbbddf1 100644 --- a/src/sage/rings/finite_rings/hom_prime_finite_field.pyx +++ b/src/sage/rings/finite_rings/hom_prime_finite_field.pyx @@ -23,7 +23,6 @@ AUTHOR: # # http://www.gnu.org/licenses/ #**************************************************************************** -from __future__ import absolute_import from sage.rings.integer cimport Integer diff --git a/src/sage/rings/finite_rings/integer_mod.pyx b/src/sage/rings/finite_rings/integer_mod.pyx index e522adda524..3da1643ba47 100644 --- a/src/sage/rings/finite_rings/integer_mod.pyx +++ b/src/sage/rings/finite_rings/integer_mod.pyx @@ -1,3 +1,4 @@ +# cython: language_level=2 r""" Elements of `\ZZ/n\ZZ` diff --git a/src/sage/rings/fraction_field_FpT.pyx b/src/sage/rings/fraction_field_FpT.pyx index 1bfdc752861..ee91b40bac8 100644 --- a/src/sage/rings/fraction_field_FpT.pyx +++ b/src/sage/rings/fraction_field_FpT.pyx @@ -1,5 +1,4 @@ "Univariate rational functions over prime fields" -from __future__ import print_function, absolute_import import sys diff --git a/src/sage/rings/fraction_field_element.pyx b/src/sage/rings/fraction_field_element.pyx index e7a625425cd..d88cdb627ff 100644 --- a/src/sage/rings/fraction_field_element.pyx +++ b/src/sage/rings/fraction_field_element.pyx @@ -19,8 +19,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from sage.structure.element cimport FieldElement, parent from sage.structure.richcmp cimport richcmp # from sage.rings.polynomial.flatten import SpecializationMorphism diff --git a/src/sage/rings/function_field/element.pyx b/src/sage/rings/function_field/element.pyx index cb0e5fe6465..fa104849c9d 100644 --- a/src/sage/rings/function_field/element.pyx +++ b/src/sage/rings/function_field/element.pyx @@ -58,7 +58,6 @@ AUTHORS: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from sage.structure.element cimport FieldElement, RingElement, ModuleElement, Element from sage.misc.cachefunc import cached_method diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx index 430fd2b9c9f..27448f1dff3 100644 --- a/src/sage/rings/integer.pyx +++ b/src/sage/rings/integer.pyx @@ -138,7 +138,6 @@ AUTHORS: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function # Do not create any Integer, especially non cdef'ed ones, before the hooked # creation and deletion are setup by the call to hook_fast_tp_functions diff --git a/src/sage/rings/integer_ring.pyx b/src/sage/rings/integer_ring.pyx index 7afa9748383..e57f0852df9 100644 --- a/src/sage/rings/integer_ring.pyx +++ b/src/sage/rings/integer_ring.pyx @@ -43,8 +43,6 @@ other types will also coerce to the integers, when it makes sense. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cpython.int cimport * from cpython.list cimport * from cpython.object cimport Py_NE diff --git a/src/sage/rings/laurent_series_ring_element.pyx b/src/sage/rings/laurent_series_ring_element.pyx index 6ed117011db..166580958cd 100644 --- a/src/sage/rings/laurent_series_ring_element.pyx +++ b/src/sage/rings/laurent_series_ring_element.pyx @@ -67,8 +67,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import - from .infinity import infinity from sage.rings.integer_ring import ZZ diff --git a/src/sage/rings/morphism.pyx b/src/sage/rings/morphism.pyx index e68c30f141e..b73654e2330 100644 --- a/src/sage/rings/morphism.pyx +++ b/src/sage/rings/morphism.pyx @@ -384,7 +384,6 @@ compare equal:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cpython.object cimport Py_EQ, Py_NE diff --git a/src/sage/rings/noncommutative_ideals.pyx b/src/sage/rings/noncommutative_ideals.pyx index a0cf3fec9ac..e5751d47459 100644 --- a/src/sage/rings/noncommutative_ideals.pyx +++ b/src/sage/rings/noncommutative_ideals.pyx @@ -56,7 +56,6 @@ TESTS:: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from sage.structure.element cimport MonoidElement from sage.structure.parent cimport Parent diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index 0aad530e920..a5411e7816d 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -28,8 +28,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - import operator from cpython.int cimport * diff --git a/src/sage/rings/number_field/number_field_element_quadratic.pyx b/src/sage/rings/number_field/number_field_element_quadratic.pyx index 198fbc7d636..2d64042e34b 100644 --- a/src/sage/rings/number_field/number_field_element_quadratic.pyx +++ b/src/sage/rings/number_field/number_field_element_quadratic.pyx @@ -28,8 +28,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division - include "sage/libs/ntl/decl.pxi" from cpython.object cimport Py_EQ, Py_NE, Py_LE, Py_GE, Py_LT, Py_GT diff --git a/src/sage/rings/number_field/number_field_morphisms.pyx b/src/sage/rings/number_field/number_field_morphisms.pyx index 715fcf1d407..b82fc89997e 100644 --- a/src/sage/rings/number_field/number_field_morphisms.pyx +++ b/src/sage/rings/number_field/number_field_morphisms.pyx @@ -19,7 +19,6 @@ fields (generally `\RR` or `\CC`). # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import sage.rings.complex_double diff --git a/src/sage/rings/number_field/totallyreal.pyx b/src/sage/rings/number_field/totallyreal.pyx index 3bf82c90dd5..4ac05950d71 100644 --- a/src/sage/rings/number_field/totallyreal.pyx +++ b/src/sage/rings/number_field/totallyreal.pyx @@ -91,8 +91,6 @@ Authors # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.memory cimport check_calloc, sig_free import math diff --git a/src/sage/rings/number_field/totallyreal_data.pyx b/src/sage/rings/number_field/totallyreal_data.pyx index 7e7b642bb23..893e7009284 100644 --- a/src/sage/rings/number_field/totallyreal_data.pyx +++ b/src/sage/rings/number_field/totallyreal_data.pyx @@ -23,8 +23,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from libc.math cimport sqrt from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/rings/padics/common_conversion.pyx b/src/sage/rings/padics/common_conversion.pyx index 74f0f220489..801a322ccc4 100644 --- a/src/sage/rings/padics/common_conversion.pyx +++ b/src/sage/rings/padics/common_conversion.pyx @@ -25,7 +25,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cpython.int cimport * from sage.ext.stdsage cimport PY_NEW diff --git a/src/sage/rings/padics/morphism.pyx b/src/sage/rings/padics/morphism.pyx index eb7b27abc51..b2c5c7b58e6 100644 --- a/src/sage/rings/padics/morphism.pyx +++ b/src/sage/rings/padics/morphism.pyx @@ -11,7 +11,6 @@ Frobenius endomorphisms on p-adic fields # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.rings.integer cimport Integer from sage.rings.infinity import Infinity diff --git a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx index a09cbe246d6..33b3049e4d6 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx @@ -182,7 +182,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from cysignals.signals cimport sig_on, sig_off from sage.ext.stdsage cimport PY_NEW diff --git a/src/sage/rings/padics/padic_ZZ_pX_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_element.pyx index 09e183c02f2..30bc44e0ea7 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_element.pyx @@ -19,7 +19,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.ext.stdsage cimport PY_NEW from cpython.list cimport * diff --git a/src/sage/rings/padics/padic_ext_element.pyx b/src/sage/rings/padics/padic_ext_element.pyx index 11323d89405..8b6366a7db3 100644 --- a/src/sage/rings/padics/padic_ext_element.pyx +++ b/src/sage/rings/padics/padic_ext_element.pyx @@ -21,7 +21,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.rings.padics.pow_computer cimport PowComputer_class from sage.rings.integer import Integer diff --git a/src/sage/rings/padics/padic_generic_element.pyx b/src/sage/rings/padics/padic_generic_element.pyx index 8d9eba3ccb5..fac6e025fda 100644 --- a/src/sage/rings/padics/padic_generic_element.pyx +++ b/src/sage/rings/padics/padic_generic_element.pyx @@ -26,8 +26,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - from sage.ext.stdsage cimport PY_NEW diff --git a/src/sage/rings/padics/padic_printing.pyx b/src/sage/rings/padics/padic_printing.pyx index edd4345cada..d0f83f5a9cc 100644 --- a/src/sage/rings/padics/padic_printing.pyx +++ b/src/sage/rings/padics/padic_printing.pyx @@ -21,7 +21,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cpython.list cimport * from sage.libs.gmp.mpz cimport * diff --git a/src/sage/rings/padics/pow_computer.pyx b/src/sage/rings/padics/pow_computer.pyx index 8e20db79722..50b86e63108 100644 --- a/src/sage/rings/padics/pow_computer.pyx +++ b/src/sage/rings/padics/pow_computer.pyx @@ -31,7 +31,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import weakref from cysignals.memory cimport sig_malloc, sig_free diff --git a/src/sage/rings/padics/pow_computer_ext.pyx b/src/sage/rings/padics/pow_computer_ext.pyx index 83ae6c127fc..f193b19ba46 100644 --- a/src/sage/rings/padics/pow_computer_ext.pyx +++ b/src/sage/rings/padics/pow_computer_ext.pyx @@ -47,7 +47,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cpython.list cimport * from cpython.dict cimport * diff --git a/src/sage/rings/padics/pow_computer_flint.pyx b/src/sage/rings/padics/pow_computer_flint.pyx index 75ae811ce81..9c317ab5754 100644 --- a/src/sage/rings/padics/pow_computer_flint.pyx +++ b/src/sage/rings/padics/pow_computer_flint.pyx @@ -1,4 +1,3 @@ -from __future__ import absolute_import from cysignals.memory cimport sig_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/padics/pow_computer_relative.pyx b/src/sage/rings/padics/pow_computer_relative.pyx index 5556a5929e4..bb6816b9509 100644 --- a/src/sage/rings/padics/pow_computer_relative.pyx +++ b/src/sage/rings/padics/pow_computer_relative.pyx @@ -21,7 +21,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport sig_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/polynomial/cyclotomic.pyx b/src/sage/rings/polynomial/cyclotomic.pyx index 05150d27726..6bf3a318d49 100644 --- a/src/sage/rings/polynomial/cyclotomic.pyx +++ b/src/sage/rings/polynomial/cyclotomic.pyx @@ -24,7 +24,6 @@ method of univariate polynomial ring objects and the top-level # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import import sys diff --git a/src/sage/rings/polynomial/laurent_polynomial.pyx b/src/sage/rings/polynomial/laurent_polynomial.pyx index 4f2958202c8..49a3c5580e4 100644 --- a/src/sage/rings/polynomial/laurent_polynomial.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial.pyx @@ -9,7 +9,6 @@ Elements of Laurent polynomial rings # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function from sage.rings.integer cimport Integer from sage.structure.element import is_Element, coerce_binop diff --git a/src/sage/rings/polynomial/multi_polynomial.pyx b/src/sage/rings/polynomial/multi_polynomial.pyx index fd4e919c644..b8cab6d8a5a 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pyx +++ b/src/sage/rings/polynomial/multi_polynomial.pyx @@ -10,8 +10,6 @@ Base class for elements of multivariate polynomial rings # https://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import - from sage.rings.integer cimport Integer from sage.rings.integer_ring import ZZ from sage.structure.coerce cimport coercion_model diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx index e4cc7591584..5d94a426c38 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx @@ -160,8 +160,6 @@ Check if :trac:`6160` is fixed:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - # The Singular API is as follows: # # pXXX does assume the currRing to be set diff --git a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx index 6f5613405f2..44e195baac7 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx @@ -1,7 +1,6 @@ r""" Base class for multivariate polynomial rings """ -from __future__ import absolute_import, print_function import sage.misc.latex from sage.misc.cachefunc import cached_method diff --git a/src/sage/rings/polynomial/pbori.pyx b/src/sage/rings/polynomial/pbori.pyx index 427fa5e6305..bd7355c02bb 100644 --- a/src/sage/rings/polynomial/pbori.pyx +++ b/src/sage/rings/polynomial/pbori.pyx @@ -174,7 +174,6 @@ native PolyBoRi counterparts. For instance, sets of points can be represented as tuples of tuples (Sage) or as ``BooleSet`` (PolyBoRi) and naturally the second option is faster. """ -from __future__ import print_function, absolute_import from cpython.object cimport Py_EQ, Py_NE from cython.operator cimport dereference as deref diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx index 989bb54991c..fec2cd9c086 100644 --- a/src/sage/rings/polynomial/plural.pyx +++ b/src/sage/rings/polynomial/plural.pyx @@ -102,7 +102,6 @@ TESTS:: True """ -from __future__ import print_function, absolute_import from cysignals.memory cimport sig_malloc, sig_free from sage.cpython.string cimport bytes_to_str diff --git a/src/sage/rings/polynomial/polydict.pyx b/src/sage/rings/polynomial/polydict.pyx index 20b930fc07c..277eaf18446 100644 --- a/src/sage/rings/polynomial/polydict.pyx +++ b/src/sage/rings/polynomial/polydict.pyx @@ -36,7 +36,6 @@ AUTHORS: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import from libc.string cimport memcpy from cpython.dict cimport * diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index cbe40aeb1a1..2795a986ec9 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -47,7 +47,6 @@ TESTS:: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function cdef is_FractionField, is_RealField, is_ComplexField cdef ZZ, QQ, RR, CC, RDF, CDF diff --git a/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx b/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx index 83e730bf2d8..281ec0d71fe 100644 --- a/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx @@ -31,8 +31,6 @@ We check that the buggy gcd is fixed (see :trac:`17816`):: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.memory cimport sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx index 757a28aa246..8179b37fc6a 100644 --- a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx @@ -32,8 +32,6 @@ do:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.memory cimport sig_free from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx index 9b7389b20cd..39ddf281853 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx @@ -26,7 +26,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.memory cimport sig_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/polynomial/polynomial_number_field.pyx b/src/sage/rings/polynomial/polynomial_number_field.pyx index 53729ac566f..82c3d467bea 100644 --- a/src/sage/rings/polynomial/polynomial_number_field.pyx +++ b/src/sage/rings/polynomial/polynomial_number_field.pyx @@ -68,7 +68,6 @@ We can also construct polynomials over relative number fields:: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from .polynomial_element_generic import Polynomial_generic_dense_field from sage.rings.rational_field import QQ diff --git a/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx b/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx index 347f3f69d5f..a09c25a3856 100644 --- a/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +++ b/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx @@ -21,7 +21,6 @@ Check that operations with numpy elements work well (see :trac:`18076` and sage: numpy.float32('1.5') * x 1.50000000000000*x """ -from __future__ import absolute_import from cysignals.memory cimport check_allocarray, check_reallocarray, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/rings/polynomial/real_roots.pyx b/src/sage/rings/polynomial/real_roots.pyx index 1a6e4434bd4..ba57c1ba4f6 100644 --- a/src/sage/rings/polynomial/real_roots.pyx +++ b/src/sage/rings/polynomial/real_roots.pyx @@ -130,7 +130,6 @@ from https://wiki.sagemath.org/days4schedule . # This may be vastly faster than the exact calculations carried out # by this algorithm! Is it enough faster to be faster than, say, # Pari's floating-point algorithms?) -from __future__ import print_function, absolute_import from copy import copy import time diff --git a/src/sage/rings/polynomial/skew_polynomial_element.pyx b/src/sage/rings/polynomial/skew_polynomial_element.pyx index 0f75b12901b..564187df9fd 100644 --- a/src/sage/rings/polynomial/skew_polynomial_element.pyx +++ b/src/sage/rings/polynomial/skew_polynomial_element.pyx @@ -59,8 +59,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #**************************************************************************** -from __future__ import print_function, absolute_import, division - import re from copy import copy from sage.rings.infinity import infinity diff --git a/src/sage/rings/polynomial/symmetric_reduction.pyx b/src/sage/rings/polynomial/symmetric_reduction.pyx index 0d538560092..c8c08e1c61f 100644 --- a/src/sage/rings/polynomial/symmetric_reduction.pyx +++ b/src/sage/rings/polynomial/symmetric_reduction.pyx @@ -116,7 +116,6 @@ Symmetric Reduction Strategy is created:: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import import copy import operator diff --git a/src/sage/rings/power_series_mpoly.pyx b/src/sage/rings/power_series_mpoly.pyx index db76028ed22..f4fda135c1e 100644 --- a/src/sage/rings/power_series_mpoly.pyx +++ b/src/sage/rings/power_series_mpoly.pyx @@ -1,7 +1,5 @@ # NOT ready to be used -- possibly should be deleted. -from __future__ import absolute_import - from .power_series_ring_element cimport PowerSeries from sage.structure.element cimport Element, ModuleElement, RingElement from .infinity import infinity, is_Infinite diff --git a/src/sage/rings/power_series_pari.pyx b/src/sage/rings/power_series_pari.pyx index 2e03adea2d4..65c3ec23643 100644 --- a/src/sage/rings/power_series_pari.pyx +++ b/src/sage/rings/power_series_pari.pyx @@ -69,8 +69,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from cypari2.gen cimport Gen as pari_gen from cypari2.pari_instance cimport get_var from cypari2.paridecl cimport gel, typ, lg, valp, varn, t_POL, t_SER, t_RFRAC, t_VEC diff --git a/src/sage/rings/power_series_poly.pyx b/src/sage/rings/power_series_poly.pyx index a5e43bb2afc..2dbae5d13c6 100644 --- a/src/sage/rings/power_series_poly.pyx +++ b/src/sage/rings/power_series_poly.pyx @@ -4,7 +4,6 @@ Power Series Methods The class ``PowerSeries_poly`` provides additional methods for univariate power series. """ -from __future__ import absolute_import, print_function from .power_series_ring_element cimport PowerSeries from sage.structure.element cimport Element, ModuleElement, RingElement diff --git a/src/sage/rings/power_series_ring_element.pyx b/src/sage/rings/power_series_ring_element.pyx index 2871d57f9ec..a180dc44b01 100644 --- a/src/sage/rings/power_series_ring_element.pyx +++ b/src/sage/rings/power_series_ring_element.pyx @@ -94,7 +94,6 @@ With power series the behavior is the same. # # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import import operator diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx index 4c837528fd6..b8cfd6e6251 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx @@ -50,8 +50,6 @@ TESTS:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division - cimport cython from cpython cimport * from cpython.object cimport Py_EQ, Py_NE diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx index 884801af27c..8b42f01d3ef 100644 --- a/src/sage/rings/real_arb.pyx +++ b/src/sage/rings/real_arb.pyx @@ -196,7 +196,6 @@ Classes and Methods # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from cysignals.signals cimport sig_on, sig_str, sig_off diff --git a/src/sage/rings/real_double.pyx b/src/sage/rings/real_double.pyx index 5a25dd47830..d95e061ab60 100644 --- a/src/sage/rings/real_double.pyx +++ b/src/sage/rings/real_double.pyx @@ -40,8 +40,6 @@ Test NumPy conversions:: # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import print_function, absolute_import - cimport libc.math from libc.string cimport memcpy from cpython.object cimport * diff --git a/src/sage/rings/real_interval_absolute.pyx b/src/sage/rings/real_interval_absolute.pyx index cb331b61144..2b193145eb3 100644 --- a/src/sage/rings/real_interval_absolute.pyx +++ b/src/sage/rings/real_interval_absolute.pyx @@ -1,7 +1,6 @@ """ Real intervals with a fixed absolute precision """ -from __future__ import print_function, absolute_import from sage.ext.stdsage cimport PY_NEW diff --git a/src/sage/rings/real_lazy.pyx b/src/sage/rings/real_lazy.pyx index 06b6021fbbc..10476bd4f6a 100644 --- a/src/sage/rings/real_lazy.pyx +++ b/src/sage/rings/real_lazy.pyx @@ -19,7 +19,6 @@ specified in the forward direction). # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, division, print_function import math, cmath diff --git a/src/sage/rings/real_mpfi.pyx b/src/sage/rings/real_mpfi.pyx index c6d9bc4dda6..d193e296083 100644 --- a/src/sage/rings/real_mpfi.pyx +++ b/src/sage/rings/real_mpfi.pyx @@ -242,8 +242,6 @@ Comparisons with numpy types are right (see :trac:`17758` and :trac:`18076`):: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from libc.string cimport strlen from cpython.mem cimport * from cpython.object cimport Py_EQ, Py_NE, Py_LT, Py_LE, Py_GT, Py_GE diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx index d98409902a5..9b5e9d37393 100644 --- a/src/sage/rings/real_mpfr.pyx +++ b/src/sage/rings/real_mpfr.pyx @@ -117,8 +117,6 @@ Make sure we don't have a new field for every new literal:: # https://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - import math # for log import sys import re diff --git a/src/sage/rings/ring.pyx b/src/sage/rings/ring.pyx index ea73f0ed29a..b2fce294e03 100644 --- a/src/sage/rings/ring.pyx +++ b/src/sage/rings/ring.pyx @@ -65,7 +65,6 @@ AUTHORS: # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from sage.misc.cachefunc import cached_method diff --git a/src/sage/rings/semirings/tropical_semiring.pyx b/src/sage/rings/semirings/tropical_semiring.pyx index 3b05330fd91..c2ca88d374f 100644 --- a/src/sage/rings/semirings/tropical_semiring.pyx +++ b/src/sage/rings/semirings/tropical_semiring.pyx @@ -19,7 +19,6 @@ AUTHORS: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.misc.cachefunc import cached_method from sage.structure.parent import Parent diff --git a/src/sage/rings/sum_of_squares.pyx b/src/sage/rings/sum_of_squares.pyx index aab6dc70175..71710148eae 100644 --- a/src/sage/rings/sum_of_squares.pyx +++ b/src/sage/rings/sum_of_squares.pyx @@ -17,8 +17,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from libc.math cimport sqrt from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/sat/solvers/satsolver.pyx b/src/sage/sat/solvers/satsolver.pyx index ef6ad6de09b..8b1af2dfd3c 100644 --- a/src/sage/sat/solvers/satsolver.pyx +++ b/src/sage/sat/solvers/satsolver.pyx @@ -14,7 +14,6 @@ AUTHORS: - Martin Albrecht (2012): first version """ -from __future__ import absolute_import cdef class SatSolver: def __cinit__(self, *args, **kwds): diff --git a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx index e988637c771..01ececac1b5 100644 --- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx +++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx @@ -12,8 +12,6 @@ Descent on elliptic curves over `\QQ` with a 2-isogeny # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - from cysignals.memory cimport sig_malloc, sig_free from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/schemes/elliptic_curves/period_lattice_region.pyx b/src/sage/schemes/elliptic_curves/period_lattice_region.pyx index 72c13bf319c..8399d8253ba 100644 --- a/src/sage/schemes/elliptic_curves/period_lattice_region.pyx +++ b/src/sage/schemes/elliptic_curves/period_lattice_region.pyx @@ -25,8 +25,6 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import division, absolute_import - import numpy as np cimport numpy as np diff --git a/src/sage/schemes/toric/divisor_class.pyx b/src/sage/schemes/toric/divisor_class.pyx index 07b780f63ee..e55ba9f1b54 100644 --- a/src/sage/schemes/toric/divisor_class.pyx +++ b/src/sage/schemes/toric/divisor_class.pyx @@ -54,7 +54,6 @@ divisor representing a divisor class:: # # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function from sage.libs.gmp.mpq cimport * diff --git a/src/sage/sets/finite_set_map_cy.pyx b/src/sage/sets/finite_set_map_cy.pyx index 45f92838c64..a13ee3f1c6e 100644 --- a/src/sage/sets/finite_set_map_cy.pyx +++ b/src/sage/sets/finite_set_map_cy.pyx @@ -51,7 +51,6 @@ AUTHORS: # Distributed under the terms of the GNU General Public License (GPL) # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from sage.structure.list_clone cimport ClonableIntArray from sage.structure.parent cimport Parent diff --git a/src/sage/stats/distributions/discrete_gaussian_integer.pyx b/src/sage/stats/distributions/discrete_gaussian_integer.pyx index e98de127f8f..ac0804b0584 100644 --- a/src/sage/stats/distributions/discrete_gaussian_integer.pyx +++ b/src/sage/stats/distributions/discrete_gaussian_integer.pyx @@ -109,8 +109,6 @@ REFERENCES: # policies, either expressed or implied, of the FreeBSD Project. #*****************************************************************************/ -from __future__ import print_function - from cysignals.signals cimport sig_on, sig_off from sage.rings.real_mpfr cimport RealNumber, RealField diff --git a/src/sage/stats/hmm/distributions.pyx b/src/sage/stats/hmm/distributions.pyx index 62827238a3a..87eafbb27a1 100644 --- a/src/sage/stats/hmm/distributions.pyx +++ b/src/sage/stats/hmm/distributions.pyx @@ -17,7 +17,6 @@ AUTHOR: # The full text of the GPL is available at: # http://www.gnu.org/licenses/ ############################################################################# -from __future__ import absolute_import from cpython.object cimport PyObject_RichCompare diff --git a/src/sage/stats/hmm/hmm.pyx b/src/sage/stats/hmm/hmm.pyx index 27b79294c81..b3b8d2eab7d 100644 --- a/src/sage/stats/hmm/hmm.pyx +++ b/src/sage/stats/hmm/hmm.pyx @@ -31,8 +31,6 @@ AUTHOR: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function - from libc.math cimport log from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/structure/category_object.pyx b/src/sage/structure/category_object.pyx index 6bf1b854225..fdca7ec5914 100644 --- a/src/sage/structure/category_object.pyx +++ b/src/sage/structure/category_object.pyx @@ -55,8 +55,6 @@ This example illustrates generators for a free module over `\ZZ`. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from sage.cpython.getattr import dir_with_other_class from sage.cpython.getattr cimport getattr_from_other_class from sage.categories.category import Category diff --git a/src/sage/structure/coerce.pyx b/src/sage/structure/coerce.pyx index 99bad2e6144..2204ca32fdb 100644 --- a/src/sage/structure/coerce.pyx +++ b/src/sage/structure/coerce.pyx @@ -73,7 +73,6 @@ see the documentation for :class:`Parent`. # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cpython.object cimport (PyObject, PyTypeObject, PyObject_CallObject, PyObject_RichCompare, Py_TYPE, diff --git a/src/sage/structure/coerce_actions.pyx b/src/sage/structure/coerce_actions.pyx index 87e35917536..c0cba898257 100644 --- a/src/sage/structure/coerce_actions.pyx +++ b/src/sage/structure/coerce_actions.pyx @@ -11,7 +11,6 @@ Coerce actions # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import operator diff --git a/src/sage/structure/coerce_dict.pyx b/src/sage/structure/coerce_dict.pyx index cea72a219ae..ae577bcc2e9 100644 --- a/src/sage/structure/coerce_dict.pyx +++ b/src/sage/structure/coerce_dict.pyx @@ -62,8 +62,6 @@ However, this leak was fixed by :trac:`715`, using weak references:: # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import - cimport cython from cpython.object cimport * from cpython.ref cimport Py_XINCREF, Py_XDECREF, Py_CLEAR diff --git a/src/sage/structure/coerce_maps.pyx b/src/sage/structure/coerce_maps.pyx index f9fb4f0b0a6..26a4fc525f3 100644 --- a/src/sage/structure/coerce_maps.pyx +++ b/src/sage/structure/coerce_maps.pyx @@ -1,7 +1,6 @@ """ Coerce maps """ -from __future__ import print_function, absolute_import import re import types diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index cb1e1bf2501..3f7519c9ab2 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -281,8 +281,6 @@ continue down the MRO and find the ``_add_`` method in the category. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, division, print_function - cimport cython from cpython cimport * from cpython.ref cimport PyObject diff --git a/src/sage/structure/factory.pyx b/src/sage/structure/factory.pyx index d08195228ea..751b3ea3748 100644 --- a/src/sage/structure/factory.pyx +++ b/src/sage/structure/factory.pyx @@ -53,7 +53,6 @@ AUTHORS: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import import types diff --git a/src/sage/structure/list_clone.pyx b/src/sage/structure/list_clone.pyx index adb2caf21f5..1f0bf62ed42 100644 --- a/src/sage/structure/list_clone.pyx +++ b/src/sage/structure/list_clone.pyx @@ -139,7 +139,6 @@ AUTHORS: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function from cpython.list cimport * from cpython.int cimport * diff --git a/src/sage/structure/list_clone_timings_cy.pyx b/src/sage/structure/list_clone_timings_cy.pyx index 272db6cf66f..46152f1e68b 100644 --- a/src/sage/structure/list_clone_timings_cy.pyx +++ b/src/sage/structure/list_clone_timings_cy.pyx @@ -7,7 +7,6 @@ Cython Functions for Timing Clone Protocol # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.structure.list_clone cimport ClonableArray diff --git a/src/sage/structure/mutability.pyx b/src/sage/structure/mutability.pyx index b0a09f55bc4..f605de99df7 100644 --- a/src/sage/structure/mutability.pyx +++ b/src/sage/structure/mutability.pyx @@ -10,7 +10,6 @@ Mutability Cython Implementation # Distributed under the terms of the GNU General Public License (GPL) # https://www.gnu.org/licenses/ ########################################################################## -from __future__ import print_function, absolute_import from sage.misc.decorators import sage_wraps diff --git a/src/sage/structure/parent.pyx b/src/sage/structure/parent.pyx index f8c4ae85616..ce40306659f 100644 --- a/src/sage/structure/parent.pyx +++ b/src/sage/structure/parent.pyx @@ -102,7 +102,6 @@ This came up in some subtle bug once:: # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import, print_function from cpython.object cimport PyObject, Py_NE, Py_EQ, Py_LE, Py_GE from cpython.bool cimport * diff --git a/src/sage/structure/parent_base.pyx b/src/sage/structure/parent_base.pyx index 81758edb532..3123232d015 100644 --- a/src/sage/structure/parent_base.pyx +++ b/src/sage/structure/parent_base.pyx @@ -12,8 +12,6 @@ Base class for old-style parent objects with a base ring # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import - cimport sage.structure.parent as parent from .coerce_exceptions import CoercionException diff --git a/src/sage/structure/parent_gens.pyx b/src/sage/structure/parent_gens.pyx index 414bb1221e5..240cef7837b 100644 --- a/src/sage/structure/parent_gens.pyx +++ b/src/sage/structure/parent_gens.pyx @@ -68,8 +68,6 @@ This example illustrates generators for a free module over `\ZZ`. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function - import sage.misc.defaults from sage.misc.latex import latex_variable_name from . import gens_py diff --git a/src/sage/structure/parent_old.pyx b/src/sage/structure/parent_old.pyx index 42e8c6b34a0..1955a1552e5 100644 --- a/src/sage/structure/parent_old.pyx +++ b/src/sage/structure/parent_old.pyx @@ -27,7 +27,6 @@ This came up in some subtle bug once. # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, print_function cimport sage.structure.sage_object as sage_object import operator diff --git a/src/sage/structure/sage_object.pyx b/src/sage/structure/sage_object.pyx index 24aaf621f5d..6b899a53b05 100644 --- a/src/sage/structure/sage_object.pyx +++ b/src/sage/structure/sage_object.pyx @@ -2,7 +2,6 @@ r""" Abstract base class for Sage objects """ -from __future__ import absolute_import, print_function from sage.misc.persist import (_base_dumps, _base_save, register_unpickle_override, make_None) diff --git a/src/sage/symbolic/constants_c.pyx b/src/sage/symbolic/constants_c.pyx index 38e8db63ecd..d3b2d33bf8a 100644 --- a/src/sage/symbolic/constants_c.pyx +++ b/src/sage/symbolic/constants_c.pyx @@ -14,8 +14,6 @@ The constant `e` # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import, division, print_function - from sage.symbolic.expression cimport Expression from sage.symbolic.ring import SR diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index ecb69f017df..19a7616ed0f 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -151,7 +151,6 @@ Test if :trac:`24883` is fixed:: # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import print_function, absolute_import from cysignals.signals cimport sig_on, sig_off from sage.ext.cplusplus cimport ccrepr, ccreadstr diff --git a/src/sage/symbolic/function.pyx b/src/sage/symbolic/function.pyx index 444503c2825..260ea2f41b5 100644 --- a/src/sage/symbolic/function.pyx +++ b/src/sage/symbolic/function.pyx @@ -13,7 +13,6 @@ Classes for symbolic functions # (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import division, absolute_import from sage.libs.pynac.pynac cimport * from sage.rings.integer cimport smallInteger diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx index 065e285a57c..d39d55cb9fb 100644 --- a/src/sage/symbolic/ring.pyx +++ b/src/sage/symbolic/ring.pyx @@ -12,7 +12,6 @@ The symbolic ring # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from __future__ import absolute_import from sage.ext.cplusplus cimport ccrepr diff --git a/src/sage/tests/cython.pyx b/src/sage/tests/cython.pyx index 57c131b104e..c668fd47f02 100644 --- a/src/sage/tests/cython.pyx +++ b/src/sage/tests/cython.pyx @@ -10,7 +10,6 @@ This file collects tests requiring Cython. # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** -from __future__ import absolute_import from sage.misc.fast_methods cimport FastHashable_class diff --git a/src/setup.py b/src/setup.py index 42ba3a63dac..18f97639943 100755 --- a/src/setup.py +++ b/src/setup.py @@ -232,7 +232,7 @@ def finalize_options(self): cdivision=True, embedsignature=True, fast_getattr=True, - language_level="2", + language_level="3str", preliminary_late_includes_cy28=True, profile=self.profile, )