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 | e8c10f9 | 1998-10-17 19:43:13 +0000 | [diff] [blame] | 4 | Below is a list of all relevant changes since release 1.4. The most |
| 5 | recent changes are listed first. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 6 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 7 | A note on attributions: while I have sprinkled some names throughout |
Guido van Rossum | 7ea639b | 1997-11-26 16:36:28 +0000 | [diff] [blame] | 8 | 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] | 9 | find your name in the ACKS file. If you believe you deserve more |
| 10 | credit, let me know and I'll add you to the list! |
| 11 | |
| 12 | |
Guido van Rossum | 7ea639b | 1997-11-26 16:36:28 +0000 | [diff] [blame] | 13 | ====================================================================== |
| 14 | |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 15 | |
Guido van Rossum | e8c10f9 | 1998-10-17 19:43:13 +0000 | [diff] [blame] | 16 | From 1.5.2a1 to 1.5.2a2 |
| 17 | ======================= |
| 18 | |
| 19 | General |
| 20 | ------- |
| 21 | |
| 22 | - It is now a syntax error to have a function argument without a |
| 23 | default following one with a default. |
| 24 | |
| 25 | - __file__ is now set to the .py file if it was parsed (it used to |
| 26 | always be the .pyc/.pyo file). |
| 27 | |
| 28 | - Don't exit with a fatal error during initialization when there's a |
| 29 | problem with the exceptions.py module. |
| 30 | |
| 31 | - New environment variable PYTHONOPTIMIZE can be used to set -O. |
| 32 | |
| 33 | - New version of python-mode.el for Emacs. |
| 34 | |
| 35 | Miscellaneous fixed bugs |
| 36 | ------------------------ |
| 37 | |
| 38 | - No longer print the (confusing) error message about stack underflow |
| 39 | while compiling. |
| 40 | |
| 41 | - Some threading and locking bugs fixed. |
| 42 | |
| 43 | - When errno is zero, report "Error", not "Success". |
| 44 | |
| 45 | Documentation |
| 46 | ------------- |
| 47 | |
| 48 | - Documentation will be released separately. |
| 49 | |
| 50 | - Doc strings added to array and md5 modules by Chris Petrilli. |
| 51 | |
| 52 | Ports and build procedure |
| 53 | ------------------------- |
| 54 | |
| 55 | - Stop installing when a move or copy fails. |
| 56 | |
| 57 | - New version of the OS/2 port code by Jeff Rush. |
| 58 | |
| 59 | - The makesetup script handles absolute filenames better. |
| 60 | |
| 61 | - The 'new' module is now enabled by default in the Setup file. |
| 62 | |
| 63 | - I *think* I've solved the problem with the Linux build blowing up |
| 64 | sometimes due to a conflict between sigcheck/intrcheck and |
| 65 | signalmodule. |
| 66 | |
| 67 | Built-in functions |
| 68 | ------------------ |
| 69 | |
| 70 | - The second argument to apply() can now be any sequence, not just a |
| 71 | tuple. |
| 72 | |
| 73 | Built-in types |
| 74 | -------------- |
| 75 | |
| 76 | - Lists have a new method: L1.extend(L2) is equivalent to the common |
| 77 | idiom L1[len(L1):] = L2. |
| 78 | |
| 79 | - Better error messages when a sequence is indexed with a non-integer. |
| 80 | |
| 81 | - Bettter error message when calling a non-callable object (include |
| 82 | the type in the message). |
| 83 | |
| 84 | Python services |
| 85 | --------------- |
| 86 | |
| 87 | - New version of cPickle.c fixes some bugs. |
| 88 | |
| 89 | - pickle.py: improved instantiation error handling. |
| 90 | |
| 91 | - code.py: reworked quite a bit. New base class |
| 92 | InteractiveInterpreter and derived class InteractiveConsole. Fixed |
| 93 | several problems in compile_command(). |
| 94 | |
| 95 | - py_compile.py: print error message and continue on syntax errors. |
| 96 | Also fixed an old bug with the fstat code (it was never used). |
| 97 | |
| 98 | - pyclbr.py: support submodules of packages. |
| 99 | |
| 100 | String Services |
| 101 | --------------- |
| 102 | |
| 103 | - StringIO.py: raise the right exception (ValueError) for attempted |
| 104 | I/O on closed StringIO objects. |
| 105 | |
| 106 | - re.py: fixed a bug in subn(), which caused .groups() to fail inside |
| 107 | the replacement function called by sub(). |
| 108 | |
| 109 | - The struct module has a new format 'P': void * in native mode. |
| 110 | |
| 111 | Generic OS Services |
| 112 | ------------------- |
| 113 | |
| 114 | - Module time: Y2K robustness. 2-digit year acceptance depends on |
| 115 | value of time.accept2dyear, initialized from env var PYTHONY2K, |
| 116 | default 0. Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999 |
| 117 | (POSIX or X/Open recommendation). |
| 118 | |
| 119 | - os.path: normpath(".//x") should return "x", not "/x". |
| 120 | |
| 121 | - getpass.py: fall back on default_getpass() when sys.stdin.fileno() |
| 122 | doesn't work. |
| 123 | |
| 124 | - tempfile.py: regenerate the template after a fork() call. |
| 125 | |
| 126 | Optional OS Services |
| 127 | -------------------- |
| 128 | |
| 129 | - In the signal module, disable restarting interrupted system calls |
| 130 | when we have siginterrupt(). |
| 131 | |
| 132 | Debugger |
| 133 | -------- |
| 134 | |
| 135 | - No longer set __args__; this feature is no longer supported and can |
| 136 | affect the debugged code. |
| 137 | |
| 138 | - cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who |
| 139 | added aliases and some other useful new features, e.g. much better |
| 140 | breakpoint support: temporary breakpoint, disabled breakpoints, |
| 141 | breakpoints with ignore counts, and conditions; breakpoints can be set |
| 142 | on a file before it is loaded. |
| 143 | |
| 144 | Profiler |
| 145 | -------- |
| 146 | |
| 147 | - Changes so that JPython can use it. Also fix the calibration code |
| 148 | so it actually works again |
| 149 | . |
| 150 | Internet Protocols and Support |
| 151 | ------------------------------ |
| 152 | |
| 153 | - imaplib.py: new version from Piers Lauder. |
| 154 | |
| 155 | - smtplib.py: change sendmail() method to accept a single string or a |
| 156 | list or strings as the destination (commom newbie mistake). |
| 157 | |
| 158 | - poplib.py: LIST with a msg argument fixed. |
| 159 | |
| 160 | - urlparse.py: some optimizations for common case (http). |
| 161 | |
| 162 | - urllib.py: support content-length in info() for ftp protocol; |
| 163 | support for a progress meter through a third argument to |
| 164 | urlretrieve(); commented out gopher test (the test site is dead). |
| 165 | |
| 166 | Internet Data handling |
| 167 | ---------------------- |
| 168 | |
| 169 | - sgmllib.py: support tags with - or . in their name. |
| 170 | |
| 171 | - mimetypes.py: guess_type() understands 'data' URLs. |
| 172 | |
| 173 | Restricted Execution |
| 174 | -------------------- |
| 175 | |
| 176 | - The classes rexec.RModuleLoader and rexec.RModuleImporter no |
| 177 | longer exist. |
| 178 | |
| 179 | Tkinter |
| 180 | ------- |
| 181 | |
| 182 | - When reporting an exception, store its info in sys.last_*. Also, |
| 183 | write all of it to stderr. |
| 184 | |
| 185 | - Added NS, EW, and NSEW constants, for grid's sticky option. |
| 186 | |
| 187 | - Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h". |
| 188 | |
| 189 | - Make bind variants without a sequence return a tuple of sequences |
| 190 | (formerly it returned a string, which wasn't very convenient). |
| 191 | |
| 192 | - Add image commands to the Text widget (these are new in Tk 8.0). |
| 193 | |
| 194 | - Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.) |
| 195 | |
| 196 | - Improved the thread code (but you still can't call update() from |
| 197 | another thread on Windows). |
| 198 | |
| 199 | - Fixed unnecessary references to _default_root in the new dialog |
| 200 | modules. |
| 201 | |
| 202 | - Miscellaneous problems fixed. |
| 203 | |
| 204 | |
| 205 | Windows General |
| 206 | --------------- |
| 207 | |
| 208 | - Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to |
| 209 | search for dependent dlls in the directory containing the .pyd. |
| 210 | |
| 211 | - In debugging mode, call DebugBreak() in Py_FatalError(). |
| 212 | |
| 213 | Windows Installer |
| 214 | ----------------- |
| 215 | |
| 216 | - Install zlib.dll in the DLLs directory instead of in the win32 |
| 217 | system directory, to avoid conflicts with other applications that have |
| 218 | their own zlib.dll. |
| 219 | |
| 220 | Test Suite |
| 221 | ---------- |
| 222 | |
| 223 | - test_long.py: new test for long integers, by Tim Peters. |
| 224 | |
| 225 | - regrtest.py: improved so it can be used for other test suites as |
| 226 | well. |
| 227 | |
| 228 | - test_strftime.py: use re to compare test results, to support legal |
| 229 | variants (e.g. on Linux). |
| 230 | |
| 231 | Tools and Demos |
| 232 | --------------- |
| 233 | |
| 234 | - Four new scripts in Tools/scripts: crlf.py and lfcr.py (to |
| 235 | remove/add Windows style '\r\n' line endings), untabify.py (to remove |
| 236 | tabs), and rgrep.yp (reverse grep). |
| 237 | |
| 238 | - Improvements to Tools/freeze/. Each Python module is now written to |
| 239 | its own C file. This prevents some compilers or assemblers from |
| 240 | blowing up on large frozen programs, and saves recompilation time if |
| 241 | only a few modules are changed. Other changes too, e.g. new command |
| 242 | line options -x and -i. |
| 243 | |
| 244 | - Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py. |
| 245 | |
| 246 | Python/C API |
| 247 | ------------ |
| 248 | |
| 249 | - New mechanism to support extensions of the type object while |
| 250 | remaining backward compatible with extensions compiled for previous |
| 251 | versions of Python 1.5. A flags field indicates presence of certain |
| 252 | fields. |
| 253 | |
| 254 | - Addition to the buffer API to differentiate access to bytes and |
| 255 | 8-bit characters (in anticipation of Unicode characters). |
| 256 | |
| 257 | - New argument parsing format t# ("text") to indicate 8-bit |
| 258 | characters; s# simply means 8-bit bytes, for backwards compatibility. |
| 259 | |
| 260 | - New object type, bufferobject.c is an example and can be used to |
| 261 | create buffers from memory. |
| 262 | |
| 263 | - Some support for 64-bit longs, including some MS platforms. |
| 264 | |
| 265 | - Many calls to fprintf(stderr, ...) have been replaced with calls to |
| 266 | PySys_WriteStderr(...). |
| 267 | |
| 268 | - The calling context for PyOS_Readline() has changed: it must now be |
| 269 | called with the interpreter lock held! It releases the lock around |
| 270 | the call to the function pointed to by PyOS_ReadlineFunctionPointer |
| 271 | (default PyOS_StdioReadline()). |
| 272 | |
| 273 | - New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr(). |
| 274 | |
| 275 | - Renamed header file "thread.h" to "pythread.h". |
| 276 | |
| 277 | - The code string of code objects may now be anything that supports the |
| 278 | buffer API. |
| 279 | |
| 280 | |
| 281 | ====================================================================== |
| 282 | |
| 283 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 284 | From 1.5.1 to 1.5.2a1 |
| 285 | ===================== |
| 286 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 287 | General |
| 288 | ------- |
| 289 | |
| 290 | - When searching for the library, a landmark that is a compiled module |
| 291 | (string.pyc or string.pyo) is also accepted. |
| 292 | |
| 293 | - When following symbolic links to the python executable, use a loop |
| 294 | so that a symlink to a symlink can work. |
| 295 | |
| 296 | - Added a hack so that when you type 'quit' or 'exit' at the |
| 297 | interpreter, you get a friendly explanation of how to press Ctrl-D (or |
| 298 | Ctrl-Z) to exit. |
| 299 | |
| 300 | - New and improved Misc/python-mode.el (Python mode for Emacs). |
| 301 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 302 | - Revert a new feature in Unix dynamic loading: for one or two |
| 303 | revisions, modules were loaded using the RTLD_GLOBAL flag. It turned |
| 304 | out to be a bad idea. |
| 305 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 306 | Miscellaneous fixed bugs |
| 307 | ------------------------ |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 308 | |
| 309 | - All patches on the patch page have been integrated. (But much more |
| 310 | has been done!) |
| 311 | |
| 312 | - Several memory leaks plugged (e.g. the one for classes with a |
| 313 | __getattr__ method). |
| 314 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 315 | - Removed the only use of calloc(). This triggered an obscure bug on |
| 316 | multiprocessor Sparc Solaris 2.6. |
| 317 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 318 | - Fix a peculiar bug that would allow "import sys.time" to succeed |
| 319 | (believing the built-in time module to be a part of the sys package). |
| 320 | |
| 321 | - Fix a bug in the overflow checking when converting a Python long to |
| 322 | a C long (failed to convert -2147483648L, and some other cases). |
| 323 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 324 | Documentation |
| 325 | ------------- |
| 326 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 327 | - Doc strings have been added to many extension modules: __builtin__, |
| 328 | errno, select, signal, socket, sys, thread, time. Also to methods of |
| 329 | list objects (try [].append.__doc__). A doc string on a type will now |
| 330 | automatically be propagated to an instance if the instance has methods |
| 331 | that are accessed in the usual way. |
| 332 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 333 | - The documentation has been expanded and the formatting improved. |
| 334 | (Remember that the documentation is now unbundled and has its own |
| 335 | release cycle though; see http://www.python.org/doc/.) |
| 336 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 337 | - Added Misc/Porting -- a mini-FAQ on porting to a new platform. |
| 338 | |
| 339 | Ports and build procedure |
| 340 | ------------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 341 | |
| 342 | - The BeOS port is now integrated. Courtesy Chris Herborth. |
| 343 | |
| 344 | - Symbol files for FreeBSD 2.x and 3.x have been contributed |
| 345 | (Lib/plat-freebsd[23]/*). |
| 346 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 347 | - Support HPUX 10.20 DCE threads. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 348 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 349 | - Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0 |
| 350 | works, it won't also use -Olimit 1500 (which gives a warning for every |
| 351 | file). Also support the SGI_ABI environment variable better. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 352 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 353 | - The makesetup script now understands absolute pathnames ending in .o |
| 354 | 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] | 355 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 356 | - Other miscellaneous improvements to the configure script and |
| 357 | Makefiles. |
| 358 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 359 | - The test suite now uses a different sound sample. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 360 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 361 | Built-in functions |
| 362 | ------------------ |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 363 | |
| 364 | - Better checks for invalid input to int(), long(), string.atoi(), |
| 365 | string.atol(). (Formerly, a sign without digits would be accepted as |
| 366 | a legal ways to spell zero.) |
| 367 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 368 | - Changes to map() and filter() to use the length of a sequence only |
| 369 | as a hint -- if an IndexError happens earlier, take that. (Formerly, |
| 370 | this was considered an error.) |
| 371 | |
| 372 | - Experimental feature in getattr(): a third argument can specify a |
| 373 | default (instead of raising AttributeError). |
| 374 | |
| 375 | - Implement round() slightly different, so that for negative ndigits |
| 376 | no additional errors happen in the last step. |
| 377 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 378 | - The open() function now adds the filename to the exception when it |
| 379 | fails. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 380 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 381 | Built-in exceptions |
| 382 | ------------------- |
| 383 | |
| 384 | - New standard exceptions EnvironmentError and PosixError. |
| 385 | EnvironmentError is the base class for IOError and PosixError; |
| 386 | PosixError is the same as os.error. All this so that either exception |
| 387 | class can be instantiated with a third argument indicating a filename. |
| 388 | The built-in function open() and most os/posix functions that take a |
| 389 | filename argument now use this. |
| 390 | |
| 391 | Built-in types |
| 392 | -------------- |
| 393 | |
| 394 | - List objects now have an experimental pop() method; l.pop() returns |
| 395 | and removes the last item; l.pop(i) returns and removes the item at |
| 396 | i. Also, the sort() method is faster again. Sorting is now also |
| 397 | safer: it is impossible for the sorting function to modify the list |
| 398 | while the sort is going on (which could cause core dumps). |
| 399 | |
| 400 | - Changes to comparisons: numbers are now smaller than any other type. |
| 401 | This is done to prevent the circularity where [] < 0L < 1 < [] is |
| 402 | 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] | 403 | negative. This *shouldn't* affect any working code, but I've found |
| 404 | that the change caused several "sleeping" bugs to become active, so |
| 405 | beware! |
| 406 | |
| 407 | - Instance methods may now have other callable objects than just |
| 408 | Python functions as their im_func. Use new.instancemethod() or write |
| 409 | your own C code to create them; new.instancemethod() may be called |
| 410 | with None for the instance to create an unbound method. |
| 411 | |
| 412 | - Assignment to __name__, __dict__ or __bases__ of a class object is |
| 413 | now allowed (with stringent type checks); also allow assignment to |
| 414 | __getattr__ etc. The cached values for __getattr__ etc. are |
| 415 | recomputed after such assignments (but not for derived classes :-( ). |
| 416 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 417 | - Allow assignment to some attributes of function objects: func_code, |
| 418 | func_defaults and func_doc / __doc__. (With type checks except for |
| 419 | __doc__ / func_doc .) |
| 420 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 421 | Python services |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 422 | --------------- |
| 423 | |
| 424 | - New tests (in Lib/test): reperf.py (regular expression benchmark), |
| 425 | sortperf.py (list sorting benchmark), test_MimeWriter.py (test case |
| 426 | for the MimeWriter module). |
| 427 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 428 | - Generalized test/regrtest.py so that it is useful for testing other |
| 429 | packages. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 430 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 431 | - The ihooks.py module now understands package imports. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 432 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 433 | - In code.py, add a class that subsumes Fredrik Lundh's |
| 434 | PythonInterpreter class. The interact() function now uses this. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 435 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 436 | - In rlcompleter.py, in completer(), return None instead of raising an |
| 437 | IndexError when there are no more completions left. |
| 438 | |
| 439 | - Fixed the marshal module to test for certain common kinds of invalid |
| 440 | input. (It's still not foolproof!) |
| 441 | |
| 442 | - In the operator module, add an alias (now the preferred name) |
| 443 | "contains" for "sequenceincludes". |
| 444 | |
| 445 | String Services |
| 446 | --------------- |
| 447 | |
| 448 | - In the string and strop modules, in the replace() function, treat an |
| 449 | empty pattern as an error (since it's not clear what was meant!). |
| 450 | |
| 451 | - Some speedups to re.py, especially the string substitution and split |
| 452 | functions. Also added new function/method findall(), to find all |
| 453 | occurrences of a given substring. |
| 454 | |
| 455 | - In cStringIO, add better argument type checking and support the |
| 456 | readonly 'closed' attribute (like regular files). |
| 457 | |
| 458 | - In the struct module, unsigned 1-2 byte sized formats no longer |
| 459 | result in long integer values. |
| 460 | |
| 461 | Miscellaneous services |
| 462 | ---------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 463 | |
| 464 | - In whrandom.py, added new method and function randrange(), same as |
| 465 | choice(range(start, stop, step)) but faster. This addresses the |
| 466 | problem that randint() was accidentally defined as taking an inclusive |
| 467 | range. Also, randint(a, b) is now redefined as randrange(a, b+1), |
| 468 | adding extra range and type checking to its arguments! |
| 469 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 470 | - Add some semi-thread-safety to random.gauss() (it used to be able to |
| 471 | crash when invoked from separate threads; now the worst it can do is |
| 472 | give a duplicate result occasionally). |
| 473 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 474 | - Some restructuring and generalization done to cmd.py. |
| 475 | |
| 476 | - Major upgrade to ConfigParser.py; converted to using 're', added new |
| 477 | exceptions, support underscore in section header and option name. No |
| 478 | longer add 'name' option to every section; instead, add '__name__'. |
| 479 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 480 | - 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] | 481 | don't want it to show up in the readline history! Also don't catch |
| 482 | interrupts (the try-finally already does all necessary cleanup). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 483 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 484 | Generic OS Services |
| 485 | ------------------- |
| 486 | |
| 487 | - New functions in os.py: makedirs(), removedirs(), renames(). New |
| 488 | variable: linesep (the line separator as found in binary files, |
| 489 | i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac. Do *not* use |
| 490 | this with files opened in (default) text mode; the line separator used |
| 491 | will always be '\n'! |
| 492 | |
| 493 | - Changes to the 'os.path' submodule of os.py: added getsize(), |
| 494 | getmtime(), getatime() -- these fetch the most popular items from the |
| 495 | stat return tuple. |
| 496 | |
| 497 | - In the time module, add strptime(), if it exists. (This parses a |
| 498 | time according to a format -- the inverse of strftime().) Also, |
| 499 | remove the call to mktime() from strftime() -- it messed up the |
| 500 | formatting of some non-local times. |
| 501 | |
| 502 | - In the socket module, added a new function gethostbyname_ex(). |
| 503 | Also, don't use #ifdef to test for some symbols that are enums on some |
| 504 | platforms (and should exist everywhere). |
| 505 | |
| 506 | Optional OS Services |
| 507 | -------------------- |
| 508 | |
| 509 | - Some fixes to gzip.py. In particular, the readlines() method now |
| 510 | returns the lines *with* trailing newline characters, like readlines() |
| 511 | of regular file objects. Also, it didn't work together with cPickle; |
| 512 | fixed that. |
| 513 | |
| 514 | - In whichdb.py, support byte-swapped dbhash (bsddb) files. |
| 515 | |
| 516 | - In anydbm.py, look at the type of an existing database to determine |
| 517 | which module to use to open it. (The anydbm.error exception is now a |
| 518 | tuple.) |
| 519 | |
| 520 | Unix Services |
| 521 | ------------- |
| 522 | |
| 523 | - In the termios module, in tcsetattr(), initialize the structure vy |
| 524 | calling tcgetattr(). |
| 525 | |
| 526 | - Added some of the "wait status inspection" macros as functions to |
| 527 | the posix module (and thus to the os module): WEXITSTATUS(), |
| 528 | WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG(). |
| 529 | |
| 530 | - In the syslog module, make the default facility more intuitive |
| 531 | (matching the docs). |
| 532 | |
| 533 | Debugger |
| 534 | -------- |
| 535 | |
| 536 | - In pdb.py, support for setting breaks on files/modules that haven't |
| 537 | been loaded yet. |
| 538 | |
| 539 | Internet Protocols and Support |
| 540 | ------------------------------ |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 541 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 542 | - Changes in urllib.py; sped up unquote() and quote(). Fixed an |
| 543 | obscure bug in quote_plus(). Added urlencode(dict) -- convenience |
| 544 | function for sending a POST request with urlopen(). Use the getpass |
| 545 | module to ask for a password. Rewrote the (test) main program so that |
| 546 | when used as a script, it can retrieve one or more URLs to stdout. |
| 547 | 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] | 548 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 549 | - In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't |
| 550 | fail when someone asks for their HEAD. Also, for POST, set the |
| 551 | default content-type to application/x-www-form-urlencoded. Also, in |
| 552 | FieldStorage.__init__(), when method='GET', always get the query |
| 553 | string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an |
| 554 | explicitly passed in fp. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 555 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 556 | - The smtplib.py module now supports ESMTP and has improved standard |
| 557 | compliance, for picky servers. |
| 558 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 559 | - Improved imaplib.py. |
| 560 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 561 | - Fixed UDP support in SocketServer.py (it never worked). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 562 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 563 | - Fixed a small bug in CGIHTTPServer.py. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 564 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 565 | Internet Data handling |
| 566 | ---------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 567 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 568 | - In rfc822.py, add a new class AddressList. Also support a new |
| 569 | overridable method, isheader(). Also add a get() method similar to |
| 570 | dictionaries (and make getheader() an alias for it). Also, be smarter |
| 571 | about seekable (test whether fp.tell() works) and test for presence of |
| 572 | unread() method before trying seeks. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 573 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 574 | - In sgmllib.py, restore the call to report_unbalanced() that was lost |
| 575 | long ago. Also some other improvements: handle <? processing |
| 576 | instructions >, allow . and - in entity names, and allow \r\n as line |
| 577 | separator. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 578 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 579 | - Some restructuring and generalization done to multifile.py; support |
| 580 | a 'seekable' flag. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 581 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 582 | Restricted Execution |
| 583 | -------------------- |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 584 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 585 | - Improvements to rexec.py: package support; support a (minimal) |
| 586 | sys.exc_info(). Also made the (test) main program a bit fancier (you |
| 587 | 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] | 588 | |
| 589 | Tkinter |
| 590 | ------- |
| 591 | |
| 592 | - On Unix, Tkinter can now safely be used from a multi-threaded |
| 593 | application. (Formerly, no threads would make progress while |
| 594 | Tkinter's mainloop() was active, because it didn't release the Python |
| 595 | interpreter lock.) Unfortunately, on Windows, threads other than the |
| 596 | main thread should not call update() or update_idletasks() because |
| 597 | this will deadlock the application. |
| 598 | |
| 599 | - An interactive interpreter that uses readline and Tkinter no longer |
| 600 | uses up all available CPU time. |
| 601 | |
| 602 | - Even if readline is not used, Tk windows created in an interactive |
| 603 | interpreter now get continuously updated. (This even works in Windows |
| 604 | as long as you don't hit a key.) |
| 605 | |
| 606 | - New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py. |
| 607 | |
| 608 | - No longer register Tcl_finalize() as a low-level exit handler. It |
| 609 | may call back into Python, and that's a bad idea. |
| 610 | |
| 611 | - Allow binding of Tcl commands (given as a string). |
| 612 | |
| 613 | - Some minor speedups; replace explicitly coded getint() with int() in |
| 614 | most places. |
| 615 | |
| 616 | - In FileDialog.py, remember the directory of the selected file, if |
| 617 | given. |
| 618 | |
| 619 | - Change the names of all methods in the Wm class: they are now |
| 620 | wm_title(), etc. The old names (title() etc.) are still defined as |
| 621 | aliases. |
| 622 | |
| 623 | - Add a new method of interpreter objects, interpaddr(). This returns |
| 624 | the address of the Tcl interpreter object, as an integer. Not very |
| 625 | useful for the Python programmer, but this can be called by another C |
| 626 | extension that needs to make calls into the Tcl/Tk C API and needs to |
| 627 | get the address of the Tcl interpreter object. A simple cast of the |
| 628 | return value to (Tcl_Interp *) will do the trick. |
| 629 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 630 | Windows General |
| 631 | --------------- |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 632 | |
| 633 | - Don't insist on proper case for module source files if the filename |
| 634 | is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still |
| 635 | doesn't). This should address problems with this feature on |
| 636 | oldfashioned filesystems (Novell servers?). |
| 637 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 638 | Windows Library |
| 639 | --------------- |
| 640 | |
| 641 | - os.environ is now all uppercase, but accesses are case insensitive, |
| 642 | and the putenv() calls made as a side effect of changing os.environ |
| 643 | are case preserving. |
| 644 | |
| 645 | - Removed samefile(), sameopenfile(), samestat() from os.path (aka |
| 646 | ntpath.py) -- these cannot be made to work reliably (at least I |
| 647 | wouldn't know how). |
| 648 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 649 | - Fixed os.pipe() so that it returns file descriptors acceptable to |
| 650 | os.read() and os.write() (like it does on Unix), rather than Windows |
| 651 | file handles. |
| 652 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 653 | - Added a table of WSA error codes to socket.py. |
| 654 | |
| 655 | - In the select module, put the (huge) file descriptor arrays on the |
| 656 | heap. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 657 | |
| 658 | - The getpass module now raises KeyboardInterrupt when it sees ^C. |
| 659 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 660 | - In mailbox.py, fix tell/seek when using files opened in text mode. |
| 661 | |
| 662 | - In rfc822.py, fix tell/seek when using files opened in text mode. |
| 663 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 664 | - In the msvcrt extension module, release the interpreter lock for |
| 665 | calls that may block: _locking(), _getch(), _getche(). Also fix a |
| 666 | bogus error return when open_osfhandle() doesn't have the right |
| 667 | argument list. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 668 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 669 | Windows Installer |
| 670 | ----------------- |
| 671 | |
| 672 | - The registry key used is now "1.5" instead of "1.5.x" -- so future |
| 673 | versions of 1.5 and Mark Hammond's win32all installer don't need to be |
| 674 | resynchronized. |
| 675 | |
| 676 | Windows Tools |
| 677 | ------------- |
| 678 | |
| 679 | - Several improvements to freeze specifically for Windows. |
| 680 | |
| 681 | Windows Build Procedure |
| 682 | ----------------------- |
| 683 | |
| 684 | - The VC++ project files and the WISE installer have been moved to the |
| 685 | PCbuild subdirectory, so they are distributed in the same subdirectory |
| 686 | where they must be used. This avoids confusion. |
| 687 | |
| 688 | - New project files for Windows 3.1 port by Jim Ahlstrom. |
| 689 | |
| 690 | - Got rid of the obsolete subdirectory PC/setup_nt/. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 691 | |
| 692 | - The projects now use distinct filenames for the .exe, .dll, .lib and |
| 693 | .pyd files built in debug mode (by appending "_d" to the base name, |
| 694 | before the extension). This makes it easier to switch between the two |
| 695 | and get the right versions. There's a pragma in config.h that directs |
| 696 | the linker to include the appropriate .lib file (so python15.lib no |
| 697 | longer needs to be explicit in your project). |
| 698 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 699 | - The installer now installs more files (e.g. config.h). The idea is |
| 700 | that you shouldn't need the source distribution if you want build your |
| 701 | own extensions in C or C++. |
| 702 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 703 | Tools and Demos |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 704 | --------------- |
| 705 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 706 | - New script nm2def.py by Marc-Andre Lemburg, to construct |
| 707 | PC/python_nt.def automatically (some hand editing still required). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 708 | |
| 709 | - New tool ndiff.py: Tim Peters' text diffing tool. |
| 710 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 711 | - Various and sundry improvements to the freeze script. |
| 712 | |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 713 | - The script texi2html.py (which was part of the Doc tree but is no |
| 714 | longer used there) has been moved to the Tools/scripts subdirectory. |
| 715 | |
| 716 | - Some generalizations in the webchecker code. There's now a |
| 717 | primnitive gui for websucker.py: wsgui.py. (In Tools/webchecker/.) |
| 718 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 719 | - The ftpmirror.py script now handles symbolic links properly, and |
| 720 | also files with multiple spaces in their names. |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 721 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 722 | - The 1.5.1 tabnanny.py suffers an assert error if fed a script whose |
| 723 | 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] | 724 | |
| 725 | Python/C API |
| 726 | ------------ |
| 727 | |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 728 | - Added missing prototypes for PyEval_CallFunction() and |
| 729 | PyEval_CallMethod(). |
| 730 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 731 | - New macro PyList_SET_ITEM(). |
Guido van Rossum | f5475c9 | 1998-08-06 17:55:46 +0000 | [diff] [blame] | 732 | |
| 733 | - New macros to access object members for PyFunction, PyCFunction |
| 734 | objects. |
| 735 | |
| 736 | - New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to |
| 737 | dynamically add one or many entries to the table of built-in modules. |
| 738 | |
| 739 | - New macro Py_InitModule3(name, methods, doc) which calls |
| 740 | Py_InitModule4() with appropriate arguments. (The -4 variant requires |
| 741 | you to pass an obscure version number constant which is always the same.) |
| 742 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 743 | - New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to |
| 744 | sys.stdout or sys.stderr using a printf-like interface. (Used in |
| 745 | _tkinter.c, for example.) |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 746 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 747 | - New APIs for conversion between Python longs and C 'long long' if |
| 748 | your compiler supports it. |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 749 | |
| 750 | - PySequence_In() is now called PySequence_Contains(). |
| 751 | (PySequence_In() is still supported for b/w compatibility; it is |
| 752 | declared obsolete because its argument order is confusing.) |
| 753 | |
| 754 | - PyDict_GetItem() and PyDict_GetItemString() are changed so that they |
| 755 | *never* raise an exception -- (even if the hash() fails, simply clear |
| 756 | the error). This was necessary because there is lots of code out |
| 757 | there that already assumes this. |
| 758 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 759 | - Changes to PySequence_Tuple() and PySequence_List() to use the |
| 760 | length of a sequence only as a hint -- if an IndexError happens |
| 761 | earlier, take that. (Formerly, this was considered an error.) |
Guido van Rossum | ab9d6f0 | 1998-08-10 22:01:13 +0000 | [diff] [blame] | 762 | |
Guido van Rossum | 27b3bc3 | 1998-08-11 18:42:26 +0000 | [diff] [blame] | 763 | - Reformatted abstract.c to give it a more familiar "look" and fixed |
| 764 | many error checking bugs. |
| 765 | |
| 766 | - Add NULL pointer checks to all calls of a C function through a type |
| 767 | object and extensions (e.g. nb_add). |
| 768 | |
| 769 | - The code that initializes sys.path now calls Py_GetPythonHome() |
| 770 | instead of getenv("PYTHONHOME"). This, together with the new API |
| 771 | Py_SetPythonHome(), makes it easier for embedding applications to |
| 772 | change the notion of Python's "home" directory (where the libraries |
| 773 | etc. are sought). |
| 774 | |
| 775 | - 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] | 776 | |
| 777 | |
| 778 | ====================================================================== |
| 779 | |
| 780 | |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 781 | From 1.5 to 1.5.1 |
| 782 | ================= |
| 783 | |
| 784 | General |
| 785 | ------- |
| 786 | |
| 787 | - The documentation is now unbundled. It has also been extensively |
| 788 | modified (mostly to implement a new and more uniform formatting |
| 789 | style). We figure that most people will prefer to download one of the |
| 790 | preformatted documentation sets (HTML, PostScript or PDF) and that |
| 791 | only a minority have a need for the LaTeX or FrameMaker sources. Of |
| 792 | course, the unbundled documentation sources still released -- just not |
| 793 | in the same archive file, and perhaps not on the same date. |
| 794 | |
| 795 | - All bugs noted on the errors page (and many unnoted) are fixed. All |
| 796 | new bugs take their places. |
| 797 | |
Guido van Rossum | 974f295 | 1998-04-13 21:00:54 +0000 | [diff] [blame] | 798 | - No longer a core dump when attempting to print (or repr(), or str()) |
| 799 | a list or dictionary that contains an instance of itself; instead, the |
| 800 | recursive entry is printed as [...] or {...}. See Py_ReprEnter() and |
| 801 | Py_ReprLeave() below. Comparisons of such objects still go beserk, |
| 802 | since this requires a different kind of fix; fortunately, this is a |
| 803 | less common scenario in practice. |
| 804 | |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 805 | Syntax change |
| 806 | ------------- |
| 807 | |
| 808 | - The raise statement can now be used without arguments, to re-raise |
| 809 | a previously set exception. This should be used after catching an |
| 810 | exception with an except clause only, either in the except clause or |
| 811 | later in the same function. |
| 812 | |
| 813 | Import and module handling |
| 814 | -------------------------- |
| 815 | |
| 816 | - The implementation of import has changed to use a mutex (when |
| 817 | threading is supported). This means that when two threads |
| 818 | simultaneously import the same module, the import statements are |
| 819 | serialized. Recursive imports are not affected. |
| 820 | |
| 821 | - Rewrote the finalization code almost completely, to be much more |
| 822 | careful with the order in which modules are destroyed. Destructors |
Guido van Rossum | fc8f5d1 | 1998-08-04 22:58:51 +0000 | [diff] [blame] | 823 | will now generally be able to reference built-in names such as None |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 824 | without trouble. |
| 825 | |
Guido van Rossum | 974f295 | 1998-04-13 21:00:54 +0000 | [diff] [blame] | 826 | - Case-insensitive platforms such as Mac and Windows require the case |
| 827 | of a module's filename to match the case of the module name as |
| 828 | specified in the import statement (see below). |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 829 | |
| 830 | - The code for figuring out the default path now distinguishes between |
| 831 | files, modules, executable files, and directories. When expecting a |
| 832 | module, we also look for the .pyc or .pyo file. |
| 833 | |
| 834 | Parser/tokenizer changes |
| 835 | ------------------------ |
| 836 | |
| 837 | - The tokenizer can now warn you when your source code mixes tabs and |
Guido van Rossum | 974f295 | 1998-04-13 21:00:54 +0000 | [diff] [blame] | 838 | spaces for indentation in a manner that depends on how much a tab is |
| 839 | worth in spaces. Use "python -t" or "python -v" to enable this |
| 840 | option. Use "python -tt" to turn the warnings into errors. (See also |
| 841 | tabnanny.py and tabpolice.py below.) |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 842 | |
| 843 | - Return unsigned characters from tok_nextc(), so '\377' isn't |
| 844 | mistaken for an EOF character. |
| 845 | |
| 846 | - Fixed two pernicious bugs in the tokenizer that only affected AIX. |
| 847 | One was actually a general bug that was triggered by AIX's smaller I/O |
| 848 | buffer size. The other was a bug in the AIX optimizer's loop |
| 849 | unrolling code; swapping two statements made the problem go away. |
| 850 | |
| 851 | Tools, demos and miscellaneous files |
| 852 | ------------------------------------ |
| 853 | |
| 854 | - There's a new version of Misc/python-mode.el (the Emacs mode for |
| 855 | Python) which is much smarter about guessing the indentation style |
| 856 | used in a particular file. Lots of other cool features too! |
| 857 | |
| 858 | - There are two new tools in Tools/scripts: tabnanny.py and |
| 859 | tabpolice.py, implementing two different ways of checking whether a |
| 860 | file uses indentation in a way that is sensitive to the interpretation |
| 861 | of a tab. The preferred module is tabnanny.py (by Tim Peters). |
| 862 | |
| 863 | - Some new demo programs: |
| 864 | |
| 865 | Demo/tkinter/guido/paint.py -- Dave Mitchell |
| 866 | Demo/sockets/unixserver.py -- Piet van Oostrum |
| 867 | |
| 868 | |
| 869 | - Much better freeze support. The freeze script can now freeze |
| 870 | hierarchical module names (with a corresponding change to import.c), |
| 871 | and has a few extra options (e.g. to suppress freezing specific |
| 872 | modules). It also does much more on Windows NT. |
| 873 | |
| 874 | - Version 1.0 of the faq wizard is included (only very small changes |
| 875 | since version 0.9.0). |
| 876 | |
| 877 | - New feature for the ftpmirror script: when removing local files |
| 878 | (i.e., only when -r is used), do a recursive delete. |
| 879 | |
| 880 | Configuring and building Python |
| 881 | ------------------------------- |
| 882 | |
| 883 | - Get rid of the check for -linet -- recent Sequent Dynix systems don't |
| 884 | need this any more and apparently it screws up their configuration. |
| 885 | |
| 886 | - Some changes because gcc on SGI doesn't support '-all'. |
| 887 | |
| 888 | - Changed the build rules to use $(LIBRARY) instead of |
| 889 | -L.. -lpython$(VERSION) |
| 890 | since the latter trips up the SunOS 4.1.x linker (sigh). |
| 891 | |
| 892 | - Fix the bug where the '# dgux is broken' comment in the Makefile |
| 893 | tripped over Make on some platforms. |
| 894 | |
| 895 | - Changes for AIX: install the python.exp file; properly use |
| 896 | $(srcdir); the makexp_aix script now removes C++ entries of the form |
| 897 | Class::method. |
| 898 | |
| 899 | - Deleted some Makefile targets only used by the (long obsolete) |
| 900 | gMakefile hacks. |
| 901 | |
| 902 | Extension modules |
| 903 | ----------------- |
| 904 | |
| 905 | - Performance and threading improvements to the socket and bsddb |
| 906 | modules, by Christopher Lindblad of Infoseek. |
| 907 | |
| 908 | - Added operator.__not__ and operator.not_. |
| 909 | |
| 910 | - In the thread module, when a thread exits due to an unhandled |
| 911 | exception, don't store the exception information in sys.last_*; it |
| 912 | prevents proper calling of destructors of local variables. |
| 913 | |
| 914 | - Fixed a number of small bugs in the cPickle module. |
| 915 | |
| 916 | - Changed find() and rfind() in the strop module so that |
| 917 | find("x","",2) returns -1, matching the implementation in string.py. |
| 918 | |
| 919 | - In the time module, be more careful with the result of ctime(), and |
| 920 | test for HAVE_MKTIME before usinmg mktime(). |
| 921 | |
| 922 | - Doc strings contributed by Mitch Chapman to the termios, pwd, gdbm |
| 923 | modules. |
| 924 | |
| 925 | - Added the LOG_SYSLOG constant to the syslog module, if defined. |
| 926 | |
| 927 | Standard library modules |
| 928 | ------------------------ |
| 929 | |
| 930 | - All standard library modules have been converted to an indentation |
| 931 | style using either only tabs or only spaces -- never a mixture -- if |
Guido van Rossum | 974f295 | 1998-04-13 21:00:54 +0000 | [diff] [blame] | 932 | they weren't already consistent according to tabnanny. This means |
| 933 | that the new -t option (see above) won't complain about standard |
| 934 | library modules. |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 935 | |
| 936 | - New standard library modules: |
| 937 | |
| 938 | threading -- GvR and the thread-sig |
| 939 | Java style thread objects -- USE THIS!!! |
| 940 | |
| 941 | getpass -- Piers Lauder |
| 942 | simple utilities to prompt for a password and to |
| 943 | retrieve the current username |
| 944 | |
| 945 | imaplib -- Piers Lauder |
| 946 | interface for the IMAP4 protocol |
| 947 | |
| 948 | poplib -- David Ascher, Piers Lauder |
| 949 | interface for the POP3 protocol |
| 950 | |
| 951 | smtplib -- Dragon De Monsyne |
| 952 | interface for the SMTP protocol |
| 953 | |
| 954 | - Some obsolete modules moved to a separate directory (Lib/lib-old) |
| 955 | which is *not* in the default module search path: |
| 956 | |
| 957 | Para |
| 958 | addpack |
| 959 | codehack |
| 960 | fmt |
| 961 | lockfile |
| 962 | newdir |
| 963 | ni |
| 964 | rand |
| 965 | tb |
| 966 | |
| 967 | - New version of the PCRE code (Perl Compatible Regular Expressions -- |
| 968 | the re module and the supporting pcre extension) by Andrew Kuchling. |
| 969 | Incompatible new feature in re.sub(): the handling of escapes in the |
| 970 | replacement string has changed. |
| 971 | |
Guido van Rossum | 974f295 | 1998-04-13 21:00:54 +0000 | [diff] [blame] | 972 | - Interface change in the copy module: a __deepcopy__ method is now |
| 973 | called with the memo dictionary as an argument. |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 974 | |
| 975 | - Feature change in the tokenize module: differentiate between NEWLINE |
| 976 | token (an official newline) and NL token (a newline that the grammar |
| 977 | ignores). |
| 978 | |
| 979 | - Several bugfixes to the urllib module. It is now truly thread-safe, |
| 980 | and several bugs and a portability problem have been fixed. New |
| 981 | features, all due to Sjoerd Mullender: When creating a temporary file, |
| 982 | it gives it an appropriate suffix. Support the "data:" URL scheme. |
| 983 | The open() method uses the tempcache. |
| 984 | |
| 985 | - New version of the xmllib module (this time with a test suite!) by |
| 986 | Sjoerd Mullender. |
| 987 | |
| 988 | - Added debugging code to the telnetlib module, to be able to trace |
| 989 | the actual traffic. |
| 990 | |
| 991 | - In the rfc822 module, added support for deleting a header (still no |
| 992 | support for adding headers, though). Also fixed a bug where an |
| 993 | illegal address would cause a crash in getrouteaddr(), fixed a |
| 994 | sign reversal in mktime_tz(), and use the local timezone by default |
| 995 | (the latter two due to Bill van Melle). |
| 996 | |
| 997 | - The normpath() function in the dospath and ntpath modules no longer |
| 998 | does case normalization -- for that, use the separate function |
| 999 | normcase() (which always existed); normcase() has been sped up and |
| 1000 | fixed (it was the cause of a crash in Mark Hammond's installer in |
| 1001 | certain locales). |
| 1002 | |
| 1003 | - New command supported by the ftplib module: rmd(); also fixed some |
| 1004 | minor bugs. |
| 1005 | |
| 1006 | - The profile module now uses a different timer function by default -- |
| 1007 | time.clock() is generally better than os.times(). This makes it work |
| 1008 | better on Windows NT, too. |
| 1009 | |
| 1010 | - The tempfile module now recovers when os.getcwd() raises an |
| 1011 | exception. |
| 1012 | |
| 1013 | - Fixed some bugs in the random module; gauss() was subtly wrong, and |
| 1014 | vonmisesvariate() should return a full circle. Courtesy Mike Miller, |
| 1015 | Lambert Meertens (gauss()), and Magnus Kessler (vonmisesvariate()). |
| 1016 | |
| 1017 | - Better default seed in the whrandom module, courtesy Andrew Kuchling. |
| 1018 | |
| 1019 | - Fix slow close() in shelve module. |
| 1020 | |
| 1021 | - The Unix mailbox class in the mailbox module is now more robust when |
| 1022 | a line begins with the string "From " but is definitely not the start |
| 1023 | of a new message. The pattern used can be changed by overriding a |
| 1024 | method or class variable. |
| 1025 | |
| 1026 | - Added a rmtree() function to the copy module. |
| 1027 | |
| 1028 | - Fixed several typos in the pickle module. Also fixed problems when |
| 1029 | unpickling in restricted execution environments. |
| 1030 | |
| 1031 | - Added docstrings and fixed a typo in the py_compile and compileall |
| 1032 | modules. At Mark Hammond's repeated request, py_compile now append a |
| 1033 | newline to the source if it needs one. Both modules support an extra |
| 1034 | parameter to specify the purported source filename (to be used in |
| 1035 | error messages). |
| 1036 | |
| 1037 | - Some performance tweaks by Jeremy Hylton to the gzip module. |
| 1038 | |
| 1039 | - Fixed a bug in the merge order of dictionaries in the ConfigParser |
| 1040 | module. Courtesy Barry Warsaw. |
| 1041 | |
| 1042 | - In the multifile module, support the optional second parameter to |
| 1043 | seek() when possible. |
| 1044 | |
| 1045 | - Several fixes to the gopherlib module by Lars Marius Garshol. Also, |
| 1046 | urlparse now correctly handles Gopher URLs with query strings. |
| 1047 | |
| 1048 | - Fixed a tiny bug in format_exception() in the traceback module. |
| 1049 | Also rewrite tb_lineno() to be compatible with JPython (and not |
| 1050 | disturb the current exception!); by Jim Hugunin. |
| 1051 | |
| 1052 | - The httplib module is more robust when servers send a short response |
| 1053 | -- courtesy Tim O'Malley. |
| 1054 | |
| 1055 | Tkinter and friends |
| 1056 | ------------------- |
| 1057 | |
| 1058 | - Various typos and bugs fixed. |
| 1059 | |
| 1060 | - New module Tkdnd implements a drag-and-drop protocol (within one |
| 1061 | application only). |
| 1062 | |
| 1063 | - The event_*() widget methods have been restructured slightly -- they |
| 1064 | no longer use the default root. |
| 1065 | |
| 1066 | - The interfaces for the bind*() and unbind() widget methods have been |
| 1067 | redesigned; the bind*() methods now return the name of the Tcl command |
| 1068 | created for the callback, and this can be passed as a optional |
| 1069 | argument to unbind() in order to delete the command (normally, such |
| 1070 | commands are automatically unbound when the widget is destroyed, but |
| 1071 | for some applications this isn't enough). |
| 1072 | |
| 1073 | - Variable objects now have trace methods to interface to Tcl's |
| 1074 | variable tracing facilities. |
| 1075 | |
| 1076 | - Image objects now have an optional keyword argument, 'master', to |
| 1077 | specify a widget (tree) to which they belong. The image_names() and |
| 1078 | image_types() calls are now also widget methods. |
| 1079 | |
| 1080 | - There's a new global call, Tkinter.NoDefaultRoot(), which disables |
| 1081 | all use of the default root by the Tkinter library. This is useful to |
| 1082 | debug applications that are in the process of being converted from |
| 1083 | relying on the default root to explicit specification of the root |
| 1084 | widget. |
| 1085 | |
| 1086 | - The 'exit' command is deleted from the Tcl interpreter, since it |
| 1087 | provided a loophole by which one could (accidentally) exit the Python |
| 1088 | interpreter without invoking any cleanup code. |
| 1089 | |
| 1090 | - Tcl_Finalize() is now registered as a Python low-level exit handle, |
| 1091 | so Tcl will be finalized when Python exits. |
| 1092 | |
| 1093 | The Python/C API |
| 1094 | ---------------- |
| 1095 | |
Guido van Rossum | 974f295 | 1998-04-13 21:00:54 +0000 | [diff] [blame] | 1096 | - New function PyThreadState_GetDict() returns a per-thread dictionary |
| 1097 | intended for storing thread-local global variables. |
| 1098 | |
| 1099 | - New functions Py_ReprEnter() and Py_ReprLeave() use the per-thread |
| 1100 | dictionary to allow recursive container types to detect recursion in |
| 1101 | their repr(), str() and print implementations. |
| 1102 | |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 1103 | - New function PyObject_Not(x) calculates (not x) according to Python's |
| 1104 | standard rules (basically, it negates the outcome PyObject_IsTrue(x). |
| 1105 | |
| 1106 | - New function _PyModule_Clear(), which clears a module's dictionary |
| 1107 | carefully without removing the __builtins__ entry. This is implied |
| 1108 | when a module object is deallocated (this used to clear the dictionary |
| 1109 | completely). |
| 1110 | |
| 1111 | - New function PyImport_ExecCodeModuleEx(), which extends |
| 1112 | PyImport_ExecCodeModule() by adding an extra parameter to pass it the |
| 1113 | true file. |
| 1114 | |
| 1115 | - New functions Py_GetPythonHome() and Py_SetPythonHome(), intended to |
| 1116 | allow embedded applications to force a different value for PYTHONHOME. |
| 1117 | |
| 1118 | - New global flag Py_FrozenFlag is set when this is a "frozen" Python |
| 1119 | binary; it suppresses warnings about not being able to find the |
| 1120 | standard library directories. |
| 1121 | |
| 1122 | - New global flag Py_TabcheckFlag is incremented by the -t option and |
| 1123 | causes the tokenizer to issue warnings or errors about inconsistent |
| 1124 | mixing of tabs and spaces for indentation. |
| 1125 | |
| 1126 | Miscellaneous minor changes and bug fixes |
| 1127 | ----------------------------------------- |
| 1128 | |
| 1129 | - Improved the error message when an attribute of an attribute-less |
| 1130 | object is requested -- include the name of the attribute and the type |
| 1131 | of the object in the message. |
| 1132 | |
| 1133 | - Sped up int(), long(), float() a bit. |
| 1134 | |
| 1135 | - Fixed a bug in list.sort() that would occasionally dump core. |
| 1136 | |
| 1137 | - Fixed a bug in PyNumber_Power() that caused numeric arrays to fail |
| 1138 | when taken tothe real power. |
| 1139 | |
| 1140 | - Fixed a number of bugs in the file reading code, at least one of |
| 1141 | which could cause a core dump on NT, and one of which would |
| 1142 | occasionally cause file.read() to return less than the full contents |
| 1143 | of the file. |
| 1144 | |
| 1145 | - Performance hack by Vladimir Marangozov for stack frame creation. |
| 1146 | |
| 1147 | - Make sure setvbuf() isn't used unless HAVE_SETVBUF is defined. |
| 1148 | |
Guido van Rossum | 974f295 | 1998-04-13 21:00:54 +0000 | [diff] [blame] | 1149 | Windows 95/NT |
| 1150 | ------------- |
| 1151 | |
| 1152 | - The .lib files are now part of the distribution; they are collected |
| 1153 | in the subdirectory "libs" of the installation directory. |
| 1154 | |
| 1155 | - The extension modules (.pyd files) are now collected in a separate |
| 1156 | subdirectory of the installation directory named "DLLs". |
| 1157 | |
| 1158 | - The case of a module's filename must now match the case of the |
| 1159 | module name as specified in the import statement. This is an |
| 1160 | experimental feature -- if it turns out to break in too many |
| 1161 | situations, it will be removed (or disabled by default) in the future. |
| 1162 | It can be disabled on a per-case basis by setting the environment |
| 1163 | variable PYTHONCASEOK (to any value). |
| 1164 | |
| 1165 | |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 1166 | ====================================================================== |
| 1167 | |
| 1168 | |
| 1169 | From 1.5b2 to 1.5 |
| 1170 | ================= |
| 1171 | |
| 1172 | - Newly documentated module: BaseHTTPServer.py, thanks to Greg Stein. |
| 1173 | |
| 1174 | - Added doc strings to string.py, stropmodule.c, structmodule.c, |
| 1175 | thanks to Charles Waldman. |
| 1176 | |
| 1177 | - Many nits fixed in the manuals, thanks to Fred Drake and many others |
| 1178 | (especially Rob Hooft and Andrew Kuchling). The HTML version now uses |
| 1179 | HTML markup instead of inline GIF images for tables; only two images |
| 1180 | are left (for obsure bits of math). The index of the HTML version has |
| 1181 | also been much improved. Finally, it is once again possible to |
| 1182 | generate an Emacs info file from the library manual (but I don't |
| 1183 | commit to supporting this in future versions). |
| 1184 | |
| 1185 | - New module: telnetlib.py (a simple telnet client library). |
| 1186 | |
| 1187 | - New tool: Tools/versioncheck/, by Jack Jansen. |
| 1188 | |
| 1189 | - Ported zlibmodule.c and bsddbmodule.c to NT; The project file for MS |
| 1190 | DevStudio 5.0 now includes new subprojects to build the zlib and bsddb |
| 1191 | extension modules. |
| 1192 | |
| 1193 | - Many small changes again to Tkinter.py -- mostly bugfixes and adding |
| 1194 | missing routines. Thanks to Greg McFarlane for reporting a bunch of |
| 1195 | problems and proofreading my fixes. |
| 1196 | |
| 1197 | - The re module and its documentation are up to date with the latest |
| 1198 | version released to the string-sig (Dec. 22). |
| 1199 | |
| 1200 | - Stop test_grp.py from failing when the /etc/group file is empty |
| 1201 | (yes, this happens!). |
| 1202 | |
| 1203 | - Fix bug in integer conversion (mystrtoul.c) that caused |
| 1204 | 4294967296==0 to be true! |
| 1205 | |
| 1206 | - The VC++ 4.2 project file should be complete again. |
| 1207 | |
| 1208 | - In tempfile.py, use a better template on NT, and add a new optional |
| 1209 | argument "suffix" with default "" to specify a specific extension for |
| 1210 | the temporary filename (needed sometimes on NT but perhaps also handy |
| 1211 | elsewhere). |
| 1212 | |
| 1213 | - Fixed some bugs in the FAQ wizard, and converted it to use re |
| 1214 | instead of regex. |
| 1215 | |
| 1216 | - Fixed a mysteriously undetected error in dlmodule.c (it was using a |
| 1217 | totally bogus routine name to raise an exception). |
| 1218 | |
| 1219 | - Fixed bug in import.c which wasn't using the new "dos-8x3" name yet. |
| 1220 | |
| 1221 | - Hopefully harmless changes to the build process to support shared |
| 1222 | libraries on DG/UX. This adds a target to create |
| 1223 | libpython$(VERSION).so; however this target is *only* for DG/UX. |
| 1224 | |
| 1225 | - Fixed a bug in the new format string error checking in getargs.c. |
| 1226 | |
| 1227 | - A simple fix for infinite recursion when printing __builtins__: |
| 1228 | reset '_' to None before printing and set it to the printed variable |
| 1229 | *after* printing (and only when printing is successful). |
| 1230 | |
| 1231 | - Fixed lib-tk/SimpleDialog.py to keep the dialog visible even if the |
| 1232 | parent window is not (Skip Montanaro). |
| 1233 | |
| 1234 | - Fixed the two most annoying problems with ftp URLs in |
| 1235 | urllib.urlopen(); an empty file now correctly raises an error, and it |
| 1236 | is no longer required to explicitly close the returned "file" object |
| 1237 | before opening another ftp URL to the same host and directory. |
| 1238 | |
| 1239 | |
| 1240 | ====================================================================== |
| 1241 | |
| 1242 | |
| 1243 | From 1.5b1 to 1.5b2 |
| 1244 | =================== |
| 1245 | |
| 1246 | - Fixed a bug in cPickle.c that caused it to crash right away because |
| 1247 | the version string had a different format. |
| 1248 | |
| 1249 | - Changes in pickle.py and cPickle.c: when unpickling an instance of a |
| 1250 | class that doesn't define the __getinitargs__() method, the __init__() |
| 1251 | constructor is no longer called. This makes a much larger group of |
| 1252 | classes picklable by default, but may occasionally change semantics. |
| 1253 | To force calling __init__() on unpickling, define a __getinitargs__() |
| 1254 | method. Other changes too, in particular cPickle now handles classes |
| 1255 | defined in packages correctly. The same change applies to copying |
| 1256 | instances with copy.py. The cPickle.c changes and some pickle.py |
| 1257 | changes are courtesy Jim Fulton. |
| 1258 | |
| 1259 | - Locale support in he "re" (Perl regular expressions) module. Use |
| 1260 | the flag re.L (or re.LOCALE) to enable locale-specific matching |
| 1261 | rules for \w and \b. The in-line syntax for this flag is (?L). |
| 1262 | |
| 1263 | - The built-in function isinstance(x, y) now also succeeds when y is |
| 1264 | a type object and type(x) is y. |
| 1265 | |
| 1266 | - repr() and str() of class and instance objects now reflect the |
| 1267 | package/module in which the class is defined. |
| 1268 | |
| 1269 | - Module "ni" has been removed. (If you really need it, it's been |
| 1270 | renamed to "ni1". Let me know if this causes any problems for you. |
| 1271 | Package authors are encouraged to write __init__.py files that |
| 1272 | support both ni and 1.5 package support, so the same version can be |
| 1273 | used with Python 1.4 as well as 1.5.) |
| 1274 | |
| 1275 | - The thread module is now automatically included when threads are |
| 1276 | configured. (You must remove it from your existing Setup file, |
| 1277 | since it is now in its own Setup.thread file.) |
| 1278 | |
| 1279 | - New command line option "-x" to skip the first line of the script; |
| 1280 | handy to make executable scripts on non-Unix platforms. |
| 1281 | |
| 1282 | - In importdl.c, add the RTLD_GLOBAL to the dlopen() flags. I |
| 1283 | haven't checked how this affects things, but it should make symbols |
| 1284 | in one shared library available to the next one. |
| 1285 | |
| 1286 | - The Windows installer now installs in the "Program Files" folder on |
| 1287 | the proper volume by default. |
| 1288 | |
| 1289 | - The Windows configuration adds a new main program, "pythonw", and |
| 1290 | registers a new extension, ".pyw" that invokes this. This is a |
| 1291 | pstandard Python interpreter that does not pop up a console window; |
| 1292 | handy for pure Tkinter applications. All output to the original |
| 1293 | stdout and stderr is lost; reading from the original stdin yields |
| 1294 | EOF. Also, both python.exe and pythonw.exe now have a pretty icon |
| 1295 | (a green snake in a box, courtesy Mark Hammond). |
| 1296 | |
| 1297 | - Lots of improvements to emacs-mode.el again. See Barry's web page: |
| 1298 | http://www.python.org/ftp/emacs/pmdetails.html. |
| 1299 | |
| 1300 | - Lots of improvements and additions to the library reference manual; |
| 1301 | many by Fred Drake. |
| 1302 | |
| 1303 | - Doc strings for the following modules: rfc822.py, posixpath.py, |
| 1304 | ntpath.py, httplib.py. Thanks to Mitch Chapman and Charles Waldman. |
| 1305 | |
| 1306 | - Some more regression testing. |
| 1307 | |
| 1308 | - An optional 4th (maxsplit) argument to strop.replace(). |
| 1309 | |
| 1310 | - Fixed handling of maxsplit in string.splitfields(). |
| 1311 | |
| 1312 | - Tweaked os.environ so it can be pickled and copied. |
| 1313 | |
| 1314 | - The portability problems caused by indented preprocessor commands |
| 1315 | and C++ style comments should be gone now. |
| 1316 | |
| 1317 | - In random.py, added Pareto and Weibull distributions. |
| 1318 | |
| 1319 | - The crypt module is now disabled in Modules/Setup.in by default; it |
| 1320 | is rarely needed and causes errors on some systems where users often |
| 1321 | don't know how to deal with those. |
| 1322 | |
| 1323 | - Some improvements to the _tkinter build line suggested by Case Roole. |
| 1324 | |
| 1325 | - A full suite of platform specific files for NetBSD 1.x, submitted by |
| 1326 | Anders Andersen. |
| 1327 | |
| 1328 | - New Solaris specific header STROPTS.py. |
| 1329 | |
| 1330 | - Moved a confusing occurrence of *shared* from the comments in |
| 1331 | Modules/Setup.in (people would enable this one instead of the real |
| 1332 | one, and get disappointing results). |
| 1333 | |
| 1334 | - Changed the default mode for directories to be group-writable when |
| 1335 | the installation process creates them. |
| 1336 | |
| 1337 | - Check for pthread support in "-l_r" for FreeBSD/NetBSD, and support |
| 1338 | shared libraries for both. |
| 1339 | |
| 1340 | - Support FreeBSD and NetBSD in posixfile.py. |
| 1341 | |
| 1342 | - Support for the "event" command, new in Tk 4.2. By Case Roole. |
| 1343 | |
| 1344 | - Add Tix_SafeInit() support to tkappinit.c. |
| 1345 | |
| 1346 | - Various bugs fixed in "re.py" and "pcre.c". |
| 1347 | |
| 1348 | - Fixed a bug (broken use of the syntax table) in the old "regexpr.c". |
| 1349 | |
| 1350 | - In frozenmain.c, stdin is made unbuffered too when PYTHONUNBUFFERED |
| 1351 | is set. |
| 1352 | |
| 1353 | - Provide default blocksize for retrbinary in ftplib.py (Skip |
| 1354 | Montanaro). |
| 1355 | |
| 1356 | - In NT, pick the username up from different places in user.py (Jeff |
| 1357 | Bauer). |
| 1358 | |
| 1359 | - Patch to urlparse.urljoin() for ".." and "..#1", Marc Lemburg. |
| 1360 | |
| 1361 | - Many small improvements to Jeff Rush' OS/2 support. |
| 1362 | |
| 1363 | - ospath.py is gone; it's been obsolete for so many years now... |
| 1364 | |
| 1365 | - The reference manual is now set up to prepare better HTML (still |
| 1366 | using webmaker, alas). |
| 1367 | |
| 1368 | - Add special handling to /Tools/freeze for Python modules that are |
| 1369 | imported implicitly by the Python runtime: 'site' and 'exceptions'. |
| 1370 | |
| 1371 | - Tools/faqwiz 0.8.3 -- add an option to suppress URL processing |
| 1372 | inside <PRE>, by "Scott". |
| 1373 | |
| 1374 | - Added ConfigParser.py, a generic parser for sectioned configuration |
| 1375 | files. |
| 1376 | |
| 1377 | - In _localemodule.c, LC_MESSAGES is not always defined; put it |
| 1378 | between #ifdefs. |
| 1379 | |
| 1380 | - Typo in resource.c: RUSAGE_CHILDERN -> RUSAGE_CHILDREN. |
| 1381 | |
| 1382 | - Demo/scripts/newslist.py: Fix the way the version number is gotten |
| 1383 | out of the RCS revision. |
| 1384 | |
| 1385 | - PyArg_Parse[Tuple] now explicitly check for bad characters at the |
| 1386 | end of the format string. |
| 1387 | |
| 1388 | - Revamped PC/example_nt to support VC++ 5.x. |
| 1389 | |
| 1390 | - <listobject>.sort() now uses a modified quicksort by Raymund Galvin, |
| 1391 | after studying the GNU libg++ quicksort. This should be much faster |
| 1392 | if there are lots of duplicates, and otherwise at least as good. |
| 1393 | |
| 1394 | - Added "uue" as an alias for "uuencode" to mimetools.py. (Hm, the |
| 1395 | uudecode bug where it complaints about trailing garbage is still there |
| 1396 | :-( ). |
| 1397 | |
| 1398 | - pickle.py requires integers in text mode to be in decimal notation |
| 1399 | (it used to accept octal and hex, even though it would only generate |
| 1400 | decimal numbers). |
| 1401 | |
| 1402 | - In string.atof(), don't fail when the "re" module is unavailable. |
| 1403 | Plug the ensueing security leak by supplying an empty __builtins__ |
| 1404 | directory to eval(). |
| 1405 | |
| 1406 | - A bunch of small fixes and improvements to Tkinter.py. |
| 1407 | |
| 1408 | - Fixed a buffer overrun in PC/getpathp.c. |
| 1409 | |
| 1410 | |
| 1411 | ====================================================================== |
| 1412 | |
| 1413 | |
| 1414 | From 1.5a4 to 1.5b1 |
| 1415 | =================== |
| 1416 | |
| 1417 | - The Windows NT/95 installer now includes full HTML of all manuals. |
| 1418 | It also has a checkbox that lets you decide whether to install the |
| 1419 | interpreter and library. The WISE installer script for the installer |
| 1420 | is included in the source tree as PC/python15.wse, and so are the |
| 1421 | icons used for Python files. The config.c file for the Windows build |
| 1422 | is now complete with the pcre module. |
| 1423 | |
| 1424 | - sys.ps1 and sys.ps2 can now arbitrary objects; their str() is |
| 1425 | evaluated for the prompt. |
| 1426 | |
| 1427 | - The reference manual is brought up to date (more or less -- it still |
| 1428 | needs work, e.g. in the area of package import). |
| 1429 | |
| 1430 | - The icons used by latex2html are now included in the Doc |
| 1431 | subdirectory (mostly so that tarring up the HTML files can be fully |
| 1432 | automated). A simple index.html is also added to Doc (it only works |
| 1433 | after you have successfully run latex2html). |
| 1434 | |
| 1435 | - For all you would-be proselytizers out there: a new version of |
| 1436 | Misc/BLURB describes Python more concisely, and Misc/comparisons |
| 1437 | compares Python to several other languages. Misc/BLURB.WINDOWS |
| 1438 | contains a blurb specifically aimed at Windows programmers (by Mark |
| 1439 | Hammond). |
| 1440 | |
| 1441 | - A new version of the Python mode for Emacs is included as |
| 1442 | Misc/python-mode.el. There are too many new features to list here. |
| 1443 | See http://www.python.org/ftp/emacs/pmdetails.html for more info. |
| 1444 | |
| 1445 | - New module fileinput makes iterating over the lines of a list of |
| 1446 | files easier. (This still needs some more thinking to make it more |
| 1447 | extensible.) |
| 1448 | |
| 1449 | - There's full OS/2 support, courtesy Jeff Rush. To build the OS/2 |
| 1450 | version, see PC/readme.txt and PC/os2vacpp. This is for IBM's Visual |
| 1451 | Age C++ compiler. I expect that Jeff will also provide a binary |
| 1452 | release for this platform. |
| 1453 | |
| 1454 | - On Linux, the configure script now uses '-Xlinker -export-dynamic' |
| 1455 | instead of '-rdynamic' to link the main program so that it exports its |
| 1456 | symbols to shared libraries it loads dynamically. I hope this doesn't |
| 1457 | break on older Linux versions; it is needed for mklinux and appears to |
| 1458 | work on Linux 2.0.30. |
| 1459 | |
| 1460 | - Some Tkinter resstructuring: the geometry methods that apply to a |
| 1461 | master are now properly usable on toplevel master widgets. There's a |
| 1462 | new (internal) widget class, BaseWidget. New, longer "official" names |
| 1463 | for the geometry manager methods have been added, |
| 1464 | e.g. "grid_columnconfigure()" instead of "columnconfigure()". The old |
| 1465 | shorter names still work, and where there's ambiguity, pack wins over |
| 1466 | place wins over grid. Also, the bind_class method now returns its |
| 1467 | value. |
| 1468 | |
| 1469 | - New, RFC-822 conformant parsing of email addresses and address lists |
| 1470 | in the rfc822 module, courtesy Ben Escoto. |
| 1471 | |
| 1472 | - New, revamped tkappinit.c with support for popular packages (PIL, |
| 1473 | TIX, BLT, TOGL). For the last three, you need to execute the Tcl |
| 1474 | command "load {} Tix" (or Blt, or Togl) to gain access to them. |
| 1475 | The Modules/Setup line for the _tkinter module has been rewritten |
| 1476 | using the cool line-breaking feature of most Bourne shells. |
| 1477 | |
| 1478 | - New socket method connect_ex() returns the error code from connect() |
| 1479 | instead of raising an exception on errors; this makes the logic |
| 1480 | required for asynchronous connects simpler and more efficient. |
| 1481 | |
| 1482 | - New "locale" module with (still experimental) interface to the |
| 1483 | standard C library locale interface, courtesy Martin von Loewis. This |
| 1484 | does not repeat my mistake in 1.5a4 of always calling |
| 1485 | setlocale(LC_ALL, ""). In fact, we've pretty much decided that |
| 1486 | Python's standard numerical formatting operations should always use |
| 1487 | the conventions for the C locale; the locale module contains utility |
| 1488 | functions to format numbers according to the user specified locale. |
| 1489 | (All this is accomplished by an explicit call to setlocale(LC_NUMERIC, |
| 1490 | "C") after locale-changing calls.) See the library manual. (Alas, the |
| 1491 | promised changes to the "re" module for locale support have not been |
| 1492 | materialized yet. If you care, volunteer!) |
| 1493 | |
| 1494 | - Memory leak plugged in Py_BuildValue when building a dictionary. |
| 1495 | |
| 1496 | - Shared modules can now live inside packages (hierarchical module |
| 1497 | namespaces). No changes to the shared module itself are needed. |
| 1498 | |
| 1499 | - Improved policy for __builtins__: this is a module in __main__ and a |
| 1500 | dictionary everywhere else. |
| 1501 | |
| 1502 | - Python no longer catches SIGHUP and SIGTERM by default. This was |
| 1503 | impossible to get right in the light of thread contexts. If you want |
| 1504 | your program to clean up when a signal happens, use the signal module |
| 1505 | to set up your own signal handler. |
| 1506 | |
| 1507 | - New Python/C API PyNumber_CoerceEx() does not return an exception |
| 1508 | when no coercion is possible. This is used to fix a problem where |
| 1509 | comparing incompatible numbers for equality would raise an exception |
| 1510 | rather than return false as in Python 1.4 -- it once again will return |
| 1511 | false. |
| 1512 | |
| 1513 | - The errno module is changed again -- the table of error messages |
| 1514 | (errorstr) is removed. Instead, you can use os.strerror(). This |
| 1515 | removes redundance and a potential locale dependency. |
| 1516 | |
| 1517 | - New module xmllib, to parse XML files. By Sjoerd Mullender. |
| 1518 | |
| 1519 | - New C API PyOS_AfterFork() is called after fork() in posixmodule.c. |
| 1520 | It resets the signal module's notion of what the current process ID |
| 1521 | and thread are, so that signal handlers will work after (and across) |
| 1522 | calls to os.fork(). |
| 1523 | |
| 1524 | - Fixed most occurrences of fatal errors due to missing thread state. |
| 1525 | |
| 1526 | - For vgrind (a flexible source pretty printer) fans, there's a simple |
| 1527 | Python definition in Misc/vgrindefs, courtesy Neale Pickett. |
| 1528 | |
| 1529 | - Fixed memory leak in exec statement. |
| 1530 | |
| 1531 | - The test.pystone module has a new function, pystones(loops=LOOPS), |
| 1532 | which returns a (benchtime, stones) tuple. The main() function now |
| 1533 | calls this and prints the report. |
| 1534 | |
| 1535 | - Package directories now *require* the presence of an __init__.py (or |
| 1536 | __init__.pyc) file before they are considered as packages. This is |
| 1537 | done to prevent accidental subdirectories with common names from |
| 1538 | overriding modules with the same name. |
| 1539 | |
| 1540 | - Fixed some strange exceptions in __del__ methods in library modules |
| 1541 | (e.g. urllib). This happens because the builtin names are already |
| 1542 | deleted by the time __del__ is called. The solution (a hack, but it |
| 1543 | works) is to set some instance variables to 0 instead of None. |
| 1544 | |
| 1545 | - The table of built-in module initializers is replaced by a pointer |
| 1546 | variable. This makes it possible to switch to a different table at |
| 1547 | run time, e.g. when a collection of modules is loaded from a shared |
| 1548 | library. (No example code of how to do this is given, but it is |
| 1549 | possible.) The table is still there of course, its name prefixed with |
| 1550 | an underscore and used to initialize the pointer. |
| 1551 | |
| 1552 | - The warning about a thread still having a frame now only happens in |
| 1553 | verbose mode. |
| 1554 | |
| 1555 | - Change the signal finialization so that it also resets the signal |
| 1556 | handlers. After this has been called, our signal handlers are no |
| 1557 | longer active! |
| 1558 | |
| 1559 | - New version of tokenize.py (by Ka-Ping Yee) recognizes raw string |
| 1560 | literals. There's now also a test fort this module. |
| 1561 | |
| 1562 | - The copy module now also uses __dict__.update(state) instead of |
| 1563 | going through individual attribute assignments, for class instances |
| 1564 | without a __setstate__ method. |
| 1565 | |
| 1566 | - New module reconvert translates old-style (regex module) regular |
| 1567 | expressions to new-style (re module, Perl-style) regular expressions. |
| 1568 | |
| 1569 | - Most modules that used to use the regex module now use the re |
| 1570 | module. The grep module has a new pgrep() function which uses |
| 1571 | Perl-style regular expressions. |
| 1572 | |
| 1573 | - The (very old, backwards compatibility) regexp.py module has been |
| 1574 | deleted. |
| 1575 | |
| 1576 | - Restricted execution (rexec): added the pcre module (support for the |
| 1577 | re module) to the list of trusted extension modules. |
| 1578 | |
| 1579 | - New version of Jim Fulton's CObject object type, adds |
| 1580 | PyCObject_FromVoidPtrAndDesc() and PyCObject_GetDesc() APIs. |
| 1581 | |
| 1582 | - Some patches to Lee Busby's fpectl mods that accidentally didn't |
| 1583 | make it into 1.5a4. |
| 1584 | |
| 1585 | - In the string module, add an optional 4th argument to count(), |
| 1586 | matching find() etc. |
| 1587 | |
| 1588 | - Patch for the nntplib module by Charles Waldman to add optional user |
| 1589 | and password arguments to NNTP.__init__(), for nntp servers that need |
| 1590 | them. |
| 1591 | |
| 1592 | - The str() function for class objects now returns |
| 1593 | "modulename.classname" instead of returning the same as repr(). |
| 1594 | |
| 1595 | - The parsing of \xXX escapes no longer relies on sscanf(). |
| 1596 | |
| 1597 | - The "sharedmodules" subdirectory of the installation is renamed to |
| 1598 | "lib-dynload". (You may have to edit your Modules/Setup file to fix |
| 1599 | this in an existing installation!) |
| 1600 | |
| 1601 | - Fixed Don Beaudry's mess-up with the OPT test in the configure |
| 1602 | script. Certain SGI platforms will still issue a warning for each |
| 1603 | compile; there's not much I can do about this since the compiler's |
| 1604 | exit status doesn't indicate that I was using an obsolete option. |
| 1605 | |
| 1606 | - Fixed Barry's mess-up with {}.get(), and added test cases for it. |
| 1607 | |
| 1608 | - Shared libraries didn't quite work under AIX because of the change |
| 1609 | in status of the GNU readline interface. Fix due to by Vladimir |
| 1610 | Marangozov. |
| 1611 | |
| 1612 | |
| 1613 | ====================================================================== |
| 1614 | |
| 1615 | |
| 1616 | From 1.5a3 to 1.5a4 |
| 1617 | =================== |
| 1618 | |
| 1619 | - faqwiz.py: version 0.8; Recognize https:// as URL; <html>...</html> |
| 1620 | feature; better install instructions; removed faqmain.py (which was an |
| 1621 | older version). |
| 1622 | |
| 1623 | - nntplib.py: Fixed some bugs reported by Lars Wirzenius (to Debian) |
| 1624 | about the treatment of lines starting with '.'. Added a minimal test |
| 1625 | function. |
| 1626 | |
| 1627 | - struct module: ignore most whitespace in format strings. |
| 1628 | |
| 1629 | - urllib.py: close the socket and temp file in URLopener.retrieve() so |
| 1630 | that multiple retrievals using the same connection work. |
| 1631 | |
| 1632 | - All standard exceptions are now classes by default; use -X to make |
| 1633 | them strings (for backward compatibility only). |
| 1634 | |
| 1635 | - There's a new standard exception hierarchy, defined in the standard |
| 1636 | library module exceptions.py (which you never need to import |
| 1637 | explicitly). See |
| 1638 | http://grail.cnri.reston.va.us/python/essays/stdexceptions.html for |
| 1639 | more info. |
| 1640 | |
| 1641 | - Three new C API functions: |
| 1642 | |
| 1643 | - int PyErr_GivenExceptionMatches(obj1, obj2) |
| 1644 | |
| 1645 | Returns 1 if obj1 and obj2 are the same object, or if obj1 is an |
| 1646 | instance of type obj2, or of a class derived from obj2 |
| 1647 | |
| 1648 | - int PyErr_ExceptionMatches(obj) |
| 1649 | |
| 1650 | Higher level wrapper around PyErr_GivenExceptionMatches() which uses |
| 1651 | PyErr_Occurred() as obj1. This will be the more commonly called |
| 1652 | function. |
| 1653 | |
| 1654 | - void PyErr_NormalizeException(typeptr, valptr, tbptr) |
| 1655 | |
| 1656 | Normalizes exceptions, and places the normalized values in the |
| 1657 | arguments. If type is not a class, this does nothing. If type is a |
| 1658 | class, then it makes sure that value is an instance of the class by: |
| 1659 | |
| 1660 | 1. if instance is of the type, or a class derived from type, it does |
| 1661 | nothing. |
| 1662 | |
| 1663 | 2. otherwise it instantiates the class, using the value as an |
| 1664 | argument. If value is None, it uses an empty arg tuple, and if |
| 1665 | the value is a tuple, it uses just that. |
| 1666 | |
| 1667 | - Another new C API function: PyErr_NewException() creates a new |
| 1668 | exception class derived from Exception; when -X is given, it creates a |
| 1669 | new string exception. |
| 1670 | |
| 1671 | - core interpreter: remove the distinction between tuple and list |
| 1672 | unpacking; allow an arbitrary sequence on the right hand side of any |
| 1673 | unpack instruction. (UNPACK_LIST and UNPACK_TUPLE now do the same |
| 1674 | thing, which should really be called UNPACK_SEQUENCE.) |
| 1675 | |
| 1676 | - classes: Allow assignments to an instance's __dict__ or __class__, |
| 1677 | so you can change ivars (including shared ivars -- shock horror) and |
| 1678 | change classes dynamically. Also make the check on read-only |
| 1679 | attributes of classes less draconic -- only the specials names |
| 1680 | __dict__, __bases__, __name__ and __{get,set,del}attr__ can't be |
| 1681 | assigned. |
| 1682 | |
| 1683 | - Two new built-in functions: issubclass() and isinstance(). Both |
| 1684 | take classes as their second arguments. The former takes a class as |
| 1685 | the first argument and returns true iff first is second, or is a |
| 1686 | subclass of second. The latter takes any object as the first argument |
| 1687 | and returns true iff first is an instance of the second, or any |
| 1688 | subclass of second. |
| 1689 | |
| 1690 | - configure: Added configuration tests for presence of alarm(), |
| 1691 | pause(), and getpwent(). |
| 1692 | |
| 1693 | - Doc/Makefile: changed latex2html targets. |
| 1694 | |
| 1695 | - classes: Reverse the search order for the Don Beaudry hook so that |
| 1696 | the first class with an applicable hook wins. Makes more sense. |
| 1697 | |
| 1698 | - Changed the checks made in Py_Initialize() and Py_Finalize(). It is |
| 1699 | now legal to call these more than once. The first call to |
| 1700 | Py_Initialize() initializes, the first call to Py_Finalize() |
| 1701 | finalizes. There's also a new API, Py_IsInitalized() which checks |
| 1702 | whether we are already initialized (in case you want to leave things |
| 1703 | as they were). |
| 1704 | |
| 1705 | - Completely disable the declarations for malloc(), realloc() and |
| 1706 | free(). Any 90's C compiler has these in header files, and the tests |
| 1707 | to decide whether to suppress the declarations kept failing on some |
| 1708 | platforms. |
| 1709 | |
| 1710 | - *Before* (instead of after) signalmodule.o is added, remove both |
| 1711 | intrcheck.o and sigcheck.o. This should get rid of warnings in ar or |
| 1712 | ld on various systems. |
| 1713 | |
| 1714 | - Added reop to PC/config.c |
| 1715 | |
| 1716 | - configure: Decided to use -Aa -D_HPUX_SOURCE on HP-UX platforms. |
| 1717 | Removed outdated HP-UX comments from README. Added Cray T3E comments. |
| 1718 | |
| 1719 | - Various renames of statically defined functions that had name |
| 1720 | conflicts on some systems, e.g. strndup (GNU libc), join (Cray), |
| 1721 | roundup (sys/types.h). |
| 1722 | |
| 1723 | - urllib.py: Interpret three slashes in file: URL as local file (for |
| 1724 | Netscape on Windows/Mac). |
| 1725 | |
| 1726 | - copy.py: Make sure the objects returned by __getinitargs__() are |
| 1727 | kept alive (in the memo) to avoid a certain kind of nasty crash. (Not |
| 1728 | easily reproducable because it requires a later call to |
| 1729 | __getinitargs__() to return a tuple that happens to be allocated at |
| 1730 | the same address.) |
| 1731 | |
| 1732 | - Added definition of AR to toplevel Makefile. Renamed @buildno temp |
| 1733 | file to buildno1. |
| 1734 | |
| 1735 | - Moved Include/assert.h to Parser/assert.h, which seems to be the |
| 1736 | only place where it's needed. |
| 1737 | |
| 1738 | - Tweaked the dictionary lookup code again for some more speed |
| 1739 | (Vladimir Marangozov). |
| 1740 | |
| 1741 | - NT build: Changed the way python15.lib is included in the other |
| 1742 | projects. Per Mark Hammond's suggestion, add it to the extra libs in |
| 1743 | Settings instead of to the project's source files. |
| 1744 | |
| 1745 | - regrtest.py: Change default verbosity so that there are only three |
| 1746 | levels left: -q, default and -v. In default mode, the name of each |
| 1747 | test is now printed. -v is the same as the old -vv. -q is more quiet |
| 1748 | than the old default mode. |
| 1749 | |
| 1750 | - Removed the old FAQ from the distribution. You now have to get it |
| 1751 | from the web! |
| 1752 | |
| 1753 | - Removed the PC/make_nt.in file from the distribution; it is no |
| 1754 | longer needed. |
| 1755 | |
| 1756 | - Changed the build sequence so that shared modules are built last. |
| 1757 | This fixes things for AIX and doesn't hurt elsewhere. |
| 1758 | |
| 1759 | - Improved test for GNU MP v1 in mpzmodule.c |
| 1760 | |
| 1761 | - fileobject.c: ftell() on Linux discards all buffered data; changed |
| 1762 | read() code to use lseek() instead to get the same effect |
| 1763 | |
| 1764 | - configure.in, configure, importdl.c: NeXT sharedlib fixes |
| 1765 | |
| 1766 | - tupleobject.c: PyTuple_SetItem asserts refcnt==1 |
| 1767 | |
| 1768 | - resource.c: Different strategy regarding whether to declare |
| 1769 | getrusage() and getpagesize() -- #ifdef doesn't work, Linux has |
| 1770 | conflicting decls in its headers. Choice: only declare the return |
| 1771 | type, not the argument prototype, and not on Linux. |
| 1772 | |
| 1773 | - importdl.c, configure*: set sharedlib extensions properly for NeXT |
| 1774 | |
| 1775 | - configure*, Makefile.in, Modules/Makefile.pre.in: AIX shared libraries |
| 1776 | fixed; moved addition of PURIFY to LINKCC to configure |
| 1777 | |
| 1778 | - reopmodule.c, regexmodule.c, regexpr.c, zlibmodule.c: needed casts |
| 1779 | added to shup up various compilers. |
| 1780 | |
| 1781 | - _tkinter.c: removed buggy mac #ifndef |
| 1782 | |
| 1783 | - Doc: various Mac documentation changes, added docs for 'ic' module |
| 1784 | |
| 1785 | - PC/make_nt.in: deleted |
| 1786 | |
| 1787 | - test_time.py, test_strftime.py: tweaks to catch %Z (which may return |
| 1788 | "") |
| 1789 | |
| 1790 | - test_rotor.py: print b -> print `b` |
| 1791 | |
| 1792 | - Tkinter.py: (tagOrId) -> (tagOrId,) |
| 1793 | |
| 1794 | - Tkinter.py: the Tk class now also has a configure() method and |
| 1795 | friends (they have been moved to the Misc class to accomplish this). |
| 1796 | |
| 1797 | - dict.get(key[, default]) returns dict[key] if it exists, or default |
| 1798 | if it doesn't. The default defaults to None. This is quicker for |
| 1799 | some applications than using either has_key() or try:...except |
| 1800 | KeyError:.... |
| 1801 | |
| 1802 | - Tools/webchecker/: some small changes to webchecker.py; added |
| 1803 | websucker.py (a simple web site mirroring script). |
| 1804 | |
| 1805 | - Dictionary objects now have a get() method (also in UserDict.py). |
| 1806 | dict.get(key, default) returns dict[key] if it exists and default |
| 1807 | otherwise; default defaults to None. |
| 1808 | |
| 1809 | - Tools/scripts/logmerge.py: print the author, too. |
| 1810 | |
| 1811 | - Changes to import: support for "import a.b.c" is now built in. See |
| 1812 | http://grail.cnri.reston.va.us/python/essays/packages.html |
| 1813 | for more info. Most important deviations from "ni.py": __init__.py is |
| 1814 | executed in the package's namespace instead of as a submodule; and |
| 1815 | there's no support for "__" or "__domain__". Note that "ni.py" is not |
| 1816 | changed to match this -- it is simply declared obsolete (while at the |
| 1817 | same time, it is documented...:-( ). |
| 1818 | Unfortunately, "ihooks.py" has not been upgraded (but see "knee.py" |
| 1819 | for an example implementation of hierarchical module import written in |
| 1820 | Python). |
| 1821 | |
| 1822 | - More changes to import: the site.py module is now imported by |
| 1823 | default when Python is initialized; use -S to disable it. The site.py |
| 1824 | module extends the path with several more directories: site-packages |
| 1825 | inside the lib/python1.5/ directory, site-python in the lib/ |
| 1826 | directory, and pathnames mentioned in *.pth files found in either of |
| 1827 | those directories. See |
| 1828 | http://grail.cnri.reston.va.us/python/essays/packages.html |
| 1829 | for more info. |
| 1830 | |
| 1831 | - Changes to standard library subdirectory names: those subdirectories |
| 1832 | that are not packages have been renamed with a hypen in their name, |
| 1833 | e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3. |
| 1834 | The test suite is now a package -- to run a test, you must now use |
| 1835 | "import test.test_foo". |
| 1836 | |
| 1837 | - A completely new re.py module is provided (thanks to Andrew |
| 1838 | Kuchling, Tim Peters and Jeffrey Ollie) which uses Philip Hazel's |
| 1839 | "pcre" re compiler and engine. For a while, the "old" re.py (which |
| 1840 | was new in 1.5a3!) will be kept around as re1.py. The "old" regex |
| 1841 | module and underlying parser and engine are still present -- while |
| 1842 | regex is now officially obsolete, it will probably take several major |
| 1843 | release cycles before it can be removed. |
| 1844 | |
| 1845 | - The posix module now has a strerror() function which translates an |
| 1846 | error code to a string. |
| 1847 | |
| 1848 | - The emacs.py module (which was long obsolete) has been removed. |
| 1849 | |
| 1850 | - The universal makefile Misc/Makefile.pre.in now features an |
| 1851 | "install" target. By default, installed shared libraries go into |
| 1852 | $exec_prefix/lib/python$VERSION/site-packages/. |
| 1853 | |
| 1854 | - The install-sh script is installed with the other configuration |
| 1855 | specific files (in the config/ subdirectory). |
| 1856 | |
| 1857 | - It turns out whatsound.py and sndhdr.py were identical modules. |
| 1858 | Since there's also an imghdr.py file, I propose to make sndhdr.py the |
| 1859 | official one. For compatibility, whatsound.py imports * from |
| 1860 | sndhdr.py. |
| 1861 | |
| 1862 | - Class objects have a new attribute, __module__, giving the name of |
| 1863 | the module in which they were declared. This is useful for pickle and |
| 1864 | for printing the full name of a class exception. |
| 1865 | |
| 1866 | - Many extension modules no longer issue a fatal error when their |
| 1867 | initialization fails; the importing code now checks whether an error |
| 1868 | occurred during module initialization, and correctly propagates the |
| 1869 | exception to the import statement. |
| 1870 | |
| 1871 | - Most extension modules now raise class-based exceptions (except when |
| 1872 | -X is used). |
| 1873 | |
| 1874 | - Subtle changes to PyEval_{Save,Restore}Thread(): always swap the |
| 1875 | thread state -- just don't manipulate the lock if it isn't there. |
| 1876 | |
| 1877 | - Fixed a bug in Python/getopt.c that made it do the wrong thing when |
| 1878 | an option was a single '-'. Thanks to Andrew Kuchling. |
| 1879 | |
| 1880 | - New module mimetypes.py will guess a MIME type from a filename's |
| 1881 | extension. |
| 1882 | |
| 1883 | - Windows: the DLL version is now settable via a resource rather than |
| 1884 | being hardcoded. This can be used for "branding" a binary Python |
| 1885 | distribution. |
| 1886 | |
| 1887 | - urllib.py is now threadsafe -- it now uses re instead of regex, and |
| 1888 | sys.exc_info() instead of sys.exc_{type,value}. |
| 1889 | |
| 1890 | - Many other library modules that used to use |
| 1891 | sys.exc_{type,value,traceback} are now more thread-safe by virtue of |
| 1892 | using sys.exc_info(). |
| 1893 | |
| 1894 | - The functions in popen2 have an optional buffer size parameter. |
| 1895 | Also, the command argument can now be either a string (passed to the |
| 1896 | shell) or a list of arguments (passed directly to execv). |
| 1897 | |
Guido van Rossum | c45cf02 | 1998-04-10 20:06:21 +0000 | [diff] [blame] | 1898 | - Alas, the thread support for _tkinter released with 1.5a3 didn't |
| 1899 | work. It's been rewritten. The bad news is that it now requires a |
| 1900 | modified version of a file in the standard Tcl distribution, which you |
| 1901 | must compile with a -I option pointing to the standard Tcl source |
| 1902 | tree. For this reason, the thread support is disabled by default. |
| 1903 | |
| 1904 | - The errno extension module adds two tables: errorcode maps errno |
| 1905 | numbers to errno names (e.g. EINTR), and errorstr maps them to |
| 1906 | message strings. (The latter is redundant because the new call |
| 1907 | posix.strerror() now does the same, but alla...) (Marc-Andre Lemburg) |
| 1908 | |
| 1909 | - The readline extension module now provides some interfaces to |
| 1910 | internal readline routines that make it possible to write a completer |
| 1911 | in Python. An example completer, rlcompleter.py, is provided. |
| 1912 | |
| 1913 | When completing a simple identifier, it completes keywords, |
| 1914 | built-ins and globals in __main__; when completing |
| 1915 | NAME.NAME..., it evaluates (!) the expression up to the last |
| 1916 | dot and completes its attributes. |
| 1917 | |
| 1918 | It's very cool to do "import string" type "string.", hit the |
| 1919 | completion key (twice), and see the list of names defined by |
| 1920 | the string module! |
| 1921 | |
| 1922 | Tip: to use the tab key as the completion key, call |
| 1923 | |
| 1924 | readline.parse_and_bind("tab: complete") |
| 1925 | |
| 1926 | - The traceback.py module has a new function tb_lineno() by Marc-Andre |
| 1927 | Lemburg which extracts the line number from the linenumber table in |
| 1928 | the code object. Apparently the traceback object doesn't contains the |
| 1929 | right linenumber when -O is used. Rather than guessing whether -O is |
| 1930 | on or off, the module itself uses tb_lineno() unconditionally. |
| 1931 | |
| 1932 | - Fixed Demo/tkinter/matt/canvas-moving-or-creating.py: change bind() |
| 1933 | to tag_bind() so it works again. |
| 1934 | |
| 1935 | - The pystone script is now a standard library module. Example use: |
| 1936 | "import test.pystone; test.pystone.main()". |
| 1937 | |
| 1938 | - The import of the readline module in interactive mode is now also |
| 1939 | attempted when -i is specified. (Yes, I know, giving in to Marc-Andre |
| 1940 | Lemburg, who asked for this. :-) |
| 1941 | |
| 1942 | - rfc822.py: Entirely rewritten parseaddr() function by Sjoerd |
| 1943 | Mullender, to be closer to the standard. This fixes the getaddr() |
| 1944 | method. Unfortunately, getaddrlist() is as broken as ever, since it |
| 1945 | splits on commas without regard for RFC 822 quoting conventions. |
| 1946 | |
| 1947 | - pprint.py: correctly emit trailing "," in singleton tuples. |
| 1948 | |
| 1949 | - _tkinter.c: export names for its type objects, TkappType and |
| 1950 | TkttType. |
| 1951 | |
| 1952 | - pickle.py: use __module__ when defined; fix a particularly hard to |
| 1953 | reproduce bug that confuses the memo when temporary objects are |
| 1954 | returned by custom pickling interfaces; and a semantic change: when |
| 1955 | unpickling the instance variables of an instance, use |
| 1956 | inst.__dict__.update(value) instead of a for loop with setattr() over |
| 1957 | the value.keys(). This is more consistent (the pickling doesn't use |
| 1958 | getattr() either but pickles inst.__dict__) and avoids problems with |
| 1959 | instances that have a __setattr__ hook. But it *is* a semantic change |
| 1960 | (because the setattr hook is no longer used). So beware! |
| 1961 | |
| 1962 | - config.h is now installed (at last) in |
| 1963 | $exec_prefix/include/python1.5/. For most sites, this means that it |
| 1964 | is actually in $prefix/include/python1.5/, with all the other Python |
| 1965 | include files, since $prefix and $exec_prefix are the same by |
| 1966 | default. |
| 1967 | |
| 1968 | - The imp module now supports parts of the functionality to implement |
| 1969 | import of hierarchical module names. It now supports find_module() |
| 1970 | and load_module() for all types of modules. Docstrings have been |
| 1971 | added for those functions in the built-in imp module that are still |
| 1972 | relevant (some old interfaces are obsolete). For a sample |
| 1973 | implementation of hierarchical module import in Python, see the new |
| 1974 | library module knee.py. |
| 1975 | |
| 1976 | - The % operator on string objects now allows arbitrary nested parens |
| 1977 | in a %(...)X style format. (Brad Howes) |
| 1978 | |
| 1979 | - Reverse the order in which Setup and Setup.local are passed to the |
| 1980 | makesetup script. This allows variable definitions in Setup.local to |
| 1981 | override definitions in Setup. (But you'll still have to edit Setup |
| 1982 | if you want to disable modules that are enabled by default, or if such |
| 1983 | modules need non-standard options.) |
| 1984 | |
| 1985 | - Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this |
| 1986 | is like PyImport_ImporModule(name) but receives the globals and locals |
| 1987 | dict and the fromlist arguments as well. (The name is a char*; the |
| 1988 | others are PyObject*s). |
| 1989 | |
| 1990 | - The 'p' format in the struct extension module alloded to above is |
| 1991 | new in 1.5a4. |
| 1992 | |
| 1993 | - The types.py module now uses try-except in a few places to make it |
| 1994 | more likely that it can be imported in restricted mode. Some type |
| 1995 | names are undefined in that case, e.g. CodeType (inaccessible), |
| 1996 | FileType (not always accessible), and TracebackType and FrameType |
| 1997 | (inaccessible). |
| 1998 | |
| 1999 | - In urllib.py: added separate administration of temporary files |
| 2000 | created y URLopener.retrieve() so cleanup() can properly remove them. |
| 2001 | The old code removed everything in tempcache which was a bad idea if |
| 2002 | the user had passed a non-temp file into it. Also, in basejoin(), |
| 2003 | interpret relative paths starting in "../". This is necessary if the |
| 2004 | server uses symbolic links. |
| 2005 | |
| 2006 | - The Windows build procedure and project files are now based on |
| 2007 | Microsoft Visual C++ 5.x. The build now takes place in the PCbuild |
| 2008 | directory. It is much more robust, and properly builds separate Debug |
| 2009 | and Release versions. (The installer will be added shortly.) |
| 2010 | |
| 2011 | - Added casts and changed some return types in regexpr.c to avoid |
| 2012 | compiler warnings or errors on some platforms. |
| 2013 | |
| 2014 | - The AIX build tools for shared libraries now supports VPATH. (Donn |
| 2015 | Cave) |
| 2016 | |
| 2017 | - By default, disable the "portable" multimedia modules audioop, |
| 2018 | imageop, and rgbimg, since they don't work on 64-bit platforms. |
| 2019 | |
| 2020 | - Fixed a nasty bug in cStringIO.c when code was actually using the |
| 2021 | close() method (the destructors would try to free certain fields a |
| 2022 | second time). |
| 2023 | |
| 2024 | - For those who think they need it, there's a "user.py" module. This |
| 2025 | is *not* imported by default, but can be imported to run user-specific |
| 2026 | setup commands, ~/.pythonrc.py. |
| 2027 | |
| 2028 | - Various speedups suggested by Fredrik Lundh, Marc-Andre Lemburg, |
| 2029 | Vladimir Marangozov, and others. |
| 2030 | |
| 2031 | - Added os.altsep; this is '/' on DOS/Windows, and None on systems |
| 2032 | with a sane filename syntax. |
| 2033 | |
| 2034 | - os.py: Write out the dynamic OS choice, to avoid exec statements. |
| 2035 | Adding support for a new OS is now a bit more work, but I bet that |
| 2036 | 'dos' or 'nt' will cover most situations... |
| 2037 | |
| 2038 | - The obsolete exception AccessError is now really gone. |
| 2039 | |
| 2040 | - Tools/faqwiz/: New installation instructions show how to maintain |
| 2041 | multiple FAQs. Removed bootstrap script from end of faqwiz.py module. |
| 2042 | Added instructions to bootstrap script, too. Version bumped to 0.8.1. |
| 2043 | Added <html>...</html> feature suggested by Skip Montanaro. Added |
| 2044 | leading text for Roulette, default to 'Hit Reload ...'. Fix typo in |
| 2045 | default SRCDIR. |
| 2046 | |
| 2047 | - Documentation for the relatively new modules "keyword" and "symbol" |
| 2048 | has been added (to the end of the section on the parser extension |
| 2049 | module). |
| 2050 | |
| 2051 | - In module bisect.py, but functions have two optional argument 'lo' |
| 2052 | and 'hi' which allow you to specify a subsequence of the array to |
| 2053 | operate on. |
| 2054 | |
| 2055 | - In ftplib.py, changed most methods to return their status (even when |
| 2056 | it is always "200 OK") rather than swallowing it. |
| 2057 | |
| 2058 | - main() now calls setlocale(LC_ALL, ""), if setlocale() and |
| 2059 | <locale.h> are defined. |
| 2060 | |
| 2061 | - Changes to configure.in, the configure script, and both |
| 2062 | Makefile.pre.in files, to support SGI's SGI_ABI platform selection |
| 2063 | environment variable. |
| 2064 | |
| 2065 | |
| 2066 | ====================================================================== |
| 2067 | |
| 2068 | |
Guido van Rossum | 7ea639b | 1997-11-26 16:36:28 +0000 | [diff] [blame] | 2069 | From 1.4 to 1.5a3 |
| 2070 | ================= |
| 2071 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2072 | Security |
| 2073 | -------- |
| 2074 | |
| 2075 | - If you are using the setuid script C wrapper (Misc/setuid-prog.c), |
| 2076 | please use the new version. The old version has a huge security leak. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2077 | |
| 2078 | Miscellaneous |
| 2079 | ------------- |
| 2080 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2081 | - Because of various (small) incompatible changes in the Python |
| 2082 | bytecode interpreter, the magic number for .pyc files has changed |
| 2083 | again. |
| 2084 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2085 | - The default module search path is now much saner. Both on Unix and |
| 2086 | Windows, it is essentially derived from the path to the executable |
| 2087 | (which can be overridden by setting the environment variable |
| 2088 | $PYTHONHOME). The value of $PYTHONPATH on Windows is now inserted in |
| 2089 | front of the default path, like in Unix (instead of overriding the |
| 2090 | default path). On Windows, the directory containing the executable is |
| 2091 | added to the end of the path. |
| 2092 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2093 | - A new version of python-mode.el for Emacs has been included. Also, |
| 2094 | a new file ccpy-style.el has been added to configure Emacs cc-mode for |
| 2095 | the preferred style in Python C sources. |
| 2096 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2097 | - On Unix, when using sys.argv[0] to insert the script directory in |
| 2098 | front of sys.path, expand a symbolic link. You can now install a |
| 2099 | program in a private directory and have a symbolic link to it in a |
| 2100 | public bin directory, and it will put the private directory in the |
| 2101 | module search path. Note that the symlink is expanded in sys.path[0] |
| 2102 | but not in sys.argv[0], so you can still tell the name by which you |
| 2103 | were invoked. |
| 2104 | |
| 2105 | - It is now recommended to use ``#!/usr/bin/env python'' instead of |
| 2106 | ``#!/usr/local/bin/python'' at the start of executable scripts, except |
| 2107 | for CGI scripts. It has been determined that the use of /usr/bin/env |
| 2108 | is more portable than that of /usr/local/bin/python -- scripts almost |
| 2109 | never have to be edited when the Python interpreter lives in a |
| 2110 | non-standard place. Note that this doesn't work for CGI scripts since |
| 2111 | the python executable often doesn't live in the HTTP server's default |
| 2112 | search path. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2113 | |
| 2114 | - The silly -s command line option and the corresponding |
| 2115 | PYTHONSUPPRESS environment variable (and the Py_SuppressPrint global |
| 2116 | flag in the Python/C API) are gone. |
| 2117 | |
| 2118 | - Most problems on 64-bit platforms should now be fixed. Andrew |
| 2119 | Kuchling helped. Some uncommon extension modules are still not |
| 2120 | clean (image and audio ops?). |
| 2121 | |
| 2122 | - Fixed a bug where multiple anonymous tuple arguments would be mixed up |
| 2123 | when using the debugger or profiler (reported by Just van Rossum). |
| 2124 | The simplest example is ``def f((a,b),(c,d)): print a,b,c,d''; this |
| 2125 | would print the wrong value when run under the debugger or profiler. |
| 2126 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2127 | - The hacks that the dictionary implementation used to speed up |
| 2128 | repeated lookups of the same C string were removed; these were a |
| 2129 | source of subtle problems and don't seem to serve much of a purpose |
| 2130 | any longer. |
| 2131 | |
| 2132 | - All traces of support for the long dead access statement have been |
| 2133 | removed from the sources. |
| 2134 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2135 | - Plugged the two-byte memory leak in the tokenizer when reading an |
| 2136 | interactive EOF. |
| 2137 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2138 | - There's a -O option to the interpreter that removes SET_LINENO |
| 2139 | instructions and assert statements (see below); it uses and produces |
| 2140 | .pyo files instead of .pyc files. The speedup is only a few percent |
| 2141 | in most cases. The line numbers are still available in the .pyo file, |
| 2142 | as a separate table (which is also available in .pyc files). However, |
| 2143 | the removal of the SET_LINENO instructions means that the debugger |
| 2144 | (pdb) can't set breakpoints on lines in -O mode. The traceback module |
| 2145 | contains a function to extract a line number from the code object |
| 2146 | referenced in a traceback object. In the future it should be possible |
| 2147 | to write external bytecode optimizers that create better optimized |
| 2148 | .pyo files, and there should be more control over optimization; |
| 2149 | consider the -O option a "teaser". Without -O, the assert statement |
| 2150 | actually generates code that first checks __debug__; if this variable |
| 2151 | is false, the assertion is not checked. __debug__ is a built-in |
| 2152 | variable whose value is initialized to track the -O flag (it's true |
| 2153 | iff -O is not specified). With -O, no code is generated for assert |
| 2154 | statements, nor for code of the form ``if __debug__: <something>''. |
| 2155 | Sorry, no further constant folding happens. |
| 2156 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2157 | |
| 2158 | Performance |
| 2159 | ----------- |
| 2160 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2161 | - It's much faster (almost twice for pystone.py -- see |
| 2162 | Tools/scripts). See the entry on string interning below. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2163 | |
| 2164 | - Some speedup by using separate free lists for method objects (both |
| 2165 | the C and the Python variety) and for floating point numbers. |
| 2166 | |
| 2167 | - Big speedup by allocating frame objects with a single malloc() call. |
| 2168 | The Python/C API for frames is changed (you shouldn't be using this |
| 2169 | anyway). |
| 2170 | |
| 2171 | - Significant speedup by inlining some common opcodes for common operand |
| 2172 | types (e.g. i+i, i-i, and list[i]). Fredrik Lundh. |
| 2173 | |
| 2174 | - Small speedup by reordering the method tables of some common |
| 2175 | objects (e.g. list.append is now first). |
| 2176 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2177 | - Big optimization to the read() method of file objects. A read() |
| 2178 | without arguments now attempts to use fstat to allocate a buffer of |
| 2179 | the right size; for pipes and sockets, it will fall back to doubling |
| 2180 | the buffer size. While that the improvement is real on all systems, |
| 2181 | it is most dramatic on Windows. |
| 2182 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2183 | |
| 2184 | Documentation |
| 2185 | ------------- |
| 2186 | |
| 2187 | - Many new pieces of library documentation were contributed, mostly by |
| 2188 | Andrew Kuchling. Even cmath is now documented! There's also a |
| 2189 | chapter of the library manual, "libundoc.tex", which provides a |
| 2190 | listing of all undocumented modules, plus their status (e.g. internal, |
| 2191 | obsolete, or in need of documentation). Also contributions by Sue |
| 2192 | Williams, Skip Montanaro, and some module authors who succumbed to |
| 2193 | pressure to document their own contributed modules :-). Note that |
| 2194 | printing the documentation now kills fewer trees -- the margins have |
| 2195 | been reduced. |
| 2196 | |
| 2197 | - I have started documenting the Python/C API. Unfortunately this project |
| 2198 | hasn't been completed yet. It will be complete before the final release of |
| 2199 | Python 1.5, though. At the moment, it's better to read the LaTeX source |
| 2200 | than to attempt to run it through LaTeX and print the resulting dvi file. |
| 2201 | |
| 2202 | - The posix module (and hence os.py) now has doc strings! Thanks to Neil |
| 2203 | Schemenauer. I received a few other contributions of doc strings. In most |
| 2204 | other places, doc strings are still wishful thinking... |
| 2205 | |
| 2206 | |
| 2207 | Language changes |
| 2208 | ---------------- |
| 2209 | |
| 2210 | - Private variables with leading double underscore are now a permanent |
| 2211 | feature of the language. (These were experimental in release 1.4. I have |
| 2212 | favorable experience using them; I can't label them "experimental" |
| 2213 | forever.) |
| 2214 | |
| 2215 | - There's new string literal syntax for "raw strings". Prefixing a string |
| 2216 | literal with the letter r (or R) disables all escape processing in the |
| 2217 | string; for example, r'\n' is a two-character string consisting of a |
| 2218 | backslash followed by the letter n. This combines with all forms of string |
| 2219 | quotes; it is actually useful for triple quoted doc strings which might |
| 2220 | contain references to \n or \t. An embedded quote prefixed with a |
| 2221 | backslash does not terminate the string, but the backslash is still |
| 2222 | included in the string; for example, r'\'' is a two-character string |
| 2223 | consisting of a backslash and a quote. (Raw strings are also |
| 2224 | affectionately known as Robin strings, after their inventor, Robin |
| 2225 | Friedrich.) |
| 2226 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2227 | - There's a simple assert statement, and a new exception |
| 2228 | AssertionError. For example, ``assert foo > 0'' is equivalent to ``if |
| 2229 | not foo > 0: raise AssertionError''. Sorry, the text of the asserted |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2230 | condition is not available; it would be too complicated to generate |
| 2231 | code for this (since the code is generated from a parse tree). |
| 2232 | However, the text is displayed as part of the traceback! |
| 2233 | |
| 2234 | - The raise statement has a new feature: when using "raise SomeClass, |
| 2235 | somevalue" where somevalue is not an instance of SomeClass, it |
| 2236 | instantiates SomeClass(somevalue). In 1.5a4, if somevalue is an |
| 2237 | instance of a *derived* class of SomeClass, the exception class raised |
| 2238 | is set to somevalue.__class__, and SomeClass is ignored after that. |
| 2239 | |
| 2240 | - Duplicate keyword arguments are now detected at compile time; |
| 2241 | f(a=1,a=2) is now a syntax error. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2242 | |
| 2243 | |
| 2244 | Changes to builtin features |
Guido van Rossum | f0b69f0 | 1997-08-15 02:50:47 +0000 | [diff] [blame] | 2245 | --------------------------- |
| 2246 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2247 | - There's a new exception FloatingPointError (used only by Lee Busby's |
| 2248 | patches to catch floating point exceptions, at the moment). |
| 2249 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2250 | - The obsolete exception ConflictError (presumably used by the long |
| 2251 | obsolete access statement) has been deleted. |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2252 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2253 | - There's a new function sys.exc_info() which returns the tuple |
| 2254 | (sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way. |
Guido van Rossum | f0b69f0 | 1997-08-15 02:50:47 +0000 | [diff] [blame] | 2255 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2256 | - There's a new variable sys.executable, pointing to the executable file |
| 2257 | for the Python interpreter. |
Guido van Rossum | f0b69f0 | 1997-08-15 02:50:47 +0000 | [diff] [blame] | 2258 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2259 | - The sort() methods for lists no longer uses the C library qsort(); I |
| 2260 | wrote my own quicksort implementation, with lots of help (in the form |
| 2261 | of a kind of competition) from Tim Peters. This solves a bug in |
| 2262 | dictionary comparisons on some Solaris versions when Python is built |
| 2263 | with threads, and makes sorting lists even faster. |
| 2264 | |
| 2265 | - The semantics of comparing two dictionaries have changed, to make |
| 2266 | comparison of unequal dictionaries faster. A shorter dictionary is |
| 2267 | always considered smaller than a larger dictionary. For dictionaries |
| 2268 | of the same size, the smallest differing element determines the |
| 2269 | outcome (which yields the same results as before in this case, without |
| 2270 | explicit sorting). Thanks to Aaron Watters for suggesting something |
| 2271 | like this. |
| 2272 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2273 | - The semantics of try-except have changed subtly so that calling a |
| 2274 | function in an exception handler that itself raises and catches an |
| 2275 | exception no longer overwrites the sys.exc_* variables. This also |
| 2276 | alleviates the problem that objects referenced in a stack frame that |
| 2277 | caught an exception are kept alive until another exception is caught |
| 2278 | -- the sys.exc_* variables are restored to their previous value when |
| 2279 | returning from a function that caught an exception. |
Guido van Rossum | f0b69f0 | 1997-08-15 02:50:47 +0000 | [diff] [blame] | 2280 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2281 | - There's a new "buffer" interface. Certain objects (e.g. strings and |
| 2282 | arrays) now support the "buffer" protocol. Buffer objects are acceptable |
| 2283 | whenever formerly a string was required for a write operation; mutable |
| 2284 | buffer objects can be the target of a read operation using the call |
| 2285 | f.readinto(buffer). A cool feature is that regular expression matching now |
| 2286 | also work on array objects. Contribution by Jack Jansen. (Needs |
| 2287 | documentation.) |
| 2288 | |
| 2289 | - String interning: dictionary lookups are faster when the lookup |
| 2290 | string object is the same object as the key in the dictionary, not |
| 2291 | just a string with the same value. This is done by having a pool of |
| 2292 | "interned" strings. Most names generated by the interpreter are now |
| 2293 | automatically interned, and there's a new built-in function intern(s) |
| 2294 | that returns the interned version of a string. Interned strings are |
| 2295 | not a different object type, and interning is totally optional, but by |
| 2296 | interning most keys a speedup of about 15% was obtained for the |
| 2297 | pystone benchmark. |
| 2298 | |
| 2299 | - Dictionary objects have several new methods; clear() and copy() have |
| 2300 | the obvious semantics, while update(d) merges the contents of another |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2301 | dictionary d into this one, overriding existing keys. The dictionary |
| 2302 | implementation file is now called dictobject.c rather than the |
| 2303 | confusing mappingobject.c. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2304 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2305 | - The intrinsic function dir() is much smarter; it looks in __dict__, |
| 2306 | __members__ and __methods__. |
| 2307 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2308 | - The intrinsic functions int(), long() and float() can now take a |
| 2309 | string argument and then do the same thing as string.atoi(), |
| 2310 | string.atol(), and string.atof(). No second 'base' argument is |
| 2311 | allowed, and complex() does not take a string (nobody cared enough). |
| 2312 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2313 | - When a module is deleted, its globals are now deleted in two phases. |
| 2314 | In the first phase, all variables whose name begins with exactly one |
| 2315 | underscore are replaced by None; in the second phase, all variables |
| 2316 | are deleted. This makes it possible to have global objects whose |
| 2317 | destructors depend on other globals. The deletion order within each |
| 2318 | phase is still random. |
| 2319 | |
| 2320 | - It is no longer an error for a function to be called without a |
| 2321 | global variable __builtins__ -- an empty directory will be provided |
| 2322 | by default. |
| 2323 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2324 | - Guido's corollary to the "Don Beaudry hook": it is now possible to |
| 2325 | do metaprogramming by using an instance as a base class. Not for the |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2326 | faint of heart; and undocumented as yet, but basically if a base class |
| 2327 | is an instance, its class will be instantiated to create the new |
| 2328 | class. Jim Fulton will love it -- it also works with instances of his |
| 2329 | "extension classes", since it is triggered by the presence of a |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2330 | __class__ attribute on the purported base class. See |
| 2331 | Demo/metaclasses/index.html for an explanation and see that directory |
| 2332 | for examples. |
| 2333 | |
| 2334 | - Another change is that the Don Beaudry hook is now invoked when |
| 2335 | *any* base class is special. (Up to 1.5a3, the *last* special base |
| 2336 | class is used; in 1.5a4, the more rational choice of the *first* |
| 2337 | special base class is used.) |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2338 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2339 | - New optional parameter to the readlines() method of file objects. |
| 2340 | This indicates the number of bytes to read (the actual number of bytes |
| 2341 | read will be somewhat larger due to buffering reading until the end of |
| 2342 | the line). Some optimizations have also been made to speed it up (but |
| 2343 | not as much as read()). |
| 2344 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2345 | - Complex numbers no longer have the ".conj" pseudo attribute; use |
| 2346 | z.conjugate() instead, or complex(z.real, -z.imag). Complex numbers |
| 2347 | now *do* support the __members__ and __methods__ special attributes. |
| 2348 | |
| 2349 | - The complex() function now looks for a __complex__() method on class |
| 2350 | instances before giving up. |
| 2351 | |
| 2352 | - Long integers now support arbitrary shift counts, so you can now |
| 2353 | write 1L<<1000000, memory permitting. (Python 1.4 reports "outrageous |
| 2354 | shift count for this.) |
| 2355 | |
| 2356 | - The hex() and oct() functions have been changed so that for regular |
| 2357 | integers, they never emit a minus sign. For example, on a 32-bit |
| 2358 | machine, oct(-1) now returns '037777777777' and hex(-1) returns |
| 2359 | '0xffffffff'. While this may seem inconsistent, it is much more |
| 2360 | useful. (For long integers, a minus sign is used as before, to fit |
| 2361 | the result in memory :-) |
| 2362 | |
| 2363 | - The hash() function computes better hashes for several data types, |
| 2364 | including strings, floating point numbers, and complex numbers. |
| 2365 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2366 | |
| 2367 | New extension modules |
| 2368 | --------------------- |
| 2369 | |
| 2370 | - New extension modules cStringIO.c and cPickle.c, written by Jim |
| 2371 | Fulton and other folks at Digital Creations. These are much more |
| 2372 | efficient than their Python counterparts StringIO.py and pickle.py, |
| 2373 | but don't support subclassing. cPickle.c clocks up to 1000 times |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2374 | faster than pickle.py; cStringIO.c's improvement is less dramatic but |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2375 | still significant. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2376 | |
| 2377 | - New extension module zlibmodule.c, interfacing to the free zlib |
| 2378 | library (gzip compatible compression). There's also a module gzip.py |
| 2379 | which provides a higher level interface. Written by Andrew Kuchling |
| 2380 | and Jeremy Hylton. |
| 2381 | |
| 2382 | - New module readline; see the "miscellaneous" section above. |
| 2383 | |
| 2384 | - New Unix extension module resource.c, by Jeremy Hylton, provides |
| 2385 | access to getrlimit(), getrusage(), setrusage(), getpagesize(), and |
| 2386 | related symbolic constants. |
| 2387 | |
| 2388 | - New extension puremodule.c, by Barry Warsaw, which interfaces to the |
| 2389 | Purify(TM) C API. See also the file Misc/PURIFY.README. It is also |
| 2390 | possible to enable Purify by simply setting the PURIFY Makefile |
| 2391 | variable in the Modules/Setup file. |
| 2392 | |
| 2393 | |
| 2394 | Changes in extension modules |
| 2395 | ---------------------------- |
| 2396 | |
| 2397 | - The struct extension module has several new features to control byte |
| 2398 | order and word size. It supports reading and writing IEEE floats even |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2399 | on platforms where this is not the native format. It uses uppercase |
| 2400 | format codes for unsigned integers of various sizes (always using |
| 2401 | Python long ints for 'I' and 'L'), 's' with a size prefix for strings, |
| 2402 | and 'p' for "Pascal strings" (with a leading length byte, included in |
Guido van Rossum | 92664b8 | 1997-10-07 00:12:43 +0000 | [diff] [blame] | 2403 | the size; blame Hannu Krosing; new in 1.5a4). A prefix '>' forces |
| 2404 | big-endian data and '<' forces little-endian data; these also select |
| 2405 | standard data sizes and disable automatic alignment (use pad bytes as |
| 2406 | needed). |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2407 | |
| 2408 | - The array module supports uppercase format codes for unsigned data |
| 2409 | formats (like the struct module). |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2410 | |
| 2411 | - The fcntl extension module now exports the needed symbolic |
| 2412 | constants. (Formerly these were in FCNTL.py which was not available |
| 2413 | or correct for all platforms.) |
| 2414 | |
| 2415 | - The extension modules dbm, gdbm and bsddb now check that the |
| 2416 | database is still open before making any new calls. |
| 2417 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2418 | - The dbhash module is no more. Use bsddb instead. (There's a third |
| 2419 | party interface for the BSD 2.x code somewhere on the web; support for |
| 2420 | bsddb will be deprecated.) |
| 2421 | |
| 2422 | - The gdbm module now supports a sync() method. |
| 2423 | |
| 2424 | - The socket module now has some new functions: getprotobyname(), and |
| 2425 | the set {ntoh,hton}{s,l}(). |
| 2426 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2427 | - Various modules now export their type object: socket.SocketType, |
| 2428 | array.ArrayType. |
| 2429 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2430 | - The socket module's accept() method now returns unknown addresses as |
| 2431 | a tuple rather than raising an exception. (This can happen in |
| 2432 | promiscuous mode.) Theres' also a new function getprotobyname(). |
| 2433 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2434 | - The pthread support for the thread module now works on most platforms. |
| 2435 | |
| 2436 | - STDWIN is now officially obsolete. Support for it will eventually |
| 2437 | be removed from the distribution. |
| 2438 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2439 | - The binascii extension module is now hopefully fully debugged. |
| 2440 | (XXX Oops -- Fredrik Lundh promised me a uuencode fix that I never |
| 2441 | received.) |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2442 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2443 | - audioop.c: added a ratecv() function; better handling of overflow in |
| 2444 | add(). |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2445 | |
| 2446 | - posixmodule.c: now exports the O_* flags (O_APPEND etc.). On |
| 2447 | Windows, also O_TEXT and O_BINARY. The 'error' variable (the |
| 2448 | exception is raises) is renamed -- its string value is now "os.error", |
| 2449 | so newbies don't believe they have to import posix (or nt) to catch |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2450 | it when they see os.error reported as posix.error. The execve() |
| 2451 | function now accepts any mapping object for the environment. |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2452 | |
| 2453 | - A new version of the al (audio library) module for SGI was |
| 2454 | contributed by Sjoerd Mullender. |
| 2455 | |
| 2456 | - The regex module has a new function get_syntax() which retrieves the |
| 2457 | syntax setting set by set_syntax(). The code was also sanitized, |
| 2458 | removing worries about unclean error handling. See also below for its |
| 2459 | successor, re.py. |
| 2460 | |
| 2461 | - The "new" module (which creates new objects of various types) once |
| 2462 | again has a fully functioning new.function() method. Dangerous as |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2463 | ever! Also, new.code() has several new arguments. |
| 2464 | |
| 2465 | - A problem has been fixed in the rotor module: on systems with signed |
| 2466 | characters, rotor-encoded data was not portable when the key contained |
| 2467 | 8-bit characters. Also, setkey() now requires its argument rather |
| 2468 | than having broken code to default it. |
| 2469 | |
| 2470 | - The sys.builtin_module_names variable is now a tuple. Another new |
| 2471 | variables in sys is sys.executable (the full path to the Python |
| 2472 | binary, if known). |
| 2473 | |
| 2474 | - The specs for time.strftime() have undergone some revisions. It |
| 2475 | appears that not all format characters are supported in the same way |
| 2476 | on all platforms. Rather than reimplement it, we note these |
| 2477 | differences in the documentation, and emphasize the shared set of |
| 2478 | features. There's also a thorough test set (that occasionally finds |
| 2479 | problems in the C library implementation, e.g. on some Linuxes), |
| 2480 | thanks to Skip Montanaro. |
| 2481 | |
| 2482 | - The nis module seems broken when used with NIS+; unfortunately |
| 2483 | nobody knows how to fix it. It should still work with old NIS. |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2484 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2485 | |
| 2486 | New library modules |
| 2487 | ------------------- |
| 2488 | |
| 2489 | - New (still experimental) Perl-style regular expression module, |
| 2490 | re.py, which uses a new interface for matching as well as a new |
| 2491 | syntax; the new interface avoids the thread-unsafety of the regex |
| 2492 | interface. This comes with a helper extension reopmodule.c and vastly |
| 2493 | rewritten regexpr.c. Most work on this was done by Jeffrey Ollie, Tim |
| 2494 | Peters, and Andrew Kuchling. See the documentation libre.tex. In |
| 2495 | 1.5, the old regex module is still fully supported; in the future, it |
| 2496 | will become obsolete. |
| 2497 | |
| 2498 | - New module gzip.py; see zlib above. |
| 2499 | |
| 2500 | - New module keyword.py exports knowledge about Python's built-in |
| 2501 | keywords. (New version by Ka-Ping Yee.) |
| 2502 | |
| 2503 | - New module pprint.py (with documentation) which supports |
| 2504 | pretty-printing of lists, tuples, & dictionaries recursively. By Fred |
| 2505 | Drake. |
| 2506 | |
| 2507 | - New module code.py. The function code.compile_command() can |
| 2508 | determine whether an interactively entered command is complete or not, |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2509 | distinguishing incomplete from invalid input. (XXX Unfortunately, |
| 2510 | this seems broken at this moment, and I don't have the time to fix |
| 2511 | it. It's probably better to add an explicit interface to the parser |
| 2512 | for this.) |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2513 | |
Guido van Rossum | 522578e | 1997-08-28 03:43:21 +0000 | [diff] [blame] | 2514 | - There is now a library module xdrlib.py which can read and write the |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2515 | XDR data format as used by Sun RPC, for example. It uses the struct |
| 2516 | module. |
| 2517 | |
| 2518 | |
| 2519 | Changes in library modules |
| 2520 | -------------------------- |
| 2521 | |
| 2522 | - Module codehack.py is now completely obsolete. |
| 2523 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2524 | - The pickle.py module has been updated to make it compatible with the |
| 2525 | new binary format that cPickle.c produces. By default it produces the |
| 2526 | old all-ASCII format compatible with the old pickle.py, still much |
| 2527 | faster than pickle.py; it will read both formats automatically. A few |
| 2528 | other updates have been made. |
| 2529 | |
| 2530 | - A new helper module, copy_reg.py, is provided to register extensions |
| 2531 | to the pickling code. |
| 2532 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2533 | - Revamped module tokenize.py is much more accurate and has an |
| 2534 | interface that makes it a breeze to write code to colorize Python |
| 2535 | source code. Contributed by Ka-Ping Yee. |
| 2536 | |
| 2537 | - In ihooks.py, ModuleLoader.load_module() now closes the file under |
| 2538 | all circumstances. |
| 2539 | |
| 2540 | - The tempfile.py module has a new class, TemporaryFile, which creates |
| 2541 | an open temporary file that will be deleted automatically when |
| 2542 | closed. This works on Windows and MacOS as well as on Unix. (Jim |
| 2543 | Fulton.) |
| 2544 | |
| 2545 | - Changes to the cgi.py module: Most imports are now done at the |
| 2546 | top of the module, which provides a speedup when using ni (Jim |
| 2547 | Fulton). The problem with file upload to a Windows platform is solved |
| 2548 | by using the new tempfile.TemporaryFile class; temporary files are now |
| 2549 | always opened in binary mode (Jim Fulton). The cgi.escape() function |
| 2550 | now takes an optional flag argument that quotes '"' to '"'. It |
| 2551 | is now possible to invoke cgi.py from a command line script, to test |
| 2552 | cgi scripts more easily outside an http server. There's an optional |
| 2553 | limit to the size of uploads to POST (Skip Montanaro). Added a |
| 2554 | 'strict_parsing' option to all parsing functions (Jim Fulton). The |
| 2555 | function parse_qs() now uses urllib.unquote() on the name as well as |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2556 | the value of fields (Clarence Gardner). The FieldStorage class now |
| 2557 | has a __len__() method. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2558 | |
| 2559 | - httplib.py: the socket object is no longer closed; all HTTP/1.* |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2560 | responses are now accepted; and it is now thread-safe (by not using |
| 2561 | the regex module). |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2562 | |
| 2563 | - BaseHTTPModule.py: treat all HTTP/1.* versions the same. |
| 2564 | |
| 2565 | - The popen2.py module is now rewritten using a class, which makes |
| 2566 | access to the standard error stream and the process id of the |
| 2567 | subprocess possible. |
| 2568 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2569 | - Added timezone support to the rfc822.py module, in the form of a |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2570 | getdate_tz() method and a parsedate_tz() function; also a mktime_tz(). |
| 2571 | Also added recognition of some non-standard date formats, by Lars |
| 2572 | Wirzenius, and RFC 850 dates (Chris Lawrence). |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2573 | |
| 2574 | - mhlib.py: various enhancements, including almost compatible parsing |
| 2575 | of message sequence specifiers without invoking a subprocess. Also |
| 2576 | added a createmessage() method by Lars Wirzenius. |
| 2577 | |
| 2578 | - The StringIO.StringIO class now supports readline(nbytes). (Lars |
| 2579 | Wirzenius.) (Of course, you should be using cStringIO for performance.) |
| 2580 | |
| 2581 | - UserDict.py supports the new dictionary methods as well. |
| 2582 | |
| 2583 | - Improvements for whrandom.py by Tim Peters: use 32-bit arithmetic to |
| 2584 | speed it up, and replace 0 seed values by 1 to avoid degeneration. |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2585 | A bug was fixed in the test for invalid arguments. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2586 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2587 | - Module ftplib.py: added support for parsing a .netrc file (Fred |
| 2588 | Drake). Also added an ntransfercmd() method to the FTP class, which |
| 2589 | allows access to the expected size of a transfer when available, and a |
| 2590 | parse150() function to the module which parses the corresponding 150 |
| 2591 | response. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2592 | |
| 2593 | - urllib.py: the ftp cache is now limited to 10 entries. Added |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2594 | quote_plus() and unquote_plus() functions which are like quote() and |
| 2595 | unquote() but also replace spaces with '+' or vice versa, for |
| 2596 | encoding/decoding CGI form arguments. Catch all errors from the ftp |
| 2597 | module. HTTP requests now add the Host: header line. The proxy |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2598 | variable names are now mapped to lower case, for Windows. The |
| 2599 | spliturl() function no longer erroneously throws away all data past |
| 2600 | the first newline. The basejoin() function now intereprets "../" |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2601 | correctly. I *believe* that the problems with "exception raised in |
| 2602 | __del__" under certain circumstances have been fixed (mostly by |
| 2603 | changes elsewher in the interpreter). |
| 2604 | |
| 2605 | - In urlparse.py, there is a cache for results in urlparse.urlparse(); |
| 2606 | its size limit is set to 20. Also, new URL schemes shttp, https, and |
| 2607 | snews are "supported". |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2608 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2609 | - shelve.py: use cPickle and cStringIO when available. Also added |
| 2610 | a sync() method, which calls the database's sync() method if there is |
| 2611 | one. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2612 | |
| 2613 | - The mimetools.py module now uses the available Python modules for |
| 2614 | decoding quoted-printable, uuencode and base64 formats, rather than |
| 2615 | creating a subprocess. |
| 2616 | |
| 2617 | - The python debugger (pdb.py, and its base class bdb.py) now support |
| 2618 | conditional breakpoints. See the docs. |
| 2619 | |
| 2620 | - The modules base64.py, uu.py and quopri.py can now be used as simple |
| 2621 | command line utilities. |
| 2622 | |
| 2623 | - Various small fixes to the nntplib.py module that I can't bother to |
| 2624 | document in detail. |
| 2625 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2626 | - Sjoerd Mullender's mimify.py module now supports base64 encoding and |
| 2627 | includes functions to handle the funny encoding you sometimes see in mail |
| 2628 | headers. It is now documented. |
| 2629 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2630 | - mailbox.py: Added BabylMailbox. Improved the way the mailbox is |
| 2631 | gotten from the environment. |
| 2632 | |
| 2633 | - Many more modules now correctly open files in binary mode when this |
| 2634 | is necessary on non-Unix platforms. |
| 2635 | |
| 2636 | - The copying functions in the undocumented module shutil.py are |
| 2637 | smarter. |
| 2638 | |
| 2639 | - The Writer classes in the formatter.py module now have a flush() |
| 2640 | method. |
| 2641 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2642 | - The sgmllib.py module accepts hyphens and periods in the middle of |
| 2643 | attribute names. While this is against the SGML standard, there is |
| 2644 | some HTML out there that uses this... |
| 2645 | |
| 2646 | - The interface for the Python bytecode disassembler module, dis.py, |
| 2647 | has been enhanced quite a bit. There's now one main function, |
| 2648 | dis.dis(), which takes almost any kind of object (function, module, |
| 2649 | class, instance, method, code object) and disassembles it; without |
| 2650 | arguments it disassembles the last frame of the last traceback. The |
| 2651 | other functions have changed slightly, too. |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2652 | |
| 2653 | - The imghdr.py module recognizes new image types: BMP, PNG. |
| 2654 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2655 | - The string.py module has a new function replace(str, old, new, |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2656 | [maxsplit]) which does substring replacements. It is actually |
| 2657 | implemented in C in the strop module. The functions [r]find() an |
| 2658 | [r]index() have an optional 4th argument indicating the end of the |
| 2659 | substring to search, alsoo implemented by their strop counterparts. |
| 2660 | (Remember, never import strop -- import string uses strop when |
| 2661 | available with zero overhead.) |
| 2662 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2663 | - The string.join() function now accepts any sequence argument, not |
| 2664 | just lists and tuples. |
| 2665 | |
| 2666 | - The string.maketrans() requires its first two arguments to be |
| 2667 | present. The old version didn't require them, but there's not much |
| 2668 | point without them, and the documentation suggests that they are |
| 2669 | required, so we fixed the code to match the documentation. |
| 2670 | |
| 2671 | - The regsub.py module has a function clear_cache(), which clears its |
| 2672 | internal cache of compiled regular expressions. Also, the cache now |
| 2673 | takes the current syntax setting into account. (However, this module |
| 2674 | is now obsolete -- use the sub() or subn() functions or methods in the |
| 2675 | re module.) |
| 2676 | |
| 2677 | - The undocumented module Complex.py has been removed, now that Python |
| 2678 | has built-in complex numbers. A similar module remains as |
| 2679 | Demo/classes/Complex.py, as an example. |
| 2680 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2681 | |
| 2682 | Changes to the build process |
| 2683 | ---------------------------- |
| 2684 | |
| 2685 | - The way GNU readline is configured is totally different. The |
| 2686 | --with-readline configure option is gone. It is now an extension |
| 2687 | module, which may be loaded dynamically. You must enable it (and |
| 2688 | specify the correct linraries to link with) in the Modules/Setup file. |
| 2689 | Importing the module installs some hooks which enable command line |
| 2690 | editing. When the interpreter shell is invoked interactively, it |
| 2691 | attempts to import the readline module; when this fails, the default |
| 2692 | input mechanism is used. The hook variables are PyOS_InputHook and |
| 2693 | PyOS_ReadlineFunctionPointer. (Code contributed by Lee Busby, with |
| 2694 | ideas from William Magro.) |
| 2695 | |
| 2696 | - New build procedure: a single library, libpython1.5.a, is now built, |
| 2697 | which contains absolutely everything except for a one-line main() |
| 2698 | program (which calls Py_Main(argc, argv) to start the interpreter |
| 2699 | shell). This makes life much simpler for applications that need to |
| 2700 | embed Python. The serial number of the build is now included in the |
| 2701 | version string (sys.version). |
| 2702 | |
| 2703 | - As far as I can tell, neither gcc -Wall nor the Microsoft compiler |
| 2704 | emits a single warning any more when compiling Python. |
| 2705 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2706 | - A number of new Makefile variables have been added for special |
| 2707 | situations, e.g. LDLAST is appended to the link command. These are |
| 2708 | used by editing the Makefile or passing them on the make command |
| 2709 | line. |
| 2710 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2711 | - A set of patches from Lee Busby has been integrated that make it |
| 2712 | possible to catch floating point exceptions. Use the configure option |
| 2713 | --with-fpectl to enable the patches; the extension modules fpectl and |
| 2714 | fpetest provide control to enable/disable and test the feature, |
| 2715 | respectively. |
| 2716 | |
| 2717 | - The support for shared libraries under AIX is now simpler and more |
| 2718 | robust. Thanks to Vladimir Marangozov for revamping his own patches! |
| 2719 | |
| 2720 | - The Modules/makesetup script now reads a file Setup.local as well as |
| 2721 | a file Setup. Most changes to the Setup script can be done by editing |
| 2722 | Setup.local instead, which makes it easier to carry a particular setup |
| 2723 | over from one release to the next. |
| 2724 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2725 | - The Modules/makesetup script now copies any "include" lines it |
| 2726 | encounters verbatim into the output Makefile. It also recognizes .cxx |
| 2727 | and .cpp as C++ source files. |
| 2728 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2729 | - The configure script is smarter about C compiler options; e.g. with |
| 2730 | gcc it uses -O2 and -g when possible, and on some other platforms it |
| 2731 | uses -Olimit 1500 to avoid a warning from the optimizer about the main |
| 2732 | loop in ceval.c (which has more than 1000 basic blocks). |
| 2733 | |
| 2734 | - The configure script now detects whether malloc(0) returns a NULL |
| 2735 | pointer or a valid block (of length zero). This avoids the nonsense |
| 2736 | of always adding one byte to all malloc() arguments on most platforms. |
| 2737 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2738 | - The configure script has a new option, --with-dec-threads, to enable |
| 2739 | DEC threads on DEC Alpha platforms. Also, --with-threads is now an |
| 2740 | alias for --with-thread (this was the Most Common Typo in configure |
| 2741 | arguments). |
| 2742 | |
| 2743 | - Many changes in Doc/Makefile; amongst others, latex2html is now used |
| 2744 | to generate HTML from all latex documents. |
| 2745 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2746 | |
| 2747 | Change to the Python/C API |
| 2748 | -------------------------- |
| 2749 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2750 | - Because some interfaces have changed, the PYTHON_API macro has been |
| 2751 | bumped. Most extensions built for the old API version will still run, |
| 2752 | but I can't guarantee this. Python prints a warning message on |
| 2753 | version mismatches; it dumps core when the version mismatch causes a |
| 2754 | serious problem :-) |
| 2755 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2756 | - I've completed the Grand Renaming, with the help of Roger Masse and |
| 2757 | Barry Warsaw. This makes reading or debugging the code much easier. |
| 2758 | Many other unrelated code reorganizations have also been carried out. |
| 2759 | The allobjects.h header file is gone; instead, you would have to |
| 2760 | include Python.h followed by rename2.h. But you're better off running |
| 2761 | Tools/scripts/fixcid.py -s Misc/RENAME on your source, so you can omit |
| 2762 | the rename2.h; it will disappear in the next release. |
| 2763 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2764 | - Various and sundry small bugs in the "abstract" interfaces have been |
| 2765 | fixed. Thanks to all the (involuntary) testers of the Python 1.4 |
| 2766 | version! Some new functions have been added, e.g. PySequence_List(o), |
| 2767 | equivalent to list(o) in Python. |
| 2768 | |
| 2769 | - New API functions PyLong_FromUnsignedLong() and |
| 2770 | PyLong_AsUnsignedLong(). |
| 2771 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2772 | - The API functions in the file cgensupport.c are no longer |
| 2773 | supported. This file has been moved to Modules and is only ever |
| 2774 | compiled when the SGI specific 'gl' module is built. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2775 | |
| 2776 | - PyObject_Compare() can now raise an exception. Check with |
| 2777 | PyErr_Occurred(). The comparison function in an object type may also |
| 2778 | raise an exception. |
| 2779 | |
| 2780 | - The slice interface uses an upper bound of INT_MAX when no explicit |
| 2781 | upper bound is given (e.x. for a[1:]). It used to ask the object for |
| 2782 | its length and do the calculations. |
| 2783 | |
| 2784 | - Support for multiple independent interpreters. See Doc/api.tex, |
| 2785 | functions Py_NewInterpreter() and Py_EndInterpreter(). Since the |
| 2786 | documentation is incomplete, also see the new Demo/pysvr example |
| 2787 | (which shows how to use these in a threaded application) and the |
| 2788 | source code. |
| 2789 | |
| 2790 | - There is now a Py_Finalize() function which "de-initializes" |
| 2791 | Python. It is possible to completely restart the interpreter |
| 2792 | repeatedly by calling Py_Finalize() followed by Py_Initialize(). A |
| 2793 | change of functionality in Py_Initialize() means that it is now a |
| 2794 | fatal error to call it while the interpreter is already initialized. |
| 2795 | The old, half-hearted Py_Cleanup() routine is gone. Use of Py_Exit() |
| 2796 | is deprecated (it is nothing more than Py_Finalize() followed by |
| 2797 | exit()). |
| 2798 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2799 | - There are no known memory leaks left. While Py_Finalize() doesn't |
| 2800 | free *all* allocated memory (some of it is hard to track down), |
| 2801 | repeated calls to Py_Finalize() and Py_Initialize() do not create |
| 2802 | unaccessible heap blocks. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2803 | |
| 2804 | - There is now explicit per-thread state. (Inspired by, but not the |
| 2805 | same as, Greg Stein's free threading patches.) |
| 2806 | |
| 2807 | - There is now better support for threading C applications. There are |
| 2808 | now explicit APIs to manipulate the interpreter lock. Read the source |
| 2809 | or the Demo/pysvr example; the new functions are |
| 2810 | PyEval_{Acquire,Release}{Lock,Thread}(). |
| 2811 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2812 | - The test macro DEBUG has changed to Py_DEBUG, to avoid interference |
| 2813 | with other libraries' DEBUG macros. Likewise for any other test |
| 2814 | macros that didn't yet start with Py_. |
| 2815 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2816 | - New wrappers around malloc() and friends: Py_Malloc() etc. call |
| 2817 | malloc() and call PyErr_NoMemory() when it fails; PyMem_Malloc() call |
| 2818 | just malloc(). Use of these wrappers could be essential if multiple |
| 2819 | memory allocators exist (e.g. when using certain DLL setups under |
| 2820 | Windows). (Idea by Jim Fulton.) |
| 2821 | |
| 2822 | - New C API PyImport_Import() which uses whatever __import__() hook |
| 2823 | that is installed for the current execution environment. By Jim |
| 2824 | Fulton. |
| 2825 | |
| 2826 | - It is now possible for an extension module's init function to fail |
| 2827 | non-fatally, by calling one of the PyErr_* functions and returning. |
| 2828 | |
| 2829 | - The PyInt_AS_LONG() and PyFloat_AS_DOUBLE() macros now cast their |
| 2830 | argument to the proper type, like the similar PyString macros already |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2831 | did. (Suggestion by Marc-Andre Lemburg.) Similar for PyList_GET_SIZE |
| 2832 | and PyList_GET_ITEM. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2833 | |
| 2834 | - Some of the Py_Get* function, like Py_GetVersion() (but not yet |
| 2835 | Py_GetPath()) are now declared as returning a const char *. (More |
| 2836 | should follow.) |
| 2837 | |
| 2838 | - Changed the run-time library to check for exceptions after object |
| 2839 | comparisons. PyObject_Compare() can now return an exception; use |
| 2840 | PyErr_Occurred() to check (there is *no* special return value). |
| 2841 | |
| 2842 | - PyFile_WriteString() and Py_Flushline() now return error indicators |
| 2843 | instead of clearing exceptions. This fixes an obscure bug where using |
| 2844 | these would clear a pending exception, discovered by Just van Rossum. |
| 2845 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2846 | - There's a new function, PyArg_ParseTupleAndKeywords(), which parses |
| 2847 | an argument list including keyword arguments. Contributed by Geoff |
| 2848 | Philbrick. |
| 2849 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2850 | - PyArg_GetInt() is gone. |
| 2851 | |
| 2852 | - It's no longer necessary to include graminit.h when calling one of |
| 2853 | the extended parser API functions. The three public grammar start |
| 2854 | symbols are now in Python.h as Py_single_input, Py_file_input, and |
| 2855 | Py_eval_input. |
| 2856 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2857 | - The CObject interface has a new function, |
| 2858 | PyCObject_Import(module, name). It calls PyCObject_AsVoidPtr() |
| 2859 | on the object referenced by "module.name". |
| 2860 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2861 | |
| 2862 | Tkinter |
| 2863 | ------- |
| 2864 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2865 | - On popular demand, _tkinter once again installs a hook for readline |
| 2866 | that processes certain Tk events while waiting for the user to type |
| 2867 | (using PyOS_InputHook). |
| 2868 | |
| 2869 | - A patch by Craig McPheeters plugs the most obnoxious memory leaks, |
| 2870 | caused by command definitions referencing widget objects beyond their |
| 2871 | lifetime. |
| 2872 | |
| 2873 | - New standard dialog modules: tkColorChooser.py, tkCommonDialog.py, |
| 2874 | tkMessageBox.py, tkFileDialog.py, tkSimpleDialog.py These interface |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2875 | with the new Tk dialog scripts, and provide more "native platform" |
| 2876 | style file selection dialog boxes on some platforms. Contributed by |
| 2877 | Fredrik Lundh. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2878 | |
| 2879 | - Tkinter.py: when the first Tk object is destroyed, it sets the |
| 2880 | hiddel global _default_root to None, so that when another Tk object is |
| 2881 | created it becomes the new default root. Other miscellaneous |
| 2882 | changes and fixes. |
| 2883 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2884 | - The Image class now has a configure method. |
| 2885 | |
| 2886 | - Added a bunch of new winfo options to Tkinter.py; we should now be |
| 2887 | up to date with Tk 4.2. The new winfo options supported are: |
| 2888 | mananger, pointerx, pointerxy, pointery, server, viewable, visualid, |
| 2889 | visualsavailable. |
| 2890 | |
| 2891 | - The broken bind() method on Canvas objects defined in the Canvas.py |
| 2892 | module has been fixed. The CanvasItem and Group classes now also have |
| 2893 | an unbind() method. |
| 2894 | |
| 2895 | - The problem with Tkinter.py falling back to trying to import |
| 2896 | "tkinter" when "_tkinter" is not found has been fixed -- it no longer |
| 2897 | tries "tkinter", ever. This makes diagnosing the problem "_tkinter |
| 2898 | not configured" much easier and will hopefully reduce the newsgroup |
| 2899 | traffic on this topic. |
| 2900 | |
| 2901 | - The ScrolledText module once again supports the 'cnf' parameter, to |
| 2902 | be compatible with the examples in Mark Lutz' book (I know, I know, |
| 2903 | too late...) |
| 2904 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2905 | - The _tkinter.c extension module has been revamped. It now support |
| 2906 | Tk versions 4.1 through 8.0; support for 4.0 has been dropped. It |
| 2907 | works well under Windows and Mac (with the latest Tk ports to those |
| 2908 | platforms). It also supports threading -- it is safe for one |
| 2909 | (Python-created) thread to be blocked in _tkinter.mainloop() while |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2910 | other threads modify widgets. To make the changes visible, those |
| 2911 | threads must use update_idletasks()method. (The patch for threading |
| 2912 | in 1.5a3 was broken; in 1.5a4, it is back in a different version, |
| 2913 | which requires access to the Tcl sources to get it to work -- hence it |
| 2914 | is disabled by default.) |
| 2915 | |
| 2916 | - A bug in _tkinter.c has been fixed, where Split() with a string |
| 2917 | containing an unmatched '"' could cause an exception or core dump. |
| 2918 | |
| 2919 | - Unfortunately, on Windows and Mac, Tk 8.0 no longer supports |
| 2920 | CreateFileHandler, so _tkinter.createfilehandler is not available on |
| 2921 | those platforms when using Tk 8.0 or later. I will have to rethink |
| 2922 | how to interface with Tcl's lower-level event mechanism, or with its |
| 2923 | channels (which are like Python's file-like objects). Jack Jansen has |
| 2924 | provided a fix for the Mac, so createfilehandler *is* actually |
| 2925 | supported there; maybe I can adapt his fix for Windows. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2926 | |
| 2927 | |
| 2928 | Tools and Demos |
| 2929 | --------------- |
| 2930 | |
| 2931 | - A new regression test suite is provided, which tests most of the |
| 2932 | standard and built-in modules. The regression test is run by invoking |
| 2933 | the script Lib/test/regrtest.py. Barry Warsaw wrote the test harnass; |
| 2934 | he and Roger Masse contributed most of the new tests. |
| 2935 | |
| 2936 | - New tool: faqwiz -- the CGI script that is used to maintain the |
| 2937 | Python FAQ (http://grail.cnri.reston.va.us/cgi-bin/faqw.py). In |
| 2938 | Tools/faqwiz. |
| 2939 | |
| 2940 | - New tool: webchecker -- a simple extensible web robot that, when |
| 2941 | aimed at a web server, checks that server for dead links. Available |
| 2942 | are a command line utility as well as a Tkinter based GUI version. In |
| 2943 | Tools/webchecker. A simplified version of this program is dissected |
| 2944 | in my article in O'Reilly's WWW Journal, the issue on Scripting |
| 2945 | Languages (Vol 2, No 2); Scripting the Web with Python (pp 97-120). |
| 2946 | Includes a parser for robots.txt files by Skip Montanaro. |
| 2947 | |
| 2948 | - New small tools: cvsfiles.py (prints a list of all files under CVS |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2949 | n a particular directory tree), treesync.py (a rather Guido-specific |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2950 | script to synchronize two source trees, one on Windows NT, the other |
| 2951 | one on Unix under CVS but accessible from the NT box), and logmerge.py |
| 2952 | (sort a collection of RCS or CVS logs by date). In Tools/scripts. |
| 2953 | |
| 2954 | - The freeze script now also works under Windows (NT). Another |
| 2955 | feature allows the -p option to be pointed at the Python source tree |
| 2956 | instead of the installation prefix. This was loosely based on part of |
| 2957 | xfreeze by Sam Rushing and Bill Tutt. |
| 2958 | |
| 2959 | - New examples (Demo/extend) that show how to use the generic |
| 2960 | extension makefile (Misc/Makefile.pre.in). |
| 2961 | |
| 2962 | - Tools/scripts/h2py.py now supports C++ comments. |
| 2963 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 2964 | - Tools/scripts/pystone.py script is upgraded to version 1.1; there |
| 2965 | was a bug in version 1.0 (distributed with Python 1.4) that leaked |
| 2966 | memory. Also, in 1.1, the LOOPS variable is incremented to 10000. |
| 2967 | |
| 2968 | - Demo/classes/Rat.py completely rewritten by Sjoerd Mullender. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2969 | |
| 2970 | |
| 2971 | Windows (NT and 95) |
| 2972 | ------------------- |
| 2973 | |
| 2974 | - New project files for Developer Studio (Visual C++) 5.0 for Windows |
| 2975 | NT (the old VC++ 4.2 Makefile is also still supported, but will |
| 2976 | eventually be withdrawn due to its bulkiness). |
| 2977 | |
| 2978 | - See the note on the new module search path in the "Miscellaneous" section |
| 2979 | above. |
| 2980 | |
| 2981 | - Support for Win32s (the 32-bit Windows API under Windows 3.1) is |
| 2982 | basically withdrawn. If it still works for you, you're lucky. |
| 2983 | |
| 2984 | - There's a new extension module, msvcrt.c, which provides various |
| 2985 | low-level operations defined in the Microsoft Visual C++ Runtime Library. |
| 2986 | These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and |
| 2987 | console I/O functions like kbhit(), getch() and putch(). |
| 2988 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2989 | - The -u option not only sets the standard I/O streams to unbuffered |
| 2990 | status, but also sets them in binary mode. (This can also be done |
| 2991 | using msvcrt.setmode(), by the way.) |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 2992 | |
| 2993 | - The, sys.prefix and sys.exec_prefix variables point to the directory |
| 2994 | where Python is installed, or to the top of the source tree, if it was run |
| 2995 | from there. |
| 2996 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 2997 | - The various os.path modules (posixpath, ntpath, macpath) now support |
| 2998 | passing more than two arguments to the join() function, so |
| 2999 | os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b, |
| 3000 | c)). |
| 3001 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 3002 | - The ntpath module (normally used as os.path) supports ~ to $HOME |
| 3003 | expansion in expanduser(). |
| 3004 | |
| 3005 | - The freeze tool now works on Windows. |
| 3006 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 3007 | - See also the Tkinter category for a sad note on |
| 3008 | _tkinter.createfilehandler(). |
| 3009 | |
| 3010 | - The truncate() method for file objects now works on Windows. |
| 3011 | |
| 3012 | - Py_Initialize() is no longer called when the DLL is loaded. You |
Guido van Rossum | b68b77f | 1997-10-07 19:12:50 +0000 | [diff] [blame] | 3013 | must call it yourself. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 3014 | |
Guido van Rossum | 1f83cce | 1997-10-06 21:04:35 +0000 | [diff] [blame] | 3015 | - The time module's clock() function now has good precision through |
| 3016 | the use of the Win32 API QueryPerformanceCounter(). |
| 3017 | |
| 3018 | - Mark Hammond will release Python 1.5 versions of PythonWin and his |
| 3019 | other Windows specific code: the win32api extensions, COM/ActiveX |
| 3020 | support, and the MFC interface. |
| 3021 | |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 3022 | |
| 3023 | Mac |
| 3024 | --- |
| 3025 | |
Guido van Rossum | 2da391f | 1997-08-18 21:17:32 +0000 | [diff] [blame] | 3026 | - As always, the Macintosh port will be done by Jack Jansen. He will |
| 3027 | make a separate announcement for the Mac specific source code and the |
| 3028 | binary distribution(s) when these are ready. |
Guido van Rossum | 6100033 | 1997-08-15 04:39:58 +0000 | [diff] [blame] | 3029 | |
| 3030 | |
Guido van Rossum | 92664b8 | 1997-10-07 00:12:43 +0000 | [diff] [blame] | 3031 | ====================================================================== |