Skip to content
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

Merged
merged 7 commits into from
Apr 21, 2018
Merged

bpo-33297: Mention Pillow to work with more image formats #6505

merged 7 commits into from
Apr 21, 2018

Conversation

andresdelfino
Copy link
Contributor

@andresdelfino andresdelfino commented Apr 17, 2018

@terryjreedy
Copy link
Member

Looks good to me, but tkinter doc changes are Serhiy's call.

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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".

Copy link
Contributor Author

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"?

Copy link
Contributor Author

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?

Copy link
Member

@serhiy-storchaka serhiy-storchaka Apr 18, 2018

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@serhiy-storchaka
Copy link
Member

While we are here, it would be worth to replace other mentions of PIL (wich doesn't support Python 3) with Pillow.

@andresdelfino
Copy link
Contributor Author

@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
cpython\Include\memoryobject.h
cpython\Lib\test\test_buffer.py
cpython\Modules\Setup.dist
cpython\Modules_testbuffer.c
cpython\Modules\tkappinit.c
cpython\setup.py

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a 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.

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
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, sorry!

Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay then.

@serhiy-storchaka
Copy link
Member

I think updating references to PIL-style arrays should be done in a separate issue. It can require the help of corresponding experts.

@andresdelfino
Copy link
Contributor Author

@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 :)

@andresdelfino
Copy link
Contributor Author

I agree with @serhiy-storchaka regarding PIL-style arrays references.

@serhiy-storchaka
Copy link
Member

Ah, I see that the name of the module is still PIL.Image in Pillow. Okay.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove whitespaces before comma.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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?

@serhiy-storchaka
Copy link
Member

Thanks!

@serhiy-storchaka serhiy-storchaka merged commit b81ca28 into python:master Apr 21, 2018
@bedevere-bot
Copy link

@serhiy-storchaka: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington
Copy link
Contributor

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.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-6560 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 21, 2018
…6505)

Also update PIL doc references to Pillow.
(cherry picked from commit b81ca28)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 21, 2018
…6505)

Also update PIL doc references to Pillow.
(cherry picked from commit b81ca28)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
@bedevere-bot
Copy link

GH-6561 is a backport of this pull request to the 3.6 branch.

@miss-islington
Copy link
Contributor

Sorry, @andresdelfino and @serhiy-storchaka, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker b81ca28b378c8b29204a37f8bd433a3379f53f7d 2.7

miss-islington added a commit that referenced this pull request Apr 21, 2018
Also update PIL doc references to Pillow.
(cherry picked from commit b81ca28)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Apr 21, 2018
Also update PIL doc references to Pillow.
(cherry picked from commit b81ca28)

Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
@andresdelfino
Copy link
Contributor Author

I'm cherry picking the commit for 2,7.

@bedevere-bot
Copy link

GH-6562 is a backport of this pull request to the 2.7 branch.

@andresdelfino andresdelfino deleted the mention_pillow branch April 21, 2018 14:09
serhiy-storchaka pushed a commit that referenced this pull request Apr 21, 2018
…6505) (GH-6562)

Also update PIL doc references to Pillow.
(cherry picked from commit 'b81ca28b378c8b29204a37f8bd433a3379f53f7d')

Co-authored-by: 'Andrés Delfino.34587441+andresdelfino@users.noreply.github.com'
@terryjreedy terryjreedy removed their request for review May 16, 2018 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants