Skip to content

Cap pyarrow<23 to fix QGIS 4 import failure#1269

Closed
sunt05 wants to merge 1 commit intomasterfrom
sunt05/gh1252-pyarrow-compat
Closed

Cap pyarrow<23 to fix QGIS 4 import failure#1269
sunt05 wants to merge 1 commit intomasterfrom
sunt05/gh1252-pyarrow-compat

Conversation

@sunt05
Copy link
Copy Markdown

@sunt05 sunt05 commented Mar 31, 2026

Summary

  • Cap pyarrow<23 on non-Linux and Python 3.14 dependency lines in pyproject.toml
  • pyarrow 23.0.1 removed pyarrow.compute.match_substring_regex, breaking pandas.Series.str.contains() with regex on arrow-backed strings
  • This caused supy to fail on import in OSGeo4W/QGIS 4 environments (Python 3.12 + pandas 3.0.1 + pyarrow 23)

Closes #1252

Test plan

  • Verified fix on @biglimp's QGIS 4 machine via SSH (downgraded pyarrow 23 -> 22, supy.load_sample_data() works)
  • CI passes with capped pyarrow versions

Notes

The docstring-parsing code in _load.py that triggered this has already been refactored out on master (replaced by static _var_metadata). A new release would also resolve this inherently for the released version. The cap is a safety net until pandas releases a version compatible with pyarrow 23.

🤖 Generated with Claude Code

pyarrow 23.0.1 removed pyarrow.compute.match_substring_regex, which
breaks pandas Series.str.contains() with regex on arrow-backed strings.
This causes supy to fail on import in the OSGeo4W/QGIS 4 environment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

CI Build Plan

Changed Files

Python source (0 files)

Documentation (1 file)

  • pyproject.toml

pyproject.toml (1 file)

  • pyproject.toml

Build Configuration

Configuration
Platforms Linux x86_64
Python 3.9, 3.14
Test tier standard (all except slow)
UMEP build Skipped (no ABI changes)
PR status Ready (standard matrix)

Rationale

  • Python source changed -> single-platform build
  • No compiled extension changes -> UMEP build skipped (nightly provides coverage)

Updated by CI on each push. See path-filters.yml for category definitions.

@sunt05
Copy link
Copy Markdown
Author

sunt05 commented Mar 31, 2026

Closing in favour of UMEP-dev/umep-reqs#14 — the pyarrow cap belongs in umep-reqs (QGIS install layer), not in supy itself. The incompatible code path is already removed on master.

@sunt05 sunt05 closed this Mar 31, 2026
@sunt05 sunt05 deleted the sunt05/gh1252-pyarrow-compat branch March 31, 2026 13:14
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.

Import error in QGIS4 env.

1 participant