Skip to content

Commit

Permalink
BUG: Add PdfObject.getObject back (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma authored May 27, 2022
1 parent 892299c commit 2499329
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 2499329

Please sign in to comment.