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 deprecation warnings for collections.abc (will break in Python 3.9) #1865

Closed
wants to merge 2 commits into from
Closed

fix deprecation warnings for collections.abc (will break in Python 3.9) #1865

wants to merge 2 commits into from

Conversation

terencehonles
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Oct 30, 2019

Codecov Report

Merging #1865 into develop will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1865      +/-   ##
===========================================
+ Coverage    92.56%   92.67%   +0.11%     
===========================================
  Files           53       53              
  Lines        10000    10181     +181     
===========================================
+ Hits          9256     9435     +179     
- Misses         744      746       +2
Impacted Files Coverage Δ
botocore/session.py 98.13% <100%> (+0.01%) ⬆️
botocore/awsrequest.py 98.37% <100%> (+0.01%) ⬆️
botocore/configprovider.py 93.37% <0%> (-0.09%) ⬇️
botocore/client.py 99.73% <0%> (-0.03%) ⬇️
botocore/auth.py 98.3% <0%> (-0.03%) ⬇️
botocore/args.py 100% <0%> (ø) ⬆️
botocore/exceptions.py 99.41% <0%> (+0.01%) ⬆️
botocore/signers.py 98.52% <0%> (+0.02%) ⬆️
botocore/httpsession.py 92.48% <0%> (+0.04%) ⬆️
... and 3 more

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 2f8950d...4176d97. Read the comment docs.

@b4stien
Copy link

b4stien commented Oct 30, 2019

FYI the title seems misleading: it breaks with the newly released Python 3.8, not the next-year unreleased 3.9. We haven't tested yet, but the message seems straightforward about this:

/opt/api_venv/lib/python3.7/site-packages/botocore/awsrequest.py:624: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

@toolness
Copy link

Thanks, it would be great to see this PR merged!

@b4stien it looks like they actually pushed the removal to 3.9 when they released 3.8--see #1615 (comment) or this Twitter thread for more details.

@terencehonles
Copy link
Contributor Author

@toolness I didn't realize it moved! I thought I just remembered it incorrectly.

I had checked the Python source and saw it in 3.8 when I was checking this and itypes, which I had on an ignore list for the DeprecationWarning and was preparing to start testing against 3.8.

@Syntactical01
Copy link

Syntactical01 commented Dec 5, 2019

Is this fixed yet? I feel like this should be a higher priority item. Lambda supports 3.8 yet we cannot safely use boto3 in Python 3.8 because of this deprecation. This is still an issue in botocore, moto, and boto.

Copy link

@tirkarthi tirkarthi left a comment

Choose a reason for hiding this comment

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

There is one more instance in tests which could also be fixed with the PR :

class CustomHeaderDict(collections.MutableMapping):

@tirkarthi
Copy link

Python 3.9 will raise an ImportError as per upstream PR : python/cpython#10596

@thompsjj
Copy link

Will anyone ever merge this?

@terencehonles
Copy link
Contributor Author

@tirkarthi thanks, I updated the test!

Now to get this merged 🤔...

@terencehonles
Copy link
Contributor Author

This is no longer needed with #1922 which does the same thing.

@terencehonles terencehonles deleted the fix-collections.abc-deprecation-warnings branch January 3, 2020 20:07
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.

7 participants