Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-124694: Document missing ctxkwargs argument in ThreadPoolExecutor#134321
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Conversation
donbarbos commented May 20, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
based: #129669 (comment)
needs backport only to
3.14📚 Documentation preview 📚: https://cpython-previews--134321.org.readthedocs.build/en/134321/library/concurrent.futures.html