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

Apply workaround on all versions of Python. #3739

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 4 additions & 2 deletions setuptools/_importlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def disable_importlib_metadata_finder(metadata):
Ensure importlib_metadata doesn't provide older, incompatible
Distributions.

Workaround for #3102.
Workaround for #3102 and #3452.
"""
try:
import importlib_metadata
Expand Down Expand Up @@ -36,11 +36,13 @@ def disable_importlib_metadata_finder(metadata):

if sys.version_info < (3, 10):
from setuptools.extern import importlib_metadata as metadata
disable_importlib_metadata_finder(metadata)
else:
import importlib.metadata as metadata # noqa: F401


disable_importlib_metadata_finder(metadata)


if sys.version_info < (3, 9):
from setuptools.extern import importlib_resources as resources
else:
Expand Down