Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed importlib_metadata to have requirement for < python 3.10 #577

Merged
merged 10 commits into from Jun 5, 2022
7 changes: 4 additions & 3 deletions hook-keyring.backend.py
@@ -1,6 +1,7 @@
# Used by pyinstaller to expose hidden imports

import importlib_metadata as metadata

try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata

hiddenimports = [ep.value for ep in metadata.entry_points(group='keyring.backends')]
5 changes: 4 additions & 1 deletion keyring/backend.py
Expand Up @@ -9,7 +9,10 @@

from typing import Optional

import importlib_metadata as metadata
try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata

from . import credentials, errors, util
from .util import properties
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -23,7 +23,7 @@ install_requires =
pywin32-ctypes!=0.1.0,!=0.1.1; sys_platform=="win32"
SecretStorage>=3.2; sys_platform=="linux"
jeepney>=0.4.2; sys_platform=="linux"
importlib_metadata >= 3.6
importlib_metadata >= 3.6; python_version < "3.10"

[options.packages.find]
exclude =
Expand Down
6 changes: 4 additions & 2 deletions tests/test_packaging.py
@@ -1,5 +1,7 @@
import importlib_metadata as metadata

try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata
from keyring import backend


Expand Down