-
Notifications
You must be signed in to change notification settings - Fork 24
Fix: Remove image.copy() argument in poppler 25.01 #92
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
base: master
Are you sure you want to change the base?
Conversation
- from poppler changelog: "Remove rect parameter from image::copy, it was never implemented"
|
This worked for me as well. |
|
Yet another one #96 (have not seen this PR) |
|
For reference, how to refer to this PR in your requirements.txt: |
- it's not available in the C++ API - also remove it from the Python API, it was an optional argument anyway
|
I failed installing this package with poppler 25 on fedora 42 due to this issue. Applying it fixed the problem. Thanks! But why isn't the PR merged? Is python-poppler maintained? |
|
This branch works for me, too (Fedora 42) From the Poppler changelog (https://poppler.freedesktop.org/releases.html) So it is correct to follow upstream and remove the rect parameter here, too |
|
|
||
| def copy(self, rect=None): | ||
| image = self._image.copy(rect or Rectangle()._rect) | ||
| def copy(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how sure are we that no consumer used the rect argument (even if never implemented by the underlying library)?
If we're not sure, we'll have to keep the argument around (emitting a warning when it's non-None, maybe?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those would have been good questions by upsteam to ask themselves before making a breaking change.
But FWIW they made the choice to remove the parameter without backward compatibility.
Building the wheel started failing after upgrade to poppler 25.01.
From poppler changelog: "Remove rect parameter from image::copy, it was never implemented".
In
src/cpp/image.cpptheimage.copy()function should be now declared as:instead of:
i.e. using the HAS_VERISON (fixed like this in the PR):
It might be also good to upgrade ubuntu/poppler in
.github/workflows/build_and_test.yml.