gh-126341: added release check to iteration method of memoryview object#126759
gh-126341: added release check to iteration method of memoryview object#126759sobolevn merged 10 commits intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
ZeroIntensity
left a comment
There was a problem hiding this comment.
Thanks for contributing :)
You should be able to use the reproducer from the issue as a test case.
Misc/NEWS.d/next/Core_and_Builtins/2024-11-12-19-24-00.gh-issue-126341.5SdAe1.rst
Outdated
Show resolved
Hide resolved
…to fix-issue-126341
…e-126341.5SdAe1.rst Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @sobolevn: please review the changes made to this pull request. |
ZeroIntensity
left a comment
There was a problem hiding this comment.
I don't think we need a whole new file for the test, as it's only a 3 line reproducer. You could just add it alongside the existing tests for memoryview iteration.
Yeah, that makes sense! Would you happen to know where the memoryview iteration tests are? |
|
I don't, but you can just CTRL+F |
|
It look like there was a previous test case that tests CHECK_RELEASED, so I just added a check to the iter method there. |
Misc/NEWS.d/next/Core_and_Builtins/2024-11-12-19-24-00.gh-issue-126341.5SdAe1.rst
Outdated
Show resolved
Hide resolved
…e-126341.5SdAe1.rst Co-authored-by: sobolevn <mail@sobolevn.me>
vstinner
left a comment
There was a problem hiding this comment.
LGTM. Thanks for adding a non-regression test!
|
@sobolevn: I let you review the updated PR. You can merge it if it looks good to you. |
|
Should we backport this change? |
|
I think so, it's a bugfix. |
|
Thanks @ritvikpasham for the PR, and @sobolevn for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…w` (pythonGH-126759) (cherry picked from commit a12690e) Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
|
GH-126778 is a backport of this pull request to the 3.13 branch. |
…w` (pythonGH-126759) (cherry picked from commit a12690e) Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
|
GH-126779 is a backport of this pull request to the 3.12 branch. |
|
Congrats on your first contribution @ritvikpasham 🎉 |
…ew` (GH-126759) (#126779) gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759) (cherry picked from commit a12690e) Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
…ew` (GH-126759) (#126778) gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759) (cherry picked from commit a12690e) Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
…w` (python#126759) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
…w` (python#126759) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
SystemErrorfrom calling__iter__on a releasedmemoryview#126341