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

Do not require importlib_metadata on py3.8 #9

Merged
merged 4 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def read_file(path_segments):
"pynacl>=0.3.0",
"typing_extensions>=3.5",
'typing>=3.5;python_version<"3.5"',
"importlib_metadata",
'importlib_metadata;python_version<"3.8"',
],
long_description=read_file(("README.rst",)),
keywords="json",
Expand Down
5 changes: 4 additions & 1 deletion signedjson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from importlib_metadata import version, PackageNotFoundError
try:
from importlib.metadata import version, PackageNotFoundError
except ImportError: # pragma: nocover
clokep marked this conversation as resolved.
Show resolved Hide resolved
from importlib_metadata import version, PackageNotFoundError

try:
__version__ = version(__name__)
Expand Down