Skip to content

Commit

Permalink
DOC: Add missing deprecation warning for addChild (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma authored May 26, 2022
1 parent 35e014d commit c4c2830
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PyPDF2/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,11 @@ def children(self) -> Optional[Any]:
child = child["/Next"] # type: ignore

def addChild(self, child: Any, pdf: Any) -> None: # PdfReader
warnings.warn(
DEPR_MSG.format("addChild", "add_child"),
PendingDeprecationWarning,
stacklevel=2,
)
self.add_child(child, pdf)

def add_child(self, child: Any, pdf: Any) -> None: # PdfReader
Expand Down

0 comments on commit c4c2830

Please sign in to comment.