Skip to content

Sync typeshed - #14992

Merged
JelleZijlstra merged 5 commits into
python:masterfrom
AlexWaygood:mypybot/sync-typeshed
Apr 1, 2023
Merged

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

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented Apr 1, 2023 •

Copy link
Copy Markdown
Member

Source commit: python/typeshed@6fd245d

The automated PR failed again last night due to merge conflicts in the functools patch: https://github.com/python/mypy/actions/runs/4580127588/jobs/8088541502

⚠️ 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 April 1, 2023 15:27
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)
@github-actions

github-actions Bot commented Apr 1, 2023

Copy link
Copy Markdown
Contributor

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

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/cuda.py: note: In function "cuda_version_and_device_count":
+ cwltool/cuda.py:21:13: error: Item "Node" of "Optional[Node]" has no attribute "data"  [union-attr]
+ cwltool/cuda.py:21:13: error: Item "None" of "Optional[Node]" has no attribute "data"  [union-attr]

@AlexWaygood

Copy link
Copy Markdown
Member Author

The sole mypy_primer hit comes from:

@JelleZijlstra
JelleZijlstra merged commit e85f54e into python:master Apr 1, 2023
@AlexWaygood
AlexWaygood deleted the mypybot/sync-typeshed branch April 1, 2023 16:21
JelleZijlstra pushed a commit that referenced this pull request Apr 1, 2023
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