-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-33297: Mention Pillow to work with more image formats #6505
Conversation
Looks good to me, but tkinter doc changes are Serhiy's call. |
Doc/library/tkinter.rst
Outdated
@@ -799,6 +799,10 @@ reference to the image. When the last Python reference to the image object is | |||
deleted, the image data is deleted as well, and Tk will display an empty box | |||
wherever the image was used. | |||
|
|||
.. seealso:: | |||
|
|||
The `Pillow package <https://pillow.readthedocs.io/>`_ adds support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The home page of Pillow is http://python-pillow.org/.
And I think that the link should be from just Pillow
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Home page updated, I don't understand what you mean by "the link should be from just Pillow".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you mean it should be rendered as: "The <a ...>Pillow package"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@serhiy-storchaka the comment you made "the link should be from just Pillow" remains unaddressed. Could you please elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would look better as
The `Pillow <http://python-pillow.org/>`_ package
But this is not strong preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree. I'll change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
While we are here, it would be worth to replace other mentions of |
@serhiy-storchaka I have updated a couple of references to PIL. Found the following references too, but I'm not really sure these should be updated: cpython\Doc\c-api\buffer.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is mention of PIL.Image in Doc/faq/programming.rst.
Doc/distutils/introduction.rst
Outdated
Library), or mxBase. (This would be called a *package*, except that term is | ||
already taken in the Python context: a single module distribution may contain | ||
zero, one, or many Python packages.) | ||
module distributions are NumPy, SciPy, Pillow, or mxBase. (This would be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid rewrapping lines if this is not needed. It is not so bad if some lines will become short after deletion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I revert the wrapping of these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Doc/library/tkinter.rst
Outdated
@@ -799,6 +799,10 @@ reference to the image. When the last Python reference to the image object is | |||
deleted, the image data is deleted as well, and Tk will display an empty box | |||
wherever the image was used. | |||
|
|||
.. seealso:: | |||
|
|||
The `Pillow package <http://python-pillow.org/>`_ adds support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The note above (Doc/distutils/introduction.rst) tells about misleading of calling it a package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, the note above is detailing Distutils-specific terminology. If you go up a little, the definition of "package" in the General Python terminology section accurately describes Pillow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay then.
I think updating references to PIL-style arrays should be done in a separate issue. It can require the help of corresponding experts. |
@serhiy-storchaka regarding the PIL.Image reference in Doc/faq/programming.rst: Pillow preserves PIL naming for backwards compatibility. What does fail after installing Pillow is import pillow :) |
I agree with @serhiy-storchaka regarding PIL-style arrays references. |
Ah, I see that the name of the module is still PIL.Image in Pillow. Okay. |
Doc/distutils/introduction.rst
Outdated
module distributions are NumPy, SciPy, PIL (the Python Imaging | ||
Library), or mxBase. (This would be called a *package*, except that term is | ||
module distributions are NumPy, SciPy, Pillow | ||
, or mxBase. (This would be called a *package*, except that term is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove whitespaces before comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't that make reStructuredText separate the "module distributions..." line from the preceding paragraph?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the PR, could you check if it is addressing your comment?
Thanks! |
@serhiy-storchaka: Please replace |
Thanks @andresdelfino for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
GH-6560 is a backport of this pull request to the 3.7 branch. |
GH-6561 is a backport of this pull request to the 3.6 branch. |
Sorry, @andresdelfino and @serhiy-storchaka, I could not cleanly backport this to |
I'm cherry picking the commit for 2,7. |
GH-6562 is a backport of this pull request to the 2.7 branch. |
https://bugs.python.org/issue33297