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