Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | lib2to3: Add more tests (GH-6101) (#6109) | Miss Islington (bot) | 2018-03-13 | 1 | -0/+108 |
| | | | | | (cherry picked from commit 74f56878cdee18d485e4f8b485d55ce62e38f4c9) Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | bpo-33064: lib2to3: support trailing comma after *args and **kwargs ↵ | Miss Islington (bot) | 2018-03-13 | 2 | -26/+37 |
| | | | | | | | | | | | | (GH-6096) (#6098) 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). (cherry picked from commit b51f5de71163f096d2d5229ede5379cdb284f651) Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | [3.6] compare with difflib not diff(1) (GH-5450) (GH-5453) | Benjamin Peterson | 2018-01-30 | 1 | -13/+9 |
| | | | | Co-authored-by: Benjamin Peterson <benjamin@python.org> | ||||
* | [3.6] closes bpo-30117: fix lib2to3 ParserIdempotency test (GH-1242) (GH-5443) | Benjamin Peterson | 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.. (cherry picked from commit 14e976e00e65bf343ba0fca016c3c9132a843daf) | ||||
* | remove unused import (GH-5040) (#5042) | Miss Islington (bot) | 2017-12-29 | 1 | -1/+0 |
| | | | (cherry picked from commit e325608740bee161ca7fefd09463d63099efa1b8) | ||||
* | make PatternCompiler use the packaged grammar if possible (more bpo-24960) ↵ | Miss Islington (bot) | 2017-12-29 | 1 | -7/+7 |
| | | | | | (GH-5034) (#5036) (cherry picked from commit e5f7dccefaa8d97ab53b3051acbb4a4d49379dc4) | ||||
* | correct wording (GH-4983) (#4984) | Miss Islington (bot) | 2017-12-23 | 1 | -1/+1 |
| | | | (cherry picked from commit d11e8e0d11c759cd0f96aebb59de914e4d62b8cd) | ||||
* | bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files ↵ | Miss Islington (bot) | 2017-12-22 | 4 | -2/+42 |
| | | | | | | | | | (GH-4977) (#4979) 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. (cherry picked from commit 8a5877165e993afb2633cd48da5222326d3f6e0e) | ||||
* | bpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a ↵ | Mariatta | 2017-06-16 | 4 | -26/+109 |
| | | | | | 'trailer', e.g. zip()[x] (GH-24) (GH-2235) (cherry picked from commit 93b4b47e3a720171d67f3b608de406aef462835c) | ||||
* | [3.6] bpo-23894: make lib2to3 recognize f-strings (GH-1733) (#1737) | Łukasz Langa | 2017-05-23 | 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. (cherry picked from commit 1b9530c536664276ce866ae602ce04adce0810e1) | ||||
* | [3.6] Make rb'' strings work in lib2to3 (GH-1724) (#1730) | Łukasz Langa | 2017-05-22 | 2 | -7/+37 |
| | | | | This partially solves bpo-23894. (cherry picked from commit 0c4aca54dcf0c54f299c78aa71fe8f48ff04f9d9) | ||||
* | [3.6] bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119) ↵ | Mariatta | 2017-04-13 | 2 | -8/+30 |
| | | | | | | | | (GH-1122) * 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. (cherry picked from commit a6e395dffadf8c5124903c01ad69fefa36b1a935) | ||||
* | Revert "bpo-29869: Allow underscores in numeric literals in lib2to3. ↵ | Mariatta | 2017-04-13 | 2 | -30/+8 |
| | | | | | | (GH-752)" (GH-1109) This reverts commit 97a40b7a5b2979fb17e1751c139fd4ba1ebd5276. The commit is supposed to go to the master branch first. | ||||
* | bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-752) | Nevada Sanchez | 2017-04-13 | 2 | -8/+30 |
| | |||||
* | 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 |
|\ \ | |/ | |||||
| * | Fix indentation (reindent.py). | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-08 | 1 | -4/+4 |
| | | |||||
* | | lib2to3.pgen3.driver.load_grammar() now creates a stable cache file | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-09-08 | 5 | -16/+112 |
|\ \ | |/ | | | | | | | 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 | 5 | -18/+111 |
| | | | | | | | | | | 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 |
| | | |||||
* | | Issue #27076: Merge spelling from 3.5 | Martin Panter | 2016-05-26 | 3 | -3/+3 |
|\ \ | |/ | |||||
| * | Issue #27076: Doc, comment and tests spelling fixes | Martin Panter | 2016-05-26 | 3 | -3/+3 |
| | | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä. | ||||
* | | 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 |
| | | |||||
* | | Removed unused imports. | Serhiy Storchaka | 2016-04-24 | 11 | -13/+4 |
| | | |||||
* | | 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 |
| | | |||||
* | | Issue #26778: Fixed "a/an/and" typos in code comment, documentation and error | Serhiy Storchaka | 2016-04-17 | 2 | -2/+2 |
|\ \ | |/ | | | | | messages. | ||||
| * | Issue #26778: Fixed "a/an/and" typos in code comment and documentation. | Serhiy Storchaka | 2016-04-17 | 2 | -2/+2 |
| | | |||||
* | | Issue #26581: Use the first coding cookie on a line, not the last one. | Serhiy Storchaka | 2016-03-20 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #26581: Use the first coding cookie on a line, not the last one. | Serhiy Storchaka | 2016-03-20 | 1 | -1/+1 |
| | | |||||
* | | Issue #25523: Merge a-to-an corrections from 3.5. | Serhiy Storchaka | 2015-11-02 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #25523: Merge a-to-an corrections from 3.4. | Serhiy Storchaka | 2015-11-02 | 1 | -1/+1 |
| |\ | |||||
| | * | Issue #25523: Further a-to-an corrections. | Serhiy Storchaka | 2015-11-02 | 1 | -1/+1 |
| | | |