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

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.58%. Comparing base (72df8fa) to head (e891fa0).
Report is 2132 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@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