Skip to content

build(deps): Use oxipng-pybind for PNG Compression#971

Merged
acabal merged 1 commit into
standardebooks:masterfrom
ConcaveTrillion:master
May 28, 2026
Merged

build(deps): Use oxipng-pybind for PNG Compression#971
acabal merged 1 commit into
standardebooks:masterfrom
ConcaveTrillion:master

Conversation

@ConcaveTrillion
Copy link
Copy Markdown
Contributor

@ConcaveTrillion ConcaveTrillion commented May 28, 2026

Replace pyoxipng with oxipng-pybind, which follows Rust oxipng v10+.
Add se.images.optimize_png() unit test.

pyright se/images.py tests/test_internals.py: 0 errors
pylint se/images.py tests/test_internals.py: 10/10, exit 0
pytest tests/test_internals.py: 11 passed

Closes #969

Replace pyoxipng with oxipng-pybind, which follows Rust
oxipng v10+. Add se.images.optimize_png() test.
@ConcaveTrillion ConcaveTrillion marked this pull request as ready for review May 28, 2026 21:13
@acabal acabal merged commit 45a9cb6 into standardebooks:master May 28, 2026
1 check passed
@acabal
Copy link
Copy Markdown
Member

acabal commented May 28, 2026

Thanks! I'll check that test.

@acabal
Copy link
Copy Markdown
Member

acabal commented May 28, 2026

This package is causing Pylint to crash. Install the toolset via pipx and do:

cd /path/to/tools
pipx inject standardebooks oxipng-pybind==10.1.1.post1
pipx inject standardebooks pylint==4.0.5 pyright==1.1.408 types-requests==2.32.4.20250913 types-setuptools==80.9.0.20250822 types-lxml==2026.2.16
$HOME/.local/share/pipx/venvs/standardebooks/bin/pylint .

On my machine, this causes pylint to crash with a very long dump starting with:

/home/alex/.local/share/pipx/venvs/standardebooks/lib/python3.10/site-packages/astroid/transforms.py:123: UserWarning: Astroid was unable to transform Raise(exc=<Call l.190 at 0x7f7813bdb040>,
      cause=None).
Some functionality will be missing unless the system recursion limit is lifted.

If I uninject your package, it works again.

@ConcaveTrillion
Copy link
Copy Markdown
Contributor Author

ConcaveTrillion commented May 29, 2026 via email

@ConcaveTrillion
Copy link
Copy Markdown
Contributor Author

I rewrote the code to work around the pylint recursion bug. It's not as elegant, but it works.

I added a test in the library to exercise pylint 4.0.5 against all the exposed public API objects and verified no astroid warnings. If you bump the dependency to 10.1.1.post2 the recursion bug should go away.

@acabal
Copy link
Copy Markdown
Member

acabal commented May 29, 2026

Great, that fixed it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pip fails to build package pyoxipng on Fedora 44

2 participants