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

Improve interface registry: Fix DeprecationWarning + better typing + more robust #1465

Merged
merged 19 commits into from Dec 21, 2022

Conversation

felixdivo
Copy link
Collaborator

@felixdivo felixdivo commented Dec 21, 2022

  • Previously, the entry_points().get("can.interface", [])} expression issued the following: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.. This patch fixes it. I also tested it locally. To reproduce the error before the change, simply run python -W error -c 'import can.interfaces'.
  • Slightly narrows the type of can.interfaces.BACKENDS from Dict[str, Tuple[str, ...]] to Dict[str, Tuple[str, str]]
  • Will behave more robust if too many : are given in entry-point declaration

…d. Use select."

Previously, the change line issued the above deprecation warning. This code fixes it. I also tested it locally. To reproduce the error before the change, simply run `python -W error -c 'import can.interfaces'`.
@felixdivo felixdivo added minor QA about improving and maintaining the quality of the library labels Dec 21, 2022
@felixdivo felixdivo added this to the Next Release milestone Dec 21, 2022
@felixdivo felixdivo self-assigned this Dec 21, 2022
@felixdivo felixdivo mentioned this pull request Dec 21, 2022
@zariiii9003
Copy link
Collaborator

Github actions is slow today 🤔

@felixdivo
Copy link
Collaborator Author

Github actions is slow today 🤔

Jup ... But I am too lazy to develop this locally ^^

felixdivo and others added 4 commits December 21, 2022 18:34
Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
@felixdivo felixdivo removed the minor label Dec 21, 2022
@felixdivo felixdivo changed the title Fix "DeprecationWarning: SelectableGroups dict interface is deprecated. Use select." Improve interface registry: Fix DeprecationWarning + better typing + more robust Dec 21, 2022
Copy link
Collaborator

@zariiii9003 zariiii9003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@felixdivo
Copy link
Collaborator Author

Thanks for having a look. 😃

@felixdivo felixdivo merged commit 6d41056 into develop Dec 21, 2022
@felixdivo felixdivo deleted the felixdivo-patch-2 branch December 21, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA about improving and maintaining the quality of the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants