Skip to content

MAINT: Rename subroutine for crackfortran tests - #31726

Merged
charris merged 1 commit into
numpy:mainfrom
tiesjan:fix-crackfortran-test-naming
Jun 23, 2026
Merged

charris merged 1 commit into
numpy:mainfrom
tiesjan:fix-crackfortran-test-naming

Conversation

@tiesjan

@tiesjan tiesjan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

PR summary

When importing numpy version 2.4.4 through Nix, its store path (path the package lives in) resulted in /nix/store/r7i744barr4p4vr65110rh4n60w6p93i-python3.14-numpy-2.4.4. This happens to contain the word bar: ...r7i744--bar--r4p4vr.... Unfortunately, this makes one of the tests fail when building the Nix package locally. This is because the test checks for bar in a Fortran module(?) path, since that is a subroutine's name in that Fortran module.

By making the subroutine's name more unique, a collision with a Nix store path is less likely to happen.

First time committer introduction

I work as a software engineering lead for @channable and this package is being imported as a dependency as well as for some calculations for our service. The reason for contributing to your project is to ensure the collision with a Nix store path outlined above is less likely to happen again.

AI Disclosure

No AI tools used.

The assertion for `bar` not being found in the module path is too broad
and can result in a failure if the parent path of the `numpy` package
contains `bar`, such as `/nix/store/1234bar5678/numpy-2.4.4`. The
subroutines of the test file and the corresponding test has been
updated.
@tiesjan tiesjan changed the title Rename subroutine for crackfortran tests FIX: Rename subroutine for crackfortran tests Jun 23, 2026
@charris charris changed the title FIX: Rename subroutine for crackfortran tests MAINT: Rename subroutine for crackfortran tests Jun 23, 2026
@charris
charris merged commit 8579cc2 into numpy:main Jun 23, 2026
89 of 92 checks passed
@charris

charris commented Jun 23, 2026

Copy link
Copy Markdown
Member

Thanks @tiesjan .

@tiesjan
tiesjan deleted the fix-crackfortran-test-naming branch June 23, 2026 21:11
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants