Issue1346

classification
Title: compiler.transformer uses parser which is not defined
Type: Severity: normal
Components: Library Versions: 2.5b1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Christof, pjenvey
Priority: Keywords:

Created on 2009-05-13.11:01:51 by Christof, last changed 2009-05-15.01:36:18 by pjenvey.

Messages
msg4680 (view) Author: Christof (Christof) Date: 2009-05-13.11:01:50
(I try to run web.py with Jython 2.5rc2 but have 2 problems (the other
with socket I'll put as another issue).)

I use the basic example on http://webpy.org/ (folder web with the source
is in on the path). After starting the server and doing a first request
I get a stack trace in the browser and on the command line. It seems
somehow the Lib/compiler/transformer.py module in line 125, 130 and 134
uses the a global "parser" which is not defined nor imported (only for
CPython). 

The complete stack trace in the browser is:

Traceback (most recent call last):
  File "I:\dev-a-workspace\dev\jywebpy\web\wsgiserver\__init__.py", line
1174, in communicate
    req.respond()
  File "I:\dev-a-workspace\dev\jywebpy\web\wsgiserver\__init__.py", line
544, in respond
    self._respond()
  File "I:\dev-a-workspace\dev\jywebpy\web\wsgiserver\__init__.py", line
544, in respond
    self._respond()
  File "I:\dev-a-workspace\dev\jywebpy\web\wsgiserver\__init__.py", line
556, in _respond
    response = self.wsgi_app(self.environ, self.start_response)
  File "I:\dev-a-workspace\dev\jywebpy\web\httpserver.py", line 201, in
__call__
    return self.app(environ, xstart_response)
  File "I:\dev-a-workspace\dev\jywebpy\web\application.py", line 250, in
wsgi
    result = self.handle_with_processors()
  File "I:\dev-a-workspace\dev\jywebpy\web\application.py", line 250, in
wsgi
    result = self.handle_with_processors()
  File "I:\dev-a-workspace\dev\jywebpy\web\application.py", line 220, in
handle_with_processors
    return process(self.processors)
  File "I:\dev-a-workspace\dev\jywebpy\web\application.py", line 216, in
process
    raise self.internalerror()
  File "I:\dev-a-workspace\dev\jywebpy\web\application.py", line 449, in
internalerror
    return debugerror.debugerror()
  File "I:\dev-a-workspace\dev\jywebpy\web\debugerror.py", line 299, in
debugerror
    return web._InternalError(djangoerror())
  File "I:\dev-a-workspace\dev\jywebpy\web\debugerror.py", line 284, in
djangoerror
    djangoerror_r = Template(djangoerror_t, filename=__file__,
filter=websafe)
  File "I:\dev-a-workspace\dev\jywebpy\web\template.py", line 832, in
__init__
    code = self.compile_template(text, filename)
  File "I:\dev-a-workspace\dev\jywebpy\web\template.py", line 886, in
compile_template
    ast = compiler.parse(code)
  File "I:\program\jython2.5rc2\Lib\compiler\transformer.py", line 53,
in parse
    return Transformer().parsesuite(buf)
  File "I:\program\jython2.5rc2\Lib\compiler\transformer.py", line 130,
in parsesuite
    """Return a modified parse tree for the given suite text."""
NameError: global name 'parser' is not defined
msg4684 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-15.01:36:18
Jython doesn't support the parser module and likely never will. There's 
some more info in the second half of this comment: http://bugs.jython.org/msg3914

We do support the new _ast and ast modules
History
Date User Action Args
2009-05-15 01:36:18pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg4684
nosy: + pjenvey
2009-05-13 11:01:51Christofcreate