Skip to content

Commit f0e21fc

Browse files
committed
adjust imports
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 8bee579 commit f0e21fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cyclonedx/serialization/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020
Set of helper classes for use with ``serializable`` when conducting (de-)serialization.
2121
"""
2222

23+
import sys
2324
from typing import Any, Optional
2425
from uuid import UUID
2526

2627
# See https://github.com/package-url/packageurl-python/issues/65
2728
from packageurl import PackageURL
2829
from py_serializable.helpers import BaseHelper
2930

30-
try:
31+
if sys.version_info > (3, 13):
3132
from warnings import deprecated
32-
except ImportError:
33+
else:
3334
from typing_extensions import deprecated
3435

3536
from ..exception.serialization import CycloneDxDeserializationException, SerializationOfUnexpectedValueException

0 commit comments

Comments
 (0)