blob: fc4489c2bc880d706a67726b130e126759b78d9b [file] [log] [blame]
Guido van Rossumf0b69f01997-08-15 02:50:47 +00001What's new in this release?
Guido van Rossum61000331997-08-15 04:39:58 +00002===========================
3
Guido van Rossume96bd3f1998-12-21 21:45:04 +00004Below is a list of all relevant changes since release 1.5.1. Older
5changes are in the file HISTORY. The most recent changes are listed
6first.
Guido van Rossum61000331997-08-15 04:39:58 +00007
Guido van Rossum1f83cce1997-10-06 21:04:35 +00008A note on attributions: while I have sprinkled some names throughout
Guido van Rossum7ea639b1997-11-26 16:36:28 +00009here, I'm grateful to many more people who remain unnamed. You may
Guido van Rossum1f83cce1997-10-06 21:04:35 +000010find your name in the ACKS file. If you believe you deserve more
11credit, let me know and I'll add you to the list!
12
Guido van Rossum437cfe81999-04-08 20:17:57 +000013(In the sake of steramlining the release process, I'm now using output
14from rcs2log. This gives complete disclosure but is more verbose and
15requires more effort to read. Let me know if this is acceptable.
16--Guido.)
17
18
19======================================================================
20
21From 1.5.2b2 to 1.5.2c1
22=======================
23
24Thu Apr 8 17:23:11 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25
26 * Lib/test/test_strftime.py:
27 On Windows, we suddenly find, strftime() may return "" for an
28 unsupported format string. (I guess this is because the logic for
29 deciding whether to reallocate the buffer or not has been improved.)
30 This caused the test code to crash on result[0]. Fix this by assuming
31 an empty result also means the format is not supported.
32
33 * Demo/tkinter/matt/window-creation-w-location.py:
34 This demo imported some private code from Matt. Make it cripple along.
35
36 * Lib/lib-tk/Tkinter.py:
37 Delete an accidentally checked-in feature that actually broke more
38 than was worth it: when deleting a canvas item, it would try to
39 automatically delete the bindings for that item. Since there's
40 nothing that says you can't reuse the tag and still have the bindings,
41 this is not correct. Also, it broke at least one demo
42 (Demo/tkinter/matt/rubber-band-box-demo-1.py).
43
44 * Python/thread_wince.h: Win/CE thread support by Mark Hammond.
45
46Wed Apr 7 20:23:17 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
47
48 * Modules/zlibmodule.c:
49 Patch by Andrew Kuchling to unflush() (flush() for deflating).
50 Without this, if inflate() returned Z_BUF_ERROR asking for more output
51 space, we would report the error; now, we increase the buffer size and
52 try again, just as for Z_OK.
53
54 * Lib/test/test_gzip.py: Use binary mode for all gzip files we open.
55
56 * Tools/idle/ChangeLog: New change log.
57
58 * Tools/idle/README.txt, Tools/idle/NEWS.txt: New version.
59
60 * Python/pythonrun.c:
61 Alas, get rid of the Win specific hack to ask the user to press Return
62 before exiting when an error happened. This didn't work right when
63 Python is invoked from a daemon.
64
65 * Tools/idle/idlever.py: Version bump awaiting impending new release.
66 (Not much has changed :-( )
67
68 * Lib/lib-tk/Tkinter.py:
69 lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,
70 so the preferred name for them is tag_lower, tag_raise
71 (similar to tag_bind, and similar to the Text widget);
72 unfortunately can't delete the old ones yet (maybe in 1.6)
73
74 * Python/thread.c, Python/strtod.c, Python/mystrtoul.c, Python/import.c, Python/ceval.c:
75 Changes by Mark Hammond for Windows CE. Mostly of the form
76 #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
77
78 * Python/bltinmodule.c:
79 Remove unused variable from complex_from_string() code.
80
81 * Include/patchlevel.h:
82 Add the possibility of a gamma release (release candidate).
83 Add '+' to string version number to indicate we're beyond b2 now.
84
85 * Modules/posixmodule.c: Add extern decl for fsync() for SunOS 4.x.
86
87 * Lib/smtplib.py: Changes by Per Cederquist and The Dragon.
88
89 Per writes:
90
91 """
92 The application where Signum Support uses smtplib needs to be able to
93 report good error messages to the user when sending email fails. To
94 help in diagnosing problems it is useful to be able to report the
95 entire message sent by the server, not only the SMTP error code of the
96 offending command.
97
98 A lot of the functions in sendmail.py unfortunately discards the
99 message, leaving only the code. The enclosed patch fixes that
100 problem.
101
102 The enclosed patch also introduces a base class for exceptions that
103 include an SMTP error code and error message, and make the code and
104 message available on separate attributes, so that surrounding code can
105 deal with them in whatever way it sees fit. I've also added some
106 documentation to the exception classes.
107
108 The constructor will now raise an exception if it cannot connect to
109 the SMTP server.
110
111 The data() method will raise an SMTPDataError if it doesn't receive
112 the expected 354 code in the middle of the exchange.
113
114 According to section 5.2.10 of RFC 1123 a smtp client must accept "any
115 text, including no text at all" after the error code. If the response
116 of a HELO command contains no text self.helo_resp will be set to the
117 empty string (""). The patch fixes the test in the sendmail() method
118 so that helo_resp is tested against None; if it has the empty string
119 as value the sendmail() method would invoke the helo() method again.
120
121 The code no longer accepts a -1 reply from the ehlo() method in
122 sendmail().
123
124 [Text about removing SMTPRecipientsRefused deleted --GvR]
125 """
126
127 and also:
128
129 """
130 smtplib.py appends an extra blank line to the outgoing mail if the
131 `msg' argument to the sendmail method already contains a trailing
132 newline. This patch should fix the problem.
133 """
134
135 The Dragon writes:
136
137 """
138 Mostly I just re-added the SMTPRecipientsRefused exception
139 (the exeption object now has the appropriate info in it ) [Per had
140 removed this in his patch --GvR] and tweaked the behavior of the
141 sendmail method whence it throws the newly added SMTPHeloException (it
142 was closing the connection, which it shouldn't. whatever catches the
143 exception should do that. )
144
145 I pondered the change of the return values to tuples all around,
146 and after some thinking I decided that regularizing the return values was
147 too much of the Right Thing (tm) to not do.
148
149 My one concern is that code expecting an integer & getting a tuple
150 may fail silently.
151
152 (i.e. if it's doing :
153
154 x.somemethod() >= 400:
155 expecting an integer, the expression will always be true if it gets a
156 tuple instead. )
157
158 However, most smtplib code I've seen only really uses the
159 sendmail() method, so this wouldn't bother it. Usually code I've seen
160 that calls the other methods usually only calls helo() and ehlo() for
161 doing ESMTP, a feature which was not in the smtplib included with 1.5.1,
162 and thus I would think not much code uses it yet.
163 """
164
165Tue Apr 6 19:38:18 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
166
167 * Lib/test/test_ntpath.py:
168 Fix the tests now that splitdrive() no longer treats UNC paths special.
169 (Some tests converted to splitunc() tests.)
170
171 * Lib/ntpath.py:
172 Withdraw the UNC support from splitdrive(). Instead, a new function
173 splitunc() parses UNC paths. The contributor of the UNC parsing in
174 splitdrive() doesn't like it, but I haven't heard a good reason to
175 keep it, and it causes some problems. (I think there's a
176 philosophical problem -- to me, the split*() functions are purely
177 syntactical, and the fact that \\foo is not a valid path doesn't mean
178 that it shouldn't be considered an absolute path.)
179
180 Also (quite separately, but strangely related to the philosophical
181 issue above) fix abspath() so that if win32api exists, it doesn't fail
182 when the path doesn't actually exist -- if GetFullPathName() fails,
183 fall back on the old strategy (join with getcwd() if neccessary, and
184 then use normpath()).
185
186 * configure.in, configure, config.h.in, acconfig.h:
187 For BeOS PowerPC. Chris Herborth.
188
189Mon Apr 5 21:54:14 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
190
191 * Modules/timemodule.c:
192 Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
193 #else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
194
195 * Misc/ACKS:
196 Bunch of new contributors, including 9 who contributed to the Docs,
197 reported by Fred.
198
199Mon Apr 5 18:37:59 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
200
201 * Lib/gzip.py:
202 Oops, missed mode parameter to open().
203
204 * Lib/gzip.py:
205 Made the default mode 'rb' instead of 'r', for better cross-platform
206 support. (Based on comment on the documentation by Bernhard Reiter
207 <bernhard@csd.uwm.edu>).
208
209Fri Apr 2 22:18:25 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
210
211 * Tools/scripts/dutree.py:
212 For reasons I dare not explain, this script should always execute
213 main() when imported (in other words, it is not usable as a module).
214
215Thu Apr 1 15:32:30 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
216
217 * Lib/test/test_cpickle.py: Jonathan Giddy write:
218
219 In test_cpickle.py, the module os got imported, but the line to remove
220 the temp file has gone missing.
221
222Tue Mar 30 20:17:31 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
223
224 * Lib/BaseHTTPServer.py: Per Cederqvist writes:
225
226 If you send something like "PUT / HTTP/1.0" to something derived from
227 BaseHTTPServer that doesn't define do_PUT, you will get a response
228 that begins like this:
229
230 HTTP/1.0 501 Unsupported method ('do_PUT')
231 Server: SimpleHTTP/0.3 Python/1.5
232 Date: Tue, 30 Mar 1999 18:53:53 GMT
233
234 The server should complain about 'PUT' instead of 'do_PUT'. This
235 patch should fix the problem.
236
237Mon Mar 29 20:33:21 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
238
239 * Lib/smtplib.py: Patch by Per Cederqvist, who writes:
240
241 """
242 - It needlessly used the makefile() method for each response that is
243 read from the SMTP server.
244
245 - If the remote SMTP server closes the connection unexpectedly the
246 code raised an IndexError. It now raises an SMTPServerDisconnected
247 exception instead.
248
249 - The code now checks that all lines in a multiline response actually
250 contains an error code.
251 """
252
253 The Dragon approves.
254
255Mon Mar 29 20:25:40 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
256
257 * Lib/compileall.py:
258 When run as a script, report failures in the exit code as well.
259 Patch largely based on changes by Andrew Dalke, as discussed in the
260 distutils-sig.
261
262Mon Mar 29 20:23:41 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
263
264 * Lib/urllib.py:
265 Hack so that if a 302 or 301 redirect contains a relative URL, the
266 right thing "just happens" (basejoin() with old URL).
267
268 * Modules/cPickle.c:
269 Protection against picling to/from closed (real) file.
270 The problem was reported by Moshe Zadka.
271
272 * Lib/test/test_cpickle.py:
273 Test protection against picling to/from closed (real) file.
274
275 * Modules/timemodule.c: Chris Lawrence writes:
276
277 """
278 The GNU folks, in their infinite wisdom, have decided not to implement
279 altzone in libc6; this would not be horrible, except that timezone
280 (which is implemented) includes the current DST setting (i.e. timezone
281 for Central is 18000 in summer and 21600 in winter). So Python's
282 timezone and altzone variables aren't set correctly during DST.
283
284 Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
285 show the "right" thing on Linux (by using the tm_gmtoff stuff
286 available in BSD, which is how the GLIBC manual claims things should
287 be done) and (b) should cope with the southern hemisphere. In pursuit
288 of (b), I also took the liberty of renaming the "summer" and "winter"
289 variables to "july" and "jan". This patch should also make certain
290 time calculations on Linux actually work right (like the tz-aware
291 functions in the rfc822 module).
292
293 (It's hard to find DST that's currently being used in the southern
294 hemisphere; I tested using Africa/Windhoek.)
295 """
296
297 * Lib/test/output/test_gzip:
298 Jonathan Giddy discovered this file was missing.
299
300 * Modules/shamodule.c:
301 Avoid warnings from AIX compiler. Reported by Vladimir (AIX is my
302 middlename) Marangozov, patch coded by Greg Stein.
303
304 * Tools/idle/ScriptBinding.py, Tools/idle/PyShell.py:
305 At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.
306
307Sun Mar 28 17:55:32 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
308
309 * Tools/scripts/ndiff.py: Tim Peters writes:
310
311 I should have waited overnight <wink/sigh>. Nothing wrong with the one I
312 sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options
313 for recreating the original files from ndiff's output. That's attached, if
314 you're game! Us Windows guys don't usually have a sed sitting around
315 <wink>.
316
317Sat Mar 27 13:34:01 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
318
319 * Tools/scripts/ndiff.py: Tim Peters writes:
320
321 Attached is a cleaned-up version of ndiff (added useful module
322 docstring, now echo'ed in case of cmd line mistake); added -q option
323 to suppress initial file identification lines; + other minor cleanups,
324 & a slightly faster match engine.
325
326Fri Mar 26 22:36:00 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
327
328 * Tools/scripts/dutree.py:
329 During display, if EPIPE is raised, it's probably because a pager was
330 killed. Discard the error in that case, but propogate it otherwise.
331
332Fri Mar 26 16:20:45 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
333
334 * Lib/test/output/test_userlist, Lib/test/test_userlist.py:
335 Test suite for UserList.
336
337 * Lib/UserList.py: Use isinstance() where appropriate.
338 Reformatted with 4-space indent.
339
340Fri Mar 26 16:11:40 1999 Barry Warsaw <bwarsaw@eric.cnri.reston.va.us>
341
342 * Tools/pynche/PyncheWidget.py:
343 Helpwin.__init__(): The text widget should get focus.
344
345 * Tools/pynche/pyColorChooser.py:
346 Removed unnecessary import `from PyncheWidget import PyncheWidget'
347
348Fri Mar 26 15:32:05 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
349
350 * Lib/test/output/test_userdict, Lib/test/test_userdict.py:
351 Test suite for UserDict
352
353 * Lib/UserDict.py: Improved a bunch of things.
354 The constructor now takes an optional dictionary.
355 Use isinstance() where appropriate.
356
357Thu Mar 25 22:38:49 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
358
359 * Lib/test/output/test_pickle, Lib/test/output/test_cpickle, Lib/test/test_pickle.py, Lib/test/test_cpickle.py:
360 Basic regr tests for pickle/cPickle
361
362 * Lib/pickle.py:
363 Don't use "exec" in find_class(). It's slow, unnecessary, and (as AMK
364 points out) it doesn't work in JPython Applets.
365
366Thu Mar 25 21:50:27 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
367
368 * Lib/test/test_gzip.py:
369 Added a simple test suite for gzip. It simply opens a temp file,
370 writes a chunk of compressed data, closes it, writes another chunk, and
371 reads the contents back to verify that they are the same.
372
373 * Lib/gzip.py:
374 Based on a suggestion from bruce@hams.com, make a trivial change to
375 allow using the 'a' flag as a mode for opening a GzipFile. gzip
376 files, surprisingly enough, can be concatenated and then decompressed;
377 the effect is to concatenate the two chunks of data.
378
379 If we support it on writing, it should also be supported on reading.
380 This *wasn't* trivial, and required rearranging the code in the
381 reading path, particularly the _read() method.
382
383 Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file'
384 and 'Unknown compression method'
385
386Thu Mar 25 21:25:01 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
387
388 * Lib/test/test_b1.py:
389 Add tests for float() and complex() with string args (Nick/Stephanie
390 Lockwood).
391
392Thu Mar 25 21:21:08 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
393
394 * Modules/zlibmodule.c:
395 Add an .unused_data attribute to decompressor objects. If .unused_data
396 is not an empty string, this means that you have arrived at the
397 end of the stream of compressed data, and the contents of .unused_data are
398 whatever follows the compressed stream.
399
400Thu Mar 25 21:16:07 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
401
402 * Python/bltinmodule.c:
403 Patch by Nick and Stephanie Lockwood to implement complex() with a string
404 argument. This closes TODO item 2.19.
405
406Wed Mar 24 19:09:00 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
407
408 * Tools/webchecker/wcnew.py: Added Samuel Bayer's new webchecker.
409 Unfortunately his code breaks wcgui.py in a way that's not easy
410 to fix. I expect that this is a temporary situation --
411 eventually Sam's changes will be merged back in.
412 (The changes add a -t option to specify exceptions to the -x
413 option, and explicit checking for #foo style fragment ids.)
414
415 * Objects/dictobject.c:
416 Vladimir Marangozov contributed updated comments.
417
418 * Objects/bufferobject.c: Folded long lines.
419
420 * Lib/test/output/test_sha, Lib/test/test_sha.py:
421 Added Jeremy's test code for the sha module.
422
423 * Modules/shamodule.c, Modules/Setup.in:
424 Added Greg Stein and Andrew Kuchling's sha module.
425 Fix comments about zlib version and URL.
426
427 * Lib/test/test_bsddb.py: Remove the temp file when we're done.
428
429 * Include/pythread.h: Conform to standard boilerplate.
430
431 * configure.in, configure, BeOS/linkmodule, BeOS/ar-fake:
432 Chris Herborth: the new compiler in R4.1 needs some new options to work...
433
434 * Modules/socketmodule.c:
435 Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the
436 data struct before calling gethostby{name,addr}_r(); (2) ignore the
437 3/5/6 args determinations made by the configure script and switch on
438 platform identifiers instead:
439
440 AIX, OSF have 3 args
441 Sun, SGI have 5 args
442 Linux has 6 args
443
444 On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
445
446 * Modules/socketmodule.c:
447 Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code.
448
449 * Lib/mailbox.py:
450 Add readlines() to _Subfile class. Not clear who would need it, but
451 Chris Lawrence sent me a broken version; this one is a tad simpler and
452 more conforming to the standard.
453
454Tue Mar 23 23:05:34 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
455
456 * Lib/gzip.py: use struct instead of bit-manipulate in Python
457
458Tue Mar 23 19:00:55 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
459
460 * Modules/Makefile.pre.in:
461 Add $(EXE) to various occurrences of python so it will work on Cygwin
462 with egcs (after setting EXE=.exe). Patch by Norman Vine.
463
464 * configure, configure.in:
465 Ack! It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
466
467Mon Mar 22 22:25:39 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
468
469 * Include/thread.h:
470 Adding thread.h -- unused but for b/w compatibility.
471 As requested by Bill Janssen.
472
473 * configure.in, configure:
474 Add code to test for all sorts of gethostbyname_r variants,
475 donated by David Arnold.
476
477 * config.h.in, acconfig.h:
478 Add symbols for gethostbyname_r variants (sigh).
479
480 * Modules/socketmodule.c: Clean up pass for the previous patches.
481
482 - Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
483 glibc2.
484
485 - If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
486 don't know what code should be used.
487
488 - New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
489
490 - Modify the gethostbyaddr() code to also hold on to the lock until
491 after it is safe to release, overlapping with the Python lock.
492
493 (Note: I think that it could in theory be possible that Python code
494 executed while gethostbyname_lock is held could attempt to reacquire
495 the lock -- e.g. in a signal handler or destructor. I will simply say
496 "don't do that then.")
497
498 * Modules/socketmodule.c: Jonathan Giddy writes:
499
500 Here's a patch to fix the race condition, which wasn't fixed by Rob's
501 patch. It holds the gethostbyname lock until the results are copied out,
502 which means that this lock and the Python global lock are held at the same
503 time. This shouldn't be a problem as long as the gethostbyname lock is
504 always acquired when the global lock is not held.
505
506Mon Mar 22 19:25:30 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
507
508 * Modules/zlibmodule.c:
509 Fixed the flush() method of compression objects; the test for
510 the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
511 Logic cleaned up and commented.
512
513 * Lib/test/test_zlib.py:
514 Added simple test for the flush() method of compression objects, trying the
515 different flush values Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH.
516
517Mon Mar 22 15:28:08 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
518
519 * Lib/shlex.py:
520 Bug reported by Tobias Thelen: missing "self." in assignment target.
521
522Fri Mar 19 21:50:11 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
523
524 * Modules/arraymodule.c:
525 Use an unsigned cast to avoid a warning in VC++.
526
527 * Lib/dospath.py, Lib/ntpath.py:
528 New code for split() by Tim Peters, behaves more like posixpath.split().
529
530 * Objects/floatobject.c:
531 Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if
532 a block cannot be freed, add its free items back to the free list.
533 This is necessary to avoid leaking when Python is reinitialized later.
534
535 * Objects/intobject.c:
536 Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if
537 a block cannot be freed, add its free items back to the free list, and
538 add its valid ints back to the small_ints array if they are in range.
539 This is necessary to avoid leaking when Python is reinitialized later.
540
541 * Lib/types.py:
542 Added BufferType, the type returned by the new builtin buffer(). Greg Stein.
543
544 * Python/bltinmodule.c:
545 New builtin buffer() creates a derived read-only buffer from any
546 object that supports the buffer interface (e.g. strings, arrays).
547
548 * Objects/bufferobject.c:
549 Added check for negative offset for PyBuffer_FromObject and check for
550 negative size for PyBuffer_FromMemory. Greg Stein.
551
552Thu Mar 18 15:10:44 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
553
554 * Lib/urlparse.py: Sjoerd Mullender writes:
555
556 If a filename on Windows starts with \\, it is converted to a URL
557 which starts with ////. If this URL is passed to urlparse.urlparse
558 you get a path that starts with // (and an empty netloc). If you pass
559 the result back to urlparse.urlunparse, you get a URL that starts with
560 //, which is parsed differently by urlparse.urlparse. The fix is to
561 add the (empty) netloc with accompanying slashes if the path in
562 urlunparse starts with //. Do this for all schemes that use a netloc.
563
564 * Lib/nturl2path.py: Sjoerd Mullender writes:
565
566 Pathnames of files on other hosts in the same domain
567 (\\host\path\to\file) are not translated correctly to URLs and back.
568 The URL should be something like file:////host/path/to/file.
569 Note that a combination of drive letter and remote host is not
570 possible.
571
572Wed Mar 17 22:30:10 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
573
574 * Lib/urlparse.py:
575 Delete non-standard-conforming code in urljoin() that would use the
576 netloc from the base url as the default netloc for the resulting url
577 even if the schemes differ.
578
579 Once upon a time, when the web was wild, this was a valuable hack
580 because some people had a URL referencing an ftp server colocated with
581 an http server without having the host in the ftp URL (so they could
582 replicate it or change the hostname easily).
583
584 More recently, after the file: scheme got added back to the list of
585 schemes that accept a netloc, it turns out that this caused weirdness
586 when joining an http: URL with a file: URL -- the resulting file: URL
587 would always inherit the host from the http: URL because the file:
588 scheme supports a netloc but in practice never has one.
589
590 There are two reasons to get rid of the old, once-valuable hack,
591 instead of removing the file: scheme from the uses_netloc list. One,
592 the RFC says that file: uses the netloc syntax, and does not endorse
593 the old hack. Two, neither netscape 4.5 nor IE 4.0 support the old
594 hack.
595
596 * Include/ceval.h, Include/abstract.h:
597 Add DLL level b/w compat for PySequence_In and PyEval_CallObject
598
599Tue Mar 16 21:54:50 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
600
601 * Lib/lib-tk/Tkinter.py: Bug reported by Jim Robinson:
602
603 An attempt to execute grid_slaves with arguments (0,0) results in
604 *all* of the slaves being returned, not just the slave associated with
605 row 0, column 0. This is because the test for arguments in the method
606 does not test to see if row (and column) does not equal None, but
607 rather just whether is evaluates to non-false. A value of 0 fails
608 this test.
609
610Tue Mar 16 14:17:48 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
611
612 * Modules/cmathmodule.c:
613 Docstring fix: acosh() returns the hyperbolic arccosine, not the
614 hyperbolic cosine. Problem report via David Ascher by one of his
615 students.
616
617Mon Mar 15 21:40:59 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
618
619 * configure.in:
620 Should test for gethost*by*name_r, not for gethostname_r (which
621 doesn't exist and doesn't make sense).
622
623 * Modules/socketmodule.c:
624 Patch by Rob Riggs for Linux -- glibc2 has a different argument
625 converntion for gethostbyname_r() etc. than Solaris!
626
627 * Python/thread_pthread.h: Rob Riggs wrote:
628
629 """
630 Spec says that on success pthread_create returns 0. It does not say
631 that an error code will be < 0. Linux glibc2 pthread_create() returns
632 ENOMEM (12) when one exceed process limits. (It looks like it should
633 return EAGAIN, but that's another story.)
634
635 For reference, see:
636 http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html
637 """
638
639 [I have a feeling that similar bugs were fixed before; perhaps someone
640 could check that all error checks no check for != 0?]
641
642 * Tools/bgen/bgen/bgenObjectDefinition.py:
643 New mixin class that defines cmp and hash that use
644 the ob_itself pointer. This allows (when using the mixin)
645 different Python objects pointing to the same C object and
646 behaving well as dictionary keys.
647
648 Or so sez Jack Jansen...
649
650 * Lib/urllib.py: Yet another patch by Sjoerd Mullender:
651
652 Don't convert URLs to URLs using pathname2url.
653
654Fri Mar 12 22:15:43 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
655
656 * Lib/cmd.py: Patch by Michael Scharf. He writes:
657
658 The module cmd requires for each do_xxx command a help_xxx
659 function. I think this is a little old fashioned.
660
661 Here is a patch: use the docstring as help if no help_xxx
662 function can be found.
663
664 [I'm tempted to rip out all the help_* functions from pdb, but I'll
665 resist it. Any takers? --Guido]
666
667 * Tools/freeze/freeze.py: Bug submitted by Wayne Knowles, who writes:
668
669 Under Windows, python freeze.py -o hello hello.py
670 creates all the correct files in the hello subdirectory, but the
671 Makefile has the directory prefix in it for frozen_extensions.c
672 nmake fails because it tries to locate hello/frozen_extensions.c
673
674 (His fix adds a call to os.path.basename() in the appropriate place.)
675
676 * Objects/floatobject.c, Objects/intobject.c:
677 Vladimir has restructured his code somewhat so that the blocks are now
678 represented by an explicit structure. (There are still too many casts
679 in the code, but that may be unavoidable.)
680
681 Also added code so that with -vv it is very chatty about what it does.
682
683 * Demo/zlib/zlibdemo.py, Demo/zlib/minigzip.py:
684 Change #! line to modern usage; also chmod +x
685
686 * Demo/pdist/rrcs, Demo/pdist/rcvs, Demo/pdist/rcsbump:
687 Change #! line to modern usage
688
689 * Lib/nturl2path.py, Lib/urllib.py: From: Sjoerd Mullender
690
691 The filename to URL conversion didn't properly quote special
692 characters.
693 The URL to filename didn't properly unquote special chatacters.
694
695 * Objects/floatobject.c:
696 OK, try again. Vladimir gave me a fix for the alignment bus error,
697 so here's his patch again. This time it works (at least on Solaris,
698 Linux and Irix).
699
700Thu Mar 11 23:21:23 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
701
702 * Tools/idle/PathBrowser.py:
703 Don't crash when sys.path contains an empty string.
704
705 * Tools/idle/PathBrowser.py:
706 - Don't crash in the case where a superclass is a string instead of a
707 pyclbr.Class object; this can happen when the superclass is
708 unrecognizable (to pyclbr), e.g. when module renaming is used.
709
710 - Show a watch cursor when calling pyclbr (since it may take a while
711 recursively parsing imported modules!).
712
713Thu Mar 11 16:04:04 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
714
715 * Lib/mimetypes.py:
716 Added .rdf and .xsl as application/xml types. (.rdf is for the
717 Resource Description Framework, a metadata encoding, and .xsl is for
718 the Extensible Stylesheet Language.)
719
720Thu Mar 11 13:26:23 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
721
722 * Lib/test/output/test_popen2, Lib/test/test_popen2.py:
723 Test for popen2 module, by Chris Tismer.
724
725 * Objects/floatobject.c:
726 Alas, Vladimir's patch caused a bus error (probably double
727 alignment?), and I didn't test it. Withdrawing it for now.
728
729Wed Mar 10 22:55:47 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
730
731 * Objects/floatobject.c:
732 Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
733 floats on finalization.
734
735 * Objects/intobject.c:
736 Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
737 integers on finalization.
738
739 * Tools/idle/EditorWindow.py, Tools/idle/Bindings.py:
740 Add PathBrowser to File module
741
742 * Tools/idle/PathBrowser.py:
743 "Path browser" - 4 scrolled lists displaying:
744 directories on sys.path
745 modules in selected directory
746 classes in selected module
747 methods of selected class
748
749 Sinlge clicking in a directory, module or class item updates the next
750 column with info about the selected item. Double clicking in a
751 module, class or method item opens the file (and selects the clicked
752 item if it is a class or method).
753
754 I guess eventually I should be using a tree widget for this, but the
755 ones I've seen don't work well enough, so for now I use the old
756 Smalltalk or NeXT style multi-column hierarchical browser.
757
758 * Tools/idle/MultiScrolledLists.py:
759 New utility: multiple scrolled lists in parallel
760
761 * Tools/idle/ScrolledList.py: - White background.
762 - Display "(None)" (or text of your choosing) when empty.
763 - Don't set the focus.
764
765Tue Mar 9 19:31:21 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
766
767 * Lib/urllib.py:
768 open_http also had the 'data is None' test backwards. don't call with the
769 extra argument if data is None.
770
771 * Demo/embed/demo.c:
772 Call Py_SetProgramName() instead of redefining getprogramname(),
773 reflecting changes in the runtime around 1.5 or earlier.
774
775 * Python/ceval.c:
776 Always test for an error return (usually NULL or -1) without setting
777 an exception.
778
779 * Modules/timemodule.c: Patch by Chris Herborth for BeOS code.
780 He writes:
781
782 I had an off-by-1000 error in floatsleep(),
783 and the problem with time.clock() is that it's not implemented properly
784 on QNX... ANSI says it's supposed to return _CPU_ time used by the
785 process, but on QNX it returns the amount of real time used... so I was
786 confused.
787
788 * Tools/bgen/bgen/macsupport.py: Small change by Jack Jansen.
789 Test for self.returntype behaving like OSErr rather than being it.
790
791Thu Feb 25 16:14:58 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
792
793 * Lib/urllib.py:
794 http_error had the 'data is None' test backwards. don't call with the
795 extra argument if data is None.
796
797 * Lib/urllib.py: change indentation from 8 spaces to 4 spaces
798
799 * Lib/urllib.py: pleasing the tabnanny
800
801Thu Feb 25 14:26:02 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
802
803 * Lib/colorsys.py:
804 Oops, one more "x, y, z" to convert...
805
806 * Lib/colorsys.py:
807 Adjusted comment at the top to be less confusing, following Fredrik
808 Lundh's example.
809
810 Converted comment to docstring.
811
812Wed Feb 24 18:49:15 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
813
814 * Lib/toaiff.py:
815 Use sndhdr instead of the obsolete whatsound module.
816
817Wed Feb 24 18:42:38 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
818
819 * Lib/urllib.py:
820 When performing a POST request, i.e. when the second argument to
821 urlopen is used to specify form data, make sure the second argument is
822 threaded through all of the http_error_NNN calls. This allows error
823 handlers like the redirect and authorization handlers to properly
824 re-start the connection.
825
826Wed Feb 24 16:25:17 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
827
828 * Lib/mhlib.py: Patch by Lars Wirzenius:
829
830 o the initial comment is wrong: creating messages is already
831 implemented
832
833 o Message.getbodytext: if the mail or it's part contains an
834 empty content-transfer-encoding header, the code used to
835 break; the change below treats an empty encoding value the same
836 as the other types that do not need decoding
837
838 o SubMessage.getbodytext was missing the decode argument; the
839 change below adds it; I also made it unconditionally return
840 the raw text if decoding was not desired, because my own
841 routines needed that (and it was easier than rewriting my
842 own routines ;-)
843
844Wed Feb 24 00:35:43 1999 Barry Warsaw <bwarsaw@eric.cnri.reston.va.us>
845
846 * Python/bltinmodule.c (initerrors):
847 Make sure that the exception tuples ("base-classes" when
848 string-based exceptions are used) reflect the real class hierarchy,
849 i.e. that SystemExit derives from Exception not StandardError.
850
851 * Lib/exceptions.py:
852 Document the correct class hierarchy for SystemExit. It is not an
853 error and so it derives from Exception and not SystemError. The
854 docstring was incorrect but the implementation was fine.
855
856Tue Feb 23 23:07:51 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
857
858 * Lib/shutil.py:
859 Add import sys, needed by reference to sys.exc_info() in rmtree().
860 Discovered by Mitch Chapman.
861
862 * config.h.in:
863 Now that we don't have AC_CHECK_LIB(m, pow), the HAVE_LIBM symbol
864 disappears. It wasn't used anywhere anyway...
865
866 * Modules/arraymodule.c:
867 Carefully check for overflow when allocating the memory for fromfile
868 -- someone tried to pass in sys.maxint and got bitten by the bogus
869 calculations.
870
871 * configure.in:
872 Get rid of AC_CHECK_LIB(m, pow) since this is taken care of later with
873 LIBM (from --with-libm=...); this actually broke the customizability
874 offered by the latter option. Thanks go to Clay Spence for reporting
875 this.
876
877 * Lib/test/test_dl.py:
878 1. Print the error message (carefully) when a dl.open() fails in verbose mode.
879 2. When no test case worked, raise ImportError instead of failing.
880
881 * Python/bltinmodule.c:
882 Patch by Tim Peters to improve the range checks for range() and
883 xrange(), especially for platforms where int and long are different
884 sizes (so sys.maxint isn't actually the theoretical limit for the
885 length of a list, but the largest C int is -- sys.maxint is the
886 largest Python int, which is actually a C long).
887
888 * Makefile.in:
889 1. Augment the DG/UX rule so it doesn't break the BeOS build.
890 2. Add $(EXE) to various occurrences of python so it will work on
891 Cygwin with egcs (after setting EXE=.exe). These patches by
892 Norman Vine.
893
894 * Lib/posixfile.py:
895 According to Jeffrey Honig, bsd/os 2.0 - 4.0 should be added to the
896 list (of bsd variants that have a different lock structure).
897
898 * Lib/test/test_fcntl.py:
899 According to Jeffrey Honig, bsd/os 4.0 should be added to the list.
900
901 * Modules/timemodule.c:
902 Patch by Tadayoshi Funaba (with some changes) to be smarter about
903 guessing what happened when strftime() returns 0. Is it buffer
904 overflow or was the result simply 0 bytes long? (This happens for an
905 empty format string, or when the format string is a single %Z and the
906 timezone is unknown.) if the buffer is at least 256 times as long as
907 the format, assume the latter.
908
909Mon Feb 22 19:01:42 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
910
911 * Lib/urllib.py:
912 As Des Barry points out, we need to call pathname2url(file) in two
913 calls to addinfourl() in open_file().
914
915 * Modules/Setup.in: Document *static* -- in two places!
916
917 * Modules/timemodule.c:
918 We don't support leap seconds, so the seconds field of a time 9-tuple
919 should be in the range [0-59]. Noted by Tadayoshi Funaba.
920
921 * Modules/stropmodule.c:
922 In atoi(), don't use isxdigit() to test whether the last character
923 converted was a "digit" -- use isalnum(). This test is there only to
924 guard against "+" or "-" being interpreted as a valid int literal.
925 Reported by Takahiro Nakayama.
926
927 * Lib/os.py:
928 As Finn Bock points out, _P_WAIT etc. don't have a leading underscore
929 so they don't need to be treated specially here.
930
931Mon Feb 22 15:38:58 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
932
933 * Misc/NEWS:
934 Typo: "apparentlt" --> "apparently"
935
936Mon Feb 22 15:38:46 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
937
938 * Lib/urlparse.py: Steve Clift pointed out that 'file' allows a netloc.
939
940 * Modules/posixmodule.c:
941 The docstring for ttyname(..) claims a second "mode" argument. The
942 actual code does not allow such an argument. (Finn Bock.)
943
944 * Lib/lib-old/poly.py:
945 Dang. Even though this is obsolete code, somebody found a bug, and I
946 fix it. Oh well.
947
948Thu Feb 18 20:51:50 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
949
950 * Lib/pyclbr.py:
951 Bow to font-lock at the end of the docstring, since it throws stuff
952 off.
953
954 Make sure the path paramter to readmodule() is a list before adding it
955 with sys.path, or the addition could fail.
956
Guido van Rossum1f83cce1997-10-06 21:04:35 +0000957
Guido van Rossum7ea639b1997-11-26 16:36:28 +0000958======================================================================
959
Guido van Rossumc45cf021998-04-10 20:06:21 +0000960
Guido van Rossum74608e61999-02-18 16:02:20 +0000961From 1.5.2b1 to 1.5.2b2
962=======================
963
964General
965-------
966
967- Many memory leaks fixed.
968
969- Many small bugs fixed.
970
971- Command line option -OO (or -O -O) suppresses inclusion of doc
972strings in resulting bytecode.
973
974Windows-specific changes
975------------------------
976
977- New built-in module winsound provides an interface to the Win32
978PlaySound() call.
979
980- Re-enable the audioop module in the config.c file.
981
982- On Windows, support spawnv() and associated P_* symbols.
983
984- Fixed the conversion of times() return values on Windows.
985
986- Removed freeze from the installer -- it doesn't work without the
987source tree. (See FAQ 8.11.)
988
989- On Windows 95/98, the Tkinter module now is smart enough to find
990Tcl/Tk even when the PATH environment variable hasn't been set -- when
991the import of _tkinter fails, it searches in a standard locations,
992patches os.environ["PATH"], and tries again. When it still fails, a
993clearer error message is produced. This should avoid most
994installation problems with Tkinter use (e.g. in IDLE).
995
996- The -i option doesn't make any calls to set[v]buf() for stdin --
Fred Drake0df21881999-02-22 15:38:58 +0000997this apparently screwed up _kbhit() and the _tkinter main loop.
Guido van Rossum74608e61999-02-18 16:02:20 +0000998
999- The ntpath module (and hence, os.path on Windows) now parses out UNC
1000paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that
1001splitdrive() will \\host\mountpoint as the drive and \dir\file as the
1002path. ** EXPERIMENTAL **
1003
1004- Added a hack to the exit code so that if (1) the exit status is
1005nonzero and (2) we think we have our own DOS box (i.e. we're not
1006started from a command line shell), we print a message and wait for
1007the user to hit a key before the DOS box is closed.
1008
1009- Updated the installer to WISE 5.0g. Added a dialog warning about
1010the imminent Tcl installation. Added a dialog to specify the program
1011group name in the start menu. Upgraded the Tcl installer to Tcl
10128.0.4.
1013
1014Changes to intrinsics
1015---------------------
1016
1017- The repr() or str() of a module object now shows the __file__
1018attribute (i.e., the file which it was loaded), or the string
1019"(built-in)" if there is no __file__ attribute.
1020
1021- The range() function now avoids overflow during its calculations (if
1022at all possible).
1023
1024- New info string sys.hexversion, which is an integer encoding the
1025version in hexadecimal. In other words, hex(sys.hexversion) ==
10260x010502b2 for Python 1.5.2b2.
1027
1028New or improved ports
1029---------------------
1030
1031- Support for Nextstep descendants (future Mac systems).
1032
1033- Improved BeOS support.
1034
1035- Support dynamic loading of shared libraries on NetBSD platforms that
1036use ELF (i.e., MIPS and Alpha systems).
1037
1038Configuration/build changes
1039---------------------------
1040
1041- The Lib/test directory is no longer included in the default module
1042search path (sys.path) -- "test" has been a package ever since 1.5.
1043
1044- Now using autoconf 2.13.
1045
1046New library modules
1047-------------------
1048
1049- New library modules asyncore and asynchat: these form Sam Rushing's
1050famous asynchronous socket library. Sam has gracefully allowed me to
1051incorporate these in the standard Python library.
1052
1053- New module statvfs contains indexing constants for [f]statvfs()
1054return tuple.
1055
1056Changes to the library
1057----------------------
1058
1059- The wave module (platform-independent support for Windows sound
1060files) has been fixed to actually make it work.
1061
1062- The sunau module (platform-independent support for Sun/NeXT sound
1063files) has been fixed to work across platforms. Also, a weird
1064encoding bug in the header of the audio test data file has been
1065corrected.
1066
1067- Fix a bug in the urllib module that occasionally tripped up
1068webchecker and other ftp retrieves.
1069
1070- ConfigParser's get() method now accepts an optional keyword argument
1071(vars) that is substituted on top of the defaults that were setup in
1072__init__. You can now also have recusive references in your
1073configuration file.
1074
1075- Some improvements to the Queue module, including a put_nowait()
1076module and an optional "block" second argument, to get() and put(),
1077defaulting to 1.
1078
1079- The updated xmllib module is once again compatible with the version
1080present in Python 1.5.1 (this was accidentally broken in 1.5.2b1).
1081
1082- The bdb module (base class for the debugger) now supports
1083canonicalizing pathnames used in breakpoints. The derived class must
1084override the new canonical() method for this to work. Also changed
1085clear_break() to the backwards compatible old signature, and added
1086clear_bpbynumber() for the new functionality.
1087
1088- In sgmllib (and hence htmllib), recognize attributes even if they
1089don't have space in front of them. I.e. '<a
1090name="foo"href="bar.html">' will now have two attributes recognized.
1091
1092- In the debugger (pdb), change clear syntax to support three
1093alternatives: clear; clear file:line; clear bpno bpno ...
1094
1095- The os.path module now pretends to be a submodule within the os
1096"package", so you can do things like "from os.path import exists".
1097
1098- The standard exceptions now have doc strings.
1099
1100- In the smtplib module, exceptions are now classes. Also avoid
1101inserting a non-standard space after "TO" in rcpt() command.
1102
1103- The rfc822 module's getaddrlist() method now uses all occurrences of
1104the specified header instead of just the first. Some other bugfixes
1105too (to handle more weird addresses found in a very large test set,
1106and to avoid crashes on certain invalid dates), and a small test
1107module has been added.
1108
1109- Fixed bug in urlparse in the common-case code for HTTP URLs; it
1110would lose the query, fragment, and/or parameter information.
1111
1112- The sndhdr module no longer supports whatraw() -- it depended on a
1113rare extenral program.
1114
1115- The UserList module/class now supports the extend() method, like
1116real list objects.
1117
1118- The uu module now deals better with trailing garbage generated by
1119some broke uuencoders.
1120
1121- The telnet module now has an my_interact() method which uses threads
1122instead of select. The interact() method uses this by default on
1123Windows (where the single-threaded version doesn't work).
1124
1125- Add a class to mailbox.py for dealing with qmail directory
1126mailboxes. The test code was extended to notice these being used as
1127well.
1128
1129Changes to extension modules
1130----------------------------
1131
1132- Support for the [f]statvfs() system call, where it exists.
1133
1134- Fixed some bugs in cPickle where bad input could cause it to dump
1135core.
1136
1137- Fixed cStringIO to make the writelines() function actually work.
1138
1139- Added strop.expandtabs() so string.expandtabs() is now much faster.
1140
1141- Added fsync() and fdatasync(), if they appear to exist.
1142
1143- Support for "long files" (64-bit seek pointers).
1144
1145- Fixed a bug in the zlib module's flush() function.
1146
1147- Added access() system call. It returns 1 if access granted, 0 if
1148not.
1149
1150- The curses module implements an optional nlines argument to
1151w.scroll(). (It then calls wscrl(win, nlines) instead of scoll(win).)
1152
1153Changes to tools
1154----------------
1155
1156- Some changes to IDLE; see Tools/idle/NEWS.txt.
1157
1158- Latest version of Misc/python-mode.el included.
1159
1160Changes to Tkinter
1161------------------
1162
1163- Avoid tracebacks when an image is deleted after its root has been
1164destroyed.
1165
1166Changes to the Python/C API
1167---------------------------
1168
1169- When parentheses are used in a PyArg_Parse[Tuple]() call, any
1170sequence is now accepted, instead of requiring a tuple. This is in
1171line with the general trend towards accepting arbitrary sequences.
1172
1173- Added PyModule_GetFilename().
1174
1175- In PyNumber_Power(), remove unneeded and even harmful test for float
1176to the negative power (which is already and better done in
1177floatobject.c).
1178
1179- New version identification symbols; read patchlevel.h for info. The
1180version numbers are now exported by Python.h.
1181
1182- Rolled back the API version change -- it's back to 1007!
1183
1184- The frozenmain.c function calls PyInitFrozenExtensions().
1185
1186- Added 'N' format character to Py_BuildValue -- like 'O' but doesn't
1187INCREF.
1188
1189
1190======================================================================
1191
1192
Guido van Rossume96bd3f1998-12-21 21:45:04 +00001193From 1.5.2a2 to 1.5.2b1
1194=======================
1195
1196Changes to intrinsics
1197---------------------
1198
1199- New extension NotImplementedError, derived from RuntimeError. Not
1200used, but recommended use is for "abstract" methods to raise this.
1201
1202- The parser will now spit out a warning or error when -t or -tt is
1203used for parser input coming from a string, too.
1204
1205- The code generator now inserts extra SET_LINENO opcodes when
1206compiling multi-line argument lists.
1207
1208- When comparing bound methods, use identity test on the objects, not
1209equality test.
1210
1211New or improved ports
1212---------------------
1213
1214- Chris Herborth has redone his BeOS port; it now works on PowerPC
1215(R3/R4) and x86 (R4 only). Threads work too in this port.
1216
1217Renaming
1218--------
1219
1220- Thanks to Chris Herborth, the thread primitives now have proper Py*
1221names in the source code (they already had those for the linker,
1222through some smart macros; but the source still had the old, un-Py
1223names).
1224
1225Configuration/build changes
1226---------------------------
1227
1228- Improved support for FreeBSD/3.
1229
1230- Check for pthread_detach instead of pthread_create in libc.
1231
1232- The makesetup script now searches EXECINCLUDEPY before INCLUDEPY.
1233
1234- Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local.
1235Otherwise modules such as thread didn't get incorporated in extensions.
1236
1237New library modules
1238-------------------
1239
Guido van Rossumde8b0261998-12-22 16:41:09 +00001240- shlex.py by Eric Raymond provides a lexical analyzer class for
1241simple shell-like syntaxes.
1242
1243- netrc.py by Eric Raymond provides a parser for .netrc files. (The
1244undocumented Netrc class in ftplib.py is now obsolete.)
1245
Guido van Rossume96bd3f1998-12-21 21:45:04 +00001246- codeop.py is a new module that contains the compile_command()
1247function that was previously in code.py. This is so that JPython can
1248provide its own version of this function, while still sharing the
1249higher-level classes in code.py.
1250
1251- turtle.py is a new module for simple turtle graphics. I'm still
1252working on it; let me know if you use this to teach Python to children
1253or other novices without prior programming experience.
1254
1255Obsoleted library modules
1256-------------------------
1257
1258- poly.py and zmod.py have been moved to Lib/lib-old to emphasize
1259their status of obsoleteness. They don't do a particularly good job
1260and don't seem particularly relevant to the Python core.
1261
1262New tools
1263---------
1264
1265- I've added IDLE: my Integrated DeveLopment Environment for Python.
1266Requires Tcl/Tk (and Tkinter). Works on Windows and Unix (and should
1267work on Macintosh, but I haven't been able to test it there; it does
1268depend on new features in 1.5.2 and perhaps even new features in
12691.5.2b1, especially the new code module). This is very much a work in
1270progress. I'd like to hear how people like it compared to PTUI (or
1271any other IDE they are familiar with).
1272
1273- New tools by Barry Warsaw:
1274
1275 = audiopy: controls the Solaris Audio device
1276 = pynche: The PYthonically Natural Color and Hue Editor
1277 = world: Print mappings between country names and DNS country codes
1278
1279New demos
1280---------
1281
1282- Demo/scripts/beer.py prints the lyrics to an arithmetic drinking
1283song.
1284
1285- Demo/tkinter/guido/optionmenu.py shows how to do an option menu in
1286Tkinter. (By Fredrik Lundh -- not by me!)
1287
1288Changes to the library
1289----------------------
1290
1291- compileall.py now avoids recompiling .py files that haven't changed;
1292it adds a -f option to force recompilation.
1293
1294- New version of xmllib.py by Sjoerd Mullender (0.2 with latest
1295patches).
1296
1297- nntplib.py: statparse() no longer lowercases the message-id.
1298
1299- types.py: use type(__stdin__) for FileType.
1300
1301- urllib.py: fix translations for filenames with "funny" characters.
Guido van Rossumde8b0261998-12-22 16:41:09 +00001302Patch by Sjoerd Mullender. Note that if you subclass one of the
1303URLopener classes, and you have copied code from the old urllib.py,
1304your subclass may stop working. A long-term solution is to provide
1305more methods so that you don't have to copy code.
Guido van Rossume96bd3f1998-12-21 21:45:04 +00001306
1307- cgi.py: In read_multi, allow a subclass to override the class we
1308instantiate when we create a recursive instance, by setting the class
1309variable 'FieldStorageClass' to the desired class. By default, this
1310is set to None, in which case we use self.__class__ (as before).
1311Also, a patch by Jim Fulton to pass additional arguments to recursive
1312calls to the FieldStorage constructor from its read_multi method.
1313
1314- UserList.py: In __getslice__, use self.__class__ instead of
1315UserList.
1316
1317- In SimpleHTTPServer.py, the server specified in test() should be
1318BaseHTTPServer.HTTPServer, in case the request handler should want to
1319reference the two attributes added by BaseHTTPServer.server_bind. (By
1320Jeff Rush, for Bobo). Also open the file in binary mode, so serving
1321images from a Windows box might actually work.
1322
1323- In CGIHTTPServer.py, the list of acceptable formats is -split-
1324on spaces but -joined- on commas, resulting in double commas
1325in the joined text. (By Jeff Rush.)
1326
1327- SocketServer.py, patch by Jeff Bauer: a minor change to declare two
1328new threaded versions of Unix Server classes, using the ThreadingMixIn
1329class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer.
1330
1331- bdb.py: fix bomb on deleting a temporary breakpoint: there's no
1332method do_delete(); do_clear() was meant. By Greg Ward.
1333
1334- getopt.py: accept a non-list sequence for the long options (request
1335by Jack Jansen). Because it might be a common mistake to pass a
1336single string, this situation is treated separately. Also added
1337docstrings (copied from the library manual) and removed the (now
1338redundant) module comments.
1339
1340- tempfile.py: improvements to avoid security leaks.
1341
1342- code.py: moved compile_command() to new module codeop.py.
1343
1344- pickle.py: support pickle format 1.3 (binary float added). By Jim
1345Fulton. Also get rid of the undocumented obsolete Pickler dump_special
1346method.
1347
1348- uu.py: Move 'import sys' to top of module, as noted by Tim Peters.
1349
1350- imaplib.py: fix problem with some versions of IMAP4 servers that
1351choose to mix the case in their CAPABILITIES response.
1352
1353- cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2. Noted
1354by Fredrik Lundh.
1355
1356Changes to extension modules
1357----------------------------
1358
1359- More doc strings for several modules were contributed by Chris
1360Petrilli: math, cmath, fcntl.
1361
1362- Fixed a bug in zlibmodule.c that could cause core dumps on
1363decompression of rarely occurring input.
1364
1365- cPickle.c: new version from Jim Fulton, with Open Source copyright
1366notice. Also, initialize self->safe_constructors early on to prevent
1367crash in early dealloc.
1368
1369- cStringIO.c: new version from Jim Fulton, with Open Source copyright
1370notice. Also fixed a core dump in cStringIO.c when doing seeks.
1371
1372- mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty).
1373
1374- readline.c: Bernard Herzog pointed out that rl_parse_and_bind
1375modifies its argument string (bad function!), so we make a temporary
1376copy.
1377
1378- sunaudiodev.c: Barry Warsaw added more smarts to get the device and
1379control pseudo-device, per audio(7I).
1380
1381Changes to tools
1382----------------
1383
1384- New, improved version of Barry Warsaw's Misc/python-mode.el (editing
1385support for Emacs).
1386
1387- tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
1388only the names of offending files to be printed.
1389
1390- freeze: when printing missing modules, also print the module they
1391were imported from.
1392
1393- untabify.py: patch by Detlef Lannert to implement -t option
1394(set tab size).
1395
1396Changes to Tkinter
1397------------------
1398
1399- grid_bbox(): support new Tk API: grid bbox ?column row? ?column2
1400row2?
1401
1402- _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2)
1403doesn't work when running in a non-threaded environment. He added
1404some #ifdefs that fix this.
1405
1406Changes to the Python/C API
1407---------------------------
1408
1409- Bumped API version number to 1008 -- enough things have changed!
1410
1411- There's a new macro, PyThreadState_GET(), which does the same work
1412as PyThreadState_Get() without the overhead of a function call (it
1413also avoids the error check). The two top calling locations of
1414PyThreadState_Get() have been changed to use this macro.
1415
1416- All symbols intended for export from a DLL or shared library are now
1417marked as such (with the DL_IMPORT() macro) in the header file that
1418declares them. This was needed for the BeOS port, and should also
1419make some other ports easier. The PC port no longer needs the file
1420with exported symbols (PC/python_nt.def). There's also a DL_EXPORT
1421macro which is only used for init methods in extension modules, and
1422for Py_Main().
1423
1424Invisible changes to internals
1425------------------------------
1426
1427- Fixed a bug in new_buffersize() in fileobject.c which could
1428return a buffer size that was way too large.
1429
1430- Use PySys_WriteStderr instead of fprintf in most places.
1431
1432- dictobject.c: remove dead code discovered by Vladimir Marangozov.
1433
1434- tupleobject.c: make tuples less hungry -- an extra item was
1435allocated but never used. Tip by Vladimir Marangozov.
1436
1437- mymath.h: Metrowerks PRO4 finally fixes the hypot snafu. (Jack
1438Jansen)
1439
1440- import.c: Jim Fulton fixes a reference count bug in
1441PyEval_GetGlobals.
1442
1443- glmodule.c: check in the changed version after running the stubber
1444again -- this solves the conflict with curses over the 'clear' entry
1445point much nicer. (Jack Jansen had checked in the changes to cstubs
1446eons ago, but I never regenrated glmodule.c :-( )
1447
1448- frameobject.c: fix reference count bug in PyFrame_New. Vladimir
1449Marangozov.
1450
1451- stropmodule.c: add a missing DECREF in an error exit. Submitted by
1452Jonathan Giddy.
1453
1454
1455======================================================================
1456
1457
Guido van Rossume8c10f91998-10-17 19:43:13 +00001458From 1.5.2a1 to 1.5.2a2
1459=======================
1460
1461General
1462-------
1463
1464- It is now a syntax error to have a function argument without a
1465default following one with a default.
1466
1467- __file__ is now set to the .py file if it was parsed (it used to
1468always be the .pyc/.pyo file).
1469
1470- Don't exit with a fatal error during initialization when there's a
1471problem with the exceptions.py module.
1472
1473- New environment variable PYTHONOPTIMIZE can be used to set -O.
1474
1475- New version of python-mode.el for Emacs.
1476
1477Miscellaneous fixed bugs
1478------------------------
1479
1480- No longer print the (confusing) error message about stack underflow
1481while compiling.
1482
1483- Some threading and locking bugs fixed.
1484
1485- When errno is zero, report "Error", not "Success".
1486
1487Documentation
1488-------------
1489
1490- Documentation will be released separately.
1491
1492- Doc strings added to array and md5 modules by Chris Petrilli.
1493
1494Ports and build procedure
1495-------------------------
1496
1497- Stop installing when a move or copy fails.
1498
1499- New version of the OS/2 port code by Jeff Rush.
1500
1501- The makesetup script handles absolute filenames better.
1502
1503- The 'new' module is now enabled by default in the Setup file.
1504
1505- I *think* I've solved the problem with the Linux build blowing up
1506sometimes due to a conflict between sigcheck/intrcheck and
1507signalmodule.
1508
1509Built-in functions
1510------------------
1511
1512- The second argument to apply() can now be any sequence, not just a
1513tuple.
1514
1515Built-in types
1516--------------
1517
1518- Lists have a new method: L1.extend(L2) is equivalent to the common
1519idiom L1[len(L1):] = L2.
1520
1521- Better error messages when a sequence is indexed with a non-integer.
1522
1523- Bettter error message when calling a non-callable object (include
1524the type in the message).
1525
1526Python services
1527---------------
1528
1529- New version of cPickle.c fixes some bugs.
1530
1531- pickle.py: improved instantiation error handling.
1532
1533- code.py: reworked quite a bit. New base class
1534InteractiveInterpreter and derived class InteractiveConsole. Fixed
1535several problems in compile_command().
1536
1537- py_compile.py: print error message and continue on syntax errors.
1538Also fixed an old bug with the fstat code (it was never used).
1539
1540- pyclbr.py: support submodules of packages.
1541
1542String Services
1543---------------
1544
1545- StringIO.py: raise the right exception (ValueError) for attempted
1546I/O on closed StringIO objects.
1547
1548- re.py: fixed a bug in subn(), which caused .groups() to fail inside
1549the replacement function called by sub().
1550
1551- The struct module has a new format 'P': void * in native mode.
1552
1553Generic OS Services
1554-------------------
1555
1556- Module time: Y2K robustness. 2-digit year acceptance depends on
1557value of time.accept2dyear, initialized from env var PYTHONY2K,
1558default 0. Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999
1559(POSIX or X/Open recommendation).
1560
1561- os.path: normpath(".//x") should return "x", not "/x".
1562
1563- getpass.py: fall back on default_getpass() when sys.stdin.fileno()
1564doesn't work.
1565
1566- tempfile.py: regenerate the template after a fork() call.
1567
1568Optional OS Services
1569--------------------
1570
1571- In the signal module, disable restarting interrupted system calls
1572when we have siginterrupt().
1573
1574Debugger
1575--------
1576
1577- No longer set __args__; this feature is no longer supported and can
1578affect the debugged code.
1579
1580- cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who
1581added aliases and some other useful new features, e.g. much better
1582breakpoint support: temporary breakpoint, disabled breakpoints,
1583breakpoints with ignore counts, and conditions; breakpoints can be set
1584on a file before it is loaded.
1585
1586Profiler
1587--------
1588
1589- Changes so that JPython can use it. Also fix the calibration code
1590so it actually works again
1591.
1592Internet Protocols and Support
1593------------------------------
1594
1595- imaplib.py: new version from Piers Lauder.
1596
1597- smtplib.py: change sendmail() method to accept a single string or a
1598list or strings as the destination (commom newbie mistake).
1599
1600- poplib.py: LIST with a msg argument fixed.
1601
1602- urlparse.py: some optimizations for common case (http).
1603
1604- urllib.py: support content-length in info() for ftp protocol;
1605support for a progress meter through a third argument to
1606urlretrieve(); commented out gopher test (the test site is dead).
1607
1608Internet Data handling
1609----------------------
1610
1611- sgmllib.py: support tags with - or . in their name.
1612
1613- mimetypes.py: guess_type() understands 'data' URLs.
1614
1615Restricted Execution
1616--------------------
1617
1618- The classes rexec.RModuleLoader and rexec.RModuleImporter no
1619longer exist.
1620
1621Tkinter
1622-------
1623
1624- When reporting an exception, store its info in sys.last_*. Also,
1625write all of it to stderr.
1626
1627- Added NS, EW, and NSEW constants, for grid's sticky option.
1628
1629- Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h".
1630
1631- Make bind variants without a sequence return a tuple of sequences
1632(formerly it returned a string, which wasn't very convenient).
1633
1634- Add image commands to the Text widget (these are new in Tk 8.0).
1635
1636- Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.)
1637
1638- Improved the thread code (but you still can't call update() from
1639another thread on Windows).
1640
1641- Fixed unnecessary references to _default_root in the new dialog
1642modules.
1643
1644- Miscellaneous problems fixed.
1645
1646
1647Windows General
1648---------------
1649
1650- Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to
1651search for dependent dlls in the directory containing the .pyd.
1652
1653- In debugging mode, call DebugBreak() in Py_FatalError().
1654
1655Windows Installer
1656-----------------
1657
1658- Install zlib.dll in the DLLs directory instead of in the win32
1659system directory, to avoid conflicts with other applications that have
1660their own zlib.dll.
1661
1662Test Suite
1663----------
1664
1665- test_long.py: new test for long integers, by Tim Peters.
1666
1667- regrtest.py: improved so it can be used for other test suites as
1668well.
1669
1670- test_strftime.py: use re to compare test results, to support legal
1671variants (e.g. on Linux).
1672
1673Tools and Demos
1674---------------
1675
1676- Four new scripts in Tools/scripts: crlf.py and lfcr.py (to
1677remove/add Windows style '\r\n' line endings), untabify.py (to remove
1678tabs), and rgrep.yp (reverse grep).
1679
1680- Improvements to Tools/freeze/. Each Python module is now written to
1681its own C file. This prevents some compilers or assemblers from
1682blowing up on large frozen programs, and saves recompilation time if
1683only a few modules are changed. Other changes too, e.g. new command
1684line options -x and -i.
1685
1686- Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py.
1687
1688Python/C API
1689------------
1690
1691- New mechanism to support extensions of the type object while
1692remaining backward compatible with extensions compiled for previous
1693versions of Python 1.5. A flags field indicates presence of certain
1694fields.
1695
1696- Addition to the buffer API to differentiate access to bytes and
16978-bit characters (in anticipation of Unicode characters).
1698
1699- New argument parsing format t# ("text") to indicate 8-bit
1700characters; s# simply means 8-bit bytes, for backwards compatibility.
1701
1702- New object type, bufferobject.c is an example and can be used to
1703create buffers from memory.
1704
1705- Some support for 64-bit longs, including some MS platforms.
1706
1707- Many calls to fprintf(stderr, ...) have been replaced with calls to
1708PySys_WriteStderr(...).
1709
1710- The calling context for PyOS_Readline() has changed: it must now be
1711called with the interpreter lock held! It releases the lock around
1712the call to the function pointed to by PyOS_ReadlineFunctionPointer
1713(default PyOS_StdioReadline()).
1714
1715- New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr().
1716
1717- Renamed header file "thread.h" to "pythread.h".
1718
1719- The code string of code objects may now be anything that supports the
1720buffer API.
1721
1722
1723======================================================================
1724
1725
Guido van Rossumf5475c91998-08-06 17:55:46 +00001726From 1.5.1 to 1.5.2a1
1727=====================
1728
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001729General
1730-------
1731
1732- When searching for the library, a landmark that is a compiled module
1733(string.pyc or string.pyo) is also accepted.
1734
1735- When following symbolic links to the python executable, use a loop
1736so that a symlink to a symlink can work.
1737
1738- Added a hack so that when you type 'quit' or 'exit' at the
1739interpreter, you get a friendly explanation of how to press Ctrl-D (or
1740Ctrl-Z) to exit.
1741
1742- New and improved Misc/python-mode.el (Python mode for Emacs).
1743
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001744- Revert a new feature in Unix dynamic loading: for one or two
1745revisions, modules were loaded using the RTLD_GLOBAL flag. It turned
1746out to be a bad idea.
1747
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001748Miscellaneous fixed bugs
1749------------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +00001750
1751- All patches on the patch page have been integrated. (But much more
1752has been done!)
1753
1754- Several memory leaks plugged (e.g. the one for classes with a
1755__getattr__ method).
1756
Guido van Rossumf5475c91998-08-06 17:55:46 +00001757- Removed the only use of calloc(). This triggered an obscure bug on
1758multiprocessor Sparc Solaris 2.6.
1759
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001760- Fix a peculiar bug that would allow "import sys.time" to succeed
1761(believing the built-in time module to be a part of the sys package).
1762
1763- Fix a bug in the overflow checking when converting a Python long to
1764a C long (failed to convert -2147483648L, and some other cases).
1765
Guido van Rossumf5475c91998-08-06 17:55:46 +00001766Documentation
1767-------------
1768
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001769- Doc strings have been added to many extension modules: __builtin__,
1770errno, select, signal, socket, sys, thread, time. Also to methods of
1771list objects (try [].append.__doc__). A doc string on a type will now
1772automatically be propagated to an instance if the instance has methods
1773that are accessed in the usual way.
1774
Guido van Rossumf5475c91998-08-06 17:55:46 +00001775- The documentation has been expanded and the formatting improved.
1776(Remember that the documentation is now unbundled and has its own
1777release cycle though; see http://www.python.org/doc/.)
1778
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001779- Added Misc/Porting -- a mini-FAQ on porting to a new platform.
1780
1781Ports and build procedure
1782-------------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +00001783
1784- The BeOS port is now integrated. Courtesy Chris Herborth.
1785
1786- Symbol files for FreeBSD 2.x and 3.x have been contributed
1787(Lib/plat-freebsd[23]/*).
1788
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001789- Support HPUX 10.20 DCE threads.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001790
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001791- Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0
1792works, it won't also use -Olimit 1500 (which gives a warning for every
1793file). Also support the SGI_ABI environment variable better.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001794
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001795- The makesetup script now understands absolute pathnames ending in .o
1796in the module -- it assumes it's a file for which we have no source.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001797
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001798- Other miscellaneous improvements to the configure script and
1799Makefiles.
1800
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001801- The test suite now uses a different sound sample.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001802
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001803Built-in functions
1804------------------
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001805
1806- Better checks for invalid input to int(), long(), string.atoi(),
1807string.atol(). (Formerly, a sign without digits would be accepted as
1808a legal ways to spell zero.)
1809
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001810- Changes to map() and filter() to use the length of a sequence only
1811as a hint -- if an IndexError happens earlier, take that. (Formerly,
1812this was considered an error.)
1813
1814- Experimental feature in getattr(): a third argument can specify a
1815default (instead of raising AttributeError).
1816
1817- Implement round() slightly different, so that for negative ndigits
1818no additional errors happen in the last step.
1819
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001820- The open() function now adds the filename to the exception when it
1821fails.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001822
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001823Built-in exceptions
1824-------------------
1825
1826- New standard exceptions EnvironmentError and PosixError.
1827EnvironmentError is the base class for IOError and PosixError;
1828PosixError is the same as os.error. All this so that either exception
1829class can be instantiated with a third argument indicating a filename.
1830The built-in function open() and most os/posix functions that take a
1831filename argument now use this.
1832
1833Built-in types
1834--------------
1835
1836- List objects now have an experimental pop() method; l.pop() returns
1837and removes the last item; l.pop(i) returns and removes the item at
1838i. Also, the sort() method is faster again. Sorting is now also
1839safer: it is impossible for the sorting function to modify the list
1840while the sort is going on (which could cause core dumps).
1841
1842- Changes to comparisons: numbers are now smaller than any other type.
1843This is done to prevent the circularity where [] < 0L < 1 < [] is
1844true. As a side effect, cmp(None, 0) is now positive instead of
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001845negative. This *shouldn't* affect any working code, but I've found
1846that the change caused several "sleeping" bugs to become active, so
1847beware!
1848
1849- Instance methods may now have other callable objects than just
1850Python functions as their im_func. Use new.instancemethod() or write
1851your own C code to create them; new.instancemethod() may be called
1852with None for the instance to create an unbound method.
1853
1854- Assignment to __name__, __dict__ or __bases__ of a class object is
1855now allowed (with stringent type checks); also allow assignment to
1856__getattr__ etc. The cached values for __getattr__ etc. are
1857recomputed after such assignments (but not for derived classes :-( ).
1858
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001859- Allow assignment to some attributes of function objects: func_code,
1860func_defaults and func_doc / __doc__. (With type checks except for
1861__doc__ / func_doc .)
1862
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001863Python services
Guido van Rossumf5475c91998-08-06 17:55:46 +00001864---------------
1865
1866- New tests (in Lib/test): reperf.py (regular expression benchmark),
1867sortperf.py (list sorting benchmark), test_MimeWriter.py (test case
1868for the MimeWriter module).
1869
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001870- Generalized test/regrtest.py so that it is useful for testing other
1871packages.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001872
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001873- The ihooks.py module now understands package imports.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001874
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001875- In code.py, add a class that subsumes Fredrik Lundh's
1876PythonInterpreter class. The interact() function now uses this.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001877
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001878- In rlcompleter.py, in completer(), return None instead of raising an
1879IndexError when there are no more completions left.
1880
1881- Fixed the marshal module to test for certain common kinds of invalid
1882input. (It's still not foolproof!)
1883
1884- In the operator module, add an alias (now the preferred name)
1885"contains" for "sequenceincludes".
1886
1887String Services
1888---------------
1889
1890- In the string and strop modules, in the replace() function, treat an
1891empty pattern as an error (since it's not clear what was meant!).
1892
1893- Some speedups to re.py, especially the string substitution and split
1894functions. Also added new function/method findall(), to find all
1895occurrences of a given substring.
1896
1897- In cStringIO, add better argument type checking and support the
1898readonly 'closed' attribute (like regular files).
1899
1900- In the struct module, unsigned 1-2 byte sized formats no longer
1901result in long integer values.
1902
1903Miscellaneous services
1904----------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +00001905
1906- In whrandom.py, added new method and function randrange(), same as
1907choice(range(start, stop, step)) but faster. This addresses the
1908problem that randint() was accidentally defined as taking an inclusive
1909range. Also, randint(a, b) is now redefined as randrange(a, b+1),
1910adding extra range and type checking to its arguments!
1911
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001912- Add some semi-thread-safety to random.gauss() (it used to be able to
1913crash when invoked from separate threads; now the worst it can do is
1914give a duplicate result occasionally).
1915
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001916- Some restructuring and generalization done to cmd.py.
1917
1918- Major upgrade to ConfigParser.py; converted to using 're', added new
1919exceptions, support underscore in section header and option name. No
1920longer add 'name' option to every section; instead, add '__name__'.
1921
Guido van Rossumf5475c91998-08-06 17:55:46 +00001922- In getpass.py, don't use raw_input() to ask for the password -- we
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001923don't want it to show up in the readline history! Also don't catch
1924interrupts (the try-finally already does all necessary cleanup).
Guido van Rossumf5475c91998-08-06 17:55:46 +00001925
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001926Generic OS Services
1927-------------------
1928
1929- New functions in os.py: makedirs(), removedirs(), renames(). New
1930variable: linesep (the line separator as found in binary files,
1931i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac. Do *not* use
1932this with files opened in (default) text mode; the line separator used
1933will always be '\n'!
1934
1935- Changes to the 'os.path' submodule of os.py: added getsize(),
1936getmtime(), getatime() -- these fetch the most popular items from the
1937stat return tuple.
1938
1939- In the time module, add strptime(), if it exists. (This parses a
1940time according to a format -- the inverse of strftime().) Also,
1941remove the call to mktime() from strftime() -- it messed up the
1942formatting of some non-local times.
1943
1944- In the socket module, added a new function gethostbyname_ex().
1945Also, don't use #ifdef to test for some symbols that are enums on some
1946platforms (and should exist everywhere).
1947
1948Optional OS Services
1949--------------------
1950
1951- Some fixes to gzip.py. In particular, the readlines() method now
1952returns the lines *with* trailing newline characters, like readlines()
1953of regular file objects. Also, it didn't work together with cPickle;
1954fixed that.
1955
1956- In whichdb.py, support byte-swapped dbhash (bsddb) files.
1957
1958- In anydbm.py, look at the type of an existing database to determine
1959which module to use to open it. (The anydbm.error exception is now a
1960tuple.)
1961
1962Unix Services
1963-------------
1964
1965- In the termios module, in tcsetattr(), initialize the structure vy
1966calling tcgetattr().
1967
1968- Added some of the "wait status inspection" macros as functions to
1969the posix module (and thus to the os module): WEXITSTATUS(),
1970WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
1971
1972- In the syslog module, make the default facility more intuitive
1973(matching the docs).
1974
1975Debugger
1976--------
1977
1978- In pdb.py, support for setting breaks on files/modules that haven't
1979been loaded yet.
1980
1981Internet Protocols and Support
1982------------------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +00001983
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001984- Changes in urllib.py; sped up unquote() and quote(). Fixed an
1985obscure bug in quote_plus(). Added urlencode(dict) -- convenience
1986function for sending a POST request with urlopen(). Use the getpass
1987module to ask for a password. Rewrote the (test) main program so that
1988when used as a script, it can retrieve one or more URLs to stdout.
1989Use -t to run the self-test. Made the proxy code work again.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001990
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001991- In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't
1992fail when someone asks for their HEAD. Also, for POST, set the
1993default content-type to application/x-www-form-urlencoded. Also, in
1994FieldStorage.__init__(), when method='GET', always get the query
1995string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an
1996explicitly passed in fp.
Guido van Rossumf5475c91998-08-06 17:55:46 +00001997
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001998- The smtplib.py module now supports ESMTP and has improved standard
1999compliance, for picky servers.
2000
Guido van Rossumf5475c91998-08-06 17:55:46 +00002001- Improved imaplib.py.
2002
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002003- Fixed UDP support in SocketServer.py (it never worked).
Guido van Rossumf5475c91998-08-06 17:55:46 +00002004
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002005- Fixed a small bug in CGIHTTPServer.py.
Guido van Rossumf5475c91998-08-06 17:55:46 +00002006
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002007Internet Data handling
2008----------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +00002009
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002010- In rfc822.py, add a new class AddressList. Also support a new
2011overridable method, isheader(). Also add a get() method similar to
2012dictionaries (and make getheader() an alias for it). Also, be smarter
2013about seekable (test whether fp.tell() works) and test for presence of
2014unread() method before trying seeks.
Guido van Rossumf5475c91998-08-06 17:55:46 +00002015
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002016- In sgmllib.py, restore the call to report_unbalanced() that was lost
2017long ago. Also some other improvements: handle <? processing
2018instructions >, allow . and - in entity names, and allow \r\n as line
2019separator.
Guido van Rossumf5475c91998-08-06 17:55:46 +00002020
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002021- Some restructuring and generalization done to multifile.py; support
2022a 'seekable' flag.
Guido van Rossumf5475c91998-08-06 17:55:46 +00002023
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002024Restricted Execution
2025--------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +00002026
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002027- Improvements to rexec.py: package support; support a (minimal)
2028sys.exc_info(). Also made the (test) main program a bit fancier (you
2029can now use it to run arbitrary Python scripts in restricted mode).
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002030
2031Tkinter
2032-------
2033
2034- On Unix, Tkinter can now safely be used from a multi-threaded
2035application. (Formerly, no threads would make progress while
2036Tkinter's mainloop() was active, because it didn't release the Python
2037interpreter lock.) Unfortunately, on Windows, threads other than the
2038main thread should not call update() or update_idletasks() because
2039this will deadlock the application.
2040
2041- An interactive interpreter that uses readline and Tkinter no longer
2042uses up all available CPU time.
2043
2044- Even if readline is not used, Tk windows created in an interactive
2045interpreter now get continuously updated. (This even works in Windows
2046as long as you don't hit a key.)
2047
2048- New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py.
2049
2050- No longer register Tcl_finalize() as a low-level exit handler. It
2051may call back into Python, and that's a bad idea.
2052
2053- Allow binding of Tcl commands (given as a string).
2054
2055- Some minor speedups; replace explicitly coded getint() with int() in
2056most places.
2057
2058- In FileDialog.py, remember the directory of the selected file, if
2059given.
2060
2061- Change the names of all methods in the Wm class: they are now
2062wm_title(), etc. The old names (title() etc.) are still defined as
2063aliases.
2064
2065- Add a new method of interpreter objects, interpaddr(). This returns
2066the address of the Tcl interpreter object, as an integer. Not very
2067useful for the Python programmer, but this can be called by another C
2068extension that needs to make calls into the Tcl/Tk C API and needs to
2069get the address of the Tcl interpreter object. A simple cast of the
2070return value to (Tcl_Interp *) will do the trick.
2071
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002072Windows General
2073---------------
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002074
2075- Don't insist on proper case for module source files if the filename
2076is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still
2077doesn't). This should address problems with this feature on
2078oldfashioned filesystems (Novell servers?).
2079
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002080Windows Library
2081---------------
2082
2083- os.environ is now all uppercase, but accesses are case insensitive,
2084and the putenv() calls made as a side effect of changing os.environ
2085are case preserving.
2086
2087- Removed samefile(), sameopenfile(), samestat() from os.path (aka
2088ntpath.py) -- these cannot be made to work reliably (at least I
2089wouldn't know how).
2090
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002091- Fixed os.pipe() so that it returns file descriptors acceptable to
2092os.read() and os.write() (like it does on Unix), rather than Windows
2093file handles.
2094
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002095- Added a table of WSA error codes to socket.py.
2096
2097- In the select module, put the (huge) file descriptor arrays on the
2098heap.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002099
2100- The getpass module now raises KeyboardInterrupt when it sees ^C.
2101
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002102- In mailbox.py, fix tell/seek when using files opened in text mode.
2103
2104- In rfc822.py, fix tell/seek when using files opened in text mode.
2105
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002106- In the msvcrt extension module, release the interpreter lock for
2107calls that may block: _locking(), _getch(), _getche(). Also fix a
2108bogus error return when open_osfhandle() doesn't have the right
2109argument list.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002110
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002111Windows Installer
2112-----------------
2113
2114- The registry key used is now "1.5" instead of "1.5.x" -- so future
2115versions of 1.5 and Mark Hammond's win32all installer don't need to be
2116resynchronized.
2117
2118Windows Tools
2119-------------
2120
2121- Several improvements to freeze specifically for Windows.
2122
2123Windows Build Procedure
2124-----------------------
2125
2126- The VC++ project files and the WISE installer have been moved to the
2127PCbuild subdirectory, so they are distributed in the same subdirectory
2128where they must be used. This avoids confusion.
2129
2130- New project files for Windows 3.1 port by Jim Ahlstrom.
2131
2132- Got rid of the obsolete subdirectory PC/setup_nt/.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002133
2134- The projects now use distinct filenames for the .exe, .dll, .lib and
2135.pyd files built in debug mode (by appending "_d" to the base name,
2136before the extension). This makes it easier to switch between the two
2137and get the right versions. There's a pragma in config.h that directs
2138the linker to include the appropriate .lib file (so python15.lib no
2139longer needs to be explicit in your project).
2140
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002141- The installer now installs more files (e.g. config.h). The idea is
2142that you shouldn't need the source distribution if you want build your
2143own extensions in C or C++.
2144
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002145Tools and Demos
Guido van Rossumf5475c91998-08-06 17:55:46 +00002146---------------
2147
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002148- New script nm2def.py by Marc-Andre Lemburg, to construct
2149PC/python_nt.def automatically (some hand editing still required).
Guido van Rossumf5475c91998-08-06 17:55:46 +00002150
2151- New tool ndiff.py: Tim Peters' text diffing tool.
2152
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002153- Various and sundry improvements to the freeze script.
2154
Guido van Rossumf5475c91998-08-06 17:55:46 +00002155- The script texi2html.py (which was part of the Doc tree but is no
2156longer used there) has been moved to the Tools/scripts subdirectory.
2157
2158- Some generalizations in the webchecker code. There's now a
2159primnitive gui for websucker.py: wsgui.py. (In Tools/webchecker/.)
2160
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002161- The ftpmirror.py script now handles symbolic links properly, and
2162also files with multiple spaces in their names.
Guido van Rossumf5475c91998-08-06 17:55:46 +00002163
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002164- The 1.5.1 tabnanny.py suffers an assert error if fed a script whose
2165last line is both indented and lacks a newline. This is now fixed.
Guido van Rossumf5475c91998-08-06 17:55:46 +00002166
2167Python/C API
2168------------
2169
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002170- Added missing prototypes for PyEval_CallFunction() and
2171PyEval_CallMethod().
2172
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002173- New macro PyList_SET_ITEM().
Guido van Rossumf5475c91998-08-06 17:55:46 +00002174
2175- New macros to access object members for PyFunction, PyCFunction
2176objects.
2177
2178- New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to
2179dynamically add one or many entries to the table of built-in modules.
2180
2181- New macro Py_InitModule3(name, methods, doc) which calls
2182Py_InitModule4() with appropriate arguments. (The -4 variant requires
2183you to pass an obscure version number constant which is always the same.)
2184
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002185- New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
2186sys.stdout or sys.stderr using a printf-like interface. (Used in
2187_tkinter.c, for example.)
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002188
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002189- New APIs for conversion between Python longs and C 'long long' if
2190your compiler supports it.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002191
2192- PySequence_In() is now called PySequence_Contains().
2193(PySequence_In() is still supported for b/w compatibility; it is
2194declared obsolete because its argument order is confusing.)
2195
2196- PyDict_GetItem() and PyDict_GetItemString() are changed so that they
2197*never* raise an exception -- (even if the hash() fails, simply clear
2198the error). This was necessary because there is lots of code out
2199there that already assumes this.
2200
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002201- Changes to PySequence_Tuple() and PySequence_List() to use the
2202length of a sequence only as a hint -- if an IndexError happens
2203earlier, take that. (Formerly, this was considered an error.)
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002204
Guido van Rossum27b3bc31998-08-11 18:42:26 +00002205- Reformatted abstract.c to give it a more familiar "look" and fixed
2206many error checking bugs.
2207
2208- Add NULL pointer checks to all calls of a C function through a type
2209object and extensions (e.g. nb_add).
2210
2211- The code that initializes sys.path now calls Py_GetPythonHome()
2212instead of getenv("PYTHONHOME"). This, together with the new API
2213Py_SetPythonHome(), makes it easier for embedding applications to
2214change the notion of Python's "home" directory (where the libraries
2215etc. are sought).
2216
2217- Fixed a very old bug in the parsing of "O?" format specifiers.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00002218
2219
2220======================================================================