Skip to content

Commit

Permalink
Move Python 3.8 compatibility logic into the compat package.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Apr 2, 2024
1 parent 07fab63 commit 57cf330
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 9 additions & 0 deletions keyring/compat/py38.py
@@ -0,0 +1,9 @@
import sys

__all__ = ['files']


if sys.version_info < (3, 9):
from importlib_resources import files
else:
from importlib.resources import files
5 changes: 1 addition & 4 deletions keyring/completion.py
Expand Up @@ -6,10 +6,7 @@
except ImportError:
pass

if sys.version_info < (3, 9):
from importlib_resources import files
else:
from importlib.resources import files
from .compat.py38 import files


class _MissingCompletionAction(argparse.Action):
Expand Down

0 comments on commit 57cf330

Please sign in to comment.