Skip to content

Commit

Permalink
Apply workaround on all versions of Python. Fixes #3452.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 14, 2022
1 parent 8c9cf2f commit 03da59c
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 03da59c

Please sign in to comment.