This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients terry.reedy, vstinner, ztane
Date 2014-05-12.23:45:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399938325.33.0.640799848381.issue21385@psf.upfronthosting.co.za>
In-reply-to
Content
With the development version (Python 3.5), I reproduce the crash when Python is compiled in debug mode:

$ ./python astlinenotest.py 
python: Python/compile.c:3975: assemble_lnotab: Assertion `d_lineno >= 0' failed.
Abandon (core dumped)

The problem is that astlinenotest.py creates an AST node without lineno information, which makes an assertion to fail in the compiler.

In my astoptimizer project, I use this function to not have to worry of the lineno:

def copy_lineno(node, new_node):
    ast.fix_missing_locations(new_node)
    ast.copy_location(new_node, node)
    return new_node
History
Date User Action Args
2014-05-12 23:45:25vstinnersetrecipients: + vstinner, terry.reedy, ztane
2014-05-12 23:45:25vstinnersetmessageid: <1399938325.33.0.640799848381.issue21385@psf.upfronthosting.co.za>
2014-05-12 23:45:25vstinnerlinkissue21385 messages
2014-05-12 23:45:24vstinnercreate