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