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

Some final touches for variadic types support #16334

Merged
merged 14 commits into from
Oct 28, 2023

Conversation

ilevkivskyi
Copy link
Member

I decided to go again over various parts of variadic types implementation to double-check nothing is missing, checked interaction with various "advanced" features (dataclasses, protocols, self-types, match statement, etc.), added some more tests (including incremental), and greped for potentially unhandled cases (and did found few crashes). This mostly touches only variadic types but one thing goes beyond, the fix for self-types upper bound, I think it is correct and should be safe.

If there are no objections, next PR will flip the switch.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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

openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/plugins/openlibrary/lists.py:272: error: Unused "type: ignore" comment  [unused-ignore]
+ openlibrary/plugins/openlibrary/lists.py:317: error: Unused "type: ignore" comment  [unused-ignore]

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/events/worker.py:48: error: Signature of "instance" incompatible with supertype "QueueService"  [override]
- src/prefect/events/worker.py:48: note:      Superclass:
- src/prefect/events/worker.py:48: note:          @classmethod
- src/prefect/events/worker.py:48: note:          def instance(cls, *args: Any) -> EventsWorker
- src/prefect/events/worker.py:48: note:      Subclass:
- src/prefect/events/worker.py:48: note:          @classmethod
- src/prefect/events/worker.py:48: note:          def instance(cls, client_type: type[EventsClient] | None = ...) -> EventsWorker
- src/prefect/logging/handlers.py:70: error: Signature of "instance" incompatible with supertype "QueueService"  [override]
- src/prefect/logging/handlers.py:70: note:      Superclass:
- src/prefect/logging/handlers.py:70: note:          @classmethod
- src/prefect/logging/handlers.py:70: note:          def instance(cls, *args: Any) -> APILogWorker
- src/prefect/logging/handlers.py:70: note:      Subclass:
- src/prefect/logging/handlers.py:70: note:          @classmethod
- src/prefect/logging/handlers.py:70: note:          def instance(cls) -> APILogWorker

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ bson/son.py:71: error: Unused "type: ignore" comment  [unused-ignore]

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Ah, just saw I didn't do merge right, thanks for fixing! Tests and changes I understand look good

@ilevkivskyi
Copy link
Member Author

@jhance @JukkaL To speed things up I am going to merge this later today, if there are no more comments.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Did a quick review pass, looks good.

@ilevkivskyi ilevkivskyi merged commit f33c9a3 into python:master Oct 28, 2023
18 checks passed
@ilevkivskyi ilevkivskyi deleted the more-tvt branch October 28, 2023 13:26
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