Skip to content

Commit

Permalink
fix: Python 3.12 removed pkgutils
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Apr 19, 2023
1 parent 45ed6ea commit 3a476c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_venv.py
Expand Up @@ -116,8 +116,12 @@ def sixth(x):
__path__ = extend_path(__path__, __name__)
""")
make_file("bug888/app/testcov/main.py", """\
import pkg_resources
for entry_point in pkg_resources.iter_entry_points('plugins'):
try: # pragma: no cover
entry_points = __import__("pkg_resources").iter_entry_points('plugins')
except ImportError: # pragma: no cover
import importlib.metadata
entry_points = importlib.metadata.entry_points(group="plugins")
for entry_point in entry_points:
entry_point.load()()
""")
make_file("bug888/plugin/setup.py", """\
Expand Down

0 comments on commit 3a476c3

Please sign in to comment.