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

remove cgi module usage, which causes deprecation warnings on Python 3.11 #2794

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

wimglenn
Copy link
Contributor

On Python 3.11, as soon as botocore.utils is imported there are deprecation warnings due to the import cgi, a module which is slated to be removed from stdlib. PEP 594 recommends replacing the cgi.parse_header with this email.message substitute.

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2022

Codecov Report

Base: 93.57% // Head: 93.58% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (5e14dd4) compared to base (72df8fa).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 5e14dd4 differs from pull request most recent head e891fa0. Consider uploading reports for the commit e891fa0 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2794      +/-   ##
===========================================
+ Coverage    93.57%   93.58%   +0.01%     
===========================================
  Files           63       63              
  Lines        13300    13302       +2     
===========================================
+ Hits         12445    12449       +4     
+ Misses         855      853       -2     
Impacted Files Coverage Δ
botocore/utils.py 79.22% <100.00%> (+0.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wimglenn
Copy link
Contributor Author

@nateprewitt Just saw you move CI to Python-3.11, could we get some eyes on this PR please?

@nateprewitt
Copy link
Contributor

nateprewitt commented Nov 17, 2022

Hi @wimglenn, thanks for checking in. It's on our radar but we're currently looking at other options than email to replace this behavior. Once we have a conclusion on that, we'll revisit here with a decision. For the time being, there's no immediate risk of removal until October 2023 at the earliest with the release of 3.12.

Edit: I see it's slated for 3.13 in October 2025.

@wimglenn
Copy link
Contributor Author

wimglenn commented Nov 17, 2022

Interesting, is there some problem with the stdlib email recommendation from the PEP?
I'm not concerned about the removal in 3.13, but about the warning itself (some of us escalate warnings to errors in CI)

@nateprewitt
Copy link
Contributor

Sure, and I can see how that's a problem if your builds are running with warnings on. I think we can merge this for now and if we end up with another solution, we can revisit that later. Thanks for the PR!

@nateprewitt nateprewitt merged commit de07ce2 into boto:develop Nov 18, 2022
@wimglenn wimglenn deleted the no-cgi branch November 18, 2022 18:07
aws-sdk-python-automation added a commit that referenced this pull request Nov 18, 2022
* release-1.29.13:
  Bumping version to 1.29.13
  Update to latest partitions and endpoints
  Update to latest models
  remove cgi module usage, which causes deprecation warnings on Python 3.11 (#2794)
  Remove ssmsap from data directory
  Update quicksight sdk extras paginators
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.

3 participants