Skip to content

Commit

Permalink
BUG: Add PdfObject.getObject back
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed May 27, 2022
1 parent 892299c commit 77c62ad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PyPDF2/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 77c62ad

Please sign in to comment.