Repository navigation
Conversation
load_setup_py_data() executes setup.py in the conda-build process. setup.py prepends "." to sys.path, so the source tree's unbuilt zstandard package later shadows the zstandard bindings that conda-package-handling imports for .conda support. conda-build then fails with "Didn't recognize extension for file '...conda'". Read the version from c-ext/python-zstandard.h with load_file_regex() instead.
cibuildwheel installs the test-groups packages unlocked, so it picked up the latest mypy, which now depends on ast-serialize. ast-serialize has no wheels for musllinux_1_1 or musllinux s390x, and building it from source needs a Rust toolchain the containers don't have, failing those wheel jobs before any test ran. Move the test suite's dependencies into a new "test" dependency group, have "dev" include it plus mypy, and point cibuildwheel at "test".
On Apple Silicon runners Homebrew installs into /opt/homebrew, which isn't on the compiler's default search paths, so the --system-zstd build failed with "'zdict.h' file not found". Pass Homebrew's include and lib directories explicitly, and build for arm64 only since Homebrew's libzstd is not universal2.
test_stream_source_readinto intermittently fails on macos-26-intel runners with DeadlineExceeded: a single example took 31s against the 20s deadline, then 18s on hypothesis's rerun, which hypothesis reports as a FlakyFailure. The timing depends on runner load, not on the code under test, so don't enforce a deadline in the ci profile, as the expensive profile already does.
PyO3 0.29 is the first release that supports Python 3.15. Port the Rust backend to the APIs renamed or removed since 0.25: PyObject becomes Py<PyAny>, downcast*() becomes cast*(), allow_threads() becomes detach() and assume_gil_acquired() becomes assume_attached(). Py::from_borrowed_ptr() is deprecated, so build the parent reference in ZstdBufferWithSegments.segments() with a safe conversion instead of a raw pointer cast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades PyO3 from 0.25 to 0.29, the first release that supports Python 3.15, and ports the Rust backend to the APIs renamed or removed since 0.25 (
PyObject->Py<PyAny>,downcast*()->cast*(),allow_threads()->detach(),assume_gil_acquired()->assume_attached()). The deprecatedPy::from_borrowed_ptr()inZstdBufferWithSegments.segments()is replaced with a safe conversion.Supersedes #310: Dependabot's bump only changes
Cargo.toml/Cargo.lock, and the Rust backend doesn't compile against 0.29 without these code changes. (Its CI looks mostly fine only because Rust test failures arecontinue-on-error.)Depends on #358 (CI fixes); only the last commit belongs to this PR.
All workflows pass on the fork: https://github.com/zydo/python-zstandard/actions?query=branch%3Apyo3-0.29. The Rust backend results match
main: the one failing Rust test,test_train_dictionary.py::TestTrainDictionary::test_optimize, already fails onmain.