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 imports for Python 3.9 #4860

Merged
merged 2 commits into from
Feb 11, 2020
Merged

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Jan 21, 2020

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
Copy link

codecov-io commented Jan 21, 2020

Codecov Report

Merging #4860 into develop will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #4860   +/-   ##
========================================
  Coverage    93.93%   93.93%           
========================================
  Files          189      189           
  Lines        14511    14511           
========================================
  Hits         13631    13631           
  Misses         880      880
Impacted Files Coverage Δ
awscli/customizations/history/db.py 98.02% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81759f6...0c9c088. Read the comment docs.

@fchorney
Copy link

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
Copy link
Contributor

joguSD commented Feb 11, 2020

Thanks for the PR, this looks good to me!

@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