Skip to content

Threading module has currentThread on python3 #2625

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

Closed
jackriccomini opened this issue Nov 23, 2018 · 0 comments
Closed

Threading module has currentThread on python3 #2625

jackriccomini opened this issue Nov 23, 2018 · 0 comments
Labels
stubs: false positive Type checkers report false errors

Comments

@jackriccomini
Copy link

Stub is defined like so:

if sys.version_info < (3,):
def currentThread() -> Thread: ...

But it seems Python 3.6 also has currentThread (although undocumented):

$ python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19) 
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> threading.currentThread
<function current_thread at 0x7febeb087840>

This issue is similar to #2552

@srittau srittau added stubs: false positive Type checkers report false errors size-small labels Nov 23, 2018
utkarsh2102 added a commit to utkarsh2102/typeshed that referenced this issue Nov 29, 2018
utkarsh2102 added a commit to utkarsh2102/typeshed that referenced this issue Nov 29, 2018
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this issue Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false positive Type checkers report false errors
Projects
None yet
Development

No branches or pull requests

2 participants