python / python/typeshed

ProcessPoolExecutor initializer 3.11 overloads return object?

Open
#11,400 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.1k
Forks
2.1k
Avg merge
1d 19h
Merged PRs (30d)
82

Description

The docs say:

initializer is an optional callable that is called at the start of each worker process;

No mention of it returning anything.

And type is Callable[..., None] as expected:

https://github.com/python/typeshed/blob/5eb040b1e60f5ec7833ea718abb0c24e48e04b7c/stdlib/concurrent/futures/process.pyi#L157-L159

But then for >=3.11 there's this overload:

https://github.com/python/typeshed/blob/5eb040b1e60f5ec7833ea718abb0c24e48e04b7c/stdlib/concurrent/futures/process.pyi#L173-L179


Seems to have come in on 8b3b6bf7cdbb8e5f3e842a8bfb1b654e73f10332.
@AlexWaygood am I missing something? 🤔

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the ProcessPoolExecutor declarations in stdlib/concurrent/futures/process.pyi, especially lines 157-159 and 173-179, and compare them with the Python 3.11 documentation linked in the issue. Check commit 8b3b6bf7cdbb8e5f3e842a8bfb1b654e73f10332 for the overload's origin; done means resolving whether the stub accurately represents the documented initializer behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.