-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 #15165
Sync typeshed #15165
Conversation
Source commit: python/typeshed@d208d5a
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.
Diff from mypy_primer, showing the effect of this PR on open source code: pandas (https://github.com/pandas-dev/pandas)
- pandas/io/formats/xml.py:411: error: Incompatible return value type (got "str", expected "bytes") [return-value]
|
Thanks for doing this! Looks great. I was hopeful when we added the cherry picking that it would be rare that we'd have conflicts. This doesn't seem to have been borne out. I wonder if we'd be better served by just including the diffs in the repo and using |
Yeah -- tbf, there has been a perhaps-unusual amount of churn in the stdlib stubs over recent months due to the "Let's add defaults everywhere!" project. Also, we now have 5 commits to cherry-pick each typeshed sync, which makes it much more likely there'll be a merge conflict somewhere than it was when we only had one commit to cherry-pick. FWIW, I think the current system is still much better than the system we had before we introduced the automated workflow! I find the new script much easier to use, and it's nice to have an expectation of when the next typeshed sync is "due".
My git skills are fairly rudimentary, so I don't feel like I can comment on which will be better there really :p |
I don't really like that we're doing these typeshed patches at all. It would be better if we could improve mypy so it works well with vanilla typeshed. However, that's a harder change to make. |
Source commit:
python/typeshed@d208d5a
Changes in
ctypes
andfunctools
caused merge conflicts with the cherry picks, and also broke thectypes
plugin (I hope the last commit in this PR fixes the plugin).