Skip to content

Commit 946a5b3

Browse files
committed
Remove Six dependency
1 parent 768c182 commit 946a5b3

File tree

6 files changed

+4
-10
lines changed

6 files changed

+4
-10
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ python-dateutil = "*"
4848
pytz = "*"
4949
"repoze.who" = {optional = true, version = "*"}
5050
requests = "^2"
51-
six = "*"
5251
xmlschema = ">=1.2.1"
5352
"zope.interface" = {optional = true, version = "*"}
5453

src/saml2/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
import logging
2020

21-
import six
22-
2321
from saml2.validate import valid_instance
2422
from saml2.version import version as __version__
2523

src/saml2/eptid.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import logging
99
import shelve
1010

11-
import six
12-
1311

1412
logger = logging.getLogger(__name__)
1513

@@ -38,12 +36,12 @@ def make(self, idp, sp, args):
3836
return "!".join([idp, sp, hashval])
3937

4038
def __getitem__(self, key):
41-
if six.PY3 and isinstance(key, bytes):
39+
if isinstance(key, bytes):
4240
key = key.decode("utf-8")
4341
return self._db[key]
4442

4543
def __setitem__(self, key, value):
46-
if six.PY3 and isinstance(key, bytes):
44+
if isinstance(key, bytes):
4745
key = key.decode("utf-8")
4846
self._db[key] = value
4947

src/saml2/httpbase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import calendar
22
import copy
3+
import http.cookiejar as http_cookiejar
34
from http.cookies import SimpleCookie
45
import logging
56
import re
@@ -8,7 +9,6 @@
89
from urllib.parse import urlparse
910

1011
import requests
11-
from six.moves import http_cookiejar
1212

1313
from saml2 import SAMLError
1414
from saml2 import class_name

src/saml2/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def do_uiinfo(_uiinfo):
276276
_attr = "keywords"
277277
val = _uiinfo[_attr]
278278
inst = getattr(uii, _attr)
279-
# list of six.string_types, dictionary or list of dictionaries
279+
# list of strings, bytes, dictionary or list of dictionaries
280280
if isinstance(val, list):
281281
for value in val:
282282
keyw = mdui.Keywords()

src/saml2/saml.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ def _wrong_type_value(xsd, value):
228228
msg = msg.format(xsd=xsd, type=type(value), value=value)
229229
raise ValueError(msg)
230230

231-
# only work with six.string_types
232231
if isinstance(value, bytes):
233232
value = value.decode("utf-8")
234233

0 commit comments

Comments
 (0)