Changelog
Version 2.1.0 (2026-03-12)
Changed:
Improved
rpack.pack()search behavior for thin-rectangle pathological inputs by adding staged coarse candidate stepping with bounded local refinement.Documented the thin-rectangle performance benchmark results in the documentation.
rpack.pack()now retries overflowing inputs via bigint preprocessing: exact axis-wisegcdnormalization first, then conservative power-of-two scaling when needed so very large Python integers can still be packed. The conservative fallback can still return false negatives (PackingImpossibleErrorfor feasible inputs), including some cases where explicit bounds are mathematically non-binding, due to quantization and final bound revalidation.Public helpers
rpack.bbox_size(),rpack.overlapping()andrpack.packing_density()now transparently handle bigint packings by falling back to Python integer arithmetic when Clongconversion overflows.
Bugfixes:
Restored the public helper docstrings after wrapping
rpack.bbox_size(),rpack.overlapping()andrpack.packing_density()for bigint fallback support, sohelp()and the generated API reference stay populated.
Version 2.0.6 (2026-02-14)
Removed:
Extension module
rpack._rpackalong with the legacyrpack.groupimplementation and deprecatedrpack._rpack.packentry point.
Bugfixes:
Guarded area and total-area arithmetic against
longoverflow in the core packing path.Hardened jump-matrix allocation math and split-index bounds checks to prevent overflow and out-of-bounds access.
Updated overflow-focused tests to behave consistently across platforms.
Other changes:
Improved packaging/release tooling by tightening sdist inputs and hardening release workflow checks.
Added a benchmark CLI and refreshed documentation/build metadata.
Version 2.0.5 (2025-11-07)
Added:
Binary wheels and packaging metadata for Python 3.14.
Bugfixes:
rpack.pack()now preservesmax_width/max_heightvalues of zero so that impossible packings raisePackingImpossibleErrorcorrectly instead of being treated as unbounded.
Version 2.0.4 (2025-03-30)
Other changes:
Publishing a release on GitHub now uploads the built distribution to PyPI automatically.
Version 2.0.3 (2025-03-30)
Changed:
Documentation builds target HTML only, removing the LaTeX toolchain and updating the Read the Docs configuration accordingly.
Reformatted the Python sources and documentation helpers with
blackto standardize code style across the project.Improved the release workflow to handle PyPI uploads reliably, including fixing the long description metadata and skipping artefacts that were already published.
Bugfixes:
Removed unused bookkeeping in
taskpack.cto silence compiler warnings.
Version 2.0.2 (2023-10-10)
Added:
Declared support for Python 3.12 in the package metadata.
Changed:
Adopted GitHub Actions (cibuildwheel) for building release artefacts across supported platforms.
Updated hosted documentation assets and build configuration.
Relaxed the Cython build configuration to stay compatible with newer Cython releases while silencing future
nogilsignature warnings.
Bugfixes:
Restored compatibility with Cython 3 when compiling the extension module.
Version 2.0.1 (2021-05-13)
Bugfixes:
rpack.pack()behaved incorrectly when the argumentsmax_widthand/ormax_heightwere used. For instance, it could return incorrect rectangle positions which made the rectangles overlap.
Version 2.0.0 (2020-12-29)
Added:
Two new keyword arguments to
rpack.pack()namedmax_widthandmax_heightused to optionally set restrictions on the resulting bounding box.Exception
PackingImpossibleError.Function
rpack.bbox_size.Function
rpack.packing_density.Function
rpack.overlapping.Build dependency to Cython.
Changed:
Improved
rpack.pack()algorithm to yield higher packing density.Improved
rpack.pack()time complexity; ~x100 faster compared to version 1.1.0.The rectangles are sorted internally in
rpack.pack()so the input ordering does no longer matter.Renamed
rpack.enclosing_sizetorpack.bbox_size.
Removed/deprecated:
Function
rpack.group(). It is still available atrpack._rpack.group()but will be removed completely in the future.Old implementation of
rpack.pack(). It is still available atrpack._rpack.pack()but will be removed in the future.
Other changes:
Updated Sphinx documentation.
Version 1.1.0 (2019-01-26)
Added:
New function
rpack.group().Sphinx docs.
Changed:
Improved test cases.
Improved error handling.
Version 1.0.0 (2017-07-23)
Added:
First implementation.