-
Notifications
You must be signed in to change notification settings - Fork 463
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
Improve pypdfium2 integration again #1096
Conversation
pypdfium2 now implements automatic closing on garbage collection. Using documents in a context manager has been deprecated to avoid inadvertent closing in wrong order. Also removed a type check which I think is unnecessary. pypdfium2 already checks the input and raises a TypeError accordingly.
I personally like to use spaces around parameter equals, though...
Codecov Report
@@ Coverage Diff @@
## main #1096 +/- ##
==========================================
+ Coverage 95.19% 95.21% +0.01%
==========================================
Files 142 142
Lines 6018 6017 -1
==========================================
Hits 5729 5729
+ Misses 289 288 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Thanks @mara004 LGTM 👍
Could you push an empty commit please to trigger CI again ? :) |
This reverts commit a6bb839.
Done. I probably shouldn't have skipped CI in the first place, but thought it kind of a waste of energy to re-run all the checks just because of black formatting... |
Yeah i totally agree the thing is that @charlesmindee is the only one currently with repo maintainer rights so i can merge it only if the CI pass 😅 |
Sure, I see :) |
Looks like |
FYI you do not need to change any code if you only want to trigger CI you can use: :) |
That's ok we know the issue and have it on track this job fails everytime currently (not a required check for merge) 👍 |
Thanks, didn't know that yet! |
Thanks for the update 🤗 |
Thanks for the quick review/merge! Hope I don't annoy you with the frequent changes 🙃 |
No, I really appreciate that. 👍 |
Yeah, in this case the previous code stills work of course, and should continue to do so until pypdfium2 4.0 at least (if that ever happens). So what matters is basically
|
pypdfium2 now implements automatic closing on garbage collection (since v3.3).
Using documents in a context manager has been deprecated to avoid inadvertent closing in wrong order.
Also removed a type check which, I think, is unnecessary. pypdfium2 already checks the input and raises a TypeError accordingly.