Skip to content

Commit

Permalink
Move compatibility import to _py37compat module.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 30, 2022
1 parent ece2b05 commit 4713f8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 7 additions & 0 deletions pip_run/_py37compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
try:
from importlib import metadata # type: ignore
except ImportError: # pragma: no cover
import importlib_metadata as metadata # type: ignore


metadata = metadata
6 changes: 1 addition & 5 deletions pip_run/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
import packaging.requirements
from jaraco.context import suppress

try:
from importlib import metadata # type: ignore
except ImportError: # pragma: no cover
import importlib_metadata as metadata # type: ignore

from ._py37compat import metadata
from ._py38compat import subprocess_path as sp


Expand Down

0 comments on commit 4713f8b

Please sign in to comment.