Skip to content

ci: enable numba testing in 3.14t#696

Merged
Saransh-cpp merged 3 commits intoscikit-hep:mainfrom
ikrommyd:numba-in-py314t
Apr 13, 2026
Merged

ci: enable numba testing in 3.14t#696
Saransh-cpp merged 3 commits intoscikit-hep:mainfrom
ikrommyd:numba-in-py314t

Conversation

@ikrommyd
Copy link
Copy Markdown
Contributor

Numba now has 3.14t wheels. We should enable testing.
Partially reverts the dependency split done in #676 for the exact reason that numba did not have wheels at the time.

Comment on lines -71 to +74
assert class_refs == sys.getrefcount(vector.backends.object.VectorObject2D)
assert (
abs(class_refs - sys.getrefcount(vector.backends.object.VectorObject2D))
<= 1
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The refcount fluctuates between +- 1 and is different in each step of the loop locally. I thought just bounding it is fine to make the test pass. Same for the other two cases below.

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.

Do we know why this is happening? Is there something in Numba's changelog?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Honestly I have no idea and I tried investigating very briefly without finding anything out. Then I had claude take a shot at it to make the test pass without adding the +-1 bound for an hour without a result. It was doing trial n error but the += 1 looked random so it couldn't find a predicable assertion. I can take a more detailed look in the numba changes I guess.

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.

Do we know why this is happening? Is there something in Numba's changelog?

Python 3.14t has broken the assumption that reference counts are deterministic and immediate.

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.

Thanks, both!

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.81%. Comparing base (b0f5d44) to head (b9c4536).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #696   +/-   ##
=======================================
  Coverage   86.81%   86.81%           
=======================================
  Files          96       96           
  Lines       11197    11197           
=======================================
  Hits         9721     9721           
  Misses       1476     1476           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Thanks a lot for looking into this, @ikrommyd! Please see my comments below:

Comment thread pyproject.toml
Comment thread noxfile.py Outdated
Comment on lines -71 to +74
assert class_refs == sys.getrefcount(vector.backends.object.VectorObject2D)
assert (
abs(class_refs - sys.getrefcount(vector.backends.object.VectorObject2D))
<= 1
)
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.

Do we know why this is happening? Is there something in Numba's changelog?

Copy link
Copy Markdown
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Thanks, @ikrommyd!

@Saransh-cpp Saransh-cpp merged commit 970ca76 into scikit-hep:main Apr 13, 2026
19 checks passed
@ikrommyd ikrommyd deleted the numba-in-py314t branch April 13, 2026 14:00
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