[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

Guido van Rossum report at bugs.python.org
Fri Jul 2 00:56:34 EDT 2021


Guido van Rossum <guido at python.org> added the comment:

Merged and backported to 3.10, 3.9. Let's forget about 3.8 or earlier (Lukasz removed the needs-backport-to-3.8 and -3.7 labels from GH-16341 on May 4).

I should note that landing this was not a great experience:

- There's a closed PR with the fix and another PR with a confusing title that has the fix plus a test.

- The discussion on the issue and on the PRs was confusing. There was mention of a segfault reported on StackOverflow (but later it seemed to be a false alarm about a different fix), and in this issue Martijn Pieters brings up the question of whether AutoProxy is even needed, which is quite irrelevant to the bugfix.

- It's unclear from reading the code in the PR how the test relates to the fix.

- Therefore I tried to verify that the test actually failed if I undid the fix. But I found that it's rather unclear how to run the multiprocessing tests (and just those). And once I figured it out, they take a *long* time to run (there's a bug about that too somewhere).

- I tried to revive the original PR (to give credit to its author) but found that it can't be reopened because of the master->main branch rename.

- The open PR had some failing required tests so I couldn't land it without closing and reopening. More waiting. Eventually the tests passed and I could merge. On to the backports.

- One of the backport PRs randomly didn't seem to get some test statuses, so I tried to restart them by closing and reopening the PR -- only to find that miss islington deleted the branch as soon as I closed the PR, so I couldn't reopen it either. So I had to delete and re-add the "needs-backport-to-3.9" label to the main PR, and wait.

- Oh, and somehow there's a codecov test that always fails (in one of the original PRs, Antoine says to ignore it), so the backports didn't get auto-merged, so I had to wait for the other tests to pass and manually merge.

The one positive experience was Martijn Pieters' long explanation on StackOverflow of what went wrong and why this was the correct fix. (Maybe he elaborated a bit much on the monkeypatch. :-) This treatise gave me the confidence that the fix was correct (enough) and should be merged.

Parting shot: IMO we should not have accepted multiprocessing into the stdlib. It is a very useful module, but very complex, and would have been better off as a third-party module, with a more focused crew of maintainers and a quicker release cycle. (Almost everyone who uses multiprocessing needs to install other packages anyway.)

----------
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30256>
_______________________________________


More information about the Python-bugs-list mailing list