blob: fa9751d799340f24b1e8b067a473ddf0937aa454 [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
13
Guido van Rossum7ea639b1997-11-26 16:36:28 +000014======================================================================
15
Guido van Rossumc45cf021998-04-10 20:06:21 +000016
Guido van Rossume96bd3f1998-12-21 21:45:04 +000017From 1.5.2a2 to 1.5.2b1
18=======================
19
20Changes to intrinsics
21---------------------
22
23- New extension NotImplementedError, derived from RuntimeError. Not
24used, but recommended use is for "abstract" methods to raise this.
25
26- The parser will now spit out a warning or error when -t or -tt is
27used for parser input coming from a string, too.
28
29- The code generator now inserts extra SET_LINENO opcodes when
30compiling multi-line argument lists.
31
32- When comparing bound methods, use identity test on the objects, not
33equality test.
34
35New or improved ports
36---------------------
37
38- Chris Herborth has redone his BeOS port; it now works on PowerPC
39(R3/R4) and x86 (R4 only). Threads work too in this port.
40
41Renaming
42--------
43
44- Thanks to Chris Herborth, the thread primitives now have proper Py*
45names in the source code (they already had those for the linker,
46through some smart macros; but the source still had the old, un-Py
47names).
48
49Configuration/build changes
50---------------------------
51
52- Improved support for FreeBSD/3.
53
54- Check for pthread_detach instead of pthread_create in libc.
55
56- The makesetup script now searches EXECINCLUDEPY before INCLUDEPY.
57
58- Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local.
59Otherwise modules such as thread didn't get incorporated in extensions.
60
61New library modules
62-------------------
63
Guido van Rossumde8b0261998-12-22 16:41:09 +000064- shlex.py by Eric Raymond provides a lexical analyzer class for
65simple shell-like syntaxes.
66
67- netrc.py by Eric Raymond provides a parser for .netrc files. (The
68undocumented Netrc class in ftplib.py is now obsolete.)
69
Guido van Rossume96bd3f1998-12-21 21:45:04 +000070- codeop.py is a new module that contains the compile_command()
71function that was previously in code.py. This is so that JPython can
72provide its own version of this function, while still sharing the
73higher-level classes in code.py.
74
75- turtle.py is a new module for simple turtle graphics. I'm still
76working on it; let me know if you use this to teach Python to children
77or other novices without prior programming experience.
78
79Obsoleted library modules
80-------------------------
81
82- poly.py and zmod.py have been moved to Lib/lib-old to emphasize
83their status of obsoleteness. They don't do a particularly good job
84and don't seem particularly relevant to the Python core.
85
86New tools
87---------
88
89- I've added IDLE: my Integrated DeveLopment Environment for Python.
90Requires Tcl/Tk (and Tkinter). Works on Windows and Unix (and should
91work on Macintosh, but I haven't been able to test it there; it does
92depend on new features in 1.5.2 and perhaps even new features in
931.5.2b1, especially the new code module). This is very much a work in
94progress. I'd like to hear how people like it compared to PTUI (or
95any other IDE they are familiar with).
96
97- New tools by Barry Warsaw:
98
99 = audiopy: controls the Solaris Audio device
100 = pynche: The PYthonically Natural Color and Hue Editor
101 = world: Print mappings between country names and DNS country codes
102
103New demos
104---------
105
106- Demo/scripts/beer.py prints the lyrics to an arithmetic drinking
107song.
108
109- Demo/tkinter/guido/optionmenu.py shows how to do an option menu in
110Tkinter. (By Fredrik Lundh -- not by me!)
111
112Changes to the library
113----------------------
114
115- compileall.py now avoids recompiling .py files that haven't changed;
116it adds a -f option to force recompilation.
117
118- New version of xmllib.py by Sjoerd Mullender (0.2 with latest
119patches).
120
121- nntplib.py: statparse() no longer lowercases the message-id.
122
123- types.py: use type(__stdin__) for FileType.
124
125- urllib.py: fix translations for filenames with "funny" characters.
Guido van Rossumde8b0261998-12-22 16:41:09 +0000126Patch by Sjoerd Mullender. Note that if you subclass one of the
127URLopener classes, and you have copied code from the old urllib.py,
128your subclass may stop working. A long-term solution is to provide
129more methods so that you don't have to copy code.
Guido van Rossume96bd3f1998-12-21 21:45:04 +0000130
131- cgi.py: In read_multi, allow a subclass to override the class we
132instantiate when we create a recursive instance, by setting the class
133variable 'FieldStorageClass' to the desired class. By default, this
134is set to None, in which case we use self.__class__ (as before).
135Also, a patch by Jim Fulton to pass additional arguments to recursive
136calls to the FieldStorage constructor from its read_multi method.
137
138- UserList.py: In __getslice__, use self.__class__ instead of
139UserList.
140
141- In SimpleHTTPServer.py, the server specified in test() should be
142BaseHTTPServer.HTTPServer, in case the request handler should want to
143reference the two attributes added by BaseHTTPServer.server_bind. (By
144Jeff Rush, for Bobo). Also open the file in binary mode, so serving
145images from a Windows box might actually work.
146
147- In CGIHTTPServer.py, the list of acceptable formats is -split-
148on spaces but -joined- on commas, resulting in double commas
149in the joined text. (By Jeff Rush.)
150
151- SocketServer.py, patch by Jeff Bauer: a minor change to declare two
152new threaded versions of Unix Server classes, using the ThreadingMixIn
153class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer.
154
155- bdb.py: fix bomb on deleting a temporary breakpoint: there's no
156method do_delete(); do_clear() was meant. By Greg Ward.
157
158- getopt.py: accept a non-list sequence for the long options (request
159by Jack Jansen). Because it might be a common mistake to pass a
160single string, this situation is treated separately. Also added
161docstrings (copied from the library manual) and removed the (now
162redundant) module comments.
163
164- tempfile.py: improvements to avoid security leaks.
165
166- code.py: moved compile_command() to new module codeop.py.
167
168- pickle.py: support pickle format 1.3 (binary float added). By Jim
169Fulton. Also get rid of the undocumented obsolete Pickler dump_special
170method.
171
172- uu.py: Move 'import sys' to top of module, as noted by Tim Peters.
173
174- imaplib.py: fix problem with some versions of IMAP4 servers that
175choose to mix the case in their CAPABILITIES response.
176
177- cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2. Noted
178by Fredrik Lundh.
179
180Changes to extension modules
181----------------------------
182
183- More doc strings for several modules were contributed by Chris
184Petrilli: math, cmath, fcntl.
185
186- Fixed a bug in zlibmodule.c that could cause core dumps on
187decompression of rarely occurring input.
188
189- cPickle.c: new version from Jim Fulton, with Open Source copyright
190notice. Also, initialize self->safe_constructors early on to prevent
191crash in early dealloc.
192
193- cStringIO.c: new version from Jim Fulton, with Open Source copyright
194notice. Also fixed a core dump in cStringIO.c when doing seeks.
195
196- mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty).
197
198- readline.c: Bernard Herzog pointed out that rl_parse_and_bind
199modifies its argument string (bad function!), so we make a temporary
200copy.
201
202- sunaudiodev.c: Barry Warsaw added more smarts to get the device and
203control pseudo-device, per audio(7I).
204
205Changes to tools
206----------------
207
208- New, improved version of Barry Warsaw's Misc/python-mode.el (editing
209support for Emacs).
210
211- tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
212only the names of offending files to be printed.
213
214- freeze: when printing missing modules, also print the module they
215were imported from.
216
217- untabify.py: patch by Detlef Lannert to implement -t option
218(set tab size).
219
220Changes to Tkinter
221------------------
222
223- grid_bbox(): support new Tk API: grid bbox ?column row? ?column2
224row2?
225
226- _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2)
227doesn't work when running in a non-threaded environment. He added
228some #ifdefs that fix this.
229
230Changes to the Python/C API
231---------------------------
232
233- Bumped API version number to 1008 -- enough things have changed!
234
235- There's a new macro, PyThreadState_GET(), which does the same work
236as PyThreadState_Get() without the overhead of a function call (it
237also avoids the error check). The two top calling locations of
238PyThreadState_Get() have been changed to use this macro.
239
240- All symbols intended for export from a DLL or shared library are now
241marked as such (with the DL_IMPORT() macro) in the header file that
242declares them. This was needed for the BeOS port, and should also
243make some other ports easier. The PC port no longer needs the file
244with exported symbols (PC/python_nt.def). There's also a DL_EXPORT
245macro which is only used for init methods in extension modules, and
246for Py_Main().
247
248Invisible changes to internals
249------------------------------
250
251- Fixed a bug in new_buffersize() in fileobject.c which could
252return a buffer size that was way too large.
253
254- Use PySys_WriteStderr instead of fprintf in most places.
255
256- dictobject.c: remove dead code discovered by Vladimir Marangozov.
257
258- tupleobject.c: make tuples less hungry -- an extra item was
259allocated but never used. Tip by Vladimir Marangozov.
260
261- mymath.h: Metrowerks PRO4 finally fixes the hypot snafu. (Jack
262Jansen)
263
264- import.c: Jim Fulton fixes a reference count bug in
265PyEval_GetGlobals.
266
267- glmodule.c: check in the changed version after running the stubber
268again -- this solves the conflict with curses over the 'clear' entry
269point much nicer. (Jack Jansen had checked in the changes to cstubs
270eons ago, but I never regenrated glmodule.c :-( )
271
272- frameobject.c: fix reference count bug in PyFrame_New. Vladimir
273Marangozov.
274
275- stropmodule.c: add a missing DECREF in an error exit. Submitted by
276Jonathan Giddy.
277
278
279======================================================================
280
281
Guido van Rossume8c10f91998-10-17 19:43:13 +0000282From 1.5.2a1 to 1.5.2a2
283=======================
284
285General
286-------
287
288- It is now a syntax error to have a function argument without a
289default following one with a default.
290
291- __file__ is now set to the .py file if it was parsed (it used to
292always be the .pyc/.pyo file).
293
294- Don't exit with a fatal error during initialization when there's a
295problem with the exceptions.py module.
296
297- New environment variable PYTHONOPTIMIZE can be used to set -O.
298
299- New version of python-mode.el for Emacs.
300
301Miscellaneous fixed bugs
302------------------------
303
304- No longer print the (confusing) error message about stack underflow
305while compiling.
306
307- Some threading and locking bugs fixed.
308
309- When errno is zero, report "Error", not "Success".
310
311Documentation
312-------------
313
314- Documentation will be released separately.
315
316- Doc strings added to array and md5 modules by Chris Petrilli.
317
318Ports and build procedure
319-------------------------
320
321- Stop installing when a move or copy fails.
322
323- New version of the OS/2 port code by Jeff Rush.
324
325- The makesetup script handles absolute filenames better.
326
327- The 'new' module is now enabled by default in the Setup file.
328
329- I *think* I've solved the problem with the Linux build blowing up
330sometimes due to a conflict between sigcheck/intrcheck and
331signalmodule.
332
333Built-in functions
334------------------
335
336- The second argument to apply() can now be any sequence, not just a
337tuple.
338
339Built-in types
340--------------
341
342- Lists have a new method: L1.extend(L2) is equivalent to the common
343idiom L1[len(L1):] = L2.
344
345- Better error messages when a sequence is indexed with a non-integer.
346
347- Bettter error message when calling a non-callable object (include
348the type in the message).
349
350Python services
351---------------
352
353- New version of cPickle.c fixes some bugs.
354
355- pickle.py: improved instantiation error handling.
356
357- code.py: reworked quite a bit. New base class
358InteractiveInterpreter and derived class InteractiveConsole. Fixed
359several problems in compile_command().
360
361- py_compile.py: print error message and continue on syntax errors.
362Also fixed an old bug with the fstat code (it was never used).
363
364- pyclbr.py: support submodules of packages.
365
366String Services
367---------------
368
369- StringIO.py: raise the right exception (ValueError) for attempted
370I/O on closed StringIO objects.
371
372- re.py: fixed a bug in subn(), which caused .groups() to fail inside
373the replacement function called by sub().
374
375- The struct module has a new format 'P': void * in native mode.
376
377Generic OS Services
378-------------------
379
380- Module time: Y2K robustness. 2-digit year acceptance depends on
381value of time.accept2dyear, initialized from env var PYTHONY2K,
382default 0. Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999
383(POSIX or X/Open recommendation).
384
385- os.path: normpath(".//x") should return "x", not "/x".
386
387- getpass.py: fall back on default_getpass() when sys.stdin.fileno()
388doesn't work.
389
390- tempfile.py: regenerate the template after a fork() call.
391
392Optional OS Services
393--------------------
394
395- In the signal module, disable restarting interrupted system calls
396when we have siginterrupt().
397
398Debugger
399--------
400
401- No longer set __args__; this feature is no longer supported and can
402affect the debugged code.
403
404- cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who
405added aliases and some other useful new features, e.g. much better
406breakpoint support: temporary breakpoint, disabled breakpoints,
407breakpoints with ignore counts, and conditions; breakpoints can be set
408on a file before it is loaded.
409
410Profiler
411--------
412
413- Changes so that JPython can use it. Also fix the calibration code
414so it actually works again
415.
416Internet Protocols and Support
417------------------------------
418
419- imaplib.py: new version from Piers Lauder.
420
421- smtplib.py: change sendmail() method to accept a single string or a
422list or strings as the destination (commom newbie mistake).
423
424- poplib.py: LIST with a msg argument fixed.
425
426- urlparse.py: some optimizations for common case (http).
427
428- urllib.py: support content-length in info() for ftp protocol;
429support for a progress meter through a third argument to
430urlretrieve(); commented out gopher test (the test site is dead).
431
432Internet Data handling
433----------------------
434
435- sgmllib.py: support tags with - or . in their name.
436
437- mimetypes.py: guess_type() understands 'data' URLs.
438
439Restricted Execution
440--------------------
441
442- The classes rexec.RModuleLoader and rexec.RModuleImporter no
443longer exist.
444
445Tkinter
446-------
447
448- When reporting an exception, store its info in sys.last_*. Also,
449write all of it to stderr.
450
451- Added NS, EW, and NSEW constants, for grid's sticky option.
452
453- Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h".
454
455- Make bind variants without a sequence return a tuple of sequences
456(formerly it returned a string, which wasn't very convenient).
457
458- Add image commands to the Text widget (these are new in Tk 8.0).
459
460- Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.)
461
462- Improved the thread code (but you still can't call update() from
463another thread on Windows).
464
465- Fixed unnecessary references to _default_root in the new dialog
466modules.
467
468- Miscellaneous problems fixed.
469
470
471Windows General
472---------------
473
474- Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to
475search for dependent dlls in the directory containing the .pyd.
476
477- In debugging mode, call DebugBreak() in Py_FatalError().
478
479Windows Installer
480-----------------
481
482- Install zlib.dll in the DLLs directory instead of in the win32
483system directory, to avoid conflicts with other applications that have
484their own zlib.dll.
485
486Test Suite
487----------
488
489- test_long.py: new test for long integers, by Tim Peters.
490
491- regrtest.py: improved so it can be used for other test suites as
492well.
493
494- test_strftime.py: use re to compare test results, to support legal
495variants (e.g. on Linux).
496
497Tools and Demos
498---------------
499
500- Four new scripts in Tools/scripts: crlf.py and lfcr.py (to
501remove/add Windows style '\r\n' line endings), untabify.py (to remove
502tabs), and rgrep.yp (reverse grep).
503
504- Improvements to Tools/freeze/. Each Python module is now written to
505its own C file. This prevents some compilers or assemblers from
506blowing up on large frozen programs, and saves recompilation time if
507only a few modules are changed. Other changes too, e.g. new command
508line options -x and -i.
509
510- Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py.
511
512Python/C API
513------------
514
515- New mechanism to support extensions of the type object while
516remaining backward compatible with extensions compiled for previous
517versions of Python 1.5. A flags field indicates presence of certain
518fields.
519
520- Addition to the buffer API to differentiate access to bytes and
5218-bit characters (in anticipation of Unicode characters).
522
523- New argument parsing format t# ("text") to indicate 8-bit
524characters; s# simply means 8-bit bytes, for backwards compatibility.
525
526- New object type, bufferobject.c is an example and can be used to
527create buffers from memory.
528
529- Some support for 64-bit longs, including some MS platforms.
530
531- Many calls to fprintf(stderr, ...) have been replaced with calls to
532PySys_WriteStderr(...).
533
534- The calling context for PyOS_Readline() has changed: it must now be
535called with the interpreter lock held! It releases the lock around
536the call to the function pointed to by PyOS_ReadlineFunctionPointer
537(default PyOS_StdioReadline()).
538
539- New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr().
540
541- Renamed header file "thread.h" to "pythread.h".
542
543- The code string of code objects may now be anything that supports the
544buffer API.
545
546
547======================================================================
548
549
Guido van Rossumf5475c91998-08-06 17:55:46 +0000550From 1.5.1 to 1.5.2a1
551=====================
552
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000553General
554-------
555
556- When searching for the library, a landmark that is a compiled module
557(string.pyc or string.pyo) is also accepted.
558
559- When following symbolic links to the python executable, use a loop
560so that a symlink to a symlink can work.
561
562- Added a hack so that when you type 'quit' or 'exit' at the
563interpreter, you get a friendly explanation of how to press Ctrl-D (or
564Ctrl-Z) to exit.
565
566- New and improved Misc/python-mode.el (Python mode for Emacs).
567
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000568- Revert a new feature in Unix dynamic loading: for one or two
569revisions, modules were loaded using the RTLD_GLOBAL flag. It turned
570out to be a bad idea.
571
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000572Miscellaneous fixed bugs
573------------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +0000574
575- All patches on the patch page have been integrated. (But much more
576has been done!)
577
578- Several memory leaks plugged (e.g. the one for classes with a
579__getattr__ method).
580
Guido van Rossumf5475c91998-08-06 17:55:46 +0000581- Removed the only use of calloc(). This triggered an obscure bug on
582multiprocessor Sparc Solaris 2.6.
583
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000584- Fix a peculiar bug that would allow "import sys.time" to succeed
585(believing the built-in time module to be a part of the sys package).
586
587- Fix a bug in the overflow checking when converting a Python long to
588a C long (failed to convert -2147483648L, and some other cases).
589
Guido van Rossumf5475c91998-08-06 17:55:46 +0000590Documentation
591-------------
592
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000593- Doc strings have been added to many extension modules: __builtin__,
594errno, select, signal, socket, sys, thread, time. Also to methods of
595list objects (try [].append.__doc__). A doc string on a type will now
596automatically be propagated to an instance if the instance has methods
597that are accessed in the usual way.
598
Guido van Rossumf5475c91998-08-06 17:55:46 +0000599- The documentation has been expanded and the formatting improved.
600(Remember that the documentation is now unbundled and has its own
601release cycle though; see http://www.python.org/doc/.)
602
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000603- Added Misc/Porting -- a mini-FAQ on porting to a new platform.
604
605Ports and build procedure
606-------------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +0000607
608- The BeOS port is now integrated. Courtesy Chris Herborth.
609
610- Symbol files for FreeBSD 2.x and 3.x have been contributed
611(Lib/plat-freebsd[23]/*).
612
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000613- Support HPUX 10.20 DCE threads.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000614
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000615- Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0
616works, it won't also use -Olimit 1500 (which gives a warning for every
617file). Also support the SGI_ABI environment variable better.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000618
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000619- The makesetup script now understands absolute pathnames ending in .o
620in the module -- it assumes it's a file for which we have no source.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000621
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000622- Other miscellaneous improvements to the configure script and
623Makefiles.
624
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000625- The test suite now uses a different sound sample.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000626
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000627Built-in functions
628------------------
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000629
630- Better checks for invalid input to int(), long(), string.atoi(),
631string.atol(). (Formerly, a sign without digits would be accepted as
632a legal ways to spell zero.)
633
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000634- Changes to map() and filter() to use the length of a sequence only
635as a hint -- if an IndexError happens earlier, take that. (Formerly,
636this was considered an error.)
637
638- Experimental feature in getattr(): a third argument can specify a
639default (instead of raising AttributeError).
640
641- Implement round() slightly different, so that for negative ndigits
642no additional errors happen in the last step.
643
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000644- The open() function now adds the filename to the exception when it
645fails.
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000646
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000647Built-in exceptions
648-------------------
649
650- New standard exceptions EnvironmentError and PosixError.
651EnvironmentError is the base class for IOError and PosixError;
652PosixError is the same as os.error. All this so that either exception
653class can be instantiated with a third argument indicating a filename.
654The built-in function open() and most os/posix functions that take a
655filename argument now use this.
656
657Built-in types
658--------------
659
660- List objects now have an experimental pop() method; l.pop() returns
661and removes the last item; l.pop(i) returns and removes the item at
662i. Also, the sort() method is faster again. Sorting is now also
663safer: it is impossible for the sorting function to modify the list
664while the sort is going on (which could cause core dumps).
665
666- Changes to comparisons: numbers are now smaller than any other type.
667This is done to prevent the circularity where [] < 0L < 1 < [] is
668true. As a side effect, cmp(None, 0) is now positive instead of
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000669negative. This *shouldn't* affect any working code, but I've found
670that the change caused several "sleeping" bugs to become active, so
671beware!
672
673- Instance methods may now have other callable objects than just
674Python functions as their im_func. Use new.instancemethod() or write
675your own C code to create them; new.instancemethod() may be called
676with None for the instance to create an unbound method.
677
678- Assignment to __name__, __dict__ or __bases__ of a class object is
679now allowed (with stringent type checks); also allow assignment to
680__getattr__ etc. The cached values for __getattr__ etc. are
681recomputed after such assignments (but not for derived classes :-( ).
682
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000683- Allow assignment to some attributes of function objects: func_code,
684func_defaults and func_doc / __doc__. (With type checks except for
685__doc__ / func_doc .)
686
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000687Python services
Guido van Rossumf5475c91998-08-06 17:55:46 +0000688---------------
689
690- New tests (in Lib/test): reperf.py (regular expression benchmark),
691sortperf.py (list sorting benchmark), test_MimeWriter.py (test case
692for the MimeWriter module).
693
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000694- Generalized test/regrtest.py so that it is useful for testing other
695packages.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000696
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000697- The ihooks.py module now understands package imports.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000698
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000699- In code.py, add a class that subsumes Fredrik Lundh's
700PythonInterpreter class. The interact() function now uses this.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000701
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000702- In rlcompleter.py, in completer(), return None instead of raising an
703IndexError when there are no more completions left.
704
705- Fixed the marshal module to test for certain common kinds of invalid
706input. (It's still not foolproof!)
707
708- In the operator module, add an alias (now the preferred name)
709"contains" for "sequenceincludes".
710
711String Services
712---------------
713
714- In the string and strop modules, in the replace() function, treat an
715empty pattern as an error (since it's not clear what was meant!).
716
717- Some speedups to re.py, especially the string substitution and split
718functions. Also added new function/method findall(), to find all
719occurrences of a given substring.
720
721- In cStringIO, add better argument type checking and support the
722readonly 'closed' attribute (like regular files).
723
724- In the struct module, unsigned 1-2 byte sized formats no longer
725result in long integer values.
726
727Miscellaneous services
728----------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +0000729
730- In whrandom.py, added new method and function randrange(), same as
731choice(range(start, stop, step)) but faster. This addresses the
732problem that randint() was accidentally defined as taking an inclusive
733range. Also, randint(a, b) is now redefined as randrange(a, b+1),
734adding extra range and type checking to its arguments!
735
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000736- Add some semi-thread-safety to random.gauss() (it used to be able to
737crash when invoked from separate threads; now the worst it can do is
738give a duplicate result occasionally).
739
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000740- Some restructuring and generalization done to cmd.py.
741
742- Major upgrade to ConfigParser.py; converted to using 're', added new
743exceptions, support underscore in section header and option name. No
744longer add 'name' option to every section; instead, add '__name__'.
745
Guido van Rossumf5475c91998-08-06 17:55:46 +0000746- In getpass.py, don't use raw_input() to ask for the password -- we
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000747don't want it to show up in the readline history! Also don't catch
748interrupts (the try-finally already does all necessary cleanup).
Guido van Rossumf5475c91998-08-06 17:55:46 +0000749
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000750Generic OS Services
751-------------------
752
753- New functions in os.py: makedirs(), removedirs(), renames(). New
754variable: linesep (the line separator as found in binary files,
755i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac. Do *not* use
756this with files opened in (default) text mode; the line separator used
757will always be '\n'!
758
759- Changes to the 'os.path' submodule of os.py: added getsize(),
760getmtime(), getatime() -- these fetch the most popular items from the
761stat return tuple.
762
763- In the time module, add strptime(), if it exists. (This parses a
764time according to a format -- the inverse of strftime().) Also,
765remove the call to mktime() from strftime() -- it messed up the
766formatting of some non-local times.
767
768- In the socket module, added a new function gethostbyname_ex().
769Also, don't use #ifdef to test for some symbols that are enums on some
770platforms (and should exist everywhere).
771
772Optional OS Services
773--------------------
774
775- Some fixes to gzip.py. In particular, the readlines() method now
776returns the lines *with* trailing newline characters, like readlines()
777of regular file objects. Also, it didn't work together with cPickle;
778fixed that.
779
780- In whichdb.py, support byte-swapped dbhash (bsddb) files.
781
782- In anydbm.py, look at the type of an existing database to determine
783which module to use to open it. (The anydbm.error exception is now a
784tuple.)
785
786Unix Services
787-------------
788
789- In the termios module, in tcsetattr(), initialize the structure vy
790calling tcgetattr().
791
792- Added some of the "wait status inspection" macros as functions to
793the posix module (and thus to the os module): WEXITSTATUS(),
794WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
795
796- In the syslog module, make the default facility more intuitive
797(matching the docs).
798
799Debugger
800--------
801
802- In pdb.py, support for setting breaks on files/modules that haven't
803been loaded yet.
804
805Internet Protocols and Support
806------------------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +0000807
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000808- Changes in urllib.py; sped up unquote() and quote(). Fixed an
809obscure bug in quote_plus(). Added urlencode(dict) -- convenience
810function for sending a POST request with urlopen(). Use the getpass
811module to ask for a password. Rewrote the (test) main program so that
812when used as a script, it can retrieve one or more URLs to stdout.
813Use -t to run the self-test. Made the proxy code work again.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000814
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000815- In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't
816fail when someone asks for their HEAD. Also, for POST, set the
817default content-type to application/x-www-form-urlencoded. Also, in
818FieldStorage.__init__(), when method='GET', always get the query
819string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an
820explicitly passed in fp.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000821
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000822- The smtplib.py module now supports ESMTP and has improved standard
823compliance, for picky servers.
824
Guido van Rossumf5475c91998-08-06 17:55:46 +0000825- Improved imaplib.py.
826
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000827- Fixed UDP support in SocketServer.py (it never worked).
Guido van Rossumf5475c91998-08-06 17:55:46 +0000828
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000829- Fixed a small bug in CGIHTTPServer.py.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000830
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000831Internet Data handling
832----------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +0000833
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000834- In rfc822.py, add a new class AddressList. Also support a new
835overridable method, isheader(). Also add a get() method similar to
836dictionaries (and make getheader() an alias for it). Also, be smarter
837about seekable (test whether fp.tell() works) and test for presence of
838unread() method before trying seeks.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000839
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000840- In sgmllib.py, restore the call to report_unbalanced() that was lost
841long ago. Also some other improvements: handle <? processing
842instructions >, allow . and - in entity names, and allow \r\n as line
843separator.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000844
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000845- Some restructuring and generalization done to multifile.py; support
846a 'seekable' flag.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000847
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000848Restricted Execution
849--------------------
Guido van Rossumf5475c91998-08-06 17:55:46 +0000850
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000851- Improvements to rexec.py: package support; support a (minimal)
852sys.exc_info(). Also made the (test) main program a bit fancier (you
853can now use it to run arbitrary Python scripts in restricted mode).
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000854
855Tkinter
856-------
857
858- On Unix, Tkinter can now safely be used from a multi-threaded
859application. (Formerly, no threads would make progress while
860Tkinter's mainloop() was active, because it didn't release the Python
861interpreter lock.) Unfortunately, on Windows, threads other than the
862main thread should not call update() or update_idletasks() because
863this will deadlock the application.
864
865- An interactive interpreter that uses readline and Tkinter no longer
866uses up all available CPU time.
867
868- Even if readline is not used, Tk windows created in an interactive
869interpreter now get continuously updated. (This even works in Windows
870as long as you don't hit a key.)
871
872- New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py.
873
874- No longer register Tcl_finalize() as a low-level exit handler. It
875may call back into Python, and that's a bad idea.
876
877- Allow binding of Tcl commands (given as a string).
878
879- Some minor speedups; replace explicitly coded getint() with int() in
880most places.
881
882- In FileDialog.py, remember the directory of the selected file, if
883given.
884
885- Change the names of all methods in the Wm class: they are now
886wm_title(), etc. The old names (title() etc.) are still defined as
887aliases.
888
889- Add a new method of interpreter objects, interpaddr(). This returns
890the address of the Tcl interpreter object, as an integer. Not very
891useful for the Python programmer, but this can be called by another C
892extension that needs to make calls into the Tcl/Tk C API and needs to
893get the address of the Tcl interpreter object. A simple cast of the
894return value to (Tcl_Interp *) will do the trick.
895
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000896Windows General
897---------------
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000898
899- Don't insist on proper case for module source files if the filename
900is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still
901doesn't). This should address problems with this feature on
902oldfashioned filesystems (Novell servers?).
903
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000904Windows Library
905---------------
906
907- os.environ is now all uppercase, but accesses are case insensitive,
908and the putenv() calls made as a side effect of changing os.environ
909are case preserving.
910
911- Removed samefile(), sameopenfile(), samestat() from os.path (aka
912ntpath.py) -- these cannot be made to work reliably (at least I
913wouldn't know how).
914
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000915- Fixed os.pipe() so that it returns file descriptors acceptable to
916os.read() and os.write() (like it does on Unix), rather than Windows
917file handles.
918
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000919- Added a table of WSA error codes to socket.py.
920
921- In the select module, put the (huge) file descriptor arrays on the
922heap.
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000923
924- The getpass module now raises KeyboardInterrupt when it sees ^C.
925
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000926- In mailbox.py, fix tell/seek when using files opened in text mode.
927
928- In rfc822.py, fix tell/seek when using files opened in text mode.
929
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000930- In the msvcrt extension module, release the interpreter lock for
931calls that may block: _locking(), _getch(), _getche(). Also fix a
932bogus error return when open_osfhandle() doesn't have the right
933argument list.
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000934
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000935Windows Installer
936-----------------
937
938- The registry key used is now "1.5" instead of "1.5.x" -- so future
939versions of 1.5 and Mark Hammond's win32all installer don't need to be
940resynchronized.
941
942Windows Tools
943-------------
944
945- Several improvements to freeze specifically for Windows.
946
947Windows Build Procedure
948-----------------------
949
950- The VC++ project files and the WISE installer have been moved to the
951PCbuild subdirectory, so they are distributed in the same subdirectory
952where they must be used. This avoids confusion.
953
954- New project files for Windows 3.1 port by Jim Ahlstrom.
955
956- Got rid of the obsolete subdirectory PC/setup_nt/.
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000957
958- The projects now use distinct filenames for the .exe, .dll, .lib and
959.pyd files built in debug mode (by appending "_d" to the base name,
960before the extension). This makes it easier to switch between the two
961and get the right versions. There's a pragma in config.h that directs
962the linker to include the appropriate .lib file (so python15.lib no
963longer needs to be explicit in your project).
964
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000965- The installer now installs more files (e.g. config.h). The idea is
966that you shouldn't need the source distribution if you want build your
967own extensions in C or C++.
968
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000969Tools and Demos
Guido van Rossumf5475c91998-08-06 17:55:46 +0000970---------------
971
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000972- New script nm2def.py by Marc-Andre Lemburg, to construct
973PC/python_nt.def automatically (some hand editing still required).
Guido van Rossumf5475c91998-08-06 17:55:46 +0000974
975- New tool ndiff.py: Tim Peters' text diffing tool.
976
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000977- Various and sundry improvements to the freeze script.
978
Guido van Rossumf5475c91998-08-06 17:55:46 +0000979- The script texi2html.py (which was part of the Doc tree but is no
980longer used there) has been moved to the Tools/scripts subdirectory.
981
982- Some generalizations in the webchecker code. There's now a
983primnitive gui for websucker.py: wsgui.py. (In Tools/webchecker/.)
984
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000985- The ftpmirror.py script now handles symbolic links properly, and
986also files with multiple spaces in their names.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000987
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000988- The 1.5.1 tabnanny.py suffers an assert error if fed a script whose
989last line is both indented and lacks a newline. This is now fixed.
Guido van Rossumf5475c91998-08-06 17:55:46 +0000990
991Python/C API
992------------
993
Guido van Rossumab9d6f01998-08-10 22:01:13 +0000994- Added missing prototypes for PyEval_CallFunction() and
995PyEval_CallMethod().
996
Guido van Rossum27b3bc31998-08-11 18:42:26 +0000997- New macro PyList_SET_ITEM().
Guido van Rossumf5475c91998-08-06 17:55:46 +0000998
999- New macros to access object members for PyFunction, PyCFunction
1000objects.
1001
1002- New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to
1003dynamically add one or many entries to the table of built-in modules.
1004
1005- New macro Py_InitModule3(name, methods, doc) which calls
1006Py_InitModule4() with appropriate arguments. (The -4 variant requires
1007you to pass an obscure version number constant which is always the same.)
1008
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001009- New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
1010sys.stdout or sys.stderr using a printf-like interface. (Used in
1011_tkinter.c, for example.)
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001012
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001013- New APIs for conversion between Python longs and C 'long long' if
1014your compiler supports it.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001015
1016- PySequence_In() is now called PySequence_Contains().
1017(PySequence_In() is still supported for b/w compatibility; it is
1018declared obsolete because its argument order is confusing.)
1019
1020- PyDict_GetItem() and PyDict_GetItemString() are changed so that they
1021*never* raise an exception -- (even if the hash() fails, simply clear
1022the error). This was necessary because there is lots of code out
1023there that already assumes this.
1024
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001025- Changes to PySequence_Tuple() and PySequence_List() to use the
1026length of a sequence only as a hint -- if an IndexError happens
1027earlier, take that. (Formerly, this was considered an error.)
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001028
Guido van Rossum27b3bc31998-08-11 18:42:26 +00001029- Reformatted abstract.c to give it a more familiar "look" and fixed
1030many error checking bugs.
1031
1032- Add NULL pointer checks to all calls of a C function through a type
1033object and extensions (e.g. nb_add).
1034
1035- The code that initializes sys.path now calls Py_GetPythonHome()
1036instead of getenv("PYTHONHOME"). This, together with the new API
1037Py_SetPythonHome(), makes it easier for embedding applications to
1038change the notion of Python's "home" directory (where the libraries
1039etc. are sought).
1040
1041- Fixed a very old bug in the parsing of "O?" format specifiers.
Guido van Rossumab9d6f01998-08-10 22:01:13 +00001042
1043
1044======================================================================