[Python-checkins] r63517 - in python/branches/tlee-ast-optimize: Doc/glossary.rst Doc/library/copy.rst Doc/library/copy_reg.rst Doc/library/copyreg.rst Doc/library/future_builtins.rst Doc/library/htmllib.rst Doc/library/htmlparser.rst Doc/library/modulefinder.rst Doc/library/othergui.rst Doc/library/persistence.rst Doc/library/pickle.rst Doc/library/scrolledtext.rst Doc/library/socketserver.rst Doc/library/sys.rst Doc/library/tarfile.rst Doc/library/test.rst Doc/library/tix.rst Doc/library/tk.rst Doc/library/tkinter.rst Doc/library/tkinter.scrolledtext.rst Doc/library/tkinter.tix.rst Doc/library/tkinter.turtle.rst Doc/library/turtle.rst Doc/library/zipfile.rst Doc/whatsnew/2.6.rst Lib/BaseHTTPServer.py Lib/bsddb/test/test_lock.py Lib/bsddb/test/test_sequence.py Lib/copy.py Lib/copy_reg.py Lib/copyreg.py Lib/distutils/tests/test_build_ext.py Lib/idlelib/AutoCompleteWindow.py Lib/idlelib/CallTipWindow.py Lib/idlelib/CodeContext.py Lib/idlelib/ColorDelegator.py Lib/idlelib/Debugger.py Lib/idlelib/EditorWindow.py Lib/idlelib/FileList.py Lib/idlelib/GrepDialog.py Lib/idlelib/IOBinding.py Lib/idlelib/MultiCall.py Lib/idlelib/MultiStatusBar.py Lib/idlelib/ObjectBrowser.py Lib/idlelib/OutputWindow.py Lib/idlelib/Percolator.py Lib/idlelib/PyShell.py Lib/idlelib/ReplaceDialog.py Lib/idlelib/ScriptBinding.py Lib/idlelib/ScrolledList.py Lib/idlelib/SearchDialog.py Lib/idlelib/SearchDialogBase.py Lib/idlelib/SearchEngine.py Lib/idlelib/StackViewer.py Lib/idlelib/ToolTip.py Lib/idlelib/TreeWidget.py Lib/idlelib/UndoDelegator.py Lib/idlelib/WidgetRedirector.py Lib/idlelib/WindowList.py Lib/idlelib/aboutDialog.py Lib/idlelib/configDialog.py Lib/idlelib/configHelpSourceEdit.py Lib/idlelib/configSectionNameDialog.py Lib/idlelib/dynOptionMenuWidget.py Lib/idlelib/keybindingDialog.py Lib/idlelib/macosxSupport.py Lib/idlelib/rpc.py Lib/idlelib/run.py Lib/idlelib/tabbedpages.py Lib/idlelib/textView.py Lib/lib-old/copy_reg.py Lib/lib-tk/Canvas.py Lib/lib-tk/Dialog.py Lib/lib-tk/FileDialog.py Lib/lib-tk/FixTk.py Lib/lib-tk/ScrolledText.py Lib/lib-tk/SimpleDialog.py Lib/lib-tk/Tix.py Lib/lib-tk/Tkconstants.py Lib/lib-tk/Tkdnd.py Lib/lib-tk/Tkinter.py Lib/lib-tk/tkColorChooser.py Lib/lib-tk/tkCommonDialog.py Lib/lib-tk/tkFileDialog.py Lib/lib-tk/tkFont.py Lib/lib-tk/tkMessageBox.py Lib/lib-tk/tkSimpleDialog.py Lib/lib-tk/turtle.py Lib/logging/handlers.py Lib/os.py Lib/pickle.py Lib/pickletools.py Lib/platform.py Lib/poplib.py Lib/pydoc.py Lib/re.py Lib/test/pickletester.py Lib/test/pydoc_mod.py Lib/test/regrtest.py Lib/test/test___all__.py Lib/test/test_collections.py Lib/test/test_copy.py Lib/test/test_copy_reg.py Lib/test/test_copyreg.py Lib/test/test_httpservers.py Lib/test/test_platform.py Lib/test/test_py3kwarn.py Lib/test/test_pyclbr.py Lib/test/test_pydoc.py Lib/test/test_subprocess.py Lib/test/test_weakref.py Lib/test/test_zipfile.py Lib/tkinter Lib/urllib.py Lib/zipfile.py Mac/Modules/gestaltmodule.c Makefile.pre.in Misc/ACKS Misc/NEWS Misc/build.sh Misc/cheatsheet Misc/developers.txt Modules/_bsddb.c Modules/_ctypes/libffi/fficonfig.py.in Modules/cPickle.c Modules/parsermodule.c Objects/fileobject.c Objects/typeobject.c Objects/weakrefobject.c Python/sysmodule.c README setup.py

thomas.lee python-checkins at python.org
Wed May 21 11:25:57 CEST 2008


Author: thomas.lee
Date: Wed May 21 11:25:51 2008
New Revision: 63517

Log:
Merged revisions 63401-63516 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r63402 | raymond.hettinger | 2008-05-17 14:13:36 +1000 (Sat, 17 May 2008) | 1 line
  
  Fix-up docstring
........
  r63403 | gregory.p.smith | 2008-05-17 16:12:02 +1000 (Sat, 17 May 2008) | 4 lines
  
  issue2858: Fix potential memory corruption when bsddb.db.DBEnv.lock_get
  and other bsddb.db object constructors raised an exception.
  Debugging & patch by Neal Norowitz.
........
  r63405 | gregory.p.smith | 2008-05-17 17:17:34 +1000 (Sat, 17 May 2008) | 3 lines
  
  fix issue2381: test_subprocess fails if your sys.executable is on a
  path with a space in it.
........
  r63408 | georg.brandl | 2008-05-18 01:07:03 +1000 (Sun, 18 May 2008) | 2 lines
  
  Tkinter rename: merge tkSimpleDialog and tkFileDialog into simpledialog and filedialog.
........
  r63409 | georg.brandl | 2008-05-18 01:21:58 +1000 (Sun, 18 May 2008) | 2 lines
  
  Tkinter: make stub modules.
........
  r63410 | georg.brandl | 2008-05-18 01:30:35 +1000 (Sun, 18 May 2008) | 2 lines
  
  Move imports to file top.
........
  r63411 | lars.gustaebel | 2008-05-18 02:50:22 +1000 (Sun, 18 May 2008) | 8 lines
  
  Replace signatures with optional arguments in square brackets with
  keyword arguments and the actual default values.
  Fix references that point nowhere or to the wrong place.
  Add description of the ENCODING module-level variable.
  Fix the URL pointing to the GNU tar manual.
  Remove two obsolete examples.
  Add an example on how to use a generator with TarFile.extractall().
........
  r63412 | georg.brandl | 2008-05-18 03:57:01 +1000 (Sun, 18 May 2008) | 2 lines
  
  #961805: fix Edit.text_modified().
........
  r63413 | georg.brandl | 2008-05-18 04:14:43 +1000 (Sun, 18 May 2008) | 2 lines
  
  Rewrap consistently to 70 chars, and standardize the way of referring to issues.
........
  r63414 | georg.brandl | 2008-05-18 04:15:24 +1000 (Sun, 18 May 2008) | 2 lines
  
  Really move the imports to the top this time. :)
........
  r63415 | georg.brandl | 2008-05-18 04:17:45 +1000 (Sun, 18 May 2008) | 3 lines
  
  Don't export a name "tkinter" from the "tkinter" package.
  Else people doing "from tkinter import *" will get a nasty surprise.
........
  r63421 | georg.brandl | 2008-05-18 05:06:20 +1000 (Sun, 18 May 2008) | 2 lines
  
  Add "tkinter" to the list of directories to install.
........
  r63422 | georg.brandl | 2008-05-18 05:14:23 +1000 (Sun, 18 May 2008) | 2 lines
  
  Add new tkinter dir to various locations where lib-tk shows up.
........
  r63425 | benjamin.peterson | 2008-05-18 05:21:20 +1000 (Sun, 18 May 2008) | 2 lines
  
  add Py3k warnings to oct and hex. backport hex behavior (because it's not different)
........
  r63426 | benjamin.peterson | 2008-05-18 05:51:10 +1000 (Sun, 18 May 2008) | 2 lines
  
  fix spelling
........
  r63428 | benjamin.peterson | 2008-05-18 06:09:42 +1000 (Sun, 18 May 2008) | 2 lines
  
  revert 63425 over Guido's Febuary message about this, that I missed
........
  r63430 | fred.drake | 2008-05-18 06:30:04 +1000 (Sun, 18 May 2008) | 3 lines
  
  rename HTMLParser to html.parser, htmlentitydefs to html.entities
  (http://bugs.python.org/issue2882)
........
  r63432 | fred.drake | 2008-05-18 07:14:05 +1000 (Sun, 18 May 2008) | 3 lines
  
  update references and documentation for modules in the new html package
  (http://bugs.python.org/issue2882)
........
  r63434 | fred.drake | 2008-05-18 07:23:02 +1000 (Sun, 18 May 2008) | 3 lines
  
  document the renames for modules moved to the html package
  (http://bugs.python.org/issue2882)
........
  r63438 | georg.brandl | 2008-05-18 07:54:03 +1000 (Sun, 18 May 2008) | 3 lines
  
  Rename html.parser file, and split html.entities from htmllib
  to ease removal of the latter in Py3k.
........
  r63440 | georg.brandl | 2008-05-18 08:11:54 +1000 (Sun, 18 May 2008) | 2 lines
  
  #2353: raise Py3k warning in file.xreadlines().
........
  r63445 | georg.brandl | 2008-05-18 18:52:59 +1000 (Sun, 18 May 2008) | 2 lines
  
  GHOP #180 by Michael Schneider: add examples to the socketserver documentation.
........
  r63446 | georg.brandl | 2008-05-18 19:12:20 +1000 (Sun, 18 May 2008) | 2 lines
  
  GHOP #134, #171, #137: unit tests for the three HTTPServer modules.
........
  r63447 | georg.brandl | 2008-05-18 20:39:26 +1000 (Sun, 18 May 2008) | 3 lines
  
  Take namedtuple item names only from ascii_letters (this blew up on OSX),
  and make sure there are no duplicate names.
........
  r63449 | georg.brandl | 2008-05-18 21:46:51 +1000 (Sun, 18 May 2008) | 2 lines
  
  GHOP #217: add support for compiling Python with coverage checking enabled.
........
  r63450 | georg.brandl | 2008-05-18 21:52:36 +1000 (Sun, 18 May 2008) | 2 lines
  
  GHOP #257: test distutils' build_ext command, written by Josip Dzolonga.
........
  r63452 | georg.brandl | 2008-05-18 23:34:06 +1000 (Sun, 18 May 2008) | 2 lines
  
  Add GHOP students.
........
  r63454 | georg.brandl | 2008-05-19 02:32:48 +1000 (Mon, 19 May 2008) | 2 lines
  
  GHOP #121: improve test_pydoc, by Benjamin Peterson.
........
  r63457 | ronald.oussoren | 2008-05-19 06:09:54 +1000 (Mon, 19 May 2008) | 9 lines
  
  MacOSX: ctypes annotation in implementation of getproxies_macosx_sysconf
  
  getproxies_macosx_sysconf uses ctypes to call SystemConfiguration APIs. This
  checkin adds ctypes annotation to specify the right argument types for the
  API's that are used. 
  
  This is needed to be able to use urllib on a 64-bit system, without 
  annotations you'd get a hard crash.
........
  r63458 | ronald.oussoren | 2008-05-19 06:47:13 +1000 (Mon, 19 May 2008) | 2 lines
  
  Make gestaltmodule.c 64-bit safe.
........
  r63459 | benjamin.peterson | 2008-05-19 06:48:07 +1000 (Mon, 19 May 2008) | 2 lines
  
  bring test_pydoc up to my high standards (now that I have them)
........
  r63460 | ronald.oussoren | 2008-05-19 06:54:47 +1000 (Mon, 19 May 2008) | 6 lines
  
  - Add unittests for platform.mac_ver (or rather, ensure that the unittest for
    that function actually tests something on OSX).
  
  - Add documentation to platform.mac_ver that explains why the middle element
    of the return value will not contain useful information.
........
  r63463 | georg.brandl | 2008-05-19 07:10:19 +1000 (Mon, 19 May 2008) | 2 lines
  
  Fix test_pyclbr after another platform-dependent function was added to urllib.
........
  r63464 | benjamin.peterson | 2008-05-19 08:07:42 +1000 (Mon, 19 May 2008) | 2 lines
  
  fix test_platform (os was not imported)
........
  r63465 | benjamin.peterson | 2008-05-19 09:07:07 +1000 (Mon, 19 May 2008) | 2 lines
  
  change some imports in tests so they will not be skipped in 3.0
........
  r63467 | andrew.kuchling | 2008-05-19 13:03:46 +1000 (Mon, 19 May 2008) | 1 line
  
  Re-organize the increasingly long list of deprecated modules
........
  r63468 | benjamin.peterson | 2008-05-19 21:55:54 +1000 (Mon, 19 May 2008) | 2 lines
  
  just MacOS (instead of MacOS 9)
........
  r63469 | jesus.cea | 2008-05-20 01:55:11 +1000 (Tue, 20 May 2008) | 1 line
  
  bsddb: Beware with sequence wrapping
........
  r63470 | georg.brandl | 2008-05-20 02:47:25 +1000 (Tue, 20 May 2008) | 2 lines
  
  test_httpservers has unpredictable refcount behavior.
........
  r63480 | neal.norwitz | 2008-05-20 15:21:57 +1000 (Tue, 20 May 2008) | 1 line
  
  Add html package so it gets installed and more tests work (from installed copy)
........
  r63481 | fred.drake | 2008-05-20 16:08:38 +1000 (Tue, 20 May 2008) | 3 lines
  
  revert creation of the html.entities and html.parser modules
  (http://bugs.python.org/issue2882)
........
  r63483 | georg.brandl | 2008-05-20 16:15:36 +1000 (Tue, 20 May 2008) | 2 lines
  
  Activate two more test cases in test_httpservers.
........
  r63484 | georg.brandl | 2008-05-20 16:47:31 +1000 (Tue, 20 May 2008) | 2 lines
  
  Argh, this is the *actual* test that works under Windows.
........
  r63485 | georg.brandl | 2008-05-20 16:49:28 +1000 (Tue, 20 May 2008) | 2 lines
  
  Tkinter renaming reversal: Delete all stubs from lib-tk.
........
  r63486 | georg.brandl | 2008-05-20 16:58:21 +1000 (Tue, 20 May 2008) | 2 lines
  
  Tkinter renaming reversal: move modules back in their place.
........
  r63487 | georg.brandl | 2008-05-20 17:13:37 +1000 (Tue, 20 May 2008) | 2 lines
  
  Tkinter rename reversal: remove tkinter package, adapt imports and docs.
........
  r63488 | georg.brandl | 2008-05-20 17:20:12 +1000 (Tue, 20 May 2008) | 2 lines
  
  Add notes that tkinter modules will be renamed.
........
  r63489 | georg.brandl | 2008-05-20 17:21:58 +1000 (Tue, 20 May 2008) | 2 lines
  
  Standardize renaming notes.
........
  r63490 | georg.brandl | 2008-05-20 17:23:25 +1000 (Tue, 20 May 2008) | 2 lines
  
  Remove rest of the tkinter package.
........
  r63491 | georg.brandl | 2008-05-20 17:23:59 +1000 (Tue, 20 May 2008) | 2 lines
  
  Remove debugging line.
........
  r63493 | georg.brandl | 2008-05-20 17:49:57 +1000 (Tue, 20 May 2008) | 2 lines
  
  Revert copy_reg -> copyreg rename.
........
  r63494 | georg.brandl | 2008-05-20 17:52:27 +1000 (Tue, 20 May 2008) | 2 lines
  
  Remove directories that no longer exist.
........
  r63495 | georg.brandl | 2008-05-20 17:58:42 +1000 (Tue, 20 May 2008) | 2 lines
  
  Remove html package and fix test_htmlparser.
........
  r63496 | georg.brandl | 2008-05-20 18:07:36 +1000 (Tue, 20 May 2008) | 2 lines
  
  Improve diffing logic and output for test_pydoc.
........
  r63497 | georg.brandl | 2008-05-20 18:10:03 +1000 (Tue, 20 May 2008) | 2 lines
  
  Use inspect.getabsfile() to get the documented module's filename.
........
  r63498 | martin.v.loewis | 2008-05-20 18:11:19 +1000 (Tue, 20 May 2008) | 2 lines
  
  Patch #2488: Add sys.maxsize.
........
  r63499 | georg.brandl | 2008-05-20 18:25:48 +1000 (Tue, 20 May 2008) | 3 lines
  
  Patch #1775025: allow opening zipfile members via ZipInfo instances.
  Patch by Graham Horler.
........
  r63500 | georg.brandl | 2008-05-20 18:40:43 +1000 (Tue, 20 May 2008) | 2 lines
  
  #2592: delegate nb_index and the floor/truediv slots in weakref.proxy.
........
  r63501 | georg.brandl | 2008-05-20 18:48:34 +1000 (Tue, 20 May 2008) | 2 lines
  
  #615772: raise a more explicit error from Tkinter.Misc.__contains__.
........
  r63507 | vinay.sajip | 2008-05-21 01:34:36 +1000 (Wed, 21 May 2008) | 1 line
  
  Fixed: #2914 (RFE for UTC support in TimedRotatingFileHandler) and #2929 (wrong filename used to delete old log files).
........
  r63508 | vinay.sajip | 2008-05-21 01:37:22 +1000 (Wed, 21 May 2008) | 1 line
  
  Updated with fixes for #2914 and #2929.
........
  r63511 | thomas.heller | 2008-05-21 05:53:47 +1000 (Wed, 21 May 2008) | 6 lines
  
  On HPUX, -fPIC must be used for linking.  _ctypes now builds on HP-UX
  IA64 and PA machines.
  
  The ctypes unittests work fine on the IA64, but dump core in
  test_qsort on the PA.
........
  r63513 | brett.cannon | 2008-05-21 08:08:20 +1000 (Wed, 21 May 2008) | 2 lines
  
  Add a note about the renaming of test.test_support in 3.0.
........
  r63516 | martin.v.loewis | 2008-05-21 17:31:31 +1000 (Wed, 21 May 2008) | 2 lines
  
  Add Robert Schuppenies.
........


Added:
   python/branches/tlee-ast-optimize/Doc/library/copy_reg.rst
      - copied unchanged from r63516, /python/trunk/Doc/library/copy_reg.rst
   python/branches/tlee-ast-optimize/Doc/library/scrolledtext.rst
      - copied unchanged from r63516, /python/trunk/Doc/library/scrolledtext.rst
   python/branches/tlee-ast-optimize/Doc/library/tix.rst
      - copied unchanged from r63516, /python/trunk/Doc/library/tix.rst
   python/branches/tlee-ast-optimize/Doc/library/turtle.rst
      - copied unchanged from r63516, /python/trunk/Doc/library/turtle.rst
   python/branches/tlee-ast-optimize/Lib/copy_reg.py
      - copied unchanged from r63516, /python/trunk/Lib/copy_reg.py
   python/branches/tlee-ast-optimize/Lib/distutils/tests/test_build_ext.py
      - copied unchanged from r63516, /python/trunk/Lib/distutils/tests/test_build_ext.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/Dialog.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/Dialog.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/FileDialog.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/FileDialog.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/FixTk.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/FixTk.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/ScrolledText.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/ScrolledText.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/SimpleDialog.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/SimpleDialog.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/Tix.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/Tix.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/Tkconstants.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/Tkconstants.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/Tkdnd.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/Tkdnd.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/Tkinter.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/Tkinter.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/tkColorChooser.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/tkColorChooser.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/tkCommonDialog.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/tkCommonDialog.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/tkFileDialog.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/tkFileDialog.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/tkFont.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/tkFont.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/tkMessageBox.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/tkMessageBox.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/tkSimpleDialog.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/tkSimpleDialog.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/turtle.py
      - copied unchanged from r63516, /python/trunk/Lib/lib-tk/turtle.py
   python/branches/tlee-ast-optimize/Lib/test/pydoc_mod.py
      - copied unchanged from r63516, /python/trunk/Lib/test/pydoc_mod.py
   python/branches/tlee-ast-optimize/Lib/test/test_copy_reg.py
      - copied unchanged from r63516, /python/trunk/Lib/test/test_copy_reg.py
   python/branches/tlee-ast-optimize/Lib/test/test_httpservers.py
      - copied unchanged from r63516, /python/trunk/Lib/test/test_httpservers.py
Removed:
   python/branches/tlee-ast-optimize/Doc/library/copyreg.rst
   python/branches/tlee-ast-optimize/Doc/library/tkinter.scrolledtext.rst
   python/branches/tlee-ast-optimize/Doc/library/tkinter.tix.rst
   python/branches/tlee-ast-optimize/Doc/library/tkinter.turtle.rst
   python/branches/tlee-ast-optimize/Lib/copyreg.py
   python/branches/tlee-ast-optimize/Lib/lib-old/copy_reg.py
   python/branches/tlee-ast-optimize/Lib/test/test_copyreg.py
   python/branches/tlee-ast-optimize/Lib/tkinter/
Modified:
   python/branches/tlee-ast-optimize/   (props changed)
   python/branches/tlee-ast-optimize/Doc/glossary.rst
   python/branches/tlee-ast-optimize/Doc/library/copy.rst
   python/branches/tlee-ast-optimize/Doc/library/future_builtins.rst
   python/branches/tlee-ast-optimize/Doc/library/htmllib.rst
   python/branches/tlee-ast-optimize/Doc/library/htmlparser.rst
   python/branches/tlee-ast-optimize/Doc/library/modulefinder.rst
   python/branches/tlee-ast-optimize/Doc/library/othergui.rst
   python/branches/tlee-ast-optimize/Doc/library/persistence.rst
   python/branches/tlee-ast-optimize/Doc/library/pickle.rst
   python/branches/tlee-ast-optimize/Doc/library/socketserver.rst
   python/branches/tlee-ast-optimize/Doc/library/sys.rst
   python/branches/tlee-ast-optimize/Doc/library/tarfile.rst
   python/branches/tlee-ast-optimize/Doc/library/test.rst
   python/branches/tlee-ast-optimize/Doc/library/tk.rst
   python/branches/tlee-ast-optimize/Doc/library/tkinter.rst
   python/branches/tlee-ast-optimize/Doc/library/zipfile.rst
   python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst
   python/branches/tlee-ast-optimize/Lib/BaseHTTPServer.py
   python/branches/tlee-ast-optimize/Lib/bsddb/test/test_lock.py
   python/branches/tlee-ast-optimize/Lib/bsddb/test/test_sequence.py
   python/branches/tlee-ast-optimize/Lib/copy.py
   python/branches/tlee-ast-optimize/Lib/idlelib/AutoCompleteWindow.py
   python/branches/tlee-ast-optimize/Lib/idlelib/CallTipWindow.py
   python/branches/tlee-ast-optimize/Lib/idlelib/CodeContext.py
   python/branches/tlee-ast-optimize/Lib/idlelib/ColorDelegator.py
   python/branches/tlee-ast-optimize/Lib/idlelib/Debugger.py
   python/branches/tlee-ast-optimize/Lib/idlelib/EditorWindow.py
   python/branches/tlee-ast-optimize/Lib/idlelib/FileList.py
   python/branches/tlee-ast-optimize/Lib/idlelib/GrepDialog.py
   python/branches/tlee-ast-optimize/Lib/idlelib/IOBinding.py
   python/branches/tlee-ast-optimize/Lib/idlelib/MultiCall.py
   python/branches/tlee-ast-optimize/Lib/idlelib/MultiStatusBar.py
   python/branches/tlee-ast-optimize/Lib/idlelib/ObjectBrowser.py
   python/branches/tlee-ast-optimize/Lib/idlelib/OutputWindow.py
   python/branches/tlee-ast-optimize/Lib/idlelib/Percolator.py
   python/branches/tlee-ast-optimize/Lib/idlelib/PyShell.py
   python/branches/tlee-ast-optimize/Lib/idlelib/ReplaceDialog.py
   python/branches/tlee-ast-optimize/Lib/idlelib/ScriptBinding.py
   python/branches/tlee-ast-optimize/Lib/idlelib/ScrolledList.py
   python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialog.py
   python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialogBase.py
   python/branches/tlee-ast-optimize/Lib/idlelib/SearchEngine.py
   python/branches/tlee-ast-optimize/Lib/idlelib/StackViewer.py
   python/branches/tlee-ast-optimize/Lib/idlelib/ToolTip.py
   python/branches/tlee-ast-optimize/Lib/idlelib/TreeWidget.py
   python/branches/tlee-ast-optimize/Lib/idlelib/UndoDelegator.py
   python/branches/tlee-ast-optimize/Lib/idlelib/WidgetRedirector.py
   python/branches/tlee-ast-optimize/Lib/idlelib/WindowList.py
   python/branches/tlee-ast-optimize/Lib/idlelib/aboutDialog.py
   python/branches/tlee-ast-optimize/Lib/idlelib/configDialog.py
   python/branches/tlee-ast-optimize/Lib/idlelib/configHelpSourceEdit.py
   python/branches/tlee-ast-optimize/Lib/idlelib/configSectionNameDialog.py
   python/branches/tlee-ast-optimize/Lib/idlelib/dynOptionMenuWidget.py
   python/branches/tlee-ast-optimize/Lib/idlelib/keybindingDialog.py
   python/branches/tlee-ast-optimize/Lib/idlelib/macosxSupport.py
   python/branches/tlee-ast-optimize/Lib/idlelib/rpc.py
   python/branches/tlee-ast-optimize/Lib/idlelib/run.py
   python/branches/tlee-ast-optimize/Lib/idlelib/tabbedpages.py
   python/branches/tlee-ast-optimize/Lib/idlelib/textView.py
   python/branches/tlee-ast-optimize/Lib/lib-tk/Canvas.py
   python/branches/tlee-ast-optimize/Lib/logging/handlers.py
   python/branches/tlee-ast-optimize/Lib/os.py
   python/branches/tlee-ast-optimize/Lib/pickle.py
   python/branches/tlee-ast-optimize/Lib/pickletools.py
   python/branches/tlee-ast-optimize/Lib/platform.py
   python/branches/tlee-ast-optimize/Lib/poplib.py
   python/branches/tlee-ast-optimize/Lib/pydoc.py
   python/branches/tlee-ast-optimize/Lib/re.py
   python/branches/tlee-ast-optimize/Lib/test/pickletester.py
   python/branches/tlee-ast-optimize/Lib/test/regrtest.py
   python/branches/tlee-ast-optimize/Lib/test/test___all__.py
   python/branches/tlee-ast-optimize/Lib/test/test_collections.py
   python/branches/tlee-ast-optimize/Lib/test/test_copy.py
   python/branches/tlee-ast-optimize/Lib/test/test_platform.py
   python/branches/tlee-ast-optimize/Lib/test/test_py3kwarn.py
   python/branches/tlee-ast-optimize/Lib/test/test_pyclbr.py
   python/branches/tlee-ast-optimize/Lib/test/test_pydoc.py
   python/branches/tlee-ast-optimize/Lib/test/test_subprocess.py
   python/branches/tlee-ast-optimize/Lib/test/test_weakref.py
   python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py
   python/branches/tlee-ast-optimize/Lib/urllib.py
   python/branches/tlee-ast-optimize/Lib/zipfile.py
   python/branches/tlee-ast-optimize/Mac/Modules/gestaltmodule.c
   python/branches/tlee-ast-optimize/Makefile.pre.in
   python/branches/tlee-ast-optimize/Misc/ACKS
   python/branches/tlee-ast-optimize/Misc/NEWS
   python/branches/tlee-ast-optimize/Misc/build.sh
   python/branches/tlee-ast-optimize/Misc/cheatsheet
   python/branches/tlee-ast-optimize/Misc/developers.txt
   python/branches/tlee-ast-optimize/Modules/_bsddb.c
   python/branches/tlee-ast-optimize/Modules/_ctypes/libffi/fficonfig.py.in
   python/branches/tlee-ast-optimize/Modules/cPickle.c
   python/branches/tlee-ast-optimize/Modules/parsermodule.c
   python/branches/tlee-ast-optimize/Objects/fileobject.c
   python/branches/tlee-ast-optimize/Objects/typeobject.c
   python/branches/tlee-ast-optimize/Objects/weakrefobject.c
   python/branches/tlee-ast-optimize/Python/sysmodule.c
   python/branches/tlee-ast-optimize/README
   python/branches/tlee-ast-optimize/setup.py

Modified: python/branches/tlee-ast-optimize/Doc/glossary.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/glossary.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/glossary.rst	Wed May 21 11:25:51 2008
@@ -16,6 +16,14 @@
       The typical Python prompt of the interactive shell when entering code for
       an indented code block.
 
+   2to3
+      A tool that tries to convert Python 2.x code to Python 3.x code by
+      handling most of the incompatibilites that can be detected by parsing the
+      source and traversing the parse tree.
+
+      2to3 is available in the standard library as :mod:`lib2to3`; a standalone
+      entry point is provided as :file:`Tools/scripts/2to3`.
+
    argument
       A value passed to a function or method, assigned to a name local to
       the body.  A function or method may have both positional arguments and

Modified: python/branches/tlee-ast-optimize/Doc/library/copy.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/copy.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/copy.rst	Wed May 21 11:25:51 2008
@@ -63,7 +63,7 @@
 
 Classes can use the same interfaces to control copying that they use to control
 pickling.  See the description of module :mod:`pickle` for information on these
-methods.  The :mod:`copy` module does not use the :mod:`copyreg` registration
+methods.  The :mod:`copy` module does not use the :mod:`copy_reg` registration
 module.
 
 .. index::

Deleted: python/branches/tlee-ast-optimize/Doc/library/copyreg.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/copyreg.rst	Wed May 21 11:25:51 2008
+++ (empty file)
@@ -1,48 +0,0 @@
-:mod:`copyreg` --- Register :mod:`pickle` support functions
-===========================================================
-
-.. module:: copy_reg
-   :synopsis: Old name for the copyreg module.
-
-.. module:: copyreg
-   :synopsis: Register pickle support functions.
-
-.. note::
-   The :mod:`copy_reg` module has been renamed to :mod:`copyreg` in Python 3.0.
-   It is importable under both names in Python 2.6 and the rest of the 2.x
-   series.
-
-.. index::
-   module: pickle
-   module: cPickle
-   module: copy
-
-The :mod:`copyreg` module provides support for the :mod:`pickle` and
-:mod:`cPickle` modules.  The :mod:`copy` module is likely to use this in the
-future as well.  It provides configuration information about object constructors
-which are not classes.  Such constructors may be factory functions or class
-instances.
-
-
-.. function:: constructor(object)
-
-   Declares *object* to be a valid constructor.  If *object* is not callable (and
-   hence not valid as a constructor), raises :exc:`TypeError`.
-
-
-.. function:: pickle(type, function[, constructor])
-
-   Declares that *function* should be used as a "reduction" function for objects of
-   type *type*; *type* must not be a "classic" class object.  (Classic classes are
-   handled differently; see the documentation for the :mod:`pickle` module for
-   details.)  *function* should return either a string or a tuple containing two or
-   three elements.
-
-   The optional *constructor* parameter, if provided, is a callable object which
-   can be used to reconstruct the object when called with the tuple of arguments
-   returned by *function* at pickling time.  :exc:`TypeError` will be raised if
-   *object* is a class or *constructor* is not callable.
-
-   See the :mod:`pickle` module for more details on the interface expected of
-   *function* and *constructor*.
-

Modified: python/branches/tlee-ast-optimize/Doc/library/future_builtins.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/future_builtins.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/future_builtins.rst	Wed May 21 11:25:51 2008
@@ -15,7 +15,7 @@
 
    ... code using Python 3-style map and filter ...
 
-The :program:`2to3` tool that ports Python 2 code to Python 3 will recognize
+The :term:`2to3` tool that ports Python 2 code to Python 3 will recognize
 this usage and leave the new builtins alone.
 
 .. note::

Modified: python/branches/tlee-ast-optimize/Doc/library/htmllib.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/htmllib.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/htmllib.rst	Wed May 21 11:25:51 2008
@@ -156,6 +156,12 @@
    :synopsis: Definitions of HTML general entities.
 .. sectionauthor:: Fred L. Drake, Jr. <fdrake at acm.org>
 
+.. note::
+
+   The :mod:`htmlentitydefs` module has been renamed to :mod:`html.entities` in
+   Python 3.0.  The :term:`2to3` tool will automatically adapt imports when
+   converting your sources to 3.0.
+
 
 This module defines three dictionaries, ``name2codepoint``, ``codepoint2name``,
 and ``entitydefs``. ``entitydefs`` is used by the :mod:`htmllib` module to

Modified: python/branches/tlee-ast-optimize/Doc/library/htmlparser.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/htmlparser.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/htmlparser.rst	Wed May 21 11:25:51 2008
@@ -5,6 +5,12 @@
 .. module:: HTMLParser
    :synopsis: A simple parser that can handle HTML and XHTML.
 
+.. note::
+
+   The :mod:`HTMLParser` module has been renamed to :mod:`html.parser` in Python
+   3.0.  The :term:`2to3` tool will automatically adapt imports when converting
+   your sources to 3.0.
+
 
 .. versionadded:: 2.2
 
@@ -22,7 +28,7 @@
 
    The :class:`HTMLParser` class is instantiated without arguments.
 
-   An HTMLParser instance is fed HTML data and calls handler functions when tags
+   An :class:`HTMLParser` instance is fed HTML data and calls handler functions when tags
    begin and end.  The :class:`HTMLParser` class is meant to be overridden by the
    user to provide a desired behavior.
 
@@ -92,7 +98,7 @@
    ``handle_starttag('a', [('href', 'http://www.cwi.nl/')])``.
 
    .. versionchanged:: 2.6
-      All entity references from htmlentitydefs are now replaced in the attribute
+      All entity references from :mod:`htmlentitydefs` are now replaced in the attribute
       values.
 
 

Modified: python/branches/tlee-ast-optimize/Doc/library/modulefinder.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/modulefinder.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/modulefinder.rst	Wed May 21 11:25:51 2008
@@ -97,7 +97,7 @@
 
     Loaded modules:
     _types:
-    copyreg:  _inverted_registry,_slotnames,__all__
+    copy_reg:  _inverted_registry,_slotnames,__all__
     sre_compile:  isstring,_sre,_optimize_unicode
     _sre:
     sre_constants:  REPEAT_ONE,makedict,AT_END_LINE

Modified: python/branches/tlee-ast-optimize/Doc/library/othergui.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/othergui.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/othergui.rst	Wed May 21 11:25:51 2008
@@ -3,13 +3,13 @@
 Other Graphical User Interface Packages
 =======================================
 
-There are an number of extension widget sets to :mod:`tkinter`.
+There are an number of extension widget sets to :mod:`Tkinter`.
 
 .. seealso::
 
    `Python megawidgets <http://pmw.sourceforge.net/>`_
       is a toolkit for building high-level compound widgets in Python using the
-      :mod:`tkinter` package.  It consists of a set of base classes and a library of
+      :mod:`Tkinter` module.  It consists of a set of base classes and a library of
       flexible and extensible megawidgets built on this foundation. These megawidgets
       include notebooks, comboboxes, selection widgets, paned widgets, scrolled
       widgets, dialog windows, etc.  Also, with the Pmw.Blt interface to BLT, the

Modified: python/branches/tlee-ast-optimize/Doc/library/persistence.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/persistence.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/persistence.rst	Wed May 21 11:25:51 2008
@@ -19,7 +19,7 @@
 .. toctree::
 
    pickle.rst
-   copyreg.rst
+   copy_reg.rst
    shelve.rst
    marshal.rst
    anydbm.rst

Modified: python/branches/tlee-ast-optimize/Doc/library/pickle.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/pickle.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/pickle.rst	Wed May 21 11:25:51 2008
@@ -535,7 +535,7 @@
 and calls :meth:`__reduce__`.
 
 An alternative to implementing a :meth:`__reduce__` method on the object to be
-pickled, is to register the callable with the :mod:`copyreg` module.  This
+pickled, is to register the callable with the :mod:`copy_reg` module.  This
 module provides a way for programs to register "reduction functions" and
 constructors for user-defined types.   Reduction functions have the same
 semantics and interface as the :meth:`__reduce__` method described above, except
@@ -786,7 +786,7 @@
 
 .. seealso::
 
-   Module :mod:`copyreg`
+   Module :mod:`copy_reg`
       Pickle interface constructor registration for extension types.
 
    Module :mod:`shelve`

Modified: python/branches/tlee-ast-optimize/Doc/library/socketserver.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/socketserver.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/socketserver.rst	Wed May 21 11:25:51 2008
@@ -244,8 +244,8 @@
 
 .. function:: handle_timeout()
 
-   This function is called when the :attr:`timeout` attribute has been set to a 
-   value other than :const:`None` and the timeout period has passed with no 
+   This function is called when the :attr:`timeout` attribute has been set to a
+   value other than :const:`None` and the timeout period has passed with no
    requests being received.  The default action for forking servers is
    to collect the status of any child processes that have exited, while
    in threading servers this method does nothing.
@@ -292,27 +292,28 @@
 
 .. function:: finish()
 
-   Called after the :meth:`handle` method to perform any clean-up actions required.
-   The default implementation does nothing.  If :meth:`setup` or :meth:`handle`
-   raise an exception, this function will not be called.
+   Called after the :meth:`handle` method to perform any clean-up actions
+   required.  The default implementation does nothing.  If :meth:`setup` or
+   :meth:`handle` raise an exception, this function will not be called.
 
 
 .. function:: handle()
 
-   This function must do all the work required to service a request. The default
-   implementation does nothing. Several instance attributes are available to it;
-   the request is available as :attr:`self.request`; the client address as
-   :attr:`self.client_address`; and the server instance as :attr:`self.server`, in
-   case it needs access to per-server information.
-
-   The type of :attr:`self.request` is different for datagram or stream services.
-   For stream services, :attr:`self.request` is a socket object; for datagram
-   services, :attr:`self.request` is a string. However, this can be hidden by using
-   the  request handler subclasses :class:`StreamRequestHandler` or
-   :class:`DatagramRequestHandler`, which override the :meth:`setup` and
-   :meth:`finish` methods, and provide :attr:`self.rfile` and :attr:`self.wfile`
-   attributes. :attr:`self.rfile` and :attr:`self.wfile` can be read or written,
-   respectively, to get the request data or return data to the client.
+   This function must do all the work required to service a request.  The
+   default implementation does nothing.  Several instance attributes are
+   available to it; the request is available as :attr:`self.request`; the client
+   address as :attr:`self.client_address`; and the server instance as
+   :attr:`self.server`, in case it needs access to per-server information.
+
+   The type of :attr:`self.request` is different for datagram or stream
+   services.  For stream services, :attr:`self.request` is a socket object; for
+   datagram services, :attr:`self.request` is a pair of string and socket.
+   However, this can be hidden by using the request handler subclasses
+   :class:`StreamRequestHandler` or :class:`DatagramRequestHandler`, which
+   override the :meth:`setup` and :meth:`finish` methods, and provide
+   :attr:`self.rfile` and :attr:`self.wfile` attributes.  :attr:`self.rfile` and
+   :attr:`self.wfile` can be read or written, respectively, to get the request
+   data or return data to the client.
 
 
 .. function:: setup()
@@ -320,3 +321,217 @@
    Called before the :meth:`handle` method to perform any initialization actions
    required.  The default implementation does nothing.
 
+
+Examples
+--------
+
+:class:`socketserver.TCPServer` Example
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This is the server side::
+
+   import socketserver
+
+   class MyTCPHandler(socketserver.BaseRequestHandler):
+       """
+       The RequestHandler class for our server.
+
+       It is instantiated once per connection to the server, and must
+       override the handle() method to implement communication to the
+       client.
+       """
+
+       def handle(self):
+           # self.request is the TCP socket connected to the client
+           self.data = self.request.recv(1024).strip()
+           print "%s wrote:" % self.client_address[0]
+           print self.data
+           # just send back the same data, but upper-cased
+           self.request.send(self.data.upper())
+
+   if __name__ == "__main__":
+       HOST, PORT = "localhost", 9999
+
+       # Create the server, binding to localhost on port 9999
+       server = socketserver.TCPServer((HOST, PORT), MyTCPHandler)
+
+       # Activate the server; this will keep running until you
+       # interrupt the program with Ctrl-C
+       server.serve_forever()
+
+An alternative request handler class that makes use of streams (file-like
+objects that simplify communication by providing the standard file interface)::
+
+   class MyTCPHandler(socketserver.StreamRequestHandler):
+
+       def handle(self):
+           # self.rfile is a file-like object created by the handler;
+           # we can now use e.g. readline() instead of raw recv() calls
+           self.data = self.rfile.readline().strip()
+           print "%s wrote:" % self.client_address[0]
+           print self.data
+           # Likewise, self.wfile is a file-like object used to write back
+           # to the client
+           self.wfile.write(self.data.upper())
+
+The difference is that the ``readline()`` call in the second handler will call
+``recv()`` multiple times until it encounters a newline character, while the
+single ``recv()`` call in the first handler will just return what has been sent
+from the client in one ``send()`` call.
+
+
+This is the client side::
+
+   import socket
+   import sys
+
+   HOST, PORT = "localhost", 9999
+   data = " ".join(sys.argv[1:])
+
+   # Create a socket (SOCK_STREAM means a TCP socket)
+   sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+   # Connect to server and send data
+   sock.connect((HOST, PORT))
+   sock.send(data + "\n")
+
+   # Receive data from the server and shut down
+   received = sock.recv(1024)
+   sock.close()
+
+   print "Sent:     %s" % data
+   print "Received: %s" % received
+
+
+The output of the example should look something like this:
+
+Server::
+
+   $ python TCPServer.py
+   127.0.0.1 wrote:
+   hello world with TCP
+   127.0.0.1 wrote:
+   python is nice
+
+Client::
+
+   $ python TCPClient.py hello world with TCP
+   Sent:     hello world with TCP
+   Received: HELLO WORLD WITH TCP
+   $ python TCPClient.py python is nice
+   Sent:     python is nice
+   Received: PYTHON IS NICE
+
+
+:class:`socketserver.UDPServer` Example
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This is the server side::
+
+   import socketserver
+
+   class MyUDPHandler(socketserver.BaseRequestHandler):
+       """
+       This class works similar to the TCP handler class, except that
+       self.request consists of a pair of data and client socket, and since
+       there is no connection the client address must be given explicitly
+       when sending data back via sendto().
+       """
+
+       def handle(self):
+           data = self.request[0].strip()
+           socket = self.request[1]
+           print "%s wrote:" % self.client_address[0]
+           print data
+           socket.sendto(data.upper(), self.client_address)
+
+   if __name__ == "__main__":
+      HOST, PORT = "localhost", 9999
+      server = socketserver.UDPServer((HOST, PORT), BaseUDPRequestHandler)
+      server.serve_forever()
+
+This is the client side::
+
+   import socket
+   import sys
+
+   HOST, PORT = "localhost"
+   data = " ".join(sys.argv[1:])
+
+   # SOCK_DGRAM is the socket type to use for UDP sockets
+   sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+
+   # As you can see, there is no connect() call; UDP has no connections.
+   # Instead, data is directly sent to the recipient via sendto().
+   sock.sendto(data + "\n", (HOST, PORT))
+   received = sock.recv(1024)
+
+   print "Sent:     %s" % data
+   print "Received: %s" % received
+
+The output of the example should look exactly like for the TCP server example.
+
+
+Asynchronous Mixins
+~~~~~~~~~~~~~~~~~~~
+
+To build asynchronous handlers, use the :class:`ThreadingMixIn` and
+:class:`ForkingMixIn` classes.
+
+An example for the :class:`ThreadingMixIn` class::
+
+   import socket
+   import threading
+   import socketserver
+
+   class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
+
+       def handle(self):
+           data = self.request.recv(1024)
+           cur_thread = threading.currentThread()
+           response = "%s: %s" % (cur_thread.getName(), data)
+           self.request.send(response)
+
+   class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
+       pass
+
+   def client(ip, port, message):
+       sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+       sock.connect((ip, port))
+       sock.send(message)
+       response = sock.recv(1024)
+       print "Received: %s" % response
+       sock.close()
+
+   if __name__ == "__main__":
+       # Port 0 means to select an arbitrary unused port
+       HOST, PORT = "localhost", 0
+
+       server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
+       ip, port = server.server_address
+
+       # Start a thread with the server -- that thread will then start one
+       # more thread for each request
+       server_thread = threading.Thread(target=server.serve_forever)
+       # Exit the server thread when the main thread terminates
+       server_thread.setDaemon(True)
+       server_thread.start()
+       print "Server loop running in thread:", t.getName()
+
+       client(ip, port, "Hello World 1")
+       client(ip, port, "Hello World 2")
+       client(ip, port, "Hello World 3")
+
+       server.shutdown()
+
+The output of the example should look something like this::
+
+   $ python ThreadedTCPServer.py
+   Server loop running in thread: Thread-1
+   Received: Thread-2: Hello World 1
+   Received: Thread-3: Hello World 2
+   Received: Thread-4: Hello World 3
+
+
+The :class:`ForkingMixIn` class is used in the same way, except that the server
+will spawn a new process for each request.

Modified: python/branches/tlee-ast-optimize/Doc/library/sys.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/sys.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/sys.rst	Wed May 21 11:25:51 2008
@@ -521,6 +521,11 @@
    is at least 2\*\*31-1.  The largest negative integer is ``-maxint-1`` --- the
    asymmetry results from the use of 2's complement binary arithmetic.
 
+.. data:: maxsize
+
+   The largest positive integer supported by the platform's Py_ssize_t type,
+   and thus the maximum size lists, strings, dicts, and many other containers
+   can have.
 
 .. data:: maxunicode
 

Modified: python/branches/tlee-ast-optimize/Doc/library/tarfile.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/tarfile.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/tarfile.rst	Wed May 21 11:25:51 2008
@@ -34,10 +34,8 @@
   character devices and block devices and is able to acquire and restore file
   information like timestamp, access permissions and owner.
 
-* can handle tape devices.
 
-
-.. function:: open(name[, mode[, fileobj[, bufsize]]], **kwargs)
+.. function:: open(name=None, mode='r', fileobj=None, bufsize=10240, \*\*kwargs)
 
    Return a :class:`TarFile` object for the pathname *name*. For detailed
    information on :class:`TarFile` objects and the keyword arguments that are
@@ -78,7 +76,7 @@
    for *name*. It is supposed to be at position 0.
 
    For special purposes, there is a second format for *mode*:
-   ``'filemode|[compression]'``.  :func:`open` will return a :class:`TarFile`
+   ``'filemode|[compression]'``.  :func:`tarfile.open` will return a :class:`TarFile`
    object that processes its data as a stream of blocks.  No random seeking will
    be done on the file. If given, *fileobj* may be any object that has a
    :meth:`read` or :meth:`write` method (depending on the *mode*). *bufsize*
@@ -116,7 +114,7 @@
 .. class:: TarFile
 
    Class for reading and writing tar archives. Do not use this class directly,
-   better use :func:`open` instead. See :ref:`tarfile-objects`.
+   better use :func:`tarfile.open` instead. See :ref:`tarfile-objects`.
 
 
 .. function:: is_tarfile(name)
@@ -125,7 +123,7 @@
    module can read.
 
 
-.. class:: TarFileCompat(filename[, mode[, compression]])
+.. class:: TarFileCompat(filename, mode='r', compression=TAR_PLAIN)
 
    Class for limited access to tar archives with a :mod:`zipfile`\ -like interface.
    Please consult the documentation of the :mod:`zipfile` module for more details.
@@ -167,16 +165,17 @@
 
 .. exception:: ExtractError
 
-   Is raised for *non-fatal* errors when using :meth:`extract`, but only if
+   Is raised for *non-fatal* errors when using :meth:`TarFile.extract`, but only if
    :attr:`TarFile.errorlevel`\ ``== 2``.
 
 
 .. exception:: HeaderError
 
-   Is raised by :meth:`frombuf` if the buffer it gets is invalid.
+   Is raised by :meth:`TarInfo.frombuf` if the buffer it gets is invalid.
 
    .. versionadded:: 2.6
 
+
 Each of the following constants defines a tar archive format that the
 :mod:`tarfile` module is able to create. See section :ref:`tar-formats` for
 details.
@@ -202,12 +201,21 @@
    The default format for creating archives. This is currently :const:`GNU_FORMAT`.
 
 
+The following variables are available on module level:
+
+
+.. data:: ENCODING
+
+   The default character encoding i.e. the value from either
+   :func:`sys.getfilesystemencoding` or :func:`sys.getdefaultencoding`.
+
+
 .. seealso::
 
    Module :mod:`zipfile`
       Documentation of the :mod:`zipfile` standard module.
 
-   `GNU tar manual, Basic Tar Format <http://www.gnu.org/software/tar/manual/html_node/tar_134.html#SEC134>`_
+   `GNU tar manual, Basic Tar Format <http://www.gnu.org/software/tar/manual/html_node/Standard.html>`_
       Documentation for tar archive files, including GNU tar extensions.
 
 
@@ -223,7 +231,7 @@
 object, see :ref:`tarinfo-objects` for details.
 
 
-.. class:: TarFile(name=None, mode='r', fileobj=None, format=DEFAULT_FORMAT, tarinfo=TarInfo, dereference=False, ignore_zeros=False, encoding=None, errors=None, pax_headers=None, debug=0, errorlevel=0)
+.. class:: TarFile(name=None, mode='r', fileobj=None, format=DEFAULT_FORMAT, tarinfo=TarInfo, dereference=False, ignore_zeros=False, encoding=ENCODING, errors=None, pax_headers=None, debug=0, errorlevel=0)
 
    All following arguments are optional and can be accessed as instance attributes
    as well.
@@ -254,18 +262,18 @@
 
    .. versionadded:: 2.6
 
-   If *dereference* is ``False``, add symbolic and hard links to the archive. If it
-   is ``True``, add the content of the target files to the archive. This has no
+   If *dereference* is :const:`False`, add symbolic and hard links to the archive. If it
+   is :const:`True`, add the content of the target files to the archive. This has no
    effect on systems that do not support symbolic links.
 
-   If *ignore_zeros* is ``False``, treat an empty block as the end of the archive.
-   If it is *True*, skip empty (and invalid) blocks and try to get as many members
+   If *ignore_zeros* is :const:`False`, treat an empty block as the end of the archive.
+   If it is :const:`True`, skip empty (and invalid) blocks and try to get as many members
    as possible. This is only useful for reading concatenated or damaged archives.
 
    *debug* can be set from ``0`` (no debug messages) up to ``3`` (all debug
    messages). The messages are written to ``sys.stderr``.
 
-   If *errorlevel* is ``0``, all errors are ignored when using :meth:`extract`.
+   If *errorlevel* is ``0``, all errors are ignored when using :meth:`TarFile.extract`.
    Nevertheless, they appear as error messages in the debug output, when debugging
    is enabled.  If ``1``, all *fatal* errors are raised as :exc:`OSError` or
    :exc:`IOError` exceptions. If ``2``, all *non-fatal* errors are raised as
@@ -285,8 +293,8 @@
 
 .. method:: TarFile.open(...)
 
-   Alternative constructor. The :func:`open` function on module level is actually a
-   shortcut to this classmethod. See section :ref:`tarfile-mod` for details.
+   Alternative constructor. The :func:`tarfile.open` function is actually a
+   shortcut to this classmethod.
 
 
 .. method:: TarFile.getmember(name)
@@ -322,11 +330,11 @@
 .. method:: TarFile.next()
 
    Return the next member of the archive as a :class:`TarInfo` object, when
-   :class:`TarFile` is opened for reading. Return ``None`` if there is no more
+   :class:`TarFile` is opened for reading. Return :const:`None` if there is no more
    available.
 
 
-.. method:: TarFile.extractall([path[, members]])
+.. method:: TarFile.extractall(path=".", members=None)
 
    Extract all members from the archive to the current working directory or
    directory *path*. If optional *members* is given, it must be a subset of the
@@ -346,7 +354,7 @@
    .. versionadded:: 2.5
 
 
-.. method:: TarFile.extract(member[, path])
+.. method:: TarFile.extract(member, path="")
 
    Extract a member from the archive to the current working directory, using its
    full name. Its file information is extracted as accurately as possible. *member*
@@ -355,9 +363,8 @@
 
    .. note::
 
-      Because the :meth:`extract` method allows random access to a tar archive there
-      are some issues you must take care of yourself. See the description for
-      :meth:`extractall` above.
+      The :meth:`extract` method does not take care of several extraction issues.
+      In most cases you should consider using the :meth:`extractall` method.
 
    .. warning::
 
@@ -369,7 +376,7 @@
    Extract a member from the archive as a file object. *member* may be a filename
    or a :class:`TarInfo` object. If *member* is a regular file, a file-like object
    is returned. If *member* is a link, a file-like object is constructed from the
-   link's target. If *member* is none of the above, ``None`` is returned.
+   link's target. If *member* is none of the above, :const:`None` is returned.
 
    .. note::
 
@@ -377,7 +384,7 @@
       :meth:`read`, :meth:`readline`, :meth:`readlines`, :meth:`seek`, :meth:`tell`.
 
 
-.. method:: TarFile.add(name[, arcname[, recursive[, exclude]]])
+.. method:: TarFile.add(name, arcname=None, recursive=True, exclude=None)
 
    Add the file *name* to the archive. *name* may be any type of file (directory,
    fifo, symbolic link, etc.). If given, *arcname* specifies an alternative name
@@ -391,7 +398,7 @@
       Added the *exclude* parameter.
 
 
-.. method:: TarFile.addfile(tarinfo[, fileobj])
+.. method:: TarFile.addfile(tarinfo, fileobj=None)
 
    Add the :class:`TarInfo` object *tarinfo* to the archive. If *fileobj* is given,
    ``tarinfo.size`` bytes are read from it and added to the archive.  You can
@@ -403,7 +410,7 @@
       avoid irritation about the file size.
 
 
-.. method:: TarFile.gettarinfo([name[, arcname[, fileobj]]])
+.. method:: TarFile.gettarinfo(name=None, arcname=None, fileobj=None)
 
    Create a :class:`TarInfo` object for either the file *name* or the file object
    *fileobj* (using :func:`os.fstat` on its file descriptor).  You can modify some
@@ -451,7 +458,7 @@
 :meth:`getmember`, :meth:`getmembers` and :meth:`gettarinfo`.
 
 
-.. class:: TarInfo([name])
+.. class:: TarInfo(name="")
 
    Create a :class:`TarInfo` object.
 
@@ -472,7 +479,7 @@
    .. versionadded:: 2.6
 
 
-.. method:: TarInfo.tobuf([format[, encoding [, errors]]])
+.. method:: TarInfo.tobuf(format=DEFAULT_FORMAT, encoding=ENCODING, errors='strict')
 
    Create a string buffer from a :class:`TarInfo` object. For information on the
    arguments see the constructor of the :class:`TarFile` class.
@@ -604,6 +611,21 @@
    tar.extractall()
    tar.close()
 
+How to extract a subset of a tar archive with :meth:`TarFile.extractall` using
+a generator function instead of a list::
+
+   import os
+   import tarfile
+
+   def py_files(members):
+       for tarinfo in members:
+           if os.path.splitext(tarinfo.name)[1] == ".py":
+               yield tarinfo
+
+   tar = tarfile.open("sample.tar.gz")
+   tar.extractall(members=py_files(tar))
+   tar.close()
+
 How to create an uncompressed tar archive from a list of filenames::
 
    import tarfile
@@ -626,28 +648,6 @@
            print "something else."
    tar.close()
 
-How to create a tar archive with faked information::
-
-   import tarfile
-   tar = tarfile.open("sample.tar.gz", "w:gz")
-   for name in namelist:
-       tarinfo = tar.gettarinfo(name, "fakeproj-1.0/" + name)
-       tarinfo.uid = 123
-       tarinfo.gid = 456
-       tarinfo.uname = "johndoe"
-       tarinfo.gname = "fake"
-       tar.addfile(tarinfo, file(name))
-   tar.close()
-
-The *only* way to extract an uncompressed tar stream from ``sys.stdin``::
-
-   import sys
-   import tarfile
-   tar = tarfile.open(mode="r|", fileobj=sys.stdin)
-   for tarinfo in tar:
-       tar.extract(tarinfo)
-   tar.close()
-
 
 .. _tar-formats:
 

Modified: python/branches/tlee-ast-optimize/Doc/library/test.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/test.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/test.rst	Wed May 21 11:25:51 2008
@@ -185,6 +185,14 @@
 .. module:: test.test_support
    :synopsis: Support for Python regression tests.
 
+.. note::
+
+   The :mod:`test.test_support` module has been renamed to :mod:`test.support`
+   in Python 3.0.  The :term:`2to3` tool will automatically adapt imports when
+   converting your sources to 3.0.
+
+
+
 
 The :mod:`test.test_support` module provides support for Python's regression
 tests.

Modified: python/branches/tlee-ast-optimize/Doc/library/tk.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/tk.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/tk.rst	Wed May 21 11:25:51 2008
@@ -12,20 +12,19 @@
 
 Tk/Tcl has long been an integral part of Python.  It provides a robust and
 platform independent windowing toolkit, that is available to Python programmers
-using the :mod:`tkinter` package, and its extension, the :mod:`tkinter.tix` 
-module.
+using the :mod:`Tkinter` module, and its extension, the :mod:`Tix` module.
 
-The :mod:`tkinter` package is a thin object-oriented layer on top of Tcl/Tk. To
-use :mod:`tkinter`, you don't need to write Tcl code, but you will need to
+The :mod:`Tkinter` module is a thin object-oriented layer on top of Tcl/Tk. To
+use :mod:`Tkinter`, you don't need to write Tcl code, but you will need to
 consult the Tk documentation, and occasionally the Tcl documentation.
-:mod:`tkinter` is a set of wrappers that implement the Tk widgets as Python
+:mod:`Tkinter` is a set of wrappers that implement the Tk widgets as Python
 classes.  In addition, the internal module :mod:`_tkinter` provides a threadsafe
 mechanism which allows Python and Tcl to interact.
 
-:mod:`tkinter`'s chief virtues are that it is fast, and that it usually comes
+:mod:`Tkinter`'s chief virtues are that it is fast, and that it usually comes
 bundled with Python. Although its standard documentation is weak, good 
 material is available, which includes: references, tutorials, a book and 
-others. :mod:`tkinter` is also famous for having an outdated look and feel, 
+others. :mod:`Tkinter` is also famous for having an outdated look and feel, 
 which has been vastly improved in Tk 8.5. Nevertheless, there are many other 
 GUI libraries that you could be interested in. For more information about 
 alternatives, see the :ref:`other-gui-packages` section.
@@ -33,9 +32,9 @@
 .. toctree::
    
    tkinter.rst
-   tkinter.tix.rst
-   tkinter.scrolledtext.rst
-   tkinter.turtle.rst
+   tix.rst
+   scrolledtext.rst
+   turtle.rst
    idle.rst
    othergui.rst
 

Modified: python/branches/tlee-ast-optimize/Doc/library/tkinter.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/tkinter.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/tkinter.rst	Wed May 21 11:25:51 2008
@@ -1,26 +1,21 @@
-:mod:`tkinter` --- Python interface to Tcl/Tk
+:mod:`Tkinter` --- Python interface to Tcl/Tk
 =============================================
 
 .. module:: Tkinter
-   :synopsis: Old name for the tkinter module.
-
-.. module:: tkinter
    :synopsis: Interface to Tcl/Tk for graphical user interfaces
 .. moduleauthor:: Guido van Rossum <guido at Python.org>
 
 
-The :mod:`tkinter` package ("Tk interface") is the standard Python interface to
-the Tk GUI toolkit.  Both Tk and :mod:`tkinter` are available on most Unix
+The :mod:`Tkinter` module ("Tk interface") is the standard Python interface to
+the Tk GUI toolkit.  Both Tk and :mod:`Tkinter` are available on most Unix
 platforms, as well as on Windows and Macintosh systems.  (Tk itself is not part
 of Python; it is maintained at ActiveState.)
 
 .. note::
-   The :mod:`Tkinter` module has been renamed to a :mod:`tkinter` package in
-   Python 3.0.  All other Tkinter-related modules have been moved to submodules
-   within that package (see their individual descriptions).
 
-   All modules are importable under both names in Python 2.6 and the rest of the
-   2.x series.
+   :mod:`Tkinter` has been renamed to :mod:`tkinter` in Python 3.0.  The
+   :term:`2to3` tool will automatically adapt imports when converting your
+   sources to 3.0.
 
 .. seealso::
 
@@ -44,23 +39,23 @@
 Tkinter Modules
 ---------------
 
-Most of the time, the :mod:`tkinter` is all you really need, but a number
+Most of the time, the :mod:`Tkinter` module is all you really need, but a number
 of additional modules are available as well.  The Tk interface is located in a
 binary module named :mod:`_tkinter`. This module contains the low-level
 interface to Tk, and should never be used directly by application programmers.
 It is usually a shared library (or DLL), but might in some cases be statically
 linked with the Python interpreter.
 
-In addition to the Tk interface module, :mod:`tkinter` includes a number of
-Python modules, :mod:`tkinter.constants` being one of the most important. 
-Importing :mod:`tkinter` will automatically import :mod:`tkinter.constants`,
-so, usually, to use Tkinter all you need is a simple import statement::
+In addition to the Tk interface module, :mod:`Tkinter` includes a number of
+Python modules. The two most important modules are the :mod:`Tkinter` module
+itself, and a module called :mod:`Tkconstants`. The former automatically imports
+the latter, so to use Tkinter, all you need to do is to import one module::
 
-   import tkinter
+   import Tkinter
 
 Or, more often::
 
-   from tkinter import *
+   from Tkinter import *
 
 
 .. class:: Tk(screenName=None, baseName=None, className='Tk', useTk=1)
@@ -89,60 +84,36 @@
 
 Other modules that provide Tk support include:
 
-:mod:`tkinter.scrolledtext`
+:mod:`ScrolledText`
    Text widget with a vertical scroll bar built in.
 
-   .. versionchanged:: 2.6
-      Renamed from ``ScrolledText``.
-
-:mod:`tkinter.colorchooser`
+:mod:`tkColorChooser`
    Dialog to let the user choose a color.
 
-   .. versionchanged:: 2.6
-      Renamed from ``tkColorChooser``.
-
-:mod:`commondialog`
+:mod:`tkCommonDialog`
    Base class for the dialogs defined in the other modules listed here.
 
-   .. versionchanged:: 2.6
-      Renamed from ``tkCommonDialog``.
-
-:mod:`filedialog`
+:mod:`tkFileDialog`
    Common dialogs to allow the user to specify a file to open or save.
 
-   .. versionchanged:: 2.6
-      Renamed from ``tkFileDialog``.
-
-:mod:`tkinter.font`
+:mod:`tkFont`
    Utilities to help work with fonts.
 
-   .. versionchanged:: 2.6
-      Renamed from ``tkFont``.
-
-:mod:`tkinter.messagebox`
+:mod:`tkMessageBox`
    Access to standard Tk dialog boxes.
 
-   .. versionchanged:: 2.6
-      Renamed from ``tkMessageBox``.
-
-:mod:`tkinter.simpledialog`
+:mod:`tkSimpleDialog`
    Basic dialogs and convenience functions.
 
-   .. versionchanged:: 2.6
-      Renamed from ``tkSimpleDialog``.
-
-:mod:`tkinter.dnd`
-   Drag-and-drop support for :mod:`tkinter`. This is experimental and should 
-   become deprecated when it is replaced  with the Tk DND.
+:mod:`Tkdnd`
+   Drag-and-drop support for :mod:`Tkinter`. This is experimental and should become
+   deprecated when it is replaced  with the Tk DND.
 
-   .. versionchanged:: 2.6
-      Renamed from ``Tkdnd``.
-
-:mod:`tkinter.turtle`
+:mod:`turtle`
    Turtle graphics in a Tk window.
 
-   .. versionchanged:: 2.6
-      Renamed from ``turtle``.
+These have been renamed as well in Python 3.0; they were all made submodules of
+the new ``tkinter`` package.
 
 
 Tkinter Life Preserver
@@ -150,6 +121,7 @@
 
 .. sectionauthor:: Matt Conway
 
+
 This section is not designed to be an exhaustive tutorial on either Tk or
 Tkinter.  Rather, it is intended as a stop gap, providing some introductory
 orientation on the system.
@@ -181,7 +153,7 @@
 
 When trying to answer questions of the form "how do I do blah", it is often best
 to find out how to do"blah" in straight Tk, and then convert this back into the
-corresponding :mod:`tkinter` call. Python programmers can often guess at the
+corresponding :mod:`Tkinter` call. Python programmers can often guess at the
 correct Python command by looking at the Tk documentation. This means that in
 order to use Tkinter, you will have to know a little bit about Tk. This document
 can't fulfill that role, so the best we can do is point you to the best
@@ -197,8 +169,8 @@
   the novice.  The book is not exhaustive, and for many details it defers to the
   man pages.
 
-* :file:`tkinter/__init__.py` is a last resort for most, but can be a good 
-  place to go when nothing else makes sense.
+* :file:`Tkinter.py` is a last resort for most, but can be a good place to go
+  when nothing else makes sense.
 
 
 .. seealso::
@@ -218,7 +190,7 @@
 
 ::
 
-   from tkinter import *
+   from Tkinter import *
 
    class Application(Frame):
        def say_hi(self):
@@ -272,7 +244,7 @@
 To make use of this reference material, there will be times when you will need
 to know how to read short passages of Tk and how to identify the various parts
 of a Tk command.   (See section :ref:`tkinter-basic-mapping` for the
-:mod:`tkinter` equivalents of what's below.)
+:mod:`Tkinter` equivalents of what's below.)
 
 Tk scripts are Tcl programs.  Like all Tcl programs, Tk scripts are just lists
 of tokens separated by spaces.  A Tk widget is just its *class*, the *options*
@@ -360,9 +332,9 @@
 To give a widget to the packer (geometry manager), you call pack with optional
 arguments.  In Tkinter, the Pack class holds all this functionality, and the
 various forms of the pack command are implemented as methods.  All widgets in
-:mod:`tkinter` are subclassed from the Packer, and so inherit all the packing
-methods. See the :mod:`tkinter.tix` module documentation for additional 
-information on the Form geometry manager. ::
+:mod:`Tkinter` are subclassed from the Packer, and so inherit all the packing
+methods. See the :mod:`Tix` module documentation for additional information on
+the Form geometry manager. ::
 
    pack .fred -side left       =====>  fred.pack(side = "left")
 
@@ -373,11 +345,11 @@
 From the top down:
 
 Your App Here (Python)
-   A Python application makes a :mod:`tkinter` call.
+   A Python application makes a :mod:`Tkinter` call.
 
-tkinter (Python Package)
+Tkinter (Python Module)
    This call (say, for example, creating a button widget), is implemented in the
-   *tkinter* package, which is written in Python.  This Python function will parse
+   *Tkinter* module, which is written in Python.  This Python function will parse
    the commands and the arguments and convert them into a form that makes them look
    as if they had come from a Tk script instead of a Python script.
 
@@ -389,8 +361,8 @@
    This C function is able to make calls into other C modules, including the C
    functions that make up the Tk library.  Tk is implemented in C and some Tcl.
    The Tcl part of the Tk widgets is used to bind certain default behaviors to
-   widgets, and is executed once at the point where the Python :mod:`tkinter`
-   package is imported. (The user never sees this stage).
+   widgets, and is executed once at the point where the Python :mod:`Tkinter`
+   module is imported. (The user never sees this stage).
 
 Tk (C)
    The Tk part of the Tk Widgets implement the final mapping to ...
@@ -546,11 +518,11 @@
 ``value``.  This connection works both ways: if the variable changes for any
 reason, the widget it's connected to will be updated to reflect the new value.
 
-Unfortunately, in the current implementation of :mod:`tkinter` it is not
+Unfortunately, in the current implementation of :mod:`Tkinter` it is not
 possible to hand over an arbitrary Python variable to a widget through a
 ``variable`` or ``textvariable`` option.  The only kinds of variables for which
 this works are variables that are subclassed from a class called Variable,
-defined in the :mod:`tkinter`.
+defined in the :mod:`Tkinter` module.
 
 There are many useful subclasses of Variable already defined:
 :class:`StringVar`, :class:`IntVar`, :class:`DoubleVar`, and
@@ -594,7 +566,7 @@
 
 In Tk, there is a utility command, ``wm``, for interacting with the window
 manager.  Options to the ``wm`` command allow you to control things like titles,
-placement, icon bitmaps, and the like.  In :mod:`tkinter`, these commands have
+placement, icon bitmaps, and the like.  In :mod:`Tkinter`, these commands have
 been implemented as methods on the :class:`Wm` class.  Toplevel widgets are
 subclassed from the :class:`Wm` class, and so can call the :class:`Wm` methods
 directly.
@@ -608,7 +580,7 @@
 
 Here are some examples of typical usage::
 
-   from tkinter import *
+   from Tkinter import *
    class App(Frame):
        def __init__(self, master=None):
            Frame.__init__(self, master)
@@ -769,7 +741,7 @@
 
 Entry widget indexes (index, view index, etc.)
    Entry widgets have options that refer to character positions in the text being
-   displayed.  You can use these :mod:`tkinter` functions to access these special
+   displayed.  You can use these :mod:`Tkinter` functions to access these special
    points in text widgets:
 
    AtEnd()
@@ -821,7 +793,7 @@
 ^^^^^^
 
 Bitmap/Pixelmap images can be created through the subclasses of
-:class:`tkinter.Image`:
+:class:`Tkinter.Image`:
 
 * :class:`BitmapImage` can be used for X11 bitmap data.
 

Deleted: python/branches/tlee-ast-optimize/Doc/library/tkinter.scrolledtext.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/tkinter.scrolledtext.rst	Wed May 21 11:25:51 2008
+++ (empty file)
@@ -1,42 +0,0 @@
-:mod:`tkinter.scrolledtext` --- Scrolled Text Widget
-====================================================
-
-.. module:: ScrolledText
-   :synopsis: Old name for the tkinter.scrolledtext module.
-
-.. module:: tkinter.scrolledtext
-   :platform: Tk
-   :synopsis: Text widget with a vertical scroll bar.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake at acm.org>
-
-.. note::
-   The :mod:`ScrolledText` module has been renamed to
-   :mod:`tkinter.scrolledtext` in Python 3.0.  It is importable under both names
-   in Python 2.6 and the rest of the 2.x series.
-
-The :mod:`tkinter.scrolledtext` module provides a class of the same name which
-implements a basic text widget which has a vertical scroll bar configured to do
-the "right thing."  Using the :class:`ScrolledText` class is a lot easier than
-setting up a text widget and scroll bar directly.  The constructor is the same
-as that of the :class:`tkinter.Text` class.
-
-.. versionchanged:: 2.6
-   Renamed from ``ScrolledText``.
-
-The text widget and scrollbar are packed together in a :class:`Frame`, and the
-methods of the :class:`Grid` and :class:`Pack` geometry managers are acquired
-from the :class:`Frame` object.  This allows the :class:`ScrolledText` widget to
-be used directly to achieve most normal geometry management behavior.
-
-Should more specific control be necessary, the following attributes are
-available:
-
-
-.. attribute:: ScrolledText.frame
-
-   The frame which surrounds the text and scroll bar widgets.
-
-
-.. attribute:: ScrolledText.vbar
-
-   The scroll bar widget.

Deleted: python/branches/tlee-ast-optimize/Doc/library/tkinter.tix.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/tkinter.tix.rst	Wed May 21 11:25:51 2008
+++ (empty file)
@@ -1,598 +0,0 @@
-:mod:`tkinter.tix` --- Extension widgets for Tk
-===============================================
-
-.. module:: Tix
-   :synopsis: Old name for the tkinter.tix module.
-
-.. module:: tkinter.tix
-   :synopsis: Tk Extension Widgets for Tkinter
-.. sectionauthor:: Mike Clarkson <mikeclarkson at users.sourceforge.net>
-
-.. note::
-   The :mod:`Tix` module has been renamed to :mod:`tkinter.tix` in Python 3.0.
-   It is importable under both names in Python 2.6 and the rest of the 2.x
-   series.
-
-.. index:: single: Tix
-
-The :mod:`tkinter.tix` (Tk Interface Extension) module provides an additional 
-rich set of widgets. Although the standard Tk library has many useful widgets, 
-they are far from complete. The :mod:`tkinter.tix` library provides most of the
-commonly needed widgets that are missing from standard Tk: :class:`HList`, 
-:class:`ComboBox`, :class:`Control` (a.k.a. SpinBox) and an assortment of 
-scrollable widgets. 
-:mod:`tkinter.tix` also includes many more widgets that are generally useful in
-a wide range of applications: :class:`NoteBook`, :class:`FileEntry`,
-:class:`PanedWindow`, etc; there are more than 40 of them.
-
-With all these new widgets, you can introduce new interaction techniques into
-applications, creating more useful and more intuitive user interfaces. You can
-design your application by choosing the most appropriate widgets to match the
-special needs of your application and users.
-
-.. seealso::
-
-   `Tix Homepage <http://tix.sourceforge.net/>`_
-      The home page for :mod:`Tix`.  This includes links to additional documentation
-      and downloads.
-
-   `Tix Man Pages <http://tix.sourceforge.net/dist/current/man/>`_
-      On-line version of the man pages and reference material.
-
-   `Tix Programming Guide <http://tix.sourceforge.net/dist/current/docs/tix-book/tix.book.html>`_
-      On-line version of the programmer's reference material.
-
-   `Tix Development Applications <http://tix.sourceforge.net/Tixapps/src/Tide.html>`_
-      Tix applications for development of Tix and Tkinter programs. Tide applications
-      work under Tk or Tkinter, and include :program:`TixInspect`, an inspector to
-      remotely modify and debug Tix/Tk/Tkinter applications.
-
-
-Using Tix
----------
-
-
-.. class:: Tix(screenName[, baseName[, className]])
-
-   Toplevel widget of Tix which represents mostly the main window of an
-   application. It has an associated Tcl interpreter.
-
-   Classes in the :mod:`tkinter.tix` module subclasses the classes in the 
-   :mod:`tkinter`. The former imports the latter, so to use :mod:`tkinter.tix` 
-   with Tkinter, all you need to do is to import one module. In general, you 
-   can just import :mod:`tkinter.tix`, and replace the toplevel call to 
-   :class:`tkinter.Tk` with :class:`tix.Tk`::
-
-      from tkinter import tix
-      from tkinter.constants import *
-      root = tix.Tk()
-
-To use :mod:`tkinter.tix`, you must have the Tix widgets installed, usually
-alongside your installation of the Tk widgets. To test your installation, try
-the following::
-
-   from tkinter import tix
-   root = tix.Tk()
-   root.tk.eval('package require Tix')
-
-If this fails, you have a Tk installation problem which must be resolved before
-proceeding. Use the environment variable :envvar:`TIX_LIBRARY` to point to the
-installed Tix library directory, and make sure you have the dynamic
-object library (:file:`tix8183.dll` or :file:`libtix8183.so`) in  the same
-directory that contains your Tk dynamic object library (:file:`tk8183.dll` or
-:file:`libtk8183.so`). The directory with the dynamic object library should also
-have a file called :file:`pkgIndex.tcl` (case sensitive), which contains the
-line::
-
-   package ifneeded Tix 8.1 [list load "[file join $dir tix8183.dll]" Tix]
-
-
-Tix Widgets
------------
-
-`Tix <http://tix.sourceforge.net/dist/current/man/html/TixCmd/TixIntro.htm>`_
-introduces over 40 widget classes to the :mod:`Tkinter`  repertoire.  There is a
-demo of all the :mod:`tkinter.tix` widgets in the :file:`Demo/tix` directory of
-the standard distribution.
-
-.. The Python sample code is still being added to Python, hence commented out
-
-
-Basic Widgets
-^^^^^^^^^^^^^
-
-
-.. class:: Balloon()
-
-   A `Balloon
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixBalloon.htm>`_ that
-   pops up over a widget to provide help.  When the user moves the cursor inside a
-   widget to which a Balloon widget has been bound, a small pop-up window with a
-   descriptive message will be shown on the screen.
-
-.. Python Demo of:
-.. \ulink{Balloon}{http://tix.sourceforge.net/dist/current/demos/samples/Balloon.tcl}
-
-
-.. class:: ButtonBox()
-
-   The `ButtonBox
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixButtonBox.htm>`_
-   widget creates a box of buttons, such as is commonly used for ``Ok Cancel``.
-
-.. Python Demo of:
-.. \ulink{ButtonBox}{http://tix.sourceforge.net/dist/current/demos/samples/BtnBox.tcl}
-
-
-.. class:: ComboBox()
-
-   The `ComboBox
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixComboBox.htm>`_
-   widget is similar to the combo box control in MS Windows. The user can select a
-   choice by either typing in the entry subwdget or selecting from the listbox
-   subwidget.
-
-.. Python Demo of:
-.. \ulink{ComboBox}{http://tix.sourceforge.net/dist/current/demos/samples/ComboBox.tcl}
-
-
-.. class:: Control()
-
-   The `Control
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixControl.htm>`_
-   widget is also known as the :class:`SpinBox` widget. The user can adjust the
-   value by pressing the two arrow buttons or by entering the value directly into
-   the entry. The new value will be checked against the user-defined upper and
-   lower limits.
-
-.. Python Demo of:
-.. \ulink{Control}{http://tix.sourceforge.net/dist/current/demos/samples/Control.tcl}
-
-
-.. class:: LabelEntry()
-
-   The `LabelEntry
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixLabelEntry.htm>`_
-   widget packages an entry widget and a label into one mega widget. It can be used
-   be used to simplify the creation of "entry-form" type of interface.
-
-.. Python Demo of:
-.. \ulink{LabelEntry}{http://tix.sourceforge.net/dist/current/demos/samples/LabEntry.tcl}
-
-
-.. class:: LabelFrame()
-
-   The `LabelFrame
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixLabelFrame.htm>`_
-   widget packages a frame widget and a label into one mega widget.  To create
-   widgets inside a LabelFrame widget, one creates the new widgets relative to the
-   :attr:`frame` subwidget and manage them inside the :attr:`frame` subwidget.
-
-.. Python Demo of:
-.. \ulink{LabelFrame}{http://tix.sourceforge.net/dist/current/demos/samples/LabFrame.tcl}
-
-
-.. class:: Meter()
-
-   The `Meter
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixMeter.htm>`_ widget
-   can be used to show the progress of a background job which may take a long time
-   to execute.
-
-.. Python Demo of:
-.. \ulink{Meter}{http://tix.sourceforge.net/dist/current/demos/samples/Meter.tcl}
-
-
-.. class:: OptionMenu()
-
-   The `OptionMenu
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixOptionMenu.htm>`_
-   creates a menu button of options.
-
-.. Python Demo of:
-.. \ulink{OptionMenu}{http://tix.sourceforge.net/dist/current/demos/samples/OptMenu.tcl}
-
-
-.. class:: PopupMenu()
-
-   The `PopupMenu
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixPopupMenu.htm>`_
-   widget can be used as a replacement of the ``tk_popup`` command. The advantage
-   of the :mod:`Tix` :class:`PopupMenu` widget is it requires less application code
-   to manipulate.
-
-.. Python Demo of:
-.. \ulink{PopupMenu}{http://tix.sourceforge.net/dist/current/demos/samples/PopMenu.tcl}
-
-
-.. class:: Select()
-
-   The `Select
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixSelect.htm>`_ widget
-   is a container of button subwidgets. It can be used to provide radio-box or
-   check-box style of selection options for the user.
-
-.. Python Demo of:
-.. \ulink{Select}{http://tix.sourceforge.net/dist/current/demos/samples/Select.tcl}
-
-
-.. class:: StdButtonBox()
-
-   The `StdButtonBox
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixStdButtonBox.htm>`_
-   widget is a group of standard buttons for Motif-like dialog boxes.
-
-.. Python Demo of:
-.. \ulink{StdButtonBox}{http://tix.sourceforge.net/dist/current/demos/samples/StdBBox.tcl}
-
-
-File Selectors
-^^^^^^^^^^^^^^
-
-
-.. class:: DirList()
-
-   The `DirList
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixDirList.htm>`_
-   widget displays a list view of a directory, its previous directories and its
-   sub-directories. The user can choose one of the directories displayed in the
-   list or change to another directory.
-
-.. Python Demo of:
-.. \ulink{DirList}{http://tix.sourceforge.net/dist/current/demos/samples/DirList.tcl}
-
-
-.. class:: DirTree()
-
-   The `DirTree
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixDirTree.htm>`_
-   widget displays a tree view of a directory, its previous directories and its
-   sub-directories. The user can choose one of the directories displayed in the
-   list or change to another directory.
-
-.. Python Demo of:
-.. \ulink{DirTree}{http://tix.sourceforge.net/dist/current/demos/samples/DirTree.tcl}
-
-
-.. class:: DirSelectDialog()
-
-   The `DirSelectDialog
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixDirSelectDialog.htm>`_
-   widget presents the directories in the file system in a dialog window.  The user
-   can use this dialog window to navigate through the file system to select the
-   desired directory.
-
-.. Python Demo of:
-.. \ulink{DirSelectDialog}{http://tix.sourceforge.net/dist/current/demos/samples/DirDlg.tcl}
-
-
-.. class:: DirSelectBox()
-
-   The :class:`DirSelectBox` is similar to the standard Motif(TM)
-   directory-selection box. It is generally used for the user to choose a
-   directory.  DirSelectBox stores the directories mostly recently selected into
-   a ComboBox widget so that they can be quickly selected again.
-
-
-.. class:: ExFileSelectBox()
-
-   The `ExFileSelectBox
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixExFileSelectBox.htm>`_
-   widget is usually embedded in a tixExFileSelectDialog widget. It provides an
-   convenient method for the user to select files. The style of the
-   :class:`ExFileSelectBox` widget is very similar to the standard file dialog on
-   MS Windows 3.1.
-
-.. Python Demo of:
-.. \ulink{ExFileSelectDialog}{http://tix.sourceforge.net/dist/current/demos/samples/EFileDlg.tcl}
-
-
-.. class:: FileSelectBox()
-
-   The `FileSelectBox
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixFileSelectBox.htm>`_
-   is similar to the standard Motif(TM) file-selection box. It is generally used
-   for the user to choose a file. FileSelectBox stores the files mostly recently
-   selected into a :class:`ComboBox` widget so that they can be quickly selected
-   again.
-
-.. Python Demo of:
-.. \ulink{FileSelectDialog}{http://tix.sourceforge.net/dist/current/demos/samples/FileDlg.tcl}
-
-
-.. class:: FileEntry()
-
-   The `FileEntry
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixFileEntry.htm>`_
-   widget can be used to input a filename. The user can type in the filename
-   manually. Alternatively, the user can press the button widget that sits next to
-   the entry, which will bring up a file selection dialog.
-
-.. Python Demo of:
-.. \ulink{FileEntry}{http://tix.sourceforge.net/dist/current/demos/samples/FileEnt.tcl}
-
-
-Hierachical ListBox
-^^^^^^^^^^^^^^^^^^^
-
-
-.. class:: HList()
-
-   The `HList
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixHList.htm>`_ widget
-   can be used to display any data that have a hierarchical structure, for example,
-   file system directory trees. The list entries are indented and connected by
-   branch lines according to their places in the hierarchy.
-
-.. Python Demo of:
-.. \ulink{HList}{http://tix.sourceforge.net/dist/current/demos/samples/HList1.tcl}
-
-
-.. class:: CheckList()
-
-   The `CheckList
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixCheckList.htm>`_
-   widget displays a list of items to be selected by the user. CheckList acts
-   similarly to the Tk checkbutton or radiobutton widgets, except it is capable of
-   handling many more items than checkbuttons or radiobuttons.
-
-.. Python Demo of:
-.. \ulink{ CheckList}{http://tix.sourceforge.net/dist/current/demos/samples/ChkList.tcl}
-.. Python Demo of:
-.. \ulink{ScrolledHList (1)}{http://tix.sourceforge.net/dist/current/demos/samples/SHList.tcl}
-.. Python Demo of:
-.. \ulink{ScrolledHList (2)}{http://tix.sourceforge.net/dist/current/demos/samples/SHList2.tcl}
-
-
-.. class:: Tree()
-
-   The `Tree
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixTree.htm>`_ widget
-   can be used to display hierarchical data in a tree form. The user can adjust the
-   view of the tree by opening or closing parts of the tree.
-
-.. Python Demo of:
-.. \ulink{Tree}{http://tix.sourceforge.net/dist/current/demos/samples/Tree.tcl}
-.. Python Demo of:
-.. \ulink{Tree (Dynamic)}{http://tix.sourceforge.net/dist/current/demos/samples/DynTree.tcl}
-
-
-Tabular ListBox
-^^^^^^^^^^^^^^^
-
-
-.. class:: TList()
-
-   The `TList
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixTList.htm>`_ widget
-   can be used to display data in a tabular format. The list entries of a
-   :class:`TList` widget are similar to the entries in the Tk listbox widget.  The
-   main differences are (1) the :class:`TList` widget can display the list entries
-   in a two dimensional format and (2) you can use graphical images as well as
-   multiple colors and fonts for the list entries.
-
-.. Python Demo of:
-.. \ulink{ScrolledTList (1)}{http://tix.sourceforge.net/dist/current/demos/samples/STList1.tcl}
-.. Python Demo of:
-.. \ulink{ScrolledTList (2)}{http://tix.sourceforge.net/dist/current/demos/samples/STList2.tcl}
-.. Grid has yet to be added to Python
-.. \subsubsection{Grid Widget}
-.. Python Demo of:
-.. \ulink{Simple Grid}{http://tix.sourceforge.net/dist/current/demos/samples/SGrid0.tcl}
-.. Python Demo of:
-.. \ulink{ScrolledGrid}{http://tix.sourceforge.net/dist/current/demos/samples/SGrid1.tcl}
-.. Python Demo of:
-.. \ulink{Editable Grid}{http://tix.sourceforge.net/dist/current/demos/samples/EditGrid.tcl}
-
-
-Manager Widgets
-^^^^^^^^^^^^^^^
-
-
-.. class:: PanedWindow()
-
-   The `PanedWindow
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixPanedWindow.htm>`_
-   widget allows the user to interactively manipulate the sizes of several panes.
-   The panes can be arranged either vertically or horizontally.  The user changes
-   the sizes of the panes by dragging the resize handle between two panes.
-
-.. Python Demo of:
-.. \ulink{PanedWindow}{http://tix.sourceforge.net/dist/current/demos/samples/PanedWin.tcl}
-
-
-.. class:: ListNoteBook()
-
-   The `ListNoteBook
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixListNoteBook.htm>`_
-   widget is very similar to the :class:`TixNoteBook` widget: it can be used to
-   display many windows in a limited space using a notebook metaphor. The notebook
-   is divided into a stack of pages (windows). At one time only one of these pages
-   can be shown. The user can navigate through these pages by choosing the name of
-   the desired page in the :attr:`hlist` subwidget.
-
-.. Python Demo of:
-.. \ulink{ListNoteBook}{http://tix.sourceforge.net/dist/current/demos/samples/ListNBK.tcl}
-
-
-.. class:: NoteBook()
-
-   The `NoteBook
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixNoteBook.htm>`_
-   widget can be used to display many windows in a limited space using a notebook
-   metaphor. The notebook is divided into a stack of pages. At one time only one of
-   these pages can be shown. The user can navigate through these pages by choosing
-   the visual "tabs" at the top of the NoteBook widget.
-
-.. Python Demo of:
-.. \ulink{NoteBook}{http://tix.sourceforge.net/dist/current/demos/samples/NoteBook.tcl}
-
-.. \subsubsection{Scrolled Widgets}
-.. Python Demo of:
-.. \ulink{ScrolledListBox}{http://tix.sourceforge.net/dist/current/demos/samples/SListBox.tcl}
-.. Python Demo of:
-.. \ulink{ScrolledText}{http://tix.sourceforge.net/dist/current/demos/samples/SText.tcl}
-.. Python Demo of:
-.. \ulink{ScrolledWindow}{http://tix.sourceforge.net/dist/current/demos/samples/SWindow.tcl}
-.. Python Demo of:
-.. \ulink{Canvas Object View}{http://tix.sourceforge.net/dist/current/demos/samples/CObjView.tcl}
-
-
-Image Types
-^^^^^^^^^^^
-
-The :mod:`tkinter.tix` module adds:
-
-* `pixmap <http://tix.sourceforge.net/dist/current/man/html/TixCmd/pixmap.htm>`_
-  capabilities to all :mod:`tkinter.tix` and :mod:`tkinter` widgets to create 
-  color images from XPM files.
-
-  .. Python Demo of:
-  .. \ulink{XPM Image In Button}{http://tix.sourceforge.net/dist/current/demos/samples/Xpm.tcl}
-  .. Python Demo of:
-  .. \ulink{XPM Image In Menu}{http://tix.sourceforge.net/dist/current/demos/samples/Xpm1.tcl}
-
-* `Compound
-  <http://tix.sourceforge.net/dist/current/man/html/TixCmd/compound.htm>`_ image
-  types can be used to create images that consists of multiple horizontal lines;
-  each line is composed of a series of items (texts, bitmaps, images or spaces)
-  arranged from left to right. For example, a compound image can be used to
-  display a bitmap and a text string simultaneously in a Tk :class:`Button`
-  widget.
-
-  .. Python Demo of:
-  .. \ulink{Compound Image In Buttons}{http://tix.sourceforge.net/dist/current/demos/samples/CmpImg.tcl}
-  .. Python Demo of:
-  .. \ulink{Compound Image In NoteBook}{http://tix.sourceforge.net/dist/current/demos/samples/CmpImg2.tcl}
-  .. Python Demo of:
-  .. \ulink{Compound Image Notebook Color Tabs}{http://tix.sourceforge.net/dist/current/demos/samples/CmpImg4.tcl}
-  .. Python Demo of:
-  .. \ulink{Compound Image Icons}{http://tix.sourceforge.net/dist/current/demos/samples/CmpImg3.tcl}
-
-
-Miscellaneous Widgets
-^^^^^^^^^^^^^^^^^^^^^
-
-
-.. class:: InputOnly()
-
-   The `InputOnly
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixInputOnly.htm>`_
-   widgets are to accept inputs from the user, which can be done with the ``bind``
-   command (Unix only).
-
-
-Form Geometry Manager
-^^^^^^^^^^^^^^^^^^^^^
-
-In addition, :mod:`tkinter.tix` augments :mod:`tkinter` by providing:
-
-
-.. class:: Form()
-
-   The `Form
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixForm.htm>`_ geometry
-   manager based on attachment rules for all Tk widgets.
-
-
-
-Tix Commands
-------------
-
-
-.. class:: tixCommand()
-
-   The `tix commands
-   <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tix.htm>`_ provide
-   access to miscellaneous elements of :mod:`Tix`'s internal state and the
-   :mod:`Tix` application context.  Most of the information manipulated by these
-   methods pertains to the application as a whole, or to a screen or display,
-   rather than to a particular window.
-
-   To view the current settings, the common usage is::
-
-      import Tix
-      root = Tix.Tk()
-      print root.tix_configure()
-
-
-.. method:: tixCommand.tix_configure([cnf,] **kw)
-
-   Query or modify the configuration options of the Tix application context. If no
-   option is specified, returns a dictionary all of the available options.  If
-   option is specified with no value, then the method returns a list describing the
-   one named option (this list will be identical to the corresponding sublist of
-   the value returned if no option is specified).  If one or more option-value
-   pairs are specified, then the method modifies the given option(s) to have the
-   given value(s); in this case the method returns an empty string. Option may be
-   any of the configuration options.
-
-
-.. method:: tixCommand.tix_cget(option)
-
-   Returns the current value of the configuration option given by *option*. Option
-   may be any of the configuration options.
-
-
-.. method:: tixCommand.tix_getbitmap(name)
-
-   Locates a bitmap file of the name ``name.xpm`` or ``name`` in one of the bitmap
-   directories (see the :meth:`tix_addbitmapdir` method).  By using
-   :meth:`tix_getbitmap`, you can avoid hard coding the pathnames of the bitmap
-   files in your application. When successful, it returns the complete pathname of
-   the bitmap file, prefixed with the character ``@``.  The returned value can be
-   used to configure the ``bitmap`` option of the Tk and Tix widgets.
-
-
-.. method:: tixCommand.tix_addbitmapdir(directory)
-
-   Tix maintains a list of directories under which the :meth:`tix_getimage` and
-   :meth:`tix_getbitmap` methods will search for image files.  The standard bitmap
-   directory is :file:`$TIX_LIBRARY/bitmaps`. The :meth:`tix_addbitmapdir` method
-   adds *directory* into this list. By using this method, the image files of an
-   applications can also be located using the :meth:`tix_getimage` or
-   :meth:`tix_getbitmap` method.
-
-
-.. method:: tixCommand.tix_filedialog([dlgclass])
-
-   Returns the file selection dialog that may be shared among different calls from
-   this application.  This method will create a file selection dialog widget when
-   it is called the first time. This dialog will be returned by all subsequent
-   calls to :meth:`tix_filedialog`.  An optional dlgclass parameter can be passed
-   as a string to specified what type of file selection dialog widget is desired.
-   Possible options are ``tix``, ``FileSelectDialog`` or ``tixExFileSelectDialog``.
-
-
-.. method:: tixCommand.tix_getimage(self, name)
-
-   Locates an image file of the name :file:`name.xpm`, :file:`name.xbm` or
-   :file:`name.ppm` in one of the bitmap directories (see the
-   :meth:`tix_addbitmapdir` method above). If more than one file with the same name
-   (but different extensions) exist, then the image type is chosen according to the
-   depth of the X display: xbm images are chosen on monochrome displays and color
-   images are chosen on color displays. By using :meth:`tix_getimage`, you can
-   avoid hard coding the pathnames of the image files in your application. When
-   successful, this method returns the name of the newly created image, which can
-   be used to configure the ``image`` option of the Tk and Tix widgets.
-
-
-.. method:: tixCommand.tix_option_get(name)
-
-   Gets the options maintained by the Tix scheme mechanism.
-
-
-.. method:: tixCommand.tix_resetoptions(newScheme, newFontSet[, newScmPrio])
-
-   Resets the scheme and fontset of the Tix application to *newScheme* and
-   *newFontSet*, respectively.  This affects only those widgets created after this
-   call.  Therefore, it is best to call the resetoptions method before the creation
-   of any widgets in a Tix application.
-
-   The optional parameter *newScmPrio* can be given to reset the priority level of
-   the Tk options set by the Tix schemes.
-
-   Because of the way Tk handles the X option database, after Tix has been has
-   imported and inited, it is not possible to reset the color schemes and font sets
-   using the :meth:`tix_config` method. Instead, the :meth:`tix_resetoptions`
-   method must be used.

Deleted: python/branches/tlee-ast-optimize/Doc/library/tkinter.turtle.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/tkinter.turtle.rst	Wed May 21 11:25:51 2008
+++ (empty file)
@@ -1,322 +0,0 @@
-:mod:`tkinter.turtle` --- Turtle graphics for Tk
-================================================
-
-.. module:: turtle
-   :synopsis: Old name for the tkinter.turtle module.
-
-.. module:: tkinter.turtle
-   :platform: Tk
-   :synopsis: An environment for turtle graphics.
-.. moduleauthor:: Guido van Rossum <guido at python.org>
-
-.. note::
-   The :mod:`turtle` module has been renamed to :mod:`tkinter.turtle` in Python
-   3.0.  It is importable under both names in Python 2.6 and the rest of the 2.x
-   series.
-
-
-.. sectionauthor:: Moshe Zadka <moshez at zadka.site.co.il>
-
-
-The :mod:`tkinter.turtle` module provides turtle graphics primitives, in both an
-object-oriented and procedure-oriented ways. Because it uses :mod:`tkinter` for
-the underlying graphics, it needs a version of python installed with Tk support.
-
-.. versionchanged:: 2.6
-   Renamed from ``turtle``.
-
-The procedural interface uses a pen and a canvas which are automagically created
-when any of the functions are called.
-
-The :mod:`tkinter.turtle` module defines the following functions:
-
-
-.. function:: degrees()
-
-   Set angle measurement units to degrees.
-
-
-.. function:: radians()
-
-   Set angle measurement units to radians.
-
-
-.. function:: setup(**kwargs)
-
-   Sets the size and position of the main window.  Keywords are:
-
-   * ``width``: either a size in pixels or a fraction of the screen. The default is
-     50% of the screen.
-
-   * ``height``: either a size in pixels or a fraction of the screen. The default
-     is 50% of the screen.
-
-   * ``startx``: starting position in pixels from the left edge of the screen.
-     ``None`` is the default value and  centers the window horizontally on screen.
-
-   * ``starty``: starting position in pixels from the top edge of the screen.
-     ``None`` is the default value and  centers the window vertically on screen.
-
-   Examples::
-
-      # Uses default geometry: 50% x 50% of screen, centered.
-      setup()  
-
-      # Sets window to 200x200 pixels, in upper left of screen
-      setup (width=200, height=200, startx=0, starty=0)
-
-      # Sets window to 75% of screen by 50% of screen, and centers it.
-      setup(width=.75, height=0.5, startx=None, starty=None)
-
-
-.. function:: title(title_str)
-
-   Set the window's title to *title*.
-
-
-.. function:: done()
-
-   Enters the Tk main loop.  The window will continue to  be displayed until the
-   user closes it or the process is killed.
-
-
-.. function:: reset()
-
-   Clear the screen, re-center the pen, and set variables to the default values.
-
-
-.. function:: clear()
-
-   Clear the screen.
-
-
-.. function:: tracer(flag)
-
-   Set tracing on/off (according to whether flag is true or not). Tracing means
-   line are drawn more slowly, with an animation of an arrow along the  line.
-
-
-.. function:: speed(speed)
-
-   Set the speed of the turtle. Valid values for the parameter *speed* are
-   ``'fastest'`` (no delay), ``'fast'``, (delay 5ms), ``'normal'`` (delay 10ms),
-   ``'slow'`` (delay 15ms), and ``'slowest'`` (delay 20ms).
-
-   .. versionadded:: 2.5
-
-
-.. function:: delay(delay)
-
-   Set the speed of the turtle to *delay*, which is given in ms.
-
-   .. versionadded:: 2.5
-
-
-.. function:: forward(distance)
-
-   Go forward *distance* steps.
-
-
-.. function:: backward(distance)
-
-   Go backward *distance* steps.
-
-
-.. function:: left(angle)
-
-   Turn left *angle* units. Units are by default degrees, but can be set via the
-   :func:`degrees` and :func:`radians` functions.
-
-
-.. function:: right(angle)
-
-   Turn right *angle* units. Units are by default degrees, but can be set via the
-   :func:`degrees` and :func:`radians` functions.
-
-
-.. function:: up()
-
-   Move the pen up --- stop drawing.
-
-
-.. function:: down()
-
-   Move the pen down --- draw when moving.
-
-
-.. function:: width(width)
-
-   Set the line width to *width*.
-
-
-.. function:: color(s)
-              color((r, g, b))
-              color(r, g, b)
-
-   Set the pen color.  In the first form, the color is specified as a Tk color
-   specification as a string.  The second form specifies the color as a tuple of
-   the RGB values, each in the range [0..1].  For the third form, the color is
-   specified giving the RGB values as three separate parameters (each in the range
-   [0..1]).
-
-
-.. function:: write(text[, move])
-
-   Write *text* at the current pen position. If *move* is true, the pen is moved to
-   the bottom-right corner of the text. By default, *move* is false.
-
-
-.. function:: fill(flag)
-
-   The complete specifications are rather complex, but the recommended  usage is:
-   call ``fill(1)`` before drawing a path you want to fill, and call ``fill(0)``
-   when you finish to draw the path.
-
-
-.. function:: begin_fill()
-
-   Switch turtle into filling mode;  Must eventually be followed by a corresponding
-   end_fill() call. Otherwise it will be ignored.
-
-   .. versionadded:: 2.5
-
-
-.. function:: end_fill()
-
-   End filling mode, and fill the shape; equivalent to ``fill(0)``.
-
-   .. versionadded:: 2.5
-
-
-.. function:: circle(radius[, extent])
-
-   Draw a circle with radius *radius* whose center-point is *radius* units left of
-   the turtle. *extent* determines which part of a circle is drawn: if not given it
-   defaults to a full circle.
-
-   If *extent* is not a full circle, one endpoint of the arc is the current pen
-   position. The arc is drawn in a counter clockwise direction if *radius* is
-   positive, otherwise in a clockwise direction.  In the process, the direction of
-   the turtle is changed by the amount of the *extent*.
-
-
-.. function:: goto(x, y)
-              goto((x, y))
-
-   Go to co-ordinates *x*, *y*.  The co-ordinates may be specified either as two
-   separate arguments or as a 2-tuple.
-
-
-.. function:: towards(x, y)
-
-   Return the angle of the line from the turtle's position to the point *x*, *y*.
-   The co-ordinates may be specified either as two separate arguments, as a
-   2-tuple, or as another pen object.
-
-   .. versionadded:: 2.5
-
-
-.. function:: heading()
-
-   Return the current orientation of the turtle.
-
-   .. versionadded:: 2.3
-
-
-.. function:: setheading(angle)
-
-   Set the orientation of the turtle to *angle*.
-
-   .. versionadded:: 2.3
-
-
-.. function:: position()
-
-   Return the current location of the turtle as an ``(x,y)`` pair.
-
-   .. versionadded:: 2.3
-
-
-.. function:: setx(x)
-
-   Set the x coordinate of the turtle to *x*.
-
-   .. versionadded:: 2.3
-
-
-.. function:: sety(y)
-
-   Set the y coordinate of the turtle to *y*.
-
-   .. versionadded:: 2.3
-
-
-.. function:: window_width()
-
-   Return the width of the canvas window.
-
-   .. versionadded:: 2.3
-
-
-.. function:: window_height()
-
-   Return the height of the canvas window.
-
-   .. versionadded:: 2.3
-
-This module also does ``from math import *``, so see the documentation for the
-:mod:`math` module for additional constants and functions useful for turtle
-graphics.
-
-
-.. function:: demo()
-
-   Exercise the module a bit.
-
-
-.. exception:: Error
-
-   Exception raised on any error caught by this module.
-
-For examples, see the code of the :func:`demo` function.
-
-This module defines the following classes:
-
-
-.. class:: Pen()
-
-   Define a pen. All above functions can be called as a methods on the given pen.
-   The constructor automatically creates a canvas do be drawn on.
-
-
-.. class:: Turtle()
-
-   Define a pen. This is essentially a synonym for ``Pen()``; :class:`Turtle` is an
-   empty subclass of :class:`Pen`.
-
-
-.. class:: RawPen(canvas)
-
-   Define a pen which draws on a canvas *canvas*. This is useful if  you want to
-   use the module to create graphics in a "real" program.
-
-
-.. _pen-rawpen-objects:
-
-Turtle, Pen and RawPen Objects
-------------------------------
-
-Most of the global functions available in the module are also available as
-methods of the :class:`Turtle`, :class:`Pen` and :class:`RawPen` classes,
-affecting only the state of the given pen.
-
-The only method which is more powerful as a method is :func:`degrees`, which
-takes an optional argument letting  you specify the number of units
-corresponding to a full circle:
-
-
-.. method:: Turtle.degrees([fullcircle])
-
-   *fullcircle* is by default 360. This can cause the pen to have any angular units
-   whatever: give *fullcircle* ``2*pi`` for radians, or 400 for gradians.
-

Modified: python/branches/tlee-ast-optimize/Doc/library/zipfile.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/zipfile.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/zipfile.rst	Wed May 21 11:25:51 2008
@@ -155,11 +155,11 @@
 .. method:: ZipFile.open(name[, mode[, pwd]])
 
    Extract a member from the archive as a file-like object (ZipExtFile). *name* is
-   the name of the file in the archive. The *mode* parameter, if included, must be
-   one of the following: ``'r'`` (the  default), ``'U'``, or ``'rU'``. Choosing
-   ``'U'`` or  ``'rU'`` will enable universal newline support in the read-only
-   object. *pwd* is the password used for encrypted files.  Calling  :meth:`open`
-   on a closed ZipFile will raise a  :exc:`RuntimeError`.
+   the name of the file in the archive, or a :class:`ZipInfo` object. The *mode*
+   parameter, if included, must be one of the following: ``'r'`` (the  default),
+   ``'U'``, or ``'rU'``. Choosing ``'U'`` or  ``'rU'`` will enable universal newline
+   support in the read-only object. *pwd* is the password used for encrypted files.
+   Calling  :meth:`open` on a closed ZipFile will raise a  :exc:`RuntimeError`.
 
    .. note::
 
@@ -178,16 +178,22 @@
       create a new file object that will be held by the ZipExtFile, allowing it to
       operate independently of the  ZipFile.
 
+   .. note::
+
+      The :meth:`open`, :meth:`read` and :meth:`extract` methods can take a filename
+      or a :class:`ZipInfo` object.  You will appreciate this when trying to read a
+      ZIP file that contains members with duplicate names.
+
    .. versionadded:: 2.6
 
 
 .. method:: ZipFile.extract(member[, path[, pwd]])
 
-   Extract a member from the archive to the current working directory, using its
-   full name.  Its file information is extracted as accurately as possible.
-   *path* specifies a different directory to extract to.   *member* can be a
-   filename or a :class:`ZipInfo` object.  *pwd* is the password used for
-   encrypted files.
+   Extract a member from the archive to the current working directory; *member*
+   must be its full name or a :class:`ZipInfo` object).  Its file information is
+   extracted as accurately as possible.  *path* specifies a different directory
+   to extract to.  *member* can be a filename or a :class:`ZipInfo` object.
+   *pwd* is the password used for encrypted files.
 
    .. versionadded:: 2.6
 
@@ -216,13 +222,14 @@
 
 .. method:: ZipFile.read(name[, pwd])
 
-   Return the bytes of the file in the archive.  The archive must be open for read
-   or append. *pwd* is the password used for encrypted  files and, if specified, it
-   will override the default password set with :meth:`setpassword`.  Calling
+   Return the bytes of the file *name* in the archive.  *name* is the name of the
+   file in the archive, or a :class:`ZipInfo` object.  The archive must be open for
+   read or append. *pwd* is the password used for encrypted  files and, if specified,
+   it will override the default password set with :meth:`setpassword`.  Calling
    :meth:`read` on a closed ZipFile  will raise a :exc:`RuntimeError`.
 
    .. versionchanged:: 2.6
-      *pwd* was added.
+      *pwd* was added, and *name* can now be a :class:`ZipInfo` object.
 
 
 .. method:: ZipFile.testzip()

Modified: python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst	Wed May 21 11:25:51 2008
@@ -1473,7 +1473,44 @@
   and some modules are being renamed or moved into packages. 
   Python 2.6 running in 3.0-warning mode will warn about these modules 
   when they are imported.
+
+  The modules that have been renamed are:
+
+  * :mod:`ConfigParser` has become :mod:`configparser`.
+  * :mod:`copy_reg` has become :mod:`copyreg`.
+  * :mod:`htmlentitydefs` has become :mod:`html.entities`.
+  * :mod:`HTMLParser` has become :mod:`html.parser`.
+  * :mod:`repr` (the module) has become :mod:`reprlib`.
+  * :mod:`SocketServer` has become :mod:`socketserver`.
+  * :mod:`Tkinter` has become the :mod:`tkinter` package.
+  * :mod:`Queue` has become :mod:`queue`.
+
   The list of deprecated modules is:
+  :mod:`audiodev`,
+  :mod:`bgenlocations`,
+  :mod:`buildtools`,
+  :mod:`bundlebuilder`,
+  :mod:`Canvas`,
+  :mod:`compiler`,
+  :mod:`dircache`,
+  :mod:`dl`,
+  :mod:`fpformat`,
+  :mod:`gensuitemodule`,
+  :mod:`ihooks`,
+  :mod:`imageop`,
+  :mod:`imgfile`,
+  :mod:`linuxaudiodev`,
+  :mod:`mhlib`,
+  :mod:`multifile`,
+  :mod:`new`,
+  :mod:`popen2`,
+  :mod:`pure`,
+  :mod:`statvfs`,
+  :mod:`sunaudiodev`,
+  :mod:`test.testall`,
+  :mod:`toaiff`.
+
+  Various MacOS modules have been removed:
   :mod:`_builtinSuites`,
   :mod:`aepack`,
   :mod:`aetools`,
@@ -1483,68 +1520,57 @@
   :mod:`appletrunner`,
   :mod:`argvemulator`,
   :mod:`Audio_mac`,
-  :mod:`audiodev`,
   :mod:`autoGIL`,
-  :mod:`bgenlocations`,
-  :mod:`buildtools`,
-  :mod:`bundlebuilder`,
-  :mod:`Canvas`,
   :mod:`Carbon`,
   :mod:`cfmfile`,
   :mod:`CodeWarrior`,
   :mod:`ColorPicker`,
-  :mod:`compiler`,
-  :mod:`cd`,
-  :mod:`cddb`,
-  :mod:`cdplayer`,
-  :mod:`CL` and :mod:`cl`,
-  :mod:`cd`,
-  :mod:`cd`,
-  :mod:`dircache`,
-  :mod:`dl`,
   :mod:`EasyDialogs`,
   :mod:`Explorer`,
   :mod:`Finder`,
   :mod:`FrameWork`,
   :mod:`findertools`,
-  :mod:`fpformat`,
-  :mod:`gensuitemodule`,
   :mod:`ic`,
   :mod:`icglue`,
   :mod:`icopen`,
-  :mod:`ihooks`,
-  :mod:`imageop`,
-  :mod:`linuxaudiodev`,
   :mod:`macerrors`,
   :mod:`MacOS`,
   :mod:`macostools`,
   :mod:`macresource`,
-  :mod:`mhlib`,
   :mod:`MiniAEFrame`,
-  :mod:`multifile`,
   :mod:`Nav`,
   :mod:`Netscape`,
-  :mod:`new`,
   :mod:`OSATerminology`,
   :mod:`pimp`,
   :mod:`PixMapWrapper`,
-  :mod:`popen2`,
-  :mod:`pure`,
   :mod:`StdSuites`,
-  :mod:`sv`,
   :mod:`SystemEvents`,
   :mod:`Terminal`,
-  :mod:`terminalcommand`,
-  :mod:`test.testall`,
-  :mod:`toaiff`,
-  :mod:`videoreader`.
-
-  The modules that have been renamed are:
+  :mod:`terminalcommand`.
 
-  * :mod:`ConfigParser` has become :mod:`configparser`.
-  * :mod:`copy_reg` has become :mod:`copyreg`.
-  * :mod:`SocketServer` has become :mod:`socketserver`.
-  * :mod:`Queue` has become :mod:`queue`.
+  A number of old IRIX-specific modules were deprecated:
+  :mod:`cd`,
+  :mod:`cddb`,
+  :mod:`cdplayer`,
+  :mod:`CL` and :mod:`cl`,
+  :mod:`DEVICE`,
+  :mod:`ERRNO`,
+  :mod:`FILE`,
+  :mod:`FL` and :mod:`fl`,
+  :mod:`flp`,
+  :mod:`fm`,
+  :mod:`GET`,
+  :mod:`GLWS`,
+  :mod:`GL` and :mod:`gl`,
+  :mod:`IN`,
+  :mod:`IOCTL`,
+  :mod:`jpeg`,
+  :mod:`panelparser`,
+  :mod:`readcd`,
+  :mod:`SV` and :mod:`sv`,
+  :mod:`torgb`,
+  :mod:`videoreader`,
+  :mod:`WAIT`.
 
 * The :mod:`bsddb.dbshelve` module now uses the highest pickling protocol
   available, instead of restricting itself to protocol 1.

Modified: python/branches/tlee-ast-optimize/Lib/BaseHTTPServer.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/BaseHTTPServer.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/BaseHTTPServer.py	Wed May 21 11:25:51 2008
@@ -218,6 +218,12 @@
     # where each string is of the form name[/version].
     server_version = "BaseHTTP/" + __version__
 
+    # The default request version.  This only affects responses up until
+    # the point where the request line is parsed, so it mainly decides what
+    # the client gets back when sending a malformed request line.
+    # Most web servers default to HTTP 0.9, i.e. don't send a status line.
+    default_request_version = "HTTP/0.9"
+
     def parse_request(self):
         """Parse a request (internal).
 
@@ -230,7 +236,7 @@
 
         """
         self.command = None  # set in case of error on the first line
-        self.request_version = version = "HTTP/0.9" # Default
+        self.request_version = version = self.default_request_version
         self.close_connection = 1
         requestline = self.raw_requestline
         if requestline[-2:] == '\r\n':

Modified: python/branches/tlee-ast-optimize/Lib/bsddb/test/test_lock.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/bsddb/test/test_lock.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/bsddb/test/test_lock.py	Wed May 21 11:25:51 2008
@@ -97,11 +97,7 @@
         for t in threads:
             t.join()
 
-    def _DISABLED_test03_lock_timeout(self):
-        # Disabled as this test crashes the python interpreter built in
-        # debug mode with:
-        #  Fatal Python error: UNREF invalid object
-        # the error occurs as marked below.
+    def test03_lock_timeout(self):
         self.env.set_timeout(0, db.DB_SET_LOCK_TIMEOUT)
         self.env.set_timeout(0, db.DB_SET_TXN_TIMEOUT)
         self.env.set_timeout(123456, db.DB_SET_LOCK_TIMEOUT)
@@ -128,8 +124,6 @@
         self.assertNotEqual(anID, anID2)
         lock = self.env.lock_get(anID, "shared lock", db.DB_LOCK_WRITE)
         start_time=time.time()
-        # FIXME: I see the UNREF crash as the interpreter trys to exit
-        # from this call to lock_get.
         self.assertRaises(db.DBLockNotGrantedError,
                 self.env.lock_get,anID2, "shared lock", db.DB_LOCK_READ)
         end_time=time.time()

Modified: python/branches/tlee-ast-optimize/Lib/bsddb/test/test_sequence.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/bsddb/test/test_sequence.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/bsddb/test/test_sequence.py	Wed May 21 11:25:51 2008
@@ -115,15 +115,11 @@
             d.close()
 
     def test_64bits(self) :
-        value_plus=(1L<<63)-1
-        self.assertEquals(9223372036854775807L,value_plus)
-        value_minus=-1L<<63  # Two complement
-        self.assertEquals(-9223372036854775808L,value_minus)
-        if db.version() < (4,4):
-            # We don't use both extremes because it is
-            # problematic in Berkeley DB 4.3.
-            value_plus-=1
-            value_minus+=1
+        # We don't use both extremes because they are problematic
+        value_plus=(1L<<63)-2
+        self.assertEquals(9223372036854775806L,value_plus)
+        value_minus=(-1L<<63)+1  # Two complement
+        self.assertEquals(-9223372036854775807L,value_minus)
         self.seq = db.DBSequence(self.d, flags=0)
         self.assertEquals(None, self.seq.init_value(value_plus-1))
         self.assertEquals(None, self.seq.open(key='id', txn=None,

Modified: python/branches/tlee-ast-optimize/Lib/copy.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/copy.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/copy.py	Wed May 21 11:25:51 2008
@@ -49,7 +49,7 @@
 """
 
 import types
-from copyreg import dispatch_table
+from copy_reg import dispatch_table
 
 class Error(Exception):
     pass

Deleted: python/branches/tlee-ast-optimize/Lib/copyreg.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/copyreg.py	Wed May 21 11:25:51 2008
+++ (empty file)
@@ -1,201 +0,0 @@
-"""Helper to provide extensibility for pickle/cPickle.
-
-This is only useful to add pickle support for extension types defined in
-C, not for instances of user-defined classes.
-"""
-
-from types import ClassType as _ClassType
-
-__all__ = ["pickle", "constructor",
-           "add_extension", "remove_extension", "clear_extension_cache"]
-
-dispatch_table = {}
-
-def pickle(ob_type, pickle_function, constructor_ob=None):
-    if type(ob_type) is _ClassType:
-        raise TypeError("copyreg is not intended for use with classes")
-
-    if not hasattr(pickle_function, '__call__'):
-        raise TypeError("reduction functions must be callable")
-    dispatch_table[ob_type] = pickle_function
-
-    # The constructor_ob function is a vestige of safe for unpickling.
-    # There is no reason for the caller to pass it anymore.
-    if constructor_ob is not None:
-        constructor(constructor_ob)
-
-def constructor(object):
-    if not hasattr(object, '__call__'):
-        raise TypeError("constructors must be callable")
-
-# Example: provide pickling support for complex numbers.
-
-try:
-    complex
-except NameError:
-    pass
-else:
-
-    def pickle_complex(c):
-        return complex, (c.real, c.imag)
-
-    pickle(complex, pickle_complex, complex)
-
-# Support for pickling new-style objects
-
-def _reconstructor(cls, base, state):
-    if base is object:
-        obj = object.__new__(cls)
-    else:
-        obj = base.__new__(cls, state)
-        if base.__init__ != object.__init__:
-            base.__init__(obj, state)
-    return obj
-
-_HEAPTYPE = 1<<9
-
-# Python code for object.__reduce_ex__ for protocols 0 and 1
-
-def _reduce_ex(self, proto):
-    assert proto < 2
-    for base in self.__class__.__mro__:
-        if hasattr(base, '__flags__') and not base.__flags__ & _HEAPTYPE:
-            break
-    else:
-        base = object # not really reachable
-    if base is object:
-        state = None
-    else:
-        if base is self.__class__:
-            raise TypeError, "can't pickle %s objects" % base.__name__
-        state = base(self)
-    args = (self.__class__, base, state)
-    try:
-        getstate = self.__getstate__
-    except AttributeError:
-        if getattr(self, "__slots__", None):
-            raise TypeError("a class that defines __slots__ without "
-                            "defining __getstate__ cannot be pickled")
-        try:
-            dict = self.__dict__
-        except AttributeError:
-            dict = None
-    else:
-        dict = getstate()
-    if dict:
-        return _reconstructor, args, dict
-    else:
-        return _reconstructor, args
-
-# Helper for __reduce_ex__ protocol 2
-
-def __newobj__(cls, *args):
-    return cls.__new__(cls, *args)
-
-def _slotnames(cls):
-    """Return a list of slot names for a given class.
-
-    This needs to find slots defined by the class and its bases, so we
-    can't simply return the __slots__ attribute.  We must walk down
-    the Method Resolution Order and concatenate the __slots__ of each
-    class found there.  (This assumes classes don't modify their
-    __slots__ attribute to misrepresent their slots after the class is
-    defined.)
-    """
-
-    # Get the value from a cache in the class if possible
-    names = cls.__dict__.get("__slotnames__")
-    if names is not None:
-        return names
-
-    # Not cached -- calculate the value
-    names = []
-    if not hasattr(cls, "__slots__"):
-        # This class has no slots
-        pass
-    else:
-        # Slots found -- gather slot names from all base classes
-        for c in cls.__mro__:
-            if "__slots__" in c.__dict__:
-                slots = c.__dict__['__slots__']
-                # if class has a single slot, it can be given as a string
-                if isinstance(slots, basestring):
-                    slots = (slots,)
-                for name in slots:
-                    # special descriptors
-                    if name in ("__dict__", "__weakref__"):
-                        continue
-                    # mangled names
-                    elif name.startswith('__') and not name.endswith('__'):
-                        names.append('_%s%s' % (c.__name__, name))
-                    else:
-                        names.append(name)
-
-    # Cache the outcome in the class if at all possible
-    try:
-        cls.__slotnames__ = names
-    except:
-        pass # But don't die if we can't
-
-    return names
-
-# A registry of extension codes.  This is an ad-hoc compression
-# mechanism.  Whenever a global reference to <module>, <name> is about
-# to be pickled, the (<module>, <name>) tuple is looked up here to see
-# if it is a registered extension code for it.  Extension codes are
-# universal, so that the meaning of a pickle does not depend on
-# context.  (There are also some codes reserved for local use that
-# don't have this restriction.)  Codes are positive ints; 0 is
-# reserved.
-
-_extension_registry = {}                # key -> code
-_inverted_registry = {}                 # code -> key
-_extension_cache = {}                   # code -> object
-# Don't ever rebind those names:  cPickle grabs a reference to them when
-# it's initialized, and won't see a rebinding.
-
-def add_extension(module, name, code):
-    """Register an extension code."""
-    code = int(code)
-    if not 1 <= code <= 0x7fffffff:
-        raise ValueError, "code out of range"
-    key = (module, name)
-    if (_extension_registry.get(key) == code and
-        _inverted_registry.get(code) == key):
-        return # Redundant registrations are benign
-    if key in _extension_registry:
-        raise ValueError("key %s is already registered with code %s" %
-                         (key, _extension_registry[key]))
-    if code in _inverted_registry:
-        raise ValueError("code %s is already in use for key %s" %
-                         (code, _inverted_registry[code]))
-    _extension_registry[key] = code
-    _inverted_registry[code] = key
-
-def remove_extension(module, name, code):
-    """Unregister an extension code.  For testing only."""
-    key = (module, name)
-    if (_extension_registry.get(key) != code or
-        _inverted_registry.get(code) != key):
-        raise ValueError("key %s is not registered with code %s" %
-                         (key, code))
-    del _extension_registry[key]
-    del _inverted_registry[code]
-    if code in _extension_cache:
-        del _extension_cache[code]
-
-def clear_extension_cache():
-    _extension_cache.clear()
-
-# Standard extension code assignments
-
-# Reserved ranges
-
-# First  Last Count  Purpose
-#     1   127   127  Reserved for Python standard library
-#   128   191    64  Reserved for Zope
-#   192   239    48  Reserved for 3rd parties
-#   240   255    16  Reserved for private use (will never be assigned)
-#   256   Inf   Inf  Reserved for future assignment
-
-# Extension codes are assigned by the Python Software Foundation.

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/AutoCompleteWindow.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/AutoCompleteWindow.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/AutoCompleteWindow.py	Wed May 21 11:25:51 2008
@@ -1,7 +1,7 @@
 """
 An auto-completion window for IDLE, used by the AutoComplete extension
 """
-from tkinter import *
+from Tkinter import *
 from MultiCall import MC_SHIFT
 import AutoComplete
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/CallTipWindow.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/CallTipWindow.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/CallTipWindow.py	Wed May 21 11:25:51 2008
@@ -4,7 +4,7 @@
 Used by the CallTips IDLE extension.
 
 """
-from tkinter import *
+from Tkinter import *
 
 HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
 HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>")

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/CodeContext.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/CodeContext.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/CodeContext.py	Wed May 21 11:25:51 2008
@@ -9,8 +9,8 @@
 not open blocks are not shown in the context hints pane.
 
 """
-import tkinter
-from tkinter.constants import TOP, LEFT, X, W, SUNKEN
+import Tkinter
+from Tkconstants import TOP, LEFT, X, W, SUNKEN
 from configHandler import idleConf
 import re
 from sys import maxint as INFINITY
@@ -69,7 +69,7 @@
             border = 0
             for widget in widgets:
                 border += int(str( widget.cget('border') ))
-            self.label = tkinter.Label(self.editwin.top,
+            self.label = Tkinter.Label(self.editwin.top,
                                        text="\n" * (self.context_depth - 1),
                                        anchor=W, justify=LEFT,
                                        font=self.textfont,

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/ColorDelegator.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/ColorDelegator.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/ColorDelegator.py	Wed May 21 11:25:51 2008
@@ -2,7 +2,7 @@
 import re
 import keyword
 import __builtin__
-from tkinter import *
+from Tkinter import *
 from Delegator import Delegator
 from configHandler import idleConf
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/Debugger.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/Debugger.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/Debugger.py	Wed May 21 11:25:51 2008
@@ -1,7 +1,7 @@
 import os
 import bdb
 import types
-from tkinter import *
+from Tkinter import *
 from WindowList import ListedToplevel
 from ScrolledList import ScrolledList
 import macosxSupport

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/EditorWindow.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/EditorWindow.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/EditorWindow.py	Wed May 21 11:25:51 2008
@@ -3,9 +3,9 @@
 import re
 import imp
 from itertools import count
-from tkinter import *
-import tkinter.simpledialog as tkSimpleDialog
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkSimpleDialog
+import tkMessageBox
 from MultiCall import MultiCallCreator
 
 import webbrowser
@@ -45,7 +45,7 @@
     from UndoDelegator import UndoDelegator
     from IOBinding import IOBinding, filesystemencoding, encoding
     import Bindings
-    from tkinter import Toplevel
+    from Tkinter import Toplevel
     from MultiStatusBar import MultiStatusBar
 
     help_url = None

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/FileList.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/FileList.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/FileList.py	Wed May 21 11:25:51 2008
@@ -1,6 +1,6 @@
 import os
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
 
 
 class FileList:

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/GrepDialog.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/GrepDialog.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/GrepDialog.py	Wed May 21 11:25:51 2008
@@ -1,7 +1,7 @@
 import os
 import fnmatch
 import sys
-from tkinter import *
+from Tkinter import *
 import SearchEngine
 from SearchDialogBase import SearchDialogBase
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/IOBinding.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/IOBinding.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/IOBinding.py	Wed May 21 11:25:51 2008
@@ -10,11 +10,11 @@
 import sys
 import codecs
 import tempfile
-import tkinter.filedialog as tkFileDialog
-import tkinter.messagebox as tkMessageBox
+import tkFileDialog
+import tkMessageBox
 import re
-from tkinter import *
-from tkinter.simpledialog import SimpleDialog
+from Tkinter import *
+from SimpleDialog import SimpleDialog
 
 from configHandler import idleConf
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/MultiCall.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/MultiCall.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/MultiCall.py	Wed May 21 11:25:51 2008
@@ -32,7 +32,7 @@
 import sys
 import string
 import re
-import tkinter
+import Tkinter
 
 # the event type constants, which define the meaning of mc_type
 MC_KEYPRESS=0; MC_KEYRELEASE=1; MC_BUTTONPRESS=2; MC_BUTTONRELEASE=3;
@@ -292,7 +292,7 @@
         return _multicall_dict[widget]
 
     class MultiCall (widget):
-        assert issubclass(widget, tkinter.Misc)
+        assert issubclass(widget, Tkinter.Misc)
 
         def __init__(self, *args, **kwargs):
             apply(widget.__init__, (self,)+args, kwargs)
@@ -382,8 +382,8 @@
 
 if __name__ == "__main__":
     # Test
-    root = tkinter.Tk()
-    text = MultiCallCreator(tkinter.Text)(root)
+    root = Tkinter.Tk()
+    text = MultiCallCreator(Tkinter.Text)(root)
     text.pack()
     def bindseq(seq, n=[0]):
         def handler(event):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/MultiStatusBar.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/MultiStatusBar.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/MultiStatusBar.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
 
 class MultiStatusBar(Frame):
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/ObjectBrowser.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/ObjectBrowser.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/ObjectBrowser.py	Wed May 21 11:25:51 2008
@@ -136,7 +136,7 @@
 
 def _test():
     import sys
-    from tkinter import Tk
+    from Tkinter import Tk
     root = Tk()
     root.configure(bd=0, bg="yellow")
     root.focus_set()

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/OutputWindow.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/OutputWindow.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/OutputWindow.py	Wed May 21 11:25:51 2008
@@ -1,7 +1,7 @@
-from tkinter import *
+from Tkinter import *
 from EditorWindow import EditorWindow
 import re
-import tkinter.messagebox as tkMessageBox
+import tkMessageBox
 import IOBinding
 
 class OutputWindow(EditorWindow):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/Percolator.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/Percolator.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/Percolator.py	Wed May 21 11:25:51 2008
@@ -81,5 +81,5 @@
     root.mainloop()
 
 if __name__ == "__main__":
-    from tkinter import *
+    from Tkinter import *
     main()

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/PyShell.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/PyShell.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/PyShell.py	Wed May 21 11:25:51 2008
@@ -17,12 +17,12 @@
 from code import InteractiveInterpreter
 
 try:
-    from tkinter import *
+    from Tkinter import *
 except ImportError:
-    print>>sys.__stderr__, "** IDLE can't import tkinter.  " \
+    print>>sys.__stderr__, "** IDLE can't import Tkinter.  " \
                            "Your Python may not be configured for Tk. **"
     sys.exit(1)
-import tkinter.messagebox as tkMessageBox
+import tkMessageBox
 
 from EditorWindow import EditorWindow, fixwordbreaks
 from FileList import FileList
@@ -992,8 +992,8 @@
                    (sys.version, sys.platform, self.COPYRIGHT,
                     self.firewallmessage, idlever.IDLE_VERSION, nosub))
         self.showprompt()
-        import tkinter
-        tkinter._default_root = None # 03Jan04 KBK What's this?
+        import Tkinter
+        Tkinter._default_root = None # 03Jan04 KBK What's this?
         return True
 
     def readline(self):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/ReplaceDialog.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/ReplaceDialog.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/ReplaceDialog.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
 import SearchEngine
 from SearchDialogBase import SearchDialogBase
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/ScriptBinding.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/ScriptBinding.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/ScriptBinding.py	Wed May 21 11:25:51 2008
@@ -22,7 +22,7 @@
 import string
 import tabnanny
 import tokenize
-import tkinter.messagebox as tkMessageBox
+import tkMessageBox
 import PyShell
 
 from configHandler import idleConf

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/ScrolledList.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/ScrolledList.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/ScrolledList.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
 
 class ScrolledList:
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialog.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialog.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialog.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
 import SearchEngine
 from SearchDialogBase import SearchDialogBase
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialogBase.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialogBase.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/SearchDialogBase.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
 
 class SearchDialogBase:
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/SearchEngine.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/SearchEngine.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/SearchEngine.py	Wed May 21 11:25:51 2008
@@ -1,6 +1,6 @@
 import re
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
 
 def get(root):
     if not hasattr(root, "_searchengine"):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/StackViewer.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/StackViewer.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/StackViewer.py	Wed May 21 11:25:51 2008
@@ -7,7 +7,7 @@
 
 def StackBrowser(root, flist=None, tb=None, top=None):
     if top is None:
-        from tkinter import Toplevel
+        from Tkinter import Toplevel
         top = Toplevel(root)
     sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
     sc.frame.pack(expand=1, fill="both")
@@ -128,7 +128,7 @@
         reload(testcode)
     except:
         sys.last_type, sys.last_value, sys.last_traceback = sys.exc_info()
-    from tkinter import Tk
+    from Tkinter import Tk
     root = Tk()
     StackBrowser(None, top=root)
     root.mainloop()

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/ToolTip.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/ToolTip.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/ToolTip.py	Wed May 21 11:25:51 2008
@@ -3,7 +3,7 @@
 # may be useful for some purposes in (or almost in ;) the current project scope
 # Ideas gleaned from PySol
 
-from tkinter import *
+from Tkinter import *
 
 class ToolTipBase:
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/TreeWidget.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/TreeWidget.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/TreeWidget.py	Wed May 21 11:25:51 2008
@@ -15,7 +15,7 @@
 # - optimize tree redraw after expand of subnode
 
 import os
-from tkinter import *
+from Tkinter import *
 import imp
 
 import ZoomHeight

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/UndoDelegator.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/UndoDelegator.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/UndoDelegator.py	Wed May 21 11:25:51 2008
@@ -1,5 +1,5 @@
 import string
-from tkinter import *
+from Tkinter import *
 from Delegator import Delegator
 
 #$ event <<redo>>

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/WidgetRedirector.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/WidgetRedirector.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/WidgetRedirector.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
 
 class WidgetRedirector:
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/WindowList.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/WindowList.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/WindowList.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,4 @@
-from tkinter import *
+from Tkinter import *
 
 class WindowList:
 

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/aboutDialog.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/aboutDialog.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/aboutDialog.py	Wed May 21 11:25:51 2008
@@ -2,7 +2,7 @@
 
 """
 
-from tkinter import *
+from Tkinter import *
 import os
 import os.path
 import textView

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/configDialog.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/configDialog.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/configDialog.py	Wed May 21 11:25:51 2008
@@ -9,10 +9,8 @@
 Refer to comments in EditorWindow autoindent code for details.
 
 """
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
-import tkinter.colorchooser as tkColorChooser
-import tkinter.font as tkFont
+from Tkinter import *
+import tkMessageBox, tkColorChooser, tkFont
 import string
 
 from configHandler import idleConf

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/configHelpSourceEdit.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/configHelpSourceEdit.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/configHelpSourceEdit.py	Wed May 21 11:25:51 2008
@@ -3,9 +3,9 @@
 import os
 import sys
 
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
-import tkinter.filedialog as tkFileDialog
+from Tkinter import *
+import tkMessageBox
+import tkFileDialog
 
 class GetHelpSourceDialog(Toplevel):
     def __init__(self, parent, title, menuItem='', filePath=''):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/configSectionNameDialog.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/configSectionNameDialog.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/configSectionNameDialog.py	Wed May 21 11:25:51 2008
@@ -2,8 +2,8 @@
 Dialog that allows user to specify a new config file section name.
 Used to get new highlight theme and keybinding set names.
 """
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
 
 class GetCfgSectionNameDialog(Toplevel):
     def __init__(self,parent,title,message,usedNames):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/dynOptionMenuWidget.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/dynOptionMenuWidget.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/dynOptionMenuWidget.py	Wed May 21 11:25:51 2008
@@ -2,8 +2,8 @@
 OptionMenu widget modified to allow dynamic menu reconfiguration
 and setting of highlightthickness
 """
-from tkinter import OptionMenu
-from tkinter import _setit
+from Tkinter import OptionMenu
+from Tkinter import _setit
 import copy
 
 class DynOptionMenu(OptionMenu):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/keybindingDialog.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/keybindingDialog.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/keybindingDialog.py	Wed May 21 11:25:51 2008
@@ -1,8 +1,8 @@
 """
 Dialog for building Tkinter accelerator key bindings
 """
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
 import string
 
 class GetKeysDialog(Toplevel):

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/macosxSupport.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/macosxSupport.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/macosxSupport.py	Wed May 21 11:25:51 2008
@@ -3,7 +3,7 @@
 GUI application (as opposed to an X11 application).
 """
 import sys
-import tkinter
+import Tkinter
 
 def runningAsOSXApp():
     """ Returns True iff running from the IDLE.app bundle on OSX """
@@ -26,7 +26,7 @@
 def hideTkConsole(root):
     try:
         root.tk.call('console', 'hide')
-    except tkinter.TclError:
+    except Tkinter.TclError:
         # Some versions of the Tk framework don't have a console object
         pass
 
@@ -46,7 +46,7 @@
     #
     # Due to a (mis-)feature of TkAqua the user will also see an empty Help
     # menu.
-    from tkinter import Menu, Text, Text
+    from Tkinter import Menu, Text, Text
     from EditorWindow import prepstr, get_accelerator
     import Bindings
     import WindowList

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/rpc.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/rpc.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/rpc.py	Wed May 21 11:25:51 2008
@@ -37,7 +37,7 @@
 import threading
 import queue
 import traceback
-import copyreg
+import copy_reg
 import types
 import marshal
 
@@ -60,8 +60,8 @@
 #      assert isinstance(fn, type.FunctionType)
 #      return repr(fn)
 
-copyreg.pickle(types.CodeType, pickle_code, unpickle_code)
-# copyreg.pickle(types.FunctionType, pickle_function, unpickle_function)
+copy_reg.pickle(types.CodeType, pickle_code, unpickle_code)
+# copy_reg.pickle(types.FunctionType, pickle_function, unpickle_function)
 
 BUFSIZE = 8*1024
 LOCALHOST = '127.0.0.1'

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/run.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/run.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/run.py	Wed May 21 11:25:51 2008
@@ -127,9 +127,9 @@
     server.handle_request() # A single request only
 
 def show_socket_error(err, address):
-    import tkinter
-    import tkinter.messagebox as tkMessageBox
-    root = tkinter.Tk()
+    import Tkinter
+    import tkMessageBox
+    root = Tkinter.Tk()
     root.withdraw()
     if err[0] == 61: # connection refused
         msg = "IDLE's subprocess can't connect to %s:%d.  This may be due "\

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/tabbedpages.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/tabbedpages.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/tabbedpages.py	Wed May 21 11:25:51 2008
@@ -7,7 +7,7 @@
 TabSet -- A widget containing tabs (buttons) in one or more rows.
 
 """
-from tkinter import *
+from Tkinter import *
 
 class InvalidNameError(Exception): pass
 class AlreadyExistsError(Exception): pass

Modified: python/branches/tlee-ast-optimize/Lib/idlelib/textView.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/idlelib/textView.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/idlelib/textView.py	Wed May 21 11:25:51 2008
@@ -2,8 +2,8 @@
 
 """
 
-from tkinter import *
-import tkinter.messagebox as tkMessageBox
+from Tkinter import *
+import tkMessageBox
 
 class TextViewer(Toplevel):
     """A simple text viewer dialog for IDLE
@@ -68,7 +68,7 @@
         else:
             textFile = open(filename, 'r')
     except IOError:
-        import tkinter.messagebox as tkMessageBox
+        import tkMessageBox
         tkMessageBox.showerror(title='File Load Error',
                                message='Unable to load file %r .' % filename,
                                parent=parent)

Deleted: python/branches/tlee-ast-optimize/Lib/lib-old/copy_reg.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/lib-old/copy_reg.py	Wed May 21 11:25:51 2008
+++ (empty file)
@@ -1,8 +0,0 @@
-import sys
-from warnings import warnpy3k
-
-warnpy3k("the copy_reg module has been renamed "
-         "to 'copyreg' in Python 3.0", stacklevel=2)
-
-import copyreg
-sys.modules[__name__] = copyreg

Modified: python/branches/tlee-ast-optimize/Lib/lib-tk/Canvas.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/lib-tk/Canvas.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/lib-tk/Canvas.py	Wed May 21 11:25:51 2008
@@ -7,7 +7,7 @@
 warnpy3k("the Canvas module has been removed in Python 3.0", stacklevel=2)
 del warnpy3k
 
-from tkinter import Canvas, _cnfmerge, _flatten
+from Tkinter import Canvas, _cnfmerge, _flatten
 
 
 class CanvasItem:

Modified: python/branches/tlee-ast-optimize/Lib/logging/handlers.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/logging/handlers.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/logging/handlers.py	Wed May 21 11:25:51 2008
@@ -156,10 +156,11 @@
     If backupCount is > 0, when rollover is done, no more than backupCount
     files are kept - the oldest ones are deleted.
     """
-    def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None, delay=0):
+    def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None, delay=0, utc=0):
         BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay)
         self.when = string.upper(when)
         self.backupCount = backupCount
+        self.utc = utc
         # Calculate the real rollover interval, which is just the number of
         # seconds between rollovers.  Also set the filename suffix used when
         # a rollover occurs.  Current 'when' events supported:
@@ -214,7 +215,10 @@
         # the rest.  Note that this code doesn't care about leap seconds. :)
         if self.when == 'MIDNIGHT' or self.when.startswith('W'):
             # This could be done with less code, but I wanted it to be clear
-            t = time.localtime(currentTime)
+            if utc:
+                t = time.gmtime(currentTime)
+            else:
+                t = time.localtime(currentTime)
             currentHour = t[3]
             currentMinute = t[4]
             currentSecond = t[5]
@@ -245,13 +249,14 @@
                     else:
                         daysToWait = 6 - day + self.dayOfWeek + 1
                     newRolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24))
-                    dstNow = t[-1]
-                    dstAtRollover = time.localtime(newRolloverAt)[-1]
-                    if dstNow != dstAtRollover:
-                        if not dstNow:  # DST kicks in before next rollover, so we need to deduct an hour
-                            newRolloverAt = newRolloverAt - 3600
-                        else:           # DST bows out before next rollover, so we need to add an hour
-                            newRolloverAt = newRolloverAt + 3600
+                    if not utc:
+                        dstNow = t[-1]
+                        dstAtRollover = time.localtime(newRolloverAt)[-1]
+                        if dstNow != dstAtRollover:
+                            if not dstNow:  # DST kicks in before next rollover, so we need to deduct an hour
+                                newRolloverAt = newRolloverAt - 3600
+                            else:           # DST bows out before next rollover, so we need to add an hour
+                                newRolloverAt = newRolloverAt + 3600
                     self.rolloverAt = newRolloverAt
 
         #print "Will rollover at %d, %d seconds from now" % (self.rolloverAt, self.rolloverAt - currentTime)
@@ -284,7 +289,7 @@
             if fileName[:plen] == prefix:
                 suffix = fileName[plen:]
                 if self.extMatch.match(suffix):
-                    result.append(fileName)
+                    result.append(os.path.join(dirName, fileName))
         result.sort()
         if len(result) < self.backupCount:
             result = []
@@ -303,7 +308,10 @@
         self.stream.close()
         # get the time that this sequence started at and make it a TimeTuple
         t = self.rolloverAt - self.interval
-        timeTuple = time.localtime(t)
+        if self.utc:
+            timeTuple = time.gmtime(t)
+        else:
+            timeTuple = time.localtime(t)
         dfn = self.baseFilename + "." + time.strftime(self.suffix, timeTuple)
         if os.path.exists(dfn):
             os.remove(dfn)
@@ -324,7 +332,7 @@
         while newRolloverAt <= currentTime:
             newRolloverAt = newRolloverAt + self.interval
         #If DST changes and midnight or weekly rollover, adjust for this.
-        if self.when == 'MIDNIGHT' or self.when.startswith('W'):
+        if (self.when == 'MIDNIGHT' or self.when.startswith('W')) and not self.utc:
             dstNow = time.localtime(currentTime)[-1]
             dstAtRollover = time.localtime(newRolloverAt)[-1]
             if dstNow != dstAtRollover:

Modified: python/branches/tlee-ast-optimize/Lib/os.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/os.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/os.py	Wed May 21 11:25:51 2008
@@ -715,7 +715,7 @@
             return p.stdin, p.stdout
         __all__.append("popen4")
 
-import copyreg as _copy_reg
+import copy_reg as _copy_reg
 
 def _make_stat_result(tup, dict):
     return stat_result(tup, dict)

Modified: python/branches/tlee-ast-optimize/Lib/pickle.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/pickle.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/pickle.py	Wed May 21 11:25:51 2008
@@ -1,7 +1,7 @@
 """Create portable serialized representations of Python objects.
 
 See module cPickle for a (much) faster implementation.
-See module copyreg for a mechanism for registering custom picklers.
+See module copy_reg for a mechanism for registering custom picklers.
 See module pickletools source for extensive comments.
 
 Classes:
@@ -27,8 +27,8 @@
 __version__ = "$Revision$"       # Code version
 
 from types import *
-from copyreg import dispatch_table
-from copyreg import _extension_registry, _inverted_registry, _extension_cache
+from copy_reg import dispatch_table
+from copy_reg import _extension_registry, _inverted_registry, _extension_cache
 import marshal
 import sys
 import struct
@@ -295,7 +295,7 @@
             self.save_global(obj)
             return
 
-        # Check copyreg.dispatch_table
+        # Check copy_reg.dispatch_table
         reduce = dispatch_table.get(t)
         if reduce:
             rv = reduce(obj)

Modified: python/branches/tlee-ast-optimize/Lib/pickletools.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/pickletools.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/pickletools.py	Wed May 21 11:25:51 2008
@@ -136,7 +136,7 @@
 analysis.
 
 To this end, all tests for __safe_for_unpickling__ or for
-copyreg.safe_constructors are removed from the unpickling code.
+copy_reg.safe_constructors are removed from the unpickling code.
 References to these variables in the descriptions below are to be seen
 as describing unpickling in Python 2.2 and before.
 """
@@ -1525,7 +1525,7 @@
       BUILD opcode to apply  __setstate__ to that argument.
 
       If type(callable) is not ClassType, REDUCE complains unless the
-      callable has been registered with the copyreg module's
+      callable has been registered with the copy_reg module's
       safe_constructors dict, or the callable has a magic
       '__safe_for_unpickling__' attribute with a true value.  I'm not sure
       why it does this, but I've sure seen this complaint often enough when

Modified: python/branches/tlee-ast-optimize/Lib/platform.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/platform.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/platform.py	Wed May 21 11:25:51 2008
@@ -733,7 +733,11 @@
             release = '%i.%i.%i' %(major, minor, patch)
         else:
             release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
+
     if sysu:
+        # NOTE: this block is left as documentation of the
+        # intention of this function, the 'sysu' gestalt is no
+        # longer available and there are no alternatives.
         major =  int((sysu & 0xFF000000L) >> 24)
         minor =  (sysu & 0x00F00000) >> 20
         bugfix = (sysu & 0x000F0000) >> 16
@@ -746,6 +750,8 @@
                  0x60:'beta',
                  0x80:'final'}.get(stage,'')
         versioninfo = (version,stage,nonrel)
+
+
     if sysa:
         machine = {0x1: '68k',
                    0x2: 'PowerPC',

Modified: python/branches/tlee-ast-optimize/Lib/poplib.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/poplib.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/poplib.py	Wed May 21 11:25:51 2008
@@ -240,7 +240,7 @@
 
 
     def rset(self):
-        """Not sure what this does."""
+        """Unmark all messages marked for deletion."""
         return self._shortcmd('RSET')
 
 

Modified: python/branches/tlee-ast-optimize/Lib/pydoc.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/pydoc.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/pydoc.py	Wed May 21 11:25:51 2008
@@ -2017,20 +2017,20 @@
             self.server = None
             self.scanner = None
 
-            import tkinter
-            self.server_frm = tkinter.Frame(window)
-            self.title_lbl = tkinter.Label(self.server_frm,
+            import Tkinter
+            self.server_frm = Tkinter.Frame(window)
+            self.title_lbl = Tkinter.Label(self.server_frm,
                 text='Starting server...\n ')
-            self.open_btn = tkinter.Button(self.server_frm,
+            self.open_btn = Tkinter.Button(self.server_frm,
                 text='open browser', command=self.open, state='disabled')
-            self.quit_btn = tkinter.Button(self.server_frm,
+            self.quit_btn = Tkinter.Button(self.server_frm,
                 text='quit serving', command=self.quit, state='disabled')
 
-            self.search_frm = tkinter.Frame(window)
-            self.search_lbl = tkinter.Label(self.search_frm, text='Search for')
-            self.search_ent = tkinter.Entry(self.search_frm)
+            self.search_frm = Tkinter.Frame(window)
+            self.search_lbl = Tkinter.Label(self.search_frm, text='Search for')
+            self.search_ent = Tkinter.Entry(self.search_frm)
             self.search_ent.bind('<Return>', self.search)
-            self.stop_btn = tkinter.Button(self.search_frm,
+            self.stop_btn = Tkinter.Button(self.search_frm,
                 text='stop', pady=0, command=self.stop, state='disabled')
             if sys.platform == 'win32':
                 # Trying to hide and show this button crashes under Windows.
@@ -2049,17 +2049,17 @@
             self.search_ent.focus_set()
 
             font = ('helvetica', sys.platform == 'win32' and 8 or 10)
-            self.result_lst = tkinter.Listbox(window, font=font, height=6)
+            self.result_lst = Tkinter.Listbox(window, font=font, height=6)
             self.result_lst.bind('<Button-1>', self.select)
             self.result_lst.bind('<Double-Button-1>', self.goto)
-            self.result_scr = tkinter.Scrollbar(window,
+            self.result_scr = Tkinter.Scrollbar(window,
                 orient='vertical', command=self.result_lst.yview)
             self.result_lst.config(yscrollcommand=self.result_scr.set)
 
-            self.result_frm = tkinter.Frame(window)
-            self.goto_btn = tkinter.Button(self.result_frm,
+            self.result_frm = Tkinter.Frame(window)
+            self.goto_btn = Tkinter.Button(self.result_frm,
                 text='go to selected', command=self.goto)
-            self.hide_btn = tkinter.Button(self.result_frm,
+            self.hide_btn = Tkinter.Button(self.result_frm,
                 text='hide results', command=self.hide)
             self.goto_btn.pack(side='left', fill='x', expand=1)
             self.hide_btn.pack(side='right', fill='x', expand=1)
@@ -2179,9 +2179,9 @@
             self.stop()
             self.collapse()
 
-    import tkinter
+    import Tkinter
     try:
-        root = tkinter.Tk()
+        root = Tkinter.Tk()
         # Tk will crash if pythonw.exe has an XP .manifest
         # file and the root has is not destroyed explicitly.
         # If the problem is ever fixed in Tk, the explicit

Modified: python/branches/tlee-ast-optimize/Lib/re.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/re.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/re.py	Wed May 21 11:25:51 2008
@@ -278,12 +278,12 @@
 
 # register myself for pickling
 
-import copyreg
+import copy_reg
 
 def _pickle(p):
     return _compile, (p.pattern, p.flags)
 
-copyreg.pickle(_pattern_type, _pickle, _compile)
+copy_reg.pickle(_pattern_type, _pickle, _compile)
 
 # --------------------------------------------------------------------
 # experimental stuff (see python-dev discussions for details)

Modified: python/branches/tlee-ast-optimize/Lib/test/pickletester.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/pickletester.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/pickletester.py	Wed May 21 11:25:51 2008
@@ -2,7 +2,7 @@
 import pickle
 import cPickle
 import pickletools
-import copyreg
+import copy_reg
 
 from test.test_support import TestFailed, have_unicode, TESTFN, \
                               run_with_locale
@@ -44,21 +44,21 @@
     # there is one).
     def __init__(self, code):
         self.code = code
-        if code in copyreg._inverted_registry:
-            self.pair = copyreg._inverted_registry[code]
-            copyreg.remove_extension(self.pair[0], self.pair[1], code)
+        if code in copy_reg._inverted_registry:
+            self.pair = copy_reg._inverted_registry[code]
+            copy_reg.remove_extension(self.pair[0], self.pair[1], code)
         else:
             self.pair = None
 
     # Restore previous registration for code.
     def restore(self):
         code = self.code
-        curpair = copyreg._inverted_registry.get(code)
+        curpair = copy_reg._inverted_registry.get(code)
         if curpair is not None:
-            copyreg.remove_extension(curpair[0], curpair[1], code)
+            copy_reg.remove_extension(curpair[0], curpair[1], code)
         pair = self.pair
         if pair is not None:
-            copyreg.add_extension(pair[0], pair[1], code)
+            copy_reg.add_extension(pair[0], pair[1], code)
 
 class C:
     def __cmp__(self, other):
@@ -690,14 +690,14 @@
                 self.assertEqual(B(x), B(y), detail)
                 self.assertEqual(x.__dict__, y.__dict__, detail)
 
-    # Register a type with copyreg, with extension code extcode.  Pickle
+    # Register a type with copy_reg, with extension code extcode.  Pickle
     # an object of that type.  Check that the resulting pickle uses opcode
     # (EXT[124]) under proto 2, and not in proto 1.
 
     def produce_global_ext(self, extcode, opcode):
         e = ExtensionSaver(extcode)
         try:
-            copyreg.add_extension(__name__, "MyList", extcode)
+            copy_reg.add_extension(__name__, "MyList", extcode)
             x = MyList([1, 2, 3])
             x.foo = 42
             x.bar = "hello"

Modified: python/branches/tlee-ast-optimize/Lib/test/regrtest.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/regrtest.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/regrtest.py	Wed May 21 11:25:51 2008
@@ -629,7 +629,7 @@
 
 def dash_R(the_module, test, indirect_test, huntrleaks):
     # This code is hackish and inelegant, but it seems to do the job.
-    import copyreg, _abcoll, io
+    import copy_reg, _abcoll, io
 
     if not hasattr(sys, 'gettotalrefcount'):
         raise Exception("Tracking reference leaks requires a debug build "
@@ -637,7 +637,7 @@
 
     # Save current values for dash_R_cleanup() to restore.
     fs = warnings.filters[:]
-    ps = copyreg.dispatch_table.copy()
+    ps = copy_reg.dispatch_table.copy()
     pic = sys.path_importer_cache.copy()
     abcs = {}
     modules = _abcoll, io
@@ -677,7 +677,7 @@
         refrep.close()
 
 def dash_R_cleanup(fs, ps, pic, abcs):
-    import gc, copyreg
+    import gc, copy_reg
     import _strptime, linecache
     dircache = test_support.import_module('dircache', deprecated=True)
     import urlparse, urllib, urllib2, mimetypes, doctest
@@ -691,8 +691,8 @@
 
     # Restore some original values.
     warnings.filters[:] = fs
-    copyreg.dispatch_table.clear()
-    copyreg.dispatch_table.update(ps)
+    copy_reg.dispatch_table.clear()
+    copy_reg.dispatch_table.update(ps)
     sys.path_importer_cache.clear()
     sys.path_importer_cache.update(pic)
 

Modified: python/branches/tlee-ast-optimize/Lib/test/test___all__.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test___all__.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test___all__.py	Wed May 21 11:25:51 2008
@@ -61,7 +61,7 @@
         self.check_all("commands")
         self.check_all("compileall")
         self.check_all("copy")
-        self.check_all("copyreg")
+        self.check_all("copy_reg")
         self.check_all("csv")
         self.check_all("dbhash")
         self.check_all("decimal")

Modified: python/branches/tlee-ast-optimize/Lib/test/test_collections.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_collections.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_collections.py	Wed May 21 11:25:51 2008
@@ -110,7 +110,9 @@
 
         n = 10000
         import string, random
-        names = [''.join([random.choice(string.letters) for j in range(10)]) for i in range(n)]
+        names = list(set(''.join([random.choice(string.ascii_letters)
+                                  for j in range(10)]) for i in range(n)))
+        n = len(names)
         Big = namedtuple('Big', names)
         b = Big(*range(n))
         self.assertEqual(b, tuple(range(n)))

Modified: python/branches/tlee-ast-optimize/Lib/test/test_copy.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_copy.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_copy.py	Wed May 21 11:25:51 2008
@@ -1,7 +1,7 @@
 """Unit tests for the copy module."""
 
 import copy
-import copyreg
+import copy_reg
 
 import unittest
 from test import test_support
@@ -42,7 +42,7 @@
             return (C, (obj.foo,))
         x = C(42)
         self.assertRaises(TypeError, copy.copy, x)
-        copyreg.pickle(C, pickle_C, C)
+        copy_reg.pickle(C, pickle_C, C)
         y = copy.copy(x)
 
     def test_copy_reduce_ex(self):
@@ -215,7 +215,7 @@
             return (C, (obj.foo,))
         x = C(42)
         self.assertRaises(TypeError, copy.deepcopy, x)
-        copyreg.pickle(C, pickle_C, C)
+        copy_reg.pickle(C, pickle_C, C)
         y = copy.deepcopy(x)
 
     def test_deepcopy_reduce_ex(self):

Deleted: python/branches/tlee-ast-optimize/Lib/test/test_copyreg.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_copyreg.py	Wed May 21 11:25:51 2008
+++ (empty file)
@@ -1,121 +0,0 @@
-import copyreg
-import unittest
-
-from test import test_support
-from test.pickletester import ExtensionSaver
-
-class C:
-    pass
-
-
-class WithoutSlots(object):
-    pass
-
-class WithWeakref(object):
-    __slots__ = ('__weakref__',)
-
-class WithPrivate(object):
-    __slots__ = ('__spam',)
-
-class WithSingleString(object):
-    __slots__ = 'spam'
-
-class WithInherited(WithSingleString):
-    __slots__ = ('eggs',)
-
-
-class CopyRegTestCase(unittest.TestCase):
-
-    def test_class(self):
-        self.assertRaises(TypeError, copyreg.pickle,
-                          C, None, None)
-
-    def test_noncallable_reduce(self):
-        self.assertRaises(TypeError, copyreg.pickle,
-                          type(1), "not a callable")
-
-    def test_noncallable_constructor(self):
-        self.assertRaises(TypeError, copyreg.pickle,
-                          type(1), int, "not a callable")
-
-    def test_bool(self):
-        import copy
-        self.assertEquals(True, copy.copy(True))
-
-    def test_extension_registry(self):
-        mod, func, code = 'junk1 ', ' junk2', 0xabcd
-        e = ExtensionSaver(code)
-        try:
-            # Shouldn't be in registry now.
-            self.assertRaises(ValueError, copyreg.remove_extension,
-                              mod, func, code)
-            copyreg.add_extension(mod, func, code)
-            # Should be in the registry.
-            self.assert_(copyreg._extension_registry[mod, func] == code)
-            self.assert_(copyreg._inverted_registry[code] == (mod, func))
-            # Shouldn't be in the cache.
-            self.assert_(code not in copyreg._extension_cache)
-            # Redundant registration should be OK.
-            copyreg.add_extension(mod, func, code)  # shouldn't blow up
-            # Conflicting code.
-            self.assertRaises(ValueError, copyreg.add_extension,
-                              mod, func, code + 1)
-            self.assertRaises(ValueError, copyreg.remove_extension,
-                              mod, func, code + 1)
-            # Conflicting module name.
-            self.assertRaises(ValueError, copyreg.add_extension,
-                              mod[1:], func, code )
-            self.assertRaises(ValueError, copyreg.remove_extension,
-                              mod[1:], func, code )
-            # Conflicting function name.
-            self.assertRaises(ValueError, copyreg.add_extension,
-                              mod, func[1:], code)
-            self.assertRaises(ValueError, copyreg.remove_extension,
-                              mod, func[1:], code)
-            # Can't remove one that isn't registered at all.
-            if code + 1 not in copyreg._inverted_registry:
-                self.assertRaises(ValueError, copyreg.remove_extension,
-                                  mod[1:], func[1:], code + 1)
-
-        finally:
-            e.restore()
-
-        # Shouldn't be there anymore.
-        self.assert_((mod, func) not in copyreg._extension_registry)
-        # The code *may* be in copyreg._extension_registry, though, if
-        # we happened to pick on a registered code.  So don't check for
-        # that.
-
-        # Check valid codes at the limits.
-        for code in 1, 0x7fffffff:
-            e = ExtensionSaver(code)
-            try:
-                copyreg.add_extension(mod, func, code)
-                copyreg.remove_extension(mod, func, code)
-            finally:
-                e.restore()
-
-        # Ensure invalid codes blow up.
-        for code in -1, 0, 0x80000000L:
-            self.assertRaises(ValueError, copyreg.add_extension,
-                              mod, func, code)
-
-    def test_slotnames(self):
-        self.assertEquals(copyreg._slotnames(WithoutSlots), [])
-        self.assertEquals(copyreg._slotnames(WithWeakref), [])
-        expected = ['_WithPrivate__spam']
-        self.assertEquals(copyreg._slotnames(WithPrivate), expected)
-        self.assertEquals(copyreg._slotnames(WithSingleString), ['spam'])
-        expected = ['eggs', 'spam']
-        expected.sort()
-        result = copyreg._slotnames(WithInherited)
-        result.sort()
-        self.assertEquals(result, expected)
-
-
-def test_main():
-    test_support.run_unittest(CopyRegTestCase)
-
-
-if __name__ == "__main__":
-    test_main()

Modified: python/branches/tlee-ast-optimize/Lib/test/test_platform.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_platform.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_platform.py	Wed May 21 11:25:51 2008
@@ -1,4 +1,5 @@
 import sys
+import os
 import unittest
 import platform
 
@@ -63,12 +64,29 @@
 
     def test_mac_ver(self):
         res = platform.mac_ver()
-        try:
-            import gestalt
-        except ImportError: pass
-        else:
-            if sys.platform == 'darwin':
-                self.assert_(all(res))
+
+        if os.uname()[0] == 'Darwin':
+            # We're on a MacOSX system, check that
+            # the right version information is returned
+            fd = os.popen('sw_vers', 'r')
+            real_ver = None
+            for ln in fd:
+                if ln.startswith('ProductVersion:'):
+                    real_ver = ln.strip().split()[-1]
+                    break
+            fd.close()
+            self.failIf(real_ver is None)
+            self.assertEquals(res[0], real_ver)
+
+            # res[1] claims to contain
+            # (version, dev_stage, non_release_version)
+            # That information is no longer available
+            self.assertEquals(res[1], ('', '', ''))
+
+            if sys.byteorder == 'little':
+                self.assertEquals(res[2], 'i386')
+            else:
+                self.assertEquals(res[2], 'PowerPC')
 
     def test_dist(self):
         res = platform.dist()

Modified: python/branches/tlee-ast-optimize/Lib/test/test_py3kwarn.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_py3kwarn.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_py3kwarn.py	Wed May 21 11:25:51 2008
@@ -123,6 +123,13 @@
         with catch_warning() as w:
             self.assertWarning(buffer('a'), w, expected)
 
+    def test_file_xreadlines(self):
+        expected = ("f.xreadlines() not supported in 3.x, "
+                    "try 'for line in f' instead")
+        with file(__file__) as f:
+            with catch_warning() as w:
+                self.assertWarning(f.xreadlines(), w, expected)
+
 
 class TestStdlibRemovals(unittest.TestCase):
 
@@ -208,26 +215,10 @@
 
 class TestStdlibRenames(unittest.TestCase):
 
-    renames = {'copy_reg': 'copyreg', 'Queue': 'queue',
+    renames = {'Queue': 'queue',
                'SocketServer': 'socketserver',
                'ConfigParser': 'configparser',
-               'repr': 'reprlib',
-               'FileDialog': 'tkinter.filedialog',
-               'FixTk': 'tkinter._fix',
-               'ScrolledText': 'tkinter.scrolledtext',
-               'SimpleDialog': 'tkinter.simpledialog',
-               'Tix': 'tkinter.tix',
-               'tkColorChooser': 'tkinter.colorchooser',
-               'tkCommonDialog': 'tkinter.commondialog',
-               'Tkconstants': 'tkinter.constants',
-               'Tkdnd': 'tkinter.dnd',
-               'tkFileDialog': 'tkinter.filedialog',
-               'tkFont': 'tkinter.font',
-               'Tkinter': 'tkinter',
-               'tkMessageBox': 'tkinter.messagebox',
-               'tkSimpleDialog': 'tkinter.simpledialog',
-               'turtle': 'tkinter.turtle'
-               }
+               'repr': 'reprlib'}
 
     def check_rename(self, module_name, new_module_name):
         """Make sure that:

Modified: python/branches/tlee-ast-optimize/Lib/test/test_pyclbr.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_pyclbr.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_pyclbr.py	Wed May 21 11:25:51 2008
@@ -166,6 +166,7 @@
         cm('cgi', ignore=('log',))      # set with = in module
         cm('urllib', ignore=('_CFNumberToInt32',
                              '_CStringFromCFString',
+                             '_CFSetup',
                              'getproxies_registry',
                              'proxy_bypass_registry',
                              'proxy_bypass_macosx_sysconf',

Modified: python/branches/tlee-ast-optimize/Lib/test/test_pydoc.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_pydoc.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_pydoc.py	Wed May 21 11:25:51 2008
@@ -1,33 +1,257 @@
-from test import test_support
-import unittest
-import pydoc
-
-class TestDescriptions(unittest.TestCase):
-    def test_module(self):
-        # Check that pydocfodder module can be described
-        from test import pydocfodder
-        doc = pydoc.render_doc(pydocfodder)
-        assert "pydocfodder" in doc
-
-    def test_classic_class(self):
-        class C: "Classic class"
-        c = C()
-        self.failUnlessEqual(pydoc.describe(C), 'class C')
-        self.failUnlessEqual(pydoc.describe(c), 'instance of C')
-        self.failUnless('instance of C in module test.test_pydoc'
-                        in pydoc.render_doc(c))
-
-    def test_class(self):
-        class C(object): "New-style class"
-        c = C()
-
-        self.failUnlessEqual(pydoc.describe(C), 'class C')
-        self.failUnlessEqual(pydoc.describe(c), 'C')
-        self.failUnless('C in module test.test_pydoc object'
-                        in pydoc.render_doc(c))
-
-def test_main():
-    test_support.run_unittest(TestDescriptions)
-
-if __name__ == "__main__":
-    unittest.main()
+import sys
+import difflib
+import subprocess
+import re
+import pydoc
+import inspect
+import unittest
+import test.test_support
+
+from test import pydoc_mod
+
+expected_text_pattern = \
+"""
+NAME
+    test.pydoc_mod - This is a test module for test_pydoc
+
+FILE
+    %s
+
+CLASSES
+    __builtin__.object
+        B
+    A
+\x20\x20\x20\x20
+    class A
+     |  Hello and goodbye
+     |\x20\x20
+     |  Methods defined here:
+     |\x20\x20
+     |  __init__()
+     |      Wow, I have no function!
+\x20\x20\x20\x20
+    class B(__builtin__.object)
+     |  Data descriptors defined here:
+     |\x20\x20
+     |  __dict__
+     |      dictionary for instance variables (if defined)
+     |\x20\x20
+     |  __weakref__
+     |      list of weak references to the object (if defined)
+     |\x20\x20
+     |  ----------------------------------------------------------------------
+     |  Data and other attributes defined here:
+     |\x20\x20
+     |  NO_MEANING = 'eggs'
+
+FUNCTIONS
+    doc_func()
+        This function solves all of the world's problems:
+        hunger
+        lack of Python
+        war
+\x20\x20\x20\x20
+    nodoc_func()
+
+DATA
+    __author__ = 'Benjamin Peterson'
+    __credits__ = 'Nobody'
+    __package__ = None
+    __version__ = '1.2.3.4'
+
+VERSION
+    1.2.3.4
+
+AUTHOR
+    Benjamin Peterson
+
+CREDITS
+    Nobody
+""".strip()
+
+expected_html_pattern = \
+"""
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading">
+<tr bgcolor="#7799ee">
+<td valign=bottom>&nbsp;<br>
+<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="test.html"><font color="#ffffff">test</font></a>.pydoc_mod</strong></big></big> (version 1.2.3.4)</font></td
+><td align=right valign=bottom
+><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:%s">%s</a></font></td></tr></table>
+    <p><tt>This&nbsp;is&nbsp;a&nbsp;test&nbsp;module&nbsp;for&nbsp;test_pydoc</tt></p>
+<p>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#ee77aa">
+<td colspan=3 valign=bottom>&nbsp;<br>
+<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
+\x20\x20\x20\x20
+<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
+<td width="100%%"><dl>
+<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
+</font></dt><dd>
+<dl>
+<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#B">B</a>
+</font></dt></dl>
+</dd>
+<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#A">A</a>
+</font></dt></dl>
+ <p>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#ffc8d8">
+<td colspan=3 valign=bottom>&nbsp;<br>
+<font color="#000000" face="helvetica, arial"><a name="A">class <strong>A</strong></a></font></td></tr>
+\x20\x20\x20\x20
+<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
+<td colspan=2><tt>Hello&nbsp;and&nbsp;goodbye<br>&nbsp;</tt></td></tr>
+<tr><td>&nbsp;</td>
+<td width="100%%">Methods defined here:<br>
+<dl><dt><a name="A-__init__"><strong>__init__</strong></a>()</dt><dd><tt>Wow,&nbsp;I&nbsp;have&nbsp;no&nbsp;function!</tt></dd></dl>
+
+</td></tr></table> <p>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#ffc8d8">
+<td colspan=3 valign=bottom>&nbsp;<br>
+<font color="#000000" face="helvetica, arial"><a name="B">class <strong>B</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
+\x20\x20\x20\x20
+<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
+<td width="100%%">Data descriptors defined here:<br>
+<dl><dt><strong>__dict__</strong></dt>
+<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
+</dl>
+<dl><dt><strong>__weakref__</strong></dt>
+<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
+</dl>
+<hr>
+Data and other attributes defined here:<br>
+<dl><dt><strong>NO_MEANING</strong> = 'eggs'</dl>
+
+</td></tr></table></td></tr></table><p>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#eeaa77">
+<td colspan=3 valign=bottom>&nbsp;<br>
+<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
+\x20\x20\x20\x20
+<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
+<td width="100%%"><dl><dt><a name="-doc_func"><strong>doc_func</strong></a>()</dt><dd><tt>This&nbsp;function&nbsp;solves&nbsp;all&nbsp;of&nbsp;the&nbsp;world's&nbsp;problems:<br>
+hunger<br>
+lack&nbsp;of&nbsp;Python<br>
+war</tt></dd></dl>
+ <dl><dt><a name="-nodoc_func"><strong>nodoc_func</strong></a>()</dt></dl>
+</td></tr></table><p>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#55aa55">
+<td colspan=3 valign=bottom>&nbsp;<br>
+<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
+\x20\x20\x20\x20
+<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
+<td width="100%%"><strong>__author__</strong> = 'Benjamin Peterson'<br>
+<strong>__credits__</strong> = 'Nobody'<br>
+<strong>__package__</strong> = None<br>
+<strong>__version__</strong> = '1.2.3.4'</td></tr></table><p>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#7799ee">
+<td colspan=3 valign=bottom>&nbsp;<br>
+<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
+\x20\x20\x20\x20
+<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
+<td width="100%%">Benjamin&nbsp;Peterson</td></tr></table><p>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#7799ee">
+<td colspan=3 valign=bottom>&nbsp;<br>
+<font color="#ffffff" face="helvetica, arial"><big><strong>Credits</strong></big></font></td></tr>
+\x20\x20\x20\x20
+<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
+<td width="100%%">Nobody</td></tr></table>
+""".strip()
+
+# output pattern for missing module
+missing_pattern = "no Python documentation found for '%s'"
+
+def run_pydoc(module_name, *args):
+    """
+    Runs pydoc on the specified module. Returns the stripped
+    output of pydoc.
+    """
+    cmd = [sys.executable, pydoc.__file__, " ".join(args), module_name]
+    output = subprocess.Popen(cmd, stdout=subprocess.PIPE).stdout.read()
+    return output.strip()
+
+def get_pydoc_html(module):
+    "Returns pydoc generated output as html"
+    output = pydoc.HTMLDoc().docmodule(module)
+    return output.strip()
+
+def get_pydoc_text(module):
+    "Returns pydoc generated output as text"
+    output = pydoc.TextDoc().docmodule(module)
+
+    # cleanup the extra text formatting that pydoc preforms
+    patt = re.compile('\b.')
+    output = patt.sub('', output)
+    return output.strip()
+
+def print_diffs(text1, text2):
+    "Prints unified diffs for two texts"
+    lines1 = text1.splitlines(True)
+    lines2 = text2.splitlines(True)
+    diffs = difflib.unified_diff(lines1, lines2, n=0, fromfile='expected',
+                                 tofile='got')
+    print '\n' + ''.join(diffs)
+
+
+class PyDocDocTest(unittest.TestCase):
+
+    def test_html_doc(self):
+        result = get_pydoc_html(pydoc_mod)
+        mod_file = inspect.getabsfile(pydoc_mod)
+        expected_html = expected_html_pattern % (mod_file, mod_file)
+        if result != expected_html:
+            print_diffs(expected_html, result)
+            self.fail("outputs are not equal, see diff above")
+
+    def test_text_doc(self):
+        result = get_pydoc_text(pydoc_mod)
+        expected_text = expected_text_pattern % inspect.getabsfile(pydoc_mod)
+        if result != expected_text:
+            print_diffs(expected_text, result)
+            self.fail("outputs are not equal, see diff above")
+
+    def test_not_here(self):
+        missing_module = "test.i_am_not_here"
+        result = run_pydoc(missing_module)
+        expected = missing_pattern % missing_module
+        self.assertEqual(expected, result,
+            "documentation for missing module found")
+
+
+class TestDescriptions(unittest.TestCase):
+
+    def test_module(self):
+        # Check that pydocfodder module can be described
+        from test import pydocfodder
+        doc = pydoc.render_doc(pydocfodder)
+        self.assert_("pydocfodder" in doc)
+
+    def test_classic_class(self):
+        class C: "Classic class"
+        c = C()
+        self.assertEqual(pydoc.describe(C), 'class C')
+        self.assertEqual(pydoc.describe(c), 'instance of C')
+        self.assert_('instance of C in module test.test_pydoc'
+                        in pydoc.render_doc(c))
+
+    def test_class(self):
+        class C(object): "New-style class"
+        c = C()
+
+        self.assertEqual(pydoc.describe(C), 'class C')
+        self.assertEqual(pydoc.describe(c), 'C')
+        self.assert_('C in module test.test_pydoc object'
+                        in pydoc.render_doc(c))
+
+
+def test_main():
+    test.test_support.run_unittest(PyDocDocTest,
+                                   TestDescriptions)
+
+if __name__ == "__main__":
+    test_main()

Modified: python/branches/tlee-ast-optimize/Lib/test/test_subprocess.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_subprocess.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_subprocess.py	Wed May 21 11:25:51 2008
@@ -534,7 +534,7 @@
             # args is a string
             f, fname = self.mkstemp()
             os.write(f, "#!/bin/sh\n")
-            os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" %
+            os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" %
                         sys.executable)
             os.close(f)
             os.chmod(fname, 0700)
@@ -576,7 +576,7 @@
             # call() function with string argument on UNIX
             f, fname = self.mkstemp()
             os.write(f, "#!/bin/sh\n")
-            os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" %
+            os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" %
                         sys.executable)
             os.close(f)
             os.chmod(fname, 0700)

Modified: python/branches/tlee-ast-optimize/Lib/test/test_weakref.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_weakref.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_weakref.py	Wed May 21 11:25:51 2008
@@ -3,6 +3,7 @@
 import unittest
 import UserList
 import weakref
+import operator
 
 from test import test_support
 
@@ -187,6 +188,26 @@
         self.assertEqual(L3[:5], p3[:5])
         self.assertEqual(L3[2:5], p3[2:5])
 
+    def test_proxy_index(self):
+        class C:
+            def __index__(self):
+                return 10
+        o = C()
+        p = weakref.proxy(o)
+        self.assertEqual(operator.index(p), 10)
+
+    def test_proxy_div(self):
+        class C:
+            def __floordiv__(self, other):
+                return 42
+            def __ifloordiv__(self, other):
+                return 21
+        o = C()
+        p = weakref.proxy(o)
+        self.assertEqual(p // 5, 42)
+        p //= 5
+        self.assertEqual(p, 21)
+
     # The PyWeakref_* C API is documented as allowing either NULL or
     # None as the value for the callback, where either means "no
     # callback".  The "no callback" ref and proxy objects are supposed
@@ -1059,7 +1080,7 @@
     def _reference(self):
         return self.__ref.copy()
 
-libreftest = """ Doctest for examples in the library reference: libweakref.tex
+libreftest = """ Doctest for examples in the library reference: weakref.rst
 
 >>> import weakref
 >>> class Dict(dict):

Modified: python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py	Wed May 21 11:25:51 2008
@@ -132,6 +132,25 @@
         for f in (TESTFN2, TemporaryFile(), StringIO()):
             self.zipOpenTest(f, zipfile.ZIP_STORED)
 
+    def testOpenViaZipInfo(self):
+        # Create the ZIP archive
+        zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED)
+        zipfp.writestr("name", "foo")
+        zipfp.writestr("name", "bar")
+        zipfp.close()
+
+        zipfp = zipfile.ZipFile(TESTFN2, "r")
+        infos = zipfp.infolist()
+        data = ""
+        for info in infos:
+            data += zipfp.open(info).read()
+        self.assert_(data == "foobar" or data == "barfoo")
+        data = ""
+        for info in infos:
+            data += zipfp.read(info)
+        self.assert_(data == "foobar" or data == "barfoo")
+        zipfp.close()
+
     def zipRandomOpenTest(self, f, compression):
         self.makeTestArchive(f, compression)
 

Modified: python/branches/tlee-ast-optimize/Lib/urllib.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/urllib.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/urllib.py	Wed May 21 11:25:51 2008
@@ -1321,6 +1321,24 @@
 
 
 if sys.platform == 'darwin':
+
+    def _CFSetup(sc):
+        from ctypes import c_int32, c_void_p, c_char_p, c_int
+        sc.CFStringCreateWithCString.argtypes = [ c_void_p, c_char_p, c_int32 ]
+        sc.CFStringCreateWithCString.restype = c_void_p
+        sc.SCDynamicStoreCopyProxies.argtypes = [ c_void_p ]
+        sc.SCDynamicStoreCopyProxies.restype = c_void_p
+        sc.CFDictionaryGetValue.argtypes = [ c_void_p, c_void_p ]
+        sc.CFDictionaryGetValue.restype = c_void_p
+        sc.CFStringGetLength.argtypes = [ c_void_p ]
+        sc.CFStringGetLength.restype = c_int32
+        sc.CFStringGetCString.argtypes = [ c_void_p, c_char_p, c_int32, c_int32 ]
+        sc.CFStringGetCString.restype = c_int32
+        sc.CFNumberGetValue.argtypes = [ c_void_p, c_int, c_void_p ]
+        sc.CFNumberGetValue.restype = c_int32
+        sc.CFRelease.argtypes = [ c_void_p ]
+        sc.CFRelease.restype = None
+
     def _CStringFromCFString(sc, value):
         from ctypes import create_string_buffer
         length = sc.CFStringGetLength(value) + 1
@@ -1357,6 +1375,7 @@
             return (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8) | parts[3]
 
         sc = cdll.LoadLibrary(find_library("SystemConfiguration"))
+        _CFSetup(sc)
 
         hostIP = None
 
@@ -1369,6 +1388,8 @@
 
 
         proxyDict = sc.SCDynamicStoreCopyProxies(None)
+        if proxyDict is None:
+            return False
 
         try:
             # Check for simple host names:
@@ -1422,11 +1443,11 @@
         from ctypes.util import find_library
 
         sc = cdll.LoadLibrary(find_library("SystemConfiguration"))
+        _CFSetup(sc)
 
         if not sc:
             return {}
 
-
         kSCPropNetProxiesHTTPEnable = sc.CFStringCreateWithCString(0, "HTTPEnable", 0)
         kSCPropNetProxiesHTTPProxy = sc.CFStringCreateWithCString(0, "HTTPProxy", 0)
         kSCPropNetProxiesHTTPPort = sc.CFStringCreateWithCString(0, "HTTPPort", 0)

Modified: python/branches/tlee-ast-optimize/Lib/zipfile.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/zipfile.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/zipfile.py	Wed May 21 11:25:51 2008
@@ -776,10 +776,13 @@
         else:
             zef_file = open(self.filename, 'rb')
 
-        # Get info object for name
-        zinfo = self.getinfo(name)
-
-        filepos = zef_file.tell()
+        # Make sure we have an info object
+        if isinstance(name, ZipInfo):
+            # 'name' is already an info object
+            zinfo = name
+        else:
+            # Get info object for name
+            zinfo = self.getinfo(name)
 
         zef_file.seek(zinfo.header_offset, 0)
 
@@ -884,7 +887,7 @@
         if upperdirs and not os.path.exists(upperdirs):
             os.makedirs(upperdirs)
 
-        source = self.open(member.filename, pwd=pwd)
+        source = self.open(member, pwd=pwd)
         target = file(targetpath, "wb")
         shutil.copyfileobj(source, target)
         source.close()

Modified: python/branches/tlee-ast-optimize/Mac/Modules/gestaltmodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Mac/Modules/gestaltmodule.c	(original)
+++ python/branches/tlee-ast-optimize/Mac/Modules/gestaltmodule.c	Wed May 21 11:25:51 2008
@@ -34,7 +34,7 @@
 {
 	OSErr iErr;
 	OSType selector;
-	long response;
+	SInt32 response;
 	if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
 		return NULL;
 	iErr = Gestalt ( selector, &response );

Modified: python/branches/tlee-ast-optimize/Makefile.pre.in
==============================================================================
--- python/branches/tlee-ast-optimize/Makefile.pre.in	(original)
+++ python/branches/tlee-ast-optimize/Makefile.pre.in	Wed May 21 11:25:51 2008
@@ -376,6 +376,12 @@
 build_all_use_profile:
 	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
 
+coverage:
+	@echo "Building with support for coverage checking:"
+	$(MAKE) clean
+	$(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
+
+
 # Build the interpreter
 $(BUILDPYTHON):	Modules/python.o $(LIBRARY) $(LDLIBRARY)
 		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \

Modified: python/branches/tlee-ast-optimize/Misc/ACKS
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/ACKS	(original)
+++ python/branches/tlee-ast-optimize/Misc/ACKS	Wed May 21 11:25:51 2008
@@ -376,6 +376,7 @@
 Joseph Koshy
 Bob Kras
 Holger Krekel
+Michael Kremer
 Fabian Kreutz
 Hannu Krosing
 Andrew Kuchling
@@ -497,6 +498,7 @@
 Jason Orendorff
 Douglas Orr
 Denis S. Otkidach
+Michael Otteneder
 Russel Owen
 Ondrej Palkovsky
 Mike Pall
@@ -635,6 +637,7 @@
 Rafal Smotrzyk
 Dirk Soede
 Paul Sokolovsky
+Cody Somerville
 Clay Spence
 Per Spilling
 Joshua Spoerri

Modified: python/branches/tlee-ast-optimize/Misc/NEWS
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/NEWS	(original)
+++ python/branches/tlee-ast-optimize/Misc/NEWS	Wed May 21 11:25:51 2008
@@ -12,99 +12,136 @@
 Core and Builtins
 -----------------
 
-- Issue #2863: generators now have a ``gen.__name__`` attribute that equals
-  ``gen.gi_code.co_name``, like ``func.__name___`` that equals
-  ``func.func_code.co_name``.  The repr() of a generator now also contains
-  this name.
+- Patch #2488: Add sys.maxsize.
+
+- Issue #2353: file.xreadlines() now emits a Py3k warning.
+
+- Issue #2863: generators now have a ``gen.__name__`` attribute that
+  equals ``gen.gi_code.co_name``, like ``func.__name___`` that equals
+  ``func.func_code.co_name``.  The repr() of a generator now also
+  contains this name.
 
 - Issue #2831: enumerate() now has a ``start`` argument.
 
-- Issue #2801: fix bug in the float.is_integer method where a ValueError
-  was sometimes incorrectly raised.
+- Issue #2801: fix bug in the float.is_integer method where a
+  ValueError was sometimes incorrectly raised.
 
-- Issue #2790: sys.flags was not properly exposing its bytes_warning attribute.
+- Issue #2790: sys.flags was not properly exposing its bytes_warning
+  attribute.
 
-- Issue #2196: hasattr now lets exceptions which do not inherit Exception
-  (KeyboardInterrupt, and SystemExit) propagate instead of ignoring them
+- Issue #2196: hasattr() now lets exceptions which do not inherit
+  Exception (KeyboardInterrupt, and SystemExit) propagate instead of
+  ignoring them.
 
 Extension Modules
 -----------------
 
-- Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the platform.
+- Issue #2592: delegate nb_index and the floor/truediv slots in
+  weakref.proxy.
+
+- Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the
+  platform.
 
 - Support for Windows 9x has been removed from the winsound module.
 
 - bsddb module updated to version 4.6.4.
 
-- Fixed #2870: cmathmodule.c compile error
+- Issue #2858: Fix potential memory corruption when
+  bsddb.db.DBEnv.lock_get and other bsddb.db object constructors
+  raised an exception.
+
+- Issue #2870: cmathmodule.c compile error.
 
 Library
 -------
 
-- Issue 1793: Function ctypes.util.find_msvcrt() added that returns
+- Issue #2914: TimedRotatingFileHandler now takes an optional keyword
+  argument "utc" to use UTC time rather than local time.
+
+- Issue #2929: TimedRotatingFileHandler was using the wrong path when
+  deleting old log files (filename only instead of full path).
+
+- Issue #1775025: You can now specify zipfile members to open(),
+  read() or extract() via a ZipInfo instance.  This allows handling
+  duplicate filenames in zipfiles.
+
+- Issue #961805: Fix Text.edit_modified() in Tkinter.
+
+- Issue #1793: Function ctypes.util.find_msvcrt() added that returns
   the name of the C runtime library that Python uses.
   ctypes.util.find_library(name) now call this function when name is
   'm' or 'c'.
 
-- The Tkinter module has been made a package and renamed 'tkinter'.  All
-  Tkinter-related modules (like Tix, ScrolledText, turtle etc.) are now
-  submodules of that package and have been renamed to conform to PEP 8
-  standards.
-
 - The repr module has been renamed 'reprlib'.  The old name is now
   deprecated.
 
 - The statvfs module has been deprecated for removal in Python 3.0.
 
-- The sunaudiodev and SUNAUDIODEV modules have been deprecated for removal in
-  Python 3.0.
+- The sunaudiodev and SUNAUDIODEV modules have been deprecated for
+  removal in Python 3.0.
 
-- The WAIT module from IRIX has been deprecated for removal in Python 3.0.
+- The WAIT module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The torgb module from IRIX has been deprecated for removal in Python 3.0.
+- The torgb module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The SV module from IRIX has been deprecated for removal in Python 3.0.
+- The SV module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The readcd module from IRIX has been deprecated for removal in Python 3.0.
+- The readcd module from IRIX has been deprecated for removal in
+  Python 3.0.
 
 - The panelparser module from IRIX has been deprecated for removal in
   Python 3.0.
 
--The panel module from IRIX has been deprecated for removal in Python 3.0.
+- The panel module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The jpeg module from IRIX has been deprecated for removal in Python 3.0.
+- The jpeg module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The IOCTL module from IRIX has been deprecated for removal in Python 3.0.
+- The IOCTL module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The IN module from IRIX has been deprecated for removal in Python 3.0.
+- The IN module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The imgfile module from IRIX has been deprecated for removal in Python 3.0.
+- The imgfile module from IRIX has been deprecated for removal in
+  Python 3.0.
 
-- The GLWS module from IRIX has been deprecated for removal in Python 3.0.
+- The GLWS module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The GET module from IRIX has been deprecated for removal in Python 3.0.
+- The GET module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The fm module from IRIX has been deprecated for removal in Python 3.0.
+- The fm module from IRIX has been deprecated for removal in Python
+  3.0.
 
-- The FL, flp, and fl modules from IRIX have been deprecated for removal in
-  Python 3.0.
+- The FL, flp, and fl modules from IRIX have been deprecated for
+  removal in Python 3.0.
 
-- The FILE module on IRIX has been deprecated for removal in Python 3.0.
+- The FILE module on IRIX has been deprecated for removal in Python
+  3.0.
 
-- The ERRNO module on IRIX has been deprecated for removal in Python 3.0.
+- The ERRNO module on IRIX has been deprecated for removal in Python
+  3.0.
 
-- The DEVICE, GL, gl, and cgen modules (which indirectly includes cgensupport)
-  have been deprecated for removal in Python 3.0.
+- The DEVICE, GL, gl, and cgen modules (which indirectly includes
+  cgensupport) have been deprecated for removal in Python 3.0.
 
 - The ConfigParser module has been renamed 'configparser'.  The old
   name is now deprecated.
 
-- The CL, CL_old, and cl modules for IRIX have been deprecated for removal in
-  Python 3.0.
+- The CL, CL_old, and cl modules for IRIX have been deprecated for
+  removal in Python 3.0.
 
-- The cdplayer module for IRIX has been deprecated for removal in Python 3.0.
+- The cdplayer module for IRIX has been deprecated for removal in
+  Python 3.0.
 
-- The cddb module for IRIX has been deprecated for removal in Python 3.0.
+- The cddb module for IRIX has been deprecated for removal in Python
+  3.0.
 
 - The cd and CD modules for IRIX have been deprecated for removal in
   Python 3.0.
@@ -112,7 +149,7 @@
 - The al and AL modules for IRIX have been deprecated for removal in
   Python 3.0.
 
-- #1713041: fix pprint's handling of maximum depth.
+- Issue #1713041: fix pprint's handling of maximum depth.
 
 - The timing module has been deprecated for removal in Python 3.0.
 
@@ -125,14 +162,17 @@
 
 - The imageop module has been deprecated for removal in Python 3.0.
 
-- #2250: Exceptions raised during evaluation of names in rlcompleter's
-  ``Completer.complete()`` method are now caught and ignored.
+- Issue #2250: Exceptions raised during evaluation of names in
+  rlcompleter's ``Completer.complete()`` method are now caught and
+  ignored.
 
-- #2659: Added ``break_on_hyphens`` option to textwrap TextWrapper class.
+- Issue #2659: Added ``break_on_hyphens`` option to textwrap
+  TextWrapper class.
 
 - The mhlib module has been deprecated for removal in Python 3.0.
 
-- The linuxaudiodev module has been deprecated for removal in Python 3.0.
+- The linuxaudiodev module has been deprecated for removal in Python
+  3.0.
 
 - The ihooks module has been deprecated for removal in Python 3.0.
 
@@ -144,7 +184,8 @@
 
 - The compiler package has been deprecated for removal in Python 3.0.
 
-- The Bastion and rexec modules have been deprecated for removal in Python 3.0.
+- The Bastion and rexec modules have been deprecated for removal in
+  Python 3.0.
 
 - The bsddb185 module has been deprecated for removal in Python 3.0.
 
@@ -157,7 +198,8 @@
 
 - The toaiff module has been deprecated for removal in Python 3.0.
 
-- The test.testall module has been deprecated for removal in Python 3.0.
+- The test.testall module has been deprecated for removal in Python
+  3.0.
 
 - The new module has been deprecated for removal in Python 3.0.
 
@@ -175,8 +217,8 @@
 
 - pdb gained the "until" command.
 
-- The Mac Modules (including Carbon) have been deprecated for removal in
-  3.0.
+- The Mac Modules (including Carbon) have been deprecated for removal
+  in Python 3.0.
 
 Build
 -----
@@ -194,51 +236,52 @@
 
 - Issue #2719: backported the ``next()`` builtin from Python 3.
 
-- Issue #2681: The octal literal ``0o8`` was incorrecly acctepted. Now it
-  properly raises a SyntaxError.
+- Issue #2681: The octal literal ``0o8`` was incorrecly acctepted. Now
+  it properly raises a SyntaxError.
 
-- Patch #2617: Reserved -J and -X arguments for Jython, IronPython and other
-  implementations of Python. 
+- Issue #2617: Reserved -J and -X arguments for Jython, IronPython and
+  other implementations of Python.
 
-- Implemented PEP 370: Per user site-packages directory
+- Implemented PEP 370: Per user site-packages directory.
 
 Extension Modules
 -----------------
 
-- Issue #2670:  Fix a failure in urllib2.build_opener(), when passed two
-  handlers that derive the same default base class.
+- Issue #2670: Fix a failure in urllib2.build_opener(), when passed
+  two handlers that derive the same default base class.
 
 - Added kill, terminate and send_signal(sig) to subprocess.Popen.
 
-- Added phase(z) -> phi, polar(z) -> r, phi and rect(r, phi) -> z to the cmath
-  module.
+- Added phase(z) -> phi, polar(z) -> r, phi and rect(r, phi) -> z to
+  the cmath module.
 
-- Four new methods were added to the math and cmath modules:
-  acosh, asinh, atanh and log1p. 
+- Four new methods were added to the math and cmath modules: acosh,
+  asinh, atanh and log1p.
 
-- zlib.decompressobj().flush(value) no longer crashes the interpreter when
-  passed a value less than or equal to zero.
+- zlib.decompressobj().flush(value) no longer crashes the interpreter
+  when passed a value less than or equal to zero.
 
-- Issue #1631171: Re-implement the 'warnings' module in C (the original Python
-  code has been kept as backup). This will allow for using the 'warning's
-  machinery in such places as the parser where use of pure Python code is not
-  possible.  Both the ``showarning()`` and ``formatwarning()`` gain an
-  optional 'line' argument which is not called by default for
-  backwards-compatibility reasons. Setting ``warnings.showwarning()`` to
-  an implementation that lacks support for the ``line`` argument will raise a
-  DeprecationWarning.
+- Issue #1631171: Re-implement the 'warnings' module in C (the
+  original Python code has been kept as backup). This will allow for
+  using the 'warning's machinery in such places as the parser where
+  use of pure Python code is not possible.  Both the ``showarning()``
+  and ``formatwarning()`` gain an optional 'line' argument which is
+  not called by default for backwards-compatibility reasons. Setting
+  ``warnings.showwarning()`` to an implementation that lacks support
+  for the ``line`` argument will raise a DeprecationWarning.
 
 Library
 -------
 
 - The audiodev module has been deprecated for removal in Python 3.0.
 
-- Issue #2750: Add the 'json' package. Based on simplejson 1.9 and contributed
-  by Bob Ippolito.
+- Issue #2750: Add the 'json' package. Based on simplejson 1.9 and
+  contributed by Bob Ippolito.
 
 - Issue #1734346: Support Unicode file names for zipfiles.
 
-- Issue #2581: distutils: Vista UAC/elevation support for bdist_wininst
+- Issue #2581: distutils: Vista UAC/elevation support for
+  bdist_wininst.
 
 - Issue #2635: Fix bug in 'fix_sentence_endings' textwrap.fill option,
   where an extra space was added after a word containing (but not
@@ -263,11 +306,11 @@
 - Issue #2616: The ctypes.pointer() and ctypes.POINTER() functions are
   now implemented in C for better performance.
 
-- Issue #2408: The ``_types`` module, which was used as in implementation
-  detail of the public ``types`` module, has been removed and replaced by pure
-  python code.
+- Issue #2408: The ``_types`` module, which was used as in
+  implementation detail of the public ``types`` module, has been
+  removed and replaced by pure python code.
 
-- Issue #2513: distutils on Windows is now capable of cross-compiling 
+- Issue #2513: distutils on Windows is now capable of cross-compiling
   extension modules between 32 and 64 bit platforms.  See the distutls
   build documentation for more information.
 
@@ -280,49 +323,55 @@
   libffi3.0.5 version, apart from some small changes to
   Modules/_ctypes/libffi/configure.ac.
 
-- Issue #2385: distutils.core.run_script() makes __file__ available, so the
-  controlled environment will more closely mirror the typical script
-  environment.  This supports setup.py scripts that refer to data files.
+- Issue #2385: distutils.core.run_script() makes __file__ available,
+  so the controlled environment will more closely mirror the typical
+  script environment.  This supports setup.py scripts that refer to
+  data files.
 
 Tests
 -----
-- Issue #2550: The approach used by client/server code for obtaining ports
-  to listen on in network-oriented tests has been refined in an effort to
-  facilitate running multiple instances of the entire regression test suite
-  in parallel without issue.  test_support.bind_port() has been fixed such
-  that it will always return a unique port -- which wasn't always the case
-  with the previous implementation, especially if socket options had been
-  set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT).  The
-  new implementation of bind_port() will actually raise an exception if it
-  is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or 
-  SO_REUSEPORT socket option set.  Furthermore, if available, bind_port()
-  will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed.
-  This currently only applies to Windows.  This option prevents any other
-  sockets from binding to the host/port we've bound to, thus removing the
-  possibility of the 'non-deterministic' behaviour, as Microsoft puts it,
-  that occurs when a second SOCK_STREAM socket binds and accepts to a 
-  host/port that's already been bound by another socket.  The optional 
-  preferred port parameter to bind_port() has been removed.  Under no
+
+- Issue #2550: The approach used by client/server code for obtaining
+  ports to listen on in network-oriented tests has been refined in an
+  effort to facilitate running multiple instances of the entire
+  regression test suite in parallel without issue.
+  test_support.bind_port() has been fixed such that it will always
+  return a unique port -- which wasn't always the case with the
+  previous implementation, especially if socket options had been set
+  that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT).  The
+  new implementation of bind_port() will actually raise an exception
+  if it is passed an AF_INET/SOCK_STREAM socket with either the
+  SO_REUSEADDR or SO_REUSEPORT socket option set.  Furthermore, if
+  available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on
+  the socket it's been passed.  This currently only applies to
+  Windows.  This option prevents any other sockets from binding to the
+  host/port we've bound to, thus removing the possibility of the
+  'non-deterministic' behaviour, as Microsoft puts it, that occurs
+  when a second SOCK_STREAM socket binds and accepts to a host/port
+  that's already been bound by another socket.  The optional preferred
+  port parameter to bind_port() has been removed.  Under no
   circumstances should tests be hard coding ports!
-  
-  test_support.find_unused_port() has also been introduced, which will pass
-  a temporary socket object to bind_port() in order to obtain an unused port.
-  The temporary socket object is then closed and deleted, and the port is
-  returned.  This method should only be used for obtaining an unused port
-  in order to pass to an external program (i.e. the -accept [port] argument
-  to openssl's s_server mode) or as a parameter to a server-oriented class
-  that doesn't give you direct access to the underlying socket used.
 
-  Finally, test_support.HOST has been introduced, which should be used for
-  the host argument of any relevant socket calls (i.e. bind and connect).
+  test_support.find_unused_port() has also been introduced, which will
+  pass a temporary socket object to bind_port() in order to obtain an
+  unused port.  The temporary socket object is then closed and
+  deleted, and the port is returned.  This method should only be used
+  for obtaining an unused port in order to pass to an external program
+  (i.e. the -accept [port] argument to openssl's s_server mode) or as
+  a parameter to a server-oriented class that doesn't give you direct
+  access to the underlying socket used.
+
+  Finally, test_support.HOST has been introduced, which should be used
+  for the host argument of any relevant socket calls (i.e. bind and
+  connect).
 
   The following tests were updated to following the new conventions:
-    test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib, 
+    test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib,
     test_poplib, test_ftplib, test_telnetlib, test_socketserver,
     test_asynchat and test_socket_ssl.
 
-  It is now possible for multiple instances of the regression test suite to
-  run in parallel without issue.
+  It is now possible for multiple instances of the regression test
+  suite to run in parallel without issue.
 
 Build
 -----
@@ -333,15 +382,15 @@
   gcc is used as compiler.
 
 - Issue #2573: On MacOS X it is now possible to install the framework
-  with a different name using --with-framework-name=NAME. 
+  with a different name using --with-framework-name=NAME.
 
 C API
 -----
 
-- Added implementation of copysign, acosh, asinh, atanh and log1p 
-  to the new files Include/pymath.h and Python/pymath.h for 
-  platforms which provide the functions through their libm. The
-  files also contains several helpers and constants for math.
+- Added implementation of copysign, acosh, asinh, atanh and log1p to
+  the new files Include/pymath.h and Python/pymath.h for platforms
+  which provide the functions through their libm. The files also
+  contains several helpers and constants for math.
 
 - Added a new convenience function, PyErr_WarnPy3k, for issuing Py3k
   warnings.
@@ -355,9 +404,9 @@
 Core and builtins
 -----------------
 
-- Issue #1733757: The interpreter would hang on shutdown if the tracing 
-  function set by sys.settrace is still active and happens to call
-  threading.currentThread().
+- Issue #1733757: The interpreter would hang on shutdown if the
+  tracing function set by sys.settrace is still active and happens to
+  call threading.currentThread().
 
 - Patch #1442: properly report exceptions when the PYTHONSTARTUP file
   cannot be executed.
@@ -366,10 +415,10 @@
   reference on the outer class name.
 
 - Patch #1810: compile() can now compile _ast trees as returned by
-  compile(..., PyCF_ONLY_AST).
+  ``compile(..., PyCF_ONLY_AST)``.
 
-- Patch #2426: Added sqlite3.Connection.iterdump method to allow easy dumping
-  of databases.  Contributed by Paul Kippes at PyCon 2008.
+- Patch #2426: Added sqlite3.Connection.iterdump method to allow easy
+  dumping of databases.  Contributed by Paul Kippes at PyCon 2008.
 
 - Patch #2477: Added from __future__ import unicode_literals.
 
@@ -378,52 +427,57 @@
 - Issue #2355: add Py3k warning for buffer().
 
 - Issue #1477: With narrow Unicode builds, the unicode escape sequence
-  \Uxxxxxxxx did not accept values outside the Basic Multilingual Plane.  This
-  affected raw unicode literals and the 'raw-unicode-escape' codec.  Now
-  UTF-16 surrogates are generated in this case, like normal unicode literals
-  and the 'unicode-escape' codec.
+  \Uxxxxxxxx did not accept values outside the Basic Multilingual
+  Plane.  This affected raw unicode literals and the
+  'raw-unicode-escape' codec.  Now UTF-16 surrogates are generated in
+  this case, like normal unicode literals and the 'unicode-escape'
+  codec.
 
 - Issue #2348: add Py3k warning for file.softspace.
 
-- Issue #2346/#2347: add Py3k warnings for __methods__ and __members__.
+- Issue #2346/#2347: add Py3k warnings for __methods__ and
+  __members__.
 
 - Issue #2358: Add a Py3k warning on sys.exc_clear() usage.
 
 - Issue #2400: Allow relative imports to "import *".
 
-- Issue 1745.  Backport print function with:
-   from __future__ import print_function
+- Issue #1745: Backport print function with ``from __future__ import
+  print_function``.
 
-- Issue 2332: add new attribute names for instance method objects.
-  The two changes are:  im_self -> __self__ and im_func -> __func__
+- Issue #2332: add new attribute names for instance method objects.
+  The two changes are: im_self -> __self__ and im_func -> __func__
 
-- Issue 2379: Raise a Py3K warning for __getitem__ or __getslice__ on
+- Issue #2379: Raise a Py3K warning for __getitem__ or __getslice__ on
   exception instances.
 
 - Issue #2371: Add a Py3k warning when catching an exception that
-  doesn't derive from BaseException.  Issue #2341: Add a Py3k warning
-  when raising an exception that doesn't derive from BaseException.
+  doesn't derive from BaseException.
+
+- Issue #2341: Add a Py3k warning when raising an exception that
+  doesn't derive from BaseException.
 
 - Issue #2321: use pymalloc for unicode object string data to reduce
   memory usage in some circumstances.
 
-- PEP 3127: octal literals now start with "0o". Old-style octal literals
-  are still valid. There are binary literals with a prefix of "0b".
-  This also affects int(x, 0).
+- PEP 3127: octal literals now start with "0o". Old-style octal
+  literals are still valid. There are binary literals with a prefix of
+  "0b".  This also affects int(x, 0).
 
 - Issue #2359: Adding deprecation warnings for array.{read,write}.
 
-- Issue #1779871: Gnu gcc can now build Python on OS X because the
+- Issue #1779871: GNU gcc can now build Python on OS X because the
   flags -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd are no
   longer passed.
 
 - Add a warning when asserting a non-empty tuple which is always true.
 
-- Issue #2179: speed up with statement execution by storing the exit method
-  on the stack instead of in a temporary variable (patch by Jeffrey Yaskin)
+- Issue #2179: speed up with statement execution by storing the exit
+  method on the stack instead of in a temporary variable (patch by
+  Jeffrey Yaskin)
 
-- Issue #2238: Some syntax errors in *args and **kwargs expressions could give
-  bogus error messages.
+- Issue #2238: Some syntax errors in *args and **kwargs expressions
+  could give bogus error messages.
 
 - Issue #2143: Fix embedded readline() hang on SSL socket EOF.
 
@@ -435,20 +489,22 @@
 Library
 -------
 
-- Issue #2315: logging.handlers: TimedRotatingFileHandler now accounts for
-  daylight savings time in calculating the next rollover.
-
-- Issue #2316: logging.handlers: TimedRotatingFileHandler  now calculates
-  rollovers correctly even when nothing is logged for a while.
-
-- Issue #2317: logging.handlers: TimedRotatingFileHandler now uses improved
-  logic for removing old files.
+- Issue #2315: logging.handlers: TimedRotatingFileHandler now accounts
+  for daylight savings time in calculating the next rollover.
 
-- Issue #2495: tokenize.untokenize now inserts a space between two consecutive
-  string literals; previously, ["" ""] was rendered as [""""], which is
-  incorrect python code.
+- Issue #2316: logging.handlers: TimedRotatingFileHandler now
+  calculates rollovers correctly even when nothing is logged for a
+  while.
+
+- Issue #2317: logging.handlers: TimedRotatingFileHandler now uses
+  improved logic for removing old files.
+
+- Issue #2495: tokenize.untokenize now inserts a space between two
+  consecutive string literals; previously, ["" ""] was rendered as
+  [""""], which is incorrect python code.
 
-- Issue #2248: return the result of the QUIT command. from SMTP.quit().
+- Issue #2248: return the result of the QUIT command. from
+  SMTP.quit().
 
 - Backport of Python 3.0's io module.
 
@@ -461,58 +517,60 @@
 - Issue #2432: give DictReader the dialect and line_num attributes
   advertised in the docs.
 
-- Issue #2460:  Make Ellipsis object copyable.
+- Issue #2460: Make Ellipsis object copyable.
 
-- Issue #1681432:  Add triangular distribution to the random module
+- Issue #1681432: Add triangular distribution to the random module
 
-- Issue #2136: urllib2's auth handler now allows single-quoted realms in the
-  WWW-Authenticate header.
+- Issue #2136: urllib2's auth handler now allows single-quoted realms
+  in the WWW-Authenticate header.
 
 - Issue #2434: Enhanced platform.win32_ver() to also work on Python
   installation which do not have the win32all package installed.
 
-- Added support to platform.uname() to also report the machine
-  and processor information on Windows XP and later. As a result,
+- Added support to platform.uname() to also report the machine and
+  processor information on Windows XP and later. As a result,
   platform.machine() and platform.processor() will report this
   information as well.
 
-- The library implementing the 2to3 conversion, lib2to3, was added
-  to the standard distribution.
+- The library implementing the 2to3 conversion, lib2to3, was added to
+  the standard distribution.
 
-- Issue #1747858: Fix chown to work with large uid's and gid's on 64-bit
-  platforms.
+- Issue #1747858: Fix chown to work with large uid's and gid's on
+  64-bit platforms.
 
-- Issue #1202: zlib.crc32 and zlib.adler32 no longer return different values
-  on 32-bit vs. 64-bit python interpreters.  Both were correct, but they now
-  both return a signed integer object for consistency.
+- Issue #1202: zlib.crc32 and zlib.adler32 no longer return different
+  values on 32-bit vs. 64-bit python interpreters.  Both were correct,
+  but they now both return a signed integer object for consistency.
 
 - Issue #1158: add %f format (fractions of a second represented as
   microseconds) to datetime objects.  Understood by both strptime and
   strftime.
 
 - Issue #705836: struct.pack(">f", x) now raises OverflowError on all
-  platforms when x is too large to fit into an IEEE 754 float; previously
-  it only raised OverflowError on non IEEE 754 platforms.
+  platforms when x is too large to fit into an IEEE 754 float;
+  previously it only raised OverflowError on non IEEE 754 platforms.
 
 - Issues #2166, #1741 and #1531505: now distutils deals with HOME
   correctly under win32
 
-- #1858: distutils: added multiple server support in .pypirc
+- Patch #1858: distutils: added multiple server support in .pypirc
 
 - Issue #1106316: pdb.post_mortem()'s parameter, "traceback", is now
-  optional: it defaults to the traceback of the exception that is currently
-  being handled (is mandatory to be in the middle of an exception, otherwise
-  it raises ValueError).
+  optional: it defaults to the traceback of the exception that is
+  currently being handled (is mandatory to be in the middle of an
+  exception, otherwise it raises ValueError).
 
 - Issue #1193577: A .shutdown() method has been added to SocketServers
   which terminates the .serve_forever() loop.
 
-- Bug #2220: handle rlcompleter attribute match failure more gracefully.
+- Issue #2220: handle rlcompleter attribute match failure more
+  gracefully.
 
-- Issue #2225: py_compile, when executed as a script, now returns a non-
-  zero status code if not all files could be compiled successfully.
+- Issue #2225: py_compile, when executed as a script, now returns a
+  non- zero status code if not all files could be compiled
+  successfully.
 
-- Bug #1725737: In distutil's sdist, exclude RCS, CVS etc. also in the
+- Bug #1725737: In distutils' sdist, exclude RCS, CVS etc. also in the
   root directory, and also exclude .hg, .git, .bzr, and _darcs.
 
 - Issue #1872: The struct module typecode for _Bool has been changed
@@ -520,19 +578,18 @@
 
 - The bundled libffi copy is now in sync with the recently released
   libffi3.0.4 version, apart from some small changes to
-  Modules/_ctypes/libffi/configure.ac.
-  On OS X, preconfigured libffi files are used.
-  On all linux systems the --with-system-ffi configure option defaults
-  to "yes".
+  Modules/_ctypes/libffi/configure.ac.  On OS X, preconfigured libffi
+  files are used.  On all linux systems the --with-system-ffi
+  configure option defaults to "yes".
 
-- Issue 1577: shutil.move() now calls os.rename() if the destination is a
-  directory instead of copying-then-remove-source.
+- Issue #1577: shutil.move() now calls os.rename() if the destination
+  is a directory instead of copying-then-remove-source.
 
 Tests
 -----
 
-- test_nis no longer fails when test.test_support.verbose is true and NIS is
-  not set up on the testing machine.
+- test_nis no longer fails when test.test_support.verbose is true and
+  NIS is not set up on the testing machine.
 
 - Output comparison tests are no longer supported.
 
@@ -542,13 +599,15 @@
 
 - GHOP 290: Convert test_dbm and test_dummy_threading to unittest.
 
-- GHOP 293: Convert test_strftime, test_getargs, and test_pep247 to unittest.
+- GHOP 293: Convert test_strftime, test_getargs, and test_pep247 to
+  unittest.
 
 - Issue #2055: Convert test_fcntl to unittest.
 
 - Issue 1960: Convert test_gdbm to unittest.
 
-- GHOP 294: Convert test_contains, test_crypt, and test_select to unittest.
+- GHOP 294: Convert test_contains, test_crypt, and test_select to
+  unittest.
 
 - GHOP 238: Convert test_tokenize to use doctest.
 
@@ -562,8 +621,8 @@
 
 - A new script 2to3 is now installed, to run the 2.x to 3.x converter.
 
-- Python/memmove.c and Python/strerror.c have been removed; both functions are
-  in the C89 standard library.
+- Python/memmove.c and Python/strerror.c have been removed; both
+  functions are in the C89 standard library.
 
 - Patch #2284: Add -x64 option to rt.bat.
 
@@ -571,7 +630,8 @@
 -----
 
 - Patch #2477: Added PyParser_ParseFileFlagsEx() and
-  PyParser_ParseStringFlagsFilenameEx()
+  PyParser_ParseStringFlagsFilenameEx().
+
 
 What's New in Python 2.6 alpha 1?
 =================================
@@ -612,56 +672,59 @@
   datetime; the class string.Formatter; and the C API
   PyObject_Format().
 
-- Fixed several potential crashes, all caused by specially crafted __del__
-  methods exploiting objects in temporarily inconsistent state.
+- Fixed several potential crashes, all caused by specially crafted
+  __del__ methods exploiting objects in temporarily inconsistent
+  state.
 
 - Issue #2115: Important speedup in setting __slot__ attributes.  Also
-  prevent a possible crash: an Abstract Base Class would try to access a slot
-  on a registered virtual subclass.
+  prevent a possible crash: an Abstract Base Class would try to access
+  a slot on a registered virtual subclass.
 
-- Fixed repr() and str() of complex numbers with infinity or nan as real or
-  imaginary part.
+- Fixed repr() and str() of complex numbers with infinity or nan as
+  real or imaginary part.
 
-- Clear all free lists during a gc.collect() of the highest generation in order
-  to allow pymalloc to free more arenas. Python may give back memory to the
-  OS earlier.
-
-- Issue #2045: Fix an infinite recursion triggered when printing a subclass of
-  collections.defaultdict, if its default_factory is set to a bound method.
+- Clear all free lists during a gc.collect() of the highest generation
+  in order to allow pymalloc to free more arenas. Python may give back
+  memory to the OS earlier.
+
+- Issue #2045: Fix an infinite recursion triggered when printing a
+  subclass of collections.defaultdict, if its default_factory is set
+  to a bound method.
 
 - Fixed a minor memory leak in dictobject.c. The content of the free
   list was not freed on interpreter shutdown.
 
-- Limit free list of method and builtin function objects to 256 entries
-  each.
+- Limit free list of method and builtin function objects to 256
+  entries each.
 
-- Patch #1953: Added ``sys._compact_freelists()`` and the C API functions
-  ``PyInt_CompactFreeList`` and ``PyFloat_CompactFreeList``
+- Patch #1953: Added ``sys._compact_freelists()`` and the C API
+  functions ``PyInt_CompactFreeList`` and ``PyFloat_CompactFreeList``
   to compact the internal free lists of pre-allocted ints and floats.
 
-- Bug #1983: Fixed return type of fork(), fork1() and forkpty() calls.
-  Python expected the return type int but the fork familie returns pi_t.
-
-- Issue #1678380: Fix a bug that identifies 0j and -0j when they appear
-  in the same code unit.
-
-- Issue #2025 :  Add tuple.count() and tuple.index() methods to comply with
-  the collections.Sequence API.
-
-- Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak
-  detection
-
-- Added ``PyType_ClearCache()`` and ``sys._clear_type_cache`` to clear the
-  internal lookup cache for ref leak tests.
-
-- Patch #1473257: generator objects gain a gi_code attribute. This is the
-  same object as the func_code attribute of the function that produced the
-  generator.
-
-- Issue #1920: "while 0" statements were completely removed by the compiler,
-  even in the presence of an "else" clause, which is supposed to be run when
-  the condition is false. Now the compiler correctly emits bytecode for the
-  "else" suite.
+- Issue #1983: Fixed return type of fork(), fork1() and forkpty()
+  calls.  Python expected the return type int but the fork familie
+  returns pi_t.
+
+- Issue #1678380: Fix a bug that identifies 0j and -0j when they
+  appear in the same code unit.
+
+- Issue #2025: Add tuple.count() and tuple.index() methods to comply
+  with the collections.Sequence API.
+
+- Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and
+  linebreak detection
+
+- Added ``PyType_ClearCache()`` and ``sys._clear_type_cache`` to clear
+  the internal lookup cache for ref leak tests.
+
+- Patch #1473257: generator objects gain a gi_code attribute. This is
+  the same object as the func_code attribute of the function that
+  produced the generator.
+
+- Issue #1920: "while 0" statements were completely removed by the
+  compiler, even in the presence of an "else" clause, which is
+  supposed to be run when the condition is false. Now the compiler
+  correctly emits bytecode for the "else" suite.
 
 - A few crashers fixed: weakref_in_del.py (issue #1377858);
   loosing_dict_ref.py (issue #1303614, test67.py);
@@ -671,7 +734,7 @@
   suppressed while an extension is loaded by calling SetErrorMode in
   dynload_win.c. The error is still reported properly.
 
-- Bug #1915: Python compiles with --enable-unicode=no again. However
+- Issue #1915: Python compiles with --enable-unicode=no again. However
   several extension methods and modules do not work without unicode
   support.
 
@@ -686,48 +749,50 @@
 - sys.float_info / PyFloat_GetInfo: The floating point information
   object was converted from a dict to a specialized structseq object.
 
-- Patch #1816: Added sys.flags structseq. It exposes the status of most
-  command line arguments and PYTHON* environment variables.
+- Patch #1816: Added sys.flags structseq. It exposes the status of
+  most command line arguments and PYTHON* environment variables.
 
-- Objects/structseq.c: Implemented new structseq representation. The patch
-  makes structseqs (e.g. the return value of os.stat) more readable.
+- Objects/structseq.c: Implemented new structseq representation. The
+  patch makes structseqs (e.g. the return value of os.stat) more
+  readable.
 
-- Patch #1700288: added a type attribute cache that caches method accesses,
-  resulting in speedups in heavily object-oriented code.
+- Patch #1700288: added a type attribute cache that caches method
+  accesses, resulting in speedups in heavily object-oriented code.
 
 - Bug #1776: __import__() no longer accepts filenames on any platform.
   The first parameter to __import__() must be a valid module name.
 
 - Patch #1668: renamed THREADDEBUG envvar to PYTHONTHREADDEBUG.
 
-- Patch #602345: Add -B command line option, PYTHONDONTWRITEBYTECODE envvar
-  and sys.dont_write_bytecode attribute. All these can be set to forbid Python
-  to attempt to write compiled bytecode files.
-
-- Improve some exception messages when Windows fails to load an extension
-  module. Now we get for example '%1 is not a valid Win32 application' instead
-  of 'error code 193'.
+- Patch #602345: Add -B command line option, PYTHONDONTWRITEBYTECODE
+  envvar and sys.dont_write_bytecode attribute. All these can be set
+  to forbid Python to attempt to write compiled bytecode files.
+
+- Improve some exception messages when Windows fails to load an
+  extension module. Now we get for example '%1 is not a valid Win32
+  application' instead of 'error code 193'.
 
-- Bug #1481296: Fixed long(float('nan'))!=0L.
+- Bug #1481296: Fixed long(float('nan')) != 0L.
 
-- Issue #1640: Added math.isinf(x), math.isnan(x) and math.copysign(x, y)
-  functions.
+- Issue #1640: Added math.isinf(x), math.isnan(x) and math.copysign(x,
+  y) functions.
 
 - Issue #1635: Platform independent creation and representation of NaN
-  and INF. float("nan"), float("inf") and float("-inf") now work on every
-  platform with IEEE 754 semantics.
+  and INF. float("nan"), float("inf") and float("-inf") now work on
+  every platform with IEEE 754 semantics.
 
-- Compiler now generates simpler and faster code for dictionary literals.
-  The oparg for BUILD_MAP now indicates an estimated dictionary size.
-  There is a new opcode, STORE_MAP, for adding entries to the dictionary.
+- Compiler now generates simpler and faster code for dictionary
+  literals.  The oparg for BUILD_MAP now indicates an estimated
+  dictionary size.  There is a new opcode, STORE_MAP, for adding
+  entries to the dictionary.
 
-- Issue #1638: %zd configure test fails on Linux
+- Issue #1638: %zd configure test fails on Linux.
 
-- Issue #1620: New property decorator syntax was modifying the decorator
-  in place instead of creating a new decorator object.
+- Issue #1620: New property decorator syntax was modifying the
+  decorator in place instead of creating a new decorator object.
 
-- Issue #1538: Avoid copying string in split/rsplit if the split
-  char is not found.
+- Issue #1538: Avoid copying string in split/rsplit if the split char
+  is not found.
 
 - Issue #1553: An erroneous __length_hint__ can make list() raise a
   SystemError.
@@ -736,25 +801,26 @@
   inside packages with the -m switch via a new module level
   __package__ attribute.
 
-- Issue #1402: Fix a crash on exit, when another thread is still running, and
-  if the deallocation of its frames somehow calls the PyGILState_Ensure() /
-  PyGILState_Release() functions.
+- Issue #1402: Fix a crash on exit, when another thread is still
+  running, and if the deallocation of its frames somehow calls the
+  PyGILState_Ensure() / PyGILState_Release() functions.
 
 - Expose the Py_Py3kWarningFlag as sys.py3kwarning.
 
 - Issue #1445: Fix a SystemError when accessing the ``cell_contents``
   attribute of an empty cell object.
 
-- Issue #1460: The utf-7 incremental decoder did not accept truncated input.
-  It now correctly saves its state between chunks of data.
+- Issue #1460: The utf-7 incremental decoder did not accept truncated
+  input.  It now correctly saves its state between chunks of data.
 
-- Patch #1739468: Directories and zipfiles containing a __main__.py file can
-  now be directly executed by passing their name to the interpreter. The
-  directory/zipfile is automatically inserted as the first entry in sys.path.
-
-- Issue #1265: Fix a problem with sys.settrace, if the tracing function uses a
-  generator expression when at the same time the executed code is closing a
-  paused generator.
+- Patch #1739468: Directories and zipfiles containing a __main__.py
+  file can now be directly executed by passing their name to the
+  interpreter. The directory/zipfile is automatically inserted as the
+  first entry in sys.path.
+
+- Issue #1265: Fix a problem with sys.settrace, if the tracing
+  function uses a generator expression when at the same time the
+  executed code is closing a paused generator.
 
 - sets and frozensets now have an isdisjoint() method.
 
@@ -762,48 +828,53 @@
 
 - Fix warnings found by the new version of the Coverity checker.
 
-- The enumerate() builtin function is no longer bounded to sequences smaller
-  than LONG_MAX.  Formerly, it raised an OverflowError.  Now, automatically
-  shifts from ints to longs.
-
-- Issue #1686386: Tuple's tp_repr did not take into account the possibility of
-  having a self-referential tuple, which is possible from C code.  Nor did
-  object's tp_str consider that a type's tp_str could do something that could
-  lead to an inifinite recursion.  Py_ReprEnter() and Py_EnterRecursiveCall(),
-  respectively, fixed the issues.
-
-- Issue #1164: It was possible to trigger deadlock when using the 'print'
-  statement to write to a file since the GIL was not released as needed.  Now
-  PyObject_Print() does the right thing along with various tp_print
-  implementations of the built-in types and those in the collections module.
-
-- Issue #1147: Exceptions were directly allowing string exceptions in their
-  throw() method even though string exceptions no longer allowed.
+- The enumerate() builtin function is no longer bounded to sequences
+  smaller than LONG_MAX.  Formerly, it raised an OverflowError.  Now,
+  automatically shifts from ints to longs.
+
+- Issue #1686386: Tuple's tp_repr did not take into account the
+  possibility of having a self-referential tuple, which is possible
+  from C code.  Nor did object's tp_str consider that a type's tp_str
+  could do something that could lead to an inifinite recursion.
+  Py_ReprEnter() and Py_EnterRecursiveCall(), respectively, fixed the
+  issues.
+
+- Issue #1164: It was possible to trigger deadlock when using the
+  'print' statement to write to a file since the GIL was not released
+  as needed.  Now PyObject_Print() does the right thing along with
+  various tp_print implementations of the built-in types and those in
+  the collections module.
+
+- Issue #1147: Exceptions were directly allowing string exceptions in
+  their throw() method even though string exceptions no longer
+  allowed.
 
-- Issue #1096: Prevent a segfault from getting the repr of a very deeply nested
-  list by using the recursion counter.
+- Issue #1096: Prevent a segfault from getting the repr of a very
+  deeply nested list by using the recursion counter.
 
 - Issue #1202533: Fix infinite recursion calls triggered by calls to
-  PyObject_Call() never calling back out to Python code to trigger recursion
-  depth updates/checks.  Required the creation of a static RuntimeError
-  instance in case normalizing an exception put the recursion check value past
-  its limit.  Fixes crashers infinite_rec_(1|2|4|5).py.
+  PyObject_Call() never calling back out to Python code to trigger
+  recursion depth updates/checks.  Required the creation of a static
+  RuntimeError instance in case normalizing an exception put the
+  recursion check value past its limit.  Fixes crashers
+  infinite_rec_(1|2|4|5).py.
 
-- Patch #1031213: Decode source line in SyntaxErrors back to its original source
-  encoding.
+- Patch #1031213: Decode source line in SyntaxErrors back to its
+  original source encoding.
 
 - Patch #1673759: add a missing overflow check when formatting floats
   with %G.
 
-- Prevent expandtabs() on string and unicode objects from causing a segfault
-  when a large width is passed on 32-bit platforms.
+- Prevent expandtabs() on string and unicode objects from causing a
+  segfault when a large width is passed on 32-bit platforms.
 
-- Bug #1733488: Fix compilation of bufferobject.c on AIX.
+- Issue #1733488: Fix compilation of bufferobject.c on AIX.
 
-- Bug #1722485: remove docstrings again when running with -OO.
+- Issue #1722485: remove docstrings again when running with -OO.
 
 - Add new attribute names for function objects.  All the func_* become
-  __*__ attributes.  (Some already existed, e.g., __doc__ and __name__.)
+  __*__ attributes.  (Some already existed, e.g., __doc__ and
+  __name__.)
 
 - Add -3 option to the interpreter to warn about features that are
   deprecated and will be changed/removed in Python 3.0.
@@ -812,12 +883,12 @@
   calls.
 
 - except clauses may now be spelled either "except E, target:" or
-  "except E as target:". This is to provide forwards compatibility with
-  Python 3.0.
+  "except E as target:". This is to provide forwards compatibility
+  with Python 3.0.
 
 - Deprecate BaseException.message as per PEP 352.
 
-- Bug #1303614: don't expose object's __dict__ when the dict is
+- Issue #1303614: don't expose object's __dict__ when the dict is
   inherited from a builtin base.
 
 - When __slots__ are set to a unicode string, make it work the same as
@@ -842,22 +913,25 @@
   warning later).  Also, type.__init__() insists on the same signature
   as supported by type.__new__().
 
-- Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
-  to complex using its __complex__() method before falling back to the
-  __float__() method. Therefore, the functions in the cmath module now
-  can operate on objects that define a __complex__() method.
-
-- Patch #1623563: allow __class__ assignment for classes with __slots__.
-  The old and the new class are still required to have the same slot names.
-
-- Patch #1642547: Fix an error/crash when encountering syntax errors in
-  complex if statements.
+- Patch #1675423: PyComplex_AsCComplex() now tries to convert an
+  object to complex using its __complex__() method before falling back
+  to the __float__() method. Therefore, the functions in the cmath
+  module now can operate on objects that define a __complex__()
+  method.
+
+- Patch #1623563: allow __class__ assignment for classes with
+  __slots__.  The old and the new class are still required to have the
+  same slot names.
+
+- Patch #1642547: Fix an error/crash when encountering syntax errors
+  in complex if statements.
+
+- Patch #1462488: Python no longer segfaults when
+  ``object.__reduce_ex__()`` is called with an object that is faking
+  its type.
 
-- Patch #1462488: Python no longer segfaults when ``object.__reduce_ex__()``
-  is called with an object that is faking its type.
-
-- Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
-  name.
+- Patch #1680015: Don't modify __slots__ tuple if it contains an
+  unicode name.
 
 - Patch #1444529: the builtin compile() now accepts keyword arguments.
 
@@ -865,61 +939,69 @@
   case, even when converting the value to a string failed.
 
 - The dir() function has been extended to call the __dir__() method on
-  its argument, if it exists. If not, it will work like before. This allows
-  customizing the output of dir() in the presence of a __getattr__().
+  its argument, if it exists. If not, it will work like before. This
+  allows customizing the output of dir() in the presence of a
+  __getattr__().
 
 - Patch #922167: Python no longer segfaults when faced with infinitely
   self-recursive reload() calls (as reported by bug #742342).
 
-- Patch #1675981: remove unreachable code from ``type.__new__()`` method.
+- Patch #1675981: remove unreachable code from ``type.__new__()``
+  method.
 
-- Patch #1491866: change the complex() constructor to allow parthensized
-  forms. This means complex(repr(x)) now works instead of raising a
-  ValueError.
+- Patch #1491866: change the complex() constructor to allow
+  parthensized forms. This means complex(repr(x)) now works instead of
+  raising a ValueError.
 
 - Patch #703779: unset __file__ in __main__ after running a file. This
-  makes the filenames the warning module prints much more sensible when
-  a PYTHONSTARTUP file is used.
+  makes the filenames the warning module prints much more sensible
+  when a PYTHONSTARTUP file is used.
 
 - Variant of patch #697613: don't exit the interpreter on a SystemExit
   exception if the -i command line option or PYTHONINSPECT environment
-  variable is given, but break into the interactive interpreter just like
-  on other exceptions or normal program exit.
+  variable is given, but break into the interactive interpreter just
+  like on other exceptions or normal program exit.
 
-- Patch #1638879: don't accept strings with embedded NUL bytes in long().
+- Patch #1638879: don't accept strings with embedded NUL bytes in
+  long().
 
-- Bug #1674503: close the file opened by execfile() in an error condition.
+- Bug #1674503: close the file opened by execfile() in an error
+  condition.
 
 - Patch #1674228: when assigning a slice (old-style), check for the
   sq_ass_slice instead of the sq_slice slot.
 
-- When printing an unraisable error, don't print exceptions. before the name.
-  This duplicates the behavior whening normally printing exceptions.
-
-- Bug #1653736: Properly discard third argument to slot_nb_inplace_power.
-
-- PEP 352: Raising a string exception now triggers a TypeError.  Attempting to
-  catch a string exception raises DeprecationWarning.
-
-- Bug #1377858: Fix the segfaulting of the interpreter when an object created
-  a weakref on itself during a __del__ call for new-style classes (classic
-  classes still have the bug).
+- When printing an unraisable error, don't print exceptions. before
+  the name.  This duplicates the behavior whening normally printing
+  exceptions.
+
+- Bug #1653736: Properly discard third argument to
+  slot_nb_inplace_power.
+
+- PEP 352: Raising a string exception now triggers a TypeError.
+  Attempting to catch a string exception raises DeprecationWarning.
+
+- Bug #1377858: Fix the segfaulting of the interpreter when an object
+  created a weakref on itself during a __del__ call for new-style
+  classes (classic classes still have the bug).
 
 - Bug #1579370: Make PyTraceBack_Here use the current thread, not the
   frame's thread state.
 
-- patch #1630975: Fix crash when replacing sys.stdout in sitecustomize.py
+- patch #1630975: Fix crash when replacing sys.stdout in
+  sitecustomize.py.
 
-- Prevent seg fault on shutdown which could occur if an object
-  raised a warning.
+- Prevent seg fault on shutdown which could occur if an object raised
+  a warning.
 
-- Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,
-  to avoid relying on atexit.
+- Bug #1566280: Explicitly invoke threading._shutdown from Py_Main, to
+  avoid relying on atexit.
 
-- Bug #1590891: random.randrange don't return correct value for big number
+- Bug #1590891: random.randrange don't return correct value for big
+  number.
 
-- Patch #1586791: Better exception messages for some operations on strings,
-  tuples and lists.
+- Patch #1586791: Better exception messages for some operations on
+  strings, tuples and lists.
 
 - Bug #1067760: Deprecate passing floats to file.seek.
 
@@ -927,10 +1009,10 @@
 
 - Bug #1588287: fix invalid assertion for `1,2` in debug builds.
 
-- Bug #1576657: when setting a KeyError for a tuple key, make sure that
-  the tuple isn't used as the "exception arguments tuple".
+- Bug #1576657: when setting a KeyError for a tuple key, make sure
+  that the tuple isn't used as the "exception arguments tuple".
 
-- Bug #1565514, SystemError not raised on too many nested blocks.
+- Bug #1565514: SystemError not raised on too many nested blocks.
 
 - Bug #1576174: WindowsError now displays the windows error code
   again, no longer the posix error code.
@@ -938,8 +1020,8 @@
 - Patch #1549049: Support long values in structmember, issue warnings
   if the assigned value for structmember fields gets truncated.
 
-- Update the peephole optimizer to remove more dead code (jumps after returns)
-  and inline unconditional jumps to returns.
+- Update the peephole optimizer to remove more dead code (jumps after
+  returns) and inline unconditional jumps to returns.
 
 - Bug #1545497: when given an explicit base, int() did ignore NULs
   embedded in the string to convert.
@@ -957,12 +1039,12 @@
   number of arguments, as was the case in Python 2.4.
 
 - Patch #1567691: super() and new.instancemethod() now don't accept
-  keyword arguments any more (previously they accepted them, but didn't
-  use them).
+  keyword arguments any more (previously they accepted them, but
+  didn't use them).
 
-- Fix a bug in the parser's future statement handling that led to "with"
-  not being recognized as a keyword after, e.g., this statement:
-  from __future__ import division, with_statement
+- Fix a bug in the parser's future statement handling that led to
+  "with" not being recognized as a keyword after, e.g., this
+  statement: from __future__ import division, with_statement
 
 - Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
 
@@ -970,8 +1052,9 @@
 
 - Allow exception instances to be directly sliced again.
 
-- Bug #1551432: Exceptions do not define an explicit __unicode__ method.  This
-  allows calling unicode() on exceptions classes directly to succeed.
+- Bug #1551432: Exceptions do not define an explicit __unicode__
+  method.  This allows calling unicode() on exceptions classes
+  directly to succeed.
 
 - Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.
   Also make sure that every exception class has __module__ set to
@@ -991,18 +1074,19 @@
   head is the original string if sep was not found.
 
 - Bug #1520864: unpacking singleton tuples in list comprehensions and
-  generator expressions (x for x, in ... ) works again.  Fixing this problem
-  required changing the .pyc magic number.  This means that .pyc files
-  generated before 2.5c2 will be regenerated.
+  generator expressions (x for x, in ... ) works again.  Fixing this
+  problem required changing the .pyc magic number.  This means that
+  .pyc files generated before 2.5c2 will be regenerated.
 
 - ``with`` and ``as`` are now keywords.
 
-- Bug #1664966: Fix crash in exec if Unicode filename can't be decoded.
+- Bug #1664966: Fix crash in exec if Unicode filename can't be
+  decoded.
 
 - Issue #1537: Changed GeneratorExit's base class from Exception to
   BaseException.
 
-- Fix Issue #1703448: A joined thread could show up in the
+- Issue #1703448: A joined thread could show up in the
   threading.enumerate() list after the join() for a brief period until
   it actually exited.
 
@@ -1010,24 +1094,25 @@
 Library
 -------
 
-- #2274 Add heapq.heappushpop().
+- Patch #2274: Add heapq.heappushpop().
 
 - Add inspect.isabstract(object) to fix bug #2223
 
 - Add a __format__ method to Decimal, to support PEP 3101.
 
-- Add a timing parameter when using trace.Trace to print out timestamps.
+- Add a timing parameter when using trace.Trace to print out
+  timestamps.
 
-- #1627: httplib now ignores negative Content-Length headers.
+- Issue #1627: httplib now ignores negative Content-Length headers.
 
-- #900744: If an invalid chunked-encoding header is sent by a server,
-  httplib will now raise IncompleteRead and close the connection instead
-  of raising ValueError.
+- Issue #900744: If an invalid chunked-encoding header is sent by a
+  server, httplib will now raise IncompleteRead and close the
+  connection instead of raising ValueError.
 
-- #1492: The content type of BaseHTTPServer error messages can now be
-  overridden.
+- Issue #1492: The content type of BaseHTTPServer error messages can
+  now be overridden.
 
-- Issue 1781: ConfigParser now does not let you add the "default" section
+- Issue #1781: ConfigParser now does not let you add the "default" section
   (ignore-case)
 
 - Removed uses of dict.has_key() from distutils, and uses of
@@ -1035,9 +1120,11 @@
   without warnings when '-3' is given.  More work like this needs to
   be done in the rest of the stdlib.
 
-- Issue #1916. Added isgenerator() and isgeneratorfunction() to inspect.py.
+- Issue #1916: added isgenerator() and isgeneratorfunction() to
+  inspect.py.
 
-- #1224: Fixed bad url parsing when path begins with double slash.
+- Issue #1224: Fixed bad url parsing when path begins with double
+  slash.
 
 - ctypes instances that are not or do not contain pointers can now be
   pickled.
@@ -1049,89 +1136,93 @@
   to fractions.Fraction, to avoid the name clash with the abstract
   base class numbers.Rational.  See discussion in issue #1682.
 
-- The pickletools module now provides an optimize() function
-  that eliminates unused PUT opcodes from a pickle string.
-
-- #2021: Allow tempfile.NamedTemporaryFile and SpooledTemporaryFile
-  to be used in with statements by correctly supporting the context
-  management protocol.
-
-- #1979: Add rich comparisons to Decimal, and make Decimal comparisons
-  involving a NaN follow the IEEE 754 standard.
-
-- #2004: tarfile.py: Use mode 0700 for temporary directories and default
-  permissions for missing directories.
+- The pickletools module now provides an optimize() function that
+  eliminates unused PUT opcodes from a pickle string.
 
-- #175006: The debugger used to skip the condition of a "while" statement
-  after the first iteration. Now it correctly steps on the expression, and
-  breakpoints on the "while" statement are honored on each loop.
+- Patch #2021: Allow tempfile.NamedTemporaryFile and
+  SpooledTemporaryFile to be used in with statements by correctly
+  supporting the context management protocol.
+
+- Patch #1979: Add rich comparisons to Decimal, and make Decimal
+  comparisons involving a NaN follow the IEEE 754 standard.
+
+- Issue #2004: tarfile.py: Use mode 0700 for temporary directories and
+  default permissions for missing directories.
+
+- Issue #175006: The debugger used to skip the condition of a "while"
+  statement after the first iteration. Now it correctly steps on the
+  expression, and breakpoints on the "while" statement are honored on
+  each loop.
 
-- #1765140: add an optional delay argument to FileHandler and its
-  subclasses. Defaults to false (existing behaviour), but if true,
+- Issue #1765140: add an optional delay argument to FileHandler and
+  its subclasses. Defaults to false (existing behaviour), but if true,
   defers opening the file until the first call to emit().
 
 - The pprint module now supports sets and frozensets.
 
-- #1221598: add optional callbacks to ftplib.FTP's storbinary() and
-  storlines() methods.  (Contributed by Phil Schwartz)
+- Issue #1221598: add optional callbacks to ftplib.FTP's storbinary()
+  and storlines() methods.  (Contributed by Phil Schwartz)
 
-- #1715: include sub-extension modules in pydoc's text output.
+- Issue #1715: include sub-extension modules in pydoc's text output.
 
-- #1836: fix an off-by-one bug in TimedRotatingHandler's rollover
-  time calculation.
+- Issue #1836: fix an off-by-one bug in TimedRotatingHandler's
+  rollover time calculation.
 
-- #1021: fix a bug to allow basicConfig to accept NOTSET as a level.
+- Issue #1021: fix a bug to allow basicConfig to accept NOTSET as a
+  level.
 
-- #932563: add LoggerAdapter convenience class to make it easier to add
-  contextual information in logging output.
+- Issue #932563: add LoggerAdapter convenience class to make it easier
+  to add contextual information in logging output.
 
-- #1760556: fix a bug to avoid FileHandler throwing an exception in
-  flush().
+- Issue #1760556: fix a bug to avoid FileHandler throwing an exception
+  in flush().
 
-- Bug #1530959: distutils' build command now uses different build directory
-  when building extension modules against versions of Python compiled
-  with ``--with-pydebug``.
+- Bug #1530959: distutils' build command now uses different build
+  directory when building extension modules against versions of Python
+  compiled with ``--with-pydebug``.
 
-- #1555501: move plistlib from plat-mac directory to general library.
+- Issue #1555501: move plistlib from plat-mac directory to general
+  library.
 
-- #1269: fix a bug in pstats.add_callers() and add a unit test file for
-  pstats.
+- Issue #1269: fix a bug in pstats.add_callers() and add a unit test
+  file for pstats.
 
-- #1669: don't allow shutil.rmtree() to be called on a symlink to a
-  directory.
+- Issue #1669: don't allow shutil.rmtree() to be called on a symlink
+  to a directory.
 
-- #1664522: in urllib, don't read non-existing directories in ftp mode,
-  returning a 0-byte file -- raise an IOError instead.
+- Issue #1664522: in urllib, don't read non-existing directories in
+  ftp mode, returning a 0-byte file -- raise an IOError instead.
 
-- #856047: respect the ``no_proxy`` environment variable when using the
-  ``http_proxy`` etc. environment variables in urllib.
+- Issue #856047: respect the ``no_proxy`` environment variable when
+  using the ``http_proxy`` etc. environment variables in urllib.
 
-- #1178141: add a getcode() method to the addinfourls that urllib.open()
-  returns so that you can retrieve the HTTP status code.
+- Issue #1178141: add a getcode() method to the addinfourls that
+  urllib.open() returns so that you can retrieve the HTTP status code.
 
 - Issue #1003: Fix zipfile decryption check, it would fail zip files
   with extended local headers.
 
-- #1189216: Fix the zipfile module to work on archives with headers
-  past the 2**31 byte boundary.
+- Issue #1189216: Fix the zipfile module to work on archives with
+  headers past the 2**31 byte boundary.
 
-- #1336: fix a race condition in subprocess.Popen if the garbage
+- Issue #1336: fix a race condition in subprocess.Popen if the garbage
   collector kicked in at the wrong time that would cause the process
   to hang when the child wrote to stderr.
 
-- #1146: fix how textwrap breaks a long word that would start in the
-  last column of a line.
+- Issue #1146: fix how textwrap breaks a long word that would start in
+  the last column of a line.
 
-- #1693149: trace.py --ignore-module - accept multiple comma-separated
-  modules to be given.
+- Issue #1693149: trace.py --ignore-module - accept multiple
+  comma-separated modules to be given.
 
-- #1822: MIMEMultipart.is_multipart() behaves correctly for a just-created
-  (and empty) instance. Thanks Jonathan Share.
+- Issue #1822: MIMEMultipart.is_multipart() behaves correctly for a
+  just-created (and empty) instance. Thanks Jonathan Share.
 
-- #1861: Added an attribute to the sched module which returns an ordered
-  list of upcoming events (displayed as named tuples).
+- Issue #1861: Added an attribute to the sched module which returns an
+  ordered list of upcoming events (displayed as named tuples).
 
-- #1837: The queue module now also supports a LIFO queue and a priority queue.
+- Issue #1837: The queue module now also supports a LIFO queue and a
+  priority queue.
 
 - Patch #1048820: Add insert-mode editing to curses.textpad.Textbox
   (patch by Stefan Wehr).  Also, fix an off-by-one bug in
@@ -1148,24 +1239,25 @@
 - Issue #1786: pdb should use its own stdin/stdout around an exec call
   and when creating a recursive instance.
 
-- Issue #1698398 Zipfile.printdir() crashed because the format string
-  expected a tuple type of length six instead of time.struct_time object.
+- Issue #1698398: ZipFile.printdir() crashed because the format string
+  expected a tuple type of length six instead of time.struct_time
+  object.
 
 - Issue #1780: The Decimal constructor now accepts arbitrary leading
   and trailing whitespace when constructing from a string.
   Context.create_decimal no longer accepts trailing newlines.
 
-- Decimal.as_tuple(), difflib.find_longest_match() and inspect functions
-  that returned a tuple now return a named tuple.
+- Decimal.as_tuple(), difflib.find_longest_match() and inspect
+  functions that returned a tuple now return a named tuple.
 
 - Doctest now returns results as a named tuple for readability:
       (0, 7) --> TestResults(failed=0, attempted=7)
 
-- Issue #846388. re.match is interruptible now, which is particularly
+- Issue #846388:q re.match is interruptible now, which is particularly
   good for long regular expression matches.
 
-- pyexpat, patch #1137: allow setting buffer_size attribute
-  on Parser objects to set the character data buffer size.
+- Patch #1137: allow setting buffer_size attribute on pyexpat Parser
+  objects to set the character data buffer size.
 
 - Issue #1757: The hash of a Decimal instance is no longer affected by
   the current context.
@@ -1175,22 +1267,23 @@
 
 - Issue #1646: Make socket support the TIPC protocol.
 
-- Bug #1742: return os.curdir from os.path.relpath() if both arguments are
-  equal instead of raising an exception.
+- Bug #1742: return os.curdir from os.path.relpath() if both arguments
+  are equal instead of raising an exception.
 
 - Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'.
 
 - Patch #1698: allow '@' in username parsed by urlparse.py.
 
-- Issue #1735: TarFile.extractall() now correctly sets directory permissions
-  and times.
+- Issue #1735: TarFile.extractall() now correctly sets directory
+  permissions and times.
 
 - Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a mountpoint.
 
-- Bug #1687: Fxed plistlib.py restricts <integer> to Python int when writing
+- Bug #1687: Fxed plistlib.py restricts <integer> to Python int when
+  writing
 
-- Issue #1700: Regular expression inline flags incorrectly handle certain
-  unicode characters.
+- Issue #1700: Regular expression inline flags incorrectly handle
+  certain unicode characters.
 
 - Issue #1689: PEP 3141, numeric abstract base classes.
 
@@ -1199,22 +1292,22 @@
 
 - Issue #1642: Fix segfault in ctypes when trying to delete attributes.
 
-- Issue #1727780: Support loading pickles of random.Random objects created
-  on 32-bit systems on 64-bit systems, and vice versa. As a consequence
-  of the change, Random pickles created by Python 2.6 cannot be loaded
-  in Python 2.5.
-
-- Issue #1455: The distutils package now supports VS 2005 and VS 2008 for
-  both the msvccompiler and cygwincompiler.
+- Issue #1727780: Support loading pickles of random.Random objects
+  created on 32-bit systems on 64-bit systems, and vice versa. As a
+  consequence of the change, Random pickles created by Python 2.6
+  cannot be loaded in Python 2.5.
+
+- Issue #1455: The distutils package now supports VS 2005 and VS 2008
+  for both the msvccompiler and cygwincompiler.
 
-- Issue #1531: tarfile.py: Read fileobj from the current offset, do not
-  seek to the start.
+- Issue #1531: tarfile.py: Read fileobj from the current offset, do
+  not seek to the start.
 
-- Issue #1534: Added a dictionary sys.float_info with information about the
-  internal floating point type to the sys module.
+- Issue #1534: Added a dictionary sys.float_info with information
+  about the internal floating point type to the sys module.
 
-- Issue 1429818: patch for trace and doctest modules so they play nicely
-  together.
+- Issue #1429818: patch for trace and doctest modules so they play
+  nicely together.
 
 - doctest made a bad assumption that a package's __loader__.get_data()
   method used universal newlines.
@@ -1228,8 +1321,8 @@
 - IN module for FreeBSD 8 is added and preexisting FreeBSD 6 and 7
   files are updated.
 
-- Issues #1181, #1287: unsetenv() is now called when the os.environ.pop()
-  and os.environ.clear() methods are used.
+- Issues #1181, #1287: unsetenv() is now called when the
+  os.environ.pop() and os.environ.clear() methods are used.
 
 - ctypes will now work correctly on 32-bit systems when Python is
   configured with --with-system-ffi.
@@ -1239,17 +1332,19 @@
 
 - collections.deque() now supports a "maxlen" argument.
 
-- itertools.count() is no longer bounded to LONG_MAX.  Formerly, it raised
-  an OverflowError.  Now, automatically shifts from ints to longs.
+- itertools.count() is no longer bounded to LONG_MAX.  Formerly, it
+  raised an OverflowError.  Now, automatically shifts from ints to
+  longs.
 
-- Added itertools.product() which forms the Cartesian product of
-  the input iterables.
+- Added itertools.product() which forms the Cartesian product of the
+  input iterables.
 
 - Added itertools.combinations() and itertools.permutations().
 
 - Patch #1541463: optimize performance of cgi.FieldStorage operations.
 
-- Decimal is fully updated to the latest Decimal Specification (v1.66).
+- Decimal is fully updated to the latest Decimal Specification
+  (v1.66).
 
 - Bug #1153: repr.repr() now doesn't require set and dictionary items
   to be orderable to properly represent them.
@@ -1258,16 +1353,18 @@
 
 - Bug #1709599: Run test_1565150 only if the file system is NTFS.
 
-- When encountering a password-protected robots.txt file the RobotFileParser
-  no longer prompts interactively for a username and password (bug 813986).
+- When encountering a password-protected robots.txt file the
+  RobotFileParser no longer prompts interactively for a username and
+  password (bug 813986).
 
 - TarFile.__init__() no longer fails if no name argument is passed and
   the fileobj argument has no usable name attribute (e.g. StringIO).
 
-- The functools module now provides 'reduce', for forward compatibility
-  with Python 3000.
+- The functools module now provides 'reduce', for forward
+  compatibility with Python 3000.
 
-- Server-side SSL support and cert verification added, by Bill Janssen.
+- Server-side SSL support and cert verification added, by Bill
+  Janssen.
 
 - socket.ssl deprecated; use new ssl module instead.
 
@@ -1276,8 +1373,8 @@
 - EUC-KR codec now handles the cheot-ga-keut composed make-up hangul
   syllables.
 
-- GB18030 codec now can encode additional two-byte characters that
-  are missing in GBK.
+- GB18030 codec now can encode additional two-byte characters that are
+  missing in GBK.
 
 - Add new codecs for UTF-32, UTF-32-LE and UTF-32-BE.
 
@@ -1294,31 +1391,34 @@
 
 - tarfile.py: Added "exclude" keyword argument to TarFile.add().
 
-- Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
-
-- The urlopen function of urllib2 now has an optional timeout parameter (note
-  that it actually works with HTTP, HTTPS, FTP and FTPS connections).
+- Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple
+  attribute.
 
-- In ftplib, the FTP.ntransfercmd method, when in passive mode, now uses
-  the socket.create_connection function, using the timeout specified at
-  connection time.
+- The urlopen function of urllib2 now has an optional timeout
+  parameter (note that it actually works with HTTP, HTTPS, FTP and
+  FTPS connections).
+
+- In ftplib, the FTP.ntransfercmd method, when in passive mode, now
+  uses the socket.create_connection function, using the timeout
+  specified at connection time.
 
 - Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it
-  reads a file that ends with incomplete sequence and sizehint argument
-  for .read() is specified.
+  reads a file that ends with incomplete sequence and sizehint
+  argument for .read() is specified.
 
-- Bug #1730389: Change time.strptime() to use ``\s+`` instead of ``\s*`` when
-  matching spaces in the specified format argument.
+- Bug #1730389: Change time.strptime() to use ``\s+`` instead of
+  ``\s*`` when matching spaces in the specified format argument.
 
-- SF 1668596/1720897: distutils now copies data files
-  even if package_dir is empty.
+- Bugs #1668596/#1720897: distutils now copies data files even if
+  package_dir is empty.
 
 - sha now raises a DeprecationWarning upon import.
 
 - md5 now raises a DeprecationWarning upon import.
 
-- Issue1385: The hmac module now computes the correct hmac when using hashes
-  with a block size other than 64 bytes (such as sha384 and sha512).
+- Issue #1385: The hmac module now computes the correct hmac when
+  using hashes with a block size other than 64 bytes (such as sha384
+  and sha512).
 
 - mimify now raises a DeprecationWarning upon import.
 
@@ -1333,11 +1433,11 @@
 
 - The posixfile module now raises a DeprecationWarning.
 
-- Remove the gopherlib module.  This also leads to the removal of gopher
-  support in urllib/urllib2.
+- Remove the gopherlib module.  This also leads to the removal of
+  gopher support in urllib/urllib2.
 
-- Fix bug in marshal where bad data would cause a segfault due to
-  lack of an infinite recursion check.
+- Fix bug in marshal where bad data would cause a segfault due to lack
+  of an infinite recursion check.
 
 - Removed plat-freebsd2 and plat-freebsd3 directories (and IN.py in
   the directories).
@@ -1346,10 +1446,11 @@
   the traceback inadvertently or maliciously closing the comment and
   injecting HTML into the error page.
 
-- The popen2 module and os.popen* are deprecated.  Use the subprocess module.
+- The popen2 module and os.popen* are deprecated.  Use the subprocess
+  module.
 
-- Added an optional credentials argument to SMTPHandler, for use with SMTP
-  servers which require authentication.
+- Added an optional credentials argument to SMTPHandler, for use with
+  SMTP servers which require authentication.
 
 - Patch #1695948: Added optional timeout parameter to SocketHandler.
 
@@ -1364,13 +1465,15 @@
   ".cpp" too.
 
 - As specified in RFC 2616, an HTTP response like 2xx indicates that
-  the client's request was successfully received, understood, and accepted.
-  Now in these cases no error is raised in urllib (issue #1177) and urllib2.
+  the client's request was successfully received, understood, and
+  accepted.  Now in these cases no error is raised in urllib (issue
+  #1177) and urllib2.
 
-- Bug #1290505: time.strptime's internal cache of locale information is now
-  properly recreated when the locale is changed.
+- Bug #1290505: time.strptime's internal cache of locale information
+  is now properly recreated when the locale is changed.
 
-- Patch #1685563: remove (don't add) duplicate paths in distutils.MSVCCompiler.
+- Patch #1685563: remove (don't add) duplicate paths in
+  distutils.MSVCCompiler.
 
 - Added a timeout parameter to the constructor of other protocols
   (telnetlib, ftplib, smtplib and poplib). This is second part of the
@@ -1388,8 +1491,8 @@
 
 - Patch #1630118: add a SpooledTemporaryFile class to tempfile.py.
 
-- Patch #1273829: os.walk() now has a "followlinks" parameter. If set to
-  True (which is not the default), it visits symlinks pointing to
+- Patch #1273829: os.walk() now has a "followlinks" parameter. If set
+  to True (which is not the default), it visits symlinks pointing to
   directories.
 
 - Bug #1681228: the webbrowser module now correctly uses the default
@@ -1403,72 +1506,76 @@
   initialization failed.
 
 - Bug #767111: fix long-standing bug in urllib which caused an
-  AttributeError instead of an IOError when the server's response didn't
-  contain a valid HTTP status line.
+  AttributeError instead of an IOError when the server's response
+  didn't contain a valid HTTP status line.
 
-- Patch #957650: "%var%" environment variable references are now properly
-  expanded in ntpath.expandvars(), also "~user" home directory references
-  are recognized and handled on Windows.
+- Patch #957650: "%var%" environment variable references are now
+  properly expanded in ntpath.expandvars(), also "~user" home
+  directory references are recognized and handled on Windows.
 
-- Patch #1429539: pdb now correctly initializes the __main__ module for
-  the debugged script, which means that imports from __main__ work
+- Patch #1429539: pdb now correctly initializes the __main__ module
+  for the debugged script, which means that imports from __main__ work
   correctly now.
 
 - The nonobvious commands.getstatus() function is now deprecated.
 
-- Patch #1393667: pdb now has a "run" command which restarts the debugged
-  Python program, optionally with different arguments.
+- Patch #1393667: pdb now has a "run" command which restarts the
+  debugged Python program, optionally with different arguments.
 
 - Patch #1649190: Adding support for _Bool to ctypes as c_bool.
 
-- Patch #1530482: add pydoc.render_doc() which returns the documentation
-  for a thing instead of paging it to stdout, which pydoc.doc() does.
-
-- Patch #1533909: the timeit module now accepts callables in addition to
-  strings for the code to time and the setup code. Also added two
-  convenience functions for instantiating a Timer and calling its methods.
-
-- Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter
-  which can be set to False to prevent the default delete-on-close
-  behavior.
+- Patch #1530482: add pydoc.render_doc() which returns the
+  documentation for a thing instead of paging it to stdout, which
+  pydoc.doc() does.
+
+- Patch #1533909: the timeit module now accepts callables in addition
+  to strings for the code to time and the setup code. Also added two
+  convenience functions for instantiating a Timer and calling its
+  methods.
+
+- Patch #1537850: tempfile.NamedTemporaryFile now has a "delete"
+  parameter which can be set to False to prevent the default
+  delete-on-close behavior.
 
 - Patch #1581073: add a flag to textwrap that prevents the dropping of
   whitespace while wrapping.
 
 - Patch #1603688: ConfigParser.SafeConfigParser now checks values that
-  are set for invalid interpolation sequences that would lead to errors
-  on reading back those values.
+  are set for invalid interpolation sequences that would lead to
+  errors on reading back those values.
 
-- Added support for the POSIX.1-2001 (pax) format to tarfile.py. Extended
-  and cleaned up the test suite. Added a new testtar.tar.
+- Added support for the POSIX.1-2001 (pax) format to
+  tarfile.py. Extended and cleaned up the test suite. Added a new
+  testtar.tar.
 
 - Patch #1449244: Support Unicode strings in
   email.message.Message.{set_charset,get_content_charset}.
 
-- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
-  pydoc's help keywords.
+- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS"
+  to pydoc's help keywords.
 
 - Patch #1555098: use str.join() instead of repeated string
   concatenation in robotparser.
 
 - Patch #1635454: the csv.DictWriter class now includes the offending
-  field names in its exception message if you try to write a record with
-  a dictionary containing fields not in the CSV field names list.
+  field names in its exception message if you try to write a record
+  with a dictionary containing fields not in the CSV field names list.
 
 - Patch #1668100: urllib2 now correctly raises URLError instead of
   OSError if accessing a local file via the file:// protocol fails.
 
 - Patch #1677862: Require a space or tab after import in .pth files.
 
-- Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap
-  the IndexError caused by passing in an invalid breakpoint number.
+- Patch #1192590: Fix pdb's "ignore" and "condition" commands so they
+  trap the IndexError caused by passing in an invalid breakpoint
+  number.
+
+- Patch #1599845: Add an option to disable the implicit calls to
+  server_bind() and server_activate() in the constructors for
+  TCPServer, SimpleXMLRPCServer and DocXMLRPCServer.
 
-- Patch #1599845: Add an option to disable the implicit calls to server_bind()
-  and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer
-  and DocXMLRPCServer.
-
-- Bug #1531963: Make SocketServer.TCPServer's server_address always
-  be equal to calling getsockname() on the server's socket. Fixed by
+- Bug #1531963: Make SocketServer.TCPServer's server_address always be
+  equal to calling getsockname() on the server's socket. Fixed by
   patch #1545011.
 
 - Patch #742598: Add .timeout attribute to SocketServer that calls
@@ -1484,20 +1591,21 @@
 
 - Patch #1481079: add support for HTTP_REFERER to CGIHTTPServer.
 
-- Patch #1675424: Added tests for uncovered code in the zipfile module.
-  The KeyError raised by Zipfile.getinfo for nonexistent names now has
-  a descriptive message.
+- Patch #1675424: Added tests for uncovered code in the zipfile
+  module.  The KeyError raised by Zipfile.getinfo for nonexistent
+  names now has a descriptive message.
 
 - Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').
 
-- unittest now verifies more of its assumptions. In particular, TestCase
-  and TestSuite subclasses (not instances) are no longer accepted in
-  TestSuite.addTest(). This should cause no incompatibility since it
-  never made sense with ordinary subclasses -- the failure just occurred
-  later, with a more cumbersome exception.
+- unittest now verifies more of its assumptions. In particular,
+  TestCase and TestSuite subclasses (not instances) are no longer
+  accepted in TestSuite.addTest(). This should cause no
+  incompatibility since it never made sense with ordinary subclasses
+  -- the failure just occurred later, with a more cumbersome
+  exception.
 
-- Patch #787789: allow to pass custom TestRunner instances to unittest's
-  main() function.
+- Patch #787789: allow to pass custom TestRunner instances to
+  unittest's main() function.
 
 - Patches #1550273, #1550272: fix a few bugs in unittest and add a
   comprehensive test suite for the module.
@@ -1505,8 +1613,9 @@
 - Patch #1001604: glob.glob() now returns unicode filenames if it was
   given a unicode argument and os.listdir() returns unicode filenames.
 
-- Patch #1673619: setup.py identifies extension modules it doesn't know how
-  to build and those it knows how to build but that fail to build.
+- Patch #1673619: setup.py identifies extension modules it doesn't
+  know how to build and those it knows how to build but that fail to
+  build.
 
 - Patch #912410: Replace HTML entity references for attribute values
   in HTMLParser.
@@ -1524,8 +1633,8 @@
 
 - Added itertools.izip_longest().
 
-- Have the encoding package's search function dynamically import using absolute
-  import semantics.
+- Have the encoding package's search function dynamically import using
+  absolute import semantics.
 
 - Patch #1647484: Renamed GzipFile's filename attribute to name.
 
@@ -1536,16 +1645,16 @@
 
 - Patch #685268: Consider a package's __path__ in imputil.
 
-- Patch 1463026: Support default namespace in XMLGenerator.
+- Patch #1463026: Support default namespace in XMLGenerator.
 
-- Patch 1571379: Make trace's --ignore-dir facility work in the face of
-  relative directory names.
+- Patch #1571379: Make trace's --ignore-dir facility work in the face
+  of relative directory names.
 
-- Bug #1600860: Search for shared python library in LIBDIR,
-  not lib/python/config, on "linux" and "gnu" systems.
+- Bug #1600860: Search for shared python library in LIBDIR, not
+  lib/python/config, on "linux" and "gnu" systems.
 
-- Patch #1652681: tarfile.py: create nonexistent files in append mode and
-  allow appending to empty files.
+- Patch #1652681: tarfile.py: create nonexistent files in append mode
+  and allow appending to empty files.
 
 - Bug #1124861: Automatically create pipes if GetStdHandle fails in
   subprocess.
@@ -1553,9 +1662,10 @@
 - Patch #1634778: add missing encoding aliases for iso8859_15 and
   iso8859_16.
 
-- Patch #1638243: the compiler package is now able to correctly compile
-  a with statement; previously, executing code containing a with statement
-  compiled by the compiler package crashed the interpreter.
+- Patch #1638243: the compiler package is now able to correctly
+  compile a with statement; previously, executing code containing a
+  with statement compiled by the compiler package crashed the
+  interpreter.
 
 - Bug #1643943: Fix time.strptime's support for the %U directive.
 
@@ -1564,7 +1674,8 @@
 
 - Patch #1627441: close sockets properly in urllib2.
 
-- Bug #494589: make ntpath.expandvars behave according to its docstring.
+- Bug #494589: make ntpath.expandvars behave according to its
+  docstring.
 
 - Changed platform module API python_version_tuple() to actually
   return a tuple (it used to return a list).
@@ -1574,8 +1685,8 @@
 
 - Added support for IronPython and Jython to the platform module.
 
-- The sets module has been deprecated.  Use the built-in set/frozenset types
-  instead.
+- The sets module has been deprecated.  Use the built-in set/frozenset
+  types instead.
 
 - Bug #1610795: make ctypes.util.find_library work on BSD systems.
 
@@ -1595,53 +1706,56 @@
 - Bug #411881: logging.handlers: bare except clause removed from
   SocketHandler.createSocket. Now, only socket.error is trapped.
 
-- Bug #411881: logging: bare except clause removed from LogRecord.__init__.
-  Now, only ValueError, TypeError and AttributeError are trapped.
+- Bug #411881: logging: bare except clause removed from
+  LogRecord.__init__.  Now, only ValueError, TypeError and
+  AttributeError are trapped.
 
-- Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
+- Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj
+  argument.
 
 - Patch #1182394 from Shane Holloway: speed up HMAC.hexdigest.
 
-- Patch #1262036: Prevent TarFiles from being added to themselves under
-  certain conditions.
+- Patch #1262036: Prevent TarFiles from being added to themselves
+  under certain conditions.
 
-- Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
-  work correctly together with readline().
+- Patch #1230446: tarfile.py: fix ExFileObject so that read() and
+  tell() work correctly together with readline().
 
-- Patch #1484695: The tarfile module now raises a HeaderError exception
-  if a buffer given to frombuf() is invalid.
+- Patch #1484695: The tarfile module now raises a HeaderError
+  exception if a buffer given to frombuf() is invalid.
 
 - Bug #1503765: Fix a problem in logging.config with spaces in comma-
   separated lists read from logging config files.
 
-- Patch #1604907: Fix problems in logging.handlers caused at logging shutdown
-  when syslog handlers fail to initialize because of syslogd problems.
+- Patch #1604907: Fix problems in logging.handlers caused at logging
+  shutdown when syslog handlers fail to initialize because of syslogd
+  problems.
 
-- Patch #1608267: fix a race condition in os.makedirs() if the directory
-  to be created is already there.
+- Patch #1608267: fix a race condition in os.makedirs() if the
+  directory to be created is already there.
 
 - Patch #1610437: fix a tarfile bug with long filename headers.
 
-- Patch #1371075: Make ConfigParser accept optional dict type
-  for ordering, sorting, etc.
+- Patch #1371075: Make ConfigParser accept optional dict type for
+  ordering, sorting, etc.
 
 - Bug #1563807: _ctypes built on AIX fails with ld ffi error.
 
 - Bug #1598620: A ctypes Structure cannot contain itself.
 
-- Patch #1070046: Marshal new-style objects like InstanceType
-  in xmlrpclib.
+- Patch #1070046: Marshal new-style objects like InstanceType in
+  xmlrpclib.
 
 - cStringIO.truncate(-1) now raises an IOError, like StringIO and
   regular files.
 
 - Patch #1472877: Fix Tix subwidget name resolution.
 
-- Patch #1594554: Always close a tkSimpleDialog on ok(), even
-  if an exception occurs.
+- Patch #1594554: Always close a tkSimpleDialog on ok(), even if an
+  exception occurs.
 
-- Patch #1538878: Don't make tkSimpleDialog dialogs transient if
-  the parent window is withdrawn.
+- Patch #1538878: Don't make tkSimpleDialog dialogs transient if the
+  parent window is withdrawn.
 
 - Bug #1597824: return the registered function from atexit.register()
   to facilitate usage as a decorator.
@@ -1649,8 +1763,8 @@
 - Patch #1360200: Use unmangled_version RPM spec field to deal with
   file name mangling.
 
-- Patch #1359217: Process 2xx response in an ftplib transfer
-  that precedes an 1xx response.
+- Patch #1359217: Process 2xx response in an ftplib transfer that
+  precedes an 1xx response.
 
 - Patch #1355023: support whence argument for GzipFile.seek.
 
@@ -1661,13 +1775,13 @@
   weren't passing the message factory on to newly created Maildir/MH
   objects.
 
-- Patch #1514543: mailbox.py: In the Maildir class, report errors if there's
-  a filename clash instead of possibly losing a message.  (Patch by David
-  Watson.)
-
-- Patch #1514544: Try to ensure that messages/indexes have been physically
-  written to disk after calling .flush() or .close(). (Patch by David
-  Watson.)
+- Patch #1514543: mailbox.py: In the Maildir class, report errors if
+  there's a filename clash instead of possibly losing a message.
+  (Patch by David Watson.)
+
+- Patch #1514544: Try to ensure that messages/indexes have been
+  physically written to disk after calling .flush() or
+  .close(). (Patch by David Watson.)
 
 - Patch #1592250: Add elide argument to Tkinter.Text.search.
 
@@ -1696,29 +1810,29 @@
 
 - Patch #1567274: Support SMTP over TLS.
 
-- Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that
-  ctypes isn't considered as requiring executable stacks.
+- Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that ctypes
+  isn't considered as requiring executable stacks.
 
 - ctypes callback functions only support 'fundamental' data types as
   result type.  Raise an error when something else is used.  This is a
   partial fix for Bug #1574584.
 
-- Fix turtle so that time.sleep is imported for the entire library.  Allows
-  the demo2 function to be executed on its own instead of only when the
-  module is run as a script.
+- Fix turtle so that time.sleep is imported for the entire library.
+  Allows the demo2 function to be executed on its own instead of only
+  when the module is run as a script.
 
-- Bug #813342: Start the IDLE subprocess with -Qnew if the parent
-  is started with that option.
+- Bug #813342: Start the IDLE subprocess with -Qnew if the parent is
+  started with that option.
 
 - Bug #1565150: Fix subsecond processing for os.utime on Windows.
 
 - Support for MSVC 8 was added to bdist_wininst.
 
-- Bug #1446043: correctly raise a LookupError if an encoding name given
-  to encodings.search_function() contains a dot.
+- Bug #1446043: correctly raise a LookupError if an encoding name
+  given to encodings.search_function() contains a dot.
 
-- Bug #1560617: in pyclbr, return full module name not only for classes,
-  but also for functions.
+- Bug #1560617: in pyclbr, return full module name not only for
+  classes, but also for functions.
 
 - Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes
   keep_blank_values and strict_parsing keyword arguments.
@@ -1729,54 +1843,60 @@
 - Bug #1565661: in webbrowser, split() the command for the default
   GNOME browser in case it is a command with args.
 
-- Made the error message for time.strptime when the data data and format do
-  match be more clear.
+- Made the error message for time.strptime when the data data and
+  format do match be more clear.
 
 - Fix a bug in traceback.format_exception_only() that led to an error
   being raised when print_exc() was called without an exception set.
   In version 2.4, this printed "None", restored that behavior.
 
-- Make webbrowser.BackgroundBrowser usable in Windows (it wasn't because
-  the close_fds arg to subprocess.Popen is not supported).
+- Make webbrowser.BackgroundBrowser usable in Windows (it wasn't
+  because the close_fds arg to subprocess.Popen is not supported).
 
-- Reverted patch #1504333 to sgmllib because it introduced an infinite loop.
+- Reverted patch #1504333 to sgmllib because it introduced an infinite
+  loop.
 
-- Patch #1553314: Fix the inspect.py slowdown that was hurting IPython & SAGE
-  by adding smarter caching in inspect.getmodule()
+- Patch #1553314: Fix the inspect.py slowdown that was hurting IPython
+  & SAGE by adding smarter caching in inspect.getmodule()
 
 - Fix missing import of the types module in logging.config.
 
 - Patch #1550886: Fix decimal module context management implementation
   to match the localcontext() example from PEP 343.
 
-- Bug #1545341: The 'classifier' keyword argument to the Distutils setup()
-  function now accepts tuples as well as lists.
+- Bug #1545341: The 'classifier' keyword argument to the Distutils
+  setup() function now accepts tuples as well as lists.
 
-- Bug #1541863: uuid.uuid1 failed to generate unique identifiers
-  on systems with low clock resolution.
+- Bug #1541863: uuid.uuid1 failed to generate unique identifiers on
+  systems with low clock resolution.
 
 - Bug #1531862: Do not close standard file descriptors in subprocess.
 
-- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092).
-
-- Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the
-  first chunk fed to the decoder started with a BOM, but was longer than 3
-  bytes.
+- idle: Honor the "Cancel" action in the save dialog (Debian bug
+  #299092).
 
-- The implementation of UnicodeError objects has been simplified (start and end
-  attributes are now stored directly as Py_ssize_t members).
+- Fix utf-8-sig incremental decoder, which didn't recognise a BOM when
+  the first chunk fed to the decoder started with a BOM, but was
+  longer than 3 bytes.
+
+- The implementation of UnicodeError objects has been simplified
+  (start and end attributes are now stored directly as Py_ssize_t
+  members).
+
+- Issue #829951: In the smtplib module, SMTP.starttls() now complies
+  with RFC 3207 and forgets any knowledge obtained from the server not
+  obtained from the TLS negotiation itself.  Patch contributed by Bill
+  Fenner.
 
-- Issue829951: In the smtplib module, SMTP.starttls() now complies with
-  RFC 3207 and forgets any knowledge obtained from the server not obtained
-  from the TLS negotiation itself.  Patch contributed by Bill Fenner.
-
-- Issue1339: The smtplib.SMTP class has been refactored a bit such
+- Issue #1339: The smtplib.SMTP class has been refactored a bit such
   that the SMTP.starttls() caller no longer needs to call ehlo()
   beforehand.  SMTP.starttls() now raises an exception of the server
-  does not claim to support starttls.  Adds the SMTP.ehlo_or_helo_if_needed()
-  method.  Patch contributed by Bill Fenner.
+  does not claim to support starttls.  Adds the
+  SMTP.ehlo_or_helo_if_needed() method.  Patch contributed by Bill
+  Fenner.
 
-- Patch #1089358: Add signal.siginterrupt, a wrapper around siginterrupt(3).
+- Patch #1089358: Add signal.siginterrupt, a wrapper around
+  siginterrupt(3).
 
 Extension Modules
 -----------------
@@ -1789,67 +1909,73 @@
 
 - Patch #1957: syslogmodule: Release GIL when calling syslog(3)
 
-- #2112: mmap.error is now a subclass of EnvironmentError and not a
-  direct EnvironmentError
+- Bug #2112: mmap.error is now a subclass of EnvironmentError and not
+  a direct EnvironmentError.
 
-- Bug #2111: mmap segfaults when trying to write a block opened with PROT_READ
+- Bug #2111: mmap segfaults when trying to write a block opened with
+  PROT_READ.
 
-- #2063: correct order of utime and stime in os.times() result on Windows.
+- Bug #2063: correct order of utime and stime in os.times() result on
+  Windows.
 
 - Patch #1736: Fix file name handling of _msi.FCICreate.
 
 - Updated ``big5hkscs`` codec to the HKSCS revision of 2004.
 
-- #1940: make it possible to use curses.filter() before curses.initscr()
-  as the documentation says.
+- Issue #1940: make it possible to use curses.filter() before
+  curses.initscr() as the documentation says.
 
 - Backport of _fileio module from Python 3.0.
 
-- #1087741: mmap.mmap is now a class, not a factory function. It is also
-  subclassable now.
+- Patch #1087741: mmap.mmap is now a class, not a factory function. It
+  is also subclassable now.
 
 - Patch #1648: added ``sys.getprofile()`` and ``sys.gettrace()``.
 
-- Patch #1663329: added ``os.closerange()`` function to quickly close a range
-  of file descriptors without considering errors.
+- Patch #1663329: added ``os.closerange()`` function to quickly close
+  a range of file descriptors without considering errors.
 
-- Patch 976880: ``mmap`` objects now have an ``rfind`` method that
+- Patch #976880: ``mmap`` objects now have an ``rfind`` method that
   works as expected.  ``mmap.find`` also takes an optional ``end``
   parameter.
 
-- _winreg's HKEY object has gained __enter__ and __exit__ methods to support
-  the context manager protocol.  The _winreg module also gained a new function
-  ``ExpandEnvironmentStrings`` to expand REG_EXPAND_SZ keys.
-
-- itertools.starmap() now accepts any iterable input. Previously, it required
-  the function inputs to be tuples.
+- _winreg's HKEY object has gained __enter__ and __exit__ methods to
+  support the context manager protocol.  The _winreg module also
+  gained a new function ``ExpandEnvironmentStrings`` to expand
+  REG_EXPAND_SZ keys.
+
+- itertools.starmap() now accepts any iterable input. Previously, it
+  required the function inputs to be tuples.
+
+- itertools.chain() now has an alternate constructor,
+  chain.from_iterable().
+
+- Issue #1646: Make socket support TIPC. The socket module now has
+  support for TIPC under Linux, see http://tipc.sf.net/ for more
+  information.
 
-- itertools.chain() now has an alternate constructor, chain.from_iterable().
-
-- Issue #1646: Make socket support TIPC. The socket module now has support
-  for TIPC under Linux, see http://tipc.sf.net/ for more information.
-
-- Added interface for Windows' WSAIoctl to socket object and added an example
-  for a simple network sniffer.
+- Added interface for Windows' WSAIoctl to socket object and added an
+  example for a simple network sniffer.
 
 - Bug #1301: Bad assert in _tkinter fixed.
 
 - Added bdist_wininst executable for VS 2008.
 
-- Bug #1604: collections.deque.__init__(iterable) now clears any prior contents
-  before adding elements from the iterable.  This fix brings the behavior into
-  line with that for list.__init__().
+- Bug #1604: collections.deque.__init__(iterable) now clears any prior
+  contents before adding elements from the iterable.  This fix brings
+  the behavior into line with that for list.__init__().
 
-- Added wide char functions to msvcrt module: getwch, getwche, putwch and
-  ungetwch. The functions accept or return unicode.
+- Added wide char functions to msvcrt module: getwch, getwche, putwch
+  and ungetwch. The functions accept or return unicode.
 
 - os.access now returns True on Windows for any existing directory.
 
 - Added warnpy3k function to the warnings module.
 
-- Marshal.dumps() now expects exact type matches for int, long, float, complex,
-  tuple, list, dict, set, and frozenset.  Formerly, it would silently miscode
-  subclasses of those types.  Now, it raises a ValueError instead.
+- Marshal.dumps() now expects exact type matches for int, long, float,
+  complex, tuple, list, dict, set, and frozenset.  Formerly, it would
+  silently miscode subclasses of those types.  Now, it raises a
+  ValueError instead.
 
 - Patch #1388440: Add set_completion_display_matches_hook and
   get_completion_type to readline.
@@ -1865,21 +1991,22 @@
   intended for RECNO databases.
 
 - pybsddb.sf.net Bug #477182: Load the database flags at database open
-  time so that opening a database previously created with the DB_DUP or
-  DB_DUPSORT flag set will keep the proper behavior on subsequent opens.
-  Specifically: dictionary assignment to a DB object will replace all
-  values for a given key when the database allows duplicate values.
-  DB users should use DB.put(k, v) when they want to store duplicates; not
-  DB[k] = v.
+  time so that opening a database previously created with the DB_DUP
+  or DB_DUPSORT flag set will keep the proper behavior on subsequent
+  opens.  Specifically: dictionary assignment to a DB object will
+  replace all values for a given key when the database allows
+  duplicate values.  DB users should use DB.put(k, v) when they want
+  to store duplicates; not DB[k] = v.
 
 - Add the bsddb.db.DBEnv.lock_id_free method.
 
 - Bug #1686475: Support stat'ing open files on Windows again.
 
-- Patch #1185447: binascii.b2a_qp() now correctly quotes binary characters
-  with ASCII value less than 32. Also, it correctly quotes dots only if
-  they occur on a single line, as opposed to the previous behavior of
-  quoting dots if they are the second character of any line.
+- Patch #1185447: binascii.b2a_qp() now correctly quotes binary
+  characters with ASCII value less than 32. Also, it correctly quotes
+  dots only if they occur on a single line, as opposed to the previous
+  behavior of quoting dots if they are the second character of any
+  line.
 
 - Bug #1622896: fix a rare corner case where the bz2 module raised an
   error in spite of a succesful compression.
@@ -1890,8 +2017,9 @@
 - Patch #1646728: datetime.fromtimestamp fails with negative
   fractional times.  With unittest.
 
-- Patch #1490190: posixmodule now includes os.chflags() and os.lchflags()
-  functions on platforms where the underlying system calls are available.
+- Patch #1490190: posixmodule now includes os.chflags() and
+  os.lchflags() functions on platforms where the underlying system
+  calls are available.
 
 - Patch #1494140: Add documentation for the new struct.Struct object.
 
@@ -1901,20 +2029,21 @@
 
 - Bug #1653736: Complain about keyword arguments to time.isoformat.
 
-- Bug #1486663: don't reject keyword arguments for subclasses of builtin
-  types.
+- Bug #1486663: don't reject keyword arguments for subclasses of
+  builtin types.
 
-- Patch #1610575: The struct module now supports the 't' code, for
-  C99 _Bool.
+- Patch #1610575: The struct module now supports the 't' code, for C99
+  _Bool.
 
-- Patch #1635058: ensure that htonl and friends never accept or
-  return negative numbers, per the underlying C implementation.
+- Patch #1635058: ensure that htonl and friends never accept or return
+  negative numbers, per the underlying C implementation.
 
 - Patch #1544279: Improve thread-safety of the socket module by moving
   the sock_addr_t storage out of the socket object.
 
-- Patch #1019808: fix bug that causes an incorrect error to be returned
-  when a socket timeout is set and a connection attempt fails.
+- Patch #1019808: fix bug that causes an incorrect error to be
+  returned when a socket timeout is set and a connection attempt
+  fails.
 
 - Speed up function calls into the math module.
 
@@ -1940,19 +2069,21 @@
 
 - RLIMIT_SBSIZE was added to the resource module where available.
 
-- Bug #1551427: fix a wrong NULL pointer check in the win32 version
-  of os.urandom().
+- Bug #1551427: fix a wrong NULL pointer check in the win32 version of
+  os.urandom().
 
 - Bug #1548092: fix curses.tparm seg fault on invalid input.
 
 - Patch #1114: fix curses module compilation on 64-bit AIX, & possibly
-  other 64-bit LP64 platforms where attr_t is not the same size as a long.
-  (Contributed by Luke Mewburn.)
+  other 64-bit LP64 platforms where attr_t is not the same size as a
+  long.  (Contributed by Luke Mewburn.)
 
-- Bug #1550714: fix SystemError from itertools.tee on negative value for n.
+- Bug #1550714: fix SystemError from itertools.tee on negative value
+  for n.
 
 - Fixed a few bugs on cjkcodecs:
-  - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
+  - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT
+    correctly.
   - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
     codepoints to conform the standard.
   - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2
@@ -1969,8 +2100,9 @@
 - Added support for linking the bsddb module against BerkeleyDB 4.5.x
   and 4.6.x.
 
-- Bug #1633621: if curses.resizeterm() or curses.resize_term() is called,
-  update _curses.LINES, _curses.COLS, curses.LINES and curses.COLS.
+- Bug #1633621: if curses.resizeterm() or curses.resize_term() is
+  called, update _curses.LINES, _curses.COLS, curses.LINES and
+  curses.COLS.
 
 - Fix an off-by-one bug in locale.strxfrm().
 
@@ -1990,26 +2122,28 @@
 
 - Refactor test_logging to use unittest.
 
-- Refactor test_profile and test_cprofile to use the same code to profile.
+- Refactor test_profile and test_cprofile to use the same code to
+  profile.
 
-- Make test_runpy reentrant by fixing _check_module to clear out any module
-  being tested.  Was causing an error by __import__ doing a reload on the
-  second run and thus suppressing bytecode recreation.
+- Make test_runpy reentrant by fixing _check_module to clear out any
+  module being tested.  Was causing an error by __import__ doing a
+  reload on the second run and thus suppressing bytecode recreation.
 
 - Capture socket connection resets and timeouts in test_socket_ssl and
   test_urllib2net and raise test.test_support.ResourceDenied.
 
-- Patch #1559413: Fix test_cmd_line if sys.executable contains a space.
+- Patch #1559413: Fix test_cmd_line if sys.executable contains a
+  space.
 
-- Added test.test_support.TransientResource which is a context manager to
-  surround calls to resources that are not guaranteed to work even if
-  test.test_support.requires says that the resource should exist.
+- Added test.test_support.TransientResource which is a context manager
+  to surround calls to resources that are not guaranteed to work even
+  if test.test_support.requires says that the resource should exist.
 
 - Added a test for slicing of an exception.
 
-- Added test.test_support.EnvironmentVarGuard.  It's a class that provides a
-  context manager so that one can temporarily set or unset environment
-  variables.
+- Added test.test_support.EnvironmentVarGuard.  It's a class that
+  provides a context manager so that one can temporarily set or unset
+  environment variables.
 
 - Added some tests for modulefinder.
 
@@ -2018,34 +2152,33 @@
 - Fix bsddb test_basics.test06_Transactions to check the version
   number properly.
 
-- test.test_support.catch_warning is a new context manager that can be used
-  to catch the warnings issued by the warning framework.
-
+- test.test_support.catch_warning is a new context manager that can be
+  used to catch the warnings issued by the warning framework.
 
 Tools
 -----
 
-- Tools/scripts/reindent.py now creates the backup file using shutil.copy
-  to preserve user/group and permissions. Added also a --nobackup option
-  to not create the backup if the user is concerned regarding this.  Check
-  issue 1050828 for more details.
-
-- Tools/scripts/win_add2path.py was added. The simple script modifes the
-  PATH environment var of the HKCU tree and adds the python bin and script
-  directory.
+- Tools/scripts/reindent.py now creates the backup file using
+  shutil.copy to preserve user/group and permissions. Added also a
+  --nobackup option to not create the backup if the user is concerned
+  regarding this.  Check issue 1050828 for more details.
+
+- Tools/scripts/win_add2path.py was added. The simple script modifes
+  the PATH environment var of the HKCU tree and adds the python bin
+  and script directory.
 
 - Tools/18n/pygettext.py was added to the list of scripts installed by
   Tools/scripts/setup.py (tracker item 642309).
 
-- Added IronPython and Jython support to pybench (part of which
-  was patch #1563844)
+- Added IronPython and Jython support to pybench (part of which was
+  patch #1563844).
 
-- Made some minor changes to pybench output to allow the user
-  to see which Python version is running pybench
+- Made some minor changes to pybench output to allow the user to see
+  which Python version is running pybench.
 
 - Added support for the new platform module feature
-  platform.python_implementation(); this will now be saved
-  in the benchmark pickle
+  platform.python_implementation(); this will now be saved in the
+  benchmark pickle.
 
 
 Documentation
@@ -2054,8 +2187,9 @@
 - RFE #1765140: Updated documentation on FileHandler and subclasses to
   include new optional delay argument.
 
-- Bug #932563: Added section on getting contextual information into logging
-  output, and added documentation for the new LoggerAdapter class.
+- Bug #932563: Added section on getting contextual information into
+  logging output, and added documentation for the new LoggerAdapter
+  class.
 
 - Bug #1295: Added information about caching of formatted exception
   information in the LogRecord by Formatter.format().
@@ -2065,8 +2199,8 @@
 
 - Patch #1698768: updated the "using Python on the Mac" intro.
 
-- Bug #1569057: Document that calling file.next() when the file is open for
-  writing is undefined.
+- Bug #1569057: Document that calling file.next() when the file is
+  open for writing is undefined.
 
 - Patch #1489771: the syntax rules in Python Reference Manual were
   updated to reflect the current Python syntax.
@@ -2093,8 +2227,9 @@
 - Bug #1566663: remove obsolete example from datetime docs.
 
 - Bug #1541682: Fix example in the "Refcount details" API docs.
-  Additionally, remove a faulty example showing PySequence_SetItem applied
-  to a newly created list object and add notes that this isn't a good idea.
+  Additionally, remove a faulty example showing PySequence_SetItem
+  applied to a newly created list object and add notes that this isn't
+  a good idea.
 
 
 Tools/Demos
@@ -2103,8 +2238,8 @@
 - Patch #1552024: add decorator support to unparse.py demo script.
 
 - Make auto-generated python.vim file list built-ins and exceptions in
-  alphatbetical order.  Makes output more deterministic and easier to tell if
-  the file is stale or not.
+  alphatbetical order.  Makes output more deterministic and easier to
+  tell if the file is stale or not.
 
 - Bug #1546372: Fixed small bugglet in pybench that caused a missing
   file not to get reported properly.
@@ -2113,23 +2248,24 @@
 Build
 -----
 
-- Have the search path for building extensions follow the declared order in
-  $CPPFLAGS and $LDFLAGS when adding directories from those environment
-  variables.
+- Have the search path for building extensions follow the declared
+  order in $CPPFLAGS and $LDFLAGS when adding directories from those
+  environment variables.
 
 - Bug #1983: Added a check to pyport to verify that sizeof(pid_t) is
   smaller or equal sizeof(long).
 
 - Bug #1234: Fixed semaphore errors on AIX 5.2
 
-- Issue #1726: Remove Python/atof.c from PCBuild/pythoncore.vcproj
+- Issue #1726: Remove Python/atof.c from PCBuild/pythoncore.vcproj.
 
-- Removed PCbuild8/ directory and added a new build directory for VS 2005
-  based on the VS 2008 build directory to PC/VS8.0. The script
-  PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0.
+- Removed PCbuild8/ directory and added a new build directory for VS
+  2005 based on the VS 2008 build directory to PC/VS8.0. The script
+  PCbuild/vs8to9.py was added to sync changes from PCbuild to
+  PC/VS8.0.
 
-- Moved PCbuild/ directory for VS 2003 to PC/VS7.1 and renamed PCBuild9/
-  directory to PCBuild/.
+- Moved PCbuild/ directory for VS 2003 to PC/VS7.1 and renamed
+  PCBuild9/ directory to PCBuild/.
 
 - Bug #1699: Define _BSD_SOURCE only on OpenBSD.
 
@@ -2140,20 +2276,22 @@
 - Patch #1418: Make the AC_REPLACE_FUNCS object files actually work.
 
 - Add a FAST_LOOPS build option that speeds-up looping by trading away
-  periodic threadstate and signal checking in tight loops.  By default,
-  this option is turned-off.  It should only be enabled in debugged,
-  performance critical applications.
+  periodic threadstate and signal checking in tight loops.  By
+  default, this option is turned-off.  It should only be enabled in
+  debugged, performance critical applications.
 
-- Patch #786737: Allow building in a tree of symlinks pointing to
-  a readonly source.
+- Patch #786737: Allow building in a tree of symlinks pointing to a
+  readonly source.
 
 - Bug #1737210: Change Manufacturer of Windows installer to PSF.
 
 - Bug #1746880: Correctly install DLLs into system32 folder on Win64.
 
-- Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+.
+- Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD
+  4.1+.
 
-- Stop supporting AtheOS and cause a build error in configure for the platform.
+- Stop supporting AtheOS and cause a build error in configure for the
+  platform.
 
 - Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
   returned by python-config if Python was built with --enable-shared
@@ -2166,18 +2304,18 @@
 
 - Disable _XOPEN_SOURCE on NetBSD 1.x.
 
-- configure now checks whether gcc supports the PyArg_ParseTuple format
-  attribute.
+- configure now checks whether gcc supports the PyArg_ParseTuple
+  format attribute.
 
 - Bug #1578513: Cross compilation was broken by a change to configure.
   Repair so that it's back to how it was in 2.4.3.
 
-- Patch #1576954: Update VC6 build directory; remove redundant
-  files in VC7.
+- Patch #1576954: Update VC6 build directory; remove redundant files
+  in VC7.
 
 - Bug #1568842: Fix test for uintptr_t.
 
-- Patch #1540470, for OpenBSD 4.0.
+- Patch #1540470: for OpenBSD 4.0.
 
 - Fix build failure on kfreebsd and on the hurd.
 
@@ -2185,45 +2323,48 @@
 
 - Allow Emacs 22 for building the documentation in info format.
 
-- Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
-  to include some information about the build environment.
+- Makefile.pre.in(buildbottest): Run an optional script
+  pybuildbot.identify to include some information about the build
+  environment.
 
 
 C API
 -----
 
-- Unified naming convention for free lists and their limits. All free lists
-  in Object/ are named ``free_list``, the counter ``numfree`` and the upper
-  limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block.
-
-- ``PySet_Add()`` can now modify a newly created frozenset.  Similarly to
-  ``PyTuple_SetItem``, it can be used to populate a brand new frozenset; but
-  it does not steal a reference to the added item.
+- Unified naming convention for free lists and their limits. All free
+  lists in Object/ are named ``free_list``, the counter ``numfree``
+  and the upper limit is a macro ``PyName_MAXFREELIST`` inside an
+  #ifndef block.
+
+- ``PySet_Add()`` can now modify a newly created frozenset.  Similarly
+  to ``PyTuple_SetItem``, it can be used to populate a brand new
+  frozenset; but it does not steal a reference to the added item.
 
 - Added ``PySet_Check()`` and ``PyFrozenSet_Check()`` to the set API.
 
-- Backport of PyUnicode_FromString(), _FromStringAndSize(), _Format and
-  _FormatV from Python 3.0. Made PyLong_AsSsize_t and PyLong_FromSsize_t
-  public functions.
+- Backport of PyUnicode_FromString(), _FromStringAndSize(), _Format
+  and _FormatV from Python 3.0. Made PyLong_AsSsize_t and
+  PyLong_FromSsize_t public functions.
 
 - Patch #1720595: add T_BOOL to the range of structmember types.
 
 - Issue #1534: Added ``PyFloat_GetMax()``, ``PyFloat_GetMin()`` and
   ``PyFloat_GetInfo()`` to the float API.
 
-- Issue #1521: On 64bit platforms, using PyArgs_ParseTuple with the t# of w#
-  format code incorrectly truncated the length to an int, even when
-  PY_SSIZE_T_CLEAN is set.  The str.decode method used to return incorrect
-  results with huge strings.
-
-- Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE
-  and Py_REFCNT.
-
-- PEP 3123: Provide forward compatibility with Python 3.0, while keeping
-  backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
-  PyVarObject_HEAD_INIT.
+- Issue #1521: On 64bit platforms, using PyArgs_ParseTuple with the t#
+  of w# format code incorrectly truncated the length to an int, even
+  when PY_SSIZE_T_CLEAN is set.  The str.decode method used to return
+  incorrect results with huge strings.
+
+- Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE,
+  Py_TYPE and Py_REFCNT.
+
+- PEP 3123: Provide forward compatibility with Python 3.0, while
+  keeping backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size,
+  and PyVarObject_HEAD_INIT.
 
-- Py_ssize_t fields work in structmember when HAVE_LONG_LONG is not defined.
+- Py_ssize_t fields work in structmember when HAVE_LONG_LONG is not
+  defined.
 
 - Patch #1733960: Allow T_LONGLONG to accept ints.
 
@@ -2239,26 +2380,27 @@
 - Make _PyGILState_NoteThreadState() static, it was not used anywhere
   outside of pystate.c and should not be necessary.
 
-- ``PyImport_Import`` and ``PyImport_ImportModule`` now always do absolute
-  imports. In earlier versions they might have used relative imports under
-  some conditions.
+- ``PyImport_Import`` and ``PyImport_ImportModule`` now always do
+  absolute imports. In earlier versions they might have used relative
+  imports under some conditions.
 
-- Added case insensitive comparison methods ``PyOS_stricmp(char*, char*)``
-  and ``PyOS_strnicmp(char*, char*, Py_ssize_t)``.
+- Added case insensitive comparison methods ``PyOS_stricmp(char*,
+  char*)`` and ``PyOS_strnicmp(char*, char*, Py_ssize_t)``.
 
-- Bug #1542693: remove semi-colon at end of PyImport_ImportModuleEx macro
-  so it can be used as an expression.
+- Bug #1542693: remove semi-colon at end of PyImport_ImportModuleEx
+  macro so it can be used as an expression.
 
 
 Windows
 -------
 
-- Patch #1706: Drop support for Win9x, WinME and NT4. Python now requires
-  Windows 2000 or greater. The _WINVER and NTDDI_VERSION macros are set to
-  Win2k for x86/32bit builds and WinXP for AMD64 builds.
+- Patch #1706: Drop support for Win9x, WinME and NT4. Python now
+  requires Windows 2000 or greater. The _WINVER and NTDDI_VERSION
+  macros are set to Win2k for x86/32bit builds and WinXP for AMD64
+  builds.
 
-- Conditionalize definition of _CRT_SECURE_NO_DEPRECATE
-  and _CRT_NONSTDC_NO_DEPRECATE.
+- Conditionalize definition of _CRT_SECURE_NO_DEPRECATE and
+  _CRT_NONSTDC_NO_DEPRECATE.
 
 - Bug #1216: Restore support for Visual Studio 2002.
 
@@ -2270,9 +2412,9 @@
 
 - buildtools now raises a DeprecationWarning.
 
-- Removed the macfs module.  It had been deprecated since Python 2.5.  This
-  lead to the deprecation of macostools.touched() as it relied solely on macfs
-  and was a no-op under OS X.
+- Removed the macfs module.  It had been deprecated since Python 2.5.
+  This lead to the deprecation of macostools.touched() as it relied
+  solely on macfs and was a no-op under OS X.
 
 ----
 

Modified: python/branches/tlee-ast-optimize/Misc/build.sh
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/build.sh	(original)
+++ python/branches/tlee-ast-optimize/Misc/build.sh	Wed May 21 11:25:51 2008
@@ -67,7 +67,7 @@
 # Note: test_XXX (none currently) really leak, but are disabled
 # so we don't send spam.  Any test which really leaks should only 
 # be listed here if there are also test cases under Lib/test/leakers.
-LEAKY_TESTS="test_(asynchat|cmd_line|popen2|socket|smtplib|sys|threadsignals|urllib2_localnet)"
+LEAKY_TESTS="test_(asynchat|cmd_line|popen2|socket|smtplib|sys|threadsignals|urllib2_localnet|httpservers)"
 
 # Skip these tests altogether when looking for leaks.  These tests
 # do not need to be stored above in LEAKY_TESTS too.

Modified: python/branches/tlee-ast-optimize/Misc/cheatsheet
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/cheatsheet	(original)
+++ python/branches/tlee-ast-optimize/Misc/cheatsheet	Wed May 21 11:25:51 2008
@@ -1864,7 +1864,7 @@
 compileall       Force "compilation" of all .py files in a directory.
 configparser     Configuration file parser (much like windows .ini files)
 copy             Generic shallow and deep copying operations.
-copyreg          Helper to provide extensibility for pickle/cPickle.
+copy_reg         Helper to provide extensibility for pickle/cPickle.
 csv              Read and write files with comma separated values.
 dbhash           (g)dbm-compatible interface to bsdhash.hashopen.
 dircache         Sorted list of files in a dir, using a cache.

Modified: python/branches/tlee-ast-optimize/Misc/developers.txt
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/developers.txt	(original)
+++ python/branches/tlee-ast-optimize/Misc/developers.txt	Wed May 21 11:25:51 2008
@@ -17,6 +17,9 @@
 Permissions History
 -------------------
 
+- Robert Schuppenies was given SVN access on 21 May 2008 by MvL,
+  for GSoC contributions.
+
 - Rodrigo Bernardo Pimentel was given SVN access on 29 April 2008 by MvL,
   for GSoC contributions.
 

Modified: python/branches/tlee-ast-optimize/Modules/_bsddb.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_bsddb.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/_bsddb.c	Wed May 21 11:25:51 2008
@@ -903,7 +903,7 @@
             Py_DECREF(self->myenvobj);
             self->myenvobj = NULL;
         }
-        PyObject_Del(self);
+        Py_DECREF(self);
         self = NULL;
     }
     return self;
@@ -1010,7 +1010,7 @@
     err = db_env_create(&self->db_env, flags);
     MYDB_END_ALLOW_THREADS;
     if (makeDBError(err)) {
-        PyObject_Del(self);
+        Py_DECREF(self);
         self = NULL;
     }
     else {
@@ -1050,20 +1050,27 @@
 newDBTxnObject(DBEnvObject* myenv, DBTxnObject *parent, DB_TXN *txn, int flags)
 {
     int err;
-    DB_TXN *parent_txn=NULL;
+    DB_TXN *parent_txn = NULL;
 
     DBTxnObject* self = PyObject_New(DBTxnObject, &DBTxn_Type);
     if (self == NULL)
         return NULL;
 
     self->in_weakreflist = NULL;
+    self->children_txns = NULL;
+    self->children_dbs = NULL;
+    self->children_cursors = NULL;
+    self->children_sequences = NULL;
+    self->flag_prepare = 0;
+    self->parent_txn = NULL;
+    self->env = NULL;
 
     if (parent && ((PyObject *)parent!=Py_None)) {
-        parent_txn=parent->txn;
+        parent_txn = parent->txn;
     }
 
     if (txn) {
-        self->txn=txn;
+        self->txn = txn;
     } else {
         MYDB_BEGIN_ALLOW_THREADS;
 #if (DBVER >= 40)
@@ -1074,29 +1081,24 @@
         MYDB_END_ALLOW_THREADS;
 
         if (makeDBError(err)) {
-            PyObject_Del(self);
+            Py_DECREF(self);
             return NULL;
         }
     }
 
-    if (parent_txn) { /* Can't use 'parent' because could be 'parent==Py_None' */
-        self->parent_txn=parent;
+    /* Can't use 'parent' because could be 'parent==Py_None' */
+    if (parent_txn) {
+        self->parent_txn = parent;
         Py_INCREF(parent);
         self->env = NULL;
-        INSERT_IN_DOUBLE_LINKED_LIST(parent->children_txns,self);
+        INSERT_IN_DOUBLE_LINKED_LIST(parent->children_txns, self);
     } else {
-        self->parent_txn=NULL;
+        self->parent_txn = NULL;
         Py_INCREF(myenv);
         self->env = myenv;
-        INSERT_IN_DOUBLE_LINKED_LIST(myenv->children_txns,self);
+        INSERT_IN_DOUBLE_LINKED_LIST(myenv->children_txns, self);
     }
 
-    self->children_txns=NULL;
-    self->children_dbs=NULL;
-    self->children_cursors=NULL;
-    self->children_sequences=NULL;
-    self->flag_prepare=0;
-
     return self;
 }
 
@@ -1151,7 +1153,7 @@
 #endif
     MYDB_END_ALLOW_THREADS;
     if (makeDBError(err)) {
-        PyObject_Del(self);
+        Py_DECREF(self);
         self = NULL;
     }
 
@@ -1183,7 +1185,7 @@
     self->mydb = mydb;
 
     INSERT_IN_DOUBLE_LINKED_LIST(self->mydb->children_sequences,self);
-    self->txn=NULL;
+    self->txn = NULL;
 
     self->in_weakreflist = NULL;
 
@@ -1191,8 +1193,7 @@
     err = db_sequence_create(&self->sequence, self->mydb->db, flags);
     MYDB_END_ALLOW_THREADS;
     if (makeDBError(err)) {
-        Py_DECREF(self->mydb);
-        PyObject_Del(self);
+        Py_DECREF(self);
         self = NULL;
     }
 

Modified: python/branches/tlee-ast-optimize/Modules/_ctypes/libffi/fficonfig.py.in
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_ctypes/libffi/fficonfig.py.in	(original)
+++ python/branches/tlee-ast-optimize/Modules/_ctypes/libffi/fficonfig.py.in	Wed May 21 11:25:51 2008
@@ -25,6 +25,7 @@
     'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'],
     'PA': ['src/pa/linux.S', 'src/pa/ffi.c'],
     'PA_LINUX': ['src/pa/linux.S', 'src/pa/ffi.c'],
+    'PA_HPUX': ['src/pa/hpux32.s', 'src/pa/ffi.c'],
 }
 
 ffi_srcdir = '@srcdir@'

Modified: python/branches/tlee-ast-optimize/Modules/cPickle.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/cPickle.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/cPickle.c	Wed May 21 11:25:51 2008
@@ -105,18 +105,18 @@
 /* As the name says, an empty tuple. */
 static PyObject *empty_tuple;
 
-/* copyreg.dispatch_table, {type_object: pickling_function} */
+/* copy_reg.dispatch_table, {type_object: pickling_function} */
 static PyObject *dispatch_table;
 
 /* For EXT[124] opcodes. */
-/* copyreg._extension_registry, {(module_name, function_name): code} */
+/* copy_reg._extension_registry, {(module_name, function_name): code} */
 static PyObject *extension_registry;
-/* copyreg._inverted_registry, {code: (module_name, function_name)} */
+/* copy_reg._inverted_registry, {code: (module_name, function_name)} */
 static PyObject *inverted_registry;
-/* copyreg._extension_cache, {code: object} */
+/* copy_reg._extension_cache, {code: object} */
 static PyObject *extension_cache;
 
-/* For looking up name pairs in copyreg._extension_registry. */
+/* For looking up name pairs in copy_reg._extension_registry. */
 static PyObject *two_tuple;
 
 static PyObject *__class___str, *__getinitargs___str, *__dict___str,
@@ -2477,7 +2477,7 @@
 	}
 
 	/* Get a reduction callable, and call it.  This may come from
-	 * copyreg.dispatch_table, the object's __reduce_ex__ method,
+	 * copy_reg.dispatch_table, the object's __reduce_ex__ method,
 	 * or the object's __reduce__ method.
 	 */
 	__reduce__ = PyDict_GetItem(dispatch_table, (PyObject *)type);
@@ -5591,7 +5591,7 @@
 	INIT_STR(copyreg);
 	INIT_STR(dispatch_table);
 
-	if (!( copyreg = PyImport_ImportModule("copyreg")))
+	if (!( copyreg = PyImport_ImportModule("copy_reg")))
 		return -1;
 
 	/* This is special because we want to use a different

Modified: python/branches/tlee-ast-optimize/Modules/parsermodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/parsermodule.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/parsermodule.c	Wed May 21 11:25:51 2008
@@ -3284,7 +3284,7 @@
      * If this fails, the import of this module will fail because an
      * exception will be raised here; should we clear the exception?
      */
-    copyreg = PyImport_ImportModuleNoBlock("copyreg");
+    copyreg = PyImport_ImportModuleNoBlock("copy_reg");
     if (copyreg != NULL) {
         PyObject *func, *pickler;
 

Modified: python/branches/tlee-ast-optimize/Objects/fileobject.c
==============================================================================
--- python/branches/tlee-ast-optimize/Objects/fileobject.c	(original)
+++ python/branches/tlee-ast-optimize/Objects/fileobject.c	Wed May 21 11:25:51 2008
@@ -1736,6 +1736,15 @@
 }
 
 static PyObject *
+file_xreadlines(PyFileObject *f)
+{
+	if (PyErr_WarnPy3k("f.xreadlines() not supported in 3.x, "
+			   "try 'for line in f' instead", 1) < 0)
+	       return NULL;
+	return file_self(f);
+}
+
+static PyObject *
 file_exit(PyObject *f, PyObject *args)
 {
 	PyObject *ret = PyObject_CallMethod(f, "close", NULL);
@@ -1850,9 +1859,9 @@
 #endif
 	{"tell",      (PyCFunction)file_tell,     METH_NOARGS,  tell_doc},
 	{"readinto",  (PyCFunction)file_readinto, METH_VARARGS, readinto_doc},
-	{"readlines", (PyCFunction)file_readlines,METH_VARARGS, readlines_doc},
-	{"xreadlines",(PyCFunction)file_self,     METH_NOARGS, xreadlines_doc},
-	{"writelines",(PyCFunction)file_writelines, METH_O,    writelines_doc},
+	{"readlines", (PyCFunction)file_readlines, METH_VARARGS, readlines_doc},
+	{"xreadlines",(PyCFunction)file_xreadlines, METH_NOARGS, xreadlines_doc},
+	{"writelines",(PyCFunction)file_writelines, METH_O,     writelines_doc},
 	{"flush",     (PyCFunction)file_flush,    METH_NOARGS,  flush_doc},
 	{"close",     (PyCFunction)file_close,    METH_NOARGS,  close_doc},
 	{"isatty",    (PyCFunction)file_isatty,   METH_NOARGS,  isatty_doc},

Modified: python/branches/tlee-ast-optimize/Objects/typeobject.c
==============================================================================
--- python/branches/tlee-ast-optimize/Objects/typeobject.c	(original)
+++ python/branches/tlee-ast-optimize/Objects/typeobject.c	Wed May 21 11:25:51 2008
@@ -3058,7 +3058,7 @@
 
 
 /* Stuff to implement __reduce_ex__ for pickle protocols >= 2.
-   We fall back to helpers in copyreg for:
+   We fall back to helpers in copy_reg for:
    - pickle protocols < 2
    - calculating the list of slot names (done only once per class)
    - the __newobj__ function (which is used as a token but never called)
@@ -3070,7 +3070,7 @@
 	static PyObject *copyreg_str;
 
 	if (!copyreg_str) {
-		copyreg_str = PyString_InternFromString("copyreg");
+		copyreg_str = PyString_InternFromString("copy_reg");
 		if (copyreg_str == NULL)
 			return NULL;
 	}
@@ -3108,7 +3108,7 @@
 	    !PyList_Check(slotnames))
 	{
 		PyErr_SetString(PyExc_TypeError,
-			"copyreg._slotnames didn't return a list or None");
+			"copy_reg._slotnames didn't return a list or None");
 		Py_DECREF(slotnames);
 		slotnames = NULL;
 	}

Modified: python/branches/tlee-ast-optimize/Objects/weakrefobject.c
==============================================================================
--- python/branches/tlee-ast-optimize/Objects/weakrefobject.c	(original)
+++ python/branches/tlee-ast-optimize/Objects/weakrefobject.c	Wed May 21 11:25:51 2008
@@ -473,6 +473,8 @@
 WRAP_BINARY(proxy_sub, PyNumber_Subtract)
 WRAP_BINARY(proxy_mul, PyNumber_Multiply)
 WRAP_BINARY(proxy_div, PyNumber_Divide)
+WRAP_BINARY(proxy_floor_div, PyNumber_FloorDivide)
+WRAP_BINARY(proxy_true_div, PyNumber_TrueDivide)
 WRAP_BINARY(proxy_mod, PyNumber_Remainder)
 WRAP_BINARY(proxy_divmod, PyNumber_Divmod)
 WRAP_TERNARY(proxy_pow, PyNumber_Power)
@@ -492,6 +494,8 @@
 WRAP_BINARY(proxy_isub, PyNumber_InPlaceSubtract)
 WRAP_BINARY(proxy_imul, PyNumber_InPlaceMultiply)
 WRAP_BINARY(proxy_idiv, PyNumber_InPlaceDivide)
+WRAP_BINARY(proxy_ifloor_div, PyNumber_InPlaceFloorDivide)
+WRAP_BINARY(proxy_itrue_div, PyNumber_InPlaceTrueDivide)
 WRAP_BINARY(proxy_imod, PyNumber_InPlaceRemainder)
 WRAP_TERNARY(proxy_ipow, PyNumber_InPlacePower)
 WRAP_BINARY(proxy_ilshift, PyNumber_InPlaceLshift)
@@ -499,6 +503,7 @@
 WRAP_BINARY(proxy_iand, PyNumber_InPlaceAnd)
 WRAP_BINARY(proxy_ixor, PyNumber_InPlaceXor)
 WRAP_BINARY(proxy_ior, PyNumber_InPlaceOr)
+WRAP_UNARY(proxy_index, PyNumber_Index)
 
 static int
 proxy_nonzero(PyWeakReference *proxy)
@@ -623,6 +628,11 @@
     proxy_iand,             /*nb_inplace_and*/
     proxy_ixor,             /*nb_inplace_xor*/
     proxy_ior,              /*nb_inplace_or*/
+    proxy_floor_div,        /*nb_floor_divide*/
+    proxy_true_div,         /*nb_true_divide*/
+    proxy_ifloor_div,       /*nb_inplace_floor_divide*/
+    proxy_itrue_div,        /*nb_inplace_true_divide*/
+    proxy_index,            /*nb_index*/
 };
 
 static PySequenceMethods proxy_as_sequence = {

Modified: python/branches/tlee-ast-optimize/Python/sysmodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Python/sysmodule.c	(original)
+++ python/branches/tlee-ast-optimize/Python/sysmodule.c	Wed May 21 11:25:51 2008
@@ -992,6 +992,7 @@
 Static objects:\n\
 \n\
 maxint -- the largest supported integer (the smallest is -maxint-1)\n\
+maxsize -- the largest supported length of containers.\n\
 maxunicode -- the largest supported character\n\
 builtin_module_names -- tuple of module names built into this interpreter\n\
 version -- the version of this interpreter as a string\n\
@@ -1345,6 +1346,8 @@
 			    PyString_FromString(Py_GetPrefix()));
 	SET_SYS_FROM_STRING("exec_prefix",
 		   	    PyString_FromString(Py_GetExecPrefix()));
+	SET_SYS_FROM_STRING("maxsize",
+			    PyInt_FromSsize_t(PY_SSIZE_T_MAX));
 	SET_SYS_FROM_STRING("maxint",
 			    PyInt_FromLong(PyInt_GetMax()));
 	SET_SYS_FROM_STRING("py3kwarning",

Modified: python/branches/tlee-ast-optimize/README
==============================================================================
--- python/branches/tlee-ast-optimize/README	(original)
+++ python/branches/tlee-ast-optimize/README	Wed May 21 11:25:51 2008
@@ -917,6 +917,26 @@
 link most extension modules statically.
 
 
+Coverage checking
+-----------------
+
+For C coverage checking using gcov, run "make coverage".  This will
+build a Python binary with profiling activated, and a ".gcno" and
+".gcda" file for every source file compiled with that option.  With
+the built binary, now run the code whose coverage you want to check.
+Then, you can see coverage statistics for each individual source file
+by running gcov, e.g.
+
+    gcov -o Modules zlibmodule
+
+This will create a "zlibmodule.c.gcov" file in the current directory
+containing coverage info for that source file.
+
+This works only for source files statically compiled into the
+executable; use the Makefile/Setup mechanism to compile and link
+extension modules you want to coverage-check statically.
+
+
 Testing
 -------
 

Modified: python/branches/tlee-ast-optimize/setup.py
==============================================================================
--- python/branches/tlee-ast-optimize/setup.py	(original)
+++ python/branches/tlee-ast-optimize/setup.py	Wed May 21 11:25:51 2008
@@ -1580,6 +1580,9 @@
             # finding some -z option for the Sun compiler.
             extra_link_args.append('-mimpure-text')
 
+        elif sys.platform.startswith('hpux'):
+            extra_link_args.append('-fPIC')
+
         ext = Extension('_ctypes',
                         include_dirs=include_dirs,
                         extra_compile_args=extra_compile_args,


More information about the Python-checkins mailing list