Skip to content

Conversation

@AlexWaygood
Copy link
Member

Fixes #7632

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

from typing_extensions import TypeAlias

from urllib3 import _collections
from urllib3._collections import RecentlyUsedContainer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
from urllib3._collections import RecentlyUsedContainer
from urllib3._collections import RecentlyUsedContainer as RecentlyUsedContainer

Copy link
Member Author

Choose a reason for hiding this comment

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

I did that initially, but stubtest called me out. Turns out that it doesn't actually exist at runtime, we just use it for annotations in the stub. Not sure why stubtest didn't flag it before now.

Source: https://github.com/psf/requests/blob/main/requests/sessions.py

Stubtest: https://github.com/python/typeshed/runs/6046468647?check_suite_focus=true

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh interesting. stubtest's checking of type aliases is a little loose, see https://github.com/python/mypy/blob/ce858a6a0c85206ff877faf702293a9b67fae750/mypy/stubtest.py#L960 (I don't quite remember why I did it this way, maybe worth reinvestigating)

@github-actions
Copy link
Contributor

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

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.

Missing update method on the CaseInsensitiveDict

3 participants