Issue1749

classification
Title: function descriptor doesn't work in interactive console
Type: behaviour Severity: major
Components: None Versions: 2.5.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: amak, fwierzbicki, hyao, lgoh
Priority: high Keywords:

Created on 2011-05-26.08:10:27 by hyao, last changed 2012-03-20.17:48:47 by fwierzbicki.

Messages
msg6528 (view) Author: H Yao (hyao) Date: 2011-05-26.08:10:26
It seems that function descriptors don't work correctly in interactive console; invoke the script on the cmdline works fine.

~$ jython
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) 
[OpenJDK 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_20
Type "help", "copyright", "credits" or "license" for more information.
>>> class K(object):
...   @staticmethod
  File "<stdin>", line 2
    @staticmethod
                ^
SyntaxError: mismatched input '' expecting CLASS
msg6770 (view) Author: (lgoh) Date: 2012-02-03.23:46:24
I'm in Jython 2.5.2 and I am also experiencing the same issue with function decorators in the Jython interpreter:

>>> import __builtin__
>>> class C(object):
...     @staticmethod
  File "<stdin>", line 2
    @staticmethod
                ^
SyntaxError: mismatched input '' expecting CLASS
msg6771 (view) Author: (lgoh) Date: 2012-02-03.23:49:49
Bumping up severity since it's great to be able to test functionality in the interpreter sometimes.
msg6828 (view) Author: Alan Kennedy (amak) Date: 2012-03-19.18:08:37
I am seeing the same issue in both 2.5.3 and trunk.
msg6914 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-03-20.04:27:33
Verified - looking into it.
msg6915 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-03-20.04:44:11
Fixed in http://hg.python.org/jython/rev/2923c6c259f9 - will be fixed for 2.5.3. Thanks for the bug report hyao.
History
Date User Action Args
2012-03-20 17:48:47fwierzbickisetstatus: open -> closed
resolution: accepted -> fixed
2012-03-20 04:44:11fwierzbickisetmessages: + msg6915
2012-03-20 04:27:33fwierzbickisetpriority: high
assignee: fwierzbicki
resolution: accepted
messages: + msg6914
nosy: + fwierzbicki
2012-03-19 18:08:37amaksetnosy: + amak
messages: + msg6828
2012-02-03 23:49:49lgohsetmessages: + msg6771
severity: normal -> major
versions: + 2.5.2, - 2.5.2rc
2012-02-03 23:46:24lgohsetnosy: + lgoh
messages: + msg6770
2011-05-26 08:10:27hyaocreate