-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix collections.abc deprecation warning for py 3.8 #563
Conversation
5a954e1
to
898ac22
Compare
898ac22
to
ddac3c7
Compare
@alexcjohnson Please review. |
def patch_collections_abc(member): | ||
if six.PY2: | ||
return getattr(collections, member) | ||
return getattr(collections.abc, member) |
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.
Ah yep, that'll work. But why did you do it this way rather than just return collections
or return collections.abc
, so you could use it as patch_collections_abc.Callable
?
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.
You have a member that is different by name which is a string, this consider the module like a dict. Other solution would work too but I came up with this first.
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 doing this! 💃
* Don't attempt to resize unmounted graphs Fixes #534 * Anon resize function -> named bound function; add removeEventListener * Add additional gd conditional in plot() * Add integration test for resizing unmounted graphs * Add changelog entry for PR plotly#563 (Don't attempt to resize unmounted graphs) * black for test_integration.py * CHANGELOG ticks
* Don't attempt to resize unmounted graphs Fixes #534 * Anon resize function -> named bound function; add removeEventListener * Add additional gd conditional in plot() * Add integration test for resizing unmounted graphs * Add changelog entry for PR plotly#563 (Don't attempt to resize unmounted graphs) * black for test_integration.py * CHANGELOG ticks
Fixes #562