-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
pyright failures in Pillow #11688
Comments
It's not, it's due to the fact that Pillow just released a minor version that includes a py.typed file.
|
I'm not using pyright, but would a solution be to add a |
That said, the |
I think we should just make sure that we install a version of pillow in CI that doesn't have a py.typed file, rather than changing our stubs. Presumably stubsabot will suggest in a few hours that we mark them as obsolete anyway, so stability in the now-legacy stubs is probably the most important thing for our users now :) |
I'm not sure whether it's time to mark our stubs obsolete. Looking at the annotations in the source, there are some notable omissions even in the public API. |
Sure, we can debate that separately (but you're probably right; I haven't looked). I still think the root of the problem is lack of isolation when testing different packages in our CI setup, though, so I think we should ideally fix it by tinkering with the CI setup rather than with the stubs themselves |
Hello from Pillow! I think we're fine if you want to hold off marking as obsolete or removing for a while. Six months aligns nicely with two Pillow releases so hopefully we can fill in missing ones in that timeframe. It'd be great if you could let us know here, or in a Pillow issue, the important omissions (or better yet, a PR ;) (A users has already noticed and started: python-pillow/Pillow#7936) (Also brought up here: python-pillow/Pillow#2625 (comment)) Thanks! |
@hugovk The main omissions I spotted immediately are the partly annotated typeshed/stubs/Pillow/PIL/Image.pyi Lines 307 to 309 in d0f3f2c
typeshed/stubs/Pillow/PIL/Image.pyi Lines 266 to 275 in d0f3f2c
I could send PRs for some parts. How is Pillow's policy regarding |
That would be great!
Erm, we don't really have a policy, probably better to discuss on the tracker to see what the others think. We don't have any Python dependencies (except for testing) so don't have |
I've created python-pillow/Pillow#7944 for annotating |
pyright started to fail in unrelated PRs due to "errors" in Pillow: https://github.com/python/typeshed/actions/runs/8508140639/job/23301230769?pr=11687
On first glance, I see nothing wrong with the Pillow stubs and the affected file has last changed in December. But I suspect that #11671 is involved.
The text was updated successfully, but these errors were encountered: