Skip to content

Sync typeshed - #15590

Merged
svalentin merged 5 commits into
python:masterfrom
AlexWaygood:mypybot/sync-typeshed
Jul 4, 2023
Merged

svalentin merged 5 commits into
python:masterfrom
AlexWaygood:mypybot/sync-typeshed

Conversation

@AlexWaygood

Copy link
Copy Markdown
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

github-actions Bot commented Jul 4, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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