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

Fix collections.abc deprecation warning for py 3.8 #563

Merged
merged 3 commits into from
Feb 1, 2019
Merged

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Feb 1, 2019

Fixes #562

@T4rk1n T4rk1n changed the title Fix collections.abc deprecation warning for py 3.8 [WIP] Fix collections.abc deprecation warning for py 3.8 Feb 1, 2019
@T4rk1n
Copy link
Contributor Author

T4rk1n commented Feb 1, 2019

@alexcjohnson Please review.

@T4rk1n T4rk1n changed the title [WIP] Fix collections.abc deprecation warning for py 3.8 Fix collections.abc deprecation warning for py 3.8 Feb 1, 2019
def patch_collections_abc(member):
if six.PY2:
return getattr(collections, member)
return getattr(collections.abc, member)
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a 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! 💃

@T4rk1n T4rk1n merged commit 414cac4 into master Feb 1, 2019
@T4rk1n T4rk1n deleted the fix-component-abc branch February 1, 2019 15:16
HammadTheOne pushed a commit to HammadTheOne/dash that referenced this pull request May 28, 2021
* 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
AnnMarieW pushed a commit to AnnMarieW/dash that referenced this pull request Jan 6, 2022
* 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
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.

None yet

2 participants