Skip to content

[multiprocessing] BaseProxy._callmethod returns the call result, not None - #16815

Merged
srittau merged 3 commits into
python:mainfrom
vmphase:fix/multiprocessing-callmethod-return
Nov 15, 2026
Merged

srittau merged 3 commits into
python:mainfrom
vmphase:fix/multiprocessing-callmethod-return

Conversation

@vmphase

@vmphase vmphase commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Docs state that BaseProxy._callmethod returns the result of the referent's method call, not None . Therefore, custom proxies (e.g. the one I encountered the problem with) that return it are flagged by type checkers.

P.S. Since the result is a copy of the call's result / proxy to a new shared object, IDT we can make it more explicit than Any.

@github-actions

This comment has been minimized.

Comment thread stdlib/multiprocessing/managers.pyi Resolved
Co-authored-by: Sebastian Rittau <sebastian.rittau@zfutura.de>
@vmphase
vmphase requested a review from srittau November 15, 2026 17:38
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit e018118 into python:main Nov 15, 2026
88 checks passed
@vmphase
vmphase deleted the fix/multiprocessing-callmethod-return branch November 15, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants