Guido van Rossum | f0b69f0 | 1997-08-15 02:50:47 +0000 | [diff] [blame] | 1 | What's new in this release? |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2 | =========================== |
| 3 | |
Guido van Rossum | e96bd3f | 1998-12-21 21:45:04 +0000 | [diff] [blame] | 4 | Below is a list of all relevant changes since release 1.5.1. Older |
| 5 | changes are in the file HISTORY. The most recent changes are listed |
| 6 | first. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 7 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 8 | A note on attributions: while I have sprinkled some names throughout |
Guido van Rossum | 7ea639b | 1997-11-26 16:36:28 +0000 | [diff] [blame] | 9 | here, I'm grateful to many more people who remain unnamed. You may |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 10 | find your name in the ACKS file. If you believe you deserve more |
| 11 | credit, let me know and I'll add you to the list! |
| 12 | |
| 13 | |
Guido van Rossum | 7ea639b | 1997-11-26 16:36:28 +0000 | [diff] [blame] | 14 | ====================================================================== |
| 15 | |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | 74608e6 | 1999-02-18 16:02:20 +0000 | [diff] [blame^] | 17 | From 1.5.2b1 to 1.5.2b2 |
| 18 | ======================= |
| 19 | |
| 20 | General |
| 21 | ------- |
| 22 | |
| 23 | - Many memory leaks fixed. |
| 24 | |
| 25 | - Many small bugs fixed. |
| 26 | |
| 27 | - Command line option -OO (or -O -O) suppresses inclusion of doc |
| 28 | strings in resulting bytecode. |
| 29 | |
| 30 | Windows-specific changes |
| 31 | ------------------------ |
| 32 | |
| 33 | - New built-in module winsound provides an interface to the Win32 |
| 34 | PlaySound() call. |
| 35 | |
| 36 | - Re-enable the audioop module in the config.c file. |
| 37 | |
| 38 | - On Windows, support spawnv() and associated P_* symbols. |
| 39 | |
| 40 | - Fixed the conversion of times() return values on Windows. |
| 41 | |
| 42 | - Removed freeze from the installer -- it doesn't work without the |
| 43 | source tree. (See FAQ 8.11.) |
| 44 | |
| 45 | - On Windows 95/98, the Tkinter module now is smart enough to find |
| 46 | Tcl/Tk even when the PATH environment variable hasn't been set -- when |
| 47 | the import of _tkinter fails, it searches in a standard locations, |
| 48 | patches os.environ["PATH"], and tries again. When it still fails, a |
| 49 | clearer error message is produced. This should avoid most |
| 50 | installation problems with Tkinter use (e.g. in IDLE). |
| 51 | |
| 52 | - The -i option doesn't make any calls to set[v]buf() for stdin -- |
| 53 | this apparentlt screwed up _kbhit() and the _tkinter main loop. |
| 54 | |
| 55 | - The ntpath module (and hence, os.path on Windows) now parses out UNC |
| 56 | paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that |
| 57 | splitdrive() will \\host\mountpoint as the drive and \dir\file as the |
| 58 | path. ** EXPERIMENTAL ** |
| 59 | |
| 60 | - Added a hack to the exit code so that if (1) the exit status is |
| 61 | nonzero and (2) we think we have our own DOS box (i.e. we're not |
| 62 | started from a command line shell), we print a message and wait for |
| 63 | the user to hit a key before the DOS box is closed. |
| 64 | |
| 65 | - Updated the installer to WISE 5.0g. Added a dialog warning about |
| 66 | the imminent Tcl installation. Added a dialog to specify the program |
| 67 | group name in the start menu. Upgraded the Tcl installer to Tcl |
| 68 | 8.0.4. |
| 69 | |
| 70 | Changes to intrinsics |
| 71 | --------------------- |
| 72 | |
| 73 | - The repr() or str() of a module object now shows the __file__ |
| 74 | attribute (i.e., the file which it was loaded), or the string |
| 75 | "(built-in)" if there is no __file__ attribute. |
| 76 | |
| 77 | - The range() function now avoids overflow during its calculations (if |
| 78 | at all possible). |
| 79 | |
| 80 | - New info string sys.hexversion, which is an integer encoding the |
| 81 | version in hexadecimal. In other words, hex(sys.hexversion) == |
| 82 | 0x010502b2 for Python 1.5.2b2. |
| 83 | |
| 84 | New or improved ports |
| 85 | --------------------- |
| 86 | |
| 87 | - Support for Nextstep descendants (future Mac systems). |
| 88 | |
| 89 | - Improved BeOS support. |
| 90 | |
| 91 | - Support dynamic loading of shared libraries on NetBSD platforms that |
| 92 | use ELF (i.e., MIPS and Alpha systems). |
| 93 | |
| 94 | Configuration/build changes |
| 95 | --------------------------- |
| 96 | |
| 97 | - The Lib/test directory is no longer included in the default module |
| 98 | search path (sys.path) -- "test" has been a package ever since 1.5. |
| 99 | |
| 100 | - Now using autoconf 2.13. |
| 101 | |
| 102 | New library modules |
| 103 | ------------------- |
| 104 | |
| 105 | - New library modules asyncore and asynchat: these form Sam Rushing's |
| 106 | famous asynchronous socket library. Sam has gracefully allowed me to |
| 107 | incorporate these in the standard Python library. |
| 108 | |
| 109 | - New module statvfs contains indexing constants for [f]statvfs() |
| 110 | return tuple. |
| 111 | |
| 112 | Changes to the library |
| 113 | ---------------------- |
| 114 | |
| 115 | - The wave module (platform-independent support for Windows sound |
| 116 | files) has been fixed to actually make it work. |
| 117 | |
| 118 | - The sunau module (platform-independent support for Sun/NeXT sound |
| 119 | files) has been fixed to work across platforms. Also, a weird |
| 120 | encoding bug in the header of the audio test data file has been |
| 121 | corrected. |
| 122 | |
| 123 | - Fix a bug in the urllib module that occasionally tripped up |
| 124 | webchecker and other ftp retrieves. |
| 125 | |
| 126 | - ConfigParser's get() method now accepts an optional keyword argument |
| 127 | (vars) that is substituted on top of the defaults that were setup in |
| 128 | __init__. You can now also have recusive references in your |
| 129 | configuration file. |
| 130 | |
| 131 | - Some improvements to the Queue module, including a put_nowait() |
| 132 | module and an optional "block" second argument, to get() and put(), |
| 133 | defaulting to 1. |
| 134 | |
| 135 | - The updated xmllib module is once again compatible with the version |
| 136 | present in Python 1.5.1 (this was accidentally broken in 1.5.2b1). |
| 137 | |
| 138 | - The bdb module (base class for the debugger) now supports |
| 139 | canonicalizing pathnames used in breakpoints. The derived class must |
| 140 | override the new canonical() method for this to work. Also changed |
| 141 | clear_break() to the backwards compatible old signature, and added |
| 142 | clear_bpbynumber() for the new functionality. |
| 143 | |
| 144 | - In sgmllib (and hence htmllib), recognize attributes even if they |
| 145 | don't have space in front of them. I.e. '<a |
| 146 | name="foo"href="bar.html">' will now have two attributes recognized. |
| 147 | |
| 148 | - In the debugger (pdb), change clear syntax to support three |
| 149 | alternatives: clear; clear file:line; clear bpno bpno ... |
| 150 | |
| 151 | - The os.path module now pretends to be a submodule within the os |
| 152 | "package", so you can do things like "from os.path import exists". |
| 153 | |
| 154 | - The standard exceptions now have doc strings. |
| 155 | |
| 156 | - In the smtplib module, exceptions are now classes. Also avoid |
| 157 | inserting a non-standard space after "TO" in rcpt() command. |
| 158 | |
| 159 | - The rfc822 module's getaddrlist() method now uses all occurrences of |
| 160 | the specified header instead of just the first. Some other bugfixes |
| 161 | too (to handle more weird addresses found in a very large test set, |
| 162 | and to avoid crashes on certain invalid dates), and a small test |
| 163 | module has been added. |
| 164 | |
| 165 | - Fixed bug in urlparse in the common-case code for HTTP URLs; it |
| 166 | would lose the query, fragment, and/or parameter information. |
| 167 | |
| 168 | - The sndhdr module no longer supports whatraw() -- it depended on a |
| 169 | rare extenral program. |
| 170 | |
| 171 | - The UserList module/class now supports the extend() method, like |
| 172 | real list objects. |
| 173 | |
| 174 | - The uu module now deals better with trailing garbage generated by |
| 175 | some broke uuencoders. |
| 176 | |
| 177 | - The telnet module now has an my_interact() method which uses threads |
| 178 | instead of select. The interact() method uses this by default on |
| 179 | Windows (where the single-threaded version doesn't work). |
| 180 | |
| 181 | - Add a class to mailbox.py for dealing with qmail directory |
| 182 | mailboxes. The test code was extended to notice these being used as |
| 183 | well. |
| 184 | |
| 185 | Changes to extension modules |
| 186 | ---------------------------- |
| 187 | |
| 188 | - Support for the [f]statvfs() system call, where it exists. |
| 189 | |
| 190 | - Fixed some bugs in cPickle where bad input could cause it to dump |
| 191 | core. |
| 192 | |
| 193 | - Fixed cStringIO to make the writelines() function actually work. |
| 194 | |
| 195 | - Added strop.expandtabs() so string.expandtabs() is now much faster. |
| 196 | |
| 197 | - Added fsync() and fdatasync(), if they appear to exist. |
| 198 | |
| 199 | - Support for "long files" (64-bit seek pointers). |
| 200 | |
| 201 | - Fixed a bug in the zlib module's flush() function. |
| 202 | |
| 203 | - Added access() system call. It returns 1 if access granted, 0 if |
| 204 | not. |
| 205 | |
| 206 | - The curses module implements an optional nlines argument to |
| 207 | w.scroll(). (It then calls wscrl(win, nlines) instead of scoll(win).) |
| 208 | |
| 209 | Changes to tools |
| 210 | ---------------- |
| 211 | |
| 212 | - Some changes to IDLE; see Tools/idle/NEWS.txt. |
| 213 | |
| 214 | - Latest version of Misc/python-mode.el included. |
| 215 | |
| 216 | Changes to Tkinter |
| 217 | ------------------ |
| 218 | |
| 219 | - Avoid tracebacks when an image is deleted after its root has been |
| 220 | destroyed. |
| 221 | |
| 222 | Changes to the Python/C API |
| 223 | --------------------------- |
| 224 | |
| 225 | - When parentheses are used in a PyArg_Parse[Tuple]() call, any |
| 226 | sequence is now accepted, instead of requiring a tuple. This is in |
| 227 | line with the general trend towards accepting arbitrary sequences. |
| 228 | |
| 229 | - Added PyModule_GetFilename(). |
| 230 | |
| 231 | - In PyNumber_Power(), remove unneeded and even harmful test for float |
| 232 | to the negative power (which is already and better done in |
| 233 | floatobject.c). |
| 234 | |
| 235 | - New version identification symbols; read patchlevel.h for info. The |
| 236 | version numbers are now exported by Python.h. |
| 237 | |
| 238 | - Rolled back the API version change -- it's back to 1007! |
| 239 | |
| 240 | - The frozenmain.c function calls PyInitFrozenExtensions(). |
| 241 | |
| 242 | - Added 'N' format character to Py_BuildValue -- like 'O' but doesn't |
| 243 | INCREF. |
| 244 | |
| 245 | |
| 246 | ====================================================================== |
| 247 | |
| 248 | |
Guido van Rossum | e96bd3f | 1998-12-21 21:45:04 +0000 | [diff] [blame] | 249 | From 1.5.2a2 to 1.5.2b1 |
| 250 | ======================= |
| 251 | |
| 252 | Changes to intrinsics |
| 253 | --------------------- |
| 254 | |
| 255 | - New extension NotImplementedError, derived from RuntimeError. Not |
| 256 | used, but recommended use is for "abstract" methods to raise this. |
| 257 | |
| 258 | - The parser will now spit out a warning or error when -t or -tt is |
| 259 | used for parser input coming from a string, too. |
| 260 | |
| 261 | - The code generator now inserts extra SET_LINENO opcodes when |
| 262 | compiling multi-line argument lists. |
| 263 | |
| 264 | - When comparing bound methods, use identity test on the objects, not |
| 265 | equality test. |
| 266 | |
| 267 | New or improved ports |
| 268 | --------------------- |
| 269 | |
| 270 | - Chris Herborth has redone his BeOS port; it now works on PowerPC |
| 271 | (R3/R4) and x86 (R4 only). Threads work too in this port. |
| 272 | |
| 273 | Renaming |
| 274 | -------- |
| 275 | |
| 276 | - Thanks to Chris Herborth, the thread primitives now have proper Py* |
| 277 | names in the source code (they already had those for the linker, |
| 278 | through some smart macros; but the source still had the old, un-Py |
| 279 | names). |
| 280 | |
| 281 | Configuration/build changes |
| 282 | --------------------------- |
| 283 | |
| 284 | - Improved support for FreeBSD/3. |
| 285 | |
| 286 | - Check for pthread_detach instead of pthread_create in libc. |
| 287 | |
| 288 | - The makesetup script now searches EXECINCLUDEPY before INCLUDEPY. |
| 289 | |
| 290 | - Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local. |
| 291 | Otherwise modules such as thread didn't get incorporated in extensions. |
| 292 | |
| 293 | New library modules |
| 294 | ------------------- |
| 295 | |
Guido van Rossum | de8b026 | 1998-12-22 16:41:09 +0000 | [diff] [blame] | 296 | - shlex.py by Eric Raymond provides a lexical analyzer class for |
| 297 | simple shell-like syntaxes. |
| 298 | |
| 299 | - netrc.py by Eric Raymond provides a parser for .netrc files. (The |
| 300 | undocumented Netrc class in ftplib.py is now obsolete.) |
| 301 | |
Guido van Rossum | e96bd3f | 1998-12-21 21:45:04 +0000 | [diff] [blame] | 302 | - codeop.py is a new module that contains the compile_command() |
| 303 | function that was previously in code.py. This is so that JPython can |
| 304 | provide its own version of this function, while still sharing the |
| 305 | higher-level classes in code.py. |
| 306 | |
| 307 | - turtle.py is a new module for simple turtle graphics. I'm still |
| 308 | working on it; let me know if you use this to teach Python to children |
| 309 | or other novices without prior programming experience. |
| 310 | |
| 311 | Obsoleted library modules |
| 312 | ------------------------- |
| 313 | |
| 314 | - poly.py and zmod.py have been moved to Lib/lib-old to emphasize |
| 315 | their status of obsoleteness. They don't do a particularly good job |
| 316 | and don't seem particularly relevant to the Python core. |
| 317 | |
| 318 | New tools |
| 319 | --------- |
| 320 | |
| 321 | - I've added IDLE: my Integrated DeveLopment Environment for Python. |
| 322 | Requires Tcl/Tk (and Tkinter). Works on Windows and Unix (and should |
| 323 | work on Macintosh, but I haven't been able to test it there; it does |
| 324 | depend on new features in 1.5.2 and perhaps even new features in |
| 325 | 1.5.2b1, especially the new code module). This is very much a work in |
| 326 | progress. I'd like to hear how people like it compared to PTUI (or |
| 327 | any other IDE they are familiar with). |
| 328 | |
| 329 | - New tools by Barry Warsaw: |
| 330 | |
| 331 | = audiopy: controls the Solaris Audio device |
| 332 | = pynche: The PYthonically Natural Color and Hue Editor |
| 333 | = world: Print mappings between country names and DNS country codes |
| 334 | |
| 335 | New demos |
| 336 | --------- |
| 337 | |
| 338 | - Demo/scripts/beer.py prints the lyrics to an arithmetic drinking |
| 339 | song. |
| 340 | |
| 341 | - Demo/tkinter/guido/optionmenu.py shows how to do an option menu in |
| 342 | Tkinter. (By Fredrik Lundh -- not by me!) |
| 343 | |
| 344 | Changes to the library |
| 345 | ---------------------- |
| 346 | |
| 347 | - compileall.py now avoids recompiling .py files that haven't changed; |
| 348 | it adds a -f option to force recompilation. |
| 349 | |
| 350 | - New version of xmllib.py by Sjoerd Mullender (0.2 with latest |
| 351 | patches). |
| 352 | |
| 353 | - nntplib.py: statparse() no longer lowercases the message-id. |
| 354 | |
| 355 | - types.py: use type(__stdin__) for FileType. |
| 356 | |
| 357 | - urllib.py: fix translations for filenames with "funny" characters. |
Guido van Rossum | de8b026 | 1998-12-22 16:41:09 +0000 | [diff] [blame] | 358 | Patch by Sjoerd Mullender. Note that if you subclass one of the |
| 359 | URLopener classes, and you have copied code from the old urllib.py, |
| 360 | your subclass may stop working. A long-term solution is to provide |
| 361 | more methods so that you don't have to copy code. |
Guido van Rossum | e96bd3f | 1998-12-21 21:45:04 +0000 | [diff] [blame] | 362 | |
| 363 | - cgi.py: In read_multi, allow a subclass to override the class we |
| 364 | instantiate when we create a recursive instance, by setting the class |
| 365 | variable 'FieldStorageClass' to the desired class. By default, this |
| 366 | is set to None, in which case we use self.__class__ (as before). |
| 367 | Also, a patch by Jim Fulton to pass additional arguments to recursive |
| 368 | calls to the FieldStorage constructor from its read_multi method. |
| 369 | |
| 370 | - UserList.py: In __getslice__, use self.__class__ instead of |
| 371 | UserList. |
| 372 | |
| 373 | - In SimpleHTTPServer.py, the server specified in test() should be |
| 374 | BaseHTTPServer.HTTPServer, in case the request handler should want to |
| 375 | reference the two attributes added by BaseHTTPServer.server_bind. (By |
| 376 | Jeff Rush, for Bobo). Also open the file in binary mode, so serving |
| 377 | images from a Windows box might actually work. |
| 378 | |
| 379 | - In CGIHTTPServer.py, the list of acceptable formats is -split- |
| 380 | on spaces but -joined- on commas, resulting in double commas |
| 381 | in the joined text. (By Jeff Rush.) |
| 382 | |
| 383 | - SocketServer.py, patch by Jeff Bauer: a minor change to declare two |
| 384 | new threaded versions of Unix Server classes, using the ThreadingMixIn |
| 385 | class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer. |
| 386 | |
| 387 | - bdb.py: fix bomb on deleting a temporary breakpoint: there's no |
| 388 | method do_delete(); do_clear() was meant. By Greg Ward. |
| 389 | |
| 390 | - getopt.py: accept a non-list sequence for the long options (request |
| 391 | by Jack Jansen). Because it might be a common mistake to pass a |
| 392 | single string, this situation is treated separately. Also added |
| 393 | docstrings (copied from the library manual) and removed the (now |
| 394 | redundant) module comments. |
| 395 | |
| 396 | - tempfile.py: improvements to avoid security leaks. |
| 397 | |
| 398 | - code.py: moved compile_command() to new module codeop.py. |
| 399 | |
| 400 | - pickle.py: support pickle format 1.3 (binary float added). By Jim |
| 401 | Fulton. Also get rid of the undocumented obsolete Pickler dump_special |
| 402 | method. |
| 403 | |
| 404 | - uu.py: Move 'import sys' to top of module, as noted by Tim Peters. |
| 405 | |
| 406 | - imaplib.py: fix problem with some versions of IMAP4 servers that |
| 407 | choose to mix the case in their CAPABILITIES response. |
| 408 | |
| 409 | - cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2. Noted |
| 410 | by Fredrik Lundh. |
| 411 | |
| 412 | Changes to extension modules |
| 413 | ---------------------------- |
| 414 | |
| 415 | - More doc strings for several modules were contributed by Chris |
| 416 | Petrilli: math, cmath, fcntl. |
| 417 | |
| 418 | - Fixed a bug in zlibmodule.c that could cause core dumps on |
| 419 | decompression of rarely occurring input. |
| 420 | |
| 421 | - cPickle.c: new version from Jim Fulton, with Open Source copyright |
| 422 | notice. Also, initialize self->safe_constructors early on to prevent |
| 423 | crash in early dealloc. |
| 424 | |
| 425 | - cStringIO.c: new version from Jim Fulton, with Open Source copyright |
| 426 | notice. Also fixed a core dump in cStringIO.c when doing seeks. |
| 427 | |
| 428 | - mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty). |
| 429 | |
| 430 | - readline.c: Bernard Herzog pointed out that rl_parse_and_bind |
| 431 | modifies its argument string (bad function!), so we make a temporary |
| 432 | copy. |
| 433 | |
| 434 | - sunaudiodev.c: Barry Warsaw added more smarts to get the device and |
| 435 | control pseudo-device, per audio(7I). |
| 436 | |
| 437 | Changes to tools |
| 438 | ---------------- |
| 439 | |
| 440 | - New, improved version of Barry Warsaw's Misc/python-mode.el (editing |
| 441 | support for Emacs). |
| 442 | |
| 443 | - tabnanny.py: added a -q ('quiet') option to tabnanny, which causes |
| 444 | only the names of offending files to be printed. |
| 445 | |
| 446 | - freeze: when printing missing modules, also print the module they |
| 447 | were imported from. |
| 448 | |
| 449 | - untabify.py: patch by Detlef Lannert to implement -t option |
| 450 | (set tab size). |
| 451 | |
| 452 | Changes to Tkinter |
| 453 | ------------------ |
| 454 | |
| 455 | - grid_bbox(): support new Tk API: grid bbox ?column row? ?column2 |
| 456 | row2? |
| 457 | |
| 458 | - _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2) |
| 459 | doesn't work when running in a non-threaded environment. He added |
| 460 | some #ifdefs that fix this. |
| 461 | |
| 462 | Changes to the Python/C API |
| 463 | --------------------------- |
| 464 | |
| 465 | - Bumped API version number to 1008 -- enough things have changed! |
| 466 | |
| 467 | - There's a new macro, PyThreadState_GET(), which does the same work |
| 468 | as PyThreadState_Get() without the overhead of a function call (it |
| 469 | also avoids the error check). The two top calling locations of |
| 470 | PyThreadState_Get() have been changed to use this macro. |
| 471 | |
| 472 | - All symbols intended for export from a DLL or shared library are now |
| 473 | marked as such (with the DL_IMPORT() macro) in the header file that |
| 474 | declares them. This was needed for the BeOS port, and should also |
| 475 | make some other ports easier. The PC port no longer needs the file |
| 476 | with exported symbols (PC/python_nt.def). There's also a DL_EXPORT |
| 477 | macro which is only used for init methods in extension modules, and |
| 478 | for Py_Main(). |
| 479 | |
| 480 | Invisible changes to internals |
| 481 | ------------------------------ |
| 482 | |
| 483 | - Fixed a bug in new_buffersize() in fileobject.c which could |
| 484 | return a buffer size that was way too large. |
| 485 | |
| 486 | - Use PySys_WriteStderr instead of fprintf in most places. |
| 487 | |
| 488 | - dictobject.c: remove dead code discovered by Vladimir Marangozov. |
| 489 | |
| 490 | - tupleobject.c: make tuples less hungry -- an extra item was |
| 491 | allocated but never used. Tip by Vladimir Marangozov. |
| 492 | |
| 493 | - mymath.h: Metrowerks PRO4 finally fixes the hypot snafu. (Jack |
| 494 | Jansen) |
| 495 | |
| 496 | - import.c: Jim Fulton fixes a reference count bug in |
| 497 | PyEval_GetGlobals. |
| 498 | |
| 499 | - glmodule.c: check in the changed version after running the stubber |
| 500 | again -- this solves the conflict with curses over the 'clear' entry |
| 501 | point much nicer. (Jack Jansen had checked in the changes to cstubs |
| 502 | eons ago, but I never regenrated glmodule.c :-( ) |
| 503 | |
| 504 | - frameobject.c: fix reference count bug in PyFrame_New. Vladimir |
| 505 | Marangozov. |
| 506 | |
| 507 | - stropmodule.c: add a missing DECREF in an error exit. Submitted by |
| 508 | Jonathan Giddy. |
| 509 | |
| 510 | |
| 511 | ====================================================================== |
| 512 | |
| 513 | |
Guido van Rossum | e8c10f9 | 1998-10-17 19:43:13 +0000 | [diff] [blame] | 514 | From 1.5.2a1 to 1.5.2a2 |
| 515 | ======================= |
| 516 | |
| 517 | General |
| 518 | ------- |
| 519 | |
| 520 | - It is now a syntax error to have a function argument without a |
| 521 | default following one with a default. |
| 522 | |
| 523 | - __file__ is now set to the .py file if it was parsed (it used to |
| 524 | always be the .pyc/.pyo file). |
| 525 | |
| 526 | - Don't exit with a fatal error during initialization when there's a |
| 527 | problem with the exceptions.py module. |
| 528 | |
| 529 | - New environment variable PYTHONOPTIMIZE can be used to set -O. |
| 530 | |
| 531 | - New version of python-mode.el for Emacs. |
| 532 | |
| 533 | Miscellaneous fixed bugs |
| 534 | ------------------------ |
| 535 | |
| 536 | - No longer print the (confusing) error message about stack underflow |
| 537 | while compiling. |
| 538 | |
| 539 | - Some threading and locking bugs fixed. |
| 540 | |
| 541 | - When errno is zero, report "Error", not "Success". |
| 542 | |
| 543 | Documentation |
| 544 | ------------- |
| 545 | |
| 546 | - Documentation will be released separately. |
| 547 | |
| 548 | - Doc strings added to array and md5 modules by Chris Petrilli. |
| 549 | |
| 550 | Ports and build procedure |
| 551 | ------------------------- |
| 552 | |
| 553 | - Stop installing when a move or copy fails. |
| 554 | |
| 555 | - New version of the OS/2 port code by Jeff Rush. |
| 556 | |
| 557 | - The makesetup script handles absolute filenames better. |
| 558 | |
| 559 | - The 'new' module is now enabled by default in the Setup file. |
| 560 | |
| 561 | - I *think* I've solved the problem with the Linux build blowing up |
| 562 | sometimes due to a conflict between sigcheck/intrcheck and |
| 563 | signalmodule. |
| 564 | |
| 565 | Built-in functions |
| 566 | ------------------ |
| 567 | |
| 568 | - The second argument to apply() can now be any sequence, not just a |
| 569 | tuple. |
| 570 | |
| 571 | Built-in types |
| 572 | -------------- |
| 573 | |
| 574 | - Lists have a new method: L1.extend(L2) is equivalent to the common |
| 575 | idiom L1[len(L1):] = L2. |
| 576 | |
| 577 | - Better error messages when a sequence is indexed with a non-integer. |
| 578 | |
| 579 | - Bettter error message when calling a non-callable object (include |
| 580 | the type in the message). |
| 581 | |
| 582 | Python services |
| 583 | --------------- |
| 584 | |
| 585 | - New version of cPickle.c fixes some bugs. |
| 586 | |
| 587 | - pickle.py: improved instantiation error handling. |
| 588 | |
| 589 | - code.py: reworked quite a bit. New base class |
| 590 | InteractiveInterpreter and derived class InteractiveConsole. Fixed |
| 591 | several problems in compile_command(). |
| 592 | |
| 593 | - py_compile.py: print error message and continue on syntax errors. |
| 594 | Also fixed an old bug with the fstat code (it was never used). |
| 595 | |
| 596 | - pyclbr.py: support submodules of packages. |
| 597 | |
| 598 | String Services |
| 599 | --------------- |
| 600 | |
| 601 | - StringIO.py: raise the right exception (ValueError) for attempted |
| 602 | I/O on closed StringIO objects. |
| 603 | |
| 604 | - re.py: fixed a bug in subn(), which caused .groups() to fail inside |
| 605 | the replacement function called by sub(). |
| 606 | |
| 607 | - The struct module has a new format 'P': void * in native mode. |
| 608 | |
| 609 | Generic OS Services |
| 610 | ------------------- |
| 611 | |
| 612 | - Module time: Y2K robustness. 2-digit year acceptance depends on |
| 613 | value of time.accept2dyear, initialized from env var PYTHONY2K, |
| 614 | default 0. Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999 |
| 615 | (POSIX or X/Open recommendation). |
| 616 | |
| 617 | - os.path: normpath(".//x") should return "x", not "/x". |
| 618 | |
| 619 | - getpass.py: fall back on default_getpass() when sys.stdin.fileno() |
| 620 | doesn't work. |
| 621 | |
| 622 | - tempfile.py: regenerate the template after a fork() call. |
| 623 | |
| 624 | Optional OS Services |
| 625 | -------------------- |
| 626 | |
| 627 | - In the signal module, disable restarting interrupted system calls |
| 628 | when we have siginterrupt(). |
| 629 | |
| 630 | Debugger |
| 631 | -------- |
| 632 | |
| 633 | - No longer set __args__; this feature is no longer supported and can |
| 634 | affect the debugged code. |
| 635 | |
| 636 | - cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who |
| 637 | added aliases and some other useful new features, e.g. much better |
| 638 | breakpoint support: temporary breakpoint, disabled breakpoints, |
| 639 | breakpoints with ignore counts, and conditions; breakpoints can be set |
| 640 | on a file before it is loaded. |
| 641 | |
| 642 | Profiler |
| 643 | -------- |
| 644 | |
| 645 | - Changes so that JPython can use it. Also fix the calibration code |
| 646 | so it actually works again |
| 647 | . |
| 648 | Internet Protocols and Support |
| 649 | ------------------------------ |
| 650 | |
| 651 | - imaplib.py: new version from Piers Lauder. |
| 652 | |
| 653 | - smtplib.py: change sendmail() method to accept a single string or a |
| 654 | list or strings as the destination (commom newbie mistake). |
| 655 | |
| 656 | - poplib.py: LIST with a msg argument fixed. |
| 657 | |
| 658 | - urlparse.py: some optimizations for common case (http). |
| 659 | |
| 660 | - urllib.py: support content-length in info() for ftp protocol; |
| 661 | support for a progress meter through a third argument to |
| 662 | urlretrieve(); commented out gopher test (the test site is dead). |
| 663 | |
| 664 | Internet Data handling |
| 665 | ---------------------- |
| 666 | |
| 667 | - sgmllib.py: support tags with - or . in their name. |
| 668 | |
| 669 | - mimetypes.py: guess_type() understands 'data' URLs. |
| 670 | |
| 671 | Restricted Execution |
| 672 | -------------------- |
| 673 | |
| 674 | - The classes rexec.RModuleLoader and rexec.RModuleImporter no |
| 675 | longer exist. |
| 676 | |
| 677 | Tkinter |
| 678 | ------- |
| 679 | |
| 680 | - When reporting an exception, store its info in sys.last_*. Also, |
| 681 | write all of it to stderr. |
| 682 | |
| 683 | - Added NS, EW, and NSEW constants, for grid's sticky option. |
| 684 | |
| 685 | - Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h". |
| 686 | |
| 687 | - Make bind variants without a sequence return a tuple of sequences |
| 688 | (formerly it returned a string, which wasn't very convenient). |
| 689 | |
| 690 | - Add image commands to the Text widget (these are new in Tk 8.0). |
| 691 | |
| 692 | - Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.) |
| 693 | |
| 694 | - Improved the thread code (but you still can't call update() from |
| 695 | another thread on Windows). |
| 696 | |
| 697 | - Fixed unnecessary references to _default_root in the new dialog |
| 698 | modules. |
| 699 | |
| 700 | - Miscellaneous problems fixed. |
| 701 | |
| 702 | |
| 703 | Windows General |
| 704 | --------------- |
| 705 | |
| 706 | - Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to |
| 707 | search for dependent dlls in the directory containing the .pyd. |
| 708 | |
| 709 | - In debugging mode, call DebugBreak() in Py_FatalError(). |
| 710 | |
| 711 | Windows Installer |
| 712 | ----------------- |
| 713 | |
| 714 | - Install zlib.dll in the DLLs directory instead of in the win32 |
| 715 | system directory, to avoid conflicts with other applications that have |
| 716 | their own zlib.dll. |
| 717 | |
| 718 | Test Suite |
| 719 | ---------- |
| 720 | |
| 721 | - test_long.py: new test for long integers, by Tim Peters. |
| 722 | |
| 723 | - regrtest.py: improved so it can be used for other test suites as |
| 724 | well. |
| 725 | |
| 726 | - test_strftime.py: use re to compare test results, to support legal |
| 727 | variants (e.g. on Linux). |
| 728 | |
| 729 | Tools and Demos |
| 730 | --------------- |
| 731 | |
| 732 | - Four new scripts in Tools/scripts: crlf.py and lfcr.py (to |
| 733 | remove/add Windows style '\r\n' line endings), untabify.py (to remove |
| 734 | tabs), and rgrep.yp (reverse grep). |
| 735 | |
| 736 | - Improvements to Tools/freeze/. Each Python module is now written to |
| 737 | its own C file. This prevents some compilers or assemblers from |
| 738 | blowing up on large frozen programs, and saves recompilation time if |
| 739 | only a few modules are changed. Other changes too, e.g. new command |
| 740 | line options -x and -i. |
| 741 | |
| 742 | - Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py. |
| 743 | |
| 744 | Python/C API |
| 745 | ------------ |
| 746 | |
| 747 | - New mechanism to support extensions of the type object while |
| 748 | remaining backward compatible with extensions compiled for previous |
| 749 | versions of Python 1.5. A flags field indicates presence of certain |
| 750 | fields. |
| 751 | |
| 752 | - Addition to the buffer API to differentiate access to bytes and |
| 753 | 8-bit characters (in anticipation of Unicode characters). |
| 754 | |
| 755 | - New argument parsing format t# ("text") to indicate 8-bit |
| 756 | characters; s# simply means 8-bit bytes, for backwards compatibility. |
| 757 | |
| 758 | - New object type, bufferobject.c is an example and can be used to |
| 759 | create buffers from memory. |
| 760 | |
| 761 | - Some support for 64-bit longs, including some MS platforms. |
| 762 | |
| 763 | - Many calls to fprintf(stderr, ...) have been replaced with calls to |
| 764 | PySys_WriteStderr(...). |
| 765 | |
| 766 | - The calling context for PyOS_Readline() has changed: it must now be |
| 767 | called with the interpreter lock held! It releases the lock around |
| 768 | the call to the function pointed to by PyOS_ReadlineFunctionPointer |
| 769 | (default PyOS_StdioReadline()). |
| 770 | |
| 771 | - New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr(). |
| 772 | |
| 773 | - Renamed header file "thread.h" to "pythread.h". |
| 774 | |
| 775 | - The code string of code objects may now be anything that supports the |
| 776 | buffer API. |
| 777 | |
| 778 | |
| 779 | ====================================================================== |
| 780 | |
| 781 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 782 | From 1.5.1 to 1.5.2a1 |
| 783 | ===================== |
| 784 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 785 | General |
| 786 | ------- |
| 787 | |
| 788 | - When searching for the library, a landmark that is a compiled module |
| 789 | (string.pyc or string.pyo) is also accepted. |
| 790 | |
| 791 | - When following symbolic links to the python executable, use a loop |
| 792 | so that a symlink to a symlink can work. |
| 793 | |
| 794 | - Added a hack so that when you type 'quit' or 'exit' at the |
| 795 | interpreter, you get a friendly explanation of how to press Ctrl-D (or |
| 796 | Ctrl-Z) to exit. |
| 797 | |
| 798 | - New and improved Misc/python-mode.el (Python mode for Emacs). |
| 799 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 800 | - Revert a new feature in Unix dynamic loading: for one or two |
| 801 | revisions, modules were loaded using the RTLD_GLOBAL flag. It turned |
| 802 | out to be a bad idea. |
| 803 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 804 | Miscellaneous fixed bugs |
| 805 | ------------------------ |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 806 | |
| 807 | - All patches on the patch page have been integrated. (But much more |
| 808 | has been done!) |
| 809 | |
| 810 | - Several memory leaks plugged (e.g. the one for classes with a |
| 811 | __getattr__ method). |
| 812 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 813 | - Removed the only use of calloc(). This triggered an obscure bug on |
| 814 | multiprocessor Sparc Solaris 2.6. |
| 815 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 816 | - Fix a peculiar bug that would allow "import sys.time" to succeed |
| 817 | (believing the built-in time module to be a part of the sys package). |
| 818 | |
| 819 | - Fix a bug in the overflow checking when converting a Python long to |
| 820 | a C long (failed to convert -2147483648L, and some other cases). |
| 821 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 822 | Documentation |
| 823 | ------------- |
| 824 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 825 | - Doc strings have been added to many extension modules: __builtin__, |
| 826 | errno, select, signal, socket, sys, thread, time. Also to methods of |
| 827 | list objects (try [].append.__doc__). A doc string on a type will now |
| 828 | automatically be propagated to an instance if the instance has methods |
| 829 | that are accessed in the usual way. |
| 830 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 831 | - The documentation has been expanded and the formatting improved. |
| 832 | (Remember that the documentation is now unbundled and has its own |
| 833 | release cycle though; see http://www.python.org/doc/.) |
| 834 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 835 | - Added Misc/Porting -- a mini-FAQ on porting to a new platform. |
| 836 | |
| 837 | Ports and build procedure |
| 838 | ------------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 839 | |
| 840 | - The BeOS port is now integrated. Courtesy Chris Herborth. |
| 841 | |
| 842 | - Symbol files for FreeBSD 2.x and 3.x have been contributed |
| 843 | (Lib/plat-freebsd[23]/*). |
| 844 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 845 | - Support HPUX 10.20 DCE threads. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 846 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 847 | - Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0 |
| 848 | works, it won't also use -Olimit 1500 (which gives a warning for every |
| 849 | file). Also support the SGI_ABI environment variable better. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 850 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 851 | - The makesetup script now understands absolute pathnames ending in .o |
| 852 | in the module -- it assumes it's a file for which we have no source. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 853 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 854 | - Other miscellaneous improvements to the configure script and |
| 855 | Makefiles. |
| 856 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 857 | - The test suite now uses a different sound sample. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 858 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 859 | Built-in functions |
| 860 | ------------------ |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 861 | |
| 862 | - Better checks for invalid input to int(), long(), string.atoi(), |
| 863 | string.atol(). (Formerly, a sign without digits would be accepted as |
| 864 | a legal ways to spell zero.) |
| 865 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 866 | - Changes to map() and filter() to use the length of a sequence only |
| 867 | as a hint -- if an IndexError happens earlier, take that. (Formerly, |
| 868 | this was considered an error.) |
| 869 | |
| 870 | - Experimental feature in getattr(): a third argument can specify a |
| 871 | default (instead of raising AttributeError). |
| 872 | |
| 873 | - Implement round() slightly different, so that for negative ndigits |
| 874 | no additional errors happen in the last step. |
| 875 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 876 | - The open() function now adds the filename to the exception when it |
| 877 | fails. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 878 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 879 | Built-in exceptions |
| 880 | ------------------- |
| 881 | |
| 882 | - New standard exceptions EnvironmentError and PosixError. |
| 883 | EnvironmentError is the base class for IOError and PosixError; |
| 884 | PosixError is the same as os.error. All this so that either exception |
| 885 | class can be instantiated with a third argument indicating a filename. |
| 886 | The built-in function open() and most os/posix functions that take a |
| 887 | filename argument now use this. |
| 888 | |
| 889 | Built-in types |
| 890 | -------------- |
| 891 | |
| 892 | - List objects now have an experimental pop() method; l.pop() returns |
| 893 | and removes the last item; l.pop(i) returns and removes the item at |
| 894 | i. Also, the sort() method is faster again. Sorting is now also |
| 895 | safer: it is impossible for the sorting function to modify the list |
| 896 | while the sort is going on (which could cause core dumps). |
| 897 | |
| 898 | - Changes to comparisons: numbers are now smaller than any other type. |
| 899 | This is done to prevent the circularity where [] < 0L < 1 < [] is |
| 900 | true. As a side effect, cmp(None, 0) is now positive instead of |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 901 | negative. This *shouldn't* affect any working code, but I've found |
| 902 | that the change caused several "sleeping" bugs to become active, so |
| 903 | beware! |
| 904 | |
| 905 | - Instance methods may now have other callable objects than just |
| 906 | Python functions as their im_func. Use new.instancemethod() or write |
| 907 | your own C code to create them; new.instancemethod() may be called |
| 908 | with None for the instance to create an unbound method. |
| 909 | |
| 910 | - Assignment to __name__, __dict__ or __bases__ of a class object is |
| 911 | now allowed (with stringent type checks); also allow assignment to |
| 912 | __getattr__ etc. The cached values for __getattr__ etc. are |
| 913 | recomputed after such assignments (but not for derived classes :-( ). |
| 914 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 915 | - Allow assignment to some attributes of function objects: func_code, |
| 916 | func_defaults and func_doc / __doc__. (With type checks except for |
| 917 | __doc__ / func_doc .) |
| 918 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 919 | Python services |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 920 | --------------- |
| 921 | |
| 922 | - New tests (in Lib/test): reperf.py (regular expression benchmark), |
| 923 | sortperf.py (list sorting benchmark), test_MimeWriter.py (test case |
| 924 | for the MimeWriter module). |
| 925 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 926 | - Generalized test/regrtest.py so that it is useful for testing other |
| 927 | packages. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 928 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 929 | - The ihooks.py module now understands package imports. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 930 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 931 | - In code.py, add a class that subsumes Fredrik Lundh's |
| 932 | PythonInterpreter class. The interact() function now uses this. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 933 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 934 | - In rlcompleter.py, in completer(), return None instead of raising an |
| 935 | IndexError when there are no more completions left. |
| 936 | |
| 937 | - Fixed the marshal module to test for certain common kinds of invalid |
| 938 | input. (It's still not foolproof!) |
| 939 | |
| 940 | - In the operator module, add an alias (now the preferred name) |
| 941 | "contains" for "sequenceincludes". |
| 942 | |
| 943 | String Services |
| 944 | --------------- |
| 945 | |
| 946 | - In the string and strop modules, in the replace() function, treat an |
| 947 | empty pattern as an error (since it's not clear what was meant!). |
| 948 | |
| 949 | - Some speedups to re.py, especially the string substitution and split |
| 950 | functions. Also added new function/method findall(), to find all |
| 951 | occurrences of a given substring. |
| 952 | |
| 953 | - In cStringIO, add better argument type checking and support the |
| 954 | readonly 'closed' attribute (like regular files). |
| 955 | |
| 956 | - In the struct module, unsigned 1-2 byte sized formats no longer |
| 957 | result in long integer values. |
| 958 | |
| 959 | Miscellaneous services |
| 960 | ---------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 961 | |
| 962 | - In whrandom.py, added new method and function randrange(), same as |
| 963 | choice(range(start, stop, step)) but faster. This addresses the |
| 964 | problem that randint() was accidentally defined as taking an inclusive |
| 965 | range. Also, randint(a, b) is now redefined as randrange(a, b+1), |
| 966 | adding extra range and type checking to its arguments! |
| 967 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 968 | - Add some semi-thread-safety to random.gauss() (it used to be able to |
| 969 | crash when invoked from separate threads; now the worst it can do is |
| 970 | give a duplicate result occasionally). |
| 971 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 972 | - Some restructuring and generalization done to cmd.py. |
| 973 | |
| 974 | - Major upgrade to ConfigParser.py; converted to using 're', added new |
| 975 | exceptions, support underscore in section header and option name. No |
| 976 | longer add 'name' option to every section; instead, add '__name__'. |
| 977 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 978 | - In getpass.py, don't use raw_input() to ask for the password -- we |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 979 | don't want it to show up in the readline history! Also don't catch |
| 980 | interrupts (the try-finally already does all necessary cleanup). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 981 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 982 | Generic OS Services |
| 983 | ------------------- |
| 984 | |
| 985 | - New functions in os.py: makedirs(), removedirs(), renames(). New |
| 986 | variable: linesep (the line separator as found in binary files, |
| 987 | i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac. Do *not* use |
| 988 | this with files opened in (default) text mode; the line separator used |
| 989 | will always be '\n'! |
| 990 | |
| 991 | - Changes to the 'os.path' submodule of os.py: added getsize(), |
| 992 | getmtime(), getatime() -- these fetch the most popular items from the |
| 993 | stat return tuple. |
| 994 | |
| 995 | - In the time module, add strptime(), if it exists. (This parses a |
| 996 | time according to a format -- the inverse of strftime().) Also, |
| 997 | remove the call to mktime() from strftime() -- it messed up the |
| 998 | formatting of some non-local times. |
| 999 | |
| 1000 | - In the socket module, added a new function gethostbyname_ex(). |
| 1001 | Also, don't use #ifdef to test for some symbols that are enums on some |
| 1002 | platforms (and should exist everywhere). |
| 1003 | |
| 1004 | Optional OS Services |
| 1005 | -------------------- |
| 1006 | |
| 1007 | - Some fixes to gzip.py. In particular, the readlines() method now |
| 1008 | returns the lines *with* trailing newline characters, like readlines() |
| 1009 | of regular file objects. Also, it didn't work together with cPickle; |
| 1010 | fixed that. |
| 1011 | |
| 1012 | - In whichdb.py, support byte-swapped dbhash (bsddb) files. |
| 1013 | |
| 1014 | - In anydbm.py, look at the type of an existing database to determine |
| 1015 | which module to use to open it. (The anydbm.error exception is now a |
| 1016 | tuple.) |
| 1017 | |
| 1018 | Unix Services |
| 1019 | ------------- |
| 1020 | |
| 1021 | - In the termios module, in tcsetattr(), initialize the structure vy |
| 1022 | calling tcgetattr(). |
| 1023 | |
| 1024 | - Added some of the "wait status inspection" macros as functions to |
| 1025 | the posix module (and thus to the os module): WEXITSTATUS(), |
| 1026 | WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG(). |
| 1027 | |
| 1028 | - In the syslog module, make the default facility more intuitive |
| 1029 | (matching the docs). |
| 1030 | |
| 1031 | Debugger |
| 1032 | -------- |
| 1033 | |
| 1034 | - In pdb.py, support for setting breaks on files/modules that haven't |
| 1035 | been loaded yet. |
| 1036 | |
| 1037 | Internet Protocols and Support |
| 1038 | ------------------------------ |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1039 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1040 | - Changes in urllib.py; sped up unquote() and quote(). Fixed an |
| 1041 | obscure bug in quote_plus(). Added urlencode(dict) -- convenience |
| 1042 | function for sending a POST request with urlopen(). Use the getpass |
| 1043 | module to ask for a password. Rewrote the (test) main program so that |
| 1044 | when used as a script, it can retrieve one or more URLs to stdout. |
| 1045 | Use -t to run the self-test. Made the proxy code work again. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1046 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1047 | - In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't |
| 1048 | fail when someone asks for their HEAD. Also, for POST, set the |
| 1049 | default content-type to application/x-www-form-urlencoded. Also, in |
| 1050 | FieldStorage.__init__(), when method='GET', always get the query |
| 1051 | string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an |
| 1052 | explicitly passed in fp. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1053 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1054 | - The smtplib.py module now supports ESMTP and has improved standard |
| 1055 | compliance, for picky servers. |
| 1056 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1057 | - Improved imaplib.py. |
| 1058 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1059 | - Fixed UDP support in SocketServer.py (it never worked). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1060 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1061 | - Fixed a small bug in CGIHTTPServer.py. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1062 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1063 | Internet Data handling |
| 1064 | ---------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1065 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1066 | - In rfc822.py, add a new class AddressList. Also support a new |
| 1067 | overridable method, isheader(). Also add a get() method similar to |
| 1068 | dictionaries (and make getheader() an alias for it). Also, be smarter |
| 1069 | about seekable (test whether fp.tell() works) and test for presence of |
| 1070 | unread() method before trying seeks. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1071 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1072 | - In sgmllib.py, restore the call to report_unbalanced() that was lost |
| 1073 | long ago. Also some other improvements: handle <? processing |
| 1074 | instructions >, allow . and - in entity names, and allow \r\n as line |
| 1075 | separator. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1076 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1077 | - Some restructuring and generalization done to multifile.py; support |
| 1078 | a 'seekable' flag. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1079 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1080 | Restricted Execution |
| 1081 | -------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1082 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1083 | - Improvements to rexec.py: package support; support a (minimal) |
| 1084 | sys.exc_info(). Also made the (test) main program a bit fancier (you |
| 1085 | can now use it to run arbitrary Python scripts in restricted mode). |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1086 | |
| 1087 | Tkinter |
| 1088 | ------- |
| 1089 | |
| 1090 | - On Unix, Tkinter can now safely be used from a multi-threaded |
| 1091 | application. (Formerly, no threads would make progress while |
| 1092 | Tkinter's mainloop() was active, because it didn't release the Python |
| 1093 | interpreter lock.) Unfortunately, on Windows, threads other than the |
| 1094 | main thread should not call update() or update_idletasks() because |
| 1095 | this will deadlock the application. |
| 1096 | |
| 1097 | - An interactive interpreter that uses readline and Tkinter no longer |
| 1098 | uses up all available CPU time. |
| 1099 | |
| 1100 | - Even if readline is not used, Tk windows created in an interactive |
| 1101 | interpreter now get continuously updated. (This even works in Windows |
| 1102 | as long as you don't hit a key.) |
| 1103 | |
| 1104 | - New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py. |
| 1105 | |
| 1106 | - No longer register Tcl_finalize() as a low-level exit handler. It |
| 1107 | may call back into Python, and that's a bad idea. |
| 1108 | |
| 1109 | - Allow binding of Tcl commands (given as a string). |
| 1110 | |
| 1111 | - Some minor speedups; replace explicitly coded getint() with int() in |
| 1112 | most places. |
| 1113 | |
| 1114 | - In FileDialog.py, remember the directory of the selected file, if |
| 1115 | given. |
| 1116 | |
| 1117 | - Change the names of all methods in the Wm class: they are now |
| 1118 | wm_title(), etc. The old names (title() etc.) are still defined as |
| 1119 | aliases. |
| 1120 | |
| 1121 | - Add a new method of interpreter objects, interpaddr(). This returns |
| 1122 | the address of the Tcl interpreter object, as an integer. Not very |
| 1123 | useful for the Python programmer, but this can be called by another C |
| 1124 | extension that needs to make calls into the Tcl/Tk C API and needs to |
| 1125 | get the address of the Tcl interpreter object. A simple cast of the |
| 1126 | return value to (Tcl_Interp *) will do the trick. |
| 1127 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1128 | Windows General |
| 1129 | --------------- |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1130 | |
| 1131 | - Don't insist on proper case for module source files if the filename |
| 1132 | is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still |
| 1133 | doesn't). This should address problems with this feature on |
| 1134 | oldfashioned filesystems (Novell servers?). |
| 1135 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1136 | Windows Library |
| 1137 | --------------- |
| 1138 | |
| 1139 | - os.environ is now all uppercase, but accesses are case insensitive, |
| 1140 | and the putenv() calls made as a side effect of changing os.environ |
| 1141 | are case preserving. |
| 1142 | |
| 1143 | - Removed samefile(), sameopenfile(), samestat() from os.path (aka |
| 1144 | ntpath.py) -- these cannot be made to work reliably (at least I |
| 1145 | wouldn't know how). |
| 1146 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1147 | - Fixed os.pipe() so that it returns file descriptors acceptable to |
| 1148 | os.read() and os.write() (like it does on Unix), rather than Windows |
| 1149 | file handles. |
| 1150 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1151 | - Added a table of WSA error codes to socket.py. |
| 1152 | |
| 1153 | - In the select module, put the (huge) file descriptor arrays on the |
| 1154 | heap. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1155 | |
| 1156 | - The getpass module now raises KeyboardInterrupt when it sees ^C. |
| 1157 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1158 | - In mailbox.py, fix tell/seek when using files opened in text mode. |
| 1159 | |
| 1160 | - In rfc822.py, fix tell/seek when using files opened in text mode. |
| 1161 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1162 | - In the msvcrt extension module, release the interpreter lock for |
| 1163 | calls that may block: _locking(), _getch(), _getche(). Also fix a |
| 1164 | bogus error return when open_osfhandle() doesn't have the right |
| 1165 | argument list. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1166 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1167 | Windows Installer |
| 1168 | ----------------- |
| 1169 | |
| 1170 | - The registry key used is now "1.5" instead of "1.5.x" -- so future |
| 1171 | versions of 1.5 and Mark Hammond's win32all installer don't need to be |
| 1172 | resynchronized. |
| 1173 | |
| 1174 | Windows Tools |
| 1175 | ------------- |
| 1176 | |
| 1177 | - Several improvements to freeze specifically for Windows. |
| 1178 | |
| 1179 | Windows Build Procedure |
| 1180 | ----------------------- |
| 1181 | |
| 1182 | - The VC++ project files and the WISE installer have been moved to the |
| 1183 | PCbuild subdirectory, so they are distributed in the same subdirectory |
| 1184 | where they must be used. This avoids confusion. |
| 1185 | |
| 1186 | - New project files for Windows 3.1 port by Jim Ahlstrom. |
| 1187 | |
| 1188 | - Got rid of the obsolete subdirectory PC/setup_nt/. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1189 | |
| 1190 | - The projects now use distinct filenames for the .exe, .dll, .lib and |
| 1191 | .pyd files built in debug mode (by appending "_d" to the base name, |
| 1192 | before the extension). This makes it easier to switch between the two |
| 1193 | and get the right versions. There's a pragma in config.h that directs |
| 1194 | the linker to include the appropriate .lib file (so python15.lib no |
| 1195 | longer needs to be explicit in your project). |
| 1196 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1197 | - The installer now installs more files (e.g. config.h). The idea is |
| 1198 | that you shouldn't need the source distribution if you want build your |
| 1199 | own extensions in C or C++. |
| 1200 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1201 | Tools and Demos |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1202 | --------------- |
| 1203 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1204 | - New script nm2def.py by Marc-Andre Lemburg, to construct |
| 1205 | PC/python_nt.def automatically (some hand editing still required). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1206 | |
| 1207 | - New tool ndiff.py: Tim Peters' text diffing tool. |
| 1208 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1209 | - Various and sundry improvements to the freeze script. |
| 1210 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1211 | - The script texi2html.py (which was part of the Doc tree but is no |
| 1212 | longer used there) has been moved to the Tools/scripts subdirectory. |
| 1213 | |
| 1214 | - Some generalizations in the webchecker code. There's now a |
| 1215 | primnitive gui for websucker.py: wsgui.py. (In Tools/webchecker/.) |
| 1216 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1217 | - The ftpmirror.py script now handles symbolic links properly, and |
| 1218 | also files with multiple spaces in their names. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1219 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1220 | - The 1.5.1 tabnanny.py suffers an assert error if fed a script whose |
| 1221 | last line is both indented and lacks a newline. This is now fixed. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1222 | |
| 1223 | Python/C API |
| 1224 | ------------ |
| 1225 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1226 | - Added missing prototypes for PyEval_CallFunction() and |
| 1227 | PyEval_CallMethod(). |
| 1228 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1229 | - New macro PyList_SET_ITEM(). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 1230 | |
| 1231 | - New macros to access object members for PyFunction, PyCFunction |
| 1232 | objects. |
| 1233 | |
| 1234 | - New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to |
| 1235 | dynamically add one or many entries to the table of built-in modules. |
| 1236 | |
| 1237 | - New macro Py_InitModule3(name, methods, doc) which calls |
| 1238 | Py_InitModule4() with appropriate arguments. (The -4 variant requires |
| 1239 | you to pass an obscure version number constant which is always the same.) |
| 1240 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1241 | - New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to |
| 1242 | sys.stdout or sys.stderr using a printf-like interface. (Used in |
| 1243 | _tkinter.c, for example.) |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1244 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1245 | - New APIs for conversion between Python longs and C 'long long' if |
| 1246 | your compiler supports it. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1247 | |
| 1248 | - PySequence_In() is now called PySequence_Contains(). |
| 1249 | (PySequence_In() is still supported for b/w compatibility; it is |
| 1250 | declared obsolete because its argument order is confusing.) |
| 1251 | |
| 1252 | - PyDict_GetItem() and PyDict_GetItemString() are changed so that they |
| 1253 | *never* raise an exception -- (even if the hash() fails, simply clear |
| 1254 | the error). This was necessary because there is lots of code out |
| 1255 | there that already assumes this. |
| 1256 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1257 | - Changes to PySequence_Tuple() and PySequence_List() to use the |
| 1258 | length of a sequence only as a hint -- if an IndexError happens |
| 1259 | earlier, take that. (Formerly, this was considered an error.) |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1260 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 1261 | - Reformatted abstract.c to give it a more familiar "look" and fixed |
| 1262 | many error checking bugs. |
| 1263 | |
| 1264 | - Add NULL pointer checks to all calls of a C function through a type |
| 1265 | object and extensions (e.g. nb_add). |
| 1266 | |
| 1267 | - The code that initializes sys.path now calls Py_GetPythonHome() |
| 1268 | instead of getenv("PYTHONHOME"). This, together with the new API |
| 1269 | Py_SetPythonHome(), makes it easier for embedding applications to |
| 1270 | change the notion of Python's "home" directory (where the libraries |
| 1271 | etc. are sought). |
| 1272 | |
| 1273 | - Fixed a very old bug in the parsing of "O?" format specifiers. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 1274 | |
| 1275 | |
| 1276 | ====================================================================== |