Skip to content
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

ENH: Add clone_from parameter in PdfWriter constructor #1703

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

pubpub-zz
Copy link
Collaborator

add a parameter to ease edition of pdf

@codecov
Copy link

codecov bot commented Mar 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (9878034) 92.50% compared to head (ec3c0e7) 92.51%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1703   +/-   ##
=======================================
  Coverage   92.50%   92.51%           
=======================================
  Files          34       34           
  Lines        6512     6516    +4     
  Branches     1286     1288    +2     
=======================================
+ Hits         6024     6028    +4     
  Misses        316      316           
  Partials      172      172           
Impacted Files Coverage Δ
pypdf/_writer.py 86.22% <100.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pubpub-zz pubpub-zz added the is-feature A feature request label Mar 15, 2023
@pubpub-zz
Copy link
Collaborator Author

all yours

@pubpub-zz
Copy link
Collaborator Author

I don't know if you are waiting for this... but it's all yours 😉

@MartinThoma
Copy link
Member

Should we deprecate clone_document_from_reader?

In general, I think it's a good idea to have only one way to do one thing. This way the code looks more consistent (both internally and externally)

@pubpub-zz
Copy link
Collaborator Author

Should we deprecate clone_document_from_reader?

In general, I think it's a good idea to have only one way to do one thing. This way the code looks more consistent (both internally and externally)

why not.However my only point would be to not break compatibility for existing programs.

@MartinThoma
Copy link
Member

Yes, I also don't want to break peoples workflows. If we do it, we should use the deprecation workflow. So clone_document_from_reader would stay for quite a while.

@MartinThoma MartinThoma changed the title ENH: add clone_from parameter in PdfWriter constructor ENH: Add clone_from parameter in PdfWriter constructor Mar 18, 2023
@MartinThoma MartinThoma merged commit 0acf949 into py-pdf:main Mar 23, 2023
@MartinThoma
Copy link
Member

Thank you for the PR @pubpub-zz ❤️

MartinThoma added a commit that referenced this pull request Mar 26, 2023
Security (SEC):
-  Use Python's secrets module instead of random module (#1748)

New Features (ENH):
-  Add AnnotationBuilder.highlight text markup annotation (#1740)
-  Add AnnotationBuilder.popup (#1665)
-  Add AnnotationBuilder.polyline annotation support (#1726)
-  Add clone_from parameter in PdfWriter constructor (#1703)

Bug Fixes (BUG):
-  'DictionaryObject' object has no attribute 'indirect_reference' (#1729)

Robustness (ROB):
-  Handle params NullObject in decode_stream_data (#1738)

Documentation (DOC):
-  Project scope (#1743)

Maintenance (MAINT):
-  Add AnnotationFlag (#1746)
-  Add LazyDict.__str__ (#1727)

[Full Changelog](3.6.0...3.7.0)
@pubpub-zz pubpub-zz deleted the from_param branch June 24, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-feature A feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants