From 77c62adad455f14c2863fa8b0207aa71eb106cc0 Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Fri, 27 May 2022 13:06:54 +0200 Subject: [PATCH] BUG: Add PdfObject.getObject back --- PyPDF2/generic.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PyPDF2/generic.py b/PyPDF2/generic.py index 34b8b3974..c3fbfc80a 100644 --- a/PyPDF2/generic.py +++ b/PyPDF2/generic.py @@ -76,6 +76,14 @@ def get_object(self) -> Optional["PdfObject"]: """Resolve indirect references.""" return self + def getObject(self) -> Optional["PdfObject"]: + warnings.warn( + "getObject will be removed in PyPDF2 2.0.0. Use get_object instead.", + PendingDeprecationWarning, + stacklevel=2, + ) + return self.get_object() + def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: