Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a598c93

Browse files
committed
1.6 is history.
1 parent 1d105d1 commit a598c93

1 file changed

Lines changed: 305 additions & 1 deletion

File tree

Misc/HISTORY

Lines changed: 305 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Python history
1+
Python History
22
--------------
33

44
This file contains the release messages for previous Python releases.
@@ -8,6 +8,310 @@ As you read on you go back to the dark ages of Python's history.
88
======================================================================
99

1010

11+
What's new in release 1.6?
12+
==========================
13+
14+
Below is a list of all relevant changes since release 1.5.2.
15+
16+
17+
Source Incompatibilities
18+
------------------------
19+
20+
Several small incompatible library changes may trip you up:
21+
22+
- The append() method for lists can no longer be invoked with more
23+
than one argument. This used to append a single tuple made out of
24+
all arguments, but was undocumented. To append a tuple, use
25+
e.g. l.append((a, b, c)).
26+
27+
- The connect(), connect_ex() and bind() methods for sockets require
28+
exactly one argument. Previously, you could call s.connect(host,
29+
port), but this was undocumented. You must now write
30+
s.connect((host, port)).
31+
32+
- The str() and repr() functions are now different more often. For
33+
long integers, str() no longer appends a 'L'. Thus, str(1L) == '1',
34+
which used to be '1L'; repr(1L) is unchanged and still returns '1L'.
35+
For floats, repr() now gives 17 digits of precision, to ensure no
36+
precision is lost (on all current hardware).
37+
38+
- The -X option is gone. Built-in exceptions are now always
39+
classes. Many more library modules also have been converted to
40+
class-based exceptions.
41+
42+
43+
Binary Incompatibilities
44+
------------------------
45+
46+
- Third party extensions built for Python 1.5.x cannot be used with
47+
Python 1.6; these extensions will have to be rebuilt for Python 1.6.
48+
49+
- On Windows, attempting to import a third party extension built for
50+
Python 1.5.x results in an immediate crash; there's not much we can do
51+
about this. Check your PYTHONPATH environment variable!
52+
53+
54+
Overview of Changes since 1.5.2
55+
-------------------------------
56+
57+
For this overview, I have borrowed from the document "What's New in
58+
Python 2.0" by Andrew Kuchling and Moshe Zadka:
59+
http://starship.python.net/crew/amk/python/writing/new-python/.
60+
61+
There are lots of new modules and lots of bugs have been fixed. A
62+
list of all new modules is included below.
63+
64+
Probably the most pervasive change is the addition of Unicode support.
65+
We've added a new fundamental datatype, the Unicode string, a new
66+
build-in function unicode(), an numerous C APIs to deal with Unicode
67+
and encodings. See the file Misc/unicode.txt for details, or
68+
http://starship.python.net/crew/lemburg/unicode-proposal.txt.
69+
70+
Two other big changes, related to the Unicode support, are the
71+
addition of string methods and (yet another) new regular expression
72+
engine.
73+
74+
- String methods mean that you can now say s.lower() etc. instead of
75+
importing the string module and saying string.lower(s) etc. One
76+
peculiarity is that the equivalent of string.join(sequence,
77+
delimiter) is delimiter.join(sequence). Use " ".join(sequence) for
78+
the effect of string.join(sequence); to make this more readable, try
79+
space=" " first. Note that the maxsplit argument defaults in
80+
split() and replace() have changed from 0 to -1.
81+
82+
- The new regular expression engine, SRE by Fredrik Lundh, is fully
83+
backwards compatible with the old engine, and is in fact invoked
84+
using the same interface (the "re" module). You can explicitly
85+
invoke the old engine by import pre, or the SRE engine by importing
86+
sre. SRE is faster than pre, and supports Unicode (which was the
87+
main reason to put effort in yet another new regular expression
88+
engine -- this is at least the fourth!).
89+
90+
91+
Other Changes
92+
-------------
93+
94+
Other changes that won't break code but are nice to know about:
95+
96+
Deleting objects is now safe even for deeply nested data structures.
97+
98+
Long/int unifications: long integers can be used in seek() calls, as
99+
slice indexes.
100+
101+
String formatting (s % args) has a new formatting option, '%r', which
102+
acts like '%s' but inserts repr(arg) instead of str(arg). (Not yet in
103+
alpha 1.)
104+
105+
Greg Ward's "distutils" package is included: this will make
106+
installing, building and distributing third party packages much
107+
simpler.
108+
109+
There's now special syntax that you can use instead of the apply()
110+
function. f(*args, **kwds) is equivalent to apply(f, args, kwds).
111+
You can also use variations f(a1, a2, *args, **kwds) and you can leave
112+
one or the other out: f(*args), f(**kwds).
113+
114+
The built-ins int() and long() take an optional second argument to
115+
indicate the conversion base -- of course only if the first argument
116+
is a string. This makes string.atoi() and string.atol() obsolete.
117+
(string.atof() was already obsolete).
118+
119+
When a local variable is known to the compiler but undefined when
120+
used, a new exception UnboundLocalError is raised. This is a class
121+
derived from NameError so code catching NameError should still work.
122+
The purpose is to provide better diagnostics in the following example:
123+
x = 1
124+
def f():
125+
print x
126+
x = x+1
127+
This used to raise a NameError on the print statement, which confused
128+
even experienced Python programmers (especially if there are several
129+
hundreds of lines of code between the reference and the assignment to
130+
x :-).
131+
132+
You can now override the 'in' operator by defining a __contains__
133+
method. Note that it has its arguments backwards: x in a causes
134+
a.__contains__(x) to be called. That's why the name isn't __in__.
135+
136+
The exception AttributeError will have a more friendly error message,
137+
e.g.: <code>'Spam' instance has no attribute 'eggs'</code>. This may
138+
<b>break code</b> that expects the message to be exactly the attribute
139+
name.
140+
141+
142+
New Modules in 1.6
143+
------------------
144+
145+
UserString - base class for deriving from the string type.
146+
147+
distutils - tools for distributing Python modules.
148+
149+
robotparser - parse a robots.txt file, for writing web spiders.
150+
(Moved from Tools/webchecker/.)
151+
152+
linuxaudiodev - audio for Linux.
153+
154+
mmap - treat a file as a memory buffer. (Windows and Unix.)
155+
156+
sre - regular expressions (fast, supports unicode). Currently, this
157+
code is very rough. Eventually, the re module will be reimplemented
158+
using sre (without changes to the re API).
159+
160+
filecmp - supersedes the old cmp.py and dircmp.py modules.
161+
162+
tabnanny - check Python sources for tab-width dependance. (Moved from
163+
Tools/scripts/.)
164+
165+
urllib2 - new and improved but incompatible version of urllib (still
166+
experimental).
167+
168+
zipfile - read and write zip archives.
169+
170+
codecs - support for Unicode encoders/decoders.
171+
172+
unicodedata - provides access to the Unicode 3.0 database.
173+
174+
_winreg - Windows registry access.
175+
176+
encodings - package which provides a large set of standard codecs --
177+
currently only for the new Unicode support. It has a drop-in extension
178+
mechanism which allows you to add new codecs by simply copying them
179+
into the encodings package directory. Asian codec support will
180+
probably be made available as separate distribution package built upon
181+
this technique and the new distutils package.
182+
183+
184+
Changed Modules
185+
---------------
186+
187+
readline, ConfigParser, cgi, calendar, posix, readline, xmllib, aifc,
188+
chunk, wave, random, shelve, nntplib - minor enhancements.
189+
190+
socket, httplib, urllib - optional OpenSSL support (Unix only).
191+
192+
_tkinter - support for 8.0 up to 8.3. Support for versions older than
193+
8.0 has been dropped.
194+
195+
string - most of this module is deprecated now that strings have
196+
methods. This no longer uses the built-in strop module, but takes
197+
advantage of the new string methods to provide transparent support for
198+
both Unicode and ordinary strings.
199+
200+
201+
Changes on Windows
202+
------------------
203+
204+
The installer no longer runs a separate Tcl/Tk installer; instead, it
205+
installs the needed Tcl/Tk files directly in the Python directory. If
206+
you already have a Tcl/Tk installation, this wastes some disk space
207+
(about 4 Megs) but avoids problems with conflincting Tcl/Tk
208+
installations, and makes it much easier for Python to ensure that
209+
Tcl/Tk can find all its files. Note: the alpha installers don't
210+
include the documentation.
211+
212+
The Windows installer now installs by default in \Python16\ on the
213+
default volume, instead of \Program Files\Python-1.6\.
214+
215+
216+
Changed Tools
217+
-------------
218+
219+
IDLE - complete overhaul. See the <a href="../idle/">IDLE home
220+
page</a> for more information. (Python 1.6 alpha 1 will come with
221+
IDLE 0.6.)
222+
223+
Tools/i18n/pygettext.py - Python equivalent of xgettext(1). A message
224+
text extraction tool used for internationalizing applications written
225+
in Python.
226+
227+
228+
Obsolete Modules
229+
----------------
230+
231+
stdwin and everything that uses it. (Get Python 1.5.2 if you need
232+
it. :-)
233+
234+
soundex. (Skip Montanaro has a version in Python but it won't be
235+
included in the Python release.)
236+
237+
cmp, cmpcache, dircmp. (Replaced by filecmp.)
238+
239+
dump. (Use pickle.)
240+
241+
find. (Easily coded using os.walk().)
242+
243+
grep. (Not very useful as a library module.)
244+
245+
packmail. (No longer has any use.)
246+
247+
poly, zmod. (These were poor examples at best.)
248+
249+
strop. (No longer needed by the string module.)
250+
251+
util. (This functionality was long ago built in elsewhere).
252+
253+
whatsound. (Use sndhdr.)
254+
255+
256+
Detailed Changes from 1.6b1 to 1.6
257+
----------------------------------
258+
259+
- Slight changes to the CNRI license. A copyright notice has been
260+
added; the requirement to indicate the nature of modifications now
261+
applies when making a derivative work available "to others" instead of
262+
just "to the public"; the version and date are updated. The new
263+
license has a new handle.
264+
265+
- Added the Tools/compiler package. This is a project led by Jeremy
266+
Hylton to write the Python bytecode generator in Python.
267+
268+
- The function math.rint() is removed.
269+
270+
- In Python.h, "#define _GNU_SOURCE 1" was added.
271+
272+
- Version 0.9.1 of Greg Ward's distutils is included (instead of
273+
version 0.9).
274+
275+
- A new version of SRE is included. It is more stable, and more
276+
compatible with the old RE module. Non-matching ranges are indicated
277+
by -1, not None. (The documentation said None, but the PRE
278+
implementation used -1; changing to None would break existing code.)
279+
280+
- The winreg module has been renamed to _winreg. (There are plans for
281+
a higher-level API called winreg, but this has not yet materialized in
282+
a form that is acceptable to the experts.)
283+
284+
- The _locale module is enabled by default.
285+
286+
- Fixed the configuration line for the _curses module.
287+
288+
- A few crashes have been fixed, notably <file>.writelines() with a
289+
list containing non-string objects would crash, and there were
290+
situations where a lost SyntaxError could dump core.
291+
292+
- The <list>.extend() method now accepts an arbitrary sequence
293+
argument.
294+
295+
- If __str__() or __repr__() returns a Unicode object, this is
296+
converted to an 8-bit string.
297+
298+
- Unicode string comparisons is no longer aware of UTF-16
299+
encoding peculiarities; it's a straight 16-bit compare.
300+
301+
- The Windows installer now installs the LICENSE file and no longer
302+
registers the Python DLL version in the registry (this is no longer
303+
needed). It now uses Tcl/Tk 8.3.2.
304+
305+
- A few portability problems have been fixed, in particular a
306+
compilation error involving socklen_t.
307+
308+
- The PC configuration is slightly friendlier to non-Microsoft
309+
compilers.
310+
311+
312+
======================================================================
313+
314+
11315
From 1.5.2c1 to 1.5.2 (final)
12316
=============================
13317

0 commit comments

Comments
 (0)