pypdf2 breaking changes
pypdf2 3.0.0 (December 22, 2022) is its newest release with breaking changes, 23 of them. The first: Removed PyPDF2.types.BookmarkTypes. Every breaking API change we have recorded in pypdf2 on PyPI: 70 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 3.0.1, released December 31, 2022.
Its 2.0.0 release requires Python 3.6 or later. Python end of life dates.
pypdf2 3.0.0 breaking changes
- Removed
PyPDF2.types.BookmarkTypes
PyPDF2.types.BookmarkTypes was removed in PyPDF2 3.0.0 pypi.org - Removed
PyPDF2.types.OutlinesType
PyPDF2.types.OutlinesType was removed in PyPDF2 3.0.0 pypi.org - Removed
PyPDF2.types.PdfReaderProtocol
PyPDF2.types.PdfReaderProtocol was removed in PyPDF2 3.0.0 pypi.org - Signature changed
The parameters for Fit and Zoom were refactored, so code passing them may need to change. The release notes do not name the affected symbols. github.com - Signature changed
PyPDF2.generic.AnnotationBuilder.link
Was @staticmethod def link(rect: Union[RectangleObject, Tuple[float, float, float, float]], border: Optional[ArrayObject] = None, url: Optional[str] = None, target_page_index: Optional[int] = None, fit: FitType = '/Fit', fit_args... pypi.org - Signature changed
PyPDF2.generic.Destination.__init__
Was def __init__(self, title: str, page: Union[NumberObject, IndirectObject, NullObject, DictionaryObject], typ: Union[str, NumberObject], *args: Any) -> None; now def __init__(self, title: str, page: Union[NumberObject, IndirectObject... pypi.org - Signature changed
PyPDF2.generic.PdfObject
Was class PdfObject; now class PdfObject(PdfObjectProtocol). pypi.org - Signature changed
PyPDF2.generic.TreeObject.add_child
Was def add_child(self, child: Any, pdf: Any) -> None; now def add_child(self, child: Any, pdf: PdfWriterProtocol) -> None. pypi.org - Signature changed
PyPDF2.PageObject.__init__
Was def __init__(self, pdf: Optional[Any] = None, indirect_reference: Optional[IndirectObject] = None, indirect_ref: Optional[IndirectObject] = None) -> None; now def __init__(self, pdf: Optional[PdfReaderProtocol] = None... pypi.org - Signature changed
PyPDF2.PageObject.pdf
Was pdf: Optional[PdfReader]; now pdf: Optional[PdfReaderProtocol]. pypi.org - Signature changed
PyPDF2.PdfMerger.add_outline_item
Was def add_outline_item(self, title: str, page_number: Optional[int] = None, parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Tuple[float, float, float]] = None, bold: bool = False, italic: bool = False, fit... pypi.org - Signature changed
PyPDF2.PdfWriter.add_outline_item
Was def add_outline_item(self, title: str, page_number: Optional[int] = None, parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Union[Tuple[float, float, float], str]] = None, bold: bool = False, italic: bool = False... pypi.org - Signature changed
PyPDF2.PdfWriter.add_outline_item_destination
Was def add_outline_item_destination(self, page_destination: Union[None, PageObject, TreeObject] = None, parent: Union[None, TreeObject, IndirectObject] = None, dest: Union[None, PageObject, TreeObject] = None) -> IndirectObject; now def... pypi.org - Signature changed
PyPDF2.PdfWriter.add_outline_item_dict
Was def add_outline_item_dict(self, outline_item: OutlineItemType, parent: Optional[TreeObject] = None) -> IndirectObject; now def add_outline_item_dict(self, outline_item: OutlineItemType, parent: Union[None, TreeObject, IndirectObject] =... pypi.org - Signature changed
PyPDF2.PdfWriter.add_page
Was def add_page(self, page: PageObject) -> None; now def add_page(self, page: PageObject, excluded_keys: Iterable[str] = ()) -> PageObject. pypi.org - Signature changed
PyPDF2.PdfWriter.addNamedDestinationObject
Was def addNamedDestinationObject(self, dest: PdfObject) -> IndirectObject; now def addNamedDestinationObject(self, dest: Destination) -> IndirectObject. pypi.org - Signature changed
PyPDF2.PdfWriter.addPage
Was def addPage(self, page: PageObject) -> None; now def addPage(self, page: PageObject, excluded_keys: Iterable[str] = ()) -> PageObject. pypi.org - Signature changed
PyPDF2.PdfWriter.get_object
Was def get_object(self, indirect_reference: Optional[IndirectObject] = None, ido: Optional[IndirectObject] = None) -> PdfObject; now def get_object(self, indirect_reference: Union[None, int, IndirectObject] = None, ido... pypi.org - Signature changed
PyPDF2.PdfWriter.getObject
Was def getObject(self, ido: IndirectObject) -> PdfObject; now def getObject(self, ido: Union[int, IndirectObject]) -> PdfObject. pypi.org - Signature changed
PyPDF2.PdfWriter.insert_page
Was def insert_page(self, page: PageObject, index: int = 0) -> None; now def insert_page(self, page: PageObject, index: int = 0, excluded_keys: Iterable[str] = ()) -> PageObject. pypi.org - Signature changed
PyPDF2.PdfWriter.insertPage
Was def insertPage(self, page: PageObject, index: int = 0) -> None; now def insertPage(self, page: PageObject, index: int = 0, excluded_keys: Iterable[str] = ()) -> PageObject. pypi.org - Signature changed
PyPDF2.PdfWriter.write
Was def write(self, stream: Union[Path, StrByteType]) -> Tuple[bool, Union[FileIO, BytesIO, BufferedReader, BufferedWriter]]; now def write(self, stream: Union[Path, StrByteType]) -> Tuple[bool, IO]. pypi.org - Signature changed
PyPDF2.xmp.PdfObject
Was class PdfObject; now class PdfObject(PdfObjectProtocol). pypi.org
pypdf2 2.0.0 breaking changes
- Removed
The package now requires Python 3.6 or later. Code running on Python 2.7 or 3.5 must upgrade its interpreter. github.com - Removed
_basestring
_basestring was removed; use str instead. github.com - Removed
barray
barray was removed; use bytearray(b) instead. github.com - Removed
ConvertFunctionsToVirtualList
ConvertFunctionsToVirtualList was removed from utils with no replacement named. github.com - Removed
formatWarning
formatWarning was removed from utils with no replacement named. github.com - Removed
isBytes
isBytes was removed; use instance(b, type(bytes())) instead. github.com - Removed
isInt
isInt was removed; use instance(obj, int) instead. github.com - Removed
isString
isString was removed; use instance(s, str) instead. github.com - Removed
OutlinesObject
OutlinesObject was removed with no replacement. github.com - Removed
PdfFileReader.warndest
The warndest parameter of PdfFileReader was removed. Stop passing it. github.com
And 37 more in this version. Sign up to see every change
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.