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 #15055

Merged
merged 5 commits into from
Apr 15, 2023
Merged

Sync typeshed #15055

merged 5 commits into from
Apr 15, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Sync typeshed

Source commit:
python/typeshed@b0ed50e

Note that you will need to close and re-open the PR in order to trigger CI.

mypybot and others added 5 commits April 15, 2023 00:04
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:
#13987 (comment)
@AlexWaygood AlexWaygood reopened this Apr 15, 2023
@github-actions
Copy link
Contributor Author

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

werkzeug (https:/pallets/werkzeug)
+ src/werkzeug/routing/map.py:790: error: Unused "type: ignore[type-var]" comment
+ src/werkzeug/routing/map.py:791: error: Argument 1 to "urlunsplit" has incompatible type "Tuple[str, str, str, Union[Mapping[str, Any], str, None], None]"; expected "Iterable[None]"  [arg-type]

bandersnatch (https:/pypa/bandersnatch)
+ src/bandersnatch_storage_plugins/swift.py: note: In member "symlink_to" of class "SwiftPath":
+ src/bandersnatch_storage_plugins/swift.py:415: error: Signature of "symlink_to" incompatible with supertype "Path"  [override]
+ src/bandersnatch_storage_plugins/swift.py:415: note:      Superclass:
+ src/bandersnatch_storage_plugins/swift.py:415: note:          def symlink_to(self, target: Union[str, bytes, PathLike[str], PathLike[bytes]], target_is_directory: bool = ...) -> None
+ src/bandersnatch_storage_plugins/swift.py:415: note:      Subclass:
+ src/bandersnatch_storage_plugins/swift.py:415: note:          def symlink_to(self, src: Union[Path, str], target_is_directory: bool = ..., src_container: Optional[str] = ..., src_account: Optional[str] = ...) -> None

@hauntsaninja
Copy link
Collaborator

Looks like python/typeshed#9991 and python/typeshed#10019

@hauntsaninja hauntsaninja merged commit 69c774e into master Apr 15, 2023
@hauntsaninja hauntsaninja deleted the mypybot/sync-typeshed branch April 15, 2023 20:37
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