Skip to content

Fix QGIS 3/4 compatibility: extras for supy 2026.4.3#14

Open
sunt05 wants to merge 3 commits intomainfrom
sunt05/gh1252-pyarrow-compat
Open

Fix QGIS 3/4 compatibility: extras for supy 2026.4.3#14
sunt05 wants to merge 3 commits intomainfrom
sunt05/gh1252-pyarrow-compat

Conversation

@sunt05
Copy link
Copy Markdown
Contributor

@sunt05 sunt05 commented Mar 31, 2026

Summary

  • Move supy version pin to optional-dependencies (extras) for QGIS 3/4 compatibility
  • pip install umep-reqs[qgis3] -> supy==2026.4.3rc1 (NumPy 1.x)
  • pip install umep-reqs[qgis4] -> supy==2026.4.3 (NumPy 2.x)
  • Drop temporary pyarrow<23 cap — the incompatible code path was refactored in supy 2026.4.3

Background

QGIS 3 and QGIS 4 both use Python 3.12, so PEP 508 environment markers cannot distinguish them. Instead, extras let the UMEP plugin select the right supy build based on the detected QGIS version:

  • QGIS 3 (NumPy 1.x): supy==2026.4.3rc1
  • QGIS 4 (NumPy 2.x): supy==2026.4.3

Companion PR: UMEP-dev/UMEP#831 wires up the version detection in umep_installer.py.

Ref: UMEP-dev/SUEWS#1274, UMEP-dev/SUEWS#1252

- Update supy from 2026.1.28rc1 to 2026.1.28 (proper release)
- Add pyarrow<23 constraint: supy 2026.1.28 _load.py uses
  pandas str.contains with regex, which breaks with pyarrow 23
  (pyarrow.compute.match_substring_regex removed)

Temporary workaround — the incompatible code path is already
removed on supy master, so this cap can be dropped when the
next supy release is cut.

Ref: UMEP-dev/SUEWS#1252
@sunt05 sunt05 marked this pull request as draft March 31, 2026 12:59
- Move supy pin to optional-dependencies: qgis3 (rc1/NumPy 1.x) vs qgis4 (release/NumPy 2.x)
- Keep pyarrow<23 in common deps (no-op on QGIS 3, needed on QGIS 4)
- Install: pip install umep-reqs[qgis3] or umep-reqs[qgis4]

Ref: UMEP-dev/SUEWS#1252
@sunt05 sunt05 changed the title Fix QGIS 4 import: update supy, cap pyarrow<23 Fix QGIS 3/4 compatibility: extras for supy version selection Mar 31, 2026
@sunt05 sunt05 marked this pull request as ready for review March 31, 2026 13:12
@sunt05 sunt05 requested a review from biglimp March 31, 2026 13:12
@sunt05
Copy link
Copy Markdown
Contributor Author

sunt05 commented Mar 31, 2026

@biglimp please merge this after review. Thanks!

@biglimp
Copy link
Copy Markdown
Contributor

biglimp commented Mar 31, 2026

How will version of qgis be detected in relation to version number of umep-reqs? Lets say I make a new version of umep-reqs (3.0). What is the new syntax for e.f. QGIS 3.44? pip install umep-reqs==3.0[qgs3] ?

@sunt05
Copy link
Copy Markdown
Contributor Author

sunt05 commented Mar 31, 2026

Yes, the syntax is exactly right: pip install umep-reqs==3.0[qgis3] for QGIS 3.44.

@biglimp
Copy link
Copy Markdown
Contributor

biglimp commented Mar 31, 2026

So we should find out user version so that they install correct umep-reqs

@sunt05
Copy link
Copy Markdown
Contributor Author

sunt05 commented Mar 31, 2026

Done — UMEP-dev/UMEP#831 wires up the version detection in umep_installer.py.

- Bump supy pins: 2026.4.3rc1 (QGIS 3) and 2026.4.3 (QGIS 4)
- Remove temporary pyarrow<23 cap — the incompatible code path
  was refactored in supy 2026.4.3 (UMEP-dev/SUEWS#1252)

Ref: UMEP-dev/SUEWS#1274
@sunt05
Copy link
Copy Markdown
Contributor Author

sunt05 commented Apr 4, 2026

Updated: bumped supy pins to 2026.4.3rc1 (QGIS 3) and 2026.4.3 (QGIS 4), dropped temporary pyarrow<23 cap (incompatible code path refactored in supy 2026.4.3). PR description updated accordingly.

Ref: UMEP-dev/SUEWS#1274

@sunt05 sunt05 changed the title Fix QGIS 3/4 compatibility: extras for supy version selection Fix QGIS 3/4 compatibility: extras for supy 2026.4.3 Apr 4, 2026
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