Bug 238072 - print/hplip: Fix runtime with graphics/pillow 6.0.0
Summary: print/hplip: Fix runtime with graphics/pillow 6.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kai Knoblich
URL:
Keywords:
Depends on:
Blocks: 237426
  Show dependency treegraph
 
Reported: 2019-05-23 13:01 UTC by Kai Knoblich
Modified: 2019-06-02 21:03 UTC (History)
2 users (show)

See Also:
woodsb02: maintainer-feedback+


Attachments
hplip-fix-runtime-with-pillow-6.0.0.patch (1.48 KB, patch)
2019-05-23 13:01 UTC, Kai Knoblich
woodsb02: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Knoblich freebsd_committer freebsd_triage 2019-05-23 13:01:34 UTC
Created attachment 204567 [details]
hplip-fix-runtime-with-pillow-6.0.0.patch

Hi,

bug #237426 updates graphics/py-pillow 6.0.0 which has some backward incompatibilities that affects "installer/dcheck.py" of your port. [1]

The "dcheck.py" script still makes use of the previously deprecated constant "Image.VERSION" that is no longer available in the 6.0.0 release.

Attached is the patch that fixes a possible runtime error in "installer/dcheck.py" if graphics/py-pillow is updated to 6.0.0 . 

QA:
~~~
- poudriere (11.2-, 12.0-RELEASE, 13.0-CURRENT@r347601 amd64 + i386) -> OK

Runtime tests:

With Python 3.6 and Pillow 6.0.0:

> # cd /usr/local/share/hplip
> # PYTHONPATH="." python3.6 -c 'from installer.core_install import * ; print(get_pil_version())'
> 6.0.0

With Python 3.6 and Pillow 5.3.0:

> # cd /usr/local/share/hplip
> # PYTHONPATH="." python3.6 -c 'from installer.core_install import * ; print(get_pil_version())'
> 5.3.0

With Python 2.7 and Pillow 6.0.0:

> # cd /usr/local/share/hplip
> # PYTHONPATH="." python3.6 -c 'from installer.core_install import * ; print(get_pil_version())'
> 6.0.0

With Python 2.7 and Pillow 6.0.0:

> # cd /usr/local/share/hplip
> # PYTHONPATH="." python2.7 -c 'from installer.core_install import * ; print(get_pil_version())'
> 5.3.0


--

[1] https://pillow.readthedocs.io/en/latest/releasenotes/6.0.0.html#backwards-incompatible-changes
Comment 1 Kai Knoblich freebsd_committer freebsd_triage 2019-05-23 13:05:11 UTC
Correction: The fourth QA check was done with Python 2.7 and Pillow 5.3.0 - not 6.0.0 .
Comment 2 Ben Woods freebsd_committer freebsd_triage 2019-05-31 10:33:48 UTC
Comment on attachment 204567 [details]
hplip-fix-runtime-with-pillow-6.0.0.patch

Looks ok to me.
Comment 3 Ben Woods freebsd_committer freebsd_triage 2019-05-31 10:34:41 UTC
Kai - thanks for the patch - can you please commit?
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-06-02 21:01:03 UTC
A commit references this bug:

Author: kai
Date: Sun Jun  2 21:00:07 UTC 2019
New revision: 503333
URL: https://svnweb.freebsd.org/changeset/ports/503333

Log:
  print/hplip: Fix runtime with graphics/py-pillow 6.0.0

  Fix a possible runtime error in installers/dcheck.py when graphics/py-pillow
  is updated to 6.0.0, which removed the previously deprecated constant
  Image.VERSION .

  PR:		238072, 237426 (related)
  Approved by:	woodsb02 (maintainer)

Changes:
  head/print/hplip/Makefile
  head/print/hplip/files/patch-installer_dcheck.py
Comment 5 Kai Knoblich freebsd_committer freebsd_triage 2019-06-02 21:03:30 UTC
Committed, thank you Ben, for your review and approval!