Merge the rest of the trunk.

Merged revisions 46490-46494,46496,46498,46500,46506,46521,46538,46558,46563-46567,46570-46571,46583,46593,46595-46598,46604,46606,46609-46753 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r46610 | martin.v.loewis | 2006-06-03 09:42:26 +0200 (Sat, 03 Jun 2006) | 2 lines

  Updated version (win32-icons2.zip) from #1490384.
........
  r46612 | andrew.kuchling | 2006-06-03 20:09:41 +0200 (Sat, 03 Jun 2006) | 1 line

  [Bug #1472084] Fix description of do_tag
........
  r46614 | andrew.kuchling | 2006-06-03 20:33:35 +0200 (Sat, 03 Jun 2006) | 1 line

  [Bug #1475554] Strengthen text to say 'must' instead of 'should'
........
  r46616 | andrew.kuchling | 2006-06-03 20:41:28 +0200 (Sat, 03 Jun 2006) | 1 line

  [Bug #1441864] Clarify description of 'data' argument
........
  r46617 | andrew.kuchling | 2006-06-03 20:43:24 +0200 (Sat, 03 Jun 2006) | 1 line

  Minor rewording
........
  r46619 | andrew.kuchling | 2006-06-03 21:02:35 +0200 (Sat, 03 Jun 2006) | 9 lines

  [Bug #1497414] _self is a reserved word in the WATCOM 10.6 C compiler.
  Fix by renaming the variable.

  In a different module, Neal fixed it by renaming _self to self.  There's
  already a variable named 'self' here, so I used selfptr.

  (I'm committing this on a Mac without Tk, but it's a simple search-and-replace.
  <crosses fingers>, so  I'll watch the buildbots and see what happens.)
........
  r46621 | fredrik.lundh | 2006-06-03 23:56:05 +0200 (Sat, 03 Jun 2006) | 5 lines

  "_self" is a said to be a reserved word in Watcom C 10.6.  I'm
  not sure that's really standard compliant behaviour, but I guess
  we have to fix that anyway...
........
  r46622 | andrew.kuchling | 2006-06-04 00:44:42 +0200 (Sun, 04 Jun 2006) | 1 line

  Update readme
........
  r46623 | andrew.kuchling | 2006-06-04 00:59:23 +0200 (Sun, 04 Jun 2006) | 1 line

  Drop 0 parameter
........
  r46624 | andrew.kuchling | 2006-06-04 00:59:59 +0200 (Sun, 04 Jun 2006) | 1 line

  Some code tidying; use curses.wrapper
........
  r46625 | andrew.kuchling | 2006-06-04 01:02:15 +0200 (Sun, 04 Jun 2006) | 1 line

  Use True; value returned from main is unused
........
  r46626 | andrew.kuchling | 2006-06-04 01:07:21 +0200 (Sun, 04 Jun 2006) | 1 line

  Use true division, and the True value
........
  r46627 | andrew.kuchling | 2006-06-04 01:09:58 +0200 (Sun, 04 Jun 2006) | 1 line

  Docstring fix; use True
........
  r46628 | andrew.kuchling | 2006-06-04 01:15:56 +0200 (Sun, 04 Jun 2006) | 1 line

  Put code in a main() function; loosen up the spacing to match current code style
........
  r46629 | andrew.kuchling | 2006-06-04 01:39:07 +0200 (Sun, 04 Jun 2006) | 1 line

  Use functions; modernize code
........
  r46630 | andrew.kuchling | 2006-06-04 01:43:22 +0200 (Sun, 04 Jun 2006) | 1 line

  This demo requires Medusa (not just asyncore); remove it
........
  r46631 | andrew.kuchling | 2006-06-04 01:46:36 +0200 (Sun, 04 Jun 2006) | 2 lines

  Remove xmlrpc demo -- it duplicates the SimpleXMLRPCServer module.
........
  r46632 | andrew.kuchling | 2006-06-04 01:47:22 +0200 (Sun, 04 Jun 2006) | 1 line

  Remove xmlrpc/ directory
........
  r46633 | andrew.kuchling | 2006-06-04 01:51:21 +0200 (Sun, 04 Jun 2006) | 1 line

  Remove dangling reference
........
  r46634 | andrew.kuchling | 2006-06-04 01:59:36 +0200 (Sun, 04 Jun 2006) | 1 line

  Add more whitespace; use a better socket name
........
  r46635 | tim.peters | 2006-06-04 03:22:53 +0200 (Sun, 04 Jun 2006) | 2 lines

  Whitespace normalization.
........
  r46637 | tim.peters | 2006-06-04 05:26:02 +0200 (Sun, 04 Jun 2006) | 16 lines

  In a PYMALLOC_DEBUG build obmalloc adds extra debugging info
  to each allocated block.  This was using 4 bytes for each such
  piece of info regardless of platform.  This didn't really matter
  before (proof: no bug reports, and the debug-build obmalloc would
  have assert-failed if it was ever asked for a chunk of memory
  >= 2**32 bytes), since container indices were plain ints.  But after
  the Py_ssize_t changes, it's at least theoretically possible to
  allocate a list or string whose guts exceed 2**32 bytes, and the
  PYMALLOC_DEBUG routines would fail then (having only 4 bytes
  to record the originally requested size).

  Now we use sizeof(size_t) bytes for each of a PYMALLOC_DEBUG
  build's extra debugging fields.  This won't make any difference
  on 32-bit boxes, but will add 16 bytes to each allocation in
  a debug build on a 64-bit box.
........
  r46638 | tim.peters | 2006-06-04 05:38:04 +0200 (Sun, 04 Jun 2006) | 4 lines

  _PyObject_DebugMalloc():  The return value should add
  2*sizeof(size_t) now, not 8.  This probably accounts for
  current disasters on the 64-bit buildbot slaves.
........
  r46639 | neal.norwitz | 2006-06-04 08:19:31 +0200 (Sun, 04 Jun 2006) | 1 line

  SF #1499797, Fix for memory leak in WindowsError_str
........
  r46640 | andrew.macintyre | 2006-06-04 14:31:09 +0200 (Sun, 04 Jun 2006) | 2 lines

  Patch #1454481:  Make thread stack size runtime tunable.
........
  r46641 | andrew.macintyre | 2006-06-04 14:59:59 +0200 (Sun, 04 Jun 2006) | 2 lines

  clean up function declarations to conform to PEP-7 style.
........
  r46642 | martin.blais | 2006-06-04 15:49:49 +0200 (Sun, 04 Jun 2006) | 15 lines

  Fixes in struct and socket from merge reviews.

  - Following Guido's comments, renamed

    * pack_to -> pack_into
    * recv_buf -> recv_into
    * recvfrom_buf -> recvfrom_into

  - Made fixes to _struct.c according to Neal Norwitz comments on the checkins
    list.

  - Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
........
  r46643 | ronald.oussoren | 2006-06-04 16:05:28 +0200 (Sun, 04 Jun 2006) | 3 lines

  "Import" LDFLAGS in Mac/OSX/Makefile.in to ensure pythonw gets build with
  the right compiler flags.
........
  r46644 | ronald.oussoren | 2006-06-04 16:24:59 +0200 (Sun, 04 Jun 2006) | 2 lines

  Drop Mac wrappers for the WASTE library.
........
  r46645 | tim.peters | 2006-06-04 17:49:07 +0200 (Sun, 04 Jun 2006) | 3 lines

  s_methods[]:  Stop compiler warnings by casting
  s_unpack_from to PyCFunction.
........
  r46646 | george.yoshida | 2006-06-04 19:04:12 +0200 (Sun, 04 Jun 2006) | 2 lines

  Remove a redundant word
........
  r46647 | george.yoshida | 2006-06-04 19:17:25 +0200 (Sun, 04 Jun 2006) | 2 lines

  Markup fix
........
  r46648 | martin.v.loewis | 2006-06-04 21:36:28 +0200 (Sun, 04 Jun 2006) | 2 lines

  Patch #1359618: Speed-up charmap encoder.
........
  r46649 | georg.brandl | 2006-06-04 23:46:16 +0200 (Sun, 04 Jun 2006) | 3 lines

  Repair refleaks in unicodeobject.
........
  r46650 | georg.brandl | 2006-06-04 23:56:52 +0200 (Sun, 04 Jun 2006) | 4 lines

  Patch #1346214: correctly optimize away "if 0"-style stmts
  (thanks to Neal for review)
........
  r46651 | georg.brandl | 2006-06-05 00:15:37 +0200 (Mon, 05 Jun 2006) | 2 lines

  Bug #1500293: fix memory leaks in _subprocess module.
........
  r46654 | tim.peters | 2006-06-05 01:43:53 +0200 (Mon, 05 Jun 2006) | 2 lines

  Whitespace normalization.
........
  r46655 | tim.peters | 2006-06-05 01:52:47 +0200 (Mon, 05 Jun 2006) | 16 lines

  Revert revisions:

  46640 Patch #1454481:  Make thread stack size runtime tunable.
  46647 Markup fix

  The first is causing many buildbots to fail test runs, and there
  are multiple causes with seemingly no immediate prospects for
  repairing them.  See python-dev discussion.

  Note that a branch can (and should) be created for resolving these
  problems, like

  svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH

  followed by merging rev 46647 to the new branch.
........
  r46656 | andrew.kuchling | 2006-06-05 02:08:09 +0200 (Mon, 05 Jun 2006) | 1 line

  Mention second encoding speedup
........
  r46657 | gregory.p.smith | 2006-06-05 02:31:01 +0200 (Mon, 05 Jun 2006) | 7 lines

  bugfix: when log_archive was called with the DB_ARCH_REMOVE flag present
  in BerkeleyDB >= 4.2 it tried to construct a list out of an uninitialized
  char **log_list.

  feature: export the DB_ARCH_REMOVE flag by name in the module on BerkeleyDB >= 4.2.
........
  r46658 | gregory.p.smith | 2006-06-05 02:33:35 +0200 (Mon, 05 Jun 2006) | 5 lines

  fix a bug in the previous commit.  don't leak empty list on error return and
  fix the additional rare (out of memory only) bug that it was supposed to fix
  of not freeing log_list when the python allocator failed.
........
  r46660 | tim.peters | 2006-06-05 02:55:26 +0200 (Mon, 05 Jun 2006) | 9 lines

  "Flat is better than nested."

  Move the long-winded, multiply-nested -R support out
  of runtest() and into some module-level helper functions.
  This makes runtest() and the -R code easier to follow.
  That in turn allowed seeing some opportunities for code
  simplification, and made it obvious that reglog.txt
  never got closed.
........
  r46661 | hyeshik.chang | 2006-06-05 02:59:54 +0200 (Mon, 05 Jun 2006) | 3 lines

  Fix a potentially invalid memory access of CJKCodecs' shift-jis
  decoder.  (found by Neal Norwitz)
........
  r46663 | gregory.p.smith | 2006-06-05 03:39:52 +0200 (Mon, 05 Jun 2006) | 3 lines

    * support DBEnv.log_stat() method on BerkeleyDB >= 4.0 [patch #1494885]
........
  r46664 | tim.peters | 2006-06-05 03:43:03 +0200 (Mon, 05 Jun 2006) | 3 lines

  Remove doctest.testmod's deprecated (in 2.4) `isprivate`
  argument.  A lot of hair went into supporting that!
........
  r46665 | tim.peters | 2006-06-05 03:47:24 +0200 (Mon, 05 Jun 2006) | 2 lines

  Whitespace normalization.
........
  r46666 | tim.peters | 2006-06-05 03:48:21 +0200 (Mon, 05 Jun 2006) | 2 lines

  Make doctest news more accurate.
........
  r46667 | gregory.p.smith | 2006-06-05 03:56:15 +0200 (Mon, 05 Jun 2006) | 3 lines

    * support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
........
  r46668 | gregory.p.smith | 2006-06-05 04:02:25 +0200 (Mon, 05 Jun 2006) | 3 lines

  mention the just committed bsddb changes
........
  r46671 | gregory.p.smith | 2006-06-05 19:38:04 +0200 (Mon, 05 Jun 2006) | 3 lines

    * add support for DBSequence objects [patch #1466734]
........
  r46672 | gregory.p.smith | 2006-06-05 20:20:07 +0200 (Mon, 05 Jun 2006) | 3 lines

  forgot to add this file in previous commit
........
  r46673 | tim.peters | 2006-06-05 20:36:12 +0200 (Mon, 05 Jun 2006) | 2 lines

  Whitespace normalization.
........
  r46674 | tim.peters | 2006-06-05 20:36:54 +0200 (Mon, 05 Jun 2006) | 2 lines

  Add missing svn:eol-style property to text files.
........
  r46675 | gregory.p.smith | 2006-06-05 20:48:21 +0200 (Mon, 05 Jun 2006) | 4 lines

    * fix DBCursor.pget() bug with keyword argument names when no data= is
      supplied [SF pybsddb bug #1477863]
........
  r46676 | andrew.kuchling | 2006-06-05 21:05:32 +0200 (Mon, 05 Jun 2006) | 1 line

  Remove use of Trove name, which isn't very helpful to users
........
  r46677 | andrew.kuchling | 2006-06-05 21:08:25 +0200 (Mon, 05 Jun 2006) | 1 line

  [Bug #1470026] Include link to list of classifiers
........
  r46679 | tim.peters | 2006-06-05 22:48:49 +0200 (Mon, 05 Jun 2006) | 10 lines

  Access _struct attributes directly instead of mucking with getattr.

  string_reverse():  Simplify.

  assertRaises():  Raise TestFailed on failure.

  test_unpack_from(), test_pack_into(), test_pack_into_fn():  never
  use `assert` to test for an expected result (it doesn't test anything
  when Python is run with -O).
........
  r46680 | tim.peters | 2006-06-05 22:49:27 +0200 (Mon, 05 Jun 2006) | 2 lines

  Add missing svn:eol-style property to text files.
........
  r46681 | gregory.p.smith | 2006-06-06 01:38:06 +0200 (Tue, 06 Jun 2006) | 3 lines

  add depends = ['md5.h']  to the _md5 module extension for correctness sake.
........
  r46682 | brett.cannon | 2006-06-06 01:51:55 +0200 (Tue, 06 Jun 2006) | 4 lines

  Add 3 more bytes to a buffer to cover constants in string and null byte on top of 10 possible digits for an int.

  Closes bug #1501223.
........
  r46684 | gregory.p.smith | 2006-06-06 01:59:37 +0200 (Tue, 06 Jun 2006) | 5 lines

  - bsddb: the __len__ method of a DB object has been fixed to return correct
    results.  It could previously incorrectly return 0 in some cases.
    Fixes SF bug 1493322 (pybsddb bug 1184012).
........
  r46686 | tim.peters | 2006-06-06 02:25:07 +0200 (Tue, 06 Jun 2006) | 7 lines

  _PySys_Init():  It's rarely a good idea to size a buffer to the
  exact maximum size someone guesses is needed.  In this case, if
  we're really worried about extreme integers, then "cp%d" can
  actually need 14 bytes (2 for "cp" + 1 for \0 at the end +
  11 for -(2**31-1)).  So reserve 128 bytes instead -- nothing is
  actually saved by making a stack-local buffer tiny.
........
  r46687 | neal.norwitz | 2006-06-06 09:22:08 +0200 (Tue, 06 Jun 2006) | 1 line

  Remove unused variable (and stop compiler warning)
........
  r46688 | neal.norwitz | 2006-06-06 09:23:01 +0200 (Tue, 06 Jun 2006) | 1 line

  Fix a bunch of parameter strings
........
  r46689 | thomas.heller | 2006-06-06 13:34:33 +0200 (Tue, 06 Jun 2006) | 6 lines

  Convert CFieldObject tp_members to tp_getset, since there is no
  structmember typecode for Py_ssize_t fields.  This should fix some of
  the errors on the PPC64 debian machine (64-bit, big endian).

  Assigning to readonly fields now raises AttributeError instead of
  TypeError, so the testcase has to be changed as well.
........
  r46690 | thomas.heller | 2006-06-06 13:54:32 +0200 (Tue, 06 Jun 2006) | 1 line

  Damn - the sentinel was missing.  And fix another silly mistake.
........
  r46691 | martin.blais | 2006-06-06 14:46:55 +0200 (Tue, 06 Jun 2006) | 13 lines

  Normalized a few cases of whitespace in function declarations.

  Found them using::

    find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done
    find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done

  (I was doing this all over my own code anyway, because I'd been using spaces in
  all defs, so I thought I'd make a run on the Python code as well.  If you need
  to do such fixes in your own code, you can use xx-rename or parenregu.el within
  emacs.)
........
  r46693 | thomas.heller | 2006-06-06 17:34:18 +0200 (Tue, 06 Jun 2006) | 1 line

  Specify argtypes for all test functions. Maybe that helps on strange ;-) architectures
........
  r46694 | tim.peters | 2006-06-06 17:50:17 +0200 (Tue, 06 Jun 2006) | 5 lines

  BSequence_set_range():  Rev 46688 ("Fix a bunch of
  parameter strings") changed this function's signature
  seemingly by mistake, which is causing buildbots to fail
  test_bsddb3.  Restored the pre-46688 signature.
........
  r46695 | tim.peters | 2006-06-06 17:52:35 +0200 (Tue, 06 Jun 2006) | 4 lines

  On python-dev Thomas Heller said these were committed
  by mistake in rev 46693, so reverting this part of
  rev 46693.
........
  r46696 | andrew.kuchling | 2006-06-06 19:10:41 +0200 (Tue, 06 Jun 2006) | 1 line

  Fix comment typo
........
  r46697 | brett.cannon | 2006-06-06 20:08:16 +0200 (Tue, 06 Jun 2006) | 2 lines

  Fix coding style guide bug.
........
  r46698 | thomas.heller | 2006-06-06 20:50:46 +0200 (Tue, 06 Jun 2006) | 2 lines

  Add a hack so that foreign functions returning float now do work on 64-bit
  big endian platforms.
........
  r46699 | thomas.heller | 2006-06-06 21:25:13 +0200 (Tue, 06 Jun 2006) | 3 lines

  Use the same big-endian hack as in _ctypes/callproc.c for callback functions.
  This fixes the callback function tests that return float.
........
  r46700 | ronald.oussoren | 2006-06-06 21:50:24 +0200 (Tue, 06 Jun 2006) | 5 lines

  * Ensure that "make altinstall" works when the tree was configured
    with --enable-framework
  * Also for --enable-framework: allow users to use --prefix to specify
    the location of the compatibility symlinks (such as /usr/local/bin/python)
........
  r46701 | ronald.oussoren | 2006-06-06 21:56:00 +0200 (Tue, 06 Jun 2006) | 3 lines

  A quick hack to ensure the right key-bindings for IDLE on osx: install patched
  configuration files during a framework install.
........
  r46702 | tim.peters | 2006-06-07 03:04:59 +0200 (Wed, 07 Jun 2006) | 4 lines

  dash_R_cleanup():  Clear filecmp._cache.  This accounts for
  different results across -R runs (at least on Windows) of
  test_filecmp.
........
  r46705 | tim.peters | 2006-06-07 08:57:51 +0200 (Wed, 07 Jun 2006) | 17 lines

  SF patch 1501987:  Remove randomness from test_exceptions,
  from ?iga Seilnacht (sorry about the name, but Firefox
  on my box can't display the first character of the name --
  the SF "Unix name" is zseil).

  This appears to cure the oddball intermittent leaks across
  runs when running test_exceptions under -R.  I'm not sure
  why, but I'm too sleepy to care ;-)

  The thrust of the SF patch was to remove randomness in the
  pickle protocol used.  I changed the patch to use
  range(pickle.HIGHEST_PROTOCOL + 1), to try both pickle and
  cPickle, and randomly mucked with other test lines to put
  statements on their own lines.

  Not a bugfix candidate (this is fiddling new-in-2.5 code).
........
  r46706 | andrew.kuchling | 2006-06-07 15:55:33 +0200 (Wed, 07 Jun 2006) | 1 line

  Add an SQLite introduction, taken from the 'What's New' text
........
  r46708 | andrew.kuchling | 2006-06-07 19:02:52 +0200 (Wed, 07 Jun 2006) | 1 line

  Mention other placeholders
........
  r46709 | andrew.kuchling | 2006-06-07 19:03:46 +0200 (Wed, 07 Jun 2006) | 1 line

  Add an item; also, escape %
........
  r46710 | andrew.kuchling | 2006-06-07 19:04:01 +0200 (Wed, 07 Jun 2006) | 1 line

  Mention other placeholders
........
  r46716 | ronald.oussoren | 2006-06-07 20:57:44 +0200 (Wed, 07 Jun 2006) | 2 lines

  Move Mac/OSX/Tools one level up
........
  r46717 | ronald.oussoren | 2006-06-07 20:58:01 +0200 (Wed, 07 Jun 2006) | 2 lines

  Move Mac/OSX/PythonLauncher one level up
........
  r46718 | ronald.oussoren | 2006-06-07 20:58:42 +0200 (Wed, 07 Jun 2006) | 2 lines

  mv Mac/OSX/BuildScript one level up
........
  r46719 | ronald.oussoren | 2006-06-07 21:02:03 +0200 (Wed, 07 Jun 2006) | 2 lines

  Move Mac/OSX/* one level up
........
  r46720 | ronald.oussoren | 2006-06-07 21:06:01 +0200 (Wed, 07 Jun 2006) | 2 lines

  And the last bit: move IDLE one level up and adjust makefiles
........
  r46723 | ronald.oussoren | 2006-06-07 21:38:53 +0200 (Wed, 07 Jun 2006) | 4 lines

  - Patch the correct version of python in the Info.plists at build time, instead
  of relying on a maintainer to update them before releases.
  - Remove the now empty Mac/OSX directory
........
  r46727 | ronald.oussoren | 2006-06-07 22:18:44 +0200 (Wed, 07 Jun 2006) | 7 lines

  * If BuildApplet.py is used as an applet it starts with a version of
    sys.exutable that isn't usuable on an #!-line. That results in generated
    applets that don't actually work. Work around this problem by resetting
    sys.executable.
  * argvemulator.py didn't work on intel macs. This patch fixes this
    (bug #1491468)
........
  r46728 | tim.peters | 2006-06-07 22:40:06 +0200 (Wed, 07 Jun 2006) | 2 lines

  Whitespace normalization.
........
  r46729 | tim.peters | 2006-06-07 22:40:54 +0200 (Wed, 07 Jun 2006) | 2 lines

  Add missing svn:eol-style property to text files.
........
  r46730 | thomas.heller | 2006-06-07 22:43:06 +0200 (Wed, 07 Jun 2006) | 7 lines

  Fix for foreign functions returning small structures on 64-bit big
  endian machines.  Should fix the remaininf failure in the PPC64
  Debian buildbot.

  Thanks to Matthias Klose for providing access to a machine to debug
  and test this.
........
  r46731 | brett.cannon | 2006-06-07 23:48:17 +0200 (Wed, 07 Jun 2006) | 2 lines

  Clarify documentation for bf_getcharbuffer.
........
  r46735 | neal.norwitz | 2006-06-08 07:12:45 +0200 (Thu, 08 Jun 2006) | 1 line

  Fix a refleak in recvfrom_into
........
  r46736 | gregory.p.smith | 2006-06-08 07:17:08 +0200 (Thu, 08 Jun 2006) | 9 lines

  - bsddb: the bsddb.dbtables Modify method now raises the proper error and
    aborts the db transaction safely when a modifier callback fails.
    Fixes SF python patch/bug #1408584.

  Also cleans up the bsddb.dbtables docstrings since thats the only
  documentation that exists for that unadvertised module.  (people
  really should really just use sqlite3)
........
  r46737 | gregory.p.smith | 2006-06-08 07:38:11 +0200 (Thu, 08 Jun 2006) | 4 lines

  * Turn the deadlock situation described in SF bug #775414 into a
    DBDeadLockError exception.
  * add the test case for my previous dbtables commit.
........
  r46738 | gregory.p.smith | 2006-06-08 07:39:54 +0200 (Thu, 08 Jun 2006) | 2 lines

  pasted set_lk_detect line in wrong spot in previous commit.  fixed.  passes tests this time.
........
  r46739 | armin.rigo | 2006-06-08 12:56:24 +0200 (Thu, 08 Jun 2006) | 6 lines

  (arre, arigo)  SF bug #1350060

  Give a consistent behavior for comparison and hashing of method objects
  (both user- and built-in methods).  Now compares the 'self' recursively.
  The hash was already asking for the hash of 'self'.
........
  r46740 | andrew.kuchling | 2006-06-08 13:56:44 +0200 (Thu, 08 Jun 2006) | 1 line

  Typo fix
........
  r46741 | georg.brandl | 2006-06-08 14:45:01 +0200 (Thu, 08 Jun 2006) | 2 lines

  Bug #1502750: Fix getargs "i" format to use LONG_MIN and LONG_MAX for bounds checking.
........
  r46743 | georg.brandl | 2006-06-08 14:54:13 +0200 (Thu, 08 Jun 2006) | 2 lines

  Bug #1502728: Correctly link against librt library on HP-UX.
........
  r46745 | georg.brandl | 2006-06-08 14:55:47 +0200 (Thu, 08 Jun 2006) | 3 lines

  Add news for recent bugfix.
........
  r46746 | georg.brandl | 2006-06-08 15:31:07 +0200 (Thu, 08 Jun 2006) | 4 lines

  Argh. "integer" is a very confusing word ;)
  Actually, checking for INT_MAX and INT_MIN is correct since
  the format code explicitly handles a C "int".
........
  r46748 | nick.coghlan | 2006-06-08 15:54:49 +0200 (Thu, 08 Jun 2006) | 1 line

  Add functools.update_wrapper() and functools.wraps() as described in PEP 356
........
  r46751 | georg.brandl | 2006-06-08 16:50:21 +0200 (Thu, 08 Jun 2006) | 4 lines

  Bug #1502805: don't alias file.__exit__ to file.close since the
  latter can return something that's true.
........
  r46752 | georg.brandl | 2006-06-08 16:50:53 +0200 (Thu, 08 Jun 2006) | 3 lines

  Convert test_file to unittest.
........
diff --git a/Lib/encodings/cp875.py b/Lib/encodings/cp875.py
index 879d5a4..72b160b 100644
--- a/Lib/encodings/cp875.py
+++ b/Lib/encodings/cp875.py
@@ -9,14 +9,14 @@
 class Codec(codecs.Codec):
 
     def encode(self,input,errors='strict'):
-        return codecs.charmap_encode(input,errors,encoding_map)
+        return codecs.charmap_encode(input,errors,encoding_table)
 
     def decode(self,input,errors='strict'):
         return codecs.charmap_decode(input,errors,decoding_table)
 
 class IncrementalEncoder(codecs.IncrementalEncoder):
     def encode(self, input, final=False):
-        return codecs.charmap_encode(input,self.errors,encoding_map)[0]
+        return codecs.charmap_encode(input,self.errors,encoding_table)[0]
 
 class IncrementalDecoder(codecs.IncrementalDecoder):
     def decode(self, input, final=False):
@@ -303,257 +303,5 @@
     u'\x9f'     #  0xFF -> CONTROL
 )
 
-### Encoding Map
-
-encoding_map = {
-    0x0000: 0x00,       #  NULL
-    0x0001: 0x01,       #  START OF HEADING
-    0x0002: 0x02,       #  START OF TEXT
-    0x0003: 0x03,       #  END OF TEXT
-    0x0004: 0x37,       #  END OF TRANSMISSION
-    0x0005: 0x2D,       #  ENQUIRY
-    0x0006: 0x2E,       #  ACKNOWLEDGE
-    0x0007: 0x2F,       #  BELL
-    0x0008: 0x16,       #  BACKSPACE
-    0x0009: 0x05,       #  HORIZONTAL TABULATION
-    0x000A: 0x25,       #  LINE FEED
-    0x000B: 0x0B,       #  VERTICAL TABULATION
-    0x000C: 0x0C,       #  FORM FEED
-    0x000D: 0x0D,       #  CARRIAGE RETURN
-    0x000E: 0x0E,       #  SHIFT OUT
-    0x000F: 0x0F,       #  SHIFT IN
-    0x0010: 0x10,       #  DATA LINK ESCAPE
-    0x0011: 0x11,       #  DEVICE CONTROL ONE
-    0x0012: 0x12,       #  DEVICE CONTROL TWO
-    0x0013: 0x13,       #  DEVICE CONTROL THREE
-    0x0014: 0x3C,       #  DEVICE CONTROL FOUR
-    0x0015: 0x3D,       #  NEGATIVE ACKNOWLEDGE
-    0x0016: 0x32,       #  SYNCHRONOUS IDLE
-    0x0017: 0x26,       #  END OF TRANSMISSION BLOCK
-    0x0018: 0x18,       #  CANCEL
-    0x0019: 0x19,       #  END OF MEDIUM
-    0x001A: None,       #  SUBSTITUTE
-    0x001B: 0x27,       #  ESCAPE
-    0x001C: 0x1C,       #  FILE SEPARATOR
-    0x001D: 0x1D,       #  GROUP SEPARATOR
-    0x001E: 0x1E,       #  RECORD SEPARATOR
-    0x001F: 0x1F,       #  UNIT SEPARATOR
-    0x0020: 0x40,       #  SPACE
-    0x0021: 0x4F,       #  EXCLAMATION MARK
-    0x0022: 0x7F,       #  QUOTATION MARK
-    0x0023: 0x7B,       #  NUMBER SIGN
-    0x0024: 0x5B,       #  DOLLAR SIGN
-    0x0025: 0x6C,       #  PERCENT SIGN
-    0x0026: 0x50,       #  AMPERSAND
-    0x0027: 0x7D,       #  APOSTROPHE
-    0x0028: 0x4D,       #  LEFT PARENTHESIS
-    0x0029: 0x5D,       #  RIGHT PARENTHESIS
-    0x002A: 0x5C,       #  ASTERISK
-    0x002B: 0x4E,       #  PLUS SIGN
-    0x002C: 0x6B,       #  COMMA
-    0x002D: 0x60,       #  HYPHEN-MINUS
-    0x002E: 0x4B,       #  FULL STOP
-    0x002F: 0x61,       #  SOLIDUS
-    0x0030: 0xF0,       #  DIGIT ZERO
-    0x0031: 0xF1,       #  DIGIT ONE
-    0x0032: 0xF2,       #  DIGIT TWO
-    0x0033: 0xF3,       #  DIGIT THREE
-    0x0034: 0xF4,       #  DIGIT FOUR
-    0x0035: 0xF5,       #  DIGIT FIVE
-    0x0036: 0xF6,       #  DIGIT SIX
-    0x0037: 0xF7,       #  DIGIT SEVEN
-    0x0038: 0xF8,       #  DIGIT EIGHT
-    0x0039: 0xF9,       #  DIGIT NINE
-    0x003A: 0x7A,       #  COLON
-    0x003B: 0x5E,       #  SEMICOLON
-    0x003C: 0x4C,       #  LESS-THAN SIGN
-    0x003D: 0x7E,       #  EQUALS SIGN
-    0x003E: 0x6E,       #  GREATER-THAN SIGN
-    0x003F: 0x6F,       #  QUESTION MARK
-    0x0040: 0x7C,       #  COMMERCIAL AT
-    0x0041: 0xC1,       #  LATIN CAPITAL LETTER A
-    0x0042: 0xC2,       #  LATIN CAPITAL LETTER B
-    0x0043: 0xC3,       #  LATIN CAPITAL LETTER C
-    0x0044: 0xC4,       #  LATIN CAPITAL LETTER D
-    0x0045: 0xC5,       #  LATIN CAPITAL LETTER E
-    0x0046: 0xC6,       #  LATIN CAPITAL LETTER F
-    0x0047: 0xC7,       #  LATIN CAPITAL LETTER G
-    0x0048: 0xC8,       #  LATIN CAPITAL LETTER H
-    0x0049: 0xC9,       #  LATIN CAPITAL LETTER I
-    0x004A: 0xD1,       #  LATIN CAPITAL LETTER J
-    0x004B: 0xD2,       #  LATIN CAPITAL LETTER K
-    0x004C: 0xD3,       #  LATIN CAPITAL LETTER L
-    0x004D: 0xD4,       #  LATIN CAPITAL LETTER M
-    0x004E: 0xD5,       #  LATIN CAPITAL LETTER N
-    0x004F: 0xD6,       #  LATIN CAPITAL LETTER O
-    0x0050: 0xD7,       #  LATIN CAPITAL LETTER P
-    0x0051: 0xD8,       #  LATIN CAPITAL LETTER Q
-    0x0052: 0xD9,       #  LATIN CAPITAL LETTER R
-    0x0053: 0xE2,       #  LATIN CAPITAL LETTER S
-    0x0054: 0xE3,       #  LATIN CAPITAL LETTER T
-    0x0055: 0xE4,       #  LATIN CAPITAL LETTER U
-    0x0056: 0xE5,       #  LATIN CAPITAL LETTER V
-    0x0057: 0xE6,       #  LATIN CAPITAL LETTER W
-    0x0058: 0xE7,       #  LATIN CAPITAL LETTER X
-    0x0059: 0xE8,       #  LATIN CAPITAL LETTER Y
-    0x005A: 0xE9,       #  LATIN CAPITAL LETTER Z
-    0x005B: 0x4A,       #  LEFT SQUARE BRACKET
-    0x005C: 0xE0,       #  REVERSE SOLIDUS
-    0x005D: 0x5A,       #  RIGHT SQUARE BRACKET
-    0x005E: 0x5F,       #  CIRCUMFLEX ACCENT
-    0x005F: 0x6D,       #  LOW LINE
-    0x0060: 0x79,       #  GRAVE ACCENT
-    0x0061: 0x81,       #  LATIN SMALL LETTER A
-    0x0062: 0x82,       #  LATIN SMALL LETTER B
-    0x0063: 0x83,       #  LATIN SMALL LETTER C
-    0x0064: 0x84,       #  LATIN SMALL LETTER D
-    0x0065: 0x85,       #  LATIN SMALL LETTER E
-    0x0066: 0x86,       #  LATIN SMALL LETTER F
-    0x0067: 0x87,       #  LATIN SMALL LETTER G
-    0x0068: 0x88,       #  LATIN SMALL LETTER H
-    0x0069: 0x89,       #  LATIN SMALL LETTER I
-    0x006A: 0x91,       #  LATIN SMALL LETTER J
-    0x006B: 0x92,       #  LATIN SMALL LETTER K
-    0x006C: 0x93,       #  LATIN SMALL LETTER L
-    0x006D: 0x94,       #  LATIN SMALL LETTER M
-    0x006E: 0x95,       #  LATIN SMALL LETTER N
-    0x006F: 0x96,       #  LATIN SMALL LETTER O
-    0x0070: 0x97,       #  LATIN SMALL LETTER P
-    0x0071: 0x98,       #  LATIN SMALL LETTER Q
-    0x0072: 0x99,       #  LATIN SMALL LETTER R
-    0x0073: 0xA2,       #  LATIN SMALL LETTER S
-    0x0074: 0xA3,       #  LATIN SMALL LETTER T
-    0x0075: 0xA4,       #  LATIN SMALL LETTER U
-    0x0076: 0xA5,       #  LATIN SMALL LETTER V
-    0x0077: 0xA6,       #  LATIN SMALL LETTER W
-    0x0078: 0xA7,       #  LATIN SMALL LETTER X
-    0x0079: 0xA8,       #  LATIN SMALL LETTER Y
-    0x007A: 0xA9,       #  LATIN SMALL LETTER Z
-    0x007B: 0xC0,       #  LEFT CURLY BRACKET
-    0x007C: 0x6A,       #  VERTICAL LINE
-    0x007D: 0xD0,       #  RIGHT CURLY BRACKET
-    0x007E: 0xA1,       #  TILDE
-    0x007F: 0x07,       #  DELETE
-    0x0080: 0x20,       #  CONTROL
-    0x0081: 0x21,       #  CONTROL
-    0x0082: 0x22,       #  CONTROL
-    0x0083: 0x23,       #  CONTROL
-    0x0084: 0x24,       #  CONTROL
-    0x0085: 0x15,       #  CONTROL
-    0x0086: 0x06,       #  CONTROL
-    0x0087: 0x17,       #  CONTROL
-    0x0088: 0x28,       #  CONTROL
-    0x0089: 0x29,       #  CONTROL
-    0x008A: 0x2A,       #  CONTROL
-    0x008B: 0x2B,       #  CONTROL
-    0x008C: 0x2C,       #  CONTROL
-    0x008D: 0x09,       #  CONTROL
-    0x008E: 0x0A,       #  CONTROL
-    0x008F: 0x1B,       #  CONTROL
-    0x0090: 0x30,       #  CONTROL
-    0x0091: 0x31,       #  CONTROL
-    0x0092: 0x1A,       #  CONTROL
-    0x0093: 0x33,       #  CONTROL
-    0x0094: 0x34,       #  CONTROL
-    0x0095: 0x35,       #  CONTROL
-    0x0096: 0x36,       #  CONTROL
-    0x0097: 0x08,       #  CONTROL
-    0x0098: 0x38,       #  CONTROL
-    0x0099: 0x39,       #  CONTROL
-    0x009A: 0x3A,       #  CONTROL
-    0x009B: 0x3B,       #  CONTROL
-    0x009C: 0x04,       #  CONTROL
-    0x009D: 0x14,       #  CONTROL
-    0x009E: 0x3E,       #  CONTROL
-    0x009F: 0xFF,       #  CONTROL
-    0x00A0: 0x74,       #  NO-BREAK SPACE
-    0x00A3: 0xB0,       #  POUND SIGN
-    0x00A6: 0xDF,       #  BROKEN BAR
-    0x00A7: 0xEB,       #  SECTION SIGN
-    0x00A8: 0x70,       #  DIAERESIS
-    0x00A9: 0xFB,       #  COPYRIGHT SIGN
-    0x00AB: 0xEE,       #  LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-    0x00AC: 0xEF,       #  NOT SIGN
-    0x00AD: 0xCA,       #  SOFT HYPHEN
-    0x00B0: 0x90,       #  DEGREE SIGN
-    0x00B1: 0xDA,       #  PLUS-MINUS SIGN
-    0x00B2: 0xEA,       #  SUPERSCRIPT TWO
-    0x00B3: 0xFA,       #  SUPERSCRIPT THREE
-    0x00B4: 0xA0,       #  ACUTE ACCENT
-    0x00BB: 0xFE,       #  RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-    0x00BD: 0xDB,       #  VULGAR FRACTION ONE HALF
-    0x0385: 0x80,       #  GREEK DIALYTIKA TONOS
-    0x0386: 0x71,       #  GREEK CAPITAL LETTER ALPHA WITH TONOS
-    0x0387: 0xDD,       #  GREEK ANO TELEIA
-    0x0388: 0x72,       #  GREEK CAPITAL LETTER EPSILON WITH TONOS
-    0x0389: 0x73,       #  GREEK CAPITAL LETTER ETA WITH TONOS
-    0x038A: 0x75,       #  GREEK CAPITAL LETTER IOTA WITH TONOS
-    0x038C: 0x76,       #  GREEK CAPITAL LETTER OMICRON WITH TONOS
-    0x038E: 0x77,       #  GREEK CAPITAL LETTER UPSILON WITH TONOS
-    0x038F: 0x78,       #  GREEK CAPITAL LETTER OMEGA WITH TONOS
-    0x0390: 0xCC,       #  GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
-    0x0391: 0x41,       #  GREEK CAPITAL LETTER ALPHA
-    0x0392: 0x42,       #  GREEK CAPITAL LETTER BETA
-    0x0393: 0x43,       #  GREEK CAPITAL LETTER GAMMA
-    0x0394: 0x44,       #  GREEK CAPITAL LETTER DELTA
-    0x0395: 0x45,       #  GREEK CAPITAL LETTER EPSILON
-    0x0396: 0x46,       #  GREEK CAPITAL LETTER ZETA
-    0x0397: 0x47,       #  GREEK CAPITAL LETTER ETA
-    0x0398: 0x48,       #  GREEK CAPITAL LETTER THETA
-    0x0399: 0x49,       #  GREEK CAPITAL LETTER IOTA
-    0x039A: 0x51,       #  GREEK CAPITAL LETTER KAPPA
-    0x039B: 0x52,       #  GREEK CAPITAL LETTER LAMDA
-    0x039C: 0x53,       #  GREEK CAPITAL LETTER MU
-    0x039D: 0x54,       #  GREEK CAPITAL LETTER NU
-    0x039E: 0x55,       #  GREEK CAPITAL LETTER XI
-    0x039F: 0x56,       #  GREEK CAPITAL LETTER OMICRON
-    0x03A0: 0x57,       #  GREEK CAPITAL LETTER PI
-    0x03A1: 0x58,       #  GREEK CAPITAL LETTER RHO
-    0x03A3: 0x59,       #  GREEK CAPITAL LETTER SIGMA
-    0x03A4: 0x62,       #  GREEK CAPITAL LETTER TAU
-    0x03A5: 0x63,       #  GREEK CAPITAL LETTER UPSILON
-    0x03A6: 0x64,       #  GREEK CAPITAL LETTER PHI
-    0x03A7: 0x65,       #  GREEK CAPITAL LETTER CHI
-    0x03A8: 0x66,       #  GREEK CAPITAL LETTER PSI
-    0x03A9: 0x67,       #  GREEK CAPITAL LETTER OMEGA
-    0x03AA: 0x68,       #  GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
-    0x03AB: 0x69,       #  GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
-    0x03AC: 0xB1,       #  GREEK SMALL LETTER ALPHA WITH TONOS
-    0x03AD: 0xB2,       #  GREEK SMALL LETTER EPSILON WITH TONOS
-    0x03AE: 0xB3,       #  GREEK SMALL LETTER ETA WITH TONOS
-    0x03AF: 0xB5,       #  GREEK SMALL LETTER IOTA WITH TONOS
-    0x03B0: 0xCD,       #  GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
-    0x03B1: 0x8A,       #  GREEK SMALL LETTER ALPHA
-    0x03B2: 0x8B,       #  GREEK SMALL LETTER BETA
-    0x03B3: 0x8C,       #  GREEK SMALL LETTER GAMMA
-    0x03B4: 0x8D,       #  GREEK SMALL LETTER DELTA
-    0x03B5: 0x8E,       #  GREEK SMALL LETTER EPSILON
-    0x03B6: 0x8F,       #  GREEK SMALL LETTER ZETA
-    0x03B7: 0x9A,       #  GREEK SMALL LETTER ETA
-    0x03B8: 0x9B,       #  GREEK SMALL LETTER THETA
-    0x03B9: 0x9C,       #  GREEK SMALL LETTER IOTA
-    0x03BA: 0x9D,       #  GREEK SMALL LETTER KAPPA
-    0x03BB: 0x9E,       #  GREEK SMALL LETTER LAMDA
-    0x03BC: 0x9F,       #  GREEK SMALL LETTER MU
-    0x03BD: 0xAA,       #  GREEK SMALL LETTER NU
-    0x03BE: 0xAB,       #  GREEK SMALL LETTER XI
-    0x03BF: 0xAC,       #  GREEK SMALL LETTER OMICRON
-    0x03C0: 0xAD,       #  GREEK SMALL LETTER PI
-    0x03C1: 0xAE,       #  GREEK SMALL LETTER RHO
-    0x03C2: 0xBA,       #  GREEK SMALL LETTER FINAL SIGMA
-    0x03C3: 0xAF,       #  GREEK SMALL LETTER SIGMA
-    0x03C4: 0xBB,       #  GREEK SMALL LETTER TAU
-    0x03C5: 0xBC,       #  GREEK SMALL LETTER UPSILON
-    0x03C6: 0xBD,       #  GREEK SMALL LETTER PHI
-    0x03C7: 0xBE,       #  GREEK SMALL LETTER CHI
-    0x03C8: 0xBF,       #  GREEK SMALL LETTER PSI
-    0x03C9: 0xCB,       #  GREEK SMALL LETTER OMEGA
-    0x03CA: 0xB4,       #  GREEK SMALL LETTER IOTA WITH DIALYTIKA
-    0x03CB: 0xB8,       #  GREEK SMALL LETTER UPSILON WITH DIALYTIKA
-    0x03CC: 0xB6,       #  GREEK SMALL LETTER OMICRON WITH TONOS
-    0x03CD: 0xB7,       #  GREEK SMALL LETTER UPSILON WITH TONOS
-    0x03CE: 0xB9,       #  GREEK SMALL LETTER OMEGA WITH TONOS
-    0x2015: 0xCF,       #  HORIZONTAL BAR
-    0x2018: 0xCE,       #  LEFT SINGLE QUOTATION MARK
-    0x2019: 0xDE,       #  RIGHT SINGLE QUOTATION MARK
-}
+### Encoding table
+encoding_table=codecs.charmap_build(decoding_table)