Skip to content

Commit

Permalink
BUG: Add missing deprecated EncodedStreamObject functions (#1140)
Browse files Browse the repository at this point in the history
See #1138 (backport of #1139)
  • Loading branch information
MasterOdin authored Jul 21, 2022
1 parent 94b4d17 commit 2ceea0c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions PyPDF2/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,25 @@ def get_data(self):
self.decoded_self = decoded
return decoded._data

def getData(self):
warnings.warn(
DEPR_MSG.format("getData", "get_data"),
PendingDeprecationWarning,
stacklevel=2,
)
return self.get_data()

def set_data(self, data):
raise PdfReadError("Creating EncodedStreamObject is not currently supported")

def setData(self, data):
warnings.warn(
DEPR_MSG.format("setData", "set_data"),
PendingDeprecationWarning,
stacklevel=2,
)
return self.set_data(data)


class ContentStream(DecodedStreamObject):
def __init__(self, stream, pdf):
Expand Down

0 comments on commit 2ceea0c

Please sign in to comment.