MAINT: use collections.abc for 3.7#11733
Merged
Merged
Conversation
timhoffm
approved these changes
Jul 23, 2018
Member
timhoffm
left a comment
There was a problem hiding this comment.
Thanks! After reverting the change to OrderedDict this will be good.
| class _OrderedSet(collections.abc.MutableSet): | ||
| def __init__(self): | ||
| self._od = collections.OrderedDict() | ||
| self._od = collections.abc.OrderedDict() |
Contributor
Author
|
Lets see if this works. |
anntzer
reviewed
Jul 24, 2018
| def sanitize_sequence(data): | ||
| """Converts dictview object to list""" | ||
| return list(data) if isinstance(data, collections.MappingView) else data | ||
| return list(data) if isinstance(data, collections.abc.MappingView) else data |
Contributor
There was a problem hiding this comment.
need a line break here, the style checker is not happy
Contributor
|
@tacaswell I think avoiding a warning on Py3.7 makes this worth milestoning for mpl3.0? |
Contributor
|
OSX failure is irrelevant and will be "fixed" (or worked around, at least) by #11763. Allowing myself to remilestone to 3.0 per above. |
Contributor
|
Thanks for the PR. |
Member
|
@meeseeksdev backport to v2.2.x |
|
There seem to be a conflict, please backport manually |
3 tasks
Closed
tacaswell
pushed a commit
to tacaswell/matplotlib
that referenced
this pull request
Sep 5, 2019
MAINT: use collections.abc for 3.7 Conflicts: lib/matplotlib/cbook/__init__.py Added try-except block to handle py2 case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scipy is getting some issues when trying to test on Python 3.7 because of a DeprecationWarning:
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop workingThis PR just changes a few instances of
collections.Xintocollections.abc.X.