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

Sync typeshed #15590

Merged
merged 5 commits into from
Jul 4, 2023
Merged

Sync typeshed #15590

merged 5 commits into from
Jul 4, 2023

Conversation

AlexWaygood
Copy link
Member

Source commit: python/typeshed@fc7d472

More merge conflicts meant the automated PR failed a few days ago.

⚠️ Remember to use "rebase and merge" rather than "squash and merge" for this PR, so that we can easily update the commit hashes to cherry-pick in the misc/sync-typeshed.py script. ⚠️

AlexWaygood and others added 5 commits July 4, 2023 18:18
This is allegedly causing large performance problems, see 13821

typeshed/8231 had zero hits on mypy_primer, so it's not the worst thing
to undo. Patching this in typeshed also feels weird, since there's a
more general soundness issue. If a typevar has a bound or constraint, we
might not want to solve it to a Literal.

If we can confirm the performance regression or fix the unsoundness
within mypy, I might pursue upstreaming this in typeshed.

(Reminder: add this to the sync_typeshed script once merged)
Since the plugin provides superior type checking: python#13987 (comment)
A manual cherry-pick of e437cdf.
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Diff from mypy_primer, showing the effect of this PR on open source code:

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/connector.py:1067: error: Argument 1 to "connection_made" of "BaseProtocol" has incompatible type "Transport | None"; expected "BaseTransport"  [arg-type]
+ aiohttp/connector.py:1070: error: Incompatible return value type (got "tuple[Transport | None, ResponseHandler]", expected "tuple[BaseTransport, ResponseHandler]")  [return-value]

@AlexWaygood
Copy link
Member Author

Diff from mypy_primer, showing the effect of this PR on open source code:

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/connector.py:1067: error: Argument 1 to "connection_made" of "BaseProtocol" has incompatible type "Transport | None"; expected "BaseTransport"  [arg-type]
+ aiohttp/connector.py:1070: error: Incompatible return value type (got "tuple[Transport | None, ResponseHandler]", expected "tuple[BaseTransport, ResponseHandler]")  [return-value]

This comes from a change requested by the aiohttp devs:

@svalentin svalentin merged commit 186fbb1 into python:master Jul 4, 2023
@AlexWaygood AlexWaygood deleted the mypybot/sync-typeshed branch July 4, 2023 18:54
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