Skip to content

Commit 2d01116

Browse files
committed
add support pre Python 3.8
Signed-off-by: Paul Horton <[email protected]>
1 parent 57e9dc7 commit 2d01116

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

cyclonedx/utils/conda.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@
1717
# SPDX-License-Identifier: Apache-2.0
1818
# Copyright (c) OWASP Foundation. All Rights Reserved.
1919
import json
20+
import sys
2021
from json import JSONDecodeError
22+
from typing import Union
23+
24+
if sys.version_info >= (3, 8, 0):
25+
from typing import TypedDict
26+
else:
27+
from typing_extensions import TypedDict
2128

22-
from typing import TypedDict, Union
2329
from urllib.parse import urlparse
2430

2531

poetry.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ python = "^3.6"
4141
packageurl-python = "^0.9.4"
4242
requirements_parser = "^0.2.0"
4343
setuptools = "^50.3.2"
44-
importlib-metadata = "^4.8.1"
44+
importlib-metadata = { version = "^4.8.1", python = "~3.6 | ~3.7" }
4545
toml = "^0.10.2"
46+
typing-extensions = { version = "^3.10.0", python = "~3.6 | ~3.7" }
4647

4748
[tool.poetry.dev-dependencies]
4849
tox = "^3.24.3"

0 commit comments

Comments
 (0)