-
Notifications
You must be signed in to change notification settings - Fork 66
fix(collections): importing ABCs from collections directly is deprecated #201
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
=======================================
Coverage 99.91% 99.91%
=======================================
Files 44 44
Lines 2398 2400 +2
Branches 176 176
=======================================
+ Hits 2396 2398 +2
Misses 2 2
Continue to review full report at Codecov.
|
|
Thanks for fixing this tech debt, @tvuillemin! Largely, these changes LGTM. Just have a few suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this, @tvuillemin! I have two suggestions before approving this.
First, there are other usages of the abc module that need to be fixed. For completion, could you address these as well in your PR? Here is a GitHub query for all usages that I could find: https://github.com/prkumar/uplink/search?q=collections.Mapping+OR+collections.Iterable+OR+collections.Sequence&unscoped_q=collections.Mapping+OR+collections.Iterable+OR+collections.Sequence
Second: in general, this library follows Google's Python style guide. Accordingly, when importing submodules, the recommendation is to use from abc import collections rather than import collections.abc. Can you update the PR to follow this convention for consistency?
Thanks in advance for contributing! If you want, please add yourself to the repo's AUTHORS file in your next commit.
It generates PytestDeprecationWarnings, and will stop working in Python3.9 anyway
|
Hi! Done. I tried to respect the conventions you are using. I had a doubt though, regarding I would just like to add a small remark, if you don't mind. It felt a bit weird to write Cheers. |
|
@tvuillemin - Thanks for addressing the other usages and updating the imports to adhere to the style guide! Regarding the import statement for Regarding your second point, to avoid clashing with the |
prkumar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added thoughts in #201 (comment)
Changes proposed in this pull request:
Attention: @prkumar