Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple adapter construction and device binding #210

Merged
merged 5 commits into from
Mar 3, 2017

Conversation

MichaelWedel
Copy link
Contributor

This fixes #207.

With these changes, device is no longer an argument of Adpater.__init__. This makes it possible to construct an adapter without the need of having a device object available at exactly that point. As a side-effect, it is now also much easier to "re-bind" another device, e.g. to swap out the device at runtime completely seamlessly (from the adapter's point of view). This will make it much easier to implemented #98.

Also, device is now a "proper" member of Adapter, making it less awkward to access the device when writing an interface. The internal _device still works, but maybe we should add a recommendation to the release notes that device is now available and should be used instead.

The user facing documentation has been updated.

@MikeHart85
Copy link
Contributor

Cannot see any issues with this.... ready to merge if you are 👍

@MikeHart85 MikeHart85 merged commit 080dd9b into master Mar 3, 2017
@MikeHart85 MikeHart85 deleted the 207_remove_device_from_adapter_constructor branch March 3, 2017 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove device-argument from Adapter's init
2 participants