Commit Graph

38 Commits

Author SHA1 Message Date
Benjamin Peterson
5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Georg Brandl
944f684ce6 Allow multiple context managers in one with statement, as proposed
in http://codereview.appspot.com/53094 and accepted by Guido.

The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
2009-05-25 21:02:56 +00:00
Neil Schemenauer
f8741eacf5 Add test for issue #999042, explict global statement works. 2009-02-07 18:35:16 +00:00
Amaury Forgeot d'Arc
67f24f1ed6 follow-up of issue3473: update the compiler package to recognize the new syntax. 2008-08-20 00:08:47 +00:00
Brett Cannon
6192df10b6 Deprecate the compiler package for removal in 3.0. 2008-05-10 02:58:26 +00:00
Eric Smith
14cae96fa6 Another test for __future__ print_function. 2008-03-19 03:13:34 +00:00
Christian Heimes
c5f05e45cf Patch #2167 from calvin: Remove unused imports 2008-02-23 17:40:11 +00:00
Martin v. Löwis
a5136196bc Patch #1031213: Decode source line in SyntaxErrors back to its original
source encoding. Will backport to 2.5.
2007-09-04 14:19:28 +00:00
Georg Brandl
ab49684f55 Patch #1638243: the compiler package is now able to correctly compile
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
2007-01-27 17:43:02 +00:00
Neil Schemenauer
4c6b0d5bec Fix a bug in the `compiler` package that caused invalid code to be
generated for generator expressions.
2006-08-16 23:38:05 +00:00
Tim Peters
b1ccc4d409 Whitespace normalization. 2006-08-04 22:00:35 +00:00
Neil Schemenauer
06ded09d40 Fix the 'compiler' package to generate correct code for MAKE_CLOSURE.
In the 2.5 development cycle, MAKE_CLOSURE as changed to take free
variables as a tuple rather than as individual items on the stack.
Closes patch #1534084.
2006-08-04 16:20:30 +00:00
Georg Brandl
edd9b0dfb3 Bug #1441397: The compiler module now recognizes module and function
docstrings correctly as it did in Python 2.4.
2006-07-29 09:33:26 +00:00
Georg Brandl
f57c54db03 Test for correct compilation of try-except-finally stmt.
Test for correct lineno on list, tuple, dict literals.
2006-06-22 14:46:46 +00:00
Georg Brandl
b2afe855e5 Make use of new str.startswith/endswith semantics.
Occurences in email and compiler were ignored due to backwards compat requirements.
2006-06-09 20:43:48 +00:00
Georg Brandl
1bb6230930 Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler package. 2006-05-03 18:18:32 +00:00
Neal Norwitz
dd28d1c6c2 Try to really fix the slow buildbots this time.
Printing to stdout, doesn't mean the data was actually written.
It depends on the buffering, so we need to flush.  This will hopefully
really fix the buildbots getting killed due to no output on the slow bots.
2006-04-28 04:34:43 +00:00
Neal Norwitz
07c6071729 test_compile can be really long if we are using -u compiler.
This may be causing the debian sparc buildbot to fail.
Print a little message to let the user ^w buildbot know it's still thinking.

We may want to adjust the time period which is currently 5 minutes.

Will backport.
2006-04-13 06:34:59 +00:00
Guido van Rossum
5bde08dba3 Fix failure of test_compiler.py when compiling test_contextlib.py.
The culprit was an expression-less yield -- the first apparently in
the standard library.  I added a unit test for this.
Also removed the hack to force compilation of test_with.py.
2006-03-02 04:24:01 +00:00
Martin v. Löwis
d9bfeac330 Reformat the exception message by going through a list. 2006-03-01 23:24:34 +00:00
Martin v. Löwis
15bfc3b082 Make failures in test cases print failing source file. 2006-03-01 21:11:49 +00:00
Guido van Rossum
7ad94f011e Update the compiler package to compile the with-statement.
Jeremy, please review!
2006-02-28 00:32:16 +00:00
Tim Peters
2841af4cec Revert revision 41940: the test causes -uall to
fail everywhere.
2006-01-07 23:20:46 +00:00
Georg Brandl
39cdfff691 Add compiler test regarding optional arguments. 2006-01-06 19:28:15 +00:00
Neal Norwitz
f8950654e3 Fix compiler test when run with -u (long mode) 2005-10-24 00:01:37 +00:00