diff --git a/docs/source/planned_changes.md b/docs/source/planned_changes.md index 7488bc4de..4474529dc 100644 --- a/docs/source/planned_changes.md +++ b/docs/source/planned_changes.md @@ -6,10 +6,10 @@ ```{note} -You may search for `TODO(v5)` to find the code spots in question. +You may search for `TODO(apibreak)` to find the code spots in question. ``` -The following API breaking changes are in consideration for the next major release: +The following API breaking changes are in consideration for a future release: - The `PdfDocument.get_toc()` / `PdfOutlineItem` API will be changed. * The parameters `is_closed` (bool) and `n_kids` (abs int) will be replaced by `count` (int), diff --git a/src/pypdfium2/_helpers/document.py b/src/pypdfium2/_helpers/document.py index fe853e39c..4be4b0406 100644 --- a/src/pypdfium2/_helpers/document.py +++ b/src/pypdfium2/_helpers/document.py @@ -459,7 +459,7 @@ def page_as_xobject(self, index, dest_pdf): return PdfXObject(raw=raw_xobject, pdf=dest_pdf) - # TODO(v5) consider switching to a wrapper class around the raw bookmark + # TODO(apibreak) consider switching to a wrapper class around the raw bookmark # (either with getter methods, or possibly cached properties) def _get_bookmark(self, bookmark, level): @@ -468,7 +468,7 @@ def _get_bookmark(self, bookmark, level): pdfium_c.FPDFBookmark_GetTitle(bookmark, buffer, n_bytes) title = buffer.raw[:n_bytes-2].decode('utf-16-le') - # TODO(v5) just expose count as-is rather than using two variables and doing extra work + # TODO(apibreak) just expose count as-is rather than using two variables and doing extra work count = pdfium_c.FPDFBookmark_GetCount(bookmark) is_closed = True if count < 0 else None if count == 0 else False n_kids = abs(count) @@ -494,7 +494,7 @@ def _get_bookmark(self, bookmark, level): ) - # TODO(v5) change outline API (see above) + # TODO(apibreak) change outline API (see above) def get_toc( self, max_depth = 15, @@ -595,7 +595,7 @@ def render( :data:`typing.Any`: Parameter-dependent result. """ - # TODO(v5) remove mk_formconfig parameter (bloat) + # TODO(apibreak) remove mk_formconfig parameter (bloat) if not isinstance(self._input, (Path, str)): raise ValueError("Can only render in parallel with file path input.") @@ -710,7 +710,7 @@ def _open_pdf(input_data, password, autoclose): return pdf, to_hold, to_close -# TODO(v5) change outline API (see above) +# TODO(apibreak) change outline API (see above) PdfOutlineItem = namedtuple("PdfOutlineItem", "level title is_closed n_kids page_index view_mode view_pos") """ Bookmark information.