[issue33621] repr(threading._DummyThread) always fails.

2018-05-24 Thread Fabio Zadrozny

Fabio Zadrozny  added the comment:

Actually, I tried on a more recent version of Python 3.6 (3.6.5) and it doesn't 
happen there (so, just happens in 3.6.0 -- i.e.: in the old conda env I had 
around).

Sorry for the noise. Closing issue as it's already fixed.

--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33621] repr(threading._DummyThread) always fails.

2018-05-24 Thread Fabio Zadrozny

Fabio Zadrozny  added the comment:

Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 11:57:41) [MSC 
v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> repr(threading._DummyThread())
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\tools\Miniconda\envs\pyqt5\lib\threading.py", line 819, in __repr__
self.is_alive() # easy way to get ._is_stopped set when appropriate
  File "C:\tools\Miniconda\envs\pyqt5\lib\threading.py", line 1115, in is_alive
self._wait_for_tstate_lock(False)
  File "C:\tools\Miniconda\envs\pyqt5\lib\threading.py", line 1071, in 
_wait_for_tstate_lock
assert self._is_stopped
AssertionError

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33621] repr(threading._DummyThread) always fails.

2018-05-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Can you post the actual exception you are getting?

Here I have:

>>> import threading
>>> repr(threading._DummyThread())
'<_DummyThread(Dummy-1, started daemon 140345620215552)>'

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33621] repr(threading._DummyThread) always fails.

2018-05-23 Thread Fabio Zadrozny

New submission from Fabio Zadrozny :

Doing the following throws an exception:

import threading
repr(threading._DummyThread())


Or, in a more contrived example (I actually had this in a QThread, so, 
reproducing using getting the current_thread using a thread created with the 
_thread module):

import threading
import traceback
finished = threading.Event()
worked = []
def method():
try:
repr(threading.current_thread())
worked.append(True)
except:
traceback.print_exc()
worked.append(False)
finally:
finished.set()

import _thread
_thread.start_new_thread(method, ())

finished.wait()
assert worked[0]

--
components: Library (Lib)
messages: 317430
nosy: fabioz
priority: normal
severity: normal
status: open
title: repr(threading._DummyThread) always fails.
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com