Skip to content
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

[multiprocessing] fixes more incorrect types around context #4289

Merged
merged 1 commit into from
Jun 28, 2020

Conversation

vishalkuo
Copy link
Contributor

Another iteration on #4266 which should knock out a couple issues (see diff output). Comments on the fixes:

multiprocessing.JoinableQueue is not a type
multiprocessing.Queue is not a type
multiprocessing.SimpleQueue is not a type

These are all actually functions in the context class that return queues from the queues module here.

multiprocessing.Event is inconsistent, runtime does not have argument "lock"
multiprocessing.set_executable is inconsistent, stub argument "exe" differs from runtime argument "executable"

These are also functions in context that differ from runtime: see event and set_executable

Test Plan:

(mypy) (⎈ |development:home)[~/projects/typeshed] (mp) $ git co HEAD~1
(mypy) (⎈ |development:home)[~/projects/typeshed] ((HEAD detached at 5d553c95)) $ python3.8 -m mypy.stubtest --custom-typeshed-dir . multiprocessing --concise >  ~/Desktop/pre-change.txt
(mypy) (⎈ |development:home)[~/projects/typeshed] ((HEAD detached at 5d553c95)) $ git co mp
Previous HEAD position was 5d553c95 apply black and isort (#4287)
Switched to branch 'mp'
(mypy) (⎈ |development:home)[~/projects/typeshed] (mp) $ python3.8 -m mypy.stubtest --custom-typeshed-dir . multiprocessing --concise >  ~/Desktop/post-change.txt
(mypy) (⎈ |development:home)[~/projects/typeshed] (mp) $ diff ~/Desktop/pre-change.txt ~/Desktop/post-change.txt 
1,3d0
< multiprocessing.Event is inconsistent, runtime does not have argument "lock"
< multiprocessing.JoinableQueue is not a type
< multiprocessing.Queue is not a type
6d2
< multiprocessing.SimpleQueue is not a type
8,9d3
< multiprocessing.set_executable is inconsistent, stub argument "exe" differs from runtime argument "executable"
< multiprocessing.context.BaseContext.Event is inconsistent, runtime does not have argument "lock"

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@hauntsaninja hauntsaninja merged commit cc8344b into python:master Jun 28, 2020
@hauntsaninja
Copy link
Collaborator

Nice!

hauntsaninja pushed a commit to hauntsaninja/typeshed that referenced this pull request Jul 6, 2020
hauntsaninja pushed a commit to hauntsaninja/typeshed that referenced this pull request Jul 16, 2020
hauntsaninja added a commit that referenced this pull request Jul 16, 2020
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.

None yet

2 participants