-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
STY: Put pure data mappings in separate files #1005
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1005 +/- ##
==========================================
+ Coverage 89.28% 89.30% +0.01%
==========================================
Files 19 24 +5
Lines 4435 4443 +8
Branches 921 921
==========================================
+ Hits 3960 3968 +8
Misses 323 323
Partials 152 152
Continue to review full report at Codecov.
|
@pubpub-zz What do you think about this change? It might be helpful to have those symbol mappings in one folder for the following reasons:
I think all of those reasons are rather weak, but I guess this is overall more clean? |
I was also uncertain if there is a more efficient way to store the data. I was mainly thinking about the speed it takes to load. The storage size is nothing that concerns me at the moment. But I guess reading / parsing a Python file is probably already super efficient. |
Some functions, e.g. |
I was not originally happy to add symbol,and other encodings. And this looks clearer : I love it! 😀 |
In my fork of PyPDF4, I've tried to restructure the code.
Generic.py keeps advance types:
I've create PdfBaseDocument as an abstract parent to PdfCommon that provides all functions common between PdfWriter and PdfReader ? |
Sounds good! Instead of generic1 I would probably use _base or similar. |
The highlight of this release is improved support for file encryption (AES-128 and AES-256, R5 only). See #749 for the amazing work of @exiledkingcc 🎊 Thank you 🤗 Deprecations (DEP): - Rename names to be PEP8-compliant (#967) - `PdfWriter.get_page`: the pageNumber parameter is renamed to page_number - `PyPDF2.filters`: * For all classes, a parameter rename: decodeParms ➔ decode_parms * decodeStreamData ➔ decode_stream_data - `PyPDF2.xmp`: * XmpInformation.rdfRoot ➔ XmpInformation.rdf_root * XmpInformation.xmp_createDate ➔ XmpInformation.xmp_create_date * XmpInformation.xmp_creatorTool ➔ XmpInformation.xmp_creator_tool * XmpInformation.xmp_metadataDate ➔ XmpInformation.xmp_metadata_date * XmpInformation.xmp_modifyDate ➔ XmpInformation.xmp_modify_date * XmpInformation.xmpMetadata ➔ XmpInformation.xmp_metadata * XmpInformation.xmpmm_documentId ➔ XmpInformation.xmpmm_document_id * XmpInformation.xmpmm_instanceId ➔ XmpInformation.xmpmm_instance_id - `PyPDF2.generic`: * readHexStringFromStream ➔ read_hex_string_from_stream * initializeFromDictionary ➔ initialize_from_dictionary * createStringObject ➔ create_string_object * TreeObject.hasChildren ➔ TreeObject.has_children * TreeObject.emptyTree ➔ TreeObject.empty_tree New Features (ENH): - Add decrypt support for V5 and AES-128, AES-256 (R5 only) (#749) Robustness (ROB): - Fix corrupted (wrongly) linear PDF (#1008) Maintenance (MAINT): - Move PDF_Samples folder into ressources - Fix typos (#1007) Testing (TST): - Improve encryption/decryption test (#1009) - Add merger test cases with real PDFs (#1006) - Add mutmut config Code Style (STY): - Put pure data mappings in separate files (#1005) - Make encryption module private, apply pre-commit (#1010) Full Changelog: 2.2.1...2.3.0
No description provided.