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

Redo "Import abstract base classes from collection.abc in python 3.3+" #54834

Closed
wants to merge 1 commit into from

Conversation

sblaisot
Copy link
Contributor

@sblaisot sblaisot commented Oct 1, 2019

What does this PR do?

This PR reintroduces #54309

Starting from Python 3.3 abstract base classes from collections was moved to collections.abc. For backward compatibility those classes can be imported from collections directly. Since Python 3.7, importing abstract base classes from collections directly leads to this warning:

DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

This PR moves imports of abstract base classes from collections to collections.abc in compatible versions of Python (with a falback to importing from collections).

What issues does this PR fix or reference?

This PR fixes #52120

This has been previously fixed in #49487 but it seems the fix was incomplete.

Commits signed with GPG?

No

@dwoz
Copy link
Contributor

dwoz commented Dec 9, 2019

@sblaisot We are no longer accepting PRs to the develop branch. This needs to be re-opened against the master branch. You can link to this PR from the new one to preserve any disscussion history. Sorry for the confusion.

@dwoz dwoz closed this Dec 9, 2019
@sblaisot sblaisot deleted the collections-deprecated branch January 17, 2020 15:22
@sblaisot
Copy link
Contributor Author

sblaisot commented Jan 17, 2020

I just also wanted to say that closing PR due to a branch policy change on your side instead of changing target branch of the PR is a bit frustrating for external contributors who just want to help.

Nevermind, PR reopened against master as #55900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants