Skip to content

Avoid using new _typeshed protocol in pkg_resources for now - #11909

Merged
Avasam merged 3 commits into
python:mainfrom
Avasam:keep-using-types._LoaderProtocol-in-pkg_resources
May 12, 2024
Merged

Avoid using new _typeshed protocol in pkg_resources for now#11909
Avasam merged 3 commits into
python:mainfrom
Avasam:keep-using-types._LoaderProtocol-in-pkg_resources

Conversation

@Avasam

@Avasam Avasam commented May 12, 2024

Copy link
Copy Markdown
Collaborator

Ref: #11890 (comment)
Must be kept until next mypy release.
CC @AlexWaygood or @srittau

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we should just put the non-_typeshed version of the protocol in stubs/setuptools/pkg_resources/__init__.pyi, if that's the only place it's used now? That would also mean we wouldn't need to noqa it.

Basically LGTM though, thanks! (I'm about to board my second flight of the day so if you want me to re-review it might not happen until tomorrow ;)

@Avasam

Avasam commented May 12, 2024

Copy link
Copy Markdown
Collaborator Author

Have a safe flight!

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tyty!

@AlexWaygood AlexWaygood changed the title Keep using types._LoaderProtocol in pkg_resources Avoid using new _typeshed protocol in pkg_resources for now May 12, 2024
@github-actions

Copy link
Copy Markdown
Contributor

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

@Avasam
Avasam merged commit ef42294 into python:main May 12, 2024
@Avasam
Avasam deleted the keep-using-types._LoaderProtocol-in-pkg_resources branch May 12, 2024 20:20
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.

2 participants