Uh oh!
There was an error while loading. Please reload this page.
gh-124694: Document missing ctxkwargs argument in ThreadPoolExecutor - #134321
gh-124694: Document missing ctxkwargs argument in ThreadPoolExecutor#134321donbarbos wants to merge 8 commits into
Conversation
donbarbos
commented
May 20, 2025
cc @picnixz |
Uh oh!
There was an error while loading. Please reload this page.
picnixz
left a comment
There was a problem hiding this comment.
I don't know if the parameters are meant to be public but the signature indeed needs to be correct for possible subclassing.
However, prepare_context is not documented so we can't even know how to use them. So we need to also document this at the same time.
donbarbos
commented
May 20, 2025
And maybe I'm missing something but this is what the class method cpython/Lib/concurrent/futures/thread.py Lines 157 to 187 in 5ab66a8 |
picnixz
commented
May 20, 2025
in this case, we should wait for Eric's feedback. I'm away until Saturday so I won't be able to reply in the meantime. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
donbarbos
commented
Dec 26, 2025
Thanks everyone for suggestions, now it looks complete |
| pending jobs will raise a :exc:`~concurrent.futures.thread.BrokenThreadPool`, | ||
| as well as any attempt to submit more jobs to the pool. | ||
| *ctxkwargs* is a mapping of additional keyword arguments passed to |
There was a problem hiding this comment.
The ctxkwargs parameter is special -- it does not correspond to a single argument. I am not even sure that it should be documented, since it is only purpose is to be able to pass shared to prepare_context() in InterpreterPoolExecutor(). It may be an implementation detail, in which case I am not sure that it should be documented.
If we still document this, I would write something like "Any addition keyword arguments are passed to prepare_context()." And updated the docstring correspondingly.
This PR is stale because it has been open for 30 days with no activity. |
based: #129669 (comment)
needs backport only to
3.14📚 Documentation preview 📚: https://cpython-previews--134321.org.readthedocs.build/en/134321/library/concurrent.futures.html