Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-35312: Make lib2to3.pgen2.parse.ParseError round-trip pickle-able. ↵ | Anthony Sottile | 2018-11-27 | 2 | -0/+15 |
| | | | | (GH-10710) | ||||
* | bpo-35202: Remove unused imports in Lib directory. (GH-10446) | Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) | 2018-11-10 | 2 | -2/+0 |
| | |||||
* | bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569) | Zackery Spytz | 2018-10-13 | 2 | -9/+10 |
| | |||||
* | closes bpo-34515: Support non-ASCII identifiers in lib2to3. (GH-8950) | Monson Shao | 2018-09-15 | 2 | -6/+15 |
| | |||||
* | Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a ↵ | Serhiy Storchaka | 2018-07-31 | 6 | -36/+10 |
| | | | | | | | | generator expression (GH-3771)" (#8241) This reverts commit af810b35b494ef1d255d4bf340b92a9dad446995. This is not valid syntax (see bpo-32012). | ||||
* | bpo-21446: Update reload fixer to use importlib (GH-8391) | Berker Peksag | 2018-07-23 | 2 | -9/+9 |
| | |||||
* | bpo-34108: Fix double carriage return in 2to3 on Windows (#8271) | Jason R. Coombs | 2018-07-13 | 2 | -1/+2 |
| | | | | | * Add test capturing failure. * Honor newlines as present in the original file. | ||||
* | bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758) | Denis Osipov | 2018-04-18 | 1 | -1/+1 |
| | |||||
* | bpo-11594: Ensure line-endings are respected when using 2to3 (GH-6483) | Aaron Ang | 2018-04-17 | 3 | -18/+34 |
| | |||||
* | [lib2to3] Make grammar pickling faster (#6491) | Łukasz Langa | 2018-04-17 | 1 | -25/+2 |
| | | | | | | | | | * Now uses pickle protocol 4 * Doesn't wrap the grammar's `__dict__` in ordered dictionaries anymore as dictionaries in Python 3.6+ are ordered by default This still produces deterministic pickles (that hash the same with MD5). Tested with different PYTHONHASHSEED values. | ||||
* | Add support for all string literals to lib2to3 (#6457) | Zsolt Dollenstein | 2018-04-16 | 2 | -52/+28 |
| | |||||
* | Revert "bpo-30406: Make async and await proper keywords (#1669)" (GH-6143) | Jelle Zijlstra | 2018-03-18 | 4 | -20/+94 |
| | | | | | 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 | 2 | -26/+37 |
| | | | | | | | 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. | ||||
* | remove unused import (#5040) | Benjamin Peterson | 2017-12-29 | 1 | -1/+0 |
| | |||||
* | make PatternCompiler use the packaged grammar if possible (more bpo-24960) ↵ | Benjamin Peterson | 2017-12-29 | 1 | -7/+7 |
| | | | | (#5034) | ||||
* | correct wording (#4983) | Benjamin Peterson | 2017-12-23 | 1 | -1/+1 |
| | |||||
* | bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (#4977) | Benjamin Peterson | 2017-12-22 | 4 | -2/+42 |
| | | | | | | 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 | 2 | -6/+5 |
| | |||||
* | bpo-30143: 2to3 now generates a code that uses abstract collection classes ↵ | Serhiy Storchaka | 2017-11-16 | 2 | -10/+10 |
| | | | | | | (#1262) from collections.abc rather than collections. | ||||
* | bpo-30406: Make async and await proper keywords (#1669) | Jelle Zijlstra | 2017-10-06 | 4 | -94/+24 |
| | | | 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 | 6 | -10/+36 |
| | | | | expression (#3771) | ||||
* | bpo-29783: Replace codecs.open() with io.open() (#599) | Victor Stinner | 2017-06-16 | 2 | -30/+11 |
| | |||||
* | bpo-23894: make lib2to3 recognize f-strings (#1733) | Łukasz Langa | 2017-05-22 | 2 | -1/+7 |
| | | | | | | | 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 | 2 | -7/+37 |
| | | | This partially solves bpo-23894. | ||||
* | bpo-30144: Import collections ABC from collections.abc rather than ↵ | Serhiy Storchaka | 2017-04-24 | 1 | -2/+2 |
| | | | | collections. (#1263) | ||||
* | bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119) | Nevada Sanchez | 2017-04-13 | 2 | -8/+30 |
| | | | | | * 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 | 4 | -26/+109 |
| | | | | 'trailer', e.g. zip()[x] (#24) | ||||
* | bpo-29762: More use "raise from None". (#569) | Serhiy Storchaka | 2017-04-05 | 3 | -4/+4 |
| | | | This hides unwanted implementation details from tracebacks. | ||||
* | bpo-29957: change LBYL key lookup to dict.setdefault (#938) | Michael Selik | 2017-04-02 | 1 | -5/+0 |
| | | | | | | | | | | | | | * change LBYL key lookup to dict.setdefault The ``results`` was constructed as a defaultdict and we could simply delete the check ``if key not in results``. However, I think it's safer to use dict.setdefault as I'm not sure whether the caller expects a regular dict or defaultdict. * add name to the acknowledgements file * use defaultdict to make the key-lookup cleaner | ||||
* | bpo-29919: Remove unused imports found by pyflakes (#137) | Victor Stinner | 2017-03-27 | 1 | -1/+1 |
| | | | Make also minor PEP8 coding style fixes on modified imports. | ||||
* | bpo-29776: Use decorator syntax for properties. (#585) | Serhiy Storchaka | 2017-03-19 | 1 | -8/+8 |
| | |||||
* | Remove unused imports. | Serhiy Storchaka | 2016-12-16 | 2 | -2/+0 |
| | |||||
* | merge 3.5 | Benjamin Peterson | 2016-12-06 | 1 | -1/+0 |
|\ | |||||
| * | rm unused import | Benjamin Peterson | 2016-12-06 | 1 | -1/+0 |
| | | |||||
* | | Issue #28394: Merge typo fixes from 3.5 into 3.6 | Martin Panter | 2016-10-10 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #28394: Spelling and typo fixes in code comments and changelog | Martin Panter | 2016-10-10 | 1 | -1/+1 |
| | | | | | | | | Includes patch by Ville Skyttä. | ||||
* | | Remove the debug print that i accidentally left in. | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-11 | 1 | -1/+0 |
|\ \ | |/ | |||||
| * | Remove the debug print that i accidentally left in. | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-11 | 1 | -1/+0 |
| | | |||||
* | | Issue #25969: Update the lib2to3 grammar to handle the unpacking | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-10 | 6 | -6/+88 |
|\ \ | |/ | | | | | 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 | 6 | -6/+88 |
| | | | | | | | | generalizations added in 3.5. | ||||
| * | remove fix_callable - callable() was readded many releases ago. | Gregory P. Smith | 2016-09-10 | 2 | -129/+0 |
| | | |||||
* | | Remove 2to3's fix_callable... We reintroduced the callable built-in | Gregory P. Smith | 2016-09-10 | 2 | -129/+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 | 2 | -1/+19 |
| | | |||||
* | | Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. | Yury Selivanov | 2016-09-09 | 2 | -2/+33 |
| | | | | | | | | Patch by Ivan Levkivskyi. | ||||
* | | Remove legacy "from __future__ import with_statement" lines. | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-08 | 4 | -8/+0 |
| | | |||||
* | | Fix indentation (reindent.py). | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-08 | 1 | -4/+4 |
|\ \ | |/ |