Re: [Python-Dev] AST branch is in?
Simon Burton [EMAIL PROTECTED] wrote: Is there a python interface ? Not yet. Neil ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On Tue, Oct 25, 2005 at 01:36:26PM +1000, Simon Burton wrote: Is there a python interface ? Not yet, as far as I know. FYI, all: please see the following weblog entry for a description of the AST branch: http://www.amk.ca/diary/2005/10/the_ast_branch_lands_1 If I got anything wrong, please offer corrections in the comments for that post. --amk ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On 10/20/05, Neal Norwitz [EMAIL PROTECTED] wrote: The Grammar is (was at one point at least) shared between Jython andwould allow more tools to be able to share infrastructure.The ideais to eventually be able to have [JP]ython output the same AST totools. Hello Python-dev, My name is Frank Wierzbicki and I'm working on the Jython project. Does anyone on this list know more about the history of this Grammar sharing between the two projects? I've heard about some Grammar sharing between Jython and Python, and I've noticed that (most of) the jython code in /org/python/parser/ast is commented Autogenerated AST node. I would definitely like to look at (eventually) coordinating with this effort. I've cross-posted to the Jython-dev list in case someone there has some insight. Thanks, Frank ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On 10/25/05, Frank Wierzbicki [EMAIL PROTECTED] wrote: My name is Frank Wierzbicki and I'm working on the Jython project. Does anyone on this list know more about the history of this Grammar sharing between the two projects? I've heard about some Grammar sharing between Jython and Python, and I've noticed that (most of) the jython code in /org/python/parser/ast is commented Autogenerated AST node. I would definitely like to look at (eventually) coordinating with this effort. I've cross-posted to the Jython-dev list in case someone there has some insight. Your best bet is to track down Jim Hugunin and see if he remembers. He's jimhug at microsoft.com or jim at hugunin.net. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
Guido van Rossum wrote: On 10/25/05, Frank Wierzbicki [EMAIL PROTECTED] wrote: My name is Frank Wierzbicki and I'm working on the Jython project. Does anyone on this list know more about the history of this Grammar sharing between the two projects? I've heard about some Grammar sharing between Jython and Python, and I've noticed that (most of) the jython code in /org/python/parser/ast is commented Autogenerated AST node. I would definitely like to look at (eventually) coordinating with this effort. I've cross-posted to the Jython-dev list in case someone there has some insight. Your best bet is to track down Jim Hugunin and see if he remembers. He's jimhug at microsoft.com or jim at hugunin.net. no. this is all after Jim, its indeed a derived effort from the CPython own AST effort, just that we started using it quite a while ago. This is all after Jim was not involved with Jython anymore, Finn Bock started this. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On 10/25/05, Samuele Pedroni [EMAIL PROTECTED] wrote: Your best bet is to track down Jim Hugunin and see if he remembers. He's jimhug at microsoft.com or jim at hugunin.net. no. this is all after Jim, its indeed a derived effort from the CPython own AST effort, just that we started using it quite a while ago. This is all after Jim was not involved with Jython anymore, Finn Bock started this. Oops! Sorry for the misinformation. Shows how much I know. :( -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On Fri, 21 Oct 2005 18:32:22 + (UTC) nas at arctrix.com (Neil Schemenauer) wrote: Does it just allow us to do new and interesting manipulations of the code during compilation? Well, that's a pretty big deal, IMHO. For example, adding pychecker-like functionality should be straight forward now. I also hope some of the namespace optimizations get explored (e.g. PEP 267). Is there a python interface ? Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
Anthony Baxter wrote: So it looks like the AST branch has landed. Wooo! Well done to all who were involved - it seems like it's been a huge amount of work. Congratulations from this quarter, too. I really liked the structure of the new compiler in the limited time I spent working with it on the AST branch, and am glad it has made its way onto the HEAD for Python 2.5. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://boredomandlaziness.blogspot.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On 10/20/05, Neal Norwitz [EMAIL PROTECTED] wrote: On 10/20/05, Anthony Baxter [EMAIL PROTECTED] wrote: Could someone involved give a short email laying out what concrete (no pun intended) advantages this new compiler gives us? Does it just allow us to do new and interesting manipulations of the code during compilation? Cleaner, easier to maintain, or the like? I just wanted to clarify that Neal meant the abstract syntax, not the grammar. It should allow people to write tools to analyze Python source code without having to worry about the often irrelevant details of the exact tokens or the way they are parsed. We should be able to get to a state where tools using the AST work with Python and Jython (and maybe IronPython, who knows). The tokenize and parser modules still exist for tools for which those details aren't irrelevant. We should also think about how to migrate the compiler module from its current AST to the new AST, although the backwards compatibility issues there are a bit tricky. The Grammar is (was at one point at least) shared between Jython and would allow more tools to be able to share infrastructure. The idea is to eventually be able to have [JP]ython output the same AST to tools. There is quite a bit of generated code based on the Grammar. So some stuff should be easier. Other stuff is just moved. You still need to convert from the AST to the byte code. Hopefully it will be easier to do various sorts of optimization and general manipulation of an AST rather than what existed before. I think it should be a lot easier to write tools for the C Python compiler that do extra analysis or optimization. The existing peephole optimizer could be improved by integrating it with the bytecode assembler (for example, eliminating all NOP bytecodes). Jeremy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On 10/20/05, Guido van Rossum [EMAIL PROTECTED] wrote: On 10/20/05, Anthony Baxter [EMAIL PROTECTED] wrote: So it looks like the AST branch has landed. Wooo! Well done to all who were involved - it seems like it's been a huge amount of work. Hear, hear. Great news! Thanks to Jeremy, Neil and all the others. I can't wait to check it out! I want to thank all the people who made it possible by writing code and debugging. I hope this is a complete list: Armin Rigo Brett Cannon Grant Edwards John Ehresman Kurt Kaiser Neal Norwitz Neil Schemenauer Nick Coghlan Tim Peters And thanks to the PSF and PyCon organizers for hosting the formerly annual ast-branch sprints! Jeremy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
Anthony Baxter [EMAIL PROTECTED] wrote: Could someone involved give a short email laying out what concrete (no pun intended) advantages this new compiler gives us? One advantage is that it decreases the coupling between the parser and the backend of the compiler. For example, it should be possible to replace the parser without modifying a lot of the compiler. Also, the concrete syntax tree (CST) generated by Python's parser is not a convenient data structure to deal with. Anyone who's used the 'parser' module probably experienced the pain: parser.ast2list(parser.suite('a = 1')) [257, [266, [267, [268, [269, [320, [298, [299, [300, [301, [303, [304, [305, [306, [307, [308, [309, [310, [311, [1, 'a']]], [22, '='], [320, [298, [299, [300, [301, [303, [304, [305, [306, [307, [308, [309, [310, [311, [2, '1'], [4, '']]], [0, '']] Does it just allow us to do new and interesting manipulations of the code during compilation? Well, that's a pretty big deal, IMHO. For example, adding pychecker-like functionality should be straight forward now. I also hope some of the namespace optimizations get explored (e.g. PEP 267). Cleaner, easier to maintain, or the like? At this point, the old and new compiler are pretty similar in terms of complexity. However, the new compiler is a much better base to build upon. Neil ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch is in?
On 10/21/05, Neil Schemenauer [EMAIL PROTECTED] wrote: Also, the concrete syntax tree (CST) generated by Python's parser is not a convenient data structure to deal with. Anyone who's used the 'parser' module probably experienced the pain: parser.ast2list(parser.suite('a = 1')) [257, [266, [267, [268, [269, [320, [298, [299, [300, [301, [303, [304, [305, [306, [307, [308, [309, [310, [311, [1, 'a']]], [22, '='], [320, [298, [299, [300, [301, [303, [304, [305, [306, [307, [308, [309, [310, [311, [2, '1'], [4, '']]], [0, '']] That's the fault of the 'parser' extension module though, and this affects tools using the parser module, not the bytecode compiler itself. The CST exposed to C programmers is slightly higher level. (But the new AST is higher level still, of course.) BTW, Elemental is letting me open-source a reimplementation of pgen in Python. This also includes a nifty way to generate ASTs. This should become available within a few weeks. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch merge status
I'm still making slow progress on this front. I have a versioned merged to the CVS head. I'd like to make a final pass over the patch. I'd upload it to SF, but I can't connect to a web server there. If anyone would like to eyeball that patch before I commit it, I can email it to you. Jeremy On 10/16/05, Jeremy Hylton [EMAIL PROTECTED] wrote: Real life interfered with the planned merge tonight. I hope you'll all excuse and wait until tomorrow night. Jeremy On 10/16/05, Jeremy Hylton [EMAIL PROTECTED] wrote: I just merged the head back to the AST branch for what I hope is the last time. I plan to merge the branch to the head on Sunday evening. I'd appreciate it if folks could hold off on making changes on the trunk until that merge happens. If this is a non-trivial inconvenience for anyone, go ahead with the changes but send me mail to make sure that I don't lose the changes when I do the merge. Regardless, the compiler and Grammar are off limits. I'll blow away any changes you make there 0.1 wink. Jeremy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch update
Hi Jeremy, On Thu, Oct 13, 2005 at 04:52:14PM -0400, Jeremy Hylton wrote: I don't think the current test suite covers all of the possible syntax errors that can be raised. I'd like to add a new test suite that covers all of the remaining cases, perhaps moving some existing tests into this module as well. You might be interested in PyPy's test suite here. In particular, http://codespeak.net/svn/pypy/dist/pypy/interpreter/test/test_syntax.py contains a list of syntactically valid and invalid corner cases. If you are willing to check out the whole of PyPy (i.e. http://codespeak.net/svn/pypy/dist) you should also be able to run the whole test suite, or at least the following tests: python test_all.py pypy/interpreter/test/test_compiler.py python test_all.py pypy/interpreter/pyparser/ which compare CPython's builtin compiler with our own compilers; as of PyPy revision 18722 these tests pass on all CPython versions (2.3.5, 2.4.2, HEAD). A bientot, Armin. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] AST branch merge status
I just merged the head back to the AST branch for what I hope is the last time. I plan to merge the branch to the head on Sunday evening. I'd appreciate it if folks could hold off on making changes on the trunk until that merge happens. If this is a non-trivial inconvenience for anyone, go ahead with the changes but send me mail to make sure that I don't lose the changes when I do the merge. Regardless, the compiler and Grammar are off limits. I'll blow away any changes you make there 0.1 wink. Jeremy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch update
[Jeremy] Neil and I have been working on the AST branch for the last week. We're nearly ready to merge the changes to the head. [Raymond] Nice work. Indeed. I should've threatened to kill the AST branch long ago! :) -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch update
On 10/13/05, Guido van Rossum [EMAIL PROTECTED] wrote: Indeed. I should've threatened to kill the AST branch long ago! :) :-) I decreased a lot of the memory leaks. Here are some more to work on. I doubt this list is complete, but it's a start: PyObject_Malloc (obmalloc.c:717) _PyObject_DebugMalloc (obmalloc.c:1014) compiler_enter_scope (newcompile.c:1204) compiler_mod (newcompile.c:1894) PyAST_Compile (newcompile.c:471) Py_CompileStringFlags (pythonrun.c:1240) builtin_compile (bltinmodule.c:391) Tuple (Python-ast.c:907) ast_for_testlist (ast.c:1782) ast_for_classdef (ast.c:2677) ast_for_stmt (ast.c:2758) PyAST_FromNode (ast.c:233) PyParser_ASTFromFile (pythonrun.c:1291) parse_source_module (import.c:762) load_source_module (import.c:886) new_arena (obmalloc.c:500) PyObject_Malloc (obmalloc.c:699) PyObject_Realloc (obmalloc.c:837) _PyObject_DebugRealloc (obmalloc.c:1077) PyNode_AddChild (node.c:95) shift (parser.c:112) PyParser_AddToken (parser.c:244) parsetok (parsetok.c:165) PyParser_ParseFileFlags (parsetok.c:89) PyParser_ASTFromFile (pythonrun.c:1288) parse_source_module (import.c:762) load_source_module (import.c:886) Lambda (Python-ast.c:610) ast_for_lambdef (ast.c:859) ast_for_expr (ast.c:1443) ast_for_testlist (ast.c:1776) ast_for_expr_stmt (ast.c:1845) ast_for_stmt (ast.c:2716) PyAST_FromNode (ast.c:233) PyParser_ASTFromString (pythonrun.c:1271) Py_CompileStringFlags (pythonrun.c:1237) builtin_compile (bltinmodule.c:391) BinOp (Python-ast.c:557) ast_for_binop (ast.c:1389) ast_for_expr (ast.c:1531) ast_for_testlist (ast.c:1776) ast_for_expr_stmt (ast.c:1845) ast_for_stmt (ast.c:2716) PyAST_FromNode (ast.c:233) PyParser_ASTFromString (pythonrun.c:1271) Py_CompileStringFlags (pythonrun.c:1237) builtin_compile (bltinmodule.c:391) Name (Python-ast.c:865) ast_for_atom (ast.c:1201) ast_for_expr (ast.c:1555) ast_for_testlist (ast.c:1776) ast_for_expr_stmt (ast.c:1798) ast_for_stmt (ast.c:2716) PyAST_FromNode (ast.c:233) PyParser_ASTFromString (pythonrun.c:1271) Py_CompileStringFlags (pythonrun.c:1237) builtin_compile (bltinmodule.c:391) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch update
On 10/14/05, Neal Norwitz [EMAIL PROTECTED] wrote: I decreased a lot of the memory leaks. Here are some more to work on. I doubt this list is complete, but it's a start: Oh and since I fixed the memory leaks in a generated file Python/Python-ast.c, the changes still need to be implemented in the right place (ie, Parser/asdl_c.py). Valgrind didn't report any invalid uses of memory, though there is also a lot potentially leaked memory. It seemed a lot higher than what I remembered, so I'm not sure if it's an issue or not. I'll look into that after we get the definite memory leaks plugged. n ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] AST branch update
Neil and I have been working on the AST branch for the last week. We're nearly ready to merge the changes to the head. I imagine we'll do it this weekend, barring last minute glitches. There are a few open issues that remain. I'd like to merge the branch before resolving them. Please let me know if you disagree. The current status of the AST branch is that only two tests fail: test_trace and test_symtable. The causes for these failures are described below. We did not merge the current head to the branch again, but I diffed the test suite between head and branch and did not see any substantive changes since the last merge. Some of the finer points of generating the line number table (lnotab) are wrong. There is some very delicate code to support single stepping with the debugger. We'll get that fixed soon, but we'd like to temporarily disable the failing tests in test_trace. The symtable module exposed parts of the internal representation of the old symbol table. The representation changed, and the module is going to need to change. The old module was poorly documented and tested, so I'd like to start over. Again, I'd like to disable a couple of failing tests until after the merge occurs. I don't think the current test suite covers all of the possible syntax errors that can be raised. I'd like to add a new test suite that covers all of the remaining cases, perhaps moving some existing tests into this module as well. I'd like to do that after the merge, which means there may be some loose ends where syntax errors aren't handled gracefully. For those of you familiar with the ast work, I'll summarize the recent changes: We added line numbers to expressions in the AST. There are many cases where a statement spans multiple lines. We couldn't generate a correct lnotab without knowing the lines that expressions occur on. We merged the peephole optimizer into the new compiler and restored PyNode_Compile() so that the parser module works again. The parser module will still expose the old parse trees (just what it's users want). We should probably provide a similar AST module, but I'm not sure if we'll get to that. We fixed some flawed logic in the symbol table for handling nested scopes. Luckily, the test cases for nested scopes are pretty thorough. They all pass now. Jeremy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch update
I'm excited to see work continuing (resuming?) on the AST tree. I don't know how many machines you've been able to test the AST branch on. I have a linux/amd64 machine handy and I've tried to run the test suite with a fresh copy of the ast-branch. test_trace segfaults consistently, even when run alone. You didn't give me the impression that the failure was a segfault, so I'll include more information about it below. With '-x test_trace -x test_codecencodings_kr', I get through the testsuite run. Compared to a build of HEAD, also from today, I get additional failures in test_genexps test_grp test_pwd test_symtable and additional unexpected skips of: test_email test_email_codecs The 'pwd' and 'grp' failures look like they're due to a change not merged from HEAD. I'm not sure what to make of the 'genexps' failure. Is it just a harmless output difference? I didn't see you mention that in your message. Here is some of the relevant-looking output: $ ./python -E -tt ./Lib/test/regrtest.py [...] ** File /usr/src/python-ast/Lib/test/test_genexps.py, line ?, in test.test_genexps.__test__.doctests Failed example: (y for y in (1,2)) = 10 Expected: Traceback (most recent call last): ... SyntaxError: assign to generator expression not possible Got: Traceback (most recent call last): File /usr/src/python-ast/Lib/doctest.py, line 1243, in __run compileflags, 1) in test.globs File doctest test.test_genexps.__test__.doctests[38], line 1 SyntaxError: assignment to generator expression not possible (doctest test.test_genexps.__test__.doctests[38], line 1) ** File /usr/src/python-ast/Lib/test/test_genexps.py, line ?, in test.test_genexps.__test__.doctests Failed example: (y for y in (1,2)) += 10 Expected: Traceback (most recent call last): ... SyntaxError: augmented assign to tuple literal or generator expression not possible Got: Traceback (most recent call last): File /usr/src/python-ast/Lib/doctest.py, line 1243, in __run compileflags, 1) in test.globs File doctest test.test_genexps.__test__.doctests[39], line 1 SyntaxError: augmented assignment to generator expression not possible (doctest test.test_genexps.__test__.doctests[39], line 1) ** [...] test test_grp failed -- Traceback (most recent call last): File /usr/src/python-ast/Lib/test/test_grp.py, line 29, in test_values e2 = grp.getgrgid(e.gr_gid) OverflowError: signed integer is greater than maximum [...] test test_pwd failed -- Traceback (most recent call last): File /usr/src/python-ast/Lib/test/test_pwd.py, line 42, in test_values self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid]) OverflowError: signed integer is greater than maximum The segfault in test_trace looks like this: $ gdb ./python (gdb) source Misc/gdbinit (gdb) run Lib/test/test_trace.py [...] test_10_no_jump_to_except_1 (__main__.JumpTestCase) ... FAIL Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912496260768 (LWP 11945)] PyEval_EvalFrame (f=0x652c30) at Python/ceval.c:1994 [1967 case COMPARE_OP:) 1994Py_DECREF(v); (gdb) print oparg $1 = 10 [PyCmp_EXC_MATCH?] (gdb) pyo v NULL $2 = void #0 PyEval_EvalFrame (f=0x652c30) at Python/ceval.c:1994 #1 0x00475800 in PyEval_EvalFrame (f=0x697390) at Python/ceval.c:3618 #2 0x00475800 in PyEval_EvalFrame (f=0x694f10) at Python/ceval.c:3618 #3 0x00475800 in PyEval_EvalFrame (f=0x649fa0) at Python/ceval.c:3618 [...] #50 0x004113bb in Py_Main (argc=Variable argc is not available.) at Modules/main.c:484 (gdb) pystack Lib/test/test_trace.py (447): no_jump_to_except_2 Lib/test/test_trace.py (447): run_test Lib/test/test_trace.py (557): test_11_no_jump_to_except_2 /usr/src/python-ast/Lib/unittest.py (581): run /usr/src/python-ast/Lib/unittest.py (280): __call__ /usr/src/python-ast/Lib/unittest.py (420): run /usr/src/python-ast/Lib/unittest.py (427): __call__ /usr/src/python-ast/Lib/unittest.py (420): run /usr/src/python-ast/Lib/unittest.py (427): __call__ /usr/src/python-ast/Lib/unittest.py (692): run /usr/src/python-ast/Lib/test/test_support.py (692): run_suite /usr/src/python-ast/Lib/test/test_support.py (278): run_unittest Lib/test/test_trace.py (600): test_main Lib/test/test_trace.py (600): module I'm not sure what other information from gdb to furnish. Jeff pgpwR8FC2UMjQ.pgp
Re: [Python-Dev] AST branch update
On Thu, Oct 13, 2005 at 05:08:41PM -0500, [EMAIL PROTECTED] wrote: test_trace segfaults consistently, even when run alone. That's a bug in frame_setlineno(), IMO. It's failing to detect an invalid jump because the lnotab generated by the new compiler is slightly different (DUP_TOP opcode corresponds to a different line). I'm not sure what to make of the 'genexps' failure. Is it just a harmless output difference? I didn't see you mention that in your message. It's a bug in the traceback.py module, IMO. See bug 1326077. Neil ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch update
On Fri, Oct 14, 2005 at 01:03:28AM -0400, Raymond Hettinger wrote: Do the AST branch generate a syntax error for: foo(a = i for i in range(10)) No. It generates the same broken code as the current compiler. Neil ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] AST branch patches (was Re: PEP 342/343 status?)
Nick Coghlan wrote: Brett C. wrote: I noticed Nick's PEP is still not up. Probably too busy with that fix for genexps in the AST branch, huh, Nick? =) Something like that. . . still, I finally got around to fixing the formatting in the text file and sending it back to David :) Add to that AST patches for the genexp scoping, lambda nested args and creation of distinct code objects for lambdas defined on different lines. I guess I finally got over the Python overdose resulting from trying to keep up with the PEP 340 discussion :) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://boredomandlaziness.blogspot.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] AST branch patches (was Re: PEP 342/343 status?)
Nick Coghlan wrote: Nick Coghlan wrote: Brett C. wrote: I noticed Nick's PEP is still not up. Probably too busy with that fix for genexps in the AST branch, huh, Nick? =) Something like that. . . still, I finally got around to fixing the formatting in the text file and sending it back to David :) Add to that AST patches for the genexp scoping, lambda nested args and creation of distinct code objects for lambdas defined on different lines. I guess I finally got over the Python overdose resulting from trying to keep up with the PEP 340 discussion :) Wow! Thanks, Nick! Now I am the slacker. =) To give you and everyone else a general timeline on the AST stuff, I am coming up on the last week of school for me. After this upcoming week I have a week to pack, graduation weekend, and then I start my internship in the Bay Area. My hope is to put in at least an hour into Python every other night after work (although, knowing me, that hour will morph into three hours at least =). I am planning to split this time between the AST branch, reworking the dev docs at python.org/dev, and finally writing the Python 3000 exceptions reorg PEP. I am hoping to making some decent headway on the branch this summer before I leave for UBC. For those of you who want to keep track of the progress of the AST branch, there is a running tracker item, bug #1191458 (http://www.python.org/sf/1191458), that lists the currently failing tests. Once that bug report is closed then the AST is semantically complete. I do, though, want to go through and clean up the syntax to match PEP 7 specs before it gets merged into the mainline once it is semantically working. -Brett ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] ast branch pragmatics
I think it would be easier to create a new branch from the current head, integrate the small number of changed files from ast-branch, and work with that branch instead. The idea is that it's an end-run around doing an automatic CVS merge and relying on someone to manually merge the changes. At the same time, since there is a groundswell of support for finishing the AST work, I'd like to propose that we stop making compiler / bytecode changes until it is done. Every change to compile.c or the bytecode ends up creating a new incompatibilty that needs to be merged. If these two plans sound good, I'll get started on the new branch. +1 -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com