blob: 5c7a0cf4d9ae203a263ff6f303329628acd23d08 [file] [log] [blame]
Guido van Rossum617536e1994-04-14 13:01:54 +00001========================================
2==> Release 1.0.1 (15 February 1994) <==
3========================================
4
5* Many portability fixes should make it painless to build Python on
6several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
7
8* Fixed test for <stdarg.h> -- this broke on some platforms.
9
10* Fixed test for shared library dynalic loading -- this broke on SunOS
114.x using the GNU loader.
12
13* Changed order and number of SVR4 networking libraries (it is now
14-lsocket -linet -lnsl, if these libraries exist).
15
16* Installing the build intermediate stages with "make libainstall" now
17also installs config.c.in, Setup and makesetup, which are used by the
18new Extensions mechanism.
19
20* Improved README file contains more hints and new troubleshooting
21section.
22
23* The built-in module strop now defines fast versions of three more
24functions of the standard string module: atoi(), atol() and atof().
25The strop versions of atoi() and atol() support an optional second
26argument to specify the base (default 10). NOTE: you don't have to
27explicitly import strop to use the faster versions -- the string
28module contains code to let versions from stop override the default
29versions.
30
31* There is now a working Lib/dospath.py for those who use Python under
32DOS (or Windows). Thanks, Jaap!
33
34* There is now a working Modules/dosmodule.c for DOS (or Windows)
35system calls.
36
37* Lib.os.py has been reorganized (making it ready for more operating
38systems).
39
40* Lib/ospath.py is now obsolete (use os.path instead).
41
42* Many fixes to the tutorial to make it match Python 1.0. Thanks,
43Tim!
44
45* Fixed Doc/Makefile, Doc/README and various scripts there.
46
47* Added missing description of fdopen to Doc/libposix.tex.
48
49* Made cleanup() global, for the benefit of embedded applications.
50
51* Added parsing of addresses and dates to Lib/rfc822.py.
52
53* Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
54them usable at all.
55
56* New module Lib/wave.py reads RIFF (*.wav) audio files.
57
58* Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
59belongs.
60
61* New options and comments for Modules/makesetup (used by new
62Extension mechanism).
63
64* Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
65and elsewhere.
66
67* Fixed coredump in filter(None, 'abcdefg').
68
69
Guido van Rossuma85d0531994-01-26 17:24:14 +000070=======================================
71==> Release 1.0.0 (26 January 1994) <==
72=======================================
73
74As is traditional, so many things have changed that I can't pretend to
75be complete in these release notes, but I'll try anyway :-)
76
77Note that the very last section is labeled "remaining bugs".
78
79
80Source organization and build process
81-------------------------------------
82
83* The sources have finally been split: instead of a single src
84subdirectory there are now separate directories Include, Parser,
85Grammar, Objects, Python and Modules. Other directories also start
86with a capital letter: Misc, Doc, Lib, Demo.
87
88* A few extensions (notably Amoeba and X support) have been moved to a
89separate subtree Extensions, which is no longer in the core
90distribution, but separately ftp'able as extensions.tar.Z. (The
91distribution contains a placeholder Ext-dummy with a description of
92the Extensions subtree as well as the most recent versions of the
93scripts used there.)
94
95* A few large specialized demos (SGI video and www) have been
96moved to a separate subdirectory Demo2, which is no longer in the core
97distribution, but separately ftp'able as demo2.tar.Z.
98
99* Parts of the standard library have been moved to subdirectories:
100there are now standard subdirectories stdwin, test, sgi and sun4.
101
102* The configuration process has radically changed: I now use GNU
103autoconf. This makes it much easier to build on new Unix flavors, as
104well as fully supporting VPATH (if your Make has it). The scripts
105Configure.py and Addmodule.sh are no longer needed. Many source files
106have been adapted in order to work with the symbols that the configure
107script generated by autoconf defines (or not); the resulting source is
108much more portable to different C compilers and operating systems,
109even non Unix systems (a Mac port was done in an afternoon). See the
110toplevel README file for a description of the new build process.
111
112* GNU readline (a slightly newer version) is now a subdirectory of the
113Python toplevel. It is still not automatically configured (being
114totally autoconf-unaware :-). One problem has been solved: typing
115Control-C to a readline prompt will now work. The distribution no
116longer contains a "super-level" directory (above the python toplevel
117directory), and dl, dl-dld and GNU dld are no longer part of the
118Python distribution (you can still ftp them from
119ftp.cwi.nl:/pub/dynload).
120
121* The DOS functions have been taken out of posixmodule.c and moved
122into a separate file dosmodule.c.
123
124* There's now a separate file version.c which contains nothing but
125the version number.
126
127* The actual main program is now contained in config.c (unless NO_MAIN
128is defined); pythonmain.c now contains a function realmain() which is
129called from config.c's main().
130
131* All files needed to use the built-in module md5 are now contained in
132the distribution. The module has been cleaned up considerably.
133
134
135Documentation
136-------------
137
138* The library manual has been split into many more small latex files,
139so it is easier to edit Doc/lib.tex file to create a custom library
140manual, describing only those modules supported on your system. (This
141is not automated though.)
142
143* A fourth manual has been added, titled "Extending and Embedding the
144Python Interpreter" (Doc/ext.tex), which collects information about
145the interpreter which was previously spread over several files in the
146misc subdirectory.
147
148* The entire documentation is now also available on-line for those who
149have a WWW browser (e.g. NCSA Mosaic). Point your browser to the URL
150"http://www.cwi.nl/~guido/Python.html".
151
152
153Syntax
154------
155
156* Strings may now be enclosed in double quotes as well as in single
157quotes. There is no difference in interpretation. The repr() of
158string objects will use double quotes if the string contains a single
Guido van Rossum51259081994-01-26 18:20:06 +0000159quote and no double quotes. Thanks to Amrit Prem for these changes!
Guido van Rossuma85d0531994-01-26 17:24:14 +0000160
161* There is a new keyword 'exec'. This replaces the exec() built-in
162function. If a function contains an exec statement, local variable
163optimization is not performed for that particular function, thus
164making assignment to local variables in exec statements less
165confusing. (As a consequence, os.exec and python.exec have been
166renamed to execv.)
167
168* There is a new keyword 'lambda'. An expression of the form
169
170 lambda <parameters> : <expression>
171
172yields an anonymous function. This is really only syntactic sugar;
173you can just as well define a local function using
174
175 def some_temporary_name(<parameters>): return <expression>
176
177Lambda expressions are particularly useful in combination with map(),
Guido van Rossum51259081994-01-26 18:20:06 +0000178filter() and reduce(), described below. Thanks to Amrit Prem for
Guido van Rossuma85d0531994-01-26 17:24:14 +0000179submitting this code (as well as map(), filter(), reduce() and
180xrange())!
181
182
183Built-in functions
184------------------
185
186* The built-in module containing the built-in functions is called
187__builtin__ instead of builtin.
188
189* New built-in functions map(), filter() and reduce() perform standard
190functional programming operations (though not lazily):
191
192- map(f, seq) returns a new sequence whose items are the items from
193seq with f() applied to them.
194
195- filter(f, seq) returns a subsequence of seq consisting of those
196items for which f() is true.
197
198- reduce(f, seq, initial) returns a value computed as follows:
199 acc = initial
200 for item in seq: acc = f(acc, item)
201 return acc
202
203* New function xrange() creates a "range object". Its arguments are
204the same as those of range(), and when used in a for loop a range
205objects also behaves identical. The advantage of xrange() over
206range() is that its representation (if the range contains many
207elements) is much more compact than that of range(). The disadvantage
208is that the result cannot be used to initialize a list object or for
209the "Python idiom" [RED, GREEN, BLUE] = range(3). On some modern
210architectures, benchmarks have shown that "for i in range(...): ..."
211actually executes *faster* than "for i in xrange(...): ...", but on
212memory starved machines like PCs running DOS range(100000) may be just
213too big to be represented at all...
214
215* Built-in function exec() has been replaced by the exec statement --
216see above.
217
218
219The interpreter
220---------------
221
222* Syntax errors are now not printed to stderr by the parser, but
223rather the offending line and other relevant information are packed up
224in the SyntaxError exception argument. When the main loop catches a
225SyntaxError exception it will print the error in the same format as
226previously, but at the proper position in the stack traceback.
227
228* You can now set a maximum to the number of traceback entries
229printed by assigning to sys.tracebacklimit. The default is 1000.
230
231* The version number in .pyc files has changed yet again.
232
233* It is now possible to have a .pyc file without a corresponding .py
234file. (Warning: this may break existing installations if you have an
235old .pyc file lingering around somewhere on your module search path
236without a corresponding .py file, when there is a .py file for a
237module of the same name further down the path -- the new interpreter
238will find the first .pyc file and complain about it, while the old
239interpreter would ignore it and use the .py file further down.)
240
241* The list sys.builtin_module_names is now sorted and also contains
242the names of a few hardwired built-in modules (sys, __main__ and
243__builtin__).
244
245* A module can now find its own name by accessing the global variable
246__name__. Assigning to this variable essentially renames the module
247(it should also be stored under a different key in sys.modules).
248A neat hack follows from this: a module that wants to execute a main
249program when called as a script no longer needs to compare
250sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
251
252* When an object is printed by the print statement, its implementation
253of str() is used. This means that classes can define __str__(self) to
254direct how their instances are printed. This is different from
255__repr__(self), which should define an unambigous string
256representation of the instance. (If __str__() is not defined, it
257defaults to __repr__().)
258
259* Functions and code objects can now be compared meaningfully.
260
261* On systems supporting SunOS or SVR4 style shared libraries, dynamic
262loading of modules using shared libraries is automatically configured.
263Thanks to Bill Jansen and Denis Severson for contributing this change!
264
265
266Built-in objects
267----------------
268
269* File objects have acquired a new method writelines() which is the
270reverse of readlines(). (It does not actually write lines, just a
271list of strings, but the symmetry makes the choice of name OK.)
272
273
274Built-in modules
275----------------
276
277* Socket objects no longer support the avail() method. Use the select
278module instead, or use this function to replace it:
279
280 def avail(f):
281 import select
282 return f in select.select([f], [], [], 0)[0]
283
284* Initialization of stdwin is done differently. It actually modifies
285sys.argv (taking out the options the X version of stdwin recognizes)
286the first time it is imported.
287
288* A new built-in module parser provides a rudimentary interface to the
289python parser. Corresponding standard library modules token and symbol
290defines the numeric values of tokens and non-terminal symbols.
291
292* The posix module has aquired new functions setuid(), setgid(),
293execve(), and exec() has been renamed to execv().
294
295* The array module is extended with 8-byte object swaps, the 'i'
296format character, and a reverse() method. The read() and write()
297methods are renamed to fromfile() and tofile().
298
299* The rotor module has freed of portability bugs. This introduces a
300backward compatibility problem: strings encoded with the old rotor
301module can't be decoded by the new version.
302
303* For select.select(), a timeout (4th) argument of None means the same
304as leaving the timeout argument out.
305
306* Module strop (and hence standard library module string) has aquired
Guido van Rossum51259081994-01-26 18:20:06 +0000307a new function: rindex(). Thanks to Amrit Prem!
Guido van Rossuma85d0531994-01-26 17:24:14 +0000308
309* Module regex defines a new function symcomp() which uses an extended
310regular expression syntax: parenthesized subexpressions may be labeled
311using the form "\(<labelname>...\)", and the group() method can return
312sub-expressions by name. Thanks to Tracy Tims for these changes!
313
314* Multiple threads are now supported on Solaris 2. Thanks to Sjoerd
315Mullender!
316
317
318Standard library modules
319------------------------
320
321* The library is now split in several subdirectories: all stuff using
322stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
323is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
324test modules are in Lib/test. The default module search path will
325include all relevant subdirectories by default.
326
327* Module os now knows about trying to import dos. It defines
328functions execl(), execle(), execlp() and execvp().
329
330* New module dospath (should be attacked by a DOS hacker though).
331
332* All modules defining classes now define __init__() constructors
333instead of init() methods. THIS IS AN INCOMPATIBLE CHANGE!
334
335* Some minor changes and bugfixes module ftplib (mostly Steve
336Majewski's suggestions); the debug() method is renamed to
337set_debuglevel().
338
339* Some new test modules (not run automatically by testall though):
340test_audioop, test_md5, test_rgbimg, test_select.
341
342* Module string now defines rindex() and rfind() in analogy of index()
343and find(). It also defines atof() and atol() (and corresponding
344exceptions) in analogy to atoi().
345
346* Added help() functions to modules profile and pdb.
347
348* The wdb debugger (now in Lib/stdwin) now shows class or instance
349variables on a double click. Thanks to Sjoerd Mullender!
350
351* The (undocumented) module lambda has gone -- you couldn't import it
352any more, and it was basically more a demo than a library module...
353
354
355Multimedia extensions
356---------------------
357
358* The optional built-in modules audioop and imageop are now standard
359parts of the interpreter. Thanks to Sjoerd Mullender and Jack Jansen
360for contributing this code!
361
362* There's a new operation in audioop: minmax().
363
364* There's a new built-in module called rgbimg which supports portable
365efficient reading of SGI RCG image files. Thanks also to Paul
366Haeberli for the original code! (Who will contribute a GIF reader?)
367
368* The module aifc is gone -- you should now always use aifc, which has
369received a facelift.
370
371* There's a new module sunau., for reading Sun (and NeXT) audio files.
372
373* There's a new module audiodev which provides a uniform interface to
374(SGI Indigo and Sun Sparc) audio hardware.
375
376* There's a new module sndhdr which recognizes various sound files by
377looking in their header and checking for various magic words.
378
379
380Optimizations
381-------------
382
383* Most optimizations below can be configured by compile-time flags.
384Thanks to Sjoerd Mullender for submitting these optimizations!
385
386* Small integers (default -1..99) are shared -- i.e. if two different
387functions compute the same value it is possible (but not
388guaranteed!!!) that they return the same *object*. Python programs
389can detect this but should *never* rely on it.
390
391* Empty tuples (which all compare equal) are shared in the same
392manner.
393
394* Tuples of size up to 20 (default) are put in separate free lists
395when deallocated.
396
397* There is a compile-time option to cache a string's hash function,
398but this appeared to have a negligeable effect, and as it costs 4
399bytes per string it is disabled by default.
400
401
402Embedding Python
403----------------
404
405* The initialization interface has been simplified somewhat. You now
406only call "initall()" to initialize the interpreter.
407
408* The previously announced renaming of externally visible identifiers
409has not been carried out. It will happen in a later release. Sorry.
410
411
412Miscellaneous bugs that have been fixed
413---------------------------------------
414
415* All known portability bugs.
416
417* Version 0.9.9 dumped core in <listobject>.sort() which has been
418fixed. Thanks to Jaap Vermeulen for fixing this and posting the fix
419on the mailing list while I was away!
420
421* Core dump on a format string ending in '%', e.g. in the expression
422'%' % None.
423
424* The array module yielded a bogus result for concatenation (a+b would
425yield a+a).
426
427* Some serious memory leaks in strop.split() and strop.splitfields().
428
429* Several problems with the nis module.
430
431* Subtle problem when copying a class method from another class
432through assignment (the method could not be called).
433
434
435Remaining bugs
436--------------
437
438* One problem with 64-bit machines remains -- since .pyc files are
439portable and use only 4 bytes to represent an integer object, 64-bit
440integer literals are silently truncated when written into a .pyc file.
441Work-around: use eval('123456789101112').
442
443* The freeze script doesn't work any more. A new and more portable
444one can probably be cooked up using tricks from Extensions/mkext.py.
445
446* The dos support hasn't been tested yet. (Really Soon Now we should
447have a PC with a working C compiler!)
448
449
450--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
451URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>