numcodecs
numcodecs copied to clipboard
Drop headers
Convert code from header files to Cython (generated C code is equivalent). Then drop the headers. These were there primarily for Windows compatibility with old Python versions (namely 2.7), but shouldn't be needed any more.
xref: https://github.com/zarr-developers/numcodecs/pull/368 xref: https://github.com/zarr-developers/numcodecs/pull/369
TODO:
- [ ] Unit tests and/or doctests in docstrings
- [ ]
tox -e py310passes locally - [ ] Docstrings and API docs for any new/modified user-facing classes and functions
- [ ] Changes documented in docs/release.rst
- [ ]
tox -e docspasses locally - [ ] GitHub Actions CI passes
- [ ] Test coverage to 100% (Coveralls passes)
@DimitriPapadopoulos, Idk how familiar you are with Cython/C, but would appreciate your review here (if you have time 🙂)
I'll have a look, but I actually don't know much about Cython. I am more experienced in Python bindings for C++ libraries using SIP.
I think I get it:
- Use
uint8_t/uint32_tinstead ofchar/int, this clarifies the intent and avoids any accidental bad cast (95963d9cb79a8d258d0436ebf9f5ea4d42d69abd). - Most of the contents of
stdint_compat.hare moved to_utils.pxd(d3250aebe3b98c3fbf65a860ec241712559a1657). - The now (almost) empty
stdint_compat.his dropped (2fb1d412a204e9dee801f7ca0a498ac77f1439b6).
It looks goods. :+1:
Yeah the dropping Python 2.7 & C files in your other two PRs reminded me there was some leftover compatibility code in this header for Windows Python 2.7. So this cleans that out and consolidates things into Cython (with some readability/code quality improvements).
Thanks Josh! 🙏
Nope the header isn't installed. It is only used as part of the build process.