-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-30256: Add test for nested queues #16341
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
Conversation
@brandtbucher Thanks for adding the labels. :) Do you mind adding the "skip news" label to this pull request and the bugfix one #4819, too? It's the only CI check missing from #4819 and as far as I understand, a news entry for that small patch is not necessary. The failed CI check might be the only thing missing from getting #4819 merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @finefoot! Thanks and welcome to CPython! 😎
I think that this PR (and certainly the other one) still need NEWS entries. "Trivial" changes and "small" changes don't always mean the same thing, and my personal litmus test is whether or not the changes touch live code. A NEWS entry only takes seconds to write, but can be extremely valuable when digging through changes or debugging regressions later. It seems, at least in my experience, that first-timers are usually a bit too hesitant to include them.
I'll take a look over at #4819 and see what the holdup is.
Thanks for the response :) Sorry, you're right - I had a look at only the most recent pull request which introduced a change to |
The fix for a bug and the tests for it should be logically contained in a single PR, so I'd like this PR (or the other one) to contain both. |
Multiprocessing autoproxy fix
Codecov Report
@@ Coverage Diff @@
## master #16341 +/- ##
===========================================
+ Coverage 79.56% 82.06% +2.50%
===========================================
Files 381 1955 +1574
Lines 168109 584066 +415957
Branches 0 44458 +44458
===========================================
+ Hits 133753 479337 +345584
- Misses 34356 95105 +60749
- Partials 0 9624 +9624
Continue to review full report at Codecov.
|
@finefoot You can leave the codecov failure alone, it's not relevant. The patch is in my todo list, it's just that I need to familiarize a bit with the code around that feature. |
I first left his comment on #4819 but I perhaps should have added it here instead: When testing this fix, this post on StackOverflow suggests they experienced a seg fault: https://stackoverflow.com/questions/56716470/multiprocessing-manager-nested-shared-objects-doesnt-work-with-queue Has this been investigated and resolved? |
|
Thank you @finefoot for creating this MR with additional tests. As I mentioned in #4819 and @finefoot noted above, it seems to me that the noted stackoverflow comment was not suggesting that this change causes crashes. And, two other commenters in #4819 including myself are unable to reproduce it. It'd be really, really, really nice to have this in 3.10. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm not sure how the test relates to the fix, but I'm too lazy to run all the tests and I trust this. I'll add a Co-Authored-By: uSpike
header since the patch is @uSpike's.
I'll close and reopen this PR to force the tests to re-run, otherwise I can't merge it. |
...Aaaaand we're back! |
|
Thanks @finefoot for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9. |
GH-26987 is a backport of this pull request to the 3.10 branch. |
Co-authored-by: Jordan Speicher <[email protected]> (cherry picked from commit 85b9204) Co-authored-by: finefoot <[email protected]>
Co-authored-by: Jordan Speicher <[email protected]> (cherry picked from commit 85b9204) Co-authored-by: finefoot <[email protected]>
) Co-authored-by: Jordan Speicher <[email protected]> (cherry picked from commit 85b9204) Co-authored-by: finefoot <[email protected]>
Thanks @finefoot for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Co-authored-by: Jordan Speicher <[email protected]> (cherry picked from commit 85b9204) Co-authored-by: finefoot <[email protected]>
GH-26989 is a backport of this pull request to the 3.9 branch. |
…26989) Co-authored-by: Jordan Speicher <[email protected]> (cherry picked from commit 85b9204) Co-authored-by: finefoot <[email protected]>
I stumbled upon this problem: https://stackoverflow.com/questions/56716470/python-multiprocessing-nested-shared-objects-doesnt-work-with-queue
Right now, Python docs state
Source: https://docs.python.org/3/library/multiprocessing.html
These changes have been introduced with https://hg.python.org/cpython/rev/39e7307f9aee along with some tests. However, the tests only use nested
ListProxy
andDictProxy
.Because a test for
AutoProxy
is missing, the mentioned issue from the StackOverflow post remained undetected. This pull request adds a test forAutoProxy[Queue]
for a queue nested inside a list and inside a dict.Hence, the test added by this pull request will currently fail due to the existing bug regarding nested
AutoProxy
which already has a fix in #4819. After applying the patch from #4819, this test will succeed. So this pull request should be merged together with #4819.https://bugs.python.org/issue30256
https://bugs.python.org/issue30256