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

feat: Support urllib3 <= 2.1 for py 3.11 #380

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Conversation

astuyve
Copy link
Contributor

@astuyve astuyve commented Oct 17, 2023

What does this PR do?

Followup to #329
Fixes #376

Motivation

Right now boto3 is at 1.26.90 for 3.7, 3.8, 3.9, and 3.10. This causes a known issue when users supply version >= 2.0 of urllib3.

Previously we pinned urllib3 to all versions of this library, but we'll open this up for Python 3.11.

Also, this marks urllib3 as optional as this library doesn't directly depend on it.

Testing Guidelines

I tested importing boto3 using urllib3==2.0.7 on python 3.10, it fails to import.
I tested the same function code w/ urllib3==2.0.7 on python 3.11 and the code runes fine.

This pin and the automated tests all pass, so we should be confident this change will open up py3.11 users to urllib3 2.0 without impacting other users using incompatible runtimes (3.7, 3.8, 3.9, and 3.10)

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@LewisCowlesMotive
Copy link

👍 ship it 🙏 🚀

Copy link
Contributor

@duncanista duncanista left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

LGTM – just one question.

Could you be more specific on

I tested this on 3.11 and see it functions correctly, but importing boto3 in 3.10 and under fails.

I'm not sure I understand it correctly.

@astuyve
Copy link
Contributor Author

astuyve commented Oct 18, 2023

Sorry, I'll clarify and update:
I tested importing boto3 using urllib3==2.0.7 on python 3.10, it fails to import.
I tested the same function code w/ urllib3==2.0.7 on python 3.11 and the code runes fine.

@astuyve astuyve merged commit 73e1b3a into main Oct 18, 2023
16 checks passed
@astuyve astuyve deleted the aj/allow-urllib3-2-on-py-11 branch October 18, 2023 14:26
@LewisCowlesMotive
Copy link

LewisCowlesMotive commented Oct 18, 2023

To confirm (for me please),

boto3 = { version = "^1.28.0", optional = true }

The only material difference from my PR, makes this work with Python 3.10, or it is still broken if it selects boto3?

Update, ignore, I see 3.11 now

@astuyve
Copy link
Contributor Author

astuyve commented Oct 18, 2023

Yup, just 3.11

@LewisCowlesMotive
Copy link

Works for me, it's the only one I'm using 😄

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.

URLLib3 is pinned below version 2
3 participants