Skip to content

Commit a45e887

Browse files
authored
Fix import of typing extensions (#59)
* Fix import of typing extensions * Fix log message * Use string type for python 3.6 compatibility * Add newer python versions to setup.py
1 parent d1d82d4 commit a45e887

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
'Programming Language :: Python :: 3.7',
3434
'Programming Language :: Python :: 3.8',
3535
'Programming Language :: Python :: 3.9',
36+
'Programming Language :: Python :: 3.10',
37+
'Programming Language :: Python :: 3.11',
3638
'Development Status :: 4 - Beta',
3739
],
3840
entry_points={

src/dicomweb_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.54.2'
1+
__version__ = '0.54.3rc'
22

33
from dicomweb_client.api import DICOMwebClient, DICOMfileClient
44
from dicomweb_client.protocol import DICOMClient

src/dicomweb_client/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def __getstate__(self) -> dict:
724724
def _connection(self) -> sqlite3.Connection:
725725
"""sqlite3.Connection: database connection"""
726726
if self._db_connection is None:
727-
self._db_connection = sqlite3.connect(self._db_filepath)
727+
self._db_connection = sqlite3.connect(str(self._db_filepath))
728728
self._db_connection.row_factory = sqlite3.Row
729729
return self._db_connection
730730

src/dicomweb_client/protocol.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
import sys
12
from typing import (
23
Any,
34
Dict,
45
Iterator,
56
List,
67
Optional,
7-
Protocol,
8-
runtime_checkable,
98
Sequence,
109
Tuple,
1110
Union,
1211
)
12+
if sys.version_info.minor < 8:
13+
from typing_extensions import Protocol, runtime_checkable
14+
else:
15+
from typing import Protocol, runtime_checkable
1316

1417
from pydicom.dataset import Dataset
1518

src/dicomweb_client/web.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2094,7 +2094,9 @@ def search_for_series(
20942094
""" # noqa: E501
20952095
if study_instance_uid is not None:
20962096
self._assert_uid_format(study_instance_uid)
2097-
logger.info(f'search for series of study "{study_instance_uid}"')
2097+
logger.info(f'search for series of study "{study_instance_uid}"')
2098+
else:
2099+
logger.info('search for series')
20982100
url = self._get_series_url(_Transaction.SEARCH, study_instance_uid)
20992101
params = self._parse_qido_query_parameters(
21002102
fuzzymatching, limit, offset, fields, search_filters

0 commit comments

Comments
 (0)