summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
| | | | error messages and comments.
* Fix indentation.Ezio Melotti2013-04-191-6/+6
|
* Issue #17645: convert an assert() into a proper exception in _Py_Mangle().Antoine Pitrou2013-04-061-2/+5
|
* Issue #16546: make ast.YieldFrom argument mandatory.Mark Dickinson2012-11-251-14/+11
|
* Issue #5765: Apply a hard recursion limit in the compilerNick Coghlan2012-11-041-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.
* remove unused variableBenjamin Peterson2012-07-181-1/+1
|
* Issue #15368: fixing variable typo.Meador Inge2012-07-181-1/+1
|\
| * Issue #15368: fixing variable typo.Meador Inge2012-07-181-1/+1
| |
* | Issue #15368: make bytecode generation deterministic.Meador Inge2012-07-181-2/+22
|\ \ | |/
| * Issue #15368: make bytecode generation deterministic.Meador Inge2012-07-181-2/+22
| |
* | Close #14857: fix regression in references to PEP 3135 implicit __class__ ↵Nick Coghlan2012-05-271-1/+1
| | | | | | | | closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue
* | Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)Victor Stinner2012-04-271-0/+1
| | | | | | | | | | | | * In debug mode, fill the string data with invalid characters * Simplify also reference counting in PyCodec_BackslashReplaceErrors() and PyCodec_XMLCharRefReplaceError()
* | merge 3.2 (#14607)Benjamin Peterson2012-04-171-1/+5
|\ \ | |/
| * mangle keyword-only argname when loading defaults (closes #14607)Benjamin Peterson2012-04-171-1/+5
| |
* | perform yield from delegation by repeating YIELD_FROM opcode (closes #14230)Benjamin Peterson2012-03-151-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.
* | make YieldFrom its own distinct from Yield (closes #13780)Benjamin Peterson2012-01-141-3/+7
| |
* | Implement PEP 380 - 'yield from' (closes #11682)Nick Coghlan2012-01-131-1/+7
| |
* | PEP 3155 / issue #13448: Qualified name for classes and functions.Antoine Pitrou2011-11-251-19/+120
| |
* | Check for PyUnicode_CopyCharacters() failureVictor Stinner2011-09-281-2/+8
| |
* | Implement PEP 393.Martin v. Löwis2011-09-281-40/+49
| |
* | use a invalid name for the __class__ closure for super() (closes #12370)Benjamin Peterson2011-06-201-1/+1
| | | | | | | | | | This prevents the assignment of __class__ in the class body from breaking super. (Although a determined person could do locals()["@__class__"] = 4)
* | unify TryExcept and TryFinally (closes #12199)Benjamin Peterson2011-05-291-10/+24
| |
* | merge 3.2Benjamin Peterson2011-05-271-2/+2
|\ \ | |/
| * merge 3.1Benjamin Peterson2011-05-271-2/+2
| |\
| | * fix spacingBenjamin Peterson2011-05-271-2/+2
| | |
* | | merge 3.2Benjamin Peterson2011-05-271-51/+51
|\ \ \ | |/ /
| * | merge 3.1Benjamin Peterson2011-05-271-51/+51
| |\ \ | | |/
| | * fix indentationBenjamin Peterson2011-05-271-50/+50
| | |
| | * Recorded merge of revisions 85569-85570 via svnmerge fromVictor Stinner2010-10-191-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). ........
| | * Merged revisions 82171 via svnmerge fromAntoine Pitrou2010-06-221-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. ........ ................
| | * Merged revisions 82059,82061 via svnmerge fromVictor Stinner2010-06-171-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 ........
| | * Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou2010-05-091-3248/+3248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........ ................
| | * Merged revisions 76577 via svnmerge fromMark Dickinson2009-11-281-26/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76577 | mark.dickinson | 2009-11-28 16:38:16 +0000 (Sat, 28 Nov 2009) | 12 lines Merged revisions 76575 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76575 | mark.dickinson | 2009-11-28 16:32:27 +0000 (Sat, 28 Nov 2009) | 5 lines Issue #1678380: When distinguishing between -0.0 and 0.0 in compiler_add_o, use copysign instead of examining the first and last bytes of the double. The latter method fails for little-endian ARM, OABI, where doubles are little-endian but with the words swapped. ........ ................
| | * Merged revisions 75441 via svnmerge fromMark Dickinson2009-10-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75441 | mark.dickinson | 2009-10-15 20:55:18 +0100 (Thu, 15 Oct 2009) | 9 lines Merged revisions 75440 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75440 | mark.dickinson | 2009-10-15 18:45:39 +0100 (Thu, 15 Oct 2009) | 1 line Allow core Python build to succeed under WITHOUT_COMPLEX. The module build stage still fails. ........ ................
| | * unfortunately we can't kill compiler_new_tmpname hereBenjamin Peterson2009-06-281-0/+10
| | |
| | * Merged revisions 73623-73624 via svnmerge fromBenjamin Peterson2009-06-281-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73623 | benjamin.peterson | 2009-06-28 12:22:03 -0500 (Sun, 28 Jun 2009) | 58 lines Merged revisions 73004,73439,73496,73509,73529,73564,73576-73577,73595-73596,73605 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73004 | jeffrey.yasskin | 2009-05-28 22:44:31 -0500 (Thu, 28 May 2009) | 5 lines Fix nearly all compilation warnings under Apple gcc-4.0. Tested with OPT="-g -Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without. There's still a batch of non-prototype warnings in Xlib.h that I don't know how to fix. ........ r73439 | benjamin.peterson | 2009-06-15 19:29:31 -0500 (Mon, 15 Jun 2009) | 1 line don't mask encoding errors when decoding a string #6289 ........ r73496 | vinay.sajip | 2009-06-21 12:37:27 -0500 (Sun, 21 Jun 2009) | 1 line Issue #6314: logging.basicConfig() performs extra checks on the "level" argument. ........ r73509 | amaury.forgeotdarc | 2009-06-22 14:33:48 -0500 (Mon, 22 Jun 2009) | 2 lines #4490 Fix sample code run by "python -m xml.sax.xmlreader" ........ r73529 | r.david.murray | 2009-06-23 13:02:46 -0500 (Tue, 23 Jun 2009) | 4 lines Fix issue 5230 by having pydoc's safeimport check to see if the import error was thrown from itself in order to decide if the module can't be found. Thanks to Lucas Prado Melo for collaborating on the fix and tests. ........ r73564 | amaury.forgeotdarc | 2009-06-25 17:29:29 -0500 (Thu, 25 Jun 2009) | 6 lines #2016 Fix a crash in function call when the **kwargs dictionary is mutated during the function call setup. This even gives a slight speedup, probably because tuple allocation is faster than PyMem_NEW. ........ r73576 | benjamin.peterson | 2009-06-26 18:37:06 -0500 (Fri, 26 Jun 2009) | 1 line document is_declared_global() ........ r73577 | benjamin.peterson | 2009-06-27 09:16:23 -0500 (Sat, 27 Jun 2009) | 1 line link to extensive generator docs in the reference manual ........ r73595 | ezio.melotti | 2009-06-27 18:45:39 -0500 (Sat, 27 Jun 2009) | 1 line stmt and setup can contain multiple statements, see #5896 ........ r73596 | ezio.melotti | 2009-06-27 19:07:45 -0500 (Sat, 27 Jun 2009) | 1 line Fixed a wrong apostrophe ........ r73605 | georg.brandl | 2009-06-28 07:10:18 -0500 (Sun, 28 Jun 2009) | 1 line Remove stray pychecker directive. ........ ................ r73624 | benjamin.peterson | 2009-06-28 12:32:20 -0500 (Sun, 28 Jun 2009) | 1 line document BufferedIOBase.raw and TextIOBase.buffer ................
* | | reflect with statements with multiple items in the AST (closes #12106)Benjamin Peterson2011-05-271-8/+13
| | |
* | | Revert my commit 7ba176c2f558: "Avoid useless "++" at the end of functionsVictor Stinner2011-05-271-3/+3
| | | | | | | | | | | | | | | | | | Warnings found by the Clang Static Analyzer." Most people prefer ++ at the end of functions.
* | | try to use the same str object for all code filenames when compiling or ↵Benjamin Peterson2011-05-271-18/+9
| | | | | | | | | | | | | | | | | | unmarshalling (#12190) This should reduce memory usage.
* | | Avoid useless "++" at the end of functionsVictor Stinner2011-05-261-3/+3
| | | | | | | | | | | | Warnings found by the Clang Static Analyzer.
* | | Remove useless argument of _PyUnicode_AsDefaultEncodedString()Victor Stinner2011-03-021-1/+1
|/ /
* | Add an "optimize" parameter to compile() to control the optimization level, ↵Georg Brandl2010-12-041-10/+22
| | | | | | | | and provide an interface to it in py_compile, compileall and PyZipFile.
* | Remove redundant includes of headers that are already included by Python.h.Georg Brandl2010-11-301-2/+0
| |
* | compiler_error(): use PyUnicode_DecodeFSDefault() to decode the filename,Victor Stinner2010-10-171-2/+11
| | | | | | | | instead of utf-8 in strict mode.
* | Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expectsVictor Stinner2010-10-161-1/+1
| | | | | | | | | | filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode.
* | add column offset to all syntax errorsBenjamin Peterson2010-09-201-2/+8
| |
* | #4617: Previously it was illegal to delete a name from the localAmaury Forgeot d'Arc2010-09-101-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.
* | Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replacedAntoine Pitrou2010-09-041-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.
* | revert unintended changesBenjamin Peterson2010-07-201-3/+1
| |
* | move test_trace.py so as not to conflict with future tests for the trace moduleBenjamin Peterson2010-07-201-1/+3
| |