blob: e34dffdf87b3ea35def7a14a2a270e5cf6c0ddb5 [file] [log] [blame]
Guido van Rossum8c973651994-07-14 13:57:11 +00001====================================
2==> Release 1.0.3 (14 July 1994) <==
3====================================
4
5This release consists entirely of bug fixes to the C sources; see the
6head of ../ChangeLog for a complete list. Most important bugs fixed:
7
8- Sometimes the format operator (string%expr) would drop the last
9character of the format string
10
11- Tokenizer looped when last line did not end in \n
12
13- Bug when triple-quoted string ended in quote plus newline
14
15- Typo in socketmodule (listen) (== instead of =)
16
17- typing vars() at the >>> prompt would cause recursive output
18
Guido van Rossum5c743041994-05-04 13:10:17 +000019==================================
20==> Release 1.0.2 (4 May 1994) <==
21==================================
22
23Overview of the most visible changes. Bug fixes are not listed. See
24also ChangeLog.
25
26Tokens
27------
28
29* String literals follow Standard C rules: they may be continued on
30the next line using a backslash; adjacent literals are concatenated
31at compile time.
32
33* A new kind of string literals, surrounded by triple quotes (""" or
34'''), can be continued on the next line without a backslash.
35
36Syntax
37------
38
39* Function arguments may have a default value, e.g. def f(a, b=1);
40defaults are evaluated at function definition time. This also applies
41to lambda.
42
43* The try-except statement has an optional else clause, which is
44executed when no exception occurs in the try clause.
45
46Interpreter
47-----------
48
49* The result of a statement-level expression is no longer printed,
50except_ for expressions entered interactively. Consequently, the -k
51command line option is gone.
52
53* The result of the last printed interactive expression is assigned to
54the variable '_'.
55
56* Access to implicit global variables has been speeded up by removing
57an always-failing dictionary lookup in the dictionary of local
58variables (mod suggested by Steve Makewski and Tim Peters).
59
60* There is a new command line option, -u, to force stdout and stderr
61to be unbuffered.
62
63* Incorporated Steve Majewski's mods to import.c for dynamic loading
64under AIX.
65
66* Fewer chances of dumping core when trying to reload or re-import
67static built-in, dynamically loaded built-in, or frozen modules.
68
69* Loops over sequences now don't ask for the sequence's length when
70they start, but try to access items 0, 1, 2, and so on until they hit
71an IndexError. This makes it possible to create classes that generate
72infinite or indefinite sequences a la Steve Majewski. This affects
73for loops, the (not) in operator, and the built-in functions filter(),
74map(), max(), min(), reduce().
75
76Changed Built-in operations
77---------------------------
78
79* The '%' operator on strings (printf-style formatting) supports a new
80feature (adapted from a patch by Donald Beaudry) to allow
81'%(<key>)<format>' % {...} to take values from a dictionary by name
82instead of from a tuple by position (see also the new function
83vars()).
84
85* The '%s' formatting operator is changed to accept any type and
86convert it to a string using str().
87
88* Dictionaries with more than 20,000 entries can now be created
89(thanks to Steve Kirsch).
90
91New Built-in Functions
92----------------------
93
94* vars() returns a dictionary containing the local variables; vars(m)
95returns a dictionary containing the variables of module m. Note:
96dir(x) is now equivalent to vars(x).keys().
97
98Changed Built-in Functions
99--------------------------
100
101* open() has an optional third argument to specify the buffer size: 0
102for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0
103for default.
104
105* open()'s second argument is now optional; it defaults to "r".
106
107* apply() now checks that its second argument is indeed a tuple.
108
109New Built-in Modules
110--------------------
111
112Changed Built-in Modules
113------------------------
114
115The thread module no longer supports exit_prog().
116
117New Python Modules
118------------------
119
120* Module addpack contains a standard interface to modify sys.path to
121find optional packages (groups of related modules).
122
123* Module urllib contains a number of functions to access
124World-Wide-Web files specified by their URL.
125
126* Module httplib implements the client side of the HTTP protocol used
127by World-Wide-Web servers.
128
129* Module gopherlib implements the client side of the Gopher protocol.
130
131* Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF
132style mailbox files.
133
134* Module random contains various random distributions, e.g. gauss().
135
136* Module lockfile locks and unlocks open files using fcntl (inspired
137by a similar module by Andy Bensky).
138
139* Module ntpath (by Jaap Vermeulen) implements path operations for
140Windows/NT.
141
142* Module test_thread (in Lib/test) contains a small test set for the
143thread module.
144
145Changed Python Modules
146----------------------
147
148* The string module's expandvars() function is now documented and is
149implemented in Python (using regular expressions) instead of forking
150off a shell process.
151
152* Module rfc822 now supports accessing the header fields using the
153mapping/dictionary interface, e.g. h['subject'].
154
155* Module pdb now makes it possible to set a break on a function
156(syntax: break <expression>, where <expression> yields a function
157object).
158
159Changed Demos
160-------------
161
162* The Demo/scripts/freeze.py script is working again (thanks to Jaap
163Vermeulen).
164
165New Demos
166---------
167
168* Demo/threads/Generator.py is a proposed interface for restartable
169functions a la Tim Peters.
170
171* Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a
172directory full of HTML pages which between them contain links to all
173the newsgroups available on your server.
174
175* Demo/dns contains a DNS (Domain Name Server) client.
176
177* Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a
178nice enhanced Python shell!!!).
179
180* Demo/turing contains a Turing machine by Amrit Prem.
181
182Documentation
183-------------
184
185* Documented new language features mentioned above (but not all new
186modules).
187
188* Added a chapter to the Tutorial describing recent additions to
189Python.
190
191* Clarified some sentences in the reference manual,
192e.g. break/continue, local/global scope, slice assignment.
193
194Source Structure
195----------------
196
197* Moved Include/tokenizer.h to Parser/tokenizer.h.
198
199* Added Python/getopt.c for systems that don't have it.
200
201Emacs mode
202----------
203
204* Indentation of continuated lines is done more intelligently;
205consequently the variable py-continuation-offset is gone.
206
Guido van Rossum617536e1994-04-14 13:01:54 +0000207========================================
208==> Release 1.0.1 (15 February 1994) <==
209========================================
210
211* Many portability fixes should make it painless to build Python on
212several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
213
214* Fixed test for <stdarg.h> -- this broke on some platforms.
215
216* Fixed test for shared library dynalic loading -- this broke on SunOS
2174.x using the GNU loader.
218
219* Changed order and number of SVR4 networking libraries (it is now
220-lsocket -linet -lnsl, if these libraries exist).
221
222* Installing the build intermediate stages with "make libainstall" now
223also installs config.c.in, Setup and makesetup, which are used by the
224new Extensions mechanism.
225
226* Improved README file contains more hints and new troubleshooting
227section.
228
229* The built-in module strop now defines fast versions of three more
230functions of the standard string module: atoi(), atol() and atof().
231The strop versions of atoi() and atol() support an optional second
232argument to specify the base (default 10). NOTE: you don't have to
233explicitly import strop to use the faster versions -- the string
234module contains code to let versions from stop override the default
235versions.
236
237* There is now a working Lib/dospath.py for those who use Python under
238DOS (or Windows). Thanks, Jaap!
239
240* There is now a working Modules/dosmodule.c for DOS (or Windows)
241system calls.
242
243* Lib.os.py has been reorganized (making it ready for more operating
244systems).
245
246* Lib/ospath.py is now obsolete (use os.path instead).
247
248* Many fixes to the tutorial to make it match Python 1.0. Thanks,
249Tim!
250
251* Fixed Doc/Makefile, Doc/README and various scripts there.
252
253* Added missing description of fdopen to Doc/libposix.tex.
254
255* Made cleanup() global, for the benefit of embedded applications.
256
257* Added parsing of addresses and dates to Lib/rfc822.py.
258
259* Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
260them usable at all.
261
262* New module Lib/wave.py reads RIFF (*.wav) audio files.
263
264* Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
265belongs.
266
267* New options and comments for Modules/makesetup (used by new
268Extension mechanism).
269
270* Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
271and elsewhere.
272
273* Fixed coredump in filter(None, 'abcdefg').
274
275
Guido van Rossuma85d0531994-01-26 17:24:14 +0000276=======================================
277==> Release 1.0.0 (26 January 1994) <==
278=======================================
279
280As is traditional, so many things have changed that I can't pretend to
281be complete in these release notes, but I'll try anyway :-)
282
283Note that the very last section is labeled "remaining bugs".
284
285
286Source organization and build process
287-------------------------------------
288
289* The sources have finally been split: instead of a single src
290subdirectory there are now separate directories Include, Parser,
291Grammar, Objects, Python and Modules. Other directories also start
292with a capital letter: Misc, Doc, Lib, Demo.
293
294* A few extensions (notably Amoeba and X support) have been moved to a
295separate subtree Extensions, which is no longer in the core
296distribution, but separately ftp'able as extensions.tar.Z. (The
297distribution contains a placeholder Ext-dummy with a description of
298the Extensions subtree as well as the most recent versions of the
299scripts used there.)
300
301* A few large specialized demos (SGI video and www) have been
302moved to a separate subdirectory Demo2, which is no longer in the core
303distribution, but separately ftp'able as demo2.tar.Z.
304
305* Parts of the standard library have been moved to subdirectories:
306there are now standard subdirectories stdwin, test, sgi and sun4.
307
308* The configuration process has radically changed: I now use GNU
309autoconf. This makes it much easier to build on new Unix flavors, as
310well as fully supporting VPATH (if your Make has it). The scripts
311Configure.py and Addmodule.sh are no longer needed. Many source files
312have been adapted in order to work with the symbols that the configure
313script generated by autoconf defines (or not); the resulting source is
314much more portable to different C compilers and operating systems,
315even non Unix systems (a Mac port was done in an afternoon). See the
316toplevel README file for a description of the new build process.
317
318* GNU readline (a slightly newer version) is now a subdirectory of the
319Python toplevel. It is still not automatically configured (being
320totally autoconf-unaware :-). One problem has been solved: typing
321Control-C to a readline prompt will now work. The distribution no
322longer contains a "super-level" directory (above the python toplevel
323directory), and dl, dl-dld and GNU dld are no longer part of the
324Python distribution (you can still ftp them from
325ftp.cwi.nl:/pub/dynload).
326
327* The DOS functions have been taken out of posixmodule.c and moved
328into a separate file dosmodule.c.
329
330* There's now a separate file version.c which contains nothing but
331the version number.
332
333* The actual main program is now contained in config.c (unless NO_MAIN
334is defined); pythonmain.c now contains a function realmain() which is
335called from config.c's main().
336
337* All files needed to use the built-in module md5 are now contained in
338the distribution. The module has been cleaned up considerably.
339
340
341Documentation
342-------------
343
344* The library manual has been split into many more small latex files,
345so it is easier to edit Doc/lib.tex file to create a custom library
346manual, describing only those modules supported on your system. (This
347is not automated though.)
348
349* A fourth manual has been added, titled "Extending and Embedding the
350Python Interpreter" (Doc/ext.tex), which collects information about
351the interpreter which was previously spread over several files in the
352misc subdirectory.
353
354* The entire documentation is now also available on-line for those who
355have a WWW browser (e.g. NCSA Mosaic). Point your browser to the URL
356"http://www.cwi.nl/~guido/Python.html".
357
358
359Syntax
360------
361
362* Strings may now be enclosed in double quotes as well as in single
363quotes. There is no difference in interpretation. The repr() of
364string objects will use double quotes if the string contains a single
Guido van Rossum51259081994-01-26 18:20:06 +0000365quote and no double quotes. Thanks to Amrit Prem for these changes!
Guido van Rossuma85d0531994-01-26 17:24:14 +0000366
367* There is a new keyword 'exec'. This replaces the exec() built-in
368function. If a function contains an exec statement, local variable
369optimization is not performed for that particular function, thus
370making assignment to local variables in exec statements less
371confusing. (As a consequence, os.exec and python.exec have been
372renamed to execv.)
373
374* There is a new keyword 'lambda'. An expression of the form
375
376 lambda <parameters> : <expression>
377
378yields an anonymous function. This is really only syntactic sugar;
379you can just as well define a local function using
380
381 def some_temporary_name(<parameters>): return <expression>
382
383Lambda expressions are particularly useful in combination with map(),
Guido van Rossum51259081994-01-26 18:20:06 +0000384filter() and reduce(), described below. Thanks to Amrit Prem for
Guido van Rossuma85d0531994-01-26 17:24:14 +0000385submitting this code (as well as map(), filter(), reduce() and
386xrange())!
387
388
389Built-in functions
390------------------
391
392* The built-in module containing the built-in functions is called
393__builtin__ instead of builtin.
394
395* New built-in functions map(), filter() and reduce() perform standard
396functional programming operations (though not lazily):
397
398- map(f, seq) returns a new sequence whose items are the items from
399seq with f() applied to them.
400
401- filter(f, seq) returns a subsequence of seq consisting of those
402items for which f() is true.
403
404- reduce(f, seq, initial) returns a value computed as follows:
405 acc = initial
406 for item in seq: acc = f(acc, item)
407 return acc
408
409* New function xrange() creates a "range object". Its arguments are
410the same as those of range(), and when used in a for loop a range
411objects also behaves identical. The advantage of xrange() over
412range() is that its representation (if the range contains many
413elements) is much more compact than that of range(). The disadvantage
414is that the result cannot be used to initialize a list object or for
415the "Python idiom" [RED, GREEN, BLUE] = range(3). On some modern
416architectures, benchmarks have shown that "for i in range(...): ..."
417actually executes *faster* than "for i in xrange(...): ...", but on
418memory starved machines like PCs running DOS range(100000) may be just
419too big to be represented at all...
420
421* Built-in function exec() has been replaced by the exec statement --
422see above.
423
424
425The interpreter
426---------------
427
428* Syntax errors are now not printed to stderr by the parser, but
429rather the offending line and other relevant information are packed up
430in the SyntaxError exception argument. When the main loop catches a
431SyntaxError exception it will print the error in the same format as
432previously, but at the proper position in the stack traceback.
433
434* You can now set a maximum to the number of traceback entries
435printed by assigning to sys.tracebacklimit. The default is 1000.
436
437* The version number in .pyc files has changed yet again.
438
439* It is now possible to have a .pyc file without a corresponding .py
440file. (Warning: this may break existing installations if you have an
441old .pyc file lingering around somewhere on your module search path
442without a corresponding .py file, when there is a .py file for a
443module of the same name further down the path -- the new interpreter
444will find the first .pyc file and complain about it, while the old
445interpreter would ignore it and use the .py file further down.)
446
447* The list sys.builtin_module_names is now sorted and also contains
448the names of a few hardwired built-in modules (sys, __main__ and
449__builtin__).
450
451* A module can now find its own name by accessing the global variable
452__name__. Assigning to this variable essentially renames the module
453(it should also be stored under a different key in sys.modules).
454A neat hack follows from this: a module that wants to execute a main
455program when called as a script no longer needs to compare
456sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
457
458* When an object is printed by the print statement, its implementation
459of str() is used. This means that classes can define __str__(self) to
460direct how their instances are printed. This is different from
461__repr__(self), which should define an unambigous string
462representation of the instance. (If __str__() is not defined, it
463defaults to __repr__().)
464
465* Functions and code objects can now be compared meaningfully.
466
467* On systems supporting SunOS or SVR4 style shared libraries, dynamic
468loading of modules using shared libraries is automatically configured.
469Thanks to Bill Jansen and Denis Severson for contributing this change!
470
471
472Built-in objects
473----------------
474
475* File objects have acquired a new method writelines() which is the
476reverse of readlines(). (It does not actually write lines, just a
477list of strings, but the symmetry makes the choice of name OK.)
478
479
480Built-in modules
481----------------
482
483* Socket objects no longer support the avail() method. Use the select
484module instead, or use this function to replace it:
485
486 def avail(f):
487 import select
488 return f in select.select([f], [], [], 0)[0]
489
490* Initialization of stdwin is done differently. It actually modifies
491sys.argv (taking out the options the X version of stdwin recognizes)
492the first time it is imported.
493
494* A new built-in module parser provides a rudimentary interface to the
495python parser. Corresponding standard library modules token and symbol
496defines the numeric values of tokens and non-terminal symbols.
497
498* The posix module has aquired new functions setuid(), setgid(),
499execve(), and exec() has been renamed to execv().
500
501* The array module is extended with 8-byte object swaps, the 'i'
502format character, and a reverse() method. The read() and write()
503methods are renamed to fromfile() and tofile().
504
505* The rotor module has freed of portability bugs. This introduces a
506backward compatibility problem: strings encoded with the old rotor
507module can't be decoded by the new version.
508
509* For select.select(), a timeout (4th) argument of None means the same
510as leaving the timeout argument out.
511
512* Module strop (and hence standard library module string) has aquired
Guido van Rossum51259081994-01-26 18:20:06 +0000513a new function: rindex(). Thanks to Amrit Prem!
Guido van Rossuma85d0531994-01-26 17:24:14 +0000514
515* Module regex defines a new function symcomp() which uses an extended
516regular expression syntax: parenthesized subexpressions may be labeled
517using the form "\(<labelname>...\)", and the group() method can return
518sub-expressions by name. Thanks to Tracy Tims for these changes!
519
520* Multiple threads are now supported on Solaris 2. Thanks to Sjoerd
521Mullender!
522
523
524Standard library modules
525------------------------
526
527* The library is now split in several subdirectories: all stuff using
528stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
529is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
530test modules are in Lib/test. The default module search path will
531include all relevant subdirectories by default.
532
533* Module os now knows about trying to import dos. It defines
534functions execl(), execle(), execlp() and execvp().
535
536* New module dospath (should be attacked by a DOS hacker though).
537
538* All modules defining classes now define __init__() constructors
539instead of init() methods. THIS IS AN INCOMPATIBLE CHANGE!
540
541* Some minor changes and bugfixes module ftplib (mostly Steve
542Majewski's suggestions); the debug() method is renamed to
543set_debuglevel().
544
545* Some new test modules (not run automatically by testall though):
546test_audioop, test_md5, test_rgbimg, test_select.
547
548* Module string now defines rindex() and rfind() in analogy of index()
549and find(). It also defines atof() and atol() (and corresponding
550exceptions) in analogy to atoi().
551
552* Added help() functions to modules profile and pdb.
553
554* The wdb debugger (now in Lib/stdwin) now shows class or instance
555variables on a double click. Thanks to Sjoerd Mullender!
556
557* The (undocumented) module lambda has gone -- you couldn't import it
558any more, and it was basically more a demo than a library module...
559
560
561Multimedia extensions
562---------------------
563
564* The optional built-in modules audioop and imageop are now standard
565parts of the interpreter. Thanks to Sjoerd Mullender and Jack Jansen
566for contributing this code!
567
568* There's a new operation in audioop: minmax().
569
570* There's a new built-in module called rgbimg which supports portable
571efficient reading of SGI RCG image files. Thanks also to Paul
572Haeberli for the original code! (Who will contribute a GIF reader?)
573
574* The module aifc is gone -- you should now always use aifc, which has
575received a facelift.
576
577* There's a new module sunau., for reading Sun (and NeXT) audio files.
578
579* There's a new module audiodev which provides a uniform interface to
580(SGI Indigo and Sun Sparc) audio hardware.
581
582* There's a new module sndhdr which recognizes various sound files by
583looking in their header and checking for various magic words.
584
585
586Optimizations
587-------------
588
589* Most optimizations below can be configured by compile-time flags.
590Thanks to Sjoerd Mullender for submitting these optimizations!
591
592* Small integers (default -1..99) are shared -- i.e. if two different
593functions compute the same value it is possible (but not
594guaranteed!!!) that they return the same *object*. Python programs
595can detect this but should *never* rely on it.
596
597* Empty tuples (which all compare equal) are shared in the same
598manner.
599
600* Tuples of size up to 20 (default) are put in separate free lists
601when deallocated.
602
603* There is a compile-time option to cache a string's hash function,
604but this appeared to have a negligeable effect, and as it costs 4
605bytes per string it is disabled by default.
606
607
608Embedding Python
609----------------
610
611* The initialization interface has been simplified somewhat. You now
612only call "initall()" to initialize the interpreter.
613
614* The previously announced renaming of externally visible identifiers
615has not been carried out. It will happen in a later release. Sorry.
616
617
618Miscellaneous bugs that have been fixed
619---------------------------------------
620
621* All known portability bugs.
622
623* Version 0.9.9 dumped core in <listobject>.sort() which has been
624fixed. Thanks to Jaap Vermeulen for fixing this and posting the fix
625on the mailing list while I was away!
626
627* Core dump on a format string ending in '%', e.g. in the expression
628'%' % None.
629
630* The array module yielded a bogus result for concatenation (a+b would
631yield a+a).
632
633* Some serious memory leaks in strop.split() and strop.splitfields().
634
635* Several problems with the nis module.
636
637* Subtle problem when copying a class method from another class
638through assignment (the method could not be called).
639
640
641Remaining bugs
642--------------
643
644* One problem with 64-bit machines remains -- since .pyc files are
645portable and use only 4 bytes to represent an integer object, 64-bit
646integer literals are silently truncated when written into a .pyc file.
647Work-around: use eval('123456789101112').
648
649* The freeze script doesn't work any more. A new and more portable
650one can probably be cooked up using tricks from Extensions/mkext.py.
651
652* The dos support hasn't been tested yet. (Really Soon Now we should
653have a PC with a working C compiler!)
654
655
656--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
657URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>