File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ install_requires =
5353 pytz
5454 requests >= 1.0.0
5555 six
56- importlib_resources
56+ importlib_resources; python_version<'3.7'
5757 xmlschema >= 1.2.1
5858
5959
Original file line number Diff line number Diff line change 99import os
1010import re
1111import six
12+ import sys
1213from uuid import uuid4 as gen_random_key
1314from time import mktime
1415from tempfile import NamedTemporaryFile
1516from subprocess import Popen
1617from subprocess import PIPE
17- from importlib_resources import path as _resource_path
1818
1919from OpenSSL import crypto
2020
5959from saml2 .xml .schema import node_to_schema
6060from saml2 .xml .schema import XMLSchemaError
6161
62+ # importlib.resources was introduced in python 3.7
63+ if sys .version_info [:2 ] >= (3 , 7 ):
64+ from importlib .resources import path as _resource_path
65+ else :
66+ from importlib_resources import path as _resource_path
6267
6368logger = logging .getLogger (__name__ )
6469
Original file line number Diff line number Diff line change 1- from importlib_resources import path as _resource_path
1+ import sys
22
33from xmlschema import XMLSchema as _XMLSchema
44from xmlschema .exceptions import XMLSchemaException as XMLSchemaError
55
66import saml2 .data .schemas as _data_schemas
77
8+ # importlib.resources was introduced in python 3.7
9+ if sys .version_info [:2 ] >= (3 , 7 ):
10+ from importlib .resources import path as _resource_path
11+ else :
12+ from importlib_resources import path as _resource_path
813
914def _create_xml_schema_validator (source , ** kwargs ):
1015 kwargs = {
You can’t perform that action at this time.
0 commit comments