ReST-ification of the NEWS file. While the total number of changes are

fairly large, most are caused by reformatting section and subsection
headings.  The changes fall into the following categories:

    * reformatted section and subsection headers.

    * escaped isolated asterisks which would be interpreted as starting bold
      or italic text (e.g. "void (*)(PyObject \*)").

    * quoted stuff that looks like internal references but isn't
      (e.g. ``PyCmp_``).

    * changed visually balanced quotes to just use apostrophes
      (e.g. "'string'" instead of "`string'").

    * introduced and indenting multiline chunks of code.

    * created one table (search for "New codecs").
This commit is contained in:
Skip Montanaro 2002-09-20 14:16:59 +00:00
parent f0cfdf7314
commit e5d7f7f3af

220
Misc/NEWS
View File

@ -1,8 +1,14 @@
+++++++++++
Python News
+++++++++++
What's New in Python 2.3 alpha 1? What's New in Python 2.3 alpha 1?
XXX Release date: DD-MMM-2002 XXX
================================= =================================
*XXX Release date: DD-MMM-2002 XXX*
Type/class unification and new-style classes Type/class unification and new-style classes
--------------------------------------------
- Assignment to __class__ is disallowed if either the old and the new - Assignment to __class__ is disallowed if either the old and the new
class is a statically allocated type object (such as defined by an class is a statically allocated type object (such as defined by an
@ -56,6 +62,7 @@ Type/class unification and new-style classes
state of the slots would be lost.) state of the slots would be lost.)
Core and builtins Core and builtins
-----------------
- Codec error handling callbacks (PEP 293) are implemented. - Codec error handling callbacks (PEP 293) are implemented.
Error handling in unicode.encode or str.decode can now be customized. Error handling in unicode.encode or str.decode can now be customized.
@ -161,7 +168,7 @@ Core and builtins
precedes B in the list at the start, A precedes B after the sort too), precedes B in the list at the start, A precedes B after the sort too),
although the language definition does not guarantee stability. A although the language definition does not guarantee stability. A
potential drawback is that list.sort() may require temp space of potential drawback is that list.sort() may require temp space of
len(list)*2 bytes (*4 on a 64-bit machine). It's therefore possible len(list)*2 bytes (\*4 on a 64-bit machine). It's therefore possible
for list.sort() to raise MemoryError now, even if a comparison function for list.sort() to raise MemoryError now, even if a comparison function
does not. See <http://www.python.org/sf/587076> for full details. does not. See <http://www.python.org/sf/587076> for full details.
@ -273,6 +280,7 @@ Core and builtins
An exception will now be raised if more than one argument is used. An exception will now be raised if more than one argument is used.
Extension modules Extension modules
-----------------
- cPickle.BadPickleGet is now a class. - cPickle.BadPickleGet is now a class.
@ -324,6 +332,7 @@ Extension modules
interpreter was compiled. interpreter was compiled.
Library Library
-------
- mimetypes has two new functions: guess_all_extensions() which - mimetypes has two new functions: guess_all_extensions() which
returns a list of all known extensions for a mime type, and returns a list of all known extensions for a mime type, and
@ -469,6 +478,7 @@ Library
honored. honored.
Tools/Demos Tools/Demos
-----------
- The SGI demos (Demo/sgi) have been removed. Nobody thought they - The SGI demos (Demo/sgi) have been removed. Nobody thought they
were interesting any more. (The SGI library modules and extensions were interesting any more. (The SGI library modules and extensions
@ -485,6 +495,7 @@ Tools/Demos
the generated binary. the generated binary.
Build Build
-----
- The public Python C API will generally be declared using PyAPI_FUNC - The public Python C API will generally be declared using PyAPI_FUNC
and PyAPI_DATA macros, while Python extension module init functions and PyAPI_DATA macros, while Python extension module init functions
@ -550,6 +561,7 @@ Build
modules in the README file for details. modules in the README file for details.
C API C API
-----
- The string object's layout has changed: the pointer member - The string object's layout has changed: the pointer member
ob_sinterned has been replaced by an int member ob_sstate. On some ob_sinterned has been replaced by an int member ob_sstate. On some
@ -593,8 +605,8 @@ C API
coercion if both arguments have the same type but this type has the coercion if both arguments have the same type but this type has the
CHECKTYPES flag set. This is to better support proxies. CHECKTYPES flag set. This is to better support proxies.
- The type of tp_free has been changed from "void (*)(PyObject *)" to - The type of tp_free has been changed from "void (*)(PyObject \*)" to
"void (*)(void *)". "void (*)(void \*)".
- PyObject_Del, PyObject_GC_Del are now functions instead of macros. - PyObject_Del, PyObject_GC_Del are now functions instead of macros.
@ -610,7 +622,7 @@ C API
- The "u#" parser marker will now pass through Unicode objects as-is - The "u#" parser marker will now pass through Unicode objects as-is
without going through the buffer API. without going through the buffer API.
- The enumerators of cmp_op have been renamed to use the prefix PyCmp_. - The enumerators of cmp_op have been renamed to use the prefix ``PyCmp_``.
- An old #define of ANY as void has been removed from pyport.h. This - An old #define of ANY as void has been removed from pyport.h. This
hasn't been used since Python's pre-ANSI days, and the #define has hasn't been used since Python's pre-ANSI days, and the #define has
@ -624,6 +636,7 @@ C API
scheme to a new one. See Python/import.c for details. scheme to a new one. See Python/import.c for details.
New platforms New platforms
-------------
- AtheOS is now supported. - AtheOS is now supported.
@ -632,8 +645,12 @@ New platforms
- GNU/Hurd is now supported. - GNU/Hurd is now supported.
Tests Tests
-----
Yet to be written.
Windows Windows
-------
- Sometimes the uninstall executable (UNWISE.EXE) vanishes. One cause - Sometimes the uninstall executable (UNWISE.EXE) vanishes. One cause
of that has been fixed in the installer (disabled Wise's "delete in- of that has been fixed in the installer (disabled Wise's "delete in-
@ -681,23 +698,30 @@ Windows
specified with O_CREAT too). specified with O_CREAT too).
Mac Mac
----
Yet to be written.
What's New in Python 2.2 final? What's New in Python 2.2 final?
Release date: 21-Dec-2001
=============================== ===============================
*Release date: 21-Dec-2001*
Type/class unification and new-style classes Type/class unification and new-style classes
--------------------------------------------
- pickle.py, cPickle: allow pickling instances of new-style classes - pickle.py, cPickle: allow pickling instances of new-style classes
with a custom metaclass. with a custom metaclass.
Core and builtins Core and builtins
-----------------
- weakref proxy object: when comparing, unwrap both arguments if both - weakref proxy object: when comparing, unwrap both arguments if both
are proxies. are proxies.
Extension modules Extension modules
-----------------
- binascii.b2a_base64(): fix a potential buffer overrun when encoding - binascii.b2a_base64(): fix a potential buffer overrun when encoding
very short strings. very short strings.
@ -709,6 +733,7 @@ Extension modules
when compiling cPickle.c (or in pyconfig.h). when compiling cPickle.c (or in pyconfig.h).
Library Library
-------
- dumbdbm.py: fixed a dumb old bug (the file didn't get synched at - dumbdbm.py: fixed a dumb old bug (the file didn't get synched at
close or delete time). close or delete time).
@ -722,16 +747,22 @@ Library
when run from the standard regression test. when run from the standard regression test.
Tools/Demos Tools/Demos
-----------
Build Build
-----
C API C API
-----
New platforms New platforms
-------------
Tests Tests
-----
Windows Windows
-------
- distutils package: fixed broken Windows installers (bdist_wininst). - distutils package: fixed broken Windows installers (bdist_wininst).
@ -745,6 +776,7 @@ Windows
in backslash. in backslash.
Mac Mac
----
- The Carbon toolbox modules have been upgraded to Universal Headers - The Carbon toolbox modules have been upgraded to Universal Headers
3.4, and experimental CoreGraphics and CarbonEvents modules have 3.4, and experimental CoreGraphics and CarbonEvents modules have
@ -752,10 +784,12 @@ Mac
What's New in Python 2.2c1? What's New in Python 2.2c1?
Release date: 14-Dec-2001
=========================== ===========================
*Release date: 14-Dec-2001*
Type/class unification and new-style classes Type/class unification and new-style classes
--------------------------------------------
- Guido's tutorial introduction to the new type/class features has - Guido's tutorial introduction to the new type/class features has
been extensively updated. See been extensively updated. See
@ -798,6 +832,7 @@ Type/class unification and new-style classes
dictionary, but saves space if the object is not used further. dictionary, but saves space if the object is not used further.
Core and builtins Core and builtins
-----------------
- -Qnew now works as documented in PEP 238: when -Qnew is passed on - -Qnew now works as documented in PEP 238: when -Qnew is passed on
the command line, all occurrences of "/" use true division instead the command line, all occurrences of "/" use true division instead
@ -815,10 +850,12 @@ Core and builtins
or if the second arg is specified when the first is a string. or if the second arg is specified when the first is a string.
Extension modules Extension modules
-----------------
- gc.get_referents was renamed to gc.get_referrers. - gc.get_referents was renamed to gc.get_referrers.
Library Library
-------
- Functions in the os.spawn() family now release the global interpreter - Functions in the os.spawn() family now release the global interpreter
lock around calling the platform spawn. They should always have done lock around calling the platform spawn. They should always have done
@ -840,11 +877,13 @@ Library
- The pulldom and minidom modules were synchronized to PyXML. - The pulldom and minidom modules were synchronized to PyXML.
Tools/Demos Tools/Demos
-----------
- A new script called Tools/scripts/google.py was added, which fires - A new script called Tools/scripts/google.py was added, which fires
off a search on Google. off a search on Google.
Build Build
-----
- Note that release builds of Python should arrange to define the - Note that release builds of Python should arrange to define the
preprocessor symbol NDEBUG on the command line (or equivalent). preprocessor symbol NDEBUG on the command line (or equivalent).
@ -859,6 +898,7 @@ Build
directory an extension is used, but not in the installed python. directory an extension is used, but not in the installed python.
C API C API
-----
- New function PyDict_MergeFromSeq2() exposes the builtin dict - New function PyDict_MergeFromSeq2() exposes the builtin dict
constructor's logic for updating a dictionary from an iterable object constructor's logic for updating a dictionary from an iterable object
@ -872,12 +912,16 @@ C API
previously went unchallenged. previously went unchallenged.
New platforms New platforms
-------------
Tests Tests
-----
Windows Windows
-------
Mac Mac
----
- In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin", - In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin",
without any trailing digits. without any trailing digits.
@ -889,10 +933,12 @@ Mac
What's New in Python 2.2b2? What's New in Python 2.2b2?
Release date: 16-Nov-2001
=========================== ===========================
*Release date: 16-Nov-2001*
Type/class unification and new-style classes Type/class unification and new-style classes
--------------------------------------------
- Multiple inheritance mixing new-style and classic classes in the - Multiple inheritance mixing new-style and classic classes in the
list of base classes is now allowed, so this works now: list of base classes is now allowed, so this works now:
@ -926,6 +972,7 @@ Type/class unification and new-style classes
- The socket function has been converted to a type; see below. - The socket function has been converted to a type; see below.
Core and builtins Core and builtins
-----------------
- Assignment to __debug__ raises SyntaxError at compile-time. This - Assignment to __debug__ raises SyntaxError at compile-time. This
was promised when 2.1c1 was released as "What's New in Python 2.1c1" was promised when 2.1c1 was released as "What's New in Python 2.1c1"
@ -935,6 +982,7 @@ Core and builtins
(like 1 + ''). (like 1 + '').
Extension modules Extension modules
-----------------
- mmap has a new keyword argument, "access", allowing a uniform way for - mmap has a new keyword argument, "access", allowing a uniform way for
both Windows and Unix users to create read-only, write-through and both Windows and Unix users to create read-only, write-through and
@ -961,6 +1009,7 @@ Extension modules
bytes on its input. bytes on its input.
Library Library
-------
- tkFileDialog exposes a Directory class and askdirectory - tkFileDialog exposes a Directory class and askdirectory
convenience function. convenience function.
@ -991,7 +1040,7 @@ Library
- mimetypes.py has optional support for non-standard, but commonly - mimetypes.py has optional support for non-standard, but commonly
found types. guess_type() and guess_extension() now accept an found types. guess_type() and guess_extension() now accept an
optional `strict' flag, defaulting to true, which controls whether optional 'strict' flag, defaulting to true, which controls whether
recognize non-standard types or not. A few non-standard types we recognize non-standard types or not. A few non-standard types we
know about have been added. Also, when run as a script, there are know about have been added. Also, when run as a script, there are
new -l and -e options. new -l and -e options.
@ -1000,7 +1049,7 @@ Library
- email.Utils.formatdate() now produces the preferred RFC 2822 style - email.Utils.formatdate() now produces the preferred RFC 2822 style
dates with numeric timezones (it used to produce obsolete dates dates with numeric timezones (it used to produce obsolete dates
hard coded to "GMT" timezone). An optional `localtime' flag is hard coded to "GMT" timezone). An optional 'localtime' flag is
added to produce dates in the local timezone, with daylight savings added to produce dates in the local timezone, with daylight savings
time properly taken into account. time properly taken into account.
@ -1010,8 +1059,10 @@ Library
in pickle, as it already was supported in cPickle. in pickle, as it already was supported in cPickle.
Tools/Demos Tools/Demos
-----------
Build Build
-----
- The dbm module is built using libdb1 if available. The bsddb module - The dbm module is built using libdb1 if available. The bsddb module
is built with libdb3 if available. is built with libdb3 if available.
@ -1019,6 +1070,7 @@ Build
- Misc/Makefile.pre.in has been removed by BDFL pronouncement. - Misc/Makefile.pre.in has been removed by BDFL pronouncement.
C API C API
-----
- New function PySequence_Fast_GET_SIZE() returns the size of a non- - New function PySequence_Fast_GET_SIZE() returns the size of a non-
NULL result from PySequence_Fast(), more quickly than calling NULL result from PySequence_Fast(), more quickly than calling
@ -1037,6 +1089,7 @@ C API
argument supports the single-segment readable buffer interface. argument supports the single-segment readable buffer interface.
New platforms New platforms
-------------
- We've finally confirmed that this release builds on HP-UX 11.00, - We've finally confirmed that this release builds on HP-UX 11.00,
*with* threads, and passes the test suite. *with* threads, and passes the test suite.
@ -1047,13 +1100,16 @@ New platforms
- Updated RISCOS port by Dietmar Schwertberger. - Updated RISCOS port by Dietmar Schwertberger.
Tests Tests
-----
- Added a test script for the curses module. It isn't run automatically; - Added a test script for the curses module. It isn't run automatically;
regrtest.py must be run with '-u curses' to enable it. regrtest.py must be run with '-u curses' to enable it.
Windows Windows
-------
Mac Mac
----
- PythonScript has been moved to unsupported and is slated to be - PythonScript has been moved to unsupported and is slated to be
removed completely in the next release. removed completely in the next release.
@ -1068,10 +1124,12 @@ Mac
What's New in Python 2.2b1? What's New in Python 2.2b1?
Release date: 19-Oct-2001
=========================== ===========================
*Release date: 19-Oct-2001*
Type/class unification and new-style classes Type/class unification and new-style classes
--------------------------------------------
- New-style classes are now always dynamic (except for built-in and - New-style classes are now always dynamic (except for built-in and
extension types). There is no longer a performance penalty, and I extension types). There is no longer a performance penalty, and I
@ -1090,6 +1148,7 @@ Type/class unification and new-style classes
class methods, static methods, and properties. class methods, static methods, and properties.
Core and builtins Core and builtins
-----------------
- A very subtle syntactical pitfall in list comprehensions was fixed. - A very subtle syntactical pitfall in list comprehensions was fixed.
For example: [a+b for a in 'abc', for b in 'def']. The comma in For example: [a+b for a in 'abc', for b in 'def']. The comma in
@ -1127,6 +1186,7 @@ Core and builtins
returns true if x is an instance of A or B. returns true if x is an instance of A or B.
Extension modules Extension modules
-----------------
- thread.start_new_thread() now returns the thread ID (previously None). - thread.start_new_thread() now returns the thread ID (previously None).
@ -1161,6 +1221,7 @@ Extension modules
exports O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW. exports O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW.
Library Library
-------
- doctest now excludes functions and classes not defined by the module - doctest now excludes functions and classes not defined by the module
being tested, thanks to Tim Hochberg. being tested, thanks to Tim Hochberg.
@ -1204,7 +1265,7 @@ Library
- The SocketServer.ThreadingMixIn class now closes the request after - The SocketServer.ThreadingMixIn class now closes the request after
finish_request() returns. (Not when it errors out though.) finish_request() returns. (Not when it errors out though.)
- The nntplib module's NNTP.body() method has grown a `file' argument - The nntplib module's NNTP.body() method has grown a 'file' argument
to allow saving the message body to a file. to allow saving the message body to a file.
- The email package has added a class email.Parser.HeaderParser which - The email package has added a class email.Parser.HeaderParser which
@ -1221,6 +1282,7 @@ Library
and item() method as required by the DOM specifications. and item() method as required by the DOM specifications.
Tools/Demos Tools/Demos
-----------
- Demo/dns was removed. It no longer serves any purpose; a package - Demo/dns was removed. It no longer serves any purpose; a package
derived from it is now maintained by Anthony Baxter, see derived from it is now maintained by Anthony Baxter, see
@ -1230,11 +1292,13 @@ Tools/Demos
been added: -X and -E. been added: -X and -E.
Build Build
-----
- configure will use CXX in LINKCC if CXX is used to build main() and - configure will use CXX in LINKCC if CXX is used to build main() and
the system requires to link a C++ main using the C++ compiler. the system requires to link a C++ main using the C++ compiler.
C API C API
-----
- The documentation for the tp_compare slot is updated to require that - The documentation for the tp_compare slot is updated to require that
the return value must be -1, 0, 1; an arbitrary number <0 or >0 is the return value must be -1, 0, 1; an arbitrary number <0 or >0 is
@ -1257,10 +1321,13 @@ C API
input. input.
New platforms New platforms
-------------
Tests Tests
-----
Windows Windows
-------
- Installer: If you install IDLE, and don't disable file-extension - Installer: If you install IDLE, and don't disable file-extension
registration, a new "Edit with IDLE" context (right-click) menu entry registration, a new "Edit with IDLE" context (right-click) menu entry
@ -1269,29 +1336,30 @@ Windows
- The signal module now supports SIGBREAK on Windows, thanks to Steven - The signal module now supports SIGBREAK on Windows, thanks to Steven
Scott. Note that SIGBREAK is unique to Windows. The default SIGBREAK Scott. Note that SIGBREAK is unique to Windows. The default SIGBREAK
action remains to call Win32 ExitProcess(). This can be changed via action remains to call Win32 ExitProcess(). This can be changed via
signal.signal(). For example: signal.signal(). For example: ::
# Make Ctrl+Break raise KeyboardInterrupt, like Python's default Ctrl+C # Make Ctrl+Break raise KeyboardInterrupt, like Python's default Ctrl+C
# (SIGINT) behavior. # (SIGINT) behavior.
import signal import signal
signal.signal(signal.SIGBREAK, signal.signal(signal.SIGBREAK, signal.default_int_handler)
signal.default_int_handler)
try: try:
while 1: while 1:
pass pass
except KeyboardInterrupt: except KeyboardInterrupt:
# We get here on Ctrl+C or Ctrl+Break now; if we had not changed # We get here on Ctrl+C or Ctrl+Break now; if we had not changed
# SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the # SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the
# program without the possibility for any Python-level cleanup). # program without the possibility for any Python-level cleanup).
print "Clean exit" print "Clean exit"
What's New in Python 2.2a4? What's New in Python 2.2a4?
Release date: 28-Sep-2001
=========================== ===========================
*Release date: 28-Sep-2001*
Type/class unification and new-style classes Type/class unification and new-style classes
--------------------------------------------
- pydoc and inspect are now aware of new-style classes; - pydoc and inspect are now aware of new-style classes;
e.g. help(list) at the interactive prompt now shows proper e.g. help(list) at the interactive prompt now shows proper
@ -1362,6 +1430,7 @@ Type/class unification and new-style classes
- Provisional support for pickling new-style objects has been added. - Provisional support for pickling new-style objects has been added.
Core Core
----
- file.writelines() now accepts any iterable object producing strings. - file.writelines() now accepts any iterable object producing strings.
@ -1381,6 +1450,7 @@ Core
to let other runnable threads be scheduled. to let other runnable threads be scheduled.
Library Library
-------
- StringIO.StringIO instances and cStringIO.StringIO instances support - StringIO.StringIO instances and cStringIO.StringIO instances support
read character buffer compatible objects for their .write() methods. read character buffer compatible objects for their .write() methods.
@ -1428,8 +1498,10 @@ Library
a sample driver.) a sample driver.)
Tools Tools
-----
Build Build
-----
- Large file support (LFS) is now automatic when the platform supports - Large file support (LFS) is now automatic when the platform supports
it; no more manual configuration tweaks are needed. On Linux, at it; no more manual configuration tweaks are needed. On Linux, at
@ -1450,16 +1522,19 @@ Build
using "make -s", thanks to a -q option to setup.py. using "make -s", thanks to a -q option to setup.py.
C API C API
-----
- The "structmember" API now supports some new flag bits to deny read - The "structmember" API now supports some new flag bits to deny read
and/or write access to attributes in restricted execution mode. and/or write access to attributes in restricted execution mode.
New platforms New platforms
-------------
- Compaq's iPAQ handheld, running the "familiar" Linux distribution - Compaq's iPAQ handheld, running the "familiar" Linux distribution
(http://familiar.handhelds.org). (http://familiar.handhelds.org).
Tests Tests
-----
- The "classic" standard tests, which work by comparing stdout to - The "classic" standard tests, which work by comparing stdout to
an expected-output file under Lib/test/output/, no longer stop at an expected-output file under Lib/test/output/, no longer stop at
@ -1476,6 +1551,7 @@ Tests
especially in regard to reporting errors. especially in regard to reporting errors.
Windows Windows
-------
- Large file support now also works for files > 4GB, on filesystems - Large file support now also works for files > 4GB, on filesystems
that support it (NTFS under Windows 2000). See "What's New in that support it (NTFS under Windows 2000). See "What's New in
@ -1483,10 +1559,12 @@ Windows
What's New in Python 2.2a3? What's New in Python 2.2a3?
Release Date: 07-Sep-2001
=========================== ===========================
*Release Date: 07-Sep-2001*
Core Core
----
- Conversion of long to float now raises OverflowError if the long is too - Conversion of long to float now raises OverflowError if the long is too
big to represent as a C double. big to represent as a C double.
@ -1528,14 +1606,13 @@ Core
all uses of classic division for int and long arguments; -Qwarnall all uses of classic division for int and long arguments; -Qwarnall
also warns about classic division for float and complex arguments also warns about classic division for float and complex arguments
(for use with fixdiv.py). (for use with fixdiv.py).
[Note: the remainder of this paragraph (preserved below) became [Note: the remainder of this item (preserved below) became
obsolete in 2.2c1 -- -Qnew has global effect in 2.2] obsolete in 2.2c1 -- -Qnew has global effect in 2.2] ::
<obsolete>
Using -Qnew is questionable; it turns on new division by default, but Using -Qnew is questionable; it turns on new division by default, but
only in the __main__ module. You can usefully combine -Qwarn or only in the __main__ module. You can usefully combine -Qwarn or
-Qwarnall and -Qnew: this gives the __main__ module new division, and -Qwarnall and -Qnew: this gives the __main__ module new division, and
warns about classic division everywhere else. warns about classic division everywhere else.
</obsolete>
- Many built-in types can now be subclassed. This applies to int, - Many built-in types can now be subclassed. This applies to int,
long, float, str, unicode, and tuple. (The types complex, list and long, float, str, unicode, and tuple. (The types complex, list and
@ -1571,6 +1648,7 @@ Core
exponent, such as 1e and 3.1e-. Such literals now raise SyntaxError. exponent, such as 1e and 3.1e-. Such literals now raise SyntaxError.
Library Library
-------
- telnetlib includes symbolic names for the options, and support for - telnetlib includes symbolic names for the options, and support for
setting an option negotiation callback. setting an option negotiation callback.
@ -1604,11 +1682,13 @@ Library
to objects that should be garbage collected between tests. to objects that should be garbage collected between tests.
Tools Tools
-----
- Tools/scripts/fixdiv.py has been added which can be used to fix - Tools/scripts/fixdiv.py has been added which can be used to fix
division operators as per PEP 238. division operators as per PEP 238.
Build Build
-----
- If you are an adventurous person using Mac OS X you may want to look at - If you are an adventurous person using Mac OS X you may want to look at
Mac/OSX. There is a Makefile there that will build Python as a real Mac Mac/OSX. There is a Makefile there that will build Python as a real Mac
@ -1616,17 +1696,18 @@ Build
Discussion of this on pythonmac-sig, please. Discussion of this on pythonmac-sig, please.
C API C API
-----
- New function PyObject_Dir(obj), like Python __builtin__.dir(obj). - New function PyObject_Dir(obj), like Python __builtin__.dir(obj).
- Note that PyLong_AsDouble can fail! This has always been true, but no - Note that PyLong_AsDouble can fail! This has always been true, but no
callers checked for it. It's more likely to fail now, because overflow callers checked for it. It's more likely to fail now, because overflow
errors are properly detected now. The proper way to check: errors are properly detected now. The proper way to check: ::
double x = PyLong_AsDouble(some_long_object); double x = PyLong_AsDouble(some_long_object);
if (x == -1.0 && PyErr_Occurred()) { if (x == -1.0 && PyErr_Occurred()) {
/* The conversion failed. */ /* The conversion failed. */
} }
- The GC API has been changed. Extensions that use the old API will still - The GC API has been changed. Extensions that use the old API will still
compile but will not participate in GC. To upgrade an extension compile but will not participate in GC. To upgrade an extension
@ -1650,6 +1731,7 @@ C API
by PyErr_Format()). by PyErr_Format()).
New platforms New platforms
-------------
- Stephen Hansen contributed patches sufficient to get a clean compile - Stephen Hansen contributed patches sufficient to get a clean compile
under Borland C (Windows), but he reports problems running it and ran under Borland C (Windows), but he reports problems running it and ran
@ -1658,8 +1740,10 @@ New platforms
causing later failures too. causing later failures too.
Tests Tests
-----
Windows Windows
-------
- Large file support is now enabled on Win32 platforms as well as on - Large file support is now enabled on Win32 platforms as well as on
Win64. This means that, for example, you can use f.tell() and f.seek() Win64. This means that, for example, you can use f.tell() and f.seek()
@ -1676,10 +1760,12 @@ Windows
What's New in Python 2.2a2? What's New in Python 2.2a2?
Release Date: 22-Aug-2001
=========================== ===========================
*Release Date: 22-Aug-2001*
Build Build
-----
- Tim Peters developed a brand new Windows installer using Wise 8.1, - Tim Peters developed a brand new Windows installer using Wise 8.1,
generously donated to us by Wise Solutions. generously donated to us by Wise Solutions.
@ -1695,15 +1781,17 @@ Build
- The NeXT platform is no longer supported. - The NeXT platform is no longer supported.
- The `new' module is now statically linked. - The 'new' module is now statically linked.
Tools Tools
-----
- The new Tools/scripts/cleanfuture.py can be used to automatically - The new Tools/scripts/cleanfuture.py can be used to automatically
edit out obsolete future statements from Python source code. See edit out obsolete future statements from Python source code. See
the module docstring for details. the module docstring for details.
Tests Tests
-----
- regrtest.py now knows which tests are expected to be skipped on some - regrtest.py now knows which tests are expected to be skipped on some
platforms, allowing to give clearer test result output. regrtest platforms, allowing to give clearer test result output. regrtest
@ -1714,6 +1802,7 @@ Tests
Nick Mathewson. Nick Mathewson.
Core Core
----
- The floor division operator // has been added as outlined in PEP - The floor division operator // has been added as outlined in PEP
238. The / operator still provides classic division (and will until 238. The / operator still provides classic division (and will until
@ -1753,6 +1842,7 @@ Core
older distribution. older distribution.
Library Library
-------
- New class Differ and new functions ndiff() and restore() in difflib.py. - New class Differ and new functions ndiff() and restore() in difflib.py.
These package the algorithms used by the popular Tools/scripts/ndiff.py, These package the algorithms used by the popular Tools/scripts/ndiff.py,
@ -1770,13 +1860,15 @@ Library
- Added Ka-Ping Yee's cgitb.py module. - Added Ka-Ping Yee's cgitb.py module.
- The `new' module now exposes the CO_xxx flags. - The 'new' module now exposes the CO_xxx flags.
- The gc module offers the get_referents function. - The gc module offers the get_referents function.
New platforms New platforms
-------------
C API C API
-----
- Two new APIs PyOS_snprintf() and PyOS_vsnprintf() were added - Two new APIs PyOS_snprintf() and PyOS_vsnprintf() were added
which provide a cross-platform implementations for the which provide a cross-platform implementations for the
@ -1799,16 +1891,19 @@ C API
deprecated. deprecated.
Windows Windows
-------
- "import module" now compiles module.pyw if it exists and nothing else - "import module" now compiles module.pyw if it exists and nothing else
relevant is found. relevant is found.
What's New in Python 2.2a1? What's New in Python 2.2a1?
Release date: 18-Jul-2001
=========================== ===========================
*Release date: 18-Jul-2001*
Core Core
----
- TENTATIVELY, a large amount of code implementing much of what's - TENTATIVELY, a large amount of code implementing much of what's
described in PEP 252 (Making Types Look More Like Classes) and PEP described in PEP 252 (Making Types Look More Like Classes) and PEP
@ -1854,14 +1949,21 @@ Core
New codecs were added to demonstrate these new features (the .encode() New codecs were added to demonstrate these new features (the .encode()
and .decode() columns indicate the type of the returned objects): and .decode() columns indicate the type of the returned objects):
Name | .encode() | .decode() | Description +---------+-----------+-----------+-----------------------------+
---------------------------------------------------------------------- |Name | .encode() | .decode() | Description |
uu | string | string | UU codec (e.g. for email) +=========+===========+===========+=============================+
base64 | string | string | base64 codec |uu | string | string | UU codec (e.g. for email) |
quopri | string | string | quoted-printable codec +---------+-----------+-----------+-----------------------------+
zlib | string | string | zlib compression |base64 | string | string | base64 codec |
hex | string | string | 2-byte hex codec +---------+-----------+-----------+-----------------------------+
rot-13 | string | Unicode | ROT-13 Unicode charmap codec |quopri | string | string | quoted-printable codec |
+---------+-----------+-----------+-----------------------------+
|zlib | string | string | zlib compression |
+---------+-----------+-----------+-----------------------------+
|hex | string | string | 2-byte hex codec |
+---------+-----------+-----------+-----------------------------+
|rot-13 | string | Unicode | ROT-13 Unicode charmap codec|
+---------+-----------+-----------+-----------------------------+
- Some operating systems now support the concept of a default Unicode - Some operating systems now support the concept of a default Unicode
encoding for file system operations. Notably, Windows supports 'mbcs' encoding for file system operations. Notably, Windows supports 'mbcs'
@ -1934,7 +2036,8 @@ Core
Iterating over a file generates its lines. Iterating over a file generates its lines.
- The following functions were generalized to work nicely with iterator - The following functions were generalized to work nicely with iterator
arguments: arguments: ::
map(), filter(), reduce(), zip() map(), filter(), reduce(), zip()
list(), tuple() (PySequence_Tuple() and PySequence_Fast() in C API) list(), tuple() (PySequence_Tuple() and PySequence_Fast() in C API)
max(), min() max(), min()
@ -1942,7 +2045,7 @@ Core
extend() method of lists extend() method of lists
'x in y' and 'x not in y' (PySequence_Contains() in C API) 'x in y' and 'x not in y' (PySequence_Contains() in C API)
operator.countOf() (PySequence_Count() in C API) operator.countOf() (PySequence_Count() in C API)
right-hand side of assignment statements with multiple targets, such as right-hand side of assignment statements with multiple targets, such as ::
x, y, z = some_iterable_object_returning_exactly_3_values x, y, z = some_iterable_object_returning_exactly_3_values
- Accessing module attributes is significantly faster (for example, - Accessing module attributes is significantly faster (for example,
@ -1966,6 +2069,7 @@ Core
Library Library
-------
- The constants ascii_letters, ascii_lowercase. and ascii_uppercase - The constants ascii_letters, ascii_lowercase. and ascii_uppercase
were added to the string module. These a locale-independent were added to the string module. These a locale-independent
@ -2013,6 +2117,7 @@ Library
'help(object)'. 'help(object)'.
Tests Tests
-----
- New test_mutants.py runs dict comparisons where the key and value - New test_mutants.py runs dict comparisons where the key and value
comparison operators mutate the dicts randomly during comparison. This comparison operators mutate the dicts randomly during comparison. This
@ -2024,6 +2129,11 @@ Tests
cases produce correct output. cases produce correct output.
C API C API
-----
- Removed the unused last_is_sticky argument from the internal - Removed the unused last_is_sticky argument from the internal
_PyTuple_Resize(). If this affects you, you were cheating. _PyTuple_Resize(). If this affects you, you were cheating.
----
**(For information about older versions, consult the HISTORY file.)**