Skip to content

Widen pandas requirement to >=2,<4#2

Merged
pmrv merged 3 commits into
masterfrom
claude/sleepy-dijkstra-luopd2
Jul 15, 2026
Merged

Widen pandas requirement to >=2,<4#2
pmrv merged 3 commits into
masterfrom
claude/sleepy-dijkstra-luopd2

Conversation

@pmrv

@pmrv pmrv commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Pull Request Template

Description of Changes

Widens the pandas requirement in setup.py from pandas<=3.0 (which in PEP 440 terms admits only up to 3.0.0 exactly, excluding 3.0.1+ point releases, while still allowing ancient 1.x/0.x versions) to pandas>=2,<4, covering the whole pandas 2.x and 3.x series.

Before changing the pin, the codebase was audited for pandas 3 blockers; none were found:

  • No use of APIs removed in pandas 2/3 (DataFrame.append, applymap, Series.iteritems, delim_whitespace, .ix). All .append() hits are plain Python lists.
  • No chained assignment anywhere — all DataFrame writes go through df[col] = ... or df.loc[mask, col] = ..., so pandas 3's enforced Copy-on-Write does not change behavior.
  • All .map() calls operate on Series/Index objects (not DataFrames), so nothing depends on DataFrame.map introduced only in 2.1, keeping the 2.0 lower bound valid.
  • Legacy pickled reference DataFrames (tests/*.pckl.gzip, data/exmpl_df.pckl.gzip) load correctly under pandas 3, with object-dtype columns preserved (no surprises from the new default string dtype).
  • The existing numpy<=1.26.4 pin is compatible with pandas 3 (which requires numpy ≥1.26).

Checklist

  • Code is well-documented. (No code changes beyond the dependency specifier.)
  • All tests have been run and passed. Verified at both ends of the new range with the compiled extension built from this branch:
    • pandas 3.0.3: full test suite — 239 passed, 9 skipped, and 1 failure (test_PyACECalculator.py::test_relaxation) that is unrelated to pandas: UnitCellFilter moved from ase.constraints to ase.filters in recent ase releases, so it fails on master with any pandas version.
    • pandas 2.0.3 (lower bound): the pandas-heavy tests (test_preparedata, test_linearfit, test_pyacefit, test_activelearning, test_multispecies_pyacefit) — 37 passed.
  • Relevant documentation has been updated if necessary. (Docs only mention pandas generically; no version claims to update.)

License Agreement

By submitting this pull request, I agree that:

  • The code submitted in this pull request will be distributed under the Academic Software License (free for academic non-commercial use, not free for commercial use), see LICENSE.md for more details.
  • The copyright for the code, including the submitted code, remains with Ruhr University Bochum. Ruhr University Bochum retains the right to transfer or modify the copyright.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw


Generated by Claude Code

claude added 3 commits July 15, 2026 17:24
Static review and the test suite show no pandas 3 blockers: no removed
APIs, no chained assignment (Copy-on-Write safe), all .map() usage is on
Series, and legacy pickled dataframes still load. Verified by running
the test suite under pandas 2.0.3 and 3.0.3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw
pip install . does not run the custom setup.py install hook that
installs lib/maxvolpy, so test collection failed with
ModuleNotFoundError for test_activelearning and test_activeexploration.
Install it explicitly after the main package.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw
UnitCellFilter moved from ase.constraints to ase.filters in ase 3.23;
try the new location first and fall back for older ase.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HuteAomkhXVg2b5vco62Xw
@pmrv
pmrv merged commit db3abfe into master Jul 15, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants