Skip to content

Commit

Permalink
Trac #33350: remove traces of six
Browse files Browse the repository at this point in the history
URL: https://trac.sagemath.org/33350
Reported by: chapoton
Ticket author(s): Frédéric Chapoton
Reviewer(s): Tobias Diez
  • Loading branch information
Release Manager committed Feb 16, 2022
2 parents 24f0f4e + 5a6ba6c commit e4f9347
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/sage/combinat/recognizable_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,6 @@ def minimized(self):
EXAMPLES::
sage: from itertools import islice
sage: from six.moves import zip
sage: Rec = RecognizableSeriesSpace(ZZ, [0, 1])
sage: S = Rec((Matrix([[3, 6], [0, 1]]), Matrix([[0, -6], [1, 5]])),
Expand Down
6 changes: 1 addition & 5 deletions src/sage/crypto/sbox.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ from cysignals.memory cimport check_allocarray, sig_free
from sage.structure.sage_object cimport SageObject
from sage.structure.element cimport Element

from six import integer_types

from sage.combinat.integer_vector import IntegerVectors
from sage.crypto.boolean_function import BooleanFunction
from sage.crypto.boolean_function cimport hamming_weight, walsh_hadamard
Expand Down Expand Up @@ -432,12 +430,10 @@ cdef class SBox(SageObject):
TypeError: cannot apply SBox to 1/2
"""
# Handle integer inputs
if type(X) == int:
if isinstance(X, int):
return self._S_list[<int> X]
if isinstance(X, Integer):
return self._S_list[<Integer> X]
if isinstance(X, integer_types):
return self._S_list[ZZ(X)]

# Handle non-integer inputs: vectors, finite field elements to-integer-coercible elements
#cdef int i
Expand Down
5 changes: 2 additions & 3 deletions src/sage/manifolds/differentiable/symplectic_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
# https://www.gnu.org/licenses/
# *****************************************************************************
from __future__ import annotations
from six.moves import range
from typing import Dict, Union, Optional
from typing import Union, Optional

from sage.symbolic.expression import Expression
from sage.manifolds.differentiable.diff_form import DiffForm, DiffFormParal
Expand Down Expand Up @@ -112,7 +111,7 @@ class SymplecticForm(DiffForm):
_dim_half: int
_poisson: Optional[PoissonTensorField]
_vol_form: Optional[DiffForm]
_restrictions: Dict[DifferentiableManifold, SymplecticForm]
_restrictions: dict[DifferentiableManifold, SymplecticForm]

def __init__(
self,
Expand Down

0 comments on commit e4f9347

Please sign in to comment.