diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f54cf17..0e6b1867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fixed a bug where sending and receiving socket are used after they have been closed already [#328](https://github.com/Draegerwerk/sdc11073/issues/328) - fixed a bug where `getsockname()` is called before the socket is binded +- fixed cyclic import [#333](https://github.com/Draegerwerk/sdc11073/issues/333) ## [2.0.0rc1] - 2024-01-31 diff --git a/src/sdc11073/provider/providerimpl.py b/src/sdc11073/provider/providerimpl.py index 9c5775a0..e5b5f78a 100644 --- a/src/sdc11073/provider/providerimpl.py +++ b/src/sdc11073/provider/providerimpl.py @@ -27,7 +27,6 @@ from sdc11073.xml_types.wsd_types import ProbeMatchesType, ProbeMatchType from sdc11073.roles.protocols import ProductProtocol, WaveformProviderProtocol # import here for code cov. :( -from .components import default_sdc_provider_components from .periodicreports import PeriodicReportsHandler, PeriodicReportsNullHandler if TYPE_CHECKING: @@ -126,6 +125,7 @@ def __init__(self, ws_discovery: WsDiscoveryProtocol, self._socket_timeout = socket_timeout or int(max_subscription_duration * 1.2) self._log_prefix = log_prefix if default_components is None: + from .components import default_sdc_provider_components # lazy import avoids cyclic import default_components = default_sdc_provider_components self._components = copy.deepcopy(default_components) if specific_components is not None: