Repository navigation
docs(licenses): pillow-heif facts match its 1.8.0 wheel — x265, libheif 1.23.4 - #187
Merged
Merged
Conversation
…if 1.23.4 Two claims the #164 review found, both already wrong on main. Licence: third-party-licenses.md and tech-stack-rationale.md said the wheel metadata declares GPLv2 and that pip-licenses or the SBOM would flag it. pillow-heif 1.6.0 dropped that classifier (upstream #455); the locked 1.8.0 declares BSD-3-Clause only. Checked against the locked cp314 wheels (x86_64 and aarch64): cyclonedx-py 5.5.0 with --PEP-639, as release.yml runs it, and pip-licenses --from=mixed both report BSD-3-Clause; the GPLv2 x265 is stated only in the wheel's LICENSES_bundled.txt. The docs now say so, spell out what it means for operators (running vs redistributing x265 under GPLv2 and libheif/libde265 under LGPL-3.0, SBOM-driven reviews, the GPL-free route), and say that x265 is loaded with the bundled libheif, which _pillow_heif links through its RPATH. The libheif row drops libaom, gone from the 1.8.0 wheel, and names the copy HEIC decoding uses. The dated scan paragraph is re-run against today's lock, and the pentest report's correction adds that dpkg-based image scanners see Debian's unused libheif1/libde265-0, not the bundled copies. libheif minimum: pillow-heif 1.8.0 will not compile against libheif older than 1.23.4 (#error in its C source, upstream #480). formats.md, installation.md, README.md and the pentest report sent source installs to the distribution's libheif-dev or a system libheif, and the Dockerfile said pillow-heif dlopens libheif1. Debian 13 shipped 1.19.8; 1.23.4 came as a security update (DSA-6523-1, 2026-09-28) — which is why the builder's libheif-dev fallback for architectures without a wheel still meets that minimum. Only the Dockerfile's comments change: nothing in the image's apt closure depends on libheif1 and the amd64/arm64 wheels never load it, but dropping it would drop that fallback too, so that stays a separate decision. Guards in tests/test_docs_match_code.py: one reads the installed wheel's metadata and LICENSES_bundled.txt and checks the licence docs against them; the other ties the pillow-heif version formats.md gives the libheif minimum for to requirements.lock and allows one minimum across docs/, README.md and the Dockerfile. A lock bump, a stray minimum and the old doc section each fail them. Full suite 1501 green (72 skipped); ruff 0.16.9, gitleaks and scope-guard clean. No templates or dependencies touched, so i18n-drift and pip-audit do not apply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ommits The entry conflicts with main's newest one at the top of [Unreleased]. CHANGELOG.md goes back to the merge base here, GitHub merges main in, and the next commit puts the entry back on top. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores this PR's entry above the entries main gained meanwhile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ommits The entry conflicts with main's newest one at the top of [Unreleased]. CHANGELOG.md goes back to the merge base here, GitHub merges main in, and the next commit puts the entry back on top. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores this PR's entry above the entries main gained meanwhile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ommits The entry conflicts with main's newest one at the top of [Unreleased]. CHANGELOG.md goes back to the merge base here, GitHub merges main in, and the next commit puts the entry back on top. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores this PR's entry above the entries main gained meanwhile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e merge base Since #196 each entry is its own file in changelog.d/, and a guard fails when an entry is inserted at the top of CHANGELOG.md. CHANGELOG.md goes back to the merge base's bytes, so this PR no longer touches it, and the entry moves unchanged to changelog.d/2026-10-06-pillow-heif-docs.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two findings from the code review of #164 (pillow-heif 1.7.0 → 1.8.0). Both were already wrong on
mainbefore that PR.What changes
1. Licence (
docs/third-party-licenses.md,docs/tech-stack-rationale.md)The docs said pillow-heif's wheel metadata declares GPLv2 and that
pip-licensesor the SBOM will flag it. Since pillow-heif 1.6.0 (upstream #455) the metadata isBSD-3-Clauseonly. The GPLv2 part, thex265HEVC encoder that the binary wheel bundles, is stated only in the wheel'sLICENSES_bundled.txt, and metadata scanners don't read that file. The docs now say that and spell out what it means for operators: running isn't distribution; redistributing the image or wheel passesx265on under GPLv2; SBOM-driven reviews must add it by hand; the GPL-free route needs libheif ≥ 1.23.4 without x265. They also say thatx265is loaded into the process with the bundled libheif, though FileMorph never calls an encoder. The libheif row dropslibaom, which is no longer in the 1.8.0 wheel.2. libheif minimum (
docs/formats.md,docs/installation.md,README.md,docs/security-pentest-report.md,Dockerfilecomments)pillow-heif 1.8.0 refuses to compile against libheif < 1.23.4 (an
#errorin its C source; upstream #480). The docs sent Linux source installs to the distribution'slibheif-dev. The Dockerfile said pillow-heif dlopens the systemlibheif1, but the wheel loads its own bundled copy via RPATH. The Dockerfile's packages are unchanged; only its comments change, so the image stays the same.Two guards in
tests/test_docs_match_code.py:test_licence_docs_describe_the_installed_pillow_heif_wheel: reads the installed wheel's metadata andLICENSES_bundled.txtand checks the licence docs against them.test_docs_quote_the_libheif_minimum_of_the_locked_pillow_heif: fails whenrequirements.lockmoves pillow-heif away from the versiondocs/formats.mdnames the minimum for, or when two files quote different minimums. A future pillow-heif lock bump turns this red on purpose: check upstream's changelog for the libheif minimum, then update formats.md.How it was verified
requirements.lock) and readMETADATA,LICENSES_bundled.txtand the ELF dynamic sections (_pillow_heif→libheif-….so.1.23.4via RPATH$ORIGIN/pillow_heif.libs; bundled libheif →libx265,libde265).GPLv2classifier is present in 1.5.0 and gone from 1.6.0.cyclonedx-py environment --PEP-639(cyclonedx-bom 5.5.0, as inrelease.yml) andpip-licenses --from=mixedover the wheel, and the SBOM over all 77 locked Linux wheels: pillow-heif =BSD-3-Clause, with no GPL anywhere in the output.python:3.14-slimdigest is trixie.libheifis 1.19.8-1+deb13u1 in the release archive and 1.23.4-1~deb13u1 in trixie-security (DSA-6523-1, 2026-09-28). I computed the apt dependency closure of both image stages from the Packages indices: nothing depends onlibheif1, and listing it adds onlylibheif1,libheif-plugin-libde265,libde265-0andlibheif-plugin-dav1d.b2deb14: 1501 passed, 72 skipped (Linux-only tests). ruff 0.16.9, gitleaks and scope-guard are clean. Reviewed by the code-reviewer and security-auditor agents; their findings are addressed.Left open on purpose
libheif1/libheif-devin the image: unused on amd64/arm64. They are the two halves of the from-source fallback for architectures without a pillow-heif wheel, and that fallback compiles today only because of DSA-6523-1. Removing them would shrink the image by four Debian packages and drop the fallback. That changes the image, so it's a separate decision.ci.ymlanddeps-latest.ymlstillapt-get install libheif-dev. Tests install the pillow-heif wheel, so it's unused there, and the runner's Ubuntu 24.04 package (1.17.6) is too old for a source build anyway. Not touched here.🤖 Generated with Claude Code