-
-
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
Depend on Pillow instead of types-Pillow #11720
Conversation
The PIL imports are trivial in all those packages: The PyAutoGUI stubs don't import PIL directly. But they depend on types-PyScreeze, which itself depends on Pillow, so any indirect "Pillow" needs in types-PyAutoGUI should be handled by indirect dependency. |
Cf. #11688. @AlexWaygood Considering we should start depending on Pillow instead of types-Pillow, working around the problems in the stubs instead of our test infrastructure seems to be the easiest solution. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
Looks great, thanks! |
Some annotations in the Pillow annotations are still lacking, compared to typeshed. But they are enough for the stubs that depend on it, since they only use the |
Note that this does mean that we will no longer have any pyright coverage for our Pillow stubs in CI (it will only see the inline Pillow types, not our stubs). Still, if we now plan on contributing improvements upstream to Pillow and marking our stubs obsolete soon, that shouldn't be a major issue. (I endorse the plan, though I'm afraid I can't commit to helping out with it much over the next few weeks |
This comment has been minimized.
This comment has been minimized.
This stub uploader check seems to be overzealous. In this case, python-xlib doesn't need to depend on Pillow to be able to work with Pillow's Image objects. Our stubs would need to depend on it though.
|
It looks like our |
This comment has been minimized.
This comment has been minimized.
Yeah, that's the best solution for now. I'll open a discussion about conditional imports in stub files, though. |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
No description provided.