Only use backported importlib_metadata on Python < 3.8 (#4214)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2021-08-24 08:50:39 -07:00 committed by GitHub
parent 180a48751d
commit bce65b7a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -11,12 +11,16 @@ from abc import abstractmethod
from io import BytesIO
from collections import defaultdict
try:
from importlib.metadata import version
except ImportError:
from importlib_metadata import version
from botocore.config import Config
from botocore.handlers import BUILTIN_HANDLERS
from botocore.awsrequest import AWSResponse
from distutils.version import LooseVersion
from http.client import responses as http_responses
from importlib_metadata import version
from urllib.parse import urlparse
from werkzeug.wrappers import Request

View File

@ -39,7 +39,7 @@ install_requires = [
"MarkupSafe!=2.0.0a1", # This is a Jinja2 dependency, 2.0.0a1 currently seems broken
"Jinja2>=2.10.1",
"more-itertools",
"importlib_metadata"
"importlib_metadata ; python_version < '3.8'"
]
_dep_PyYAML = "PyYAML>=5.1"