Skip to content

ReedSolo v2.1.0-beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@lrq3000 lrq3000 released this 11 Apr 12:35
· 45 commits to master since this release

Summary: Major update. Previous 2.x pre-releases were yanked, this one should be considered the first true release in v2.x branch. The following description pertains to all changes since the last major stable release (v1.7.0).

Introduces breaking changes, especially because it requires Cython v3.0.0b2 (hence a prerelease), but this allows huge speedups in encoding, especially with the cythonized extension. Several bugfixes as well (not math bugs but more about expected data structures, now the whole internal and external API should be coherent, always using bytearray or cpython array), and the packaging was overhauled to be PEP517 compliant and with a src-layout. Furthermore, automatic builds including with the C extension compiled as a PYD are now provided across platforms and Python versions thanks to cibuildwheel.

Note that the ReedSolo v2.x.x branch will remain in pre-release status until Cython v3 stable is released.

See the section Migration from v1.x to v2.x for more information on how to migrate.

Long description:

Cython v3 beta was recently released, and this offers new possibilities to optimize, especially because math operators in Cython v3 are now much more like Python v3. I hence decided to do a significant rework of the module to squeeze more speed optimizations in creedsolo. Several optimizations were also translated to the pure python reedsolo module, which can improve speed when run inside a JIT compiler such as PyPy.

This incidentally led me to repackage the module according to PEP517 and PEP518 standards for modern python packaging, which comes with isolated builds by default and almost reproducible builds (but we would need to move to another backend like meson for full reproducibility by default, otherwise setuptools still has some work to do on this front).

Finally, I also reworked the GitHub Actions to automatize the building and publishing process of releases to PyPi, using cibuildwheel, which offers the nice plus that we now have wheels with precompiled creedsolo for a lot of OSes and Python versions!

Should you migrate? ReedSolo v2.x API is considered stable, it won't change for the stable release and all planned changes were already implemented. ReedSolo v2.x branch will remain in beta while Cython v3 stable is not released, as requiring a pre-release version of a dependency is bad practice and breaks supply chains down the line (eg, Linux distributions will not be able to provide ReedSolo v2 if it requires a pre-release of Cython, because only stable releases of Cython are packaged).

In practice:

  • If you want cutting edge performance and bugfixes and you don't mind using a pre-release of Cython (and requiring the downstream packages that require your own package need to do so), then you can use pip install reedsolo --pre. When Cython v3 stable release will be published, ReedSolo will be updated asap to remove the beta suffix anyway, and you won't have to change anything on your side (optionally you will be able to remove the --pre flag for pip). See the section Migration from v1.x to v2.x in the README.md for more information on how to migrate.
  • If you don't mind using a less fast release which essentially provides the same encoding/decoding abilities (v1.7.0 is totally compatible with v2.x branch, caveat a few edge case bugs that were fixed), or you or your downstream packages cannot accept using a pre-release dependency, then you can just use the latest stable release of ReedSolo meanwhile (which is v1.7.0). If you set reedsolo as a dependency with no version capping, then anyway your package will be updated to ReedSolo v2.x when Cython v3 will be fixed. However, some API changes are to be expected, so you will need to do some updates here and there (mainly to type all your inputs as bytearray()s), especially if you used creedsolo.

Full Changelog since last stable release: v1.7.0...v2.1.0b1

Special thanks to @henryiii, @paravoid, the python.org participants who kindly replied to my messages in this forum post, and especially @mgorny for their help in packaging and polishing this release!

Note: only the sdist is attached on this GitHub Release, for the per-platform wheels, please see on PyPi.