Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use importlib_metadata instead of importlib.metadata for python<3.10 #2304

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ install_requires =
filelock>=3.2,<4
platformdirs>=2,<3
six>=1.9.0,<2 # keep it >=1.9.0 as it may cause problems on LTS platforms
importlib-metadata>=0.12;python_version<"3.8"
importlib-metadata>=0.12;python_version<"3.10"
importlib-resources>=1.0;python_version<"3.7"
pathlib2>=2.3.3,<3;python_version < '3.4' and sys.platform != 'win32'
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Expand Down
2 changes: 1 addition & 1 deletion src/virtualenv/run/plugin/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
from collections import OrderedDict

if sys.version_info >= (3, 8):
if sys.version_info >= (3, 10):
from importlib.metadata import entry_points

importlib_metadata_version = ()
Expand Down
2 changes: 1 addition & 1 deletion tasks/__main__zipapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, content):
def versioned_distribution_class():
global _VER_DISTRIBUTION_CLASS
if _VER_DISTRIBUTION_CLASS is None:
if sys.version_info >= (3, 8):
if sys.version_info >= (3, 10):
# noinspection PyCompatibility
from importlib.metadata import Distribution
else:
Expand Down