Skip to content

REGR: Revert #793 (sorting in sparse to arrays)#824

Merged
sjsrey merged 3 commits into
pysal:mainfrom
martinfleis:revert-793
Jan 9, 2026
Merged

REGR: Revert #793 (sorting in sparse to arrays)#824
sjsrey merged 3 commits into
pysal:mainfrom
martinfleis:revert-793

Conversation

@martinfleis

@martinfleis martinfleis commented Jan 6, 2026

Copy link
Copy Markdown
Member

Reverting the rest of #793 as #822 apparently was not enough. I managed to cause two regressions by a single PR 🎉.

This was caught by momepy CI - https://github.com/pysal/momepy/actions/runs/20742499625/job/59552088014

@martinfleis martinfleis changed the title Revert 793 REGR: Revert #793 (sorting in sparse to arrays) Jan 6, 2026
@martinfleis martinfleis requested a review from jGaboardi January 6, 2026 09:05
@codecov

codecov Bot commented Jan 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.4%. Comparing base (bfa42b7) to head (e3a6c91).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #824   +/-   ##
=====================================
  Coverage   85.4%   85.4%           
=====================================
  Files        151     151           
  Lines      16015   16025   +10     
=====================================
+ Hits       13679   13689   +10     
  Misses      2336    2336           
Files with missing lines Coverage Δ
libpysal/graph/_utils.py 97.1% <100.0%> (+<0.1%) ⬆️
libpysal/graph/tests/test_builders.py 100.0% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martinfleis

Copy link
Copy Markdown
Member Author

The issue in CI is linked to numpy 1.26, which is already out of SPEC 0 support window. Shall we just bump the pin?

@jGaboardi

Copy link
Copy Markdown
Member

The issue in CI is linked to numpy 1.26, which is already out of SPEC 0 support window. Shall we just bump the pin?

I there a way to have a soft pin? Like libpysal can still be installed and used with numpy<=1.26, but we don't encourage it? I know some stuff I have going at work is tied to numpy<2 due to requirements outside my control, so I imagine others will be facing the same thing.

cc @sjsrey @knaaptime

@jGaboardi jGaboardi requested review from knaaptime and sjsrey January 6, 2026 16:10
@martinfleis

Copy link
Copy Markdown
Member Author

We're either following SPEC 0 or we are not.

I there a way to have a soft pin? Like libpysal can still be installed and used with numpy<=1.26, but we don't encourage it?

As long as we don't make any change that would be incompatible, you can pip install with --no-deps even if pyproject says numpy>=2. But that still means testing against 1.26 and supporting it, so we can just do support that explicitly.

Given we adopted SPEC 0 specifically to avoid discussions like this, I find it a bit unfortunate that we have it.

@martinfleis

Copy link
Copy Markdown
Member Author

This is not backwards compatible so we don't have to deal with that here.

@sjsrey

sjsrey commented Jan 9, 2026

Copy link
Copy Markdown
Member

I think tracking spec 0 is important. Trying to support outside of that window increases the maintenance cost.

@sjsrey sjsrey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bringing back memories from dealing with sorting in Weights. I feel your pain :-).

@sjsrey sjsrey merged commit fb697be into pysal:main Jan 9, 2026
12 checks passed
@martinfleis martinfleis deleted the revert-793 branch January 9, 2026 05:54
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.

3 participants