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
Add py2 stubs for multiprocessing.Queue #1829
Conversation
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.
Thank you for PR!
Only have one small comment.
|
||
class ProcessError(Exception): ... | ||
class BufferTooShort(ProcessError): ... | ||
class TimeoutError(ProcessError): ... | ||
class AuthenticationError(ProcessError): ... | ||
|
||
_T = TypeVar('_T') | ||
|
||
class Queue(queue.Queue[_T]): |
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.
Shouldn't this start with capital "Q" on Python 2?
612c4a5
to
9a8bae9
Compare
from multiprocessing.process import Process as Process, current_process as current_process, active_children as active_children | ||
from multiprocessing.util import SUBDEBUG as SUBDEBUG, SUBWARNING as SUBWARNING | ||
import Queue as queue |
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 think this should be underscored (either _queue
or _Queue
as you wish). Otherwise type checkers will treat queue
as externally visible (i.e. imported for re-export). You can read about special nature of ... as ...
imports in stubs in PEP 484, if interested.
Please don't squash commits after review has started. |
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.
Thanks!
LGTM now.
Sorry about squashing, I assume we would want to squash anyway before merging and figured the PR was small enough that it wouldn't be confusing. Will this get auto-merged when travis runs? |
I will take care. |
We never auto-merge, we always squash-merge. |
Heh, this is why it is good to wait for all tests to pass.
|
The solution is presumably |
No description provided.