Commit Graph

37720 Commits

Author SHA1 Message Date
Mark Dickinson 81c93fb45c Blocked revisions 67822 via svnmerge
........
  r67822 | mark.dickinson | 2008-12-17 16:14:37 +0000 (Wed, 17 Dec 2008) | 4 lines

  Issue #3439: add bit_length method to int and long.
  Thanks Fredrik Johansson and Victor Stinner for code,
  Raymond Hettinger for review.
........
2008-12-17 16:16:41 +00:00
Antoine Pitrou 66cb9d576c Try to fix #4674: test_normalization failure on some buildbots. 2008-12-16 14:25:45 +00:00
Benjamin Peterson 0b24b3d951 Merged revisions 67806 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

................
  r67806 | benjamin.peterson | 2008-12-15 21:35:28 -0600 (Mon, 15 Dec 2008) | 111 lines

  Merged revisions 67427,67431,67433,67435,67630,67652,67656-67657,67674-67675,67678-67679,67705-67706,67716,67723,67765-67771,67774,67776,67778 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r67427 | benjamin.peterson | 2008-11-28 16:07:41 -0600 (Fri, 28 Nov 2008) | 1 line

    fix spelling in comment
  ........
    r67431 | benjamin.peterson | 2008-11-28 17:14:08 -0600 (Fri, 28 Nov 2008) | 1 line

    add a scripts directory; move things to it
  ........
    r67433 | benjamin.peterson | 2008-11-28 17:18:48 -0600 (Fri, 28 Nov 2008) | 1 line

    run svneol.py
  ........
    r67435 | benjamin.peterson | 2008-11-28 17:25:03 -0600 (Fri, 28 Nov 2008) | 1 line

    rename pre/post_order_mapping to pre/post_order_heads
  ........
    r67630 | alexandre.vassalotti | 2008-12-06 21:51:56 -0600 (Sat, 06 Dec 2008) | 2 lines

    Fix typo in the urllib2.HTTPDigestAuthHandler fixer.
  ........
    r67652 | armin.ronacher | 2008-12-07 15:39:43 -0600 (Sun, 07 Dec 2008) | 5 lines

    Added a fixer that cleans up a tuple argument to isinstance after the tokens
    in it were fixed.  This is mainly used to remove double occurrences of
    tokens as a leftover of the long -> int / unicode -> str conversion.
  ........
    r67656 | armin.ronacher | 2008-12-07 16:54:16 -0600 (Sun, 07 Dec 2008) | 3 lines

    Added missing copyright fo 2to3 fix_isinstance.
  ........
    r67657 | armin.ronacher | 2008-12-07 18:29:35 -0600 (Sun, 07 Dec 2008) | 3 lines

    2to3: intern and reduce fixes now add the imports if missing.  Because that is a common task the fixer_util module now has a function "touch_import" that adds imports if missing.
  ........
    r67674 | benjamin.peterson | 2008-12-08 19:58:11 -0600 (Mon, 08 Dec 2008) | 1 line

    copy permission bits when making backup files #4602
  ........
    r67675 | benjamin.peterson | 2008-12-08 19:59:11 -0600 (Mon, 08 Dec 2008) | 1 line

    add forgotten import
  ........
    r67678 | benjamin.peterson | 2008-12-08 20:08:30 -0600 (Mon, 08 Dec 2008) | 1 line

    fix #4602 for real
  ........
    r67679 | armin.ronacher | 2008-12-09 00:54:03 -0600 (Tue, 09 Dec 2008) | 3 lines

    Removed redudant code from the 2to3 long fixer.  This fixes #4590.
  ........
    r67705 | benjamin.peterson | 2008-12-11 13:04:08 -0600 (Thu, 11 Dec 2008) | 1 line

    put trailers after a range call after the list()
  ........
    r67706 | benjamin.peterson | 2008-12-11 13:17:57 -0600 (Thu, 11 Dec 2008) | 1 line

    add html related modules to the fix_imports mapping
  ........
    r67716 | benjamin.peterson | 2008-12-11 22:16:47 -0600 (Thu, 11 Dec 2008) | 1 line

    consolidate tests
  ........
    r67723 | benjamin.peterson | 2008-12-12 19:49:31 -0600 (Fri, 12 Dec 2008) | 1 line

    fix name
  ........
    r67765 | benjamin.peterson | 2008-12-14 14:05:05 -0600 (Sun, 14 Dec 2008) | 1 line

    run fix_isinstance after fix_long and fix_unicode
  ........
    r67766 | benjamin.peterson | 2008-12-14 14:13:05 -0600 (Sun, 14 Dec 2008) | 1 line

    use run_order instead of order
  ........
    r67767 | benjamin.peterson | 2008-12-14 14:28:12 -0600 (Sun, 14 Dec 2008) | 1 line

    don't retain parenthesis if there is only one item left
  ........
    r67768 | benjamin.peterson | 2008-12-14 14:32:30 -0600 (Sun, 14 Dec 2008) | 1 line

    use insert_child()
  ........
    r67769 | benjamin.peterson | 2008-12-14 14:59:10 -0600 (Sun, 14 Dec 2008) | 1 line

    parenthesize doesn't belong in pygram or FixerBase
  ........
    r67770 | alexandre.vassalotti | 2008-12-14 15:15:36 -0600 (Sun, 14 Dec 2008) | 2 lines

    Fix typo: html.paser -> html.parser.
  ........
    r67771 | benjamin.peterson | 2008-12-14 15:22:09 -0600 (Sun, 14 Dec 2008) | 1 line

    altering .children needs to call changed()
  ........
    r67774 | benjamin.peterson | 2008-12-14 15:55:38 -0600 (Sun, 14 Dec 2008) | 1 line

    employ an evil hack to fix multiple names in the same import statement
  ........
    r67776 | benjamin.peterson | 2008-12-14 16:22:38 -0600 (Sun, 14 Dec 2008) | 1 line

    make a common mixin class for Test_imports and friends
  ........
    r67778 | alexandre.vassalotti | 2008-12-14 17:48:20 -0600 (Sun, 14 Dec 2008) | 2 lines

    Make fix_imports refactor multiple imports as.
  ........
................
2008-12-16 03:57:54 +00:00
Antoine Pitrou 56b3a40e05 Issue #4663: increase the chunk size to improve TextIOWrapper performance on small reads.
Text I/O is still 10x to 100x slower than 2.x!
2008-12-15 23:01:43 +00:00
Amaury Forgeot d'Arc 2674aacb16 Blocked revisions 67797 via svnmerge
........
  r67797 | amaury.forgeotdarc | 2008-12-15 22:47:57 +0100 (Mon, 15 Dec 2008) | 4 lines

  #3954: Fix error handling code in _hotshot.logreader

  Will port to 2.6. hotshot was deleted from python 3.
........
2008-12-15 22:10:56 +00:00
Antoine Pitrou 8fd33d3592 Merged revisions 67777,67779 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67777 | antoine.pitrou | 2008-12-14 23:33:55 +0100 (dim., 14 déc. 2008) | 3 lines

  try to fix failure in test_bad_address on some buildbots
........
  r67779 | antoine.pitrou | 2008-12-15 01:39:51 +0100 (lun., 15 déc. 2008) | 1 line

  modify other occurrence of test_bad_address
........
2008-12-15 13:08:55 +00:00
Nick Coghlan 386220068c Merged revisions 67790 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67790 | nick.coghlan | 2008-12-15 21:41:05 +1000 (Mon, 15 Dec 2008) | 1 line

  Issue #4197: Fix the remaining part of the doctest-in-zipfile problem by giving linecache access to the module globals when available
........
2008-12-15 12:01:34 +00:00
Georg Brandl 8f9cd6a935 Use :samp: role. 2008-12-15 09:16:15 +00:00
Georg Brandl 861ac1fbaf #4603: Note that inconsistent tab/space use is now illegal. 2008-12-15 08:43:10 +00:00
Georg Brandl a3deea1312 #4668: wrap iterator returns in list() in functional howto. 2008-12-15 08:29:32 +00:00
Georg Brandl abffe71dc1 #4667: fix some 2.x leftovers in the tutorial. 2008-12-15 08:28:37 +00:00
Jeremy Hylton 8206695c4b Reflow long line. 2008-12-15 03:08:30 +00:00
Jeremy Hylton 236156f500 Use True/False for ints instead of 1/0. That's so Python 2.0. 2008-12-15 03:00:50 +00:00
Antoine Pitrou 84f71d0fed Blocked revisions 67762 via svnmerge
........
  r67762 | antoine.pitrou | 2008-12-14 18:40:51 +0100 (dim., 14 déc. 2008) | 3 lines

  Backport r67759 (fix io.IncrementalNewlineDecoder for UTF-16 et al.).
........
2008-12-14 17:44:09 +00:00
Antoine Pitrou 180a336f1a Issue #4574: reading an UTF16-encoded text file crashes if \r on 64-char boundary. 2008-12-14 16:36:46 +00:00
Benjamin Peterson ff94552763 tip-toe around dictionary keys view in the tutorial 2008-12-14 15:09:34 +00:00
Nick Coghlan f088e5e6cc Merged revisions 67750-67751 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67750 | nick.coghlan | 2008-12-14 20:54:50 +1000 (Sun, 14 Dec 2008) | 1 line

  Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
........
  r67751 | nick.coghlan | 2008-12-14 21:09:40 +1000 (Sun, 14 Dec 2008) | 1 line

  Add file that was missed from r67750
........
2008-12-14 11:50:48 +00:00
Benjamin Peterson 80a0c7f623 Blocked revisions 67748 via svnmerge
........
  r67748 | benjamin.peterson | 2008-12-13 19:46:11 -0600 (Sat, 13 Dec 2008) | 1 line

  remove has_key usage
........
2008-12-14 01:53:41 +00:00
Antoine Pitrou 7c59bc6f2f Issue #4163: textwrap module: allow word splitting on a hyphen preceded by a non-ASCII letter. 2008-12-13 23:20:54 +00:00
Benjamin Peterson d9c03e0da3 string.maketrans -> str.maketrans 2008-12-13 03:03:41 +00:00
Lars Gustäbel 43fcf3a493 Merged revisions 67717 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67717 | lars.gustaebel | 2008-12-12 14:58:03 +0100 (Fri, 12 Dec 2008) | 2 lines

  Issue #4616: TarFile.utime(): Restore directory times on Windows.
........
2008-12-12 14:58:38 +00:00
Benjamin Peterson a5bbf20017 revert r67713. it causes build problems 2008-12-12 02:02:24 +00:00
Benjamin Peterson d947267283 reuse tokenize.detect_encoding for linecache #4016 2008-12-12 01:33:38 +00:00
Benjamin Peterson 433f32c3be raise a SyntaxError in detect_encoding() when a codec lookup fails like the builtin parser #4021 2008-12-12 01:25:05 +00:00
Mark Dickinson e675f08e03 Merged revisions 67707 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67707 | mark.dickinson | 2008-12-11 19:28:08 +0000 (Thu, 11 Dec 2008) | 5 lines

  Issues #3167, #3682: tests for math.log and math.log10 were failing on
  Solaris and OpenBSD.  Fix this by handling special values and domain
  errors directly in mathmodule.c, passing only positive nonspecial floats
  to the system log/log10.
........
2008-12-11 21:56:00 +00:00
Mark Dickinson da2706b28f Issue #2173: fix build failure on OS X. device_encoding was returning an
empty string, causing an (invisible) LookupError on any attempt to write
to sys.stdout.
2008-12-11 18:03:03 +00:00
Mark Dickinson b99d1cde07 Blocked revisions 67694 via svnmerge
........
  r67694 | facundo.batista | 2008-12-11 04:19:46 +0000 (Thu, 11 Dec 2008) | 6 lines


  Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
  give correct results in the case where one argument is a quiet NaN
  and the other is a finite number that requires rounding.
  Thanks Mark Dickinson.
........
2008-12-11 09:22:25 +00:00
Jeffrey Yasskin b9083f3e30 Merged revisions 67666,67685 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67666 | jeffrey.yasskin | 2008-12-08 10:55:24 -0800 (Mon, 08 Dec 2008) | 3 lines

  Issue 4597: Fix several cases in EvalFrameEx where an exception could be
  "raised" without setting x, err, or why to let the eval loop know.
........
  r67685 | jeffrey.yasskin | 2008-12-09 23:35:02 -0800 (Tue, 09 Dec 2008) | 2 lines

  Update Misc/NEWS for r67666.
........
2008-12-11 06:18:33 +00:00
Facundo Batista 708d58179d Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
give correct results in the case where one argument is a quiet NaN
and the other is a finite number that requires rounding.
Thanks Mark Dickinson.
2008-12-11 04:20:07 +00:00
Amaury Forgeot d'Arc 10b24e87e5 Merged revisions 67688 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67688 | amaury.forgeotdarc | 2008-12-11 00:22:49 +0100 (jeu., 11 déc. 2008) | 6 lines

  #4559: When a context manager's __exit__() method returns an object whose
  conversion to bool raises an exception, 'with' loses that exception.

  Reviewed by Jeffrey Yasskin.
  Already ported to 2.5, will port to 2.6 and 3.0
........
2008-12-10 23:49:33 +00:00
Fred Drake ee763951dc simplify imports 2008-12-10 06:02:39 +00:00
Georg Brandl acc68cc2b3 #4592: fix embedding example with new C API changes. 2008-12-09 23:48:44 +00:00
Martin v. Löwis a872787f5f Add UUIDs for 3.0.1 and 3.0.2. 2008-12-08 11:23:22 +00:00
Martin v. Löwis a116cf0c6f Merged revisions 67658-67659 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67658 | martin.v.loewis | 2008-12-08 12:14:57 +0100 (Mo, 08 Dez 2008) | 1 line

  Add UUIDs for 2.6.1 and 2.6.2.
........
  r67659 | martin.v.loewis | 2008-12-08 12:15:35 +0100 (Mo, 08 Dez 2008) | 1 line

  Consider micro version for name of CHM file.
........
2008-12-08 11:19:42 +00:00
Georg Brandl 05b482caf8 #4586: fix usage of Py_InitModule. 2008-12-07 22:45:56 +00:00
Neal Norwitz d153afea66 Remove unnecessary import 2008-12-07 22:42:03 +00:00
Antoine Pitrou bc420400eb Issue #4569: Interpreter crash when mutating a memoryview with an item size larger than 1.
(together with a bit of reindenting)
2008-12-07 20:14:49 +00:00
Georg Brandl f9734076cf Merged revisions 67511,67536-67537,67543 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67511 | vinay.sajip | 2008-12-04 00:22:58 +0100 (Thu, 04 Dec 2008) | 1 line

  Issue #4384: Added logging integration with warnings module using captureWarnings(). This change includes a NullHandler which does nothing; it will be of use to library developers who want to avoid the "No handlers could be found for logger XXX" message which can appear if the library user doesn't configure logging.
........
  r67536 | gregory.p.smith | 2008-12-04 21:21:09 +0100 (Thu, 04 Dec 2008) | 3 lines

  Adds a subprocess.check_call_output() function to return the output from a
  process on success or raise an exception on error.
........
  r67537 | vinay.sajip | 2008-12-04 21:32:18 +0100 (Thu, 04 Dec 2008) | 1 line

  Took Nick Coghlan's advice about importing warnings globally in logging, to avoid the possibility of race conditions: "This could deadlock if a thread spawned as a side effect of importing a module happens to trigger a warning. warnings is pulled into sys.modules as part of the interpreter startup - having a global 'import warnings' shouldn't have any real effect on logging's import time."
........
  r67543 | gregory.p.smith | 2008-12-05 03:27:01 +0100 (Fri, 05 Dec 2008) | 2 lines

  rename the new check_call_output to check_output.  its less ugly.
........
2008-12-07 15:30:06 +00:00
Georg Brandl 2080ea5f4b Forward-port r67624 and r67627. 2008-12-07 15:17:53 +00:00
Georg Brandl c7d2b21cec Blocked revisions 67614 via svnmerge
........
  r67614 | skip.montanaro | 2008-12-06 18:43:30 +0100 (Sat, 06 Dec 2008) | 2 lines

  issue 4483 - dbm build failures on systems with gdbm_compat lib.
........
2008-12-07 15:15:46 +00:00
Georg Brandl eee3116690 Merged revisions 67463,67572,67576,67628 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67463 | skip.montanaro | 2008-12-01 02:55:22 +0100 (Mon, 01 Dec 2008) | 1 line

  typo in comment
........
  r67572 | georg.brandl | 2008-12-05 10:23:14 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4458: recognize "-" as an argument, not a malformed option in gnu_getopt().
........
  r67576 | georg.brandl | 2008-12-05 13:09:41 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4529: fix parser's validation for try-except-finally statements.
........
  r67628 | skip.montanaro | 2008-12-07 03:16:00 +0100 (Sun, 07 Dec 2008) | 1 line

  muffed the default case
........
2008-12-07 15:15:22 +00:00
Benjamin Peterson 6485f247e4 remove extraneous 'text' 2008-12-07 15:07:02 +00:00
Georg Brandl 70997a9a83 Blocked revisions 67498,67521,67581,67584,67587 via svnmerge
........
  r67498 | raymond.hettinger | 2008-12-03 16:42:10 +0100 (Wed, 03 Dec 2008) | 1 line

  Backport r67478
........
  r67521 | christian.heimes | 2008-12-04 15:34:40 +0100 (Thu, 04 Dec 2008) | 1 line

  Bumped up 2.6 to 2.7
........
  r67581 | georg.brandl | 2008-12-05 16:42:03 +0100 (Fri, 05 Dec 2008) | 2 lines

  #3171: document that *slice are removed in 3k.
........
  r67584 | fred.drake | 2008-12-05 16:52:25 +0100 (Fri, 05 Dec 2008) | 2 lines

  bump version number
........
  r67587 | fred.drake | 2008-12-05 17:14:18 +0100 (Fri, 05 Dec 2008) | 2 lines

  be more specific, and parallel to the py3k branch
........
2008-12-07 15:06:59 +00:00
Georg Brandl af265f4977 Merged revisions 67531-67532,67538,67553-67554,67556-67557,67571,67574-67575,67579-67580,67591,67597,67608,67631 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67531 | georg.brandl | 2008-12-04 19:54:05 +0100 (Thu, 04 Dec 2008) | 2 lines

  Add reference to enumerate() to indices example.
........
  r67532 | georg.brandl | 2008-12-04 19:59:16 +0100 (Thu, 04 Dec 2008) | 2 lines

  Add another heapq example.
........
  r67538 | georg.brandl | 2008-12-04 22:28:16 +0100 (Thu, 04 Dec 2008) | 2 lines

  Clarification to avoid confusing output with file descriptors.
........
  r67553 | georg.brandl | 2008-12-05 08:49:49 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4408: document regex.groups.
........
  r67554 | georg.brandl | 2008-12-05 08:52:26 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4409: fix asterisks looking like footnotes.
........
  r67556 | georg.brandl | 2008-12-05 09:02:17 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4441: improve doc for os.open() flags.
........
  r67557 | georg.brandl | 2008-12-05 09:06:57 +0100 (Fri, 05 Dec 2008) | 2 lines

  Add an index entry for "subclassing immutable types".
........
  r67571 | georg.brandl | 2008-12-05 10:13:45 +0100 (Fri, 05 Dec 2008) | 2 lines

  Use markup.
........
  r67574 | georg.brandl | 2008-12-05 10:25:32 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4441 followup: Add link to open() docs for Windows.
........
  r67575 | georg.brandl | 2008-12-05 12:34:51 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4544: add `dedent` to textwrap.__all__.
........
  r67579 | georg.brandl | 2008-12-05 16:29:39 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4517: add "special method" glossary entry and clarify when __getattribute__ is bypassed.
........
  r67580 | georg.brandl | 2008-12-05 16:32:29 +0100 (Fri, 05 Dec 2008) | 2 lines

  #4478: document that copyfile() can raise Error.
........
  r67591 | georg.brandl | 2008-12-05 19:00:06 +0100 (Fri, 05 Dec 2008) | 2 lines

  Followup to #4511: add link from decorator glossary entry to definition.
........
  r67597 | georg.brandl | 2008-12-05 20:03:19 +0100 (Fri, 05 Dec 2008) | 2 lines

  Remove confusing sentence part.
........
  r67608 | georg.brandl | 2008-12-06 12:57:12 +0100 (Sat, 06 Dec 2008) | 2 lines

  Follow-up to #4488: document PIPE and STDOUT properly.
........
  r67631 | georg.brandl | 2008-12-07 12:54:07 +0100 (Sun, 07 Dec 2008) | 2 lines

  Add link to the favicon to the docs.
........
2008-12-07 15:06:20 +00:00
Benjamin Peterson eb9fc524a8 document how to deal with binary standard streams 2008-12-07 14:58:03 +00:00
Georg Brandl 2ed237bd22 #4576: fix ob_type access. 2008-12-07 14:09:20 +00:00
Antoine Pitrou 8f1a77d4a6 Blocked revisions 67619 via svnmerge
........
  r67619 | antoine.pitrou | 2008-12-06 22:29:24 +0100 (sam., 06 déc. 2008) | 1 line

  Issue #4509: bugs in bytearray with exports (buffer protocol)
........
2008-12-06 21:32:58 +00:00
Antoine Pitrou 5504e893f8 Issue #4509: bugs in bytearray with exports (buffer protocol) 2008-12-06 21:27:53 +00:00
Benjamin Peterson e6d4a9bdbc update version number 2008-12-06 18:33:20 +00:00
Benjamin Peterson e84f03f78c there are only four asdl builtin types in py3k 2008-12-06 18:32:13 +00:00