summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)Serhiy Storchaka2018-03-181-1/+3
|
* bpo-32964: Reuse a testing implementation of the path protocol in tests. (#5930)Serhiy Storchaka2018-03-021-8/+2
|
* bpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015)Serhiy Storchaka2018-01-111-0/+5
|
* bpo-24340: Fix estimation of the code stack size. (#5076)Serhiy Storchaka2018-01-091-1/+290
|
* bpo-27169: The __debug__ constant is now optimized out at compile time. (#4880)Serhiy Storchaka2017-12-151-0/+1
| | | This fixes also bpo-22091.
* Issue #29337: Fixed possible BytesWarning when compare the code objects.Serhiy Storchaka2017-01-241-0/+3
|\ | | | | | | Warnings could be emitted at compile time.
| * Issue #29337: Fixed possible BytesWarning when compare the code objects.Serhiy Storchaka2017-01-241-0/+3
| |\ | | | | | | | | | Warnings could be emitted at compile time.
| | * Issue #29337: Fixed possible BytesWarning when compare the code objects.Serhiy Storchaka2017-01-241-0/+3
| | | | | | | | | | | | Warnings could be emitted at compile time.
* | | Issue #18896: Python function can now have more than 255 parameters.Serhiy Storchaka2016-12-161-9/+2
|/ / | | | | | | collections.namedtuple() now supports tuples with more than 255 elements.
* | Issue #27182: Add support for path-like objects to PyUnicode_FSDecoder().Brett Cannon2016-09-071-0/+10
| |
* | Issue #26754: Undocumented support of general bytes-like objectsSerhiy Storchaka2016-08-061-2/+5
|/ | | | as path in compile() and similar functions is now deprecated.
* Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded asSerhiy Storchaka2016-06-181-0/+7
| | | | an iterable of integers. Now only strings and byte-like objects are accepted.
* code_richcompare() now uses the constants typesVictor Stinner2016-01-221-0/+82
| | | | | | | | | Issue #25843: When compiling code, don't merge constants if they are equal but have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now correctly compiled to two different functions: f1() returns 1 (int) and f2() returns 1.0 (int), even if 1 and 1.0 are equal. Add a new _PyCode_ConstantKey() private function.
* Issue #25388: Fixed tokenizer crash when processing undecodable source codeSerhiy Storchaka2015-11-141-0/+10
|\ | | | | | | with a null byte.
| * Issue #25388: Fixed tokenizer crash when processing undecodable source codeSerhiy Storchaka2015-11-141-0/+10
| | | | | | | | with a null byte.
* | Issue #24802: Update test case for ValueError in 3.5Martin Panter2015-11-081-3/+2
| |
* | Issue #24802: Merge null termination fixes from 3.4 into 3.5Martin Panter2015-11-071-0/+21
|\ \ | |/
| * Issue #24802: Copy bytes-like objects to null-terminated buffers if necessaryMartin Panter2015-11-071-0/+21
| | | | | | | | | | | | | | | | This avoids possible buffer overreads when int(), float(), compile(), exec() and eval() are passed bytes-like objects. Similar code is removed from the complex() constructor, where it was not reachable. Patch by John Leitch, Serhiy Storchaka and Martin Panter.
* | Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.Yury Selivanov2015-07-031-1/+1
| |
* | in dict displays, evaluate the key before the value (closes #11205)Benjamin Peterson2015-05-281-0/+11
| | | | | | | | Patch partially by Steve Dougherty.
* | Fix remaining tests and remove an unused import.Berker Peksag2015-05-061-1/+2
| |
* | merge 3.4 (#24022)Benjamin Peterson2015-04-211-1/+13
|\ \ | |/
| * do not call into python api if an exception is set (#24022)Benjamin Peterson2015-04-211-1/+13
| |
* | Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-1/+1
|/ | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* Issue #22221: Add tests for compile() with source encoding cookie.Serhiy Storchaka2014-09-051-3/+20
|
* Issue #21523: Fix over-pessimistic computation of the stack effect of some ↵Antoine Pitrou2014-05-231-3/+39
| | | | | | | opcodes in the compiler. This also fixes a quadratic compilation time issue noticeable when compiling code with a large number of "and" and "or" operators.
* Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
| | | | error messages and comments.
* Issue #5765: Apply a hard recursion limit in the compilerNick Coghlan2012-11-041-0/+27
| | | | | | | 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.
* add another test caseBenjamin Peterson2012-01-201-0/+1
|
* check after comments, too (#13832)Benjamin Peterson2012-01-191-0/+2
|
* Issue #12705: Raise SyntaxError when compiling multiple statements as single ↵Meador Inge2012-01-191-0/+28
| | | | interactive statement
* try to use the same str object for all code filenames when compiling or ↵Benjamin Peterson2011-05-271-0/+9
| | | | | | unmarshalling (#12190) This should reduce memory usage.
* #11515: Merge with 3.1.Ezio Melotti2011-03-151-1/+1
|\
| * #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
| |
| * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-5/+5
| | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
* | bring back commented out testBenjamin Peterson2010-03-171-0/+4
| |
* | Merged revisions 79034 via svnmerge fromBenjamin Peterson2010-03-171-3/+3
| | | | | | | | | | | | | | | | | | | | 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 ........
* | Merged revisions 77727 via svnmerge fromEzio Melotti2010-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line use assert[Not]IsInstance where appropriate ........
* | use assert[Not]In where appropriateEzio Melotti2010-01-231-8/+8
| |
* | use assert[Not]In where appropriateBenjamin Peterson2010-01-191-4/+4
| | | | | | | | A patch from Dave Malcolm.
* | Merged revisions 76230 via svnmerge fromBenjamin Peterson2009-11-131-0/+13
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76230 | benjamin.peterson | 2009-11-12 17:39:44 -0600 (Thu, 12 Nov 2009) | 2 lines fix several compile() issues by translating newlines in the tokenizer ........
* | convert old fail* assertions to assert*Benjamin Peterson2009-06-301-5/+5
| |
* | Merged revisions ↵Benjamin Peterson2009-06-281-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73376 | benjamin.peterson | 2009-06-11 17:29:23 -0500 (Thu, 11 Jun 2009) | 1 line remove check for case handled in sub-function ........ r73393 | alexandre.vassalotti | 2009-06-12 13:56:57 -0500 (Fri, 12 Jun 2009) | 2 lines Clear reference to the static PyExc_RecursionErrorInst in _PyExc_Fini. ........ r73398 | alexandre.vassalotti | 2009-06-12 15:57:12 -0500 (Fri, 12 Jun 2009) | 3 lines Add const qualifier to PyErr_SetFromErrnoWithFilename and to PyErr_SetFromErrnoWithUnicodeFilename. ........ r73400 | alexandre.vassalotti | 2009-06-12 16:43:47 -0500 (Fri, 12 Jun 2009) | 2 lines Delete outdated make file for building the parser with MSVC 6. ........ r73404 | benjamin.peterson | 2009-06-12 20:40:00 -0500 (Fri, 12 Jun 2009) | 1 line keep the slice.step field as NULL if no step expression is given ........ r73405 | benjamin.peterson | 2009-06-12 22:46:30 -0500 (Fri, 12 Jun 2009) | 1 line prevent import statements from assigning to None ........ r73409 | benjamin.peterson | 2009-06-13 08:06:21 -0500 (Sat, 13 Jun 2009) | 1 line allow importing from a module named None if it has an 'as' clause ........ r73419 | benjamin.peterson | 2009-06-13 11:19:19 -0500 (Sat, 13 Jun 2009) | 1 line set Print.values to NULL if there are no values ........ r73420 | benjamin.peterson | 2009-06-13 12:08:53 -0500 (Sat, 13 Jun 2009) | 1 line give a better error message when deleting () ........ r73421 | benjamin.peterson | 2009-06-13 15:23:33 -0500 (Sat, 13 Jun 2009) | 1 line when no module is given in a 'from' relative import, make ImportFrom.module NULL ........ r73432 | amaury.forgeotdarc | 2009-06-14 16:20:40 -0500 (Sun, 14 Jun 2009) | 3 lines #6227: Because of a wrong indentation, the test was not testing what it should. Ensure that the snippet in doctest_aliases actually contains aliases. ........ r73457 | benjamin.peterson | 2009-06-16 18:13:09 -0500 (Tue, 16 Jun 2009) | 1 line add underscores ........ r73460 | benjamin.peterson | 2009-06-16 22:23:04 -0500 (Tue, 16 Jun 2009) | 1 line remove unused 'encoding' member from the compiler struct ........ r73485 | benjamin.peterson | 2009-06-19 17:07:47 -0500 (Fri, 19 Jun 2009) | 1 line remove duplicate test ........ r73486 | benjamin.peterson | 2009-06-19 17:09:17 -0500 (Fri, 19 Jun 2009) | 1 line add missing assertion #6313 ........ r73488 | benjamin.peterson | 2009-06-19 17:16:28 -0500 (Fri, 19 Jun 2009) | 1 line show that this one isn't used ........ r73489 | benjamin.peterson | 2009-06-19 17:21:12 -0500 (Fri, 19 Jun 2009) | 1 line use closures ........ r73501 | benjamin.peterson | 2009-06-21 18:01:07 -0500 (Sun, 21 Jun 2009) | 1 line don't need to add the name 'lambda' as assigned ........ r73502 | benjamin.peterson | 2009-06-21 18:03:36 -0500 (Sun, 21 Jun 2009) | 1 line remove tmpname support since it's no longer used ........ r73513 | benjamin.peterson | 2009-06-22 20:18:57 -0500 (Mon, 22 Jun 2009) | 1 line fix grammar ........ r73514 | benjamin.peterson | 2009-06-22 22:01:56 -0500 (Mon, 22 Jun 2009) | 1 line remove some unused symtable constants ........
* now that exec is a function, we can use the shorter assertRaises to testBenjamin Peterson2008-06-301-37/+7
|
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-2/+2
|
* Merged revisions 62039-62042 via svnmerge fromNeal Norwitz2008-03-311-0/+14
| | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r62039 | georg.brandl | 2008-03-29 06:24:23 -0700 (Sat, 29 Mar 2008) | 3 lines Properly check for consistency with the third argument of compile() when compiling an AST node. ........ r62040 | amaury.forgeotdarc | 2008-03-29 06:47:05 -0700 (Sat, 29 Mar 2008) | 5 lines The buildbot "x86 W2k8 trunk" seems to hang in test_socket. http://www.python.org/dev/buildbot/trunk/x86%20W2k8%20trunk/builds/255/step-test/0 Temporarily increase verbosity of this test. ........ r62042 | amaury.forgeotdarc | 2008-03-29 07:53:05 -0700 (Sat, 29 Mar 2008) | 3 lines Still investigating on the hanging test_socket. the test itself doesn't do anything on windows, focus on setUp and tearDown. ........
* Merged revisions 62004 via svnmerge fromMartin v. Löwis2008-03-301-0/+23
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r62004 | georg.brandl | 2008-03-28 13:11:56 +0100 (Fr, 28 Mär 2008) | 4 lines Patch #1810 by Thomas Lee, reviewed by myself: allow compiling Python AST objects into code objects in compile(). ........
* Removed PyInt_GetMax and sys.maxintChristian Heimes2007-12-041-6/+6
| | | | | I replaced sys.maxint with sys.maxsize in Lib/*.py. Does anybody see a problem with the change on Win 64bit platforms? Win 64's long is just 32bit but the sys.maxsize is now 2**63-1 on every 64bit platform. Also added docs for sys.maxsize.
* #1535: rename __builtin__ module to builtins.Georg Brandl2007-12-021-4/+4
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-1/+1
| | | | | | | | | | | | | | No detailed change log; just check out the change log for the py3k-pep3137 branch. The most obvious changes: - str8 renamed to bytes (PyString at the C level); - bytes renamed to buffer (PyBytes at the C level); - PyString and PyUnicode are no longer compatible. I.e. we now have an immutable bytes type and a mutable bytes type. The behavior of PyString was modified quite a bit, to make it more bytes-like. Some changes are still on the to-do list.