Skip to content

MAINT: address improper error handling and cleanup for spin#26304

Merged
rgommers merged 2 commits intonumpy:mainfrom
Carreau:spin-fix
Apr 19, 2024
Merged

MAINT: address improper error handling and cleanup for spin#26304
rgommers merged 2 commits intonumpy:mainfrom
Carreau:spin-fix

Conversation

@Carreau
Copy link
Contributor

@Carreau Carreau commented Apr 18, 2024

I just came across that while trying to benchmark docs.

It seem that when this was moved from subprocess.run to spin.util run the error handling was not updated.

spin.util seem to always return a CompletedProcess and it has the stderr and return code. (tested locally by changing towncrier to false).

While at it I removed unused import and reformatted a tiny bit the pyprojet.toml to only have 1 command per line for readability.

I just came across that while trying to benchmark docs.

It seem that when this was moved from subprocess.run to spin.util run the
error handling was not updated.

spin.util seem to always return a CompletedProcess and it has the stderr
and return code. (tested locally by changing towncrier to `false`).

While at it I removed unused import and reformatted a tiny bit the
pyprojet.toml to only have 1 command per line for redability.
@Carreau
Copy link
Contributor Author

Carreau commented Apr 18, 2024

I marked this as MAINT: as it is not a BUG: in numpy itself, wasn't sure.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Apr 18, 2024
@rgommers rgommers changed the title MAINT: improper error handling and cleanup. MAINT: address improper error handling and cleanup for spin Apr 19, 2024
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @Carreau. LGTM, let's give this a go.

@rgommers rgommers merged commit 509985c into numpy:main Apr 19, 2024
@rgommers rgommers added this to the 2.1.0 release milestone Apr 19, 2024
charris pushed a commit to charris/numpy that referenced this pull request Apr 23, 2024
…26304)

I just came across that while trying to benchmark docs.

It seem that when this was moved from subprocess.run to spin.util run the
error handling was not updated.

spin.util seem to always return a CompletedProcess and it has the stderr
and return code. (tested locally by changing towncrier to `false`).

While at it I removed unused import and reformatted a tiny bit the
pyprojet.toml to only have 1 command per line for readability.
@charris charris changed the title MAINT: address improper error handling and cleanup for spin MAINT: address improper error handling and cleanup for spin Apr 23, 2024
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 23, 2024
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.

3 participants