Issue1994

classification
Title: threading.Event doesn't have is_set method
Type: crash Severity: major
Components: Library Versions: 2.7a2
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, irmen
Priority: Keywords:

Created on 2012-11-27.23:26:28 by irmen, last changed 2013-02-04.19:58:42 by fwierzbicki.

Messages
msg7539 (view) Author: Irmen de Jong (irmen) Date: 2012-11-27.23:26:28
threading.Event class doesn't implement is_set method (which has been the new name for isSet since Python 2.6):

Jython 2.7.0a2+ (, nov 27 2012, 23:51:30)
[Java HotSpot(TM) Client VM (Oracle Corporation)] on java1.7.0_09
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> e=threading.Event()
>>> e.is_set
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: '_Event' object has no attribute 'is_set'
>>> e.isSet
<bound method _Event.isSet of <threading._Event object at 0x2>>
>>>
msg7540 (view) Author: Irmen de Jong (irmen) Date: 2012-11-27.23:37:10
The fix is trivial, the threading.py that is used in the stdlib doesn't contain the following line:

   is_set = isSet

I'm a bit confused about the directory structure in the repo because there is another threading.py that does contain this up-to-date code (in lib-python/2.7, but that doesn't seem to be used)...
msg7541 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-11-28.00:20:23
There are indeed two directories - one is the unaltered standard lib from Python 2.7 (lib-python/2.7) and the other is the Jython specific changed versions. We haven't merged the threading.py files yet - I believe there are some Jython-only additions in Lib/threading.py that need merging. Thanks for the bug report!
msg7578 (view) Author: Irmen de Jong (irmen) Date: 2013-01-19.13:35:59
any progress on this merge?
msg7614 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-04.19:58:42
Fixed for 2.7.
History
Date User Action Args
2013-02-04 19:58:42fwierzbickisetstatus: open -> closed
resolution: fixed
messages: + msg7614
2013-01-19 13:35:59irmensetmessages: + msg7578
2012-11-28 00:20:23fwierzbickisetnosy: + fwierzbicki
messages: + msg7541
2012-11-27 23:37:10irmensetmessages: + msg7540
2012-11-27 23:26:28irmencreate