summaryrefslogtreecommitdiff
path: root/Python/compile.c
AgeCommit message (Collapse)AuthorLines
2013-08-27Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka-1/+1
error messages and comments.
2013-04-19Fix indentation.Ezio Melotti-6/+6
2013-04-06Issue #17645: convert an assert() into a proper exception in _Py_Mangle().Antoine Pitrou-2/+5
2012-11-25Issue #16546: make ast.YieldFrom argument mandatory.Mark Dickinson-14/+11
2012-11-04Issue #5765: Apply a hard recursion limit in the compilerNick Coghlan-0/+5
Previously, excessive nesting in expressions would blow the stack and segfault the interpreter. Now, a hard limit based on the configured recursion limit and a hardcoded scaling factor is applied.
2012-07-18remove unused variableBenjamin Peterson-1/+1
2012-07-18Issue #15368: fixing variable typo.Meador Inge-1/+1
2012-07-18Issue #15368: fixing variable typo.Meador Inge-1/+1
2012-07-18Issue #15368: make bytecode generation deterministic.Meador Inge-2/+22
2012-07-18Issue #15368: make bytecode generation deterministic.Meador Inge-2/+22
2012-05-27Close #14857: fix regression in references to PEP 3135 implicit __class__ ↵Nick Coghlan-1/+1
closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue
2012-04-27Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)Victor Stinner-0/+1
* In debug mode, fill the string data with invalid characters * Simplify also reference counting in PyCodec_BackslashReplaceErrors() and PyCodec_XMLCharRefReplaceError()
2012-04-17merge 3.2 (#14607)Benjamin Peterson-1/+5
2012-04-17mangle keyword-only argname when loading defaults (closes #14607)Benjamin Peterson-1/+5
2012-03-15perform yield from delegation by repeating YIELD_FROM opcode (closes #14230)Benjamin Peterson-2/+4
This allows generators that are using yield from to be seen by debuggers. It also kills the f_yieldfrom field on frame objects. Patch mostly from Mark Shannon with a few tweaks by me.
2012-01-14make YieldFrom its own distinct from Yield (closes #13780)Benjamin Peterson-3/+7
2012-01-13Implement PEP 380 - 'yield from' (closes #11682)Nick Coghlan-1/+7
2011-11-25PEP 3155 / issue #13448: Qualified name for classes and functions.Antoine Pitrou-19/+120
2011-09-28Check for PyUnicode_CopyCharacters() failureVictor Stinner-2/+8
2011-09-28Implement PEP 393.Martin v. Löwis-40/+49
2011-06-19use a invalid name for the __class__ closure for super() (closes #12370)Benjamin Peterson-1/+1
This prevents the assignment of __class__ in the class body from breaking super. (Although a determined person could do locals()["@__class__"] = 4)
2011-05-29unify TryExcept and TryFinally (closes #12199)Benjamin Peterson-10/+24
2011-05-27merge 3.2Benjamin Peterson-2/+2
2011-05-27merge 3.1Benjamin Peterson-2/+2
2011-05-27fix spacingBenjamin Peterson-2/+2
2011-05-27merge 3.2Benjamin Peterson-50/+50
2011-05-27merge 3.1Benjamin Peterson-50/+50
2011-05-27fix indentationBenjamin Peterson-50/+50
2011-05-27reflect with statements with multiple items in the AST (closes #12106)Benjamin Peterson-8/+13
2011-05-27Revert my commit 7ba176c2f558: "Avoid useless "++" at the end of functionsVictor Stinner-3/+3
Warnings found by the Clang Static Analyzer." Most people prefer ++ at the end of functions.
2011-05-27try to use the same str object for all code filenames when compiling or ↵Benjamin Peterson-18/+9
unmarshalling (#12190) This should reduce memory usage.
2011-05-26Avoid useless "++" at the end of functionsVictor Stinner-3/+3
Warnings found by the Clang Static Analyzer.
2011-03-02Remove useless argument of _PyUnicode_AsDefaultEncodedString()Victor Stinner-1/+1
2010-12-04Add an "optimize" parameter to compile() to control the optimization level, ↵Georg Brandl-10/+22
and provide an interface to it in py_compile, compileall and PyZipFile.
2010-11-30Remove redundant includes of headers that are already included by Python.h.Georg Brandl-2/+0
2010-10-19Recorded merge of revisions 85569-85570 via svnmerge fromVictor Stinner-1/+1
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85569 | victor.stinner | 2010-10-16 15:14:10 +0200 (sam., 16 oct. 2010) | 4 lines Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode. ........ r85570 | victor.stinner | 2010-10-16 15:42:53 +0200 (sam., 16 oct. 2010) | 4 lines Fix ast_error_finish() and err_input(): filename can be NULL Fix my previous commit (r85569). ........
2010-10-17compiler_error(): use PyUnicode_DecodeFSDefault() to decode the filename,Victor Stinner-2/+11
instead of utf-8 in strict mode.
2010-10-16Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expectsVictor Stinner-1/+1
filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode.
2010-09-20add column offset to all syntax errorsBenjamin Peterson-2/+8
2010-09-10#4617: Previously it was illegal to delete a name from the localAmaury Forgeot d'Arc-7/+3
namespace if it occurs as a free variable in a nested block. This limitation of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF). This sample was valid in 2.6, but fails to compile in 3.x without this change:: >>> def f(): ... def print_error(): ... print(e) ... try: ... something ... except Exception as e: ... print_error() ... # implicit "del e" here This sample has always been invalid in Python, and now works:: >>> def outer(x): ... def inner(): ... return x ... inner() ... del x There is no need to bump the PYC magic number: the new opcode is used for code that did not compile before.
2010-09-04Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replacedAntoine Pitrou-5/+3
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but our bytecode is a bit simplified. Patch by Demur Rumed.
2010-07-20revert unintended changesBenjamin Peterson-3/+1
2010-07-20move test_trace.py so as not to conflict with future tests for the trace moduleBenjamin Peterson-1/+3
2010-06-22Merged revisions 82171 via svnmerge fromAntoine Pitrou-38/+38
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r82171 | antoine.pitrou | 2010-06-22 23:49:39 +0200 (mar., 22 juin 2010) | 10 lines Merged revisions 82169 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82169 | antoine.pitrou | 2010-06-22 23:42:05 +0200 (mar., 22 juin 2010) | 4 lines Fix misindents in compile.c (for Benjamin). Of course, whoever used the wrong indentation rules needs to be spanked. ........ ................
2010-06-22Merged revisions 82169 via svnmerge fromAntoine Pitrou-11/+11
svn+ssh://pythondev@svn.python.org/python/trunk ........ r82169 | antoine.pitrou | 2010-06-22 23:42:05 +0200 (mar., 22 juin 2010) | 4 lines Fix misindents in compile.c (for Benjamin). Of course, whoever used the wrong indentation rules needs to be spanked. ........
2010-06-17Merged revisions 82059,82061 via svnmerge fromVictor Stinner-1/+1
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82059 | victor.stinner | 2010-06-18 01:08:50 +0200 (ven., 18 juin 2010) | 5 lines Issue #6543: Write the traceback in the terminal encoding instead of utf-8. Fix the encoding of the modules filename. Reindent also traceback.h, just because I hate tabs :-) ........ r82061 | victor.stinner | 2010-06-18 01:17:37 +0200 (ven., 18 juin 2010) | 2 lines Issue #6543: Mention the author of the patch, Amaury Forgeot d'Arc ........
2010-06-17Issue #6543: Write the traceback in the terminal encoding instead of utf-8.Victor Stinner-1/+1
Fix the encoding of the modules filename. Reindent also traceback.h, just because I hate tabs :-)
2010-05-09Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou-3073/+3073
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines Recorded merge of revisions 81029 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........ ................
2010-05-09Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou-3025/+3025
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
2010-03-17Merged revisions 79034 via svnmerge fromBenjamin Peterson-0/+5
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79034 | benjamin.peterson | 2010-03-17 15:41:42 -0500 (Wed, 17 Mar 2010) | 1 line prevent lambda functions from having docstrings #8164 ........