Skip to content

BUG: Use remove_orphans in compress_identical_objects #3310

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

j-t-1
Copy link
Contributor

@j-t-1 j-t-1 commented Jun 11, 2025

Issue #3306: PdfWriter.compress_identical_objects ignored remove_orphans. Correct for this. Also deprecate_with_replacement remove_orphans to remove_unreferenced.

j-t-1 added 4 commits June 10, 2025 18:39
Issue py-pdf#3306: PdfWriter.compress_identical_objects ignored remove_orphans. Correct for this. Also deprecate_with_replacement remove_orphans to remove_unreferenced.
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.71%. Comparing base (05300d5) to head (ba65fd9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3310   +/-   ##
=======================================
  Coverage   96.71%   96.71%           
=======================================
  Files          53       53           
  Lines        9029     9033    +4     
  Branches     1674     1676    +2     
=======================================
+ Hits         8732     8736    +4     
  Misses        177      177           
  Partials      120      120           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


"""
deprecate_with_replacement(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deprecation does not work and will always trigger - even without using the old parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename_kwargs should be used instead?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this works with positional arguments as well, yes. Otherwise, we would have to think of another approach like setting a object() constant as default for the deprecated parameter to be able to identify it correctly.

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.

2 participants