Uh oh!
There was an error while loading. Please reload this page.
chore: constrain the fastfields-dlpack dependency to the 0.1 line - #21
Merged
Conversation
`fastfields-dlpack` was listed as a bare, unversioned dependency, so a resolver was free to satisfy it with any future release -- including a 1.x whose binding ABI and shared enums no longer match this wrapper (fastfields/fastfields-lib#18, "unpinned fastfields-dlpack dep in the wrappers"). Uses a compatible-release constraint, `~=0.1` (i.e. `>=0.1, ==0.*`), rather than an exact pin. All the fastfields distributions are versioned off the same 0.1 line (versioningit `default-tag = "0.1"`) and are meant to move together, so the line is the right granularity: in-development builds (`0.1+<distance>.g<rev>`) and the backend-labelled release wheels (`0.1+cpu`, `0.1+cu128`) all satisfy it, an incompatible 1.x does not, and the constraint does not go stale on every commit the way `==0.1` would. No package code changes; this is dependency metadata only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AjQcY78NgbagPSbPJRr6Z
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Part of fastfields/fastfields-lib#18 — the "unpinned
fastfields-dlpackdep inthe wrappers" item. One of four sibling PRs (
fastfields-numpy,-torch,-cupy,fastfields).What changed
fastfields-dlpackwas a bare, unversioned requirement, so a resolver couldsatisfy it with anything — including a future 1.x whose binding ABI and shared
enums no longer match this wrapper.
Why
~=0.1and not an exact pin~=0.1expands to>=0.1, ==0.*. Every fastfields distribution is versionedoff the same 0.1 line (
versioningit'sdefault-tag = "0.1") and they aremeant to move together, so the line is the right granularity:
~=0.10.10.1+28.g532f58a(current dev build)0.1+cpu/0.1+cu128(release wheels)0.9.91.0An exact
==0.1would go stale the moment the tag moves and would reject thelocal-version-labelled wheels the
fastfields/whlindex ships; a barerequirement gives no protection at all. This is the middle ground the issue
asks for: "don't silently resolve to an incompatible future major version".
(The table was evaluated with
packaging, not recalled from memory — thelocal-version cases in particular are easy to get wrong.)
Verification
fastfields/is touched.python -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))"parses, and
project.dependenciesresolves to['fastfields-dlpack~=0.1', 'numpy'].pytest tests/from a neutral cwd gives the identical result with andwithout this change (96 passed / 25 failed either way — I re-ran it with
the change stashed to confirm). Those 25 failures are pre-existing on
mainin this sandbox, where the installed
fastfields-dlpackbinary is older thanmain's tests; dependency metadata is not consulted at runtime, so this PRneither causes nor fixes them. Flagging rather than quietly reporting green.
One thing worth watching in live CI
The reusable
python-test.ymlinstallsfastfields-dlpack @ git+https://github.com/fastfields/fastfields-bind-py@mainbefore
pip install ".[test]". That source build resolves to0.1+<distance>.g<rev>via versioningit, which satisfies~=0.1, so theconstraint should be transparent. The one way it could bite: if versioningit
ever falls back to its
default-version = "0+unknown"(a checkout with no gitmetadata), that build would now be rejected where it was previously
accepted silently. I'd call that the constraint doing its job, but it is a
behaviour change worth knowing about before merge.
Workstream: claude-jitfields-to-fastfields
🤖 Generated with Claude Code
Generated by Claude Code