Relax numpy/pandas/networkx pins to support numpy 2 / pandas 2+ / Python 3.14#102
Relax numpy/pandas/networkx pins to support numpy 2 / pandas 2+ / Python 3.14#102bbkrr wants to merge 1 commit into
Conversation
Replace the `~=` upper caps with lower-bound floors. The caps blocked numpy 2 / pandas 2+ / networkx 3 and made Python 3.14 impossible (pandas 1.x has no cp314 wheels), blocking the downstream RealRate-Private uv / Python 3.14 migration. Verified equivalent across the stack jump: - causing unit suite: 24/24 pass on Python 3.14 + numpy 2 / pandas 3 / networkx 3 - make verify-output: all 5 example graphs.json byte-identical to baseline - RealRate de_life_insurance A/B: 8/8 years identical within 1e-10 Bump version 2.4.6 -> 2.5.0. Refs: realrate/RealRate-Private#2098 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Why
|
There was a problem hiding this comment.
Pull request overview
Updates the package’s dependency constraints to allow resolving against the modern scientific Python stack (NumPy 2, pandas 2+/3, NetworkX 3) and bumps the library version for a new release.
Changes:
- Bumped package version from
2.4.6to2.5.0. - Relaxed
install_requiresspecifiers from~=caps to>=floors fornumpy,pandas,scipy,sympy, andnetworkx. - Added an inline rationale comment explaining the motivation for removing upper bounds (Python 3.14 / modern wheels).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #101
What
Replace the
~=upper-bound caps insetup.pywith lower-bound floors, and bump version2.4.6→2.5.0.Why
The caps blocked numpy 2 / pandas 2+ / networkx 3 and made Python 3.14 impossible (pandas 1.x ships no
cp314wheels). This was blocking the downstream RealRate-Private uv / Python 3.14 migration (realrate/RealRate-Private#2098) and a batch of Dependabot upgrades there.Verification (Python 3.14 + numpy 2.4.6 / pandas 3.0.3 / scipy 1.17.1 / sympy 1.14.0 / networkx 3.6.1)
make verify-output: all 5 examplegraphs.jsonbyte-identical to the committed baselinede_life_insuranceevaluate, old py3.9 stack vs new): 8/8 years (2016–2023) identical within 1e-10pip-auditon the resolved stack reports no known vulnerabilitiesNote (not a regression)
Under numpy 2,
sympy.lambdifyemitsnp.maximum/np.minimumwith >2 positional args forMax/Min; numpy treats the 3rd positional asout. Behavior is identical under numpy 1.23 (hence the exact A/B match), so it's pre-existing — flagged in #101 for a separate look.Follow-up
Once merged, tag
v2.5.0and publish to PyPI so RealRate-Private can drop its temporary[tool.uv] override-dependenciesworkaround.