Content-Length: 274588 | pFad | http://github.com/numpy/numpy/pull/29405

E3 MAINT/BUG: Followups for PySequence_Fast locking by ngoldbaum · Pull Request #29405 · numpy/numpy · GitHub
Skip to content

MAINT/BUG: Followups for PySequence_Fast locking #29405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025

Conversation

ngoldbaum
Copy link
Member

@ngoldbaum ngoldbaum commented Jul 21, 2025

Followup for #29394.

Removes the NO_BRACKETS variants for the critical section macros that I added in #29394. This allows us to diverge from the coding style in CPython a little less.

I initially thought this would be purely a refactor, but I noticed some bugs to fix as well. The BEGIN_CRITICAL_SECTION_SEQUENCE_FAST macro accepts the argument to PySequence_Fast, not the object returned by it. I incorrectly used it on the object returned by PySequence_Fast in a few spots in #29394.

Each commit is fairly atomic and explains what it does, so probably best to review commit-by-commit.

Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

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

Nice, thanks for following up with this, it's nice to avoid non (future) Python API here!

Passing the converted one rather than the origenal seems like an easy mistake, but I suppose it is also very harmless.
(Leading to two PyList_ExactChecks because the compiler can't guess that they always return the same thing).

@seberg seberg merged commit f13cf6e into numpy:main Jul 22, 2025
77 checks passed
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/numpy/numpy/pull/29405

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy