deps: widen toolz upper bound to <2 (allow toolz 1.x) - #3301
Open
jbbqqf wants to merge 1 commit into
Open
Conversation
`toolz~=0.10` excludes toolz 1.0+ (released Oct 2024), forcing users into a stale pin even though the toolz 1.x API is backward-compatible with everything gluonts uses. I audited every `toolz`/`toolz.dicttoolz`/`toolz.itertoolz` import in the tree (`first`, `keymap`, `valmap`, `dissoc`, `merge`, `curry`, `take`, `itemmap`, `keyfilter`, `partition_all`) and confirmed they all resolve identically on toolz 1.0/1.1. Switching to `>=0.10,<2` keeps the existing floor (so older deployments with toolz 0.10.x are unaffected) and lets pip pick toolz 1.x where it's already installed. Verified locally with toolz 1.1.0: - pytest test/dataset test/test_itertools.py test/transform test/core test/test_util.py test/zebras → 493 passed, 6 skipped, 1 xfailed Fixes awslabs#3271
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.
Issue #, if available: #3271
Description of changes:
Summary
Widen the
toolzupper bound from~=0.10(i.e.<0.11) to>=0.10,<2so users can install gluonts alongsidetoolz>=1.0.Context
toolz1.0 was released October 2024. The 1.x release is documented as backward-compatible with 0.12: there were no API removals, no signature changes, just packaging-side changes. Reported in #3271 as a blocker for downstream environments that have already moved totoolz>=1.0.Changes
requirements/requirements.txt: replacetoolz~=0.10withtoolz>=0.10,<2. Keeping the lower bound at 0.10 preserves compatibility for existing deployments; the new upper bound of<2gives a safety margin against a hypothetical (currently un-announced) 2.0 with API breakage.I audited every
toolz/toolz.dicttoolz/toolz.itertoolzimport in the tree to confirm 1.x compatibility:All of these names, paths, and signatures are unchanged in toolz 1.x.
Reproduce BEFORE/AFTER yourself (copy-paste)
What I ran locally
pip install -q "toolz==1.1.0"→ installed cleanly.pytest test/dataset test/test_itertools.py test/transform test/core test/test_util.py test/zebras -q→ 493 passed, 6 skipped, 1 xfailed in 2.83s.Edge cases tested
toolz==0.12.xtoolz==1.0.0pip install toolz==1.0.0and pytest runtoolz==1.1.0Risk / blast radius
Tiny. This is a requirements-file-only change. The lower bound is preserved (
>=0.10), so no environment that currently resolves on dev will fail to resolve after this PR. The code itself is untouched.Release note
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup
PR drafted with assistance from Claude Code. The reproducer block above was used during development and is the same one a reviewer can paste verbatim.