Skip to content

Commit

Permalink
[autorelease] update changelog and version file
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Sep 24, 2022
1 parent bf24758 commit d2ddcee
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 42 deletions.
41 changes: 0 additions & 41 deletions docs/devel/changelog_staging.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,3 @@
<!-- List character: dash (-) -->

# Changelog for next release

- Support model

*API-breaking changes*
- If the target page of a bookmark cannot be identified, `OutlineItem.page_index` is now `None` rather than `-1`, to avoid accidental reverse list indexing and to enforce that callers properly handle this case. Moreover, `OutlineItem.is_closed` is now `None` rather than `False` if the bookmark has no kids.
- `PdfPageObject.get_type()` was replaced with a `type` attribute.
- `PdfPage.count_objects()` was removed. Use `PdfPage.get_objects()` or the raw PDFium API instead.
- If a negative index is passed to `PdfDocument.new_page()`, it is now interpreted in reversed direction, rather than inserting at the beginning.
- PDFium is now provided with an external, python-allocated buffer for rendering. This has numerous advantages, most notably that callers don't need to free resources anymore. `PdfPage.render_base()` now directly returns a ctypes ubyte array; `BitmapDataHolder` has been removed.
- Changed rendering parameters
- `annotations` was renamed to `draw_annots`
- `colour` was renamed to `fill_colour` and now only takes a list of 4 values for simplicity - it may not be 3 values or `None` anymore
- `no_antialias` has been replaced with separate boolean options `no_smoothtext`, `no_smoothimage`, and `no_smoothpath`

*Other changes*
- `OutlineItem` now contains information on the number of sub-items (`n_kids` attribute).
- All document-level methods that take a page index now accept negative values for reverse indexing (except the rendering methods).
- New method `PdfDocument.get_page_size()` to retrieve page size by index without needing to load a `PdfPage` (uses `FPDF_GetPageSizeByIndexF()` under the hood).
- New rendering parameters added: `colour_scheme`, `fill_to_stroke`, `force_halftone`, `draw_forms`, `rev_byteorder`, `prefer_bgrx`, `force_bitmap_format`, `extra_flags`, `allocator`, and `memory_limit`.
- Added new `render_to()` functions to `PdfPage` and `PdfDocument` that take a custom bitmap converter, to transform the ctypes array to a different object. A set of built-in converters is provided with the `BitmapConv` class. Confer the updated API documentation for details. The previous rendering functions (`render_topil()` `render_tobytes()`, ...) are still around as aliases but might be deprecated eventually.
- New rendering target `numpy_ndarray` added.
- The `pil_image` rendering target now accepts a `prefer_la` parameter to request automatic conversion of `BGRA`/`RGBA` to `LA` if rendering in greyscale mode with alpha channel.
- `PdfPage.get_objects()` can now recursively descend into Form XObjects.
- Form environments are now initialised/exited on document level rather than on page rendering. *In the course of this work, a segmentation fault source was eliminated, related to a formerly undocumented requirement of PDFium regarding object lifetime. Whether the segmentation fault would actually take place was dependent on Python garbage collection behaviour. This did not appear to happen under normal circumstances, so the issue remained unnoticed for a long time.*

- Setup code
- `$PYP_TARGET_PLATFORM` was renamed to `$PDFIUM_BINARY`, the value `sdist` was renamed to `none`.
- When doing an automatic release, repository changes are now only pushed after successful wheel building, to avoid leaving the repository in an invalid state in case some earlier step fails.
- pypdfium2 now declares a no-op setuptools extension to prevent wheel content from landing in a `purelib` folder. Some systems use this information to separate platform-dependent packages from pure-python packages (i. e. `/usr/lib64` instead of `/usr/lib`). Confer PEP 427.
- Autorelease now properly takes existing beta tags into account for its version changes.
- PDFium's commit log is now shown with GitHub releases.
- The wheel packaging script now restores in-tree artefacts from a possible editable install.
- Platform files are now detected in a more robust way. If missing, a proper exception will be raised.
- Platform data directories are now annotated with a text file storing the pdfium version, to prevent a possible mismatch between the state of `version.py` and the actual version of the used binary. The update and build scripts do not directly change the main version file anymore, but defer the changes to `setup.py`.
- Missing platform files are now always procured implicitly on installation. If platform files exist already but are outdated, they will be updated by default. You may opt out by creating an empty file called `.lock_autoupdate.txt` in `data/`.
- A `MANIFEST.in` file was added to avoid being dependent on `setuptools_scm`.
- On setup, dependency checks are now only done for system commands. The wonky implicit installation of missing Python packages was removed. If opting out of build isolation, callers should properly install setup dependencies beforehand.

- Documentation
- Rewrote the project's `README.md`. Added more support model examples and an extensive guide regarding the raw PDFium/ctypes API.
- Improved docstrings and included type hints.
45 changes: 45 additions & 0 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,51 @@
# Changelog


## 3.0.0 (2022-09-24)

- No PDFium update (autorelease).
- Support model

*API-breaking changes*
- If the target page of a bookmark cannot be identified, `OutlineItem.page_index` is now `None` rather than `-1`, to avoid accidental reverse list indexing and to enforce that callers properly handle this case. Moreover, `OutlineItem.is_closed` is now `None` rather than `False` if the bookmark has no kids.
- `PdfPageObject.get_type()` was replaced with a `type` attribute.
- `PdfPage.count_objects()` was removed. Use `PdfPage.get_objects()` or the raw PDFium API instead.
- If a negative index is passed to `PdfDocument.new_page()`, it is now interpreted in reversed direction, rather than inserting at the beginning.
- PDFium is now provided with an external, python-allocated buffer for rendering. This has numerous advantages, most notably that callers don't need to free resources anymore. `PdfPage.render_base()` now directly returns a ctypes ubyte array; `BitmapDataHolder` has been removed.
- Changed rendering parameters
- `annotations` was renamed to `draw_annots`
- `colour` was renamed to `fill_colour` and now only takes a list of 4 values for simplicity - it may not be 3 values or `None` anymore
- `no_antialias` has been replaced with separate boolean options `no_smoothtext`, `no_smoothimage`, and `no_smoothpath`

*Other changes*
- `OutlineItem` now contains information on the number of sub-items (`n_kids` attribute).
- All document-level methods that take a page index now accept negative values for reverse indexing (except the rendering methods).
- New method `PdfDocument.get_page_size()` to retrieve page size by index without needing to load a `PdfPage` (uses `FPDF_GetPageSizeByIndexF()` under the hood).
- New rendering parameters added: `colour_scheme`, `fill_to_stroke`, `force_halftone`, `draw_forms`, `rev_byteorder`, `prefer_bgrx`, `force_bitmap_format`, `extra_flags`, `allocator`, and `memory_limit`.
- Added new `render_to()` functions to `PdfPage` and `PdfDocument` that take a custom bitmap converter, to transform the ctypes array to a different object. A set of built-in converters is provided with the `BitmapConv` class. Confer the updated API documentation for details. The previous rendering functions (`render_topil()` `render_tobytes()`, ...) are still around as aliases but might be deprecated eventually.
- New rendering target `numpy_ndarray` added.
- The `pil_image` rendering target now accepts a `prefer_la` parameter to request automatic conversion of `BGRA`/`RGBA` to `LA` if rendering in greyscale mode with alpha channel.
- `PdfPage.get_objects()` can now recursively descend into Form XObjects.
- Form environments are now initialised/exited on document level rather than on page rendering. *In the course of this work, a segmentation fault source was eliminated, related to a formerly undocumented requirement of PDFium regarding object lifetime. Whether the segmentation fault would actually take place was dependent on Python garbage collection behaviour. This did not appear to happen under normal circumstances, so the issue remained unnoticed for a long time.*

- Setup code
- `$PYP_TARGET_PLATFORM` was renamed to `$PDFIUM_BINARY`, the value `sdist` was renamed to `none`.
- When doing an automatic release, repository changes are now only pushed after successful wheel building, to avoid leaving the repository in an invalid state in case some earlier step fails.
- pypdfium2 now declares a no-op setuptools extension to prevent wheel content from landing in a `purelib` folder. Some systems use this information to separate platform-dependent packages from pure-python packages (i. e. `/usr/lib64` instead of `/usr/lib`). Confer PEP 427.
- Autorelease now properly takes existing beta tags into account for its version changes.
- PDFium's commit log is now shown with GitHub releases.
- The wheel packaging script now restores in-tree artefacts from a possible editable install.
- Platform files are now detected in a more robust way. If missing, a proper exception will be raised.
- Platform data directories are now annotated with a text file storing the pdfium version, to prevent a possible mismatch between the state of `version.py` and the actual version of the used binary. The update and build scripts do not directly change the main version file anymore, but defer the changes to `setup.py`.
- Missing platform files are now always procured implicitly on installation. If platform files exist already but are outdated, they will be updated by default. You may opt out by creating an empty file called `.lock_autoupdate.txt` in `data/`.
- A `MANIFEST.in` file was added to avoid being dependent on `setuptools_scm`.
- On setup, dependency checks are now only done for system commands. The wonky implicit installation of missing Python packages was removed. If opting out of build isolation, callers should properly install setup dependencies beforehand.

- Documentation
- Rewrote the project's `README.md`. Added more support model examples and an extensive guide regarding the raw PDFium/ctypes API.
- Improved docstrings and included type hints.


## 2.11.0 (2022-08-22)

- Updated PDFium from `5241` to `5254` (autorelease).
Expand Down
2 changes: 1 addition & 1 deletion src/pypdfium2/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
V_MAJOR = 3
V_MINOR = 0
V_PATCH = 0
V_BETA = 1
V_BETA = None

#: pypdfium2 version string.
V_PYPDFIUM2 = "%s.%s.%s" % (V_MAJOR, V_MINOR, V_PATCH)
Expand Down

0 comments on commit d2ddcee

Please sign in to comment.