Skip to content

boto: drop dependency on types-six #8792

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

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Sep 26, 2022

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Just to state explicitly what's going on here:

  1. boto at runtime does, in fact, still use six internally
  2. But typeshed only supports Python 3, and six.http_client is the same as http.client on Python 3
  3. So that we can allow non-types dependencies without introducing a security hole, it's useful to ban stubs from having any dependencies if the runtime package they're stubs for doesn't also have that dependency. This applies to stub dependencies as well, since they're also now potentially dangerous given that stubs can now have non-stubs dependencies.
  4. boto doesn't actually, officially, depend on six at runtime, it just vendors six. This means that the machinery in the stub-uploader can't detect that boto uses six at runtime, ergo types-boto also cannot depend on types-six. And because of point (2) above, it's not a big deal to remove the dependency.

@@ -1,2 +1,2 @@
version = "2.49.*"
requires = ["types-six"]
requires = []
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
requires = []

@JelleZijlstra JelleZijlstra merged commit 9abe56a into python:master Sep 26, 2022
@hauntsaninja hauntsaninja deleted the boto-six branch September 27, 2022 19:41
hauntsaninja added a commit to hauntsaninja/stub_uploader that referenced this pull request Oct 11, 2022
Caused by a merge race with python/typeshed#8792
JelleZijlstra pushed a commit to typeshed-internal/stub_uploader that referenced this pull request Oct 11, 2022
Caused by a merge race with python/typeshed#8792
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