[Python-checkins] r75919 - in sandbox/trunk/newgil: Demo/comparisons/sortingtest.py Doc/ACKS.txt Doc/distutils/apiref.rst Doc/distutils/builtdist.rst Doc/documenting/markup.rst Doc/faq/design.rst Doc/faq/extending.rst Doc/faq/general.rst Doc/faq/gui.rst Doc/faq/library.rst Doc/faq/programming.rst Doc/faq/windows.rst Doc/howto/unicode.rst Doc/howto/webservers.rst Doc/install/index.rst Doc/library/codecs.rst Doc/library/configparser.rst Doc/library/curses.rst Doc/library/datetime.rst Doc/library/functions.rst Doc/library/getopt.rst Doc/library/inspect.rst Doc/library/mailbox.rst Doc/library/math.rst Doc/library/msilib.rst Doc/library/os.rst Doc/library/othergui.rst Doc/library/platform.rst Doc/library/signal.rst Doc/library/stdtypes.rst Doc/library/sys.rst Doc/library/types.rst Doc/library/weakref.rst Doc/reference/datamodel.rst Doc/reference/executionmodel.rst Doc/reference/expressions.rst Doc/reference/simple_stmts.rst Doc/tools/sphinxext/pyspecific.py Doc/tools/sphinxext/static/basic.css Doc/tutorial/index.rst Doc/using/cmdline.rst Doc/using/windows.rst Doc/whatsnew/2.0.rst Doc/whatsnew/2.2.rst Doc/whatsnew/2.3.rst Doc/whatsnew/2.4.rst Doc/whatsnew/2.6.rst Lib/distutils/core.py Lib/distutils/dist.py Lib/distutils/errors.py Lib/distutils/tests/test_dist.py Lib/test/regrtest.py Lib/test/test_asyncore.py Lib/test/test_bz2.py Lib/test/test_complex.py Lib/test/test_distutils.py Lib/test/test_float.py Lib/test/test_httpservers.py Lib/test/test_site.py Lib/test/test_smtplib.py Lib/test/test_socketserver.py Lib/test/test_sys.py Lib/test/test_telnetlib.py Lib/test/test_threading.py Lib/test/test_urllib2_localnet.py Lib/threading.py Lib/warnings.py Makefile.pre.in Misc/NEWS Modules/_ctypes/_ctypes.c Modules/_io/_iomodule.h Modules/_io/bufferedio.c Modules/_localemodule.c Modules/_testcapimodule.c Modules/bz2module.c Modules/readline.c Objects/complexobject.c Objects/floatobject.c Objects/unicodeobject.c Python/codecs.c configure configure.in pyconfig.h.in

antoine.pitrou python-checkins at python.org
Wed Oct 28 11:50:46 CET 2009


Author: antoine.pitrou
Date: Wed Oct 28 11:50:44 2009
New Revision: 75919

Log:
Merged revisions 75726,75729,75732-75733,75737-75738,75740-75741,75744,75746,75797,75820,75834,75836,75839,75843,75845,75847,75850,75852,75856,75861,75869-75870,75873,75876-75877,75881,75885,75889-75890,75895,75903,75907,75911,75914 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r75726 | antoine.pitrou | 2009-10-26 20:22:14 +0100 (lun., 26 oct. 2009) | 10 lines
  
  Merged revisions 75725 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75725 | antoine.pitrou | 2009-10-26 20:16:46 +0100 (lun., 26 oct. 2009) | 4 lines
    
    Some platforms have rl_completion_append_character but not rl_completion_suppress_append.
    Reported by Mark D.
  ........
................
  r75729 | mark.dickinson | 2009-10-26 21:02:55 +0100 (lun., 26 oct. 2009) | 10 lines
  
  Merged revisions 75728 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75728 | mark.dickinson | 2009-10-26 19:59:23 +0000 (Mon, 26 Oct 2009) | 3 lines
    
    Use correct conversion specifier and length modifier when printing an
    integer of type off_t.  Also, don't assume that long long is available.
  ........
................
  r75732 | mark.dickinson | 2009-10-26 22:12:50 +0100 (lun., 26 oct. 2009) | 1 line
  
  Fix extra-long line;  also makes py3k match trunk here.
................
  r75733 | mark.dickinson | 2009-10-26 22:13:15 +0100 (lun., 26 oct. 2009) | 14 lines
  
  Blocked revisions 75730-75731 via svnmerge
  
  ........
    r75730 | mark.dickinson | 2009-10-26 21:09:09 +0000 (Mon, 26 Oct 2009) | 2 lines
    
    Issue #7117:  Backport missing pystrtod.h declarations from py3k.
  ........
    r75731 | mark.dickinson | 2009-10-26 21:11:20 +0000 (Mon, 26 Oct 2009) | 4 lines
    
    Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in
    floatobject.c.  Also, remove limitation on length of unicode inputs to
    float().
  ........
................
  r75737 | mark.dickinson | 2009-10-26 22:51:18 +0100 (lun., 26 oct. 2009) | 1 line
  
  Remove length limitation on string arguments to complex()
................
  r75738 | mark.dickinson | 2009-10-26 23:05:06 +0100 (lun., 26 oct. 2009) | 1 line
  
  Make sure memory is freed on error in complex_subtype_from_string.
................
  r75740 | mark.dickinson | 2009-10-26 23:29:02 +0100 (lun., 26 oct. 2009) | 10 lines
  
  Blocked revisions 75739 via svnmerge
  
  ........
    r75739 | mark.dickinson | 2009-10-26 22:28:14 +0000 (Mon, 26 Oct 2009) | 5 lines
    
    Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in
    complexobject.c.  Also remove length restriction on unicode inputs to
    the complex constructor.
  ........
................
  r75741 | mark.dickinson | 2009-10-26 23:48:32 +0100 (lun., 26 oct. 2009) | 2 lines
  
  Issue #7207:  Fix race condition in telnetlib test;  should stop test failures on OS X 10.6.
................
  r75744 | eric.smith | 2009-10-27 12:36:44 +0100 (mar., 27 oct. 2009) | 8 lines
  
  Blocked revisions 75743 via svnmerge
  
  ........
    r75743 | eric.smith | 2009-10-27 07:32:11 -0400 (Tue, 27 Oct 2009) | 1 line
    
    Issue 7117: Replace PyOS_ascii_strtod with PyOS_string_to_double in cPickle as part of short float repr.
  ........
................
  r75746 | eric.smith | 2009-10-27 13:13:06 +0100 (mar., 27 oct. 2009) | 8 lines
  
  Blocked revisions 75745 via svnmerge
  
  ........
    r75745 | eric.smith | 2009-10-27 08:12:44 -0400 (Tue, 27 Oct 2009) | 1 line
    
    Issue 7117: Replace PyOS_ascii_strtod with PyOS_string_to_double in stropmodule as part of short float repr.
  ........
................
  r75797 | georg.brandl | 2009-10-27 16:28:25 +0100 (mar., 27 oct. 2009) | 129 lines
  
  Merged revisions 75365,75394,75402-75403,75418,75459,75484,75592-75596,75600,75602-75607,75610-75613,75616-75617,75623,75627,75640,75647,75696,75795 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75365 | georg.brandl | 2009-10-11 22:16:16 +0200 (So, 11 Okt 2009) | 1 line
    
    Fix broken links found by "make linkcheck".  scipy.org seems to be done right now, so I could not verify links going there.
  ........
    r75394 | georg.brandl | 2009-10-13 20:10:59 +0200 (Di, 13 Okt 2009) | 1 line
    
    Fix markup.
  ........
    r75402 | georg.brandl | 2009-10-14 17:51:48 +0200 (Mi, 14 Okt 2009) | 1 line
    
    #7125: fix typo.
  ........
    r75403 | georg.brandl | 2009-10-14 17:57:46 +0200 (Mi, 14 Okt 2009) | 1 line
    
    #7126: os.environ changes *do* take effect in subprocesses started with os.system().
  ........
    r75418 | georg.brandl | 2009-10-14 20:48:32 +0200 (Mi, 14 Okt 2009) | 1 line
    
    #7116: str.join() takes an iterable.
  ........
    r75459 | georg.brandl | 2009-10-17 10:57:43 +0200 (Sa, 17 Okt 2009) | 1 line
    
    Fix refleaks in _ctypes PyCSimpleType_New, which fixes the refleak seen in test___all__.
  ........
    r75484 | georg.brandl | 2009-10-18 09:58:12 +0200 (So, 18 Okt 2009) | 1 line
    
    Fix missing word.
  ........
    r75592 | georg.brandl | 2009-10-22 09:05:48 +0200 (Do, 22 Okt 2009) | 1 line
    
    Fix punctuation.
  ........
    r75593 | georg.brandl | 2009-10-22 09:06:49 +0200 (Do, 22 Okt 2009) | 1 line
    
    Revert unintended change.
  ........
    r75594 | georg.brandl | 2009-10-22 09:56:02 +0200 (Do, 22 Okt 2009) | 1 line
    
    Fix markup.
  ........
    r75595 | georg.brandl | 2009-10-22 09:56:56 +0200 (Do, 22 Okt 2009) | 1 line
    
    Fix duplicate target.
  ........
    r75596 | georg.brandl | 2009-10-22 10:05:04 +0200 (Do, 22 Okt 2009) | 1 line
    
    Add a new directive marking up implementation details and start using it.
  ........
    r75600 | georg.brandl | 2009-10-22 13:01:46 +0200 (Do, 22 Okt 2009) | 1 line
    
    Make it more robust.
  ........
    r75602 | georg.brandl | 2009-10-22 13:28:06 +0200 (Do, 22 Okt 2009) | 1 line
    
    Document new directive.
  ........
    r75603 | georg.brandl | 2009-10-22 13:28:23 +0200 (Do, 22 Okt 2009) | 1 line
    
    Allow short form with text as argument.
  ........
    r75604 | georg.brandl | 2009-10-22 13:36:50 +0200 (Do, 22 Okt 2009) | 1 line
    
    Fix stylesheet for multi-paragraph impl-details.
  ........
    r75605 | georg.brandl | 2009-10-22 13:48:10 +0200 (Do, 22 Okt 2009) | 1 line
    
    Use "impl-detail" directive where applicable.
  ........
    r75606 | georg.brandl | 2009-10-22 17:00:06 +0200 (Do, 22 Okt 2009) | 1 line
    
    #6324: membership test tries iteration via __iter__.
  ........
    r75607 | georg.brandl | 2009-10-22 17:04:09 +0200 (Do, 22 Okt 2009) | 1 line
    
    #7088: document new functions in signal as Unix-only.
  ........
    r75610 | georg.brandl | 2009-10-22 17:27:24 +0200 (Do, 22 Okt 2009) | 1 line
    
    Reorder __slots__ fine print and add a clarification.
  ........
    r75611 | georg.brandl | 2009-10-22 17:42:32 +0200 (Do, 22 Okt 2009) | 1 line
    
    #7035: improve docs of the various <method>_errors() functions, and give them docstrings.
  ........
    r75612 | georg.brandl | 2009-10-22 17:52:15 +0200 (Do, 22 Okt 2009) | 1 line
    
    #7156: document curses as Unix-only.
  ........
    r75613 | georg.brandl | 2009-10-22 17:54:35 +0200 (Do, 22 Okt 2009) | 1 line
    
    #6977: getopt does not support optional option arguments.
  ........
    r75616 | georg.brandl | 2009-10-22 18:17:05 +0200 (Do, 22 Okt 2009) | 1 line
    
    Add proper references.
  ........
    r75617 | georg.brandl | 2009-10-22 18:20:55 +0200 (Do, 22 Okt 2009) | 1 line
    
    Make printout margin important.
  ........
    r75623 | georg.brandl | 2009-10-23 10:14:44 +0200 (Fr, 23 Okt 2009) | 1 line
    
    #7188: fix optionxform() docs.
  ........
    r75627 | fred.drake | 2009-10-23 15:04:51 +0200 (Fr, 23 Okt 2009) | 2 lines
    
    add further note about what's passed to optionxform
  ........
    r75640 | neil.schemenauer | 2009-10-23 21:58:17 +0200 (Fr, 23 Okt 2009) | 2 lines
    
    Improve some docstrings in the 'warnings' module.
  ........
    r75647 | georg.brandl | 2009-10-24 12:04:19 +0200 (Sa, 24 Okt 2009) | 1 line
    
    Fix markup.
  ........
    r75696 | georg.brandl | 2009-10-25 21:25:43 +0100 (So, 25 Okt 2009) | 1 line
    
    Fix a demo.
  ........
    r75795 | georg.brandl | 2009-10-27 16:10:22 +0100 (Di, 27 Okt 2009) | 1 line
    
    Fix a strange mis-edit.
  ........
................
  r75820 | antoine.pitrou | 2009-10-27 18:47:14 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75818 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75818 | antoine.pitrou | 2009-10-27 18:41:58 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Issue #7205: Fix a possible deadlock when using a BZ2File object from several threads at once.
  ........
................
  r75834 | eric.smith | 2009-10-27 19:47:34 +0100 (mar., 27 oct. 2009) | 8 lines
  
  Blocked revisions 75824 via svnmerge
  
  ........
    r75824 | eric.smith | 2009-10-27 14:33:14 -0400 (Tue, 27 Oct 2009) | 1 line
    
    Removed PyOS_ascii_atof from ast.c, as mentioned in issue 7117.
  ........
................
  r75836 | antoine.pitrou | 2009-10-27 19:49:23 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75826 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75826 | antoine.pitrou | 2009-10-27 19:36:47 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Suppress transient refleaks in test_asyncore
  ........
................
  r75839 | antoine.pitrou | 2009-10-27 19:52:30 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75838 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75838 | antoine.pitrou | 2009-10-27 19:50:52 +0100 (mar., 27 oct. 2009) | 3 lines
    
    (Hopefully) suppress transient refleaks in test_httpservers.
  ........
................
  r75843 | antoine.pitrou | 2009-10-27 20:25:57 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75842 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75842 | antoine.pitrou | 2009-10-27 20:23:56 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Fix transient refleak in test_sys.
  ........
................
  r75845 | antoine.pitrou | 2009-10-27 20:39:10 +0100 (mar., 27 oct. 2009) | 8 lines
  
  Blocked revisions 75844 via svnmerge
  
  ........
    r75844 | antoine.pitrou | 2009-10-27 20:36:44 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Suppress transient refleaks in test_file2k.
  ........
................
  r75847 | eric.smith | 2009-10-27 20:44:06 +0100 (mar., 27 oct. 2009) | 8 lines
  
  Blocked revisions 75846 via svnmerge
  
  ........
    r75846 | eric.smith | 2009-10-27 15:42:57 -0400 (Tue, 27 Oct 2009) | 1 line
    
    Removed PyOS_ascii_atof from marshal.c, as mentioned in issue 7117. Also brings it more in line with py3k.
  ........
................
  r75850 | antoine.pitrou | 2009-10-27 20:49:45 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75849 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75849 | antoine.pitrou | 2009-10-27 20:47:30 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Suppress transient refleaks in test_smtplib.
  ........
................
  r75852 | antoine.pitrou | 2009-10-27 21:05:26 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75851 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75851 | antoine.pitrou | 2009-10-27 21:02:23 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Suppress transient refleaks in test_threading.
  ........
................
  r75856 | antoine.pitrou | 2009-10-27 21:17:03 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75855 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75855 | antoine.pitrou | 2009-10-27 21:14:04 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Fix transient refleaks in test_urllib2_localnet.
  ........
................
  r75861 | antoine.pitrou | 2009-10-27 21:21:45 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75860 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75860 | antoine.pitrou | 2009-10-27 21:20:41 +0100 (mar., 27 oct. 2009) | 3 lines
    
    Try to fix transient refleaks in test_distutils.
  ........
................
  r75869 | georg.brandl | 2009-10-27 22:02:11 +0100 (mar., 27 oct. 2009) | 13 lines
  
  Merged revisions 75866-75867 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75866 | georg.brandl | 2009-10-27 21:52:02 +0100 (Di, 27 Okt 2009) | 1 line
    
    Add a regrtest option to re-run in verbose mode immediately after a test fails, and use that option on the buildbots.
  ........
    r75867 | georg.brandl | 2009-10-27 21:55:44 +0100 (Di, 27 Okt 2009) | 1 line
    
    Reformat the regrtest command-line option help and group the options into sections.
  ........
................
  r75870 | benjamin.peterson | 2009-10-27 22:14:50 +0100 (mar., 27 oct. 2009) | 1 line
  
  remove shadowing declartion
................
  r75873 | tarek.ziade | 2009-10-27 22:24:21 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75871 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75871 | tarek.ziade | 2009-10-27 22:20:27 +0100 (Tue, 27 Oct 2009) | 1 line
    
    Issue #7218: Fix test_site for win32
  ........
................
  r75876 | antoine.pitrou | 2009-10-27 22:32:38 +0100 (mar., 27 oct. 2009) | 10 lines
  
  Merged revisions 75874 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75874 | antoine.pitrou | 2009-10-27 22:27:24 +0100 (mar., 27 oct. 2009) | 4 lines
    
    Reduce the probability of refleaks in test_socketserver.
    Not completely suppressed though, see issue #7222.
  ........
................
  r75877 | georg.brandl | 2009-10-27 22:37:48 +0100 (mar., 27 oct. 2009) | 1 line
  
  Only declare variable when it's used.
................
  r75881 | mark.dickinson | 2009-10-27 22:49:48 +0100 (mar., 27 oct. 2009) | 10 lines
  
  Merged revisions 75879 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75879 | mark.dickinson | 2009-10-27 21:48:20 +0000 (Tue, 27 Oct 2009) | 3 lines
    
    Silence gcc warnings when trying to print an off_t using "lld", on platforms
    where off_t has type long (e.g., 64-bit Linux).
  ........
................
  r75885 | mark.dickinson | 2009-10-27 23:12:20 +0100 (mar., 27 oct. 2009) | 9 lines
  
  Merged revisions 75883 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75883 | mark.dickinson | 2009-10-27 22:09:33 +0000 (Tue, 27 Oct 2009) | 1 line
    
    Test long inputs to float
  ........
................
  r75889 | georg.brandl | 2009-10-28 00:00:28 +0100 (mer., 28 oct. 2009) | 9 lines
  
  Merged revisions 75887 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75887 | georg.brandl | 2009-10-27 23:56:09 +0100 (Di, 27 Okt 2009) | 1 line
    
    Make sure every run of test_intern() interns a new string, otherwise that test fails e.g. when some other test in test_builtin fails and it is rerun in verbose mode.
  ........
................
  r75890 | mark.dickinson | 2009-10-28 00:00:56 +0100 (mer., 28 oct. 2009) | 1 line
  
  Remove extra blank line accidentally introduced in r75885
................
  r75895 | tarek.ziade | 2009-10-28 00:12:01 +0100 (mer., 28 oct. 2009) | 9 lines
  
  Merged revisions 75893 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75893 | tarek.ziade | 2009-10-28 00:06:10 +0100 (Wed, 28 Oct 2009) | 1 line
    
    Fixed #1180: Option to ignore ~/.pydistutils.cfg in Distutils
  ........
................
  r75903 | tarek.ziade | 2009-10-28 07:48:27 +0100 (mer., 28 oct. 2009) | 9 lines
  
  Merged revisions 75901 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75901 | tarek.ziade | 2009-10-28 07:45:18 +0100 (Wed, 28 Oct 2009) | 1 line
    
    removed spurious spaces
  ........
................
  r75907 | mark.dickinson | 2009-10-28 08:25:03 +0100 (mer., 28 oct. 2009) | 9 lines
  
  Merged revisions 75905 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75905 | mark.dickinson | 2009-10-28 07:23:49 +0000 (Wed, 28 Oct 2009) | 1 line
    
    Replace long long with PY_LONG_LONG
  ........
................
  r75911 | mark.dickinson | 2009-10-28 08:49:26 +0100 (mer., 28 oct. 2009) | 9 lines
  
  Merged revisions 75909 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75909 | mark.dickinson | 2009-10-28 07:47:32 +0000 (Wed, 28 Oct 2009) | 1 line
    
    Fix format specifier for MSVC
  ........
................
  r75914 | eric.smith | 2009-10-28 09:46:43 +0100 (mer., 28 oct. 2009) | 8 lines
  
  Blocked revisions 75913 via svnmerge
  
  ........
    r75913 | eric.smith | 2009-10-28 04:44:37 -0400 (Wed, 28 Oct 2009) | 1 line
    
    Issue 7117: Replace PyOS_ascii_strtod with PyOS_string_to_double in _json.c as part of short float repr. Change made after consulting with Bob Ippolito. This completes the removal of calls to PyOS_ascii_strtod.
  ........
................


Modified:
   sandbox/trunk/newgil/   (props changed)
   sandbox/trunk/newgil/Demo/comparisons/sortingtest.py
   sandbox/trunk/newgil/Doc/ACKS.txt
   sandbox/trunk/newgil/Doc/distutils/apiref.rst
   sandbox/trunk/newgil/Doc/distutils/builtdist.rst
   sandbox/trunk/newgil/Doc/documenting/markup.rst
   sandbox/trunk/newgil/Doc/faq/design.rst
   sandbox/trunk/newgil/Doc/faq/extending.rst
   sandbox/trunk/newgil/Doc/faq/general.rst
   sandbox/trunk/newgil/Doc/faq/gui.rst
   sandbox/trunk/newgil/Doc/faq/library.rst
   sandbox/trunk/newgil/Doc/faq/programming.rst
   sandbox/trunk/newgil/Doc/faq/windows.rst
   sandbox/trunk/newgil/Doc/howto/unicode.rst
   sandbox/trunk/newgil/Doc/howto/webservers.rst
   sandbox/trunk/newgil/Doc/install/index.rst
   sandbox/trunk/newgil/Doc/library/codecs.rst
   sandbox/trunk/newgil/Doc/library/configparser.rst
   sandbox/trunk/newgil/Doc/library/curses.rst
   sandbox/trunk/newgil/Doc/library/datetime.rst
   sandbox/trunk/newgil/Doc/library/functions.rst
   sandbox/trunk/newgil/Doc/library/getopt.rst
   sandbox/trunk/newgil/Doc/library/inspect.rst
   sandbox/trunk/newgil/Doc/library/mailbox.rst
   sandbox/trunk/newgil/Doc/library/math.rst
   sandbox/trunk/newgil/Doc/library/msilib.rst
   sandbox/trunk/newgil/Doc/library/os.rst
   sandbox/trunk/newgil/Doc/library/othergui.rst
   sandbox/trunk/newgil/Doc/library/platform.rst
   sandbox/trunk/newgil/Doc/library/signal.rst
   sandbox/trunk/newgil/Doc/library/stdtypes.rst
   sandbox/trunk/newgil/Doc/library/sys.rst
   sandbox/trunk/newgil/Doc/library/types.rst
   sandbox/trunk/newgil/Doc/library/weakref.rst
   sandbox/trunk/newgil/Doc/reference/datamodel.rst
   sandbox/trunk/newgil/Doc/reference/executionmodel.rst
   sandbox/trunk/newgil/Doc/reference/expressions.rst
   sandbox/trunk/newgil/Doc/reference/simple_stmts.rst
   sandbox/trunk/newgil/Doc/tools/sphinxext/pyspecific.py
   sandbox/trunk/newgil/Doc/tools/sphinxext/static/basic.css
   sandbox/trunk/newgil/Doc/tutorial/index.rst
   sandbox/trunk/newgil/Doc/using/cmdline.rst
   sandbox/trunk/newgil/Doc/using/windows.rst
   sandbox/trunk/newgil/Doc/whatsnew/2.0.rst
   sandbox/trunk/newgil/Doc/whatsnew/2.2.rst
   sandbox/trunk/newgil/Doc/whatsnew/2.3.rst
   sandbox/trunk/newgil/Doc/whatsnew/2.4.rst
   sandbox/trunk/newgil/Doc/whatsnew/2.6.rst
   sandbox/trunk/newgil/Lib/distutils/core.py
   sandbox/trunk/newgil/Lib/distutils/dist.py
   sandbox/trunk/newgil/Lib/distutils/errors.py
   sandbox/trunk/newgil/Lib/distutils/tests/test_dist.py
   sandbox/trunk/newgil/Lib/test/regrtest.py
   sandbox/trunk/newgil/Lib/test/test_asyncore.py
   sandbox/trunk/newgil/Lib/test/test_bz2.py
   sandbox/trunk/newgil/Lib/test/test_complex.py
   sandbox/trunk/newgil/Lib/test/test_distutils.py
   sandbox/trunk/newgil/Lib/test/test_float.py
   sandbox/trunk/newgil/Lib/test/test_httpservers.py
   sandbox/trunk/newgil/Lib/test/test_site.py
   sandbox/trunk/newgil/Lib/test/test_smtplib.py
   sandbox/trunk/newgil/Lib/test/test_socketserver.py
   sandbox/trunk/newgil/Lib/test/test_sys.py
   sandbox/trunk/newgil/Lib/test/test_telnetlib.py
   sandbox/trunk/newgil/Lib/test/test_threading.py
   sandbox/trunk/newgil/Lib/test/test_urllib2_localnet.py
   sandbox/trunk/newgil/Lib/threading.py
   sandbox/trunk/newgil/Lib/warnings.py
   sandbox/trunk/newgil/Makefile.pre.in
   sandbox/trunk/newgil/Misc/NEWS
   sandbox/trunk/newgil/Modules/_ctypes/_ctypes.c
   sandbox/trunk/newgil/Modules/_io/_iomodule.h
   sandbox/trunk/newgil/Modules/_io/bufferedio.c
   sandbox/trunk/newgil/Modules/_localemodule.c
   sandbox/trunk/newgil/Modules/_testcapimodule.c
   sandbox/trunk/newgil/Modules/bz2module.c
   sandbox/trunk/newgil/Modules/readline.c
   sandbox/trunk/newgil/Objects/complexobject.c
   sandbox/trunk/newgil/Objects/floatobject.c
   sandbox/trunk/newgil/Objects/unicodeobject.c
   sandbox/trunk/newgil/Python/codecs.c
   sandbox/trunk/newgil/configure
   sandbox/trunk/newgil/configure.in
   sandbox/trunk/newgil/pyconfig.h.in

Modified: sandbox/trunk/newgil/Demo/comparisons/sortingtest.py
==============================================================================
--- sandbox/trunk/newgil/Demo/comparisons/sortingtest.py	(original)
+++ sandbox/trunk/newgil/Demo/comparisons/sortingtest.py	Wed Oct 28 11:50:44 2009
@@ -24,7 +24,6 @@
 # - Handles blank input lines correctly
 
 import re
-import string
 import sys
 
 def main():
@@ -32,18 +31,13 @@
     def makekey(item, prog=prog):
         match = prog.match(item)
         if match:
-            var, num = match.group(1, 2)
-            return string.atoi(num), var
+            var, num = match.groups()
+            return int(num), var
         else:
             # Bad input -- pretend it's a var with value 0
             return 0, item
-    while 1:
-        line = sys.stdin.readline()
-        if not line:
-            break
-        items = line.split()
-        items = list(map(makekey, items))
-        items.sort()
+    for line in sys.stdin:
+        items = sorted(makekey(item) for item in line.split())
         for num, var in items:
             print("%s=%s" % (var, num), end=' ')
         print()

Modified: sandbox/trunk/newgil/Doc/ACKS.txt
==============================================================================
--- sandbox/trunk/newgil/Doc/ACKS.txt	(original)
+++ sandbox/trunk/newgil/Doc/ACKS.txt	Wed Oct 28 11:50:44 2009
@@ -208,6 +208,7 @@
    * Mats Wichmann
    * Gerry Wiener
    * Timothy Wild
+   * Paul Winkler
    * Collin Winter
    * Blake Winton
    * Dan Wolfe

Modified: sandbox/trunk/newgil/Doc/distutils/apiref.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/distutils/apiref.rst	(original)
+++ sandbox/trunk/newgil/Doc/distutils/apiref.rst	Wed Oct 28 11:50:44 2009
@@ -1976,9 +1976,9 @@
 Subclasses of :class:`Command` must define the following methods.
 
 
-.. method:: Command.initialize_options()(S)
+.. method:: Command.initialize_options()
 
-   et default values for all the options that this command supports.  Note that
+   Set default values for all the options that this command supports.  Note that
    these defaults may be overridden by other commands, by the setup script, by
    config files, or by the command-line.  Thus, this is not the place to code
    dependencies between options; generally, :meth:`initialize_options`

Modified: sandbox/trunk/newgil/Doc/distutils/builtdist.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/distutils/builtdist.rst	(original)
+++ sandbox/trunk/newgil/Doc/distutils/builtdist.rst	Wed Oct 28 11:50:44 2009
@@ -241,7 +241,8 @@
 configuration file, :file:`setup.cfg`\ ---see section :ref:`setup-config`.  If
 you distribute or package many Python module distributions, you might want to
 put options that apply to all of them in your personal Distutils configuration
-file (:file:`~/.pydistutils.cfg`).
+file (:file:`~/.pydistutils.cfg`).  If you want to temporarily disable
+this file, you can pass the --no-user-cfg option to setup.py.
 
 There are three steps to building a binary RPM package, all of which are
 handled automatically by the Distutils:

Modified: sandbox/trunk/newgil/Doc/documenting/markup.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/documenting/markup.rst	(original)
+++ sandbox/trunk/newgil/Doc/documenting/markup.rst	Wed Oct 28 11:50:44 2009
@@ -626,6 +626,24 @@
 
 --------------
 
+.. describe:: impl-detail
+
+   This directive is used to mark CPython-specific information.  Use either with
+   a block content or a single sentence as an argument, i.e. either ::
+
+      .. impl-detail::
+
+         This describes some implementation detail.
+
+         More explanation.
+
+   or ::
+
+      .. impl-detail:: This shortly mentions an implementation detail.
+
+   "\ **CPython implementation detail:**\ " is automatically prepended to the
+   content.
+
 .. describe:: seealso
 
    Many sections include a list of references to module documentation or

Modified: sandbox/trunk/newgil/Doc/faq/design.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/faq/design.rst	(original)
+++ sandbox/trunk/newgil/Doc/faq/design.rst	Wed Oct 28 11:50:44 2009
@@ -396,12 +396,13 @@
 ``x+1``.
 
 Several projects described in the Python newsgroup or at past `Python
-conferences <http://python.org/community/workshops/>`_ have shown that this approach is feasible,
-although the speedups reached so far are only modest (e.g. 2x).  Jython uses the
-same strategy for compiling to Java bytecode.  (Jim Hugunin has demonstrated
-that in combination with whole-program analysis, speedups of 1000x are feasible
-for small demo programs.  See the proceedings from the `1997 Python conference
-<http://python.org/community/workshops/1997-10/proceedings/>`_ for more information.)
+conferences <http://python.org/community/workshops/>`_ have shown that this
+approach is feasible, although the speedups reached so far are only modest
+(e.g. 2x).  Jython uses the same strategy for compiling to Java bytecode.  (Jim
+Hugunin has demonstrated that in combination with whole-program analysis,
+speedups of 1000x are feasible for small demo programs.  See the proceedings
+from the `1997 Python conference
+<http://python.org/workshops/1997-10/proceedings/>`_ for more information.)
 
 Internally, Python source code is always translated into a bytecode
 representation, and this bytecode is then executed by the Python virtual

Modified: sandbox/trunk/newgil/Doc/faq/extending.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/faq/extending.rst	(original)
+++ sandbox/trunk/newgil/Doc/faq/extending.rst	Wed Oct 28 11:50:44 2009
@@ -48,7 +48,7 @@
 If you need to interface to some C or C++ library for which no Python extension
 currently exists, you can try wrapping the library's data types and functions
 with a tool such as `SWIG <http://www.swig.org>`_.  `SIP
-<http://www.riverbankcomputing.co.uk/sip/>`_, `CXX
+<http://www.riverbankcomputing.co.uk/software/sip/>`__, `CXX
 <http://cxx.sourceforge.net/>`_ `Boost
 <http://www.boost.org/libs/python/doc/index.html>`_, or `Weave
 <http://www.scipy.org/site_content/weave>`_ are also alternatives for wrapping

Modified: sandbox/trunk/newgil/Doc/faq/general.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/faq/general.rst	(original)
+++ sandbox/trunk/newgil/Doc/faq/general.rst	Wed Oct 28 11:50:44 2009
@@ -164,9 +164,10 @@
 several useful pieces of freely distributable software.  The source will compile
 and run out of the box on most UNIX platforms.
 
-Consult the `Developer FAQ
-<http://www.python.org/dev/devfaq.html#subversion-svn>`__ for more information
-on getting the source code and compiling it.
+.. XXX update link once the dev faq is relocated
+
+Consult the `Developer FAQ <http://www.python.org/dev/faq/>`__ for more
+information on getting the source code and compiling it.
 
 
 How do I get documentation on Python?
@@ -176,7 +177,7 @@
 
 The standard documentation for the current stable version of Python is available
 at http://docs.python.org/.  PDF, plain text, and downloadable HTML versions are
-also available at http://docs.python.org/download/.
+also available at http://docs.python.org/download.html.
 
 The documentation is written in reStructuredText and processed by `the Sphinx
 documentation tool <http://sphinx.pocoo.org/>`__.  The reStructuredText source
@@ -220,8 +221,10 @@
 newsgroups and on the Python home page at http://www.python.org/; an RSS feed of
 news is available.
 
+.. XXX update link once the dev faq is relocated
+
 You can also access the development version of Python through Subversion.  See
-http://www.python.org/dev/devfaq.html#subversion-svn for details.
+http://www.python.org/dev/faq/ for details.
 
 
 How do I submit bug reports and patches for Python?

Modified: sandbox/trunk/newgil/Doc/faq/gui.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/faq/gui.rst	(original)
+++ sandbox/trunk/newgil/Doc/faq/gui.rst	Wed Oct 28 11:50:44 2009
@@ -45,11 +45,12 @@
 '''
 
 There are bindings available for the Qt toolkit (`PyQt
-<http://www.riverbankcomputing.co.uk/pyqt/>`_) and for KDE (PyKDE).  If you're
-writing open source software, you don't need to pay for PyQt, but if you want to
-write proprietary applications, you must buy a PyQt license from `Riverbank
-Computing <http://www.riverbankcomputing.co.uk>`_ and a Qt license from
-`Trolltech <http://www.trolltech.com>`_.
+<http://www.riverbankcomputing.co.uk/software/pyqt/>`_) and for KDE (PyKDE).  If
+you're writing open source software, you don't need to pay for PyQt, but if you
+want to write proprietary applications, you must buy a PyQt license from
+`Riverbank Computing <http://www.riverbankcomputing.co.uk>`_ and (up to Qt 4.4;
+Qt 4.5 upwards is licensed under the LGPL license) a Qt license from `Trolltech
+<http://www.trolltech.com>`_.
 
 Gtk+
 ''''

Modified: sandbox/trunk/newgil/Doc/faq/library.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/faq/library.rst	(original)
+++ sandbox/trunk/newgil/Doc/faq/library.rst	Wed Oct 28 11:50:44 2009
@@ -16,14 +16,10 @@
 standard library module.  (Eventually you'll learn what's in the standard
 library and will able to skip this step.)
 
-Search the `Python Package Index <http://pypi.python.org/pypi>`_.
-
-Next, check the `Vaults of Parnassus <http://www.vex.net/parnassus/>`_, an older
-index of packages.
-
-Finally, try `Google <http://www.google.com>`_ or other Web search engine.
-Searching for "Python" plus a keyword or two for your topic of interest will
-usually find something helpful.
+For third-party packages, search the `Python Package Index
+<http://pypi.python.org/pypi>`_ or try `Google <http://www.google.com>`_ or
+another Web search engine.  Searching for "Python" plus a keyword or two for
+your topic of interest will usually find something helpful.
 
 
 Where is the math.py (socket.py, regex.py, etc.) source file?
@@ -181,11 +177,10 @@
 How do I create documentation from doc strings?
 -----------------------------------------------
 
-.. XXX mention Sphinx/epydoc
-
 The :mod:`pydoc` module can create HTML from the doc strings in your Python
-source code.  An alternative is `pythondoc
-<http://starship.python.net/crew/danilo/pythondoc/>`_.
+source code.  An alternative for creating API documentation purely from
+docstrings is `epydoc <http://epydoc.sf.net/>`_.  `Sphinx
+<http://sphinx.pocoo.org>`_ can also include docstring content.
 
 
 How do I get a single keypress at a time?
@@ -237,7 +232,7 @@
 low-level primitives provided by the :mod:`_thread` module.
 
 Aahz has a set of slides from his threading tutorial that are helpful; see
-http://starship.python.net/crew/aahz/OSCON2001/.
+http://www.pythoncraft.com/OSCON2001/.
 
 
 None of my threads seem to run: why?
@@ -397,6 +392,7 @@
 ------------------------------------------------
 
 .. XXX mention multiprocessing
+.. XXX link to dbeazley's talk about GIL?
 
 The Global Interpreter Lock (GIL) is often seen as a hindrance to Python's
 deployment on high-end multiprocessor server machines, because a multi-threaded
@@ -583,7 +579,7 @@
 ("ptys") instead of pipes. Or you can use a Python interface to Don Libes'
 "expect" library.  A Python extension that interfaces to expect is called "expy"
 and available from http://expectpy.sourceforge.net.  A pure Python solution that
-works like expect is ` pexpect <http://pexpect.sourceforge.net>`_.
+works like expect is `pexpect <http://pypi.python.org/pypi/pexpect/>`_.
 
 
 How do I access the serial (RS232) port?

Modified: sandbox/trunk/newgil/Doc/faq/programming.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/faq/programming.rst	(original)
+++ sandbox/trunk/newgil/Doc/faq/programming.rst	Wed Oct 28 11:50:44 2009
@@ -67,8 +67,8 @@
 PyChecker performs, Pylint offers some additional features such as checking line
 length, whether variable names are well-formed according to your coding
 standard, whether declared interfaces are fully implemented, and more.
-http://www.logilab.org/projects/pylint/documentation provides a full list of
-Pylint's features.
+http://www.logilab.org/card/pylint_manual provides a full list of Pylint's
+features.
 
 
 How can I create a stand-alone binary from a Python script?
@@ -1141,7 +1141,7 @@
    A = [[None] * w for i in range(h)]
 
 Or, you can use an extension that provides a matrix datatype; `Numeric Python
-<http://www.pfdubois.com/numpy/>`_ is the best known.
+<http://numpy.scipy.org/>`_ is the best known.
 
 
 How do I apply a method to a sequence of objects?

Modified: sandbox/trunk/newgil/Doc/faq/windows.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/faq/windows.rst	(original)
+++ sandbox/trunk/newgil/Doc/faq/windows.rst	Wed Oct 28 11:50:44 2009
@@ -389,10 +389,10 @@
     .py :REG_SZ: c:\<path to python>\python.exe -u %s %s
 
 This line will allow you to call your script with a simple reference like:
-http://yourserver/scripts/yourscript.py provided "scripts" is an "executable"
-directory for your server (which it usually is by default).  The "-u" flag
-specifies unbuffered and binary mode for stdin - needed when working with binary
-data.
+``http://yourserver/scripts/yourscript.py`` provided "scripts" is an
+"executable" directory for your server (which it usually is by default).  The
+:option:`-u` flag specifies unbuffered and binary mode for stdin - needed when
+working with binary data.
 
 In addition, it is recommended that using ".py" may not be a good idea for the
 file extensions when used in this context (you might want to reserve ``*.py``
@@ -517,7 +517,7 @@
 There is a bug in Win9x that prevents os.popen/win32pipe.popen* from
 working. The good news is there is a way to work around this problem.  The
 Microsoft Knowledge Base article that you need to lookup is: Q150956. You will
-find links to the knowledge base at: http://www.microsoft.com/kb.
+find links to the knowledge base at: http://support.microsoft.com/.
 
 
 PyRun_SimpleFile() crashes on Windows but not on Unix; why?
@@ -604,4 +604,4 @@
    we can't fix it).
 
 David A Burton has written a little program to fix this.  Go to
-http://www.burtonsys.com/download.html and click on "ctl3dfix.zip".
+http://www.burtonsys.com/downloads.html and click on "ctl3dfix.zip".

Modified: sandbox/trunk/newgil/Doc/howto/unicode.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/howto/unicode.rst	(original)
+++ sandbox/trunk/newgil/Doc/howto/unicode.rst	Wed Oct 28 11:50:44 2009
@@ -403,7 +403,7 @@
 from the above output, ``'Ll'`` means 'Letter, lowercase', ``'No'`` means
 "Number, other", ``'Mn'`` is "Mark, nonspacing", and ``'So'`` is "Symbol,
 other".  See
-<http://www.unicode.org/Public/UNIDATA/UCD.html#General_Category_Values> for a
+<http://unicode.org/Public/5.1.0/ucd/UCD.html#General_Category_Values> for a
 list of category codes.
 
 References

Modified: sandbox/trunk/newgil/Doc/howto/webservers.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/howto/webservers.rst	(original)
+++ sandbox/trunk/newgil/Doc/howto/webservers.rst	Wed Oct 28 11:50:44 2009
@@ -270,8 +270,7 @@
 * lighttpd ships its own `FastCGI module
   <http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI>`_ as well as an `SCGI
   module <http://trac.lighttpd.net/trac/wiki/Docs%3AModSCGI>`_.
-* nginx also supports `FastCGI
-  <http://wiki.codemongers.com/NginxSimplePythonFCGI>`_.
+* nginx also supports `FastCGI <http://wiki.nginx.org/NginxSimplePythonFCGI>`_.
 
 Once you have installed and configured the module, you can test it with the
 following WSGI-application::
@@ -525,7 +524,7 @@
 informations on a web server.
 
 Often relational database engines like `MySQL <http://www.mysql.com/>`_ or
-`PostgreSQL <http://http://www.postgresql.org/>`_ are used due to their good
+`PostgreSQL <http://www.postgresql.org/>`_ are used due to their good
 performance handling very large databases consisting of up to millions of
 entries.  These are *queried* using a language called `SQL
 <http://en.wikipedia.org/wiki/SQL>`_.  Python programmers in general do not like
@@ -629,7 +628,7 @@
 It has a big, international community which has created many sites using Django.
 There are also quite a lot of add-on projects which extend Django's normal
 functionality.  This is partly due to Django's well written `online
-documentation <http://doc.djangoproject.com/>`_ and the `Django book
+documentation <http://docs.djangoproject.com/>`_ and the `Django book
 <http://www.djangobook.com/>`_.
 
 

Modified: sandbox/trunk/newgil/Doc/install/index.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/install/index.rst	(original)
+++ sandbox/trunk/newgil/Doc/install/index.rst	Wed Oct 28 11:50:44 2009
@@ -691,6 +691,9 @@
 | local        | :file:`setup.cfg`                               | \(3)  |
 +--------------+-------------------------------------------------+-------+
 
+On all platforms, the "personal" file can be temporarily disabled by
+passing the `--no-user-cfg` option.
+
 Notes:
 
 (1)
@@ -937,7 +940,8 @@
 These compilers require some special libraries. This task is more complex than
 for Borland's C++, because there is no program to convert the library.  First
 you have to create a list of symbols which the Python DLL exports. (You can find
-a good program for this task at http://www.emmestech.com/software/cygwin/pexports-0.43/download_pexports.html)
+a good program for this task at
+http://www.emmestech.com/software/pexports-0.43/download_pexports.html).
 
 .. I don't understand what the next line means. --amk
 .. (inclusive the references on data structures.)

Modified: sandbox/trunk/newgil/Doc/library/codecs.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/codecs.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/codecs.rst	Wed Oct 28 11:50:44 2009
@@ -53,7 +53,7 @@
    *incrementalencoder* and *incrementaldecoder*: These have to be factory
    functions providing the following interface:
 
-   ``factory(errors='strict')``
+      ``factory(errors='strict')``
 
    The factory functions must return objects providing the interfaces defined by
    the base classes :class:`IncrementalEncoder` and :class:`IncrementalDecoder`,
@@ -62,21 +62,25 @@
    *streamreader* and *streamwriter*: These have to be factory functions providing
    the following interface:
 
-   ``factory(stream, errors='strict')``
+      ``factory(stream, errors='strict')``
 
    The factory functions must return objects providing the interfaces defined by
    the base classes :class:`StreamWriter` and :class:`StreamReader`, respectively.
    Stream codecs can maintain state.
 
-   Possible values for errors are ``'strict'`` (raise an exception in case of an
-   encoding error), ``'replace'`` (replace malformed data with a suitable
-   replacement marker, such as ``'?'``), ``'ignore'`` (ignore malformed data and
-   continue without further notice), ``'xmlcharrefreplace'`` (replace with the
-   appropriate XML character reference (for encoding only)),
-   ``'backslashreplace'`` (replace with backslashed escape sequences (for
-   encoding only)), ``'surrogateescape'`` (replace with surrogate U+DCxx, see
-   :pep:`383`) as well as any other error handling name defined via
-   :func:`register_error`.
+   Possible values for errors are
+
+   * ``'strict'``: raise an exception in case of an encoding error
+   * ``'replace'``: replace malformed data with a suitable replacement marker,
+     such as ``'?'`` or ``'\ufffd'``
+   * ``'ignore'``: ignore malformed data and continue without further notice
+   * ``'xmlcharrefreplace'``: replace with the appropriate XML character
+     reference (for encoding only)
+   * ``'backslashreplace'``: replace with backslashed escape sequences (for
+     encoding only
+   * ``'surrogateescape'``: replace with surrogate U+DCxx, see :pep:`383`
+
+   as well as any other error handling name defined via :func:`register_error`.
 
    In case a search function cannot find a given encoding, it should return
    ``None``.
@@ -173,27 +177,33 @@
 
 .. function:: strict_errors(exception)
 
-   Implements the ``strict`` error handling.
+   Implements the ``strict`` error handling: each encoding or decoding error
+   raises a :exc:`UnicodeError`.
 
 
 .. function:: replace_errors(exception)
 
-   Implements the ``replace`` error handling.
+   Implements the ``replace`` error handling: malformed data is replaced with a
+   suitable replacement character such as ``'?'`` in bytestrings and
+   ``'\ufffd'`` in Unicode strings.
 
 
 .. function:: ignore_errors(exception)
 
-   Implements the ``ignore`` error handling.
+   Implements the ``ignore`` error handling: malformed data is ignored and
+   encoding or decoding is continued without further notice.
 
 
 .. function:: xmlcharrefreplace_errors(exception)
 
-   Implements the ``xmlcharrefreplace`` error handling.
+   Implements the ``xmlcharrefreplace`` error handling (for encoding only): the
+   unencodable character is replaced by an appropriate XML character reference.
 
 
 .. function:: backslashreplace_errors(exception)
 
-   Implements the ``backslashreplace`` error handling.
+   Implements the ``backslashreplace`` error handling (for encoding only): the
+   unencodable character is replaced by a backslashed escape sequence.
 
 To simplify working with encoded files or stream, the module also defines these
 utility functions:

Modified: sandbox/trunk/newgil/Doc/library/configparser.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/configparser.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/configparser.rst	Wed Oct 28 11:50:44 2009
@@ -301,12 +301,23 @@
 
 .. method:: RawConfigParser.optionxform(option)
 
-   Transforms the option name *option* as found in an input file or as passed in by
-   client code to the form that should be used in the internal structures.  The
-   default implementation returns a lower-case version of *option*; subclasses may
-   override this or client code can set an attribute of this name on instances to
-   affect this behavior.  Setting this to :func:`str`, for example, would make
-   option names case sensitive.
+   Transforms the option name *option* as found in an input file or as passed in
+   by client code to the form that should be used in the internal structures.
+   The default implementation returns a lower-case version of *option*;
+   subclasses may override this or client code can set an attribute of this name
+   on instances to affect this behavior.
+
+   You don't necessarily need to subclass a ConfigParser to use this method, you
+   can also re-set it on an instance, to a function that takes a string
+   argument.  Setting it to ``str``, for example, would make option names case
+   sensitive::
+
+      cfgparser = ConfigParser()
+      ...
+      cfgparser.optionxform = str
+
+   Note that when reading configuration files, whitespace around the
+   option names are stripped before :meth:`optionxform` is called.
 
 
 .. _configparser-objects:

Modified: sandbox/trunk/newgil/Doc/library/curses.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/curses.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/curses.rst	Wed Oct 28 11:50:44 2009
@@ -4,10 +4,10 @@
 .. module:: curses
    :synopsis: An interface to the curses library, providing portable
               terminal handling.
+   :platform: Unix
 .. sectionauthor:: Moshe Zadka <moshez at zadka.site.co.il>
 .. sectionauthor:: Eric Raymond <esr at thyrsus.com>
 
-
 The :mod:`curses` module provides an interface to the curses library, the
 de-facto standard for portable advanced terminal handling.
 

Modified: sandbox/trunk/newgil/Doc/library/datetime.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/datetime.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/datetime.rst	Wed Oct 28 11:50:44 2009
@@ -233,7 +233,7 @@
 |                                | (-*t1.days*, -*t1.seconds*,                   |
 |                                | -*t1.microseconds*), and to *t1*\* -1. (1)(4) |
 +--------------------------------+-----------------------------------------------+
-| ``abs(t)``                     | equivalent to +*t* when ``t.days >= 0``, and  |
+| ``abs(t)``                     | equivalent to +\ *t* when ``t.days >= 0``, and|
 |                                | to -*t* when ``t.days < 0``. (2)              |
 +--------------------------------+-----------------------------------------------+
 

Modified: sandbox/trunk/newgil/Doc/library/functions.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/functions.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/functions.rst	Wed Oct 28 11:50:44 2009
@@ -499,8 +499,10 @@
 
    Return the "identity" of an object.  This is an integer which
    is guaranteed to be unique and constant for this object during its lifetime.
-   Two objects with non-overlapping lifetimes may have the same :func:`id` value.
-   (Implementation note: this is the address of the object.)
+   Two objects with non-overlapping lifetimes may have the same :func:`id`
+   value.
+
+   .. impl-detail:: This is the address of the object.
 
 
 .. function:: input([prompt])

Modified: sandbox/trunk/newgil/Doc/library/getopt.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/getopt.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/getopt.rst	Wed Oct 28 11:50:44 2009
@@ -36,12 +36,13 @@
    *longopts*, if specified, must be a list of strings with the names of the
    long options which should be supported.  The leading ``'--'`` characters
    should not be included in the option name.  Long options which require an
-   argument should be followed by an equal sign (``'='``).  To accept only long
-   options, *shortopts* should be an empty string.  Long options on the command line
-   can be recognized so long as they provide a prefix of the option name that
-   matches exactly one of the accepted options.  For example, if *longopts* is
-   ``['foo', 'frob']``, the option :option:`--fo` will match as :option:`--foo`,
-   but :option:`--f` will not match uniquely, so :exc:`GetoptError` will be raised.
+   argument should be followed by an equal sign (``'='``).  Optional arguments
+   are not supported.  To accept only long options, *shortopts* should be an
+   empty string.  Long options on the command line can be recognized so long as
+   they provide a prefix of the option name that matches exactly one of the
+   accepted options.  For example, if *longopts* is ``['foo', 'frob']``, the
+   option :option:`--fo` will match as :option:`--foo`, but :option:`--f` will
+   not match uniquely, so :exc:`GetoptError` will be raised.
 
    The return value consists of two elements: the first is a list of ``(option,
    value)`` pairs; the second is the list of program arguments left after the

Modified: sandbox/trunk/newgil/Doc/library/inspect.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/inspect.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/inspect.rst	Wed Oct 28 11:50:44 2009
@@ -290,18 +290,22 @@
 
    Return true if the object is a getset descriptor.
 
-   getsets are attributes defined in extension modules via ``PyGetSetDef``
-   structures.  For Python implementations without such types, this method will
-   always return ``False``.
+   .. impl-detail::
+
+      getsets are attributes defined in extension modules via
+      :ctype:`PyGetSetDef` structures.  For Python implementations without such
+      types, this method will always return ``False``.
 
 
 .. function:: ismemberdescriptor(object)
 
    Return true if the object is a member descriptor.
 
-   Member descriptors are attributes defined in extension modules via
-   ``PyMemberDef`` structures.  For Python implementations without such types,
-   this method will always return ``False``.
+   .. impl-detail::
+
+      Member descriptors are attributes defined in extension modules via
+      :ctype:`PyMemberDef` structures.  For Python implementations without such
+      types, this method will always return ``False``.
 
 
 .. _inspect-source:
@@ -508,10 +512,12 @@
 
    Return the frame object for the caller's stack frame.
 
-   This function relies on Python stack frame support in the interpreter, which
-   isn't guaranteed to exist in all implementations of Python. If running in
-   an implementation without Python stack frame support this function returns
-   ``None``.
+   .. impl-detail::
+
+      This function relies on Python stack frame support in the interpreter,
+      which isn't guaranteed to exist in all implementations of Python.  If
+      running in an implementation without Python stack frame support this
+      function returns ``None``.
 
 
 .. function:: stack(context=1)

Modified: sandbox/trunk/newgil/Doc/library/mailbox.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/mailbox.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/mailbox.rst	Wed Oct 28 11:50:44 2009
@@ -595,7 +595,7 @@
    `nmh - Message Handling System <http://www.nongnu.org/nmh/>`_
       Home page of :program:`nmh`, an updated version of the original :program:`mh`.
 
-   `MH & nmh: Email for Users & Programmers <http://www.ics.uci.edu/~mh/book/>`_
+   `MH & nmh: Email for Users & Programmers <http://rand-mh.sourceforge.net/book/>`_
       A GPL-licensed book on :program:`mh` and :program:`nmh`, with some information
       on the mailbox format.
 

Modified: sandbox/trunk/newgil/Doc/library/math.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/math.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/math.rst	Wed Oct 28 11:50:44 2009
@@ -301,7 +301,7 @@
    The mathematical constant *e*.
 
 
-.. note::
+.. impl-detail::
 
    The :mod:`math` module consists mostly of thin wrappers around the platform C
    math library functions.  Behavior in exceptional cases is loosely specified

Modified: sandbox/trunk/newgil/Doc/library/msilib.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/msilib.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/msilib.rst	Wed Oct 28 11:50:44 2009
@@ -394,10 +394,10 @@
 
 .. seealso::
 
-   `Directory Table <http://msdn.microsoft.com/library/en-us/msi/setup/directory_table.asp>`_
-   `File Table <http://msdn.microsoft.com/library/en-us/msi/setup/file_table.asp>`_
-   `Component Table <http://msdn.microsoft.com/library/en-us/msi/setup/component_table.asp>`_
-   `FeatureComponents Table <http://msdn.microsoft.com/library/en-us/msi/setup/featurecomponents_table.asp>`_
+   `Directory Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/directory_table.asp>`_
+   `File Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/file_table.asp>`_
+   `Component Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/component_table.asp>`_
+   `FeatureComponents Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/featurecomponents_table.asp>`_
 
 .. _features:
 
@@ -422,7 +422,7 @@
 
 .. seealso::
 
-   `Feature Table <http://msdn.microsoft.com/library/en-us/msi/setup/feature_table.asp>`_
+   `Feature Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/feature_table.asp>`_
 
 .. _msi-gui:
 
@@ -516,13 +516,13 @@
 
 .. seealso::
 
-   `Dialog Table <http://msdn.microsoft.com/library/en-us/msi/setup/dialog_table.asp>`_
-   `Control Table <http://msdn.microsoft.com/library/en-us/msi/setup/control_table.asp>`_
-   `Control Types <http://msdn.microsoft.com/library/en-us/msi/setup/controls.asp>`_
-   `ControlCondition Table <http://msdn.microsoft.com/library/en-us/msi/setup/controlcondition_table.asp>`_
-   `ControlEvent Table <http://msdn.microsoft.com/library/en-us/msi/setup/controlevent_table.asp>`_
-   `EventMapping Table <http://msdn.microsoft.com/library/en-us/msi/setup/eventmapping_table.asp>`_
-   `RadioButton Table <http://msdn.microsoft.com/library/en-us/msi/setup/radiobutton_table.asp>`_
+   `Dialog Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/dialog_table.asp>`_
+   `Control Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/control_table.asp>`_
+   `Control Types <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/controls.asp>`_
+   `ControlCondition Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/controlcondition_table.asp>`_
+   `ControlEvent Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/controlevent_table.asp>`_
+   `EventMapping Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/eventmapping_table.asp>`_
+   `RadioButton Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/radiobutton_table.asp>`_
 
 .. _msi-tables:
 
@@ -551,5 +551,3 @@
 
    This module contains definitions for the UIText and ActionText tables, for the
    standard installer actions.
-
-

Modified: sandbox/trunk/newgil/Doc/library/os.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/os.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/os.rst	Wed Oct 28 11:50:44 2009
@@ -1576,9 +1576,9 @@
 .. function:: system(command)
 
    Execute the command (a string) in a subshell.  This is implemented by calling
-   the Standard C function :cfunc:`system`, and has the same limitations.  Changes
-   to :data:`os.environ`, :data:`sys.stdin`, etc. are not reflected in the
-   environment of the executed command.
+   the Standard C function :cfunc:`system`, and has the same limitations.
+   Changes to :data:`sys.stdin`, etc. are not reflected in the environment of the
+   executed command.
 
    On Unix, the return value is the exit status of the process encoded in the
    format specified for :func:`wait`.  Note that POSIX does not specify the meaning

Modified: sandbox/trunk/newgil/Doc/library/othergui.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/othergui.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/othergui.rst	Wed Oct 28 11:50:44 2009
@@ -43,7 +43,7 @@
       `PythonCAD <http://www.pythoncad.org/>`_. An online `tutorial
       <http://www.pygtk.org/pygtk2tutorial/index.html>`_ is available.
 
-   `PyQt <http://www.riverbankcomputing.co.uk/pyqt/index.php>`_
+   `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/>`_
       PyQt is a :program:`sip`\ -wrapped binding to the Qt toolkit.  Qt is an
       extensive C++ GUI application development framework that is
       available for Unix, Windows and Mac OS X. :program:`sip` is a tool

Modified: sandbox/trunk/newgil/Doc/library/platform.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/platform.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/platform.rst	Wed Oct 28 11:50:44 2009
@@ -94,7 +94,7 @@
 .. function:: python_implementation()
 
    Returns a string identifying the Python implementation. Possible return values
-   are: 'CPython', 'IronPython', 'Jython'
+   are: 'CPython', 'IronPython', 'Jython'.
 
 
 .. function:: python_revision()

Modified: sandbox/trunk/newgil/Doc/library/signal.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/signal.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/signal.rst	Wed Oct 28 11:50:44 2009
@@ -157,13 +157,14 @@
 
    The old values are returned as a tuple: (delay, interval).
 
-   Attempting to pass an invalid interval timer will cause a
-   :exc:`ItimerError`.
+   Attempting to pass an invalid interval timer will cause an
+   :exc:`ItimerError`.  Availability: Unix.
 
 
 .. function:: getitimer(which)
 
    Returns current value of a given interval timer specified by *which*.
+   Availability: Unix.
 
 
 .. function:: set_wakeup_fd(fd)
@@ -184,7 +185,7 @@
 
    Change system call restart behaviour: if *flag* is :const:`False`, system
    calls will be restarted when interrupted by signal *signalnum*, otherwise
-   system calls will be interrupted. Returns nothing. Availability: Unix (see
+   system calls will be interrupted.  Returns nothing.  Availability: Unix (see
    the man page :manpage:`siginterrupt(3)` for further information).
 
    Note that installing a signal handler with :func:`signal` will reset the

Modified: sandbox/trunk/newgil/Doc/library/stdtypes.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/stdtypes.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/stdtypes.rst	Wed Oct 28 11:50:44 2009
@@ -772,13 +772,15 @@
    If *k* is ``None``, it is treated like ``1``.
 
 (6)
-   If *s* and *t* are both strings, some Python implementations such as CPython can
-   usually perform an in-place optimization for assignments of the form ``s=s+t``
-   or ``s+=t``.  When applicable, this optimization makes quadratic run-time much
-   less likely.  This optimization is both version and implementation dependent.
-   For performance sensitive code, it is preferable to use the :meth:`str.join`
-   method which assures consistent linear concatenation performance across versions
-   and implementations.
+   .. impl-detail::
+
+      If *s* and *t* are both strings, some Python implementations such as
+      CPython can usually perform an in-place optimization for assignments of
+      the form ``s = s + t`` or ``s += t``.  When applicable, this optimization
+      makes quadratic run-time much less likely.  This optimization is both
+      version and implementation dependent.  For performance sensitive code, it
+      is preferable to use the :meth:`str.join` method which assures consistent
+      linear concatenation performance across versions and implementations.
 
 
 .. _string-methods:
@@ -951,12 +953,12 @@
    least one cased character, false otherwise.
 
 
-.. method:: str.join(seq)
+.. method:: str.join(iterable)
 
-   Return a string which is the concatenation of the strings in the sequence
-   *seq*.  A :exc:`TypeError` will be raised if there are any non-string values
-   in *seq*, including :class:`bytes` objects.  The separator between elements
-   is the string providing this method.
+   Return a string which is the concatenation of the strings in the
+   :term:`iterable` *iterable*.  A :exc:`TypeError` will be raised if there are
+   any non-string values in *seq*, including :class:`bytes` objects.  The
+   separator between elements is the string providing this method.
 
 
 .. method:: str.ljust(width[, fillchar])
@@ -1510,14 +1512,17 @@
    that compare equal --- this is helpful for sorting in multiple passes (for
    example, sort by department, then by salary grade).
 
-   While a list is being sorted, the effect of attempting to mutate, or even
-   inspect, the list is undefined.  The C implementation
-   makes the list appear empty for the duration, and raises :exc:`ValueError` if it
-   can detect that the list has been mutated during a sort.
+   .. impl-detail::
+
+      While a list is being sorted, the effect of attempting to mutate, or even
+      inspect, the list is undefined.  The C implementation of Python makes the
+      list appear empty for the duration, and raises :exc:`ValueError` if it can
+      detect that the list has been mutated during a sort.
 
 (8)
    :meth:`sort` is not supported by :class:`bytearray` objects.
 
+
 .. _bytes-methods:
 
 Bytes and Byte Array Methods

Modified: sandbox/trunk/newgil/Doc/library/sys.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/sys.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/sys.rst	Wed Oct 28 11:50:44 2009
@@ -352,8 +352,10 @@
    that is deeper than the call stack, :exc:`ValueError` is raised.  The default
    for *depth* is zero, returning the frame at the top of the call stack.
 
-   This function should be used for internal and specialized purposes only. It
-   is not guaranteed to exist in all implementations of Python.
+   .. impl-detail::
+
+      This function should be used for internal and specialized purposes only.
+      It is not guaranteed to exist in all implementations of Python.
 
 
 .. function:: getprofile()
@@ -373,12 +375,12 @@
 
    Get the trace function as set by :func:`settrace`.
 
-   .. note::
+   .. impl-detail::
 
       The :func:`gettrace` function is intended only for implementing debuggers,
-      profilers, coverage tools and the like. Its behavior is part of the
-      implementation platform, rather than part of the language definition,
-      and thus may not be available in all Python implementations.
+      profilers, coverage tools and the like.  Its behavior is part of the
+      implementation platform, rather than part of the language definition, and
+      thus may not be available in all Python implementations.
 
 
 .. function:: getwindowsversion()
@@ -750,12 +752,12 @@
 
    For more information on code and frame objects, refer to :ref:`types`.
 
-   .. note::
+   .. impl-detail::
 
       The :func:`settrace` function is intended only for implementing debuggers,
-      profilers, coverage tools and the like. Its behavior is part of the
-      implementation platform, rather than part of the language definition, and thus
-      may not be available in all Python implementations.
+      profilers, coverage tools and the like.  Its behavior is part of the
+      implementation platform, rather than part of the language definition, and
+      thus may not be available in all Python implementations.
 
 
 .. function:: settscdump(on_flag)

Modified: sandbox/trunk/newgil/Doc/library/types.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/types.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/types.rst	Wed Oct 28 11:50:44 2009
@@ -77,5 +77,8 @@
    as ``datetime.timedelta.days``.  This type is used as descriptor for simple C
    data members which use standard conversion functions; it has the same purpose
    as the :class:`property` type, but for classes defined in extension modules.
-   In other implementations of Python, this type may be identical to
-   ``GetSetDescriptorType``.
+
+   .. impl-detail::
+
+      In other implementations of Python, this type may be identical to
+      ``GetSetDescriptorType``.

Modified: sandbox/trunk/newgil/Doc/library/weakref.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/library/weakref.rst	(original)
+++ sandbox/trunk/newgil/Doc/library/weakref.rst	Wed Oct 28 11:50:44 2009
@@ -72,9 +72,10 @@
 
    obj = Dict(red=1, green=2, blue=3)   # this object is weak referenceable
 
-Other built-in types such as :class:`tuple` and :class:`int` do not support
-weak references even when subclassed (those types implemented as a
-:ctype:`PyVarObject`).
+.. impl-detail::
+
+   Other built-in types such as :class:`tuple` and :class:`long` do not support
+   weak references even when subclassed.
 
 Extension types can easily be made to support weak references; see
 :ref:`weakref-support`.

Modified: sandbox/trunk/newgil/Doc/reference/datamodel.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/reference/datamodel.rst	(original)
+++ sandbox/trunk/newgil/Doc/reference/datamodel.rst	Wed Oct 28 11:50:44 2009
@@ -59,13 +59,16 @@
 they may be garbage-collected.  An implementation is allowed to postpone garbage
 collection or omit it altogether --- it is a matter of implementation quality
 how garbage collection is implemented, as long as no objects are collected that
-are still reachable.  (Implementation note: CPython currently uses a
-reference-counting scheme with (optional) delayed detection of cyclically linked
-garbage, which collects most objects as soon as they become unreachable, but is
-not guaranteed to collect garbage containing circular references.  See the
-documentation of the :mod:`gc` module for information on controlling the
-collection of cyclic garbage.  Other implementations act differently and CPython
-may change.)
+are still reachable.
+
+.. impl-detail::
+
+   CPython currently uses a reference-counting scheme with (optional) delayed
+   detection of cyclically linked garbage, which collects most objects as soon
+   as they become unreachable, but is not guaranteed to collect garbage
+   containing circular references.  See the documentation of the :mod:`gc`
+   module for information on controlling the collection of cyclic garbage.
+   Other implementations act differently and CPython may change.
 
 Note that the use of the implementation's tracing or debugging facilities may
 keep objects alive that would normally be collectable. Also note that catching
@@ -1469,15 +1472,15 @@
   *__slots__*; otherwise, the class attribute would overwrite the descriptor
   assignment.
 
+* The action of a *__slots__* declaration is limited to the class where it is
+  defined.  As a result, subclasses will have a *__dict__* unless they also define
+  *__slots__* (which must only contain names of any *additional* slots).
+
 * If a class defines a slot also defined in a base class, the instance variable
   defined by the base class slot is inaccessible (except by retrieving its
   descriptor directly from the base class). This renders the meaning of the
   program undefined.  In the future, a check may be added to prevent this.
 
-* The action of a *__slots__* declaration is limited to the class where it is
-  defined.  As a result, subclasses will have a *__dict__* unless they also define
-  *__slots__*.
-
 * Nonempty *__slots__* does not work for classes derived from "variable-length"
   built-in types such as :class:`int`, :class:`str` and :class:`tuple`.
 
@@ -1714,12 +1717,16 @@
 supply the following special method with a more efficient implementation, which
 also does not require the object be a sequence.
 
-
 .. method:: object.__contains__(self, item)
 
-   Called to implement membership test operators.  Should return true if *item* is
-   in *self*, false otherwise.  For mapping objects, this should consider the keys
-   of the mapping rather than the values or the key-item pairs.
+   Called to implement membership test operators.  Should return true if *item*
+   is in *self*, false otherwise.  For mapping objects, this should consider the
+   keys of the mapping rather than the values or the key-item pairs.
+
+   For objects that don't define :meth:`__contains__`, the membership test first
+   tries iteration via :meth:`__iter__`, then the old sequence iteration
+   protocol via :meth:`__getitem__`, see :ref:`this section in the language
+   reference <membership-test-details>`.
 
 
 .. _numeric-types:

Modified: sandbox/trunk/newgil/Doc/reference/executionmodel.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/reference/executionmodel.rst	(original)
+++ sandbox/trunk/newgil/Doc/reference/executionmodel.rst	Wed Oct 28 11:50:44 2009
@@ -129,7 +129,7 @@
 itself.  ``__builtins__`` can be set to a user-created dictionary to create a
 weak form of restricted execution.
 
-.. note::
+.. impl-detail::
 
    Users should not touch ``__builtins__``; it is strictly an implementation
    detail.  Users wanting to override values in the built-in namespace should

Modified: sandbox/trunk/newgil/Doc/reference/expressions.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/reference/expressions.rst	(original)
+++ sandbox/trunk/newgil/Doc/reference/expressions.rst	Wed Oct 28 11:50:44 2009
@@ -639,13 +639,13 @@
 raised.  Otherwise, the list of filled slots is used as the argument list for
 the call.
 
-.. note::
+.. impl-detail::
 
-   An implementation may provide built-in functions whose positional parameters do
-   not have names, even if they are 'named' for the purpose of documentation, and
-   which therefore cannot be supplied by keyword.  In CPython, this is the case for
-   functions implemented in C that use :cfunc:`PyArg_ParseTuple` to parse their
-   arguments.
+   An implementation may provide built-in functions whose positional parameters
+   do not have names, even if they are 'named' for the purpose of documentation,
+   and which therefore cannot be supplied by keyword.  In CPython, this is the
+   case for functions implemented in C that use :cfunc:`PyArg_ParseTuple` to
+   parse their arguments.
 
 If there are more positional arguments than there are formal parameter slots, a
 :exc:`TypeError` exception is raised, unless a formal parameter using the syntax
@@ -1053,6 +1053,8 @@
 supported cross-type comparisons and unsupported comparisons.  For example,
 ``Decimal(2) == 2`` and `2 == float(2)`` but ``Decimal(2) != float(2)``.
 
+.. _membership-test-details:
+
 The operators :keyword:`in` and :keyword:`not in` test for membership.  ``x in
 s`` evaluates to true if *x* is a member of *s*, and false otherwise.  ``x not
 in s`` returns the negation of ``x in s``.  All built-in sequences and set types
@@ -1069,7 +1071,12 @@
 For user-defined classes which define the :meth:`__contains__` method, ``x in
 y`` is true if and only if ``y.__contains__(x)`` is true.
 
-For user-defined classes which do not define :meth:`__contains__` and do define
+For user-defined classes which do not define :meth:`__contains__` but do define
+:meth:`__iter__`, ``x in y`` is true if some value ``z`` with ``x == z`` is
+produced while iterating over ``y``.  If an exception is raised during the
+iteration, it is as if :keyword:`in` raised that exception.
+
+Lastly, the old-style iteration protocol is tried: if a class defines
 :meth:`__getitem__`, ``x in y`` is true if and only if there is a non-negative
 integer index *i* such that ``x == y[i]``, and all lower integer indices do not
 raise :exc:`IndexError` exception.  (If any other exception is raised, it is as

Modified: sandbox/trunk/newgil/Doc/reference/simple_stmts.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/reference/simple_stmts.rst	(original)
+++ sandbox/trunk/newgil/Doc/reference/simple_stmts.rst	Wed Oct 28 11:50:44 2009
@@ -236,9 +236,11 @@
   from the length of the assigned sequence, thus changing the length of the
   target sequence, if the object allows it.
 
-(In the current implementation, the syntax for targets is taken to be the same
-as for expressions, and invalid syntax is rejected during the code generation
-phase, causing less detailed error messages.)
+.. impl-detail::
+
+   In the current implementation, the syntax for targets is taken to be the same
+   as for expressions, and invalid syntax is rejected during the code generation
+   phase, causing less detailed error messages.
 
 WARNING: Although the definition of assignment implies that overlaps between the
 left-hand side and the right-hand side are 'safe' (for example ``a, b = b, a``
@@ -937,9 +939,11 @@
 parameters or in a :keyword:`for` loop control target, :keyword:`class`
 definition, function definition, or :keyword:`import` statement.
 
-(The current implementation does not enforce the latter two restrictions, but
-programs should not abuse this freedom, as future implementations may enforce
-them or silently change the meaning of the program.)
+.. impl-detail::
+
+   The current implementation does not enforce the latter two restrictions, but
+   programs should not abuse this freedom, as future implementations may enforce
+   them or silently change the meaning of the program.
 
 .. index::
    builtin: exec

Modified: sandbox/trunk/newgil/Doc/tools/sphinxext/pyspecific.py
==============================================================================
--- sandbox/trunk/newgil/Doc/tools/sphinxext/pyspecific.py	(original)
+++ sandbox/trunk/newgil/Doc/tools/sphinxext/pyspecific.py	Wed Oct 28 11:50:44 2009
@@ -35,6 +35,8 @@
 HTMLTranslator.visit_versionmodified = new_visit_versionmodified
 
 
+# Support for marking up and linking to bugs.python.org issues
+
 def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
     issue = utils.unescape(text)
     text = 'issue ' + issue
@@ -42,6 +44,34 @@
     return [refnode], []
 
 
+# Support for marking up implementation details
+
+from sphinx.util.compat import Directive
+
+class ImplementationDetail(Directive):
+
+    has_content = True
+    required_arguments = 0
+    optional_arguments = 1
+    final_argument_whitespace = True
+
+    def run(self):
+        pnode = nodes.compound(classes=['impl-detail'])
+        content = self.content
+        add_text = nodes.strong('CPython implementation detail:',
+                                'CPython implementation detail:')
+        if self.arguments:
+            n, m = self.state.inline_text(self.arguments[0], self.lineno)
+            pnode.append(nodes.paragraph('', '', *(n + m)))
+        self.state.nested_parse(content, self.content_offset, pnode)
+        if pnode.children and isinstance(pnode[0], nodes.paragraph):
+            pnode[0].insert(0, add_text)
+            pnode[0].insert(1, nodes.Text(' '))
+        else:
+            pnode.insert(0, nodes.paragraph('', '', add_text))
+        return [pnode]
+
+
 # Support for building "topic help" for pydoc
 
 pydoc_topic_labels = [
@@ -108,10 +138,12 @@
         finally:
             f.close()
 
+
 # Support for checking for suspicious markup
 
 import suspicious
 
+
 # Support for documenting Opcodes
 
 import re
@@ -134,6 +166,7 @@
 
 def setup(app):
     app.add_role('issue', issue_role)
+    app.add_directive('impl-detail', ImplementationDetail)
     app.add_builder(PydocTopicsBuilder)
     app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
     app.add_description_unit('opcode', 'opcode', '%s (opcode)',

Modified: sandbox/trunk/newgil/Doc/tools/sphinxext/static/basic.css
==============================================================================
--- sandbox/trunk/newgil/Doc/tools/sphinxext/static/basic.css	(original)
+++ sandbox/trunk/newgil/Doc/tools/sphinxext/static/basic.css	Wed Oct 28 11:50:44 2009
@@ -345,6 +345,21 @@
     background-color: #ffa
 }
 
+.impl-detail {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+    border: 1px solid #ccc;
+}
+
+.impl-detail .compound-first {
+    margin-top: 0;
+}
+
+.impl-detail .compound-last {
+    margin-bottom: 0;
+}
+
 /* -- code displays --------------------------------------------------------- */
 
 pre {
@@ -405,7 +420,7 @@
     div.document,
     div.documentwrapper,
     div.bodywrapper {
-        margin: 0;
+        margin: 0 !important;
         width: 100%;
     }
 

Modified: sandbox/trunk/newgil/Doc/tutorial/index.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/tutorial/index.rst	(original)
+++ sandbox/trunk/newgil/Doc/tutorial/index.rst	Wed Oct 28 11:50:44 2009
@@ -28,18 +28,17 @@
 interpreter handy for hands-on experience, but all examples are self-contained,
 so the tutorial can be read off-line as well.
 
-For a description of standard objects and modules, see the Python Library
-Reference document. The Python Reference Manual gives a more formal definition
-of the language. To write extensions in C or C++, read Extending and Embedding
-the Python Interpreter and Python/C API Reference. There are also several books
-covering Python in depth.
+For a description of standard objects and modules, see :ref:`library-index`.
+:ref:`reference-index` gives a more formal definition of the language.  To write
+extensions in C or C++, read :ref:`extending-index` and
+:ref:`c-api-index`. There are also several books covering Python in depth.
 
 This tutorial does not attempt to be comprehensive and cover every single
 feature, or even every commonly used feature. Instead, it introduces many of
 Python's most noteworthy features, and will give you a good idea of the
 language's flavor and style. After reading it, you will be able to read and
 write Python modules and programs, and you will be ready to learn more about the
-various Python library modules described in the Python Library Reference.
+various Python library modules described in :ref:`library-index`.
 
 The :ref:`glossary` is also worth going through.
 

Modified: sandbox/trunk/newgil/Doc/using/cmdline.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/using/cmdline.rst	(original)
+++ sandbox/trunk/newgil/Doc/using/cmdline.rst	Wed Oct 28 11:50:44 2009
@@ -8,7 +8,7 @@
 The CPython interpreter scans the command line and the environment for various
 settings.
 
-.. note::
+.. impl-detail::
 
    Other implementations' command line schemes may differ.  See
    :ref:`implementations` for further resources.

Modified: sandbox/trunk/newgil/Doc/using/windows.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/using/windows.rst	(original)
+++ sandbox/trunk/newgil/Doc/using/windows.rst	Wed Oct 28 11:50:44 2009
@@ -67,7 +67,7 @@
 `ActivePython <http://www.activestate.com/Products/activepython/>`_
     Installer with multi-platform compatibility, documentation, PyWin32
 
-`Python Enthought Edition <http://code.enthought.com/enthon/>`_
+`Enthought Python Distribution <http://www.enthought.com/products/epd.php>`_
     Popular modules (such as PyWin32) with their respective documentation, tool
     suite for building extensible python applications
 
@@ -221,8 +221,7 @@
 * Win32 API calls
 * Registry
 * Event log
-* `Microsoft Foundation Classes <http://msdn.microsoft.com/library/
-  en-us/vclib/html/_mfc_Class_Library_Reference_Introduction.asp>`_ (MFC)
+* `Microsoft Foundation Classes <http://msdn.microsoft.com/en-us/library/fe1cf721%28VS.80%29.aspx>`_ (MFC)
   user interfaces
 
 `PythonWin <http://web.archive.org/web/20060524042422/
@@ -299,7 +298,7 @@
       MinGW gcc under Windows" or "Installing Python extension with distutils
       and without Microsoft Visual C++" by Sébastien Sauvage, 2003
 
-   `MingW -- Python extensions <http://www.mingw.org/MinGWiki/index.php/Python%20extensions>`_
+   `MingW -- Python extensions <http://oldwiki.mingw.org/index.php/Python%20extensions>`_
       by Trent Apted et al, 2007
 
 

Modified: sandbox/trunk/newgil/Doc/whatsnew/2.0.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/whatsnew/2.0.rst	(original)
+++ sandbox/trunk/newgil/Doc/whatsnew/2.0.rst	Wed Oct 28 11:50:44 2009
@@ -572,8 +572,7 @@
 mostly by Trent Mick of ActiveState.  (Confusingly, ``sys.platform`` is still
 ``'win32'`` on Win64 because it seems that for ease of porting, MS Visual C++
 treats code as 32 bit on Itanium.) PythonWin also supports Windows CE; see the
-Python CE page at http://starship.python.net/crew/mhammond/ce/ for more
-information.
+Python CE page at http://pythonce.sourceforge.net/ for more information.
 
 Another new platform is Darwin/MacOS X; initial support for it is in Python 2.0.
 Dynamic loading works, if you specify "configure --with-dyld --with-suffix=.x".
@@ -1041,8 +1040,8 @@
 to include SSL support, which adds an additional function to the :mod:`socket`
 module: :func:`socket.ssl(socket, keyfile, certfile)`, which takes a socket
 object and returns an SSL socket.  The :mod:`httplib` and :mod:`urllib` modules
-were also changed to support "https://" URLs, though no one has implemented FTP
-or SMTP over SSL.
+were also changed to support ``https://`` URLs, though no one has implemented
+FTP or SMTP over SSL.
 
 The :mod:`httplib` module has been rewritten by Greg Stein to support HTTP/1.1.
 Backward compatibility with the 1.5 version of :mod:`httplib` is provided,

Modified: sandbox/trunk/newgil/Doc/whatsnew/2.2.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/whatsnew/2.2.rst	(original)
+++ sandbox/trunk/newgil/Doc/whatsnew/2.2.rst	Wed Oct 28 11:50:44 2009
@@ -30,7 +30,7 @@
 to the PEP for a particular new feature.
 
 
-.. seealso::
+.. seealso (now defunct)
 
    http://www.unixreview.com/documents/s=1356/urm0109h/0109h.htm
       "What's So Special About Python 2.2?" is also about the new 2.2 features, and
@@ -49,14 +49,14 @@
 complicated section of this article, I'll provide an overview of the changes and
 offer some comments.
 
-A long time ago I wrote a Web page (http://www.amk.ca/python/writing/warts.html)
-listing flaws in Python's design.  One of the most significant flaws was that
-it's impossible to subclass Python types implemented in C.  In particular, it's
-not possible to subclass built-in types, so you can't just subclass, say, lists
-in order to add a single useful method to them. The :mod:`UserList` module
-provides a class that supports all of the methods of lists and that can be
-subclassed further, but there's lots of C code that expects a regular Python
-list and won't accept a :class:`UserList` instance.
+A long time ago I wrote a Web page listing flaws in Python's design.  One of the
+most significant flaws was that it's impossible to subclass Python types
+implemented in C.  In particular, it's not possible to subclass built-in types,
+so you can't just subclass, say, lists in order to add a single useful method to
+them. The :mod:`UserList` module provides a class that supports all of the
+methods of lists and that can be subclassed further, but there's lots of C code
+that expects a regular Python list and won't accept a :class:`UserList`
+instance.
 
 Python 2.2 fixes this, and in the process adds some exciting new capabilities.
 A brief summary:

Modified: sandbox/trunk/newgil/Doc/whatsnew/2.3.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/whatsnew/2.3.rst	(original)
+++ sandbox/trunk/newgil/Doc/whatsnew/2.3.rst	Wed Oct 28 11:50:44 2009
@@ -1855,10 +1855,10 @@
 
 .. seealso::
 
-   http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/dist/src/Objects/obmalloc.c
-      For the full details of the pymalloc implementation, see the comments at the top
-      of the file :file:`Objects/obmalloc.c` in the Python source code.  The above
-      link points to the file within the SourceForge CVS browser.
+   http://svn.python.org/view/python/trunk/Objects/obmalloc.c
+      For the full details of the pymalloc implementation, see the comments at
+      the top of the file :file:`Objects/obmalloc.c` in the Python source code.
+      The above link points to the file within the python.org SVN browser.
 
 .. ======================================================================
 

Modified: sandbox/trunk/newgil/Doc/whatsnew/2.4.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/whatsnew/2.4.rst	(original)
+++ sandbox/trunk/newgil/Doc/whatsnew/2.4.rst	Wed Oct 28 11:50:44 2009
@@ -680,9 +680,6 @@
       Written by Facundo Batista and implemented by Facundo Batista, Eric Price,
       Raymond Hettinger, Aahz, and Tim Peters.
 
-   http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html
-      A more detailed overview of the IEEE-754 representation.
-
    http://www.lahey.com/float.htm
       The article uses Fortran code to illustrate many of the problems that floating-
       point inaccuracy can cause.
@@ -756,7 +753,7 @@
   :ctype:`double` to an ASCII string.
 
 The code for these functions came from the GLib library
-(http://developer.gnome.org/arch/gtk/glib.html), whose developers kindly
+(http://library.gnome.org/devel/glib/stable/), whose developers kindly
 relicensed the relevant functions and donated them to the Python Software
 Foundation.  The :mod:`locale` module  can now change the numeric locale,
 letting extensions such as GTK+  produce the correct results.

Modified: sandbox/trunk/newgil/Doc/whatsnew/2.6.rst
==============================================================================
--- sandbox/trunk/newgil/Doc/whatsnew/2.6.rst	(original)
+++ sandbox/trunk/newgil/Doc/whatsnew/2.6.rst	Wed Oct 28 11:50:44 2009
@@ -1828,7 +1828,7 @@
 
   The :mod:`bsddb.dbshelve` module now uses the highest pickling protocol
   available, instead of restricting itself to protocol 1.
-  (Contributed by W. Barnes; :issue:`1551443`.)
+  (Contributed by W. Barnes.)
 
 * The :mod:`cgi` module will now read variables from the query string
   of an HTTP POST request.  This makes it possible to use form actions
@@ -2977,7 +2977,7 @@
 * The BerkeleyDB module now has a C API object, available as
   ``bsddb.db.api``.   This object can be used by other C extensions
   that wish to use the :mod:`bsddb` module for their own purposes.
-  (Contributed by Duncan Grisby; :issue:`1551895`.)
+  (Contributed by Duncan Grisby.)
 
 * The new buffer interface, previously described in
   `the PEP 3118 section <#pep-3118-revised-buffer-protocol>`__,

Modified: sandbox/trunk/newgil/Lib/distutils/core.py
==============================================================================
--- sandbox/trunk/newgil/Lib/distutils/core.py	(original)
+++ sandbox/trunk/newgil/Lib/distutils/core.py	Wed Oct 28 11:50:44 2009
@@ -129,8 +129,9 @@
     if _setup_stop_after == "config":
         return dist
 
-    # Parse the command line; any command-line errors are the end user's
-    # fault, so turn them into SystemExit to suppress tracebacks.
+    # Parse the command line and override config files; any
+    # command-line errors are the end user's fault, so turn them into
+    # SystemExit to suppress tracebacks.
     try:
         ok = dist.parse_command_line()
     except DistutilsArgError as msg:

Modified: sandbox/trunk/newgil/Lib/distutils/dist.py
==============================================================================
--- sandbox/trunk/newgil/Lib/distutils/dist.py	(original)
+++ sandbox/trunk/newgil/Lib/distutils/dist.py	Wed Oct 28 11:50:44 2009
@@ -53,7 +53,9 @@
                       ('quiet', 'q', "run quietly (turns verbosity off)"),
                       ('dry-run', 'n', "don't actually do anything"),
                       ('help', 'h', "show detailed help message"),
-                     ]
+                      ('no-user-cfg', None,
+                       'ignore pydistutils.cfg in your home directory'),
+    ]
 
     # 'common_usage' is a short (2-3 line) string describing the common
     # usage of the setup script.
@@ -260,6 +262,22 @@
                     else:
                         sys.stderr.write(msg + "\n")
 
+        # no-user-cfg is handled before other command line args
+        # because other args override the config files, and this
+        # one is needed before we can load the config files.
+        # If attrs['script_args'] wasn't passed, assume false.
+        #
+        # This also make sure we just look at the global options
+        self.want_user_cfg = True
+
+        if self.script_args is not None:
+            for arg in self.script_args:
+                if not arg.startswith('-'):
+                    break
+                if arg == '--no-user-cfg':
+                    self.want_user_cfg = False
+                    break
+
         self.finalize_options()
 
     def get_option_dict(self, command):
@@ -311,7 +329,10 @@
         Distutils installation directory (ie. where the top-level
         Distutils __inst__.py file lives), a file in the user's home
         directory named .pydistutils.cfg on Unix and pydistutils.cfg
-        on Windows/Mac, and setup.cfg in the current directory.
+        on Windows/Mac; and setup.cfg in the current directory.
+
+        The file in the user's home directory can be disabled with the
+        --no-user-cfg option.
         """
         files = []
         check_environ()
@@ -331,15 +352,19 @@
             user_filename = "pydistutils.cfg"
 
         # And look for the user config file
-        user_file = os.path.join(os.path.expanduser('~'), user_filename)
-        if os.path.isfile(user_file):
-            files.append(user_file)
+        if self.want_user_cfg:
+            user_file = os.path.join(os.path.expanduser('~'), user_filename)
+            if os.path.isfile(user_file):
+                files.append(user_file)
 
         # All platforms support local setup.cfg
         local_file = "setup.cfg"
         if os.path.isfile(local_file):
             files.append(local_file)
 
+        if DEBUG:
+            self.announce("using config files: %s" % ', '.join(files))
+
         return files
 
     def parse_config_files(self, filenames=None):

Modified: sandbox/trunk/newgil/Lib/distutils/errors.py
==============================================================================
--- sandbox/trunk/newgil/Lib/distutils/errors.py	(original)
+++ sandbox/trunk/newgil/Lib/distutils/errors.py	Wed Oct 28 11:50:44 2009
@@ -10,90 +10,79 @@
 
 __revision__ = "$Id$"
 
-class DistutilsError (Exception):
+class DistutilsError(Exception):
     """The root of all Distutils evil."""
-    pass
 
-class DistutilsModuleError (DistutilsError):
+class DistutilsModuleError(DistutilsError):
     """Unable to load an expected module, or to find an expected class
     within some module (in particular, command modules and classes)."""
-    pass
 
-class DistutilsClassError (DistutilsError):
+class DistutilsClassError(DistutilsError):
     """Some command class (or possibly distribution class, if anyone
     feels a need to subclass Distribution) is found not to be holding
     up its end of the bargain, ie. implementing some part of the
     "command "interface."""
-    pass
 
-class DistutilsGetoptError (DistutilsError):
+class DistutilsGetoptError(DistutilsError):
     """The option table provided to 'fancy_getopt()' is bogus."""
-    pass
 
-class DistutilsArgError (DistutilsError):
+class DistutilsArgError(DistutilsError):
     """Raised by fancy_getopt in response to getopt.error -- ie. an
     error in the command line usage."""
-    pass
 
-class DistutilsFileError (DistutilsError):
+class DistutilsFileError(DistutilsError):
     """Any problems in the filesystem: expected file not found, etc.
     Typically this is for problems that we detect before IOError or
     OSError could be raised."""
-    pass
 
-class DistutilsOptionError (DistutilsError):
+class DistutilsOptionError(DistutilsError):
     """Syntactic/semantic errors in command options, such as use of
     mutually conflicting options, or inconsistent options,
     badly-spelled values, etc.  No distinction is made between option
     values originating in the setup script, the command line, config
     files, or what-have-you -- but if we *know* something originated in
     the setup script, we'll raise DistutilsSetupError instead."""
-    pass
 
-class DistutilsSetupError (DistutilsError):
+class DistutilsSetupError(DistutilsError):
     """For errors that can be definitely blamed on the setup script,
     such as invalid keyword arguments to 'setup()'."""
-    pass
 
-class DistutilsPlatformError (DistutilsError):
+class DistutilsPlatformError(DistutilsError):
     """We don't know how to do something on the current platform (but
     we do know how to do it on some platform) -- eg. trying to compile
     C files on a platform not supported by a CCompiler subclass."""
-    pass
 
-class DistutilsExecError (DistutilsError):
+class DistutilsExecError(DistutilsError):
     """Any problems executing an external program (such as the C
     compiler, when compiling C files)."""
-    pass
 
-class DistutilsInternalError (DistutilsError):
+class DistutilsInternalError(DistutilsError):
     """Internal inconsistencies or impossibilities (obviously, this
     should never be seen if the code is working!)."""
-    pass
 
-class DistutilsTemplateError (DistutilsError):
+class DistutilsTemplateError(DistutilsError):
     """Syntax error in a file list template."""
 
 class DistutilsByteCompileError(DistutilsError):
     """Byte compile error."""
 
 # Exception classes used by the CCompiler implementation classes
-class CCompilerError (Exception):
+class CCompilerError(Exception):
     """Some compile/link operation failed."""
 
-class PreprocessError (CCompilerError):
+class PreprocessError(CCompilerError):
     """Failure to preprocess one or more C/C++ files."""
 
-class CompileError (CCompilerError):
+class CompileError(CCompilerError):
     """Failure to compile one or more C/C++ source files."""
 
-class LibError (CCompilerError):
+class LibError(CCompilerError):
     """Failure to create a static library from one or more C/C++ object
     files."""
 
-class LinkError (CCompilerError):
+class LinkError(CCompilerError):
     """Failure to link one or more C/C++ object files into an executable
     or shared library file."""
 
-class UnknownFileError (CCompilerError):
+class UnknownFileError(CCompilerError):
     """Attempt to process an unknown file type."""

Modified: sandbox/trunk/newgil/Lib/distutils/tests/test_dist.py
==============================================================================
--- sandbox/trunk/newgil/Lib/distutils/tests/test_dist.py	(original)
+++ sandbox/trunk/newgil/Lib/distutils/tests/test_dist.py	Wed Oct 28 11:50:44 2009
@@ -37,7 +37,8 @@
         return self._config_files
 
 
-class DistributionTestCase(support.LoggingSilencer,
+class DistributionTestCase(support.TempdirManager,
+                           support.LoggingSilencer,
                            support.EnvironGuard,
                            unittest.TestCase):
 
@@ -180,6 +181,35 @@
         kwargs = {'level': 'ok2'}
         self.assertRaises(ValueError, dist.announce, args, kwargs)
 
+    def test_find_config_files_disable(self):
+        # Ticket #1180: Allow user to disable their home config file.
+        temp_home = self.mkdtemp()
+        if os.name == 'posix':
+            user_filename = os.path.join(temp_home, ".pydistutils.cfg")
+        else:
+            user_filename = os.path.join(temp_home, "pydistutils.cfg")
+
+        with open(user_filename, 'w') as f:
+            f.write('[distutils]\n')
+
+        def _expander(path):
+            return temp_home
+
+        old_expander = os.path.expanduser
+        os.path.expanduser = _expander
+        try:
+            d = distutils.dist.Distribution()
+            all_files = d.find_config_files()
+
+            d = distutils.dist.Distribution(attrs={'script_args':
+                                            ['--no-user-cfg']})
+            files = d.find_config_files()
+        finally:
+            os.path.expanduser = old_expander
+
+        # make sure --no-user-cfg disables the user cfg file
+        self.assertEquals(len(all_files)-1, len(files))
+
 class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
                        unittest.TestCase):
 

Modified: sandbox/trunk/newgil/Lib/test/regrtest.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/regrtest.py	(original)
+++ sandbox/trunk/newgil/Lib/test/regrtest.py	Wed Oct 28 11:50:44 2009
@@ -8,27 +8,43 @@
 
 Command line options:
 
--v: verbose    -- run tests in verbose mode with output to stdout
--w: verbose2   -- re-run failed tests in verbose mode
--d: debug      -- print traceback for failed tests
--q: quiet      -- don't print anything except if a test fails
--x: exclude    -- arguments are tests to *exclude*
--s: single     -- run only a single test (see below)
--S: slow       -- print the slowest 10 tests
--r: random     -- randomize test execution order
--f: fromfile   -- read names of tests to run from a file (see below)
--l: findleaks  -- if GC is available detect tests that leak memory
--u: use        -- specify which special resource intensive tests to run
--h: help       -- print this text and exit
--t: threshold  -- call gc.set_threshold(N)
--T: coverage   -- turn on code coverage using the trace module
--D: coverdir   -- Directory where coverage files are put
--N: nocoverdir -- Put coverage files alongside modules
--L: runleaks   -- run the leaks(1) command just before exit
--R: huntrleaks -- search for reference leaks (needs debug build, v. slow)
--M: memlimit   -- run very large memory-consuming tests
--n: nowindows  -- suppress error message boxes on Windows
--j: multiprocess -- run several processes at once
+-h/--help       -- print this text and exit
+
+Verbosity
+
+-v/--verbose    -- run tests in verbose mode with output to stdout
+-w/--verbose2   -- re-run failed tests in verbose mode
+-W/--verbose3   -- re-run failed tests in verbose mode immediately
+-d/--debug      -- print traceback for failed tests
+-q/--quiet      -- don't print anything except if a test fails
+-S/--slow       -- print the slowest 10 tests
+
+Selecting tests
+
+-r/--random     -- randomize test execution order
+-f/--fromfile   -- read names of tests to run from a file (see below)
+-x/--exclude    -- arguments are tests to *exclude*
+-s/--single     -- run only a single test (see below)
+-u/--use RES1,RES2,...
+                -- specify which special resource intensive tests to run
+-M/--memlimit LIMIT
+                -- run very large memory-consuming tests
+
+Special runs
+
+-l/--findleaks  -- if GC is available detect tests that leak memory
+-L/--runleaks   -- run the leaks(1) command just before exit
+-R/--huntrleaks RUNCOUNTS
+                -- search for reference leaks (needs debug build, v. slow)
+-j/--multiprocess PROCESSES
+                -- run PROCESSES processes at once
+-T/--coverage   -- turn on code coverage using the trace module
+-D/--coverdir DIRECTORY
+                -- Directory where coverage files are put
+-N/--nocoverdir -- Put coverage files alongside modules
+-t/--threshold THRESHOLD
+                -- call gc.set_threshold(THRESHOLD)
+-n/--nowindows  -- suppress error message boxes on Windows
 
 If non-option arguments are present, they are names for tests to run,
 unless -x is given, in which case they are names for tests not to run.
@@ -193,7 +209,7 @@
          exclude=False, single=False, randomize=False, fromfile=None,
          findleaks=False, use_resources=None, trace=False, coverdir='coverage',
          runleaks=False, huntrleaks=False, verbose2=False, print_slow=False,
-         random_seed=None, use_mp=None):
+         random_seed=None, use_mp=None, verbose3=False):
     """Execute a test suite.
 
     This also parses command-line options and modifies its behavior
@@ -219,15 +235,12 @@
 
     support.record_original_stdout(sys.stdout)
     try:
-        opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:wM:nj:',
-                                   ['help', 'verbose', 'quiet', 'exclude',
-                                    'single', 'slow', 'random', 'fromfile',
-                                    'findleaks', 'use=', 'threshold=', 'trace',
-                                    'coverdir=', 'nocoverdir', 'runleaks',
-                                    'huntrleaks=', 'verbose2', 'memlimit=',
-                                    'debug', 'start=', 'nowindows',
-                                    'randseed=', 'multiprocess=', 'slaveargs=',
-                                    ])
+        opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:wWM:nj:',
+            ['help', 'verbose', 'verbose2', 'verbose3', 'quiet',
+             'exclude', 'single', 'slow', 'random', 'fromfile', 'findleaks',
+             'use=', 'threshold=', 'trace', 'coverdir=', 'nocoverdir',
+             'runleaks', 'huntrleaks=', 'memlimit=', 'debug', 'start=',
+             'nowindows', 'randseed=', 'multiprocess=', 'slaveargs='])
     except getopt.error as msg:
         usage(msg)
 
@@ -248,6 +261,8 @@
             verbose2 = True
         elif o in ('-d', '--debug'):
             debug = True
+        elif o in ('-W', '--verbose3'):
+            verbose3 = True
         elif o in ('-q', '--quiet'):
             quiet = True;
             verbose = 0
@@ -430,14 +445,17 @@
         test_times.append((test_time, test))
         if ok > 0:
             good.append(test)
+            return 'good'
         elif -2 < ok <= 0:
             bad.append(test)
             if ok == -1:
                 environment_changed.append(test)
+            return 'bad'
         else:
             skipped.append(test)
             if ok == -3:
                 resource_denieds.append(test)
+            return 'skipped'
 
     if use_mp:
         from threading import Thread
@@ -514,7 +532,10 @@
                 try:
                     result = runtest(test, verbose, quiet,
                                      testdir, huntrleaks, debug)
-                    accumulate_result(test, result)
+                    which = accumulate_result(test, result)
+                    if verbose3 and which == 'bad':
+                        print("Re-running test {} in verbose mode".format(test))
+                        runtest(test, True, quiet, testdir, huntrleaks, debug)
                 except KeyboardInterrupt:
                     # print a newline separate from the ^C
                     print()

Modified: sandbox/trunk/newgil/Lib/test/test_asyncore.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_asyncore.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_asyncore.py	Wed Oct 28 11:50:44 2009
@@ -320,40 +320,44 @@
     def tearDown(self):
         asyncore.close_all()
 
+    @support.reap_threads
     def test_send(self):
-        self.evt = threading.Event()
-        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        self.sock.settimeout(3)
-        self.port = support.bind_port(self.sock)
+        evt = threading.Event()
+        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+        sock.settimeout(3)
+        port = support.bind_port(sock)
 
         cap = BytesIO()
-        args = (self.evt, cap, self.sock)
-        threading.Thread(target=capture_server, args=args).start()
-
-        # wait a little longer for the server to initialize (it sometimes
-        # refuses connections on slow machines without this wait)
-        time.sleep(0.2)
-
-        data = b"Suppose there isn't a 16-ton weight?"
-        d = dispatcherwithsend_noread()
-        d.create_socket(socket.AF_INET, socket.SOCK_STREAM)
-        d.connect((HOST, self.port))
-
-        # give time for socket to connect
-        time.sleep(0.1)
-
-        d.send(data)
-        d.send(data)
-        d.send(b'\n')
-
-        n = 1000
-        while d.out_buffer and n > 0:
-            asyncore.poll()
-            n -= 1
-
-        self.evt.wait()
-
-        self.assertEqual(cap.getvalue(), data*2)
+        args = (evt, cap, sock)
+        t = threading.Thread(target=capture_server, args=args)
+        t.start()
+        try:
+            # wait a little longer for the server to initialize (it sometimes
+            # refuses connections on slow machines without this wait)
+            time.sleep(0.2)
+
+            data = b"Suppose there isn't a 16-ton weight?"
+            d = dispatcherwithsend_noread()
+            d.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+            d.connect((HOST, port))
+
+            # give time for socket to connect
+            time.sleep(0.1)
+
+            d.send(data)
+            d.send(data)
+            d.send(b'\n')
+
+            n = 1000
+            while d.out_buffer and n > 0:
+                asyncore.poll()
+                n -= 1
+
+            evt.wait()
+
+            self.assertEqual(cap.getvalue(), data*2)
+        finally:
+            t.join()
 
 
 class DispatcherWithSendTests_UsePoll(DispatcherWithSendTests):

Modified: sandbox/trunk/newgil/Lib/test/test_bz2.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_bz2.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_bz2.py	Wed Oct 28 11:50:44 2009
@@ -7,6 +7,7 @@
 import os
 import subprocess
 import sys
+import threading
 
 # Skip tests if the bz2 module doesn't exist.
 bz2 = support.import_module('bz2')
@@ -282,6 +283,23 @@
         else:
             self.fail("1/0 didn't raise an exception")
 
+    def testThreading(self):
+        # Using a BZ2File from several threads doesn't deadlock (issue #7205).
+        data = b"1" * 2**20
+        nthreads = 10
+        f = bz2.BZ2File(self.filename, 'wb')
+        try:
+            def comp():
+                for i in range(5):
+                    f.write(data)
+            threads = [threading.Thread(target=comp) for i in range(nthreads)]
+            for t in threads:
+                t.start()
+            for t in threads:
+                t.join()
+        finally:
+            f.close()
+
 
 class BZ2CompressorTest(BaseTest):
     def testCompress(self):

Modified: sandbox/trunk/newgil/Lib/test/test_complex.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_complex.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_complex.py	Wed Oct 28 11:50:44 2009
@@ -284,7 +284,6 @@
         self.assertRaises(ValueError, complex, "1+2j)")
         self.assertRaises(ValueError, complex, "1+(2j)")
         self.assertRaises(ValueError, complex, "(1+2j)123")
-        self.assertRaises(ValueError, complex, "1"*500)
         self.assertRaises(ValueError, complex, "x")
         self.assertRaises(ValueError, complex, "1j+2")
         self.assertRaises(ValueError, complex, "1e1ej")
@@ -295,6 +294,9 @@
         self.assertRaises(ValueError, complex, "1.11.1j")
         self.assertRaises(ValueError, complex, "1e1.1j")
 
+        # check that complex accepts long unicode strings
+        self.assertEqual(type(complex("1"*500)), complex)
+
         class EvilExc(Exception):
             pass
 

Modified: sandbox/trunk/newgil/Lib/test/test_distutils.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_distutils.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_distutils.py	Wed Oct 28 11:50:44 2009
@@ -11,6 +11,7 @@
 
 def test_main():
     test.support.run_unittest(distutils.tests.test_suite())
+    test.support.reap_children()
 
 
 if __name__ == "__main__":

Modified: sandbox/trunk/newgil/Lib/test/test_float.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_float.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_float.py	Wed Oct 28 11:50:44 2009
@@ -34,6 +34,9 @@
         self.assertRaises(ValueError, float, ".")
         self.assertRaises(ValueError, float, "-.")
         self.assertEqual(float(b"  \u0663.\u0661\u0664  ".decode('raw-unicode-escape')), 3.14)
+        # extra long strings should not be a problem
+        float(b'.' + b'1'*1000)
+        float('.' + '1'*1000)
 
     @support.run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE')
     def test_float_with_comma(self):

Modified: sandbox/trunk/newgil/Lib/test/test_httpservers.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_httpservers.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_httpservers.py	Wed Oct 28 11:50:44 2009
@@ -51,6 +51,7 @@
 
 class BaseTestCase(unittest.TestCase):
     def setUp(self):
+        self._threads = support.threading_setup()
         os.environ = support.EnvironmentVarGuard()
         self.lock = threading.Lock()
         self.thread = TestServerThread(self, self.request_handler)
@@ -61,6 +62,7 @@
         self.lock.release()
         self.thread.stop()
         os.environ.__exit__()
+        support.threading_cleanup(*self._threads)
 
     def request(self, uri, method='GET', body=None, headers={}):
         self.connection = http.client.HTTPConnection('localhost', self.PORT)

Modified: sandbox/trunk/newgil/Lib/test/test_site.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_site.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_site.py	Wed Oct 28 11:50:44 2009
@@ -168,7 +168,7 @@
         else:
             self.assertTrue(len(dirs), 2)
             self.assertEquals(dirs[0], 'xoxo')
-            wanted = os.path.join('xoxo', 'Lib', 'site-packages')
+            wanted = os.path.join('xoxo', 'lib', 'site-packages')
             self.assertEquals(dirs[1], wanted)
 
         # let's try the specific Apple location

Modified: sandbox/trunk/newgil/Lib/test/test_smtplib.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_smtplib.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_smtplib.py	Wed Oct 28 11:50:44 2009
@@ -47,17 +47,21 @@
 class GeneralTests(TestCase):
 
     def setUp(self):
+        self._threads = support.threading_setup()
         self.evt = threading.Event()
         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         self.sock.settimeout(15)
         self.port = support.bind_port(self.sock)
         servargs = (self.evt, b"220 Hola mundo\n", self.sock)
-        threading.Thread(target=server, args=servargs).start()
+        self.thread = threading.Thread(target=server, args=servargs)
+        self.thread.start()
         self.evt.wait()
         self.evt.clear()
 
     def tearDown(self):
         self.evt.wait()
+        self.thread.join()
+        support.threading_cleanup(*self._threads)
 
     def testBasic1(self):
         # connects
@@ -150,12 +154,14 @@
         self.output = io.StringIO()
         sys.stdout = self.output
 
+        self._threads = support.threading_setup()
         self.serv_evt = threading.Event()
         self.client_evt = threading.Event()
         self.port = support.find_unused_port()
         self.serv = smtpd.DebuggingServer((HOST, self.port), ('nowhere', -1))
         serv_args = (self.serv, self.serv_evt, self.client_evt)
-        threading.Thread(target=debugging_server, args=serv_args).start()
+        self.thread = threading.Thread(target=debugging_server, args=serv_args)
+        self.thread.start()
 
         # wait until server thread has assigned a port number
         self.serv_evt.wait()
@@ -166,6 +172,8 @@
         self.client_evt.set()
         # wait for the server thread to terminate
         self.serv_evt.wait()
+        self.thread.join()
+        support.threading_cleanup(*self._threads)
         # restore sys.stdout
         sys.stdout = self.old_stdout
 
@@ -261,17 +269,21 @@
         self.output = io.StringIO()
         sys.stdout = self.output
 
+        self._threads = support.threading_setup()
         self.evt = threading.Event()
         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         self.sock.settimeout(15)
         self.port = support.bind_port(self.sock)
         servargs = (self.evt, b"199 no hello for you!\n", self.sock)
-        threading.Thread(target=server, args=servargs).start()
+        self.thread = threading.Thread(target=server, args=servargs)
+        self.thread.start()
         self.evt.wait()
         self.evt.clear()
 
     def tearDown(self):
         self.evt.wait()
+        self.thread.join()
+        support.threading_cleanup(*self._threads)
         sys.stdout = self.old_stdout
 
     def testFailingHELO(self):
@@ -377,12 +389,14 @@
 class SMTPSimTests(TestCase):
 
     def setUp(self):
+        self._threads = support.threading_setup()
         self.serv_evt = threading.Event()
         self.client_evt = threading.Event()
         self.port = support.find_unused_port()
         self.serv = SimSMTPServer((HOST, self.port), ('nowhere', -1))
         serv_args = (self.serv, self.serv_evt, self.client_evt)
-        threading.Thread(target=debugging_server, args=serv_args).start()
+        self.thread = threading.Thread(target=debugging_server, args=serv_args)
+        self.thread.start()
 
         # wait until server thread has assigned a port number
         self.serv_evt.wait()
@@ -393,6 +407,8 @@
         self.client_evt.set()
         # wait for the server thread to terminate
         self.serv_evt.wait()
+        self.thread.join()
+        support.threading_cleanup(*self._threads)
 
     def testBasic(self):
         # smoke test

Modified: sandbox/trunk/newgil/Lib/test/test_socketserver.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_socketserver.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_socketserver.py	Wed Oct 28 11:50:44 2009
@@ -16,7 +16,7 @@
 import socketserver
 
 import test.support
-from test.support import reap_children, verbose
+from test.support import reap_children, reap_threads, verbose
 from test.support import TESTFN as TEST_FILE
 
 test.support.requires("network")
@@ -122,6 +122,7 @@
         self.assertEquals(server.server_address, server.socket.getsockname())
         return server
 
+    @reap_threads
     def run_server(self, svrcls, hdlrbase, testfunc):
         server = self.make_server(self.pickaddr(svrcls.address_family),
                                   svrcls, hdlrbase)

Modified: sandbox/trunk/newgil/Lib/test/test_sys.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_sys.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_sys.py	Wed Oct 28 11:50:44 2009
@@ -5,6 +5,11 @@
 import subprocess
 import textwrap
 
+# count the number of test runs, used to create unique
+# strings to intern in test_intern()
+numruns = 0
+
+
 class SysModuleTest(unittest.TestCase):
 
     def setUp(self):
@@ -16,6 +21,7 @@
         sys.stdout = self.orig_stdout
         sys.stderr = self.orig_stderr
         sys.displayhook = self.orig_displayhook
+        test.support.reap_children()
 
     def test_original_displayhook(self):
         import builtins
@@ -276,6 +282,7 @@
             self.current_frames_without_threads()
 
     # Test sys._current_frames() in a WITH_THREADS build.
+    @test.support.reap_threads
     def current_frames_with_threads(self):
         import threading, _thread
         import traceback
@@ -396,8 +403,10 @@
         self.assertEqual(sys.__stdout__.encoding, sys.__stderr__.encoding)
 
     def test_intern(self):
+        global numruns
+        numruns += 1
         self.assertRaises(TypeError, sys.intern)
-        s = "never interned before"
+        s = "never interned before" + str(numruns)
         self.assertTrue(sys.intern(s) is s)
         s2 = s.swapcase().swapcase()
         self.assertTrue(sys.intern(s2) is s)
@@ -439,13 +448,13 @@
         env["PYTHONIOENCODING"] = "cp424"
         p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
                              stdout = subprocess.PIPE, env=env)
-        out = p.stdout.read()
+        out = p.communicate()[0].strip()
         self.assertEqual(out, "\xa2\n".encode("cp424"))
 
         env["PYTHONIOENCODING"] = "ascii:replace"
         p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
                              stdout = subprocess.PIPE, env=env)
-        out = p.stdout.read().strip()
+        out = p.communicate()[0].strip()
         self.assertEqual(out, b'?')
 
 

Modified: sandbox/trunk/newgil/Lib/test/test_telnetlib.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_telnetlib.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_telnetlib.py	Wed Oct 28 11:50:44 2009
@@ -12,12 +12,14 @@
 HOST = support.HOST
 EOF_sigil = object()
 
-def server(evt, serv, dataq=None):
-    """ Open a tcp server in three steps
+def server(evt, serv, dataq=None, test_done=None):
+    """ Open a tcp server in four steps
         1) set evt to true to let the parent know we are ready
         2) [optional] if is not False, write the list of data from dataq.get()
            to the socket.
-        3) set evt to true to let the parent know we're done
+        3) [optional] if test_done is not None, it's an event;  wait
+           for parent to set test_done before closing connection
+        4) set evt to true to let the parent know we're done
     """
     serv.listen(5)
     evt.set()
@@ -39,6 +41,8 @@
     except socket.timeout:
         pass
     finally:
+        if test_done is not None:
+            test_done.wait()
         serv.close()
         evt.set()
 
@@ -324,8 +328,24 @@
 class WriteTests(TestCase):
     '''The only thing that write does is replace each tl.IAC for
     tl.IAC+tl.IAC'''
-    setUp = _read_setUp
-    tearDown = _read_tearDown
+    def setUp(self):
+        self.evt = threading.Event()
+        self.test_done = threading.Event()
+        self.dataq = queue.Queue()
+        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+        self.sock.settimeout(3)
+        self.port = support.bind_port(self.sock)
+        self.thread = threading.Thread(target=server, args=(
+                self.evt, self.sock, self.dataq, self.test_done))
+        self.thread.start()
+        self.evt.wait()
+        self.evt.clear()
+        time.sleep(.1)
+
+    def tearDown(self):
+        self.test_done.set()
+        self.evt.wait()
+        self.thread.join()
 
     def _test_write(self, data):
         self.telnet.sock._raw_sent = b''

Modified: sandbox/trunk/newgil/Lib/test/test_threading.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_threading.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_threading.py	Wed Oct 28 11:50:44 2009
@@ -56,7 +56,16 @@
                           (self.name, self.nrunning.get()))
 
 
-class ThreadTests(unittest.TestCase):
+class BaseTestCase(unittest.TestCase):
+    def setUp(self):
+        self._threads = test.support.threading_setup()
+
+    def tearDown(self):
+        test.support.threading_cleanup(*self._threads)
+        test.support.reap_children()
+
+
+class ThreadTests(BaseTestCase):
 
     # Create a bunch of threads, let each do some work, wait until all are
     # done.
@@ -389,7 +398,7 @@
         threading.activeCount()
 
 
-class ThreadJoinOnShutdown(unittest.TestCase):
+class ThreadJoinOnShutdown(BaseTestCase):
 
     def _run_and_join(self, script):
         script = """if 1:
@@ -470,7 +479,7 @@
         self._run_and_join(script)
 
 
-class ThreadingExceptionTests(unittest.TestCase):
+class ThreadingExceptionTests(BaseTestCase):
     # A RuntimeError should be raised if Thread.start() is called
     # multiple times.
     def test_start_thread_again(self):

Modified: sandbox/trunk/newgil/Lib/test/test_urllib2_localnet.py
==============================================================================
--- sandbox/trunk/newgil/Lib/test/test_urllib2_localnet.py	(original)
+++ sandbox/trunk/newgil/Lib/test/test_urllib2_localnet.py	Wed Oct 28 11:50:44 2009
@@ -221,7 +221,15 @@
 
 # Test cases
 
-class ProxyAuthTests(unittest.TestCase):
+class BaseTestCase(unittest.TestCase):
+    def setUp(self):
+        self._threads = test_support.threading_setup()
+
+    def tearDown(self):
+        test_support.threading_cleanup(*self._threads)
+
+
+class ProxyAuthTests(BaseTestCase):
     URL = "http://localhost"
 
     USER = "tester"
@@ -329,7 +337,7 @@
     return FakeHTTPRequestHandler
 
 
-class TestUrlopen(unittest.TestCase):
+class TestUrlopen(BaseTestCase):
     """Tests urllib2.urlopen using the network.
 
     These tests are not exhaustive.  Assuming that testing using files does a

Modified: sandbox/trunk/newgil/Lib/threading.py
==============================================================================
--- sandbox/trunk/newgil/Lib/threading.py	(original)
+++ sandbox/trunk/newgil/Lib/threading.py	Wed Oct 28 11:50:44 2009
@@ -119,7 +119,7 @@
 
     def release(self):
         if self._owner is not current_thread():
-            raise RuntimeError("cannot release un-aquired lock")
+            raise RuntimeError("cannot release un-acquired lock")
         self._count = count = self._count - 1
         if not count:
             self._owner = None
@@ -211,7 +211,7 @@
 
     def wait(self, timeout=None):
         if not self._is_owned():
-            raise RuntimeError("cannot wait on un-aquired lock")
+            raise RuntimeError("cannot wait on un-acquired lock")
         waiter = _allocate_lock()
         waiter.acquire()
         self._waiters.append(waiter)
@@ -253,7 +253,7 @@
 
     def notify(self, n=1):
         if not self._is_owned():
-            raise RuntimeError("cannot notify on un-aquired lock")
+            raise RuntimeError("cannot notify on un-acquired lock")
         __waiters = self._waiters
         waiters = __waiters[:n]
         if not waiters:

Modified: sandbox/trunk/newgil/Lib/warnings.py
==============================================================================
--- sandbox/trunk/newgil/Lib/warnings.py	(original)
+++ sandbox/trunk/newgil/Lib/warnings.py	Wed Oct 28 11:50:44 2009
@@ -32,7 +32,14 @@
                    append=False):
     """Insert an entry into the list of warnings filters (at the front).
 
-    Use assertions to check that all arguments have the right type."""
+    'action' -- one of "error", "ignore", "always", "default", "module",
+                or "once"
+    'message' -- a regex that the warning message must match
+    'category' -- a class that the warning must be a subclass of
+    'module' -- a regex that the module name must match
+    'lineno' -- an integer line number, 0 matches all warnings
+    'append' -- if true, append to the list of filters
+    """
     import re
     assert action in ("error", "ignore", "always", "default", "module",
                       "once"), "invalid action: %r" % (action,)
@@ -53,6 +60,11 @@
     """Insert a simple entry into the list of warnings filters (at the front).
 
     A simple filter matches all modules and messages.
+    'action' -- one of "error", "ignore", "always", "default", "module",
+                or "once"
+    'category' -- a class that the warning must be a subclass of
+    'lineno' -- an integer line number, 0 matches all warnings
+    'append' -- if true, append to the list of filters
     """
     assert action in ("error", "ignore", "always", "default", "module",
                       "once"), "invalid action: %r" % (action,)

Modified: sandbox/trunk/newgil/Makefile.pre.in
==============================================================================
--- sandbox/trunk/newgil/Makefile.pre.in	(original)
+++ sandbox/trunk/newgil/Makefile.pre.in	Wed Oct 28 11:50:44 2009
@@ -735,7 +735,7 @@
 		- at if which pybuildbot.identify >/dev/null 2>&1; then \
 			pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
 		fi
-		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw
+		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rwW
 
 QUICKTESTOPTS=	$(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
 		test_multibytecodec test_urllib2_localnet test_itertools \

Modified: sandbox/trunk/newgil/Misc/NEWS
==============================================================================
--- sandbox/trunk/newgil/Misc/NEWS	(original)
+++ sandbox/trunk/newgil/Misc/NEWS	Wed Oct 28 11:50:44 2009
@@ -12,6 +12,8 @@
 Core and Builtins
 -----------------
 
+- Remove length limitation when constructing a complex number from a string.
+
 - Issue #1087418: Boost performance of bitwise operations for longs.
 
 - Support for AtheOS has been completely removed from the code base. It was
@@ -115,6 +117,15 @@
 Library
 -------
 
+- Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in
+  Distutils.
+
+- Issue #7218: Fix test_site for win32, the directory comparison was done with
+  an uppercase.
+
+- Issue #7205: Fix a possible deadlock when using a BZ2File object from
+  several threads at once.
+
 - Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.
 
 - Issue #7099: Decimal.is_normal now returns True for numbers with exponent

Modified: sandbox/trunk/newgil/Modules/_ctypes/_ctypes.c
==============================================================================
--- sandbox/trunk/newgil/Modules/_ctypes/_ctypes.c	(original)
+++ sandbox/trunk/newgil/Modules/_ctypes/_ctypes.c	Wed Oct 28 11:50:44 2009
@@ -1865,16 +1865,15 @@
 	}
 	fmt = _ctypes_get_fielddesc(proto_str);
 	if (fmt == NULL) {
-		Py_DECREF((PyObject *)result);
 		PyErr_Format(PyExc_ValueError,
 			     "_type_ '%s' not supported", proto_str);
-		return NULL;
+		goto error;
 	}
 
 	stgdict = (StgDictObject *)PyObject_CallObject(
 		(PyObject *)&PyCStgDict_Type, NULL);
 	if (!stgdict)
-		return NULL;
+		goto error;
 
 	stgdict->ffi_type_pointer = *fmt->pffi_type;
 	stgdict->align = fmt->pffi_type->alignment;
@@ -1889,6 +1888,7 @@
 #endif
 	if (stgdict->format == NULL) {
 		Py_DECREF(result);
+		Py_DECREF(proto);
 		Py_DECREF((PyObject *)stgdict);
 		return NULL;
 	}

Modified: sandbox/trunk/newgil/Modules/_io/_iomodule.h
==============================================================================
--- sandbox/trunk/newgil/Modules/_io/_iomodule.h	(original)
+++ sandbox/trunk/newgil/Modules/_io/_iomodule.h	Wed Oct 28 11:50:44 2009
@@ -70,6 +70,14 @@
  * Offset type for positioning.
  */
 
+/* Printing a variable of type off_t correctly and without producing
+   compiler warnings is surprisingly painful.  We identify an integer
+   type whose size matches off_t and then: (1) cast the off_t to that
+   integer type and (2) use the appropriate conversion specification
+   for printf.  The cast is necessary: gcc complains about formatting
+   a long with "%lld" even when both long and long long have the same
+   precision. */
+
 #if defined(MS_WIN64) || defined(MS_WINDOWS)
 
 /* Windows uses long long for offsets */
@@ -78,26 +86,33 @@
 # define PyLong_FromOff_t   PyLong_FromLongLong
 # define PY_OFF_T_MAX       PY_LLONG_MAX
 # define PY_OFF_T_MIN       PY_LLONG_MIN
-
+# define PY_PRIdOFF         "I64d" /* format to use in printf with type off_t */
+# define PY_OFF_T_COMPAT    PY_LONG_LONG /* type compatible with off_t */
 #else
 
 /* Other platforms use off_t */
 typedef off_t Py_off_t;
-#if (SIZEOF_OFF_T == SIZEOF_SIZE_T)
-# define PyLong_AsOff_t     PyLong_AsSsize_t
-# define PyLong_FromOff_t   PyLong_FromSsize_t
-# define PY_OFF_T_MAX       PY_SSIZE_T_MAX
-# define PY_OFF_T_MIN       PY_SSIZE_T_MIN
-#elif (SIZEOF_OFF_T == SIZEOF_LONG_LONG)
+#if (HAVE_LONG_LONG && SIZEOF_OFF_T == SIZEOF_LONG_LONG)
 # define PyLong_AsOff_t     PyLong_AsLongLong
 # define PyLong_FromOff_t   PyLong_FromLongLong
 # define PY_OFF_T_MAX       PY_LLONG_MAX
 # define PY_OFF_T_MIN       PY_LLONG_MIN
+# define PY_PRIdOFF         "lld"
+# define PY_OFF_T_COMPAT    PY_LONG_LONG
 #elif (SIZEOF_OFF_T == SIZEOF_LONG)
 # define PyLong_AsOff_t     PyLong_AsLong
 # define PyLong_FromOff_t   PyLong_FromLong
 # define PY_OFF_T_MAX       LONG_MAX
 # define PY_OFF_T_MIN       LONG_MIN
+# define PY_PRIdOFF         "ld"
+# define PY_OFF_T_COMPAT    long
+#elif (SIZEOF_OFF_T == SIZEOF_SIZE_T)
+# define PyLong_AsOff_t     PyLong_AsSsize_t
+# define PyLong_FromOff_t   PyLong_FromSsize_t
+# define PY_OFF_T_MAX       PY_SSIZE_T_MAX
+# define PY_OFF_T_MIN       PY_SSIZE_T_MIN
+# define PY_PRIdOFF         "zd"
+# define PY_OFF_T_COMPAT    Py_ssize_t
 #else
 # error off_t does not match either size_t, long, or long long!
 #endif

Modified: sandbox/trunk/newgil/Modules/_io/bufferedio.c
==============================================================================
--- sandbox/trunk/newgil/Modules/_io/bufferedio.c	(original)
+++ sandbox/trunk/newgil/Modules/_io/bufferedio.c	Wed Oct 28 11:50:44 2009
@@ -580,7 +580,8 @@
     if (n < 0) {
         if (!PyErr_Occurred())
             PyErr_Format(PyExc_IOError,
-                         "Raw stream returned invalid position %zd", n);
+                         "Raw stream returned invalid position %" PY_PRIdOFF,
+			 (PY_OFF_T_COMPAT)n);
         return -1;
     }
     self->abs_pos = n;
@@ -612,7 +613,8 @@
     if (n < 0) {
         if (!PyErr_Occurred())
             PyErr_Format(PyExc_IOError,
-                         "Raw stream returned invalid position %zd", n);
+                         "Raw stream returned invalid position %" PY_PRIdOFF,
+			 (PY_OFF_T_COMPAT)n);
         return -1;
     }
     self->abs_pos = n;

Modified: sandbox/trunk/newgil/Modules/_localemodule.c
==============================================================================
--- sandbox/trunk/newgil/Modules/_localemodule.c	(original)
+++ sandbox/trunk/newgil/Modules/_localemodule.c	Wed Oct 28 11:50:44 2009
@@ -281,7 +281,9 @@
     wchar_t *s, *buf = NULL;
     size_t n1, n2;
     PyObject *result = NULL;
+#ifndef HAVE_USABLE_WCHAR_T
     Py_ssize_t i;
+#endif
 
     if (!PyArg_ParseTuple(args, "u#:strxfrm", &s0, &n0))
         return NULL;

Modified: sandbox/trunk/newgil/Modules/_testcapimodule.c
==============================================================================
--- sandbox/trunk/newgil/Modules/_testcapimodule.c	(original)
+++ sandbox/trunk/newgil/Modules/_testcapimodule.c	Wed Oct 28 11:50:44 2009
@@ -627,7 +627,6 @@
 	PyObject *tuple, *obj;
 	Py_UNICODE *value;
 	Py_ssize_t len;
-	int x;
 
 	/* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */
 	/* Just use the macro and check that it compiles */

Modified: sandbox/trunk/newgil/Modules/bz2module.c
==============================================================================
--- sandbox/trunk/newgil/Modules/bz2module.c	(original)
+++ sandbox/trunk/newgil/Modules/bz2module.c	Wed Oct 28 11:50:44 2009
@@ -78,7 +78,12 @@
 
 
 #ifdef WITH_THREAD
-#define ACQUIRE_LOCK(obj) PyThread_acquire_lock(obj->lock, 1)
+#define ACQUIRE_LOCK(obj) do { \
+	if (!PyThread_acquire_lock(obj->lock, 0)) { \
+		Py_BEGIN_ALLOW_THREADS \
+		PyThread_acquire_lock(obj->lock, 1); \
+		Py_END_ALLOW_THREADS \
+	} } while(0)
 #define RELEASE_LOCK(obj) PyThread_release_lock(obj->lock)
 #else
 #define ACQUIRE_LOCK(obj)

Modified: sandbox/trunk/newgil/Modules/readline.c
==============================================================================
--- sandbox/trunk/newgil/Modules/readline.c	(original)
+++ sandbox/trunk/newgil/Modules/readline.c	Wed Oct 28 11:50:44 2009
@@ -802,6 +802,8 @@
 {
 #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
 	rl_completion_append_character ='\0';
+#endif
+#ifdef HAVE_RL_COMPLETION_SUPPRESS_APPEND
 	rl_completion_suppress_append = 0;
 #endif
 	Py_XDECREF(begidx);

Modified: sandbox/trunk/newgil/Objects/complexobject.c
==============================================================================
--- sandbox/trunk/newgil/Objects/complexobject.c	(original)
+++ sandbox/trunk/newgil/Objects/complexobject.c	Wed Oct 28 11:50:44 2009
@@ -740,20 +740,18 @@
 	char *end;
 	double x=0.0, y=0.0, z;
 	int got_bracket=0;
-	char s_buffer[256];
+	char *s_buffer = NULL;
 	Py_ssize_t len;
 
 	if (PyUnicode_Check(v)) {
-		if (PyUnicode_GET_SIZE(v) >= (Py_ssize_t)sizeof(s_buffer)) {
-			PyErr_SetString(PyExc_ValueError,
-				 "complex() literal too large to convert");
-			return NULL;
-		}
+		s_buffer = (char *)PyMem_MALLOC(PyUnicode_GET_SIZE(v) + 1);
+		if (s_buffer == NULL)
+			return PyErr_NoMemory();
 		if (PyUnicode_EncodeDecimal(PyUnicode_AS_UNICODE(v),
 					    PyUnicode_GET_SIZE(v),
 					    s_buffer,
 					    NULL))
-			return NULL;
+			goto error;
 		s = s_buffer;
 		len = strlen(s);
 	}
@@ -802,7 +800,7 @@
 		if (PyErr_ExceptionMatches(PyExc_ValueError))
 			PyErr_Clear();
 		else
-			return NULL;
+			goto error;
 	}
 	if (end != s) {
 		/* all 4 forms starting with <float> land here */
@@ -815,7 +813,7 @@
 				if (PyErr_ExceptionMatches(PyExc_ValueError))
 					PyErr_Clear();
 				else
-					return NULL;
+					goto error;
 			}
 			if (end != s)
 				/* <float><signed-float>j */
@@ -870,11 +868,16 @@
 	if (s-start != len)
 		goto parse_error;
 
+	if (s_buffer)
+		PyMem_FREE(s_buffer);
 	return complex_subtype_from_doubles(type, x, y);
 
   parse_error:
 	PyErr_SetString(PyExc_ValueError,
 			"complex() arg is a malformed string");
+  error:
+	if (s_buffer)
+		PyMem_FREE(s_buffer);
 	return NULL;
 }
 

Modified: sandbox/trunk/newgil/Objects/floatobject.c
==============================================================================
--- sandbox/trunk/newgil/Objects/floatobject.c	(original)
+++ sandbox/trunk/newgil/Objects/floatobject.c	Wed Oct 28 11:50:44 2009
@@ -183,7 +183,7 @@
 	}
 	else if (PyObject_AsCharBuffer(v, &s, &len)) {
 		PyErr_SetString(PyExc_TypeError,
-				"float() argument must be a string or a number");
+			"float() argument must be a string or a number");
 		return NULL;
 	}
 	last = s + len;

Modified: sandbox/trunk/newgil/Objects/unicodeobject.c
==============================================================================
--- sandbox/trunk/newgil/Objects/unicodeobject.c	(original)
+++ sandbox/trunk/newgil/Objects/unicodeobject.c	Wed Oct 28 11:50:44 2009
@@ -7710,10 +7710,10 @@
 }
 
 PyDoc_STRVAR(join__doc__,
-             "S.join(sequence) -> str\n\
+             "S.join(iterable) -> str\n\
 \n\
 Return a string which is the concatenation of the strings in the\n\
-sequence.  The separator between elements is S.");
+iterable.  The separator between elements is S.");
 
 static PyObject*
 unicode_join(PyObject *self, PyObject *data)

Modified: sandbox/trunk/newgil/Python/codecs.c
==============================================================================
--- sandbox/trunk/newgil/Python/codecs.c	(original)
+++ sandbox/trunk/newgil/Python/codecs.c	Wed Oct 28 11:50:44 2009
@@ -957,7 +957,9 @@
 	    {
 		"strict_errors",
 		strict_errors,
-		METH_O
+		METH_O,
+		PyDoc_STR("Implements the 'strict' error handling, which "
+			  "raises a UnicodeError on coding errors.")
 	    }
 	},
 	{
@@ -965,7 +967,9 @@
 	    {
 		"ignore_errors",
 		ignore_errors,
-		METH_O
+		METH_O,
+		PyDoc_STR("Implements the 'ignore' error handling, which "
+			  "ignores malformed data and continues.")
 	    }
 	},
 	{
@@ -973,7 +977,9 @@
 	    {
 		"replace_errors",
 		replace_errors,
-		METH_O
+		METH_O,
+		PyDoc_STR("Implements the 'replace' error handling, which "
+			  "replaces malformed data with a replacement marker.")
 	    }
 	},
 	{
@@ -981,7 +987,10 @@
 	    {
 		"xmlcharrefreplace_errors",
 		xmlcharrefreplace_errors,
-		METH_O
+		METH_O,
+		PyDoc_STR("Implements the 'xmlcharrefreplace' error handling, "
+			  "which replaces an unencodable character with the "
+			  "appropriate XML character reference.")
 	    }
 	},
 	{
@@ -989,7 +998,10 @@
 	    {
 		"backslashreplace_errors",
 		backslashreplace_errors,
-		METH_O
+		METH_O,
+		PyDoc_STR("Implements the 'backslashreplace' error handling, "
+			  "which replaces an unencodable character with a "
+			  "backslashed escape sequence.")
 	    }
 	},
 	{

Modified: sandbox/trunk/newgil/configure
==============================================================================
--- sandbox/trunk/newgil/configure	(original)
+++ sandbox/trunk/newgil/configure	Wed Oct 28 11:50:44 2009
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 75678 .
+# From configure.in Revision: 75684 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 3.2.
 #
@@ -25056,6 +25056,25 @@
 fi
 rm -f conftest*
 
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <readline/readline.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
+_ACEOF
+
+fi
+rm -f conftest*
+
 fi
 
 # check for readline 4.0

Modified: sandbox/trunk/newgil/configure.in
==============================================================================
--- sandbox/trunk/newgil/configure.in	(original)
+++ sandbox/trunk/newgil/configure.in	Wed Oct 28 11:50:44 2009
@@ -3528,6 +3528,10 @@
   [readline/readline.h],
   AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
   [Define if you have readline 2.2]), )
+  AC_EGREP_HEADER([extern int rl_completion_suppress_append;],
+  [readline/readline.h],
+  AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
+  [Define if you have rl_completion_suppress_append]), )
 fi
 
 # check for readline 4.0

Modified: sandbox/trunk/newgil/pyconfig.h.in
==============================================================================
--- sandbox/trunk/newgil/pyconfig.h.in	(original)
+++ sandbox/trunk/newgil/pyconfig.h.in	Wed Oct 28 11:50:44 2009
@@ -533,6 +533,9 @@
 /* Define if you have readline 4.2 */
 #undef HAVE_RL_COMPLETION_MATCHES
 
+/* Define if you have rl_completion_suppress_append */
+#undef HAVE_RL_COMPLETION_SUPPRESS_APPEND
+
 /* Define if you have readline 4.0 */
 #undef HAVE_RL_PRE_INPUT_HOOK
 


More information about the Python-checkins mailing list