Fix collections.abc imports for Python 3.9 by hugovk · Pull Request #4860 · aws/aws-cli · GitHub
Skip to content

Fix collections.abc imports for Python 3.9 - #4860

Merged
joguSD merged 2 commits into
aws:developfrom
hugovk:fix-py39
Feb 11, 2020
Merged

joguSD merged 2 commits into
aws:developfrom
hugovk:fix-py39

Conversation

@hugovk

@hugovk hugovk commented Jan 21, 2020

Copy link
Copy Markdown
Contributor

Issue #, if available: Fixes #4853.

Description of changes:

This was emitting deprecation warning from Python 3.4 and it will stop working in Python 3.9. Reference: python/cpython#10596. There is already awscli/compat.py so import ABCs from collections_abc that has Python 2 and 3 compatibility.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


And a heads up: you'll need to migrate off of Nose for testing, it's unmaintained and doesn't support Python 3.9: nose-devs/nose#1099. I'd recommend pytest.

@codecov-io

codecov-io commented Jan 21, 2020

Copy link
Copy Markdown

@fchorney

Copy link
Copy Markdown

I've been seeing this deprecation in tests for a long time. Glad somebody came here to supply a fix. Looks good! Hope it gets merged in

@joguSD
joguSD merged commit 876e704 into aws:develop Feb 11, 2020
@joguSD

joguSD commented Feb 11, 2020

Copy link
Copy Markdown
Contributor

@hugovk
hugovk deleted the fix-py39 branch February 12, 2020 04:06
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.

Importing ABC directly from collections module will be ImportError in Python 3.9

4 participants