summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-01-26 13:50:51 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-01-26 13:50:51 (GMT)
commit0c3f1680b38ca1c9119442f523173e3729f3b70f (patch)
tree393e4efaeb0ca5e17827548ca86dfe428612a661 /Doc/whatsnew
parenta7364408cd02ddfa61f04ed255a43c0a0e5c697a (diff)
downloadcpython-0c3f1680b38ca1c9119442f523173e3729f3b70f.zip
cpython-0c3f1680b38ca1c9119442f523173e3729f3b70f.tar.gz
cpython-0c3f1680b38ca1c9119442f523173e3729f3b70f.tar.bz2
Add some items
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/2.6.rst64
1 files changed, 63 insertions, 1 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 83101bd..cbc8b8f 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -3,6 +3,7 @@
****************************
.. XXX mention switch to Roundup for bug tracking
+.. XXX add trademark info for Apple, Microsoft.
:Author: A.M. Kuchling
:Release: |release|
@@ -909,7 +910,13 @@ complete list of changes, or look through the CVS logs for all the details.
* An optional ``timeout`` parameter was added to the
:class:`ftplib.FTP` class constructor as well as the :meth:`connect`
method, specifying a timeout measured in seconds. (Added by Facundo
- Batista.)
+ Batista.) Also, the :class:`FTP` class's
+ :meth:`storbinary` and :meth:`storlines`
+ now take an optional *callback* parameter that will be called with
+ each block of data after the data has been sent.
+ (Contributed by Phil Schwartz.)
+
+ .. Patch 1221598
* The :func:`reduce` built-in function is also available in the
:mod:`functools` module. In Python 3.0, the built-in is dropped and it's
@@ -1041,6 +1048,13 @@ complete list of changes, or look through the CVS logs for all the details.
.. Patch 1137
+* The :mod:`Queue` module now provides queue classes that retrieve entries
+ in different orders. The :class:`PriorityQueue` class stores
+ queued items in a heap and retrieves them in priority order,
+ and :class:`LifoQueue` retrieves the most recently added entries first,
+ meaning that it behaves like a stack.
+ (Contributed by Raymond Hettinger.)
+
* The :mod:`random` module's :class:`Random` objects can
now be pickled on a 32-bit system and unpickled on a 64-bit
system, and vice versa. Unfortunately, this change also means
@@ -1304,6 +1318,47 @@ XXX Certain features require the OpenSSL package to be installed, notably
SSL module documentation.
+
+.. ======================================================================
+
+plistlib: A Property-List Parser
+--------------------------------------------------
+
+A commonly-used format on MacOS X is the ``.plist`` format,
+which stores basic data types (numbers, strings, lists,
+and dictionaries) and serializes them into an XML-based format.
+(It's a lot like the XML-RPC serialization of data types.)
+
+Despite being primarily used on MacOS X, the format
+has nothing Mac-specific about it and the Python implementation works
+on any platform that Python supports, so the :mod:`plistlib` module
+has been promoted to the standard library.
+
+Using the module is simple::
+
+ import sys
+ import plistlib
+ import datetime
+
+ # Create data structure
+ data_struct = dict(lastAccessed=datetime.datetime.now(),
+ version=1,
+ categories=('Personal', 'Shared', 'Private'))
+
+ # Create string containing XML.
+ plist_str = plistlib.writePlistToString(data_struct)
+ new_struct = plistlib.readPlistFromString(plist_str)
+ print data_struct
+ print new_struct
+
+ # Write data structure to a file and read it back.
+ plistlib.writePlist(data_struct, '/tmp/customizations.plist')
+ new_struct = plistlib.readPlist('/tmp/customizations.plist')
+
+ # read/writePlist accepts file-like objects as well as paths.
+ plistlib.writePlist(data_struct, sys.stdout)
+
+
.. ======================================================================
@@ -1351,6 +1406,13 @@ Changes to Python's build process and to the C API include:
.. Issue 1629
+* Distutils now places C extensions it builds in a
+ different directory when running on a debug version of Python.
+ (Contributed by Collin Winter.)
+
+ .. Patch 1530959
+
+
.. ======================================================================