Serhiy Storchaka
768c16ce02
Issue #18960 : Fix bugs with Python source code encoding in the second line.
...
* The first line of Python script could be executed twice when the source
encoding (not equal to 'utf-8') was specified on the second line.
* Now the source encoding declaration on the second line isn't effective if
the first line contains anything except a comment.
* As a consequence, 'python -x' works now again with files with the source
encoding declarations specified on the second file, and can be used again
to make Python batch files on Windows.
* The tokenize module now ignore the source encoding declaration on the second
line if the first line contains anything except a comment.
* 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.
2014-01-09 18:36:09 +02:00
Ezio Melotti
d082b68786
#19943 : fix typo noticed by Jakub Wilk.
2013-12-10 14:05:46 +02:00
Ezio Melotti
4bcc796acc
#19620 : Fix typo in docstring (noticed by Christopher Welborn).
2013-11-25 05:14:51 +02:00
Serhiy Storchaka
8bdc130121
Issue #19592 : Use specific asserts in lib2to3 tests.
2013-11-14 23:49:58 +02:00
Serhiy Storchaka
5e596769b0
Issue #18037 : Do not escape '\u' and '\U' in raw strings.
2013-10-08 21:07:46 +03:00
Serhiy Storchaka
def0a4c298
Issue #18037 : 2to3 now escapes '\u' and '\U' in native strings.
2013-10-03 12:08:38 +03:00
Benjamin Peterson
3103631f66
fix duplicate test names ( closes #19115 )
...
Patch by Xavier de Gaye.
2013-09-28 15:12:37 -04:00
Serhiy Storchaka
dafea85190
Issue #18873 : The tokenize module, IDLE, 2to3, and the findnocoding.py script
...
now detect Python source code encoding only in comment lines.
2013-09-16 23:51:56 +03:00
Ezio Melotti
b5bc353b88
#18741 : fix more typos. Patch by Févry Thibault.
2013-08-17 16:11:40 +03:00
Terry Jan Reedy
98472b8396
Merge 3.2, issue #17047 : remove doubled words found in 2.7 to
...
3.4 Lib/*, as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:58:27 -04:00
Terry Jan Reedy
c30b7b16ea
Issue #17047 : remove doubled words found in 2.7 to 3.4 Lib/*,
...
as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:57:08 -04:00
Benjamin Peterson
139891ba82
merge 3.2 ( #16573 )
2012-11-29 10:56:11 -05:00
Benjamin Peterson
57af38700a
enumerate only requires an iterable ( closes #16573 )
...
Patch by Jonathan Kotta.
2012-11-29 10:55:22 -05:00
Benjamin Peterson
3331a20464
merge 3.2
2012-09-25 11:53:30 -04:00
Benjamin Peterson
1654d74e9a
switch assertion to an explicit ValueError
2012-09-25 11:48:50 -04:00
Ned Deily
4725b13ab3
Issue #15822 : Fix installation of lib2to3 grammar pickles to ensure
...
they are created in the install locations and with the proper timestamp.
(Solution suggested by MvL)
2012-09-08 19:04:47 -07:00
Ned Deily
47bcfff26b
Issue #15822 : Fix installation of lib2to3 grammar pickles to ensure
...
they are created in the install locations and with the proper timestamp.
(Solution suggested by MvL)
2012-09-08 18:50:56 -07:00
Benjamin Peterson
1a5e5de818
remove get_prefix and set_prefix ( #13248 )
2012-03-14 17:41:15 -05:00
Antoine Pitrou
049242b87c
Issue #13125 : Silence spurious test_lib2to3 output when in non-verbose mode.
...
Patch by Mikhail Novikov.
2012-02-27 19:56:37 +01:00
Antoine Pitrou
d311374089
Issue #13125 : Silence spurious test_lib2to3 output when in non-verbose mode.
...
Patch by Mikhail Novikov.
2012-02-27 19:55:36 +01:00
Georg Brandl
f47b20f0b0
Fix use of deprecated assertRegexpMatches method.
2012-02-20 22:08:27 +01:00
Gregory P. Smith
53ec8ae6a5
re.escape os.sep so that \ is interpreted properly in the regex.
2012-02-13 16:43:55 -08:00
Gregory P. Smith
a127ecb7a2
import re for the previous commit.
2012-02-13 16:41:20 -08:00
Gregory P. Smith
9903c705b8
re.escape os.sep so that \ is interpreted properly in the regex.
2012-02-13 16:38:37 -08:00
Gregory P. Smith
aed5553932
Issue #13930 : fix a / to use os.sep so that the test works on Windows.
2012-02-13 16:26:50 -08:00
Gregory P. Smith
93b98ca445
Issue #13930 : fix a / to use os.sep so that the test works on Windows.
2012-02-13 16:24:46 -08:00
Victor Stinner
3634bfbee6
lib2to3 tests: Don't use deprecated API, switch to assertRegex()
2012-02-13 23:31:26 +01:00
Gregory P. Smith
3dc74c0a9d
fix whitespace normalization before pushing.
2012-02-12 15:59:00 -08:00
Gregory P. Smith
efc66f9e36
fix whitespace normalization before pushing.
2012-02-12 15:58:36 -08:00
Gregory P. Smith
db66310e8f
Issue #13930 : Adds ability for 2to3 to write its output to a different
...
directory tree instead of overwriting the input files. Adds three command
line options: -o/--output-dir, -W/--write-unchanged-files and --add-suffix.
2012-02-12 15:56:49 -08:00
Gregory P. Smith
58f23ffb21
Issue #13930 : Adds ability for 2to3 to write its output to a different
...
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
2012-02-12 15:50:21 -08:00
Benjamin Peterson
0c6bab1c24
merge 3.2 ( #13766 )
2012-01-15 21:28:13 -05:00
Benjamin Peterson
a846d0ac5e
explain why we need this grammar file ( closes #13766 )
2012-01-15 21:28:00 -05:00
Barry Warsaw
146177503c
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
...
(see issue 13125).
2011-10-07 15:26:54 -04:00
Barry Warsaw
cb9c5ba736
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
...
(see issue 13125).
2011-10-07 15:14:53 -04:00
Barry Warsaw
78f89d8c38
- Issue #11250 : Back port fix from 3.3 branch, so that 2to3 can handle files
...
with line feeds. This was ported from the sandbox to the 3.3 branch, but
didn't make it into 3.2.
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
(see issue 13125).
2011-10-07 14:44:49 -04:00
Ezio Melotti
d8b509b192
#13012 : use splitlines(keepends=True/False) instead of splitlines(0/1).
2011-09-28 17:37:55 +03:00
Éric Araujo
ad548b8534
Merge fixes for #9860 , #11104/#8688 and #12331 from 3.2
2011-07-31 18:33:00 +02:00
Éric Araujo
548c054fb7
Stop trying to write into the stdlib during lib2to3 tests ( #12331 ).
...
This prevents tests from failing when run from a Python installed in a
read-only directory.
2011-07-31 17:58:46 +02:00
Vinay Sajip
bf9c021ddd
Closes #12536 : Unused logger removed from lib2to3.
2011-07-13 23:15:07 +01:00
Ezio Melotti
3b3499ba69
#11565 : Merge with 3.1.
2011-03-16 11:35:38 +02:00
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 11:05:33 +02:00
Benjamin Peterson
3b59f332b6
merge 3.1
2011-03-07 22:51:59 -06:00
Benjamin Peterson
49d7149e6d
transform izip_longest #11424
2011-03-07 22:50:37 -06:00
Ezio Melotti
b88ed1549e
#11565 : Merge with 3.2.
2011-03-16 11:38:59 +02:00
Benjamin Peterson
a393bb7718
merge 3.2
2011-03-07 22:52:31 -06:00
Benjamin Peterson
2ae5cffb3a
merge 3.1
2011-03-06 18:04:10 -06:00
Benjamin Peterson
c9c8d0edd6
merge 3.1
2011-03-06 17:15:06 -06:00
Benjamin Peterson
d86e4c8673
only do this sys.stderr replacing on CPython
2011-03-06 17:14:30 -06:00
Benjamin Peterson
2e7965e8b0
Merged revisions 88661 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r88661 | benjamin.peterson | 2011-02-26 16:06:24 -0600 (Sat, 26 Feb 2011) | 6 lines
fix refactoring on formfeed characters #11250
This is because text.splitlines() is not the same as
list(StringIO.StringIO(text)).
........
2011-02-26 22:12:10 +00:00