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
import PIL.Image double quotes for Core version: "9.2.0" on win-64 for python 3.7 and python 3.8 #6437
Comments
You're installing Pillow through conda. Perhaps https://github.com/conda-forge/pillow-feedstock is a better place for this issue? |
I try to check if it might be a |
@hugovk The last version of I updated the recipe meta.yaml with:
And now it succeeded on |
AnacondaRecipes/pillow-feedstock#10 has been merged. So are you saying that this is actually a problem between conda-build and setuptools? While Pillow may be triggering the issue, that is where the real problem lies? |
I guess there are some major changes in |
Yes, confirming a problem with setuptools 60 on Windows for CPython 3.7 and 3.8.
setuptools 59
setuptools 60
|
I've created PR #6450 to resolve this. |
Thanks, looks good! @skupr-anaconda please could you also test the patch? |
@hugovk Thanks, it resolves the issue, see AnacondaRecipes/pillow-feedstock#11 |
Great, we'll merge it and it'll be in the next quarterly release in October. 🚀 |
Just in case it happens again for another reason, shouldn't Image.py also be modified so that if __version__ != getattr(core, "PILLOW_VERSION", None): becomes if __version__ != getattr(core, "PILLOW_VERSION", None).strip('"'): ? |
I can't think of what "another reason" would be, so I personally find that idea a bit too defensive. I doubt setuptools would change this behaviour again any time soon. Considering that setuptools 60 was released in December, I'm actually surprised that it's taken this long for an issue to be raised about this. Perhaps the number of Windows users who upgrade their setuptools but don't upgrade to the latest version of Python is small. And in two years and two months, Python 3.7 and 3.8 will both be EOL, so this problem will go away entirely. |
The "fix" for this issue breaks the builds for Python 3.7 and 3.8 on my system with setuptools 65.5.0:
Reverting #6450 works. |
Strange, I couldn't reproduce with setuptools 59-65, I wonder what the difference is. @cgohlke Does #6437 (comment) fix it for you? Maybe we do need that "another reason" after all! |
Found it: my build system has |
Good find! That was introduced in setuptools 60 and this distutils vendoring thing must be the root of this problem. https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html We'd better get a fix into today's release and add a check for this env var in the same place. |
Please see PR #6695. Some testing on Windows would be appreciated, and hopefully we can include a fix in the release. Thanks! |
Thanks to #7230, the double quotes have now been removed in Pillow 10.0.0. |
What did you do?
I'm building Pillow 9.2.0 from the source code and after
import PIL.Image
onwin-64
forpython 3.7
and3.8
tests failedWhat did you expect to happen?
import PIL.Image
on win-64 for python 3.7 and python 3.8 succeedsWhat actually happened?
What are your OS, Python and Pillow versions?
I think the bug is here:
Pillow/setup.py
Lines 849 to 856 in e42d8b0
Because if I use
defs.append(("PILLOW_VERSION", f'"{PILLOW_VERSION}"'))
without double quotes for python 3.7 and 3.8 on win-64 it succeededThe text was updated successfully, but these errors were encountered: