Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Revert "bpo-30406: Make async and await proper keywords (#1669)" (GH-6143) | Jelle Zijlstra | 2018-03-18 | 1 | -11/+11 |
| | | | | | This reverts commit ac317700ce7439e38a8b420218d9a5035bba92ed. (Reverts only the lib2to3 part.) | ||||
* | lib2to3: Add more tests (#6101) | Łukasz Langa | 2018-03-13 | 1 | -0/+108 |
| | |||||
* | bpo-33064: lib2to3: support trailing comma after *args and **kwargs (#6096) | Łukasz Langa | 2018-03-13 | 1 | -3/+33 |
| | | | | | | | New tests also added. I also made the comments in line with the builtin Grammar/Grammar. PEP 306 was withdrawn, Kees Blom's railroad program has been lost to the sands of time for at least 16 years now (I found a python-dev post from people looking for it). | ||||
* | compare with difflib not diff(1) (GH-5450) | Benjamin Peterson | 2018-01-30 | 1 | -13/+9 |
| | |||||
* | closes bpo-30117: fix lib2to3 ParserIdempotency test (GH-1242) | Eric Appelt | 2018-01-30 | 2 | -10/+15 |
| | | | | | | | | | | | Fix two (in my opinion) spurious failure conditions in the lib2to3.tests.test_parser.TestParserIdempotency test_parser test. Use the same encoding found in the initial file to write a temp file for a diff. This retains the BOM if the encoding was initially utf-8-sig. If the file cannot be parsed using the normal grammar, try again with no print statement which should succeed for valid files using future print_function For case (1), the driver was correctly handling a BOM in a utf-8 file, but then the test was not writing a comparison file using 'utf-8-sig' to diff against, so the BOM got removed. I don't think that is the fault of the parser, and lib2to3 will retain the BOM. For case (2), lib2to3 pre-detects the use of from __future__ import print_function or allows the user to force this interpretation with a -p flag, and then selects a different grammar with the print statement removed. That makes the test cases unfair to this test as the driver itself doesn't know which grammar to use. As a minimal fix, the test will try using a grammar with the print statement, and if that fails fall back on a grammar without it. A more thorough handling of the idempotency test would to be to parse all files using both grammars and ignore if one of the two failed but otherwise check both. I didn't think this was necessary but can change. | ||||
* | bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (#4977) | Benjamin Peterson | 2017-12-22 | 1 | -0/+15 |
| | | | | | | This is more complicated than it should be because we need to preserve the useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar has. We only look for the pickled grammar file with pkgutil.get_data and only if the source file does not exist. | ||||
* | bpo-32046: Update 2to3 when converts operator.isCallable(obj). (#4417) | Dong-hee Na | 2017-11-28 | 1 | -2/+2 |
| | |||||
* | bpo-30143: 2to3 now generates a code that uses abstract collection classes ↵ | Serhiy Storchaka | 2017-11-16 | 1 | -4/+4 |
| | | | | | | (#1262) from collections.abc rather than collections. | ||||
* | bpo-30406: Make async and await proper keywords (#1669) | Jelle Zijlstra | 2017-10-06 | 1 | -11/+15 |
| | | | Per PEP 492, 'async' and 'await' should become proper keywords in 3.7. | ||||
* | closes bpo-27494: Fix 2to3 handling of trailing comma after a generator ↵ | Jakub Stasiak | 2017-10-05 | 1 | -0/+7 |
| | | | | expression (#3771) | ||||
* | bpo-23894: make lib2to3 recognize f-strings (#1733) | Łukasz Langa | 2017-05-22 | 1 | -0/+1 |
| | | | | | | | Note: this doesn't unpack f-strings into the underlying JoinedStr AST. Ideally we'd fully implement JoinedStr here but given its additional complexity, I think this is worth bandaiding as is. This unblocks tools like https://github.com/google/yapf to format 3.6 syntax using f-strings. | ||||
* | Make rb'' strings work in lib2to3 (#1724) | Łukasz Langa | 2017-05-22 | 1 | -0/+21 |
| | | | This partially solves bpo-23894. | ||||
* | bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119) | Nevada Sanchez | 2017-04-13 | 1 | -0/+22 |
| | | | | | * Allow underscores in numeric literals in lib2to3. * Stricter literal parsing for Python 3.6 in lib2to3.pgen2.tokenize. * Add test case for underscores in literals in Python 3. | ||||
* | bpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a ↵ | Stuart Berg | 2017-04-06 | 1 | -9/+47 |
| | | | | 'trailer', e.g. zip()[x] (#24) | ||||
* | Remove unused imports. | Serhiy Storchaka | 2016-12-16 | 1 | -1/+0 |
| | |||||
* | Issue #25969: Update the lib2to3 grammar to handle the unpacking | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-10 | 2 | -0/+39 |
|\ | | | | | | | generalizations added in 3.5. | ||||
| * | Issue #25969: Update the lib2to3 grammar to handle the unpacking | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-10 | 2 | -0/+39 |
| | | | | | | | | generalizations added in 3.5. | ||||
| * | remove fix_callable - callable() was readded many releases ago. | Gregory P. Smith | 2016-09-10 | 1 | -92/+0 |
| | | |||||
* | | Remove 2to3's fix_callable... We reintroduced the callable built-in | Gregory P. Smith | 2016-09-10 | 1 | -92/+0 |
| | | | | | | | | pretty early on in the 3.x series (3.1 or 3.2?). | ||||
* | | issue27985 - fix the incorrect duplicate class name in the lib2to3 | Gregory P. Smith | 2016-09-09 | 1 | -1/+1 |
| | | | | | | | | test. call it TestVarAnnotations instead. | ||||
* | | Issue #28008: Implement PEP 530 -- asynchronous comprehensions. | Yury Selivanov | 2016-09-09 | 1 | -0/+18 |
| | | |||||
* | | Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. | Yury Selivanov | 2016-09-09 | 1 | -0/+30 |
| | | | | | | | | Patch by Ivan Levkivskyi. | ||||
* | | Remove legacy "from __future__ import with_statement" lines. | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-08 | 3 | -6/+0 |
| | | |||||
* | | lib2to3.pgen3.driver.load_grammar() now creates a stable cache file | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-08 | 2 | -4/+73 |
|\ \ | |/ | | | | | | | between runs given the same Grammar.txt input regardless of the hash randomization setting. | ||||
| * | lib2to3.pgen3.driver.load_grammar() now creates a stable cache file | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-08 | 2 | -6/+72 |
| | | | | | | | | | | between runs given the same Grammar.txt input regardless of the hash randomization setting. | ||||
* | | Issue #27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes. | Serhiy Storchaka | 2016-06-12 | 1 | -1/+1 |
| | | | | | | | | Patch by Demur Rumed. | ||||
* | | Issue #27030: Merge RE fix from 3.5 | Martin Panter | 2016-06-12 | 1 | -2/+3 |
|\ \ | |/ | |||||
| * | Fix buggy RE “\parrot_example.py”, uncovered by Issue #27030 | Martin Panter | 2016-06-12 | 1 | -2/+3 |
| | | |||||
* | | Merge with 3.5 | Terry Jan Reedy | 2016-05-06 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue 26911: fix import (other problems remain). | Terry Jan Reedy | 2016-05-06 | 1 | -2/+2 |
| | | |||||
* | | Remove more unused imports in tests. | Serhiy Storchaka | 2016-04-24 | 1 | -2/+0 |
| | | |||||
* | | Issue #23277: Remove unused imports in tests. | Serhiy Storchaka | 2016-04-24 | 5 | -10/+2 |
| | | |||||
* | | Issue #23277: Remove more unused sys and os imports. | Serhiy Storchaka | 2016-04-24 | 3 | -5/+0 |
| | | |||||
* | | Merge 3.5 (Issue #24619) | Yury Selivanov | 2015-07-23 | 1 | -0/+22 |
|\ \ | |/ | |||||
| * | Issue #24619: Simplify async/await tokenization. | Yury Selivanov | 2015-07-23 | 1 | -0/+22 |
| | | | | | | | | | | | | | | | | | | | | This commit simplifies async/await tokenization in tokenizer.c, tokenize.py & lib2to3/tokenize.py. Previous solution was to keep a stack of async-def & def blocks, whereas the new approach is just to remember position of the outermost async-def block. This change won't bring any parsing performance improvements, but it makes the code much easier to read and validate. | ||||
* | | Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond. | Robert Collins | 2015-07-22 | 1 | -0/+4 |
|/ | |||||
* | PEP 0492 -- Coroutines with async and await syntax. Issue #24017. | Yury Selivanov | 2015-05-12 | 1 | -1/+31 |
| | |||||
* | Issue #22173: Update lib2to3 tests to use unittest test discovery. | Zachary Ware | 2014-10-29 | 4 | -18/+14 |
| | |||||
* | Issue #22186: Fix typos in Lib/. | Berker Peksag | 2014-10-19 | 1 | -1/+1 |
| | | | | Patch by Févry Thibault. | ||||
* | teach 2to3 about 'yield from' | Benjamin Peterson | 2014-04-10 | 1 | -0/+7 |
| | |||||
* | add matrix multiplication operator support to 2to3 | Benjamin Peterson | 2014-04-10 | 1 | -0/+6 |
| | |||||
* | Issue #19936: Added executable bits or shebang lines to Python scripts which | Serhiy Storchaka | 2014-01-16 | 2 | -0/+0 |
|\ | | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang lines in the unittestgui and checkpip scripts. | ||||
| * | Issue #19936: Added executable bits or shebang lines to Python scripts which | Serhiy Storchaka | 2014-01-16 | 2 | -0/+0 |
| | | | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang line to use python3 executable in the unittestgui script. | ||||
* | | #10712: 2to3 has a new "asserts" fixer that replaces deprecated names of ↵ | Ezio Melotti | 2013-11-23 | 1 | -0/+50 |
| | | | | | | | | unittest methods. | ||||
* | | Issue #19592: Use specific asserts in lib2to3 tests. | Serhiy Storchaka | 2013-11-14 | 5 | -17/+17 |
|\ \ | |/ | |||||
| * | Issue #19592: Use specific asserts in lib2to3 tests. | Serhiy Storchaka | 2013-11-14 | 5 | -17/+17 |
| | | |||||
* | | Issue #18037: Do not escape '\u' and '\U' in raw strings. | Serhiy Storchaka | 2013-10-08 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #18037: Do not escape '\u' and '\U' in raw strings. | Serhiy Storchaka | 2013-10-08 | 1 | -1/+1 |
| | | |||||
* | | Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. | Serhiy Storchaka | 2013-10-03 | 1 | -0/+37 |
|\ \ | |/ | |||||
| * | Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. | Serhiy Storchaka | 2013-10-03 | 1 | -0/+37 |
| | |