build(deps): Use oxipng-pybind for PNG Compression#971
Merged
Conversation
Replace pyoxipng with oxipng-pybind, which follows Rust oxipng v10+. Add se.images.optimize_png() test.
Member
|
Thanks! I'll check that test. |
Member
|
This package is causing Pylint to crash. Install the toolset via pipx and do: On my machine, this causes pylint to crash with a very long dump starting with: If I uninject your package, it works again. |
Contributor
Author
|
It appears to be a known Astroid bug for when a package uses compound python annotated types.
See: pylint-dev/astroid#2764 (similar issue but not exactly the same)
It is fixed it Astroid 4.1.2 (https://github.com/pylint-dev/astroid/releases/tag/v4.1.2), but pylint has not updated.
On my machine the recursion limit must be set higher by default, because I wasn't able to reproduce the crash, pylint completes.
The easiest thing might be just to set `ignored-modules=oxipng` until pylint gets the latest astroid update.
If you'd prefer, I can see if I can make the typing less strict in the module. I do all the type checking there with `basedpyright` and all linting with `ruff`.
pylint seems to be falling behind compared to ruff (especially with processing speed of checks).
|
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. |
Member
|
Great, that fixed it, thanks! |
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.
Replace pyoxipng with oxipng-pybind, which follows Rust oxipng v10+.
Add se.images.optimize_png() unit test.
Closes #969