Skip to content

Remove typing_extensions and Delete advanced-overload-generic #107

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

Merged
merged 5 commits into from
Jan 28, 2024

Conversation

F-park
Copy link
Contributor

@F-park F-park commented Jan 26, 2024

As ParamSpec add to typing in 3.10, typing_extensions is unnecessary.

@F-park
Copy link
Contributor Author

F-park commented Jan 26, 2024

the test failed not related this commit, it failed because upgrade for pyright can detect more errors

@laike9m
Copy link
Owner

laike9m commented Jan 27, 2024

Let me know when it's ready

@F-park
Copy link
Contributor Author

F-park commented Jan 27, 2024

it is ready for review.

@laike9m
Copy link
Owner

laike9m commented Jan 28, 2024

The test is still failing. Seems pyright's version has not been reverted

image

@F-park
Copy link
Contributor Author

F-park commented Jan 28, 2024

@laike9m
Copy link
Owner

laike9m commented Jan 28, 2024

Can confirm this issue happened because of a behavior change in 1.1.339

Added a new typeCheckingMode called "standard". It's a subset of "strict" but a superset of "basic". It is the new default mode, and it should cover all of the required checks for conformance with the Python typing standard.

And after some trials & errors & searching, my conclusion is that this is impossible to achieve the desired behavior without using some wordarounds (adding # type: ignore[misc]), or writing the actual implementation to return correct types. The core issue is that Python's type system does not support "excluding certain types"

Thus, I think we can delete this challenge to unblock this PR. You can delete it in this PR or a separate one, both works

@F-park F-park changed the title Remove typing_extensions Remove typing_extensions and Delete advanced-overload-generic Jan 28, 2024
@F-park
Copy link
Contributor Author

F-park commented Jan 28, 2024

I delete advanced-overload-generic, and the unit test pass.

@laike9m laike9m merged commit cca8bad into laike9m:main Jan 28, 2024
@F-park F-park deleted the remove_patch branch January 28, 2024 15:11
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