Skip to content

Commit

Permalink
fixed cyclic import (Draegerwerk#334)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the title above -->
<!--- Link the corresponding issues after you created the pull request
-->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [x] I have updated the [changelog](../CHANGELOG.md) accordingly.
- [ ] I have added tests to cover my changes.
  • Loading branch information
deichmab-draeger authored Feb 8, 2024
1 parent 27eaa63 commit c1ead95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/sdc11073/provider/providerimpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c1ead95

Please sign in to comment.