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

Deprecate FreeType 2.7 #5098

Merged
merged 6 commits into from Dec 20, 2020
Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Dec 17, 2020

Fixes #5075.

Changes proposed in this pull request:

@hugovk hugovk added the Deprecation Feature that will be removed in the future label Dec 17, 2020
@hugovk hugovk added this to the 8.1.0 milestone Dec 17, 2020
Do not require packaging just for a DeprecationWarning
@radarhere
Copy link
Member

@hugovk so #5101 has been merged, but it doesn't show up in the master commits, which is weird. The explanation though is in this PR, where it says that you force pushed master? I presume this is just an accident?

force

@hugovk
Copy link
Member Author

hugovk commented Dec 19, 2020

Arg, that was my fault. I meant to update master in my security repo, and with less CI jobs enabled, but instead it went to upstream. So I force pushed to undo the last commit here and wiped out #5101 by mistake. Sorry about that! I'll redo #5101 later unless you get to it first.

This was referenced Dec 19, 2020
@radarhere radarhere merged commit 83d82ae into python-pillow:master Dec 20, 2020
@hugovk hugovk deleted the deprecate-freetype branch December 20, 2020 04:49
@eli-schwartz
Copy link

eli-schwartz commented Apr 26, 2021

After this PR:

$ python
Python 3.9.4 (default, Apr 20 2021, 15:51:38) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL.ImageFont
>>> PIL.ImageFont.FreeTypeFont()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/site-packages/PIL/ImageFont.py", line 173, in __init__
    freetype_version = parse_version(features.version_module("freetype2"))
  File "/usr/lib/python3.9/site-packages/packaging/version.py", line 57, in parse
    return Version(version)
  File "/usr/lib/python3.9/site-packages/packaging/version.py", line 296, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

The ImageFont module tries to be accepting of missing (optional) system dependencies for the _imagingft module. But then features.version_module() returns None, which cannot be parsed as a version, so this dumps a completely incomprehensible traceback rather than what most of the rest of this module does, which is:

class _imagingft_not_installed:
# module placeholder
def __getattr__(self, id):
raise ImportError("The _imagingft C module is not installed")
try:
from . import _imagingft as core
except ImportError:
core = _imagingft_not_installed()

@radarhere
Copy link
Member

This bug has now been fixed by #5445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation Feature that will be removed in the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate old FreeType?
3 participants