Skip to content

Commit

Permalink
fix(typing): use sys.version_info to import importlib.metadata or imp…
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Sep 2, 2021
1 parent 1c20ea9 commit 21a0db7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ notifications:

install:
- pip install nox

script:
- nox -s tests-3.8

Expand Down
6 changes: 3 additions & 3 deletions auditwheel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import pathlib
import sys

try:
if sys.version_info[:2] >= (3, 8):
from importlib import metadata
except ImportError:
import importlib_metadata as metadata # type: ignore
else:
import importlib_metadata as metadata

from typing import Optional

Expand Down

0 comments on commit 21a0db7

Please sign in to comment.