Skip to content

Commit 2922132

Browse files
committed
Fix import issues with python3
Relative imports are different and some modules were renamed.
1 parent da21b27 commit 2922132

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/saml2/assertion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import re
77
from saml2.saml import NAME_FORMAT_URI
88
import six
9-
import xmlenc
9+
from saml2 import xmlenc
1010

1111
from saml2 import saml
1212

src/saml2/client_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
to conclude its tasks.
77
"""
88
import threading
9-
from urllib import urlencode
10-
from urlparse import urlparse
9+
from six.moves.urllib.parse import urlencode
10+
from six.moves.urllib.parse import urlparse
1111
import six
1212

1313
from saml2.entity import Entity
@@ -25,7 +25,7 @@
2525
import time
2626
from saml2.soap import make_soap_enveloped_saml_thingy
2727

28-
from urlparse import parse_qs
28+
from six.moves.urllib.parse import parse_qs
2929

3030
from saml2.s_utils import signature, UnravelError, exception_trace
3131
from saml2.s_utils import do_attributes

src/saml2/ident.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import six
55

66
from hashlib import sha256
7-
from urllib import quote
8-
from urllib import unquote
7+
from six.moves.urllib.parse import quote
8+
from six.moves.urllib.parse import unquote
99
from saml2 import SAMLError
1010
from saml2.s_utils import rndstr
1111
from saml2.s_utils import PolicyError

src/saml2/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
22

3-
from attribute_converter import to_local
3+
from saml2.attribute_converter import to_local
44
from saml2 import time_util, BINDING_HTTP_REDIRECT
55
from saml2.s_utils import OtherError
66

tests/test_30_mdstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33
import datetime
44
import re
5-
from urllib import quote_plus
5+
from six.moves.urllib.parse import quote_plus
66
from saml2.httpbase import HTTPBase
77

88
from saml2.mdstore import MetadataStore, MetaDataMDX

0 commit comments

Comments
 (0)