BUG: Add missing deprecated EncodedStreamObject functions#1139
BUG: Add missing deprecated EncodedStreamObject functions#1139MartinThoma merged 1 commit intomainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1139 +/- ##
=======================================
Coverage 91.94% 91.94%
=======================================
Files 24 24
Lines 4681 4681
Branches 967 967
=======================================
Hits 4304 4304
Misses 231 231
Partials 146 146
Continue to review full report at Codecov.
|
|
Thank you 🤗 I will make a release today with the fix for the current main branch. I'm uncertain if I really want to do backports. For which versions would I need to do them? For which kinds of bugs would we make it? How long would we need to support old versions? |
|
I think the only thing that should be backported is just these sorts of PRs, where functions were unintentionally broken by a rename or whatever, and that the fix is super straightforward. Given the probably very long tail of 1.x usage that exists and time between major releases, I would say support backporting for like 6 months or so, but I don't imagine there should be that many of these sorts of reports. Any other changes or features I think should not be backported. |
|
Sounds good and also a reasonable workload. Let's do that :-) Thank you :-) |
New Features (ENH): - Add `outline_count` property (#1129) Bug Fixes (BUG): - Make reader.get_fields also return dropdowns with options (#1114) - Add deprecated EncodedStreamObject functions back until PyPDF2==3.0.0 (#1139) Robustness (ROB): - Cope with missing /W entry (#1136) - Cope with invalid parent xref (#1133) Documentation (DOC): - Contributors file (#1132) - Fix type in signature of PdfWriter.add_uri (#1131) Developer Experience (DEV): - Add .git-blame-ignore-revs (#1141) Code Style (STY): - Fixing typos (#1137) - Re-use code via get_outlines_property in tests (#1130) Full Changelog: 2.6.0...2.7.0
Closes #1138
The
EncodedStreamObjectclass was missing the deprecatedgetDataandsetDatafunctions, which would call theget_dataandset_datafunctions respectively after issuing a deprecation warning. The original functions were totally renamed in c774ab0. That same commit did properly handle thegetDataandsetDatafunctions in theDecodedStreamObjectthough, where they issue a deprecation warning and then callget_dataandset_data.This should probably be backported to 1.x where it exists as well, as it should be simple enough, and the user in #1138 is using 1.28.2 and cannot upgrade due to this bug.