Commit Graph

136 Commits

Author SHA1 Message Date
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
Benjamin Peterson a6f85e2270 Merged revisions 88535 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r88535 | brett.cannon | 2011-02-23 13:46:46 -0600 (Wed, 23 Feb 2011) | 1 line

  Add lib2to3.__main__ for easy testing from the console.
........
2011-02-24 01:41:46 +00:00
Brett Cannon e457f0d220 Revert r88503 as Benjamin's request. 2011-02-23 18:48:52 +00:00
Brett Cannon 4cfa24757b Add lib2to3.__main__ to make it easier for debugging purposes to run 2to3. 2011-02-22 19:12:43 +00:00
Benjamin Peterson 76f05b70d7 Merged revisions 87002 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r87002 | martin.v.loewis | 2010-12-03 17:11:07 -0600 (Fri, 03 Dec 2010) | 21 lines

  Merged revisions 85551,86156-86157,86464 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r85551 | benjamin.peterson | 2010-10-15 23:57:29 +0200 (Fr, 15 Okt 2010) | 1 line

    escape() is now in the html module
  ........
    r86156 | georg.brandl | 2010-11-04 09:34:57 +0100 (Do, 04 Nov 2010) | 1 line

    Consistency fixes in option parser help texts.
  ........
    r86157 | georg.brandl | 2010-11-04 09:35:30 +0100 (Do, 04 Nov 2010) | 1 line

    #10286: fix urllib class names.
  ........
    r86464 | benjamin.peterson | 2010-11-14 16:28:52 +0100 (So, 14 Nov 2010) | 1 line

    match only .py files #10416
  ........
................
2010-12-04 02:24:43 +00:00
Martin v. Löwis e2bb4eb77b Merged revisions 85551,86156-86157,86464 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r85551 | benjamin.peterson | 2010-10-15 23:57:29 +0200 (Fr, 15 Okt 2010) | 1 line

  escape() is now in the html module
........
  r86156 | georg.brandl | 2010-11-04 09:34:57 +0100 (Do, 04 Nov 2010) | 1 line

  Consistency fixes in option parser help texts.
........
  r86157 | georg.brandl | 2010-11-04 09:35:30 +0100 (Do, 04 Nov 2010) | 1 line

  #10286: fix urllib class names.
........
  r86464 | benjamin.peterson | 2010-11-14 16:28:52 +0100 (So, 14 Nov 2010) | 1 line

  match only .py files #10416
........
2010-12-03 23:11:07 +00:00
Benjamin Peterson b1cb105bde revert changes in inappropiate branch 2010-11-20 19:09:08 +00:00
Ezio Melotti b3aedd4862 #9424: Replace deprecated assert* methods in the Python test suite. 2010-11-20 19:04:17 +00:00
Benjamin Peterson 42311734ab revert change in inappropiate branch 2010-10-15 21:56:35 +00:00
Georg Brandl 1f7fffb308 #2830: add html.escape() helper and move cgi.escape() uses in the standard library to it. It defaults to quote=True and also escapes single quotes, which makes casual use safer. The cgi.escape() interface is not touched, but emits a (silent) PendingDeprecationWarning. 2010-10-15 15:57:45 +00:00
Benjamin Peterson b0871cac11 Merged revisions 85510 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r85510 | benjamin.peterson | 2010-10-14 18:00:04 -0500 (Thu, 14 Oct 2010) | 61 lines

  Merged revisions 83852-83853,83857,84042,84216,84274-84276,84375,85388,85478,85506-85508 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r83852 | benjamin.peterson | 2010-08-08 15:45:44 -0500 (Sun, 08 Aug 2010) | 1 line

    wrap with parens
  ........
    r83853 | benjamin.peterson | 2010-08-08 15:46:31 -0500 (Sun, 08 Aug 2010) | 1 line

    use parens
  ........
    r83857 | benjamin.peterson | 2010-08-08 15:59:49 -0500 (Sun, 08 Aug 2010) | 1 line

    things which use touch_import should be pre order
  ........
    r84042 | george.boutsioukis | 2010-08-14 16:10:19 -0500 (Sat, 14 Aug 2010) | 2 lines

    This revision incorporates into the 2to3 tool the new, faster, tree matching algorithm developed during a GSOC project. The algorithm resides in the two added modules, btm_matcher and btm_utils. New code has been added to drive the new matching process in refactor.py and a few minor changes were made in other modules. A BM_compatible flag(False by default) has been added in fixer_base and it is set to True in most of the current fixers.
  ........
    r84216 | benjamin.peterson | 2010-08-19 16:44:05 -0500 (Thu, 19 Aug 2010) | 1 line

    allow star_expr in testlist_gexp
  ........
    r84274 | benjamin.peterson | 2010-08-22 18:40:46 -0500 (Sun, 22 Aug 2010) | 1 line

    wrap long line
  ........
    r84275 | benjamin.peterson | 2010-08-22 18:42:22 -0500 (Sun, 22 Aug 2010) | 1 line

    cleanup
  ........
    r84276 | benjamin.peterson | 2010-08-22 18:51:01 -0500 (Sun, 22 Aug 2010) | 1 line

    when there's a None value and a traceback, don't call type with it #9661
  ........
    r84375 | george.boutsioukis | 2010-08-31 08:38:53 -0500 (Tue, 31 Aug 2010) | 3 lines

    Idiomatic code changes & stylistic issues fixed in the BottomMatcher module. Thanks to Benjamin Peterson for taking the time to review the code.
  ........
    r85388 | benjamin.peterson | 2010-10-12 17:27:44 -0500 (Tue, 12 Oct 2010) | 1 line

    fix urllib fixer with multiple as imports on a line #10069
  ........
    r85478 | benjamin.peterson | 2010-10-14 08:09:56 -0500 (Thu, 14 Oct 2010) | 1 line

    stop abusing docstrings
  ........
    r85506 | benjamin.peterson | 2010-10-14 17:45:19 -0500 (Thu, 14 Oct 2010) | 1 line

    kill sibling import
  ........
    r85507 | benjamin.peterson | 2010-10-14 17:54:15 -0500 (Thu, 14 Oct 2010) | 1 line

    remove trailing whitespace
  ........
    r85508 | benjamin.peterson | 2010-10-14 17:55:28 -0500 (Thu, 14 Oct 2010) | 1 line

    typo
  ........
................
2010-10-14 23:03:32 +00:00
Benjamin Peterson f37eb3a184 Merged revisions 83852-83853,83857,84042,84216,84274-84276,84375,85388,85478,85506-85508 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r83852 | benjamin.peterson | 2010-08-08 15:45:44 -0500 (Sun, 08 Aug 2010) | 1 line

  wrap with parens
........
  r83853 | benjamin.peterson | 2010-08-08 15:46:31 -0500 (Sun, 08 Aug 2010) | 1 line

  use parens
........
  r83857 | benjamin.peterson | 2010-08-08 15:59:49 -0500 (Sun, 08 Aug 2010) | 1 line

  things which use touch_import should be pre order
........
  r84042 | george.boutsioukis | 2010-08-14 16:10:19 -0500 (Sat, 14 Aug 2010) | 2 lines

  This revision incorporates into the 2to3 tool the new, faster, tree matching algorithm developed during a GSOC project. The algorithm resides in the two added modules, btm_matcher and btm_utils. New code has been added to drive the new matching process in refactor.py and a few minor changes were made in other modules. A BM_compatible flag(False by default) has been added in fixer_base and it is set to True in most of the current fixers.
........
  r84216 | benjamin.peterson | 2010-08-19 16:44:05 -0500 (Thu, 19 Aug 2010) | 1 line

  allow star_expr in testlist_gexp
........
  r84274 | benjamin.peterson | 2010-08-22 18:40:46 -0500 (Sun, 22 Aug 2010) | 1 line

  wrap long line
........
  r84275 | benjamin.peterson | 2010-08-22 18:42:22 -0500 (Sun, 22 Aug 2010) | 1 line

  cleanup
........
  r84276 | benjamin.peterson | 2010-08-22 18:51:01 -0500 (Sun, 22 Aug 2010) | 1 line

  when there's a None value and a traceback, don't call type with it #9661
........
  r84375 | george.boutsioukis | 2010-08-31 08:38:53 -0500 (Tue, 31 Aug 2010) | 3 lines

  Idiomatic code changes & stylistic issues fixed in the BottomMatcher module. Thanks to Benjamin Peterson for taking the time to review the code.
........
  r85388 | benjamin.peterson | 2010-10-12 17:27:44 -0500 (Tue, 12 Oct 2010) | 1 line

  fix urllib fixer with multiple as imports on a line #10069
........
  r85478 | benjamin.peterson | 2010-10-14 08:09:56 -0500 (Thu, 14 Oct 2010) | 1 line

  stop abusing docstrings
........
  r85506 | benjamin.peterson | 2010-10-14 17:45:19 -0500 (Thu, 14 Oct 2010) | 1 line

  kill sibling import
........
  r85507 | benjamin.peterson | 2010-10-14 17:54:15 -0500 (Thu, 14 Oct 2010) | 1 line

  remove trailing whitespace
........
  r85508 | benjamin.peterson | 2010-10-14 17:55:28 -0500 (Thu, 14 Oct 2010) | 1 line

  typo
........
2010-10-14 23:00:04 +00:00
Benjamin Peterson 73315e9200 revert change that was in wrong branch 2010-10-14 22:00:20 +00:00
Georg Brandl cbeb9fa617 #9964: fix lib2to3 fixer fix_operator when running under -OO. 2010-10-14 07:29:08 +00:00