summaryrefslogtreecommitdiff
path: root/Lib/lib2to3
Commit message (Collapse)AuthorAgeFilesLines
* closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package ↵Miss Islington (bot)2019-07-241-4/+4
| | | | | | | rather than listdir. (14942) (cherry picked from commit 93e8aa62cfd0a61efed4a61a2ffc2283ae986ef2) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* [2.7] bpo-16965: 2to3 now rewrites execfile() to open with rb. (GH-8569) ↵Zackery Spytz2018-10-162-9/+10
| | | | | (GH-9890) (cherry picked from commit d4d60134b29290049e28df54f23493de4f1824b6)
* [2.7] remove unused import (GH-5040). (#5043)Benjamin Peterson2017-12-281-1/+0
| | | (cherry picked from commit e325608740bee161ca7fefd09463d63099efa1b8)
* make PatternCompiler use the packaged grammar if possible (more bpo-24960) ↵Miss Islington (bot)2017-12-281-7/+7
| | | | | (GH-5034) (#5037) (cherry picked from commit e5f7dccefaa8d97ab53b3051acbb4a4d49379dc4)
* correct wording (GH-4983) (#4985)Miss Islington (bot)2017-12-221-1/+1
| | | (cherry picked from commit d11e8e0d11c759cd0f96aebb59de914e4d62b8cd)
* [2.7] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar ↵Benjamin Peterson2017-12-224-2/+42
| | | | | | | | | files (GH-4977) (#4980) 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)
* Issue #28998: More APIs now support longs as well as ints.Serhiy Storchaka2016-12-271-1/+1
|
* remove unused logger from BaseFixBenjamin Peterson2016-12-051-2/+0
|
* Issue #28394: Typo fixes in code comments and changelogMartin Panter2016-10-101-1/+1
| | | | Includes patch by Ville Skyttä.
* remove fix_callable, callable() was readded long ago in 3.x.Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)2016-09-091-37/+0
|
* Issue #25969: Update the lib2to3 grammar to handle the unpackingGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)2016-09-095-98/+77
| | | | generalizations added in 3.5.
* lib2to3.pgen3.driver.load_grammar() now creates a stable cache fileGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)2016-09-085-20/+114
| | | | | | | between runs given the same Grammar.txt input regardless of the hash randomization setting. Backport of 186bb8dc5540 from 3.5. Done in 2.7 per the lib2to3 exemption.
* Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-021-1/+1
| | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed to fix the grammar.
* Fix buggy RE “\parrot_example.py”, uncovered by Issue #27030Martin Panter2016-06-121-2/+3
|
* Issue #27076: Doc, comment and test function name spelling fixesMartin Panter2016-05-263-3/+3
| | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-172-2/+2
|
* Issue #26581: Use the first coding cookie on a line, not the last one.Serhiy Storchaka2016-03-201-1/+1
|
* Issue #25523: Backported a-to-an corrections.Serhiy Storchaka2015-11-021-1/+1
|
* Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.Robert Collins2015-07-232-1/+5
|
* Issue #22064: Improve the misleading message from 2to3 when skipping ↵Berker Peksag2015-05-131-1/+1
| | | | | | optional fixers. Patch by Vinod Kurup.
* fix instances of consecutive articles (closes #23221)Benjamin Peterson2015-01-131-1/+1
| | | | Patch by Karan Goel.
* #0712: 2to3 has a new "asserts" fixer that replaces deprecated names of ↵R David Murray2014-10-092-0/+84
| | | | | | unittest methods. Patch by Ezio Melotti, docs by Berker Peksag.
* Issue #22221: Backported fixes from Python 3 (issue #18960).Serhiy Storchaka2014-09-051-0/+3
| | | | | | | | | | | | | * Now the source encoding declaration on the second line isn't effective if the first line contains anything except a comment. This affects compile(), eval() and exec() too. * IDLE now ignores the source encoding declaration on the second line if the first line contains anything except a comment. * 2to3 and the findnocoding.py script now ignore the source encoding declaration on the second line if the first line contains anything except a comment.
* teach 2to3 about 'yield from'Benjamin Peterson2014-04-102-1/+9
|
* add matrix multiplication operator support to 2to3Benjamin Peterson2014-04-105-9/+17
|
* Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-162-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.
* #19943: fix typo noticed by Jakub Wilk.Ezio Melotti2013-12-101-1/+1
|
* #19620: Fix typo in docstring (noticed by Christopher Welborn).Ezio Melotti2013-11-251-2/+2
|
* Issue #19592: Use specific asserts in lib2to3 tests.Serhiy Storchaka2013-11-145-17/+17
|
* Issue #18037: Do not escape '\u' and '\U' in raw strings.Serhiy Storchaka2013-10-082-3/+2
|
* Issue #18037: 2to3 now escapes '\u' and '\U' in native strings.Serhiy Storchaka2013-10-032-7/+62
|
* fix duplicate test names (closes #19115)Benjamin Peterson2013-09-281-5/+5
| | | | Patch by Xavier de Gaye.
* Remove the use of non-existing re.ASCII.Serhiy Storchaka2013-09-171-1/+1
| | | | (fixes a regression in 3d46ef0c62c5, issue #18873)
* Issue #18873: IDLE, 2to3, and the findnocoding.py script now detect PythonSerhiy Storchaka2013-09-173-5/+10
| | | | source code encoding only in comment lines.
* #18741: fix more typos. Patch by Févry Thibault.Ezio Melotti2013-08-173-4/+4
|
* Issue #17047: remove doubled words found in 2.7 to 3.4 Lib/*,Terry Jan Reedy2013-03-111-2/+2
| | | | as reported by Serhiy Storchaka and Matthew Barnett.
* enumerate only requires an iterable (closes #16573)Benjamin Peterson2012-11-292-6/+18
| | | | Patch by Jonathan Kotta.
* switch assertion to an explicit ValueErrorBenjamin Peterson2012-09-252-3/+3
|
* Issue #15822: Fix installation of lib2to3 grammar pickles to ensureNed Deily2012-09-081-0/+17
| | | | | they are created in the install locations and with the proper timestamp. (Solution suggested by MvL)
* re.escape os.sep so that \ is interpreted properly in the regex.Gregory P. Smith2012-02-131-2/+4
|
* Issue #13930: fix a / to use os.sep so that the test works on Windows.Gregory P. Smith2012-02-131-2/+4
|
* fix whitespace normalization before pushing.Gregory P. Smith2012-02-121-5/+5
|
* Issue #13930: Adds ability for 2to3 to write its output to a differentGregory P. Smith2012-02-124-12/+241
| | | | | | | | | directory tree instead of overwriting the input files. Adds three command line options: -o/--output-dir, -W/--write-unchanged-files and --add-suffix. Feature backports into stable release branches for 2to3 are allowed by a special exemption: http://mail.python.org/pipermail/python-dev/2011-December/115089.html
* explain why we need this grammar file (closes #13766)Benjamin Peterson2012-01-151-1/+1
|
* Stop trying to write into the stdlib during lib2to3 tests (#12331).Éric Araujo2011-07-311-7/+11
| | | | | This prevents tests from failing when run from a Python installed in a read-only directory.
* revert unintended changesBenjamin Peterson2011-03-262-18/+1
|
* check possible recursive _as_parameter_ to prevent segfault (closes #1838)Benjamin Peterson2011-03-262-1/+18
|
* #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-165-7/+7
|
* transform izip_longest #11424Benjamin Peterson2011-03-073-16/+32
|
* only do this sys.stderr replacing on CPythonBenjamin Peterson2011-03-061-4/+7
|