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

[py37] Import ABCs from collections.abc #2097

Closed
wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Jul 4, 2018

Python 3 has moved all collection abstract base classes to
collections.abc. Python 3.7 started to deprecate the old aliases.

The whole import block needs to be protected with import-error and
no-name-in-module, because Python 2 doesn't have collections.abc module and
collections.abc.Mapping, while Python 3 doesn't have collections.Mapping.

Fixes: https://pagure.io/freeipa/issue/7609
Signed-off-by: Christian Heimes cheimes@redhat.com

Python 3 has moved all collection abstract base classes to
collections.abc. Python 3.7 started to deprecate the old aliases.

The whole import block needs to be protected with import-error and
no-name-in-module, because Python 2 doesn't have collections.abc module and
collections.abc.Mapping, while Python 3 doesn't have collections.Mapping.

Fixes: https://pagure.io/freeipa/issue/7609
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran added trivial needs review Pull Request is waiting for a review re-run Trigger a new run of PR-CI labels Jul 4, 2018
@freeipa-pr-ci freeipa-pr-ci removed the re-run Trigger a new run of PR-CI label Jul 4, 2018
@frasertweedale frasertweedale self-assigned this Jul 5, 2018
Copy link
Contributor

@frasertweedale frasertweedale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked carefully and I can't see any collections ABCs that you've missed. The change is trivial, tests are passing, so ACK.

@frasertweedale frasertweedale added ack Pull Request approved, can be merged and removed needs review Pull Request is waiting for a review labels Jul 5, 2018
@tiran tiran added the pushed Pull Request has already been pushed label Jul 5, 2018
@tiran
Copy link
Member Author

tiran commented Jul 5, 2018

master:

  • 198a2c6 Import ABCs from collections.abc

@tiran tiran closed this Jul 5, 2018
@tiran tiran deleted the issue7609_collections.abc branch July 6, 2018 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed trivial
Projects
None yet
3 participants