Version 2.0.0, 2022-06-01 #933
Replies: 1 comment
-
The 2.0.0 version now heavily modified the API of PyPDF2 after it was stable for a long time. You might feel that this release didn't bring that many improvements for you, as a user. I feel you. PyPDF2 had a lot of improvements since April 2022. This change strives to improve the situation for new users, not for people who just want to keep their current code running. In order to make both happy, we were very careful in communicating those changes. If you need more time with adding them to your project, I recommend to use dependency pinning. The PyPDF2 2.1.0 release will have massive improvements in text extraction. @pubpub-zz is making great progress there, but we have several PRs in the pipeline:
Good things are to come - stay tuned :-) |
Beta Was this translation helpful? Give feedback.
-
What's Changed
The 2.0.0 release of PyPDF2 includes three core changes:
We introduced a deprecation process
that hopefully helps users to avoid unexpected breaking changes.
Breaking Changes (DEP)
overwriteWarnings
parameter. The new behavior is
overwriteWarnings=False
.ConvertFunctionsToVirtualList
was removedformatWarning
was removedisInt(obj)
: Useinstance(obj, int)
insteadu_(s)
: Uses
directlychr_(c)
: Usechr(c)
insteadbarray(b)
: Usebytearray(b)
insteadisBytes(b)
: Useinstance(b, type(bytes()))
insteadxrange_fn
: Userange
insteadstring_type
: Usestr
insteadisString(s)
: Useinstance(s, str)
instead_basestring
: Usestr
insteadPyPDF2.errors
:PyPDF2.pdf
(thepdf
module) no longer exists. The contents were moved withthe library. You should most likely import directly from
PyPDF2
instead.The
RectangleObject
is inPyPDF2.generic
.Resources
,Scripts
, andTests
will no longer be part of the distributionfiles on PyPI. This should have little to no impact on most people. The
Tests
are renamed totests
, theResources
are renamed toresources
.Both are still in the git repository. The
Scripts
are now inhttps://github.com/py-pdf/cpdf.
Sample_Code
was moved to thedocs
.For a full list of deprecated functions, please see the changelog of version
1.28.0.
New Features (ENH)
Bug Fixes (BUG)
Robustness (ROB)
Documentation (DOC)
Developer Experience (DEV)
Maintenance (MAINT)
Testing (TST)
Full Changelog: 1.28.4...2.0.0
This discussion was created from the release Version 2.0.0, 2022-06-01.
Beta Was this translation helpful? Give feedback.
All reactions