1997-08-15 01:39:58 -03:00
|
|
|
What's new in this release?
|
|
|
|
===========================
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Below is a list of all relevant changes since release 1.4. The
|
|
|
|
sections are now in a more useful order: the most recent changes are
|
|
|
|
listed first.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-10-06 18:04:35 -03:00
|
|
|
A note on attributions: while I have sprinkled some names throughout
|
1997-11-26 12:36:28 -04:00
|
|
|
here, I'm grateful to many more people who remain unnamed. You may
|
1997-10-06 18:04:35 -03:00
|
|
|
find your name in the ACKS file. If you believe you deserve more
|
|
|
|
credit, let me know and I'll add you to the list!
|
|
|
|
|
|
|
|
|
1997-11-26 12:36:28 -04:00
|
|
|
======================================================================
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
|
|
|
|
From 1.5 to 1.5.1
|
1997-11-26 12:36:28 -04:00
|
|
|
=================
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
General
|
|
|
|
-------
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The documentation is now unbundled. It has also been extensively
|
|
|
|
modified (mostly to implement a new and more uniform formatting
|
|
|
|
style). We figure that most people will prefer to download one of the
|
|
|
|
preformatted documentation sets (HTML, PostScript or PDF) and that
|
|
|
|
only a minority have a need for the LaTeX or FrameMaker sources. Of
|
|
|
|
course, the unbundled documentation sources still released -- just not
|
|
|
|
in the same archive file, and perhaps not on the same date.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- All bugs noted on the errors page (and many unnoted) are fixed. All
|
|
|
|
new bugs take their places.
|
|
|
|
|
1998-04-13 18:00:54 -03:00
|
|
|
- No longer a core dump when attempting to print (or repr(), or str())
|
|
|
|
a list or dictionary that contains an instance of itself; instead, the
|
|
|
|
recursive entry is printed as [...] or {...}. See Py_ReprEnter() and
|
|
|
|
Py_ReprLeave() below. Comparisons of such objects still go beserk,
|
|
|
|
since this requires a different kind of fix; fortunately, this is a
|
|
|
|
less common scenario in practice.
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Syntax change
|
1997-08-15 01:39:58 -03:00
|
|
|
-------------
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The raise statement can now be used without arguments, to re-raise
|
|
|
|
a previously set exception. This should be used after catching an
|
|
|
|
exception with an except clause only, either in the except clause or
|
|
|
|
later in the same function.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Import and module handling
|
|
|
|
--------------------------
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The implementation of import has changed to use a mutex (when
|
|
|
|
threading is supported). This means that when two threads
|
|
|
|
simultaneously import the same module, the import statements are
|
|
|
|
serialized. Recursive imports are not affected.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Rewrote the finalization code almost completely, to be much more
|
|
|
|
careful with the order in which modules are destroyed. Destructors
|
|
|
|
pwill now generally be able to reference built-in names such as None
|
|
|
|
without trouble.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-13 18:00:54 -03:00
|
|
|
- Case-insensitive platforms such as Mac and Windows require the case
|
|
|
|
of a module's filename to match the case of the module name as
|
|
|
|
specified in the import statement (see below).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The code for figuring out the default path now distinguishes between
|
|
|
|
files, modules, executable files, and directories. When expecting a
|
|
|
|
module, we also look for the .pyc or .pyo file.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Parser/tokenizer changes
|
|
|
|
------------------------
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The tokenizer can now warn you when your source code mixes tabs and
|
1998-04-13 18:00:54 -03:00
|
|
|
spaces for indentation in a manner that depends on how much a tab is
|
|
|
|
worth in spaces. Use "python -t" or "python -v" to enable this
|
|
|
|
option. Use "python -tt" to turn the warnings into errors. (See also
|
|
|
|
tabnanny.py and tabpolice.py below.)
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Return unsigned characters from tok_nextc(), so '\377' isn't
|
|
|
|
mistaken for an EOF character.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed two pernicious bugs in the tokenizer that only affected AIX.
|
|
|
|
One was actually a general bug that was triggered by AIX's smaller I/O
|
|
|
|
buffer size. The other was a bug in the AIX optimizer's loop
|
|
|
|
unrolling code; swapping two statements made the problem go away.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Tools, demos and miscellaneous files
|
|
|
|
------------------------------------
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There's a new version of Misc/python-mode.el (the Emacs mode for
|
|
|
|
Python) which is much smarter about guessing the indentation style
|
|
|
|
used in a particular file. Lots of other cool features too!
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There are two new tools in Tools/scripts: tabnanny.py and
|
|
|
|
tabpolice.py, implementing two different ways of checking whether a
|
|
|
|
file uses indentation in a way that is sensitive to the interpretation
|
|
|
|
of a tab. The preferred module is tabnanny.py (by Tim Peters).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some new demo programs:
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Demo/tkinter/guido/paint.py -- Dave Mitchell
|
|
|
|
Demo/sockets/unixserver.py -- Piet van Oostrum
|
|
|
|
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Much better freeze support. The freeze script can now freeze
|
|
|
|
hierarchical module names (with a corresponding change to import.c),
|
|
|
|
and has a few extra options (e.g. to suppress freezing specific
|
|
|
|
modules). It also does much more on Windows NT.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Version 1.0 of the faq wizard is included (only very small changes
|
|
|
|
since version 0.9.0).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New feature for the ftpmirror script: when removing local files
|
|
|
|
(i.e., only when -r is used), do a recursive delete.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Configuring and building Python
|
|
|
|
-------------------------------
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Get rid of the check for -linet -- recent Sequent Dynix systems don't
|
|
|
|
need this any more and apparently it screws up their configuration.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some changes because gcc on SGI doesn't support '-all'.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Changed the build rules to use $(LIBRARY) instead of
|
|
|
|
-L.. -lpython$(VERSION)
|
|
|
|
since the latter trips up the SunOS 4.1.x linker (sigh).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fix the bug where the '# dgux is broken' comment in the Makefile
|
|
|
|
tripped over Make on some platforms.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Changes for AIX: install the python.exp file; properly use
|
|
|
|
$(srcdir); the makexp_aix script now removes C++ entries of the form
|
|
|
|
Class::method.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Deleted some Makefile targets only used by the (long obsolete)
|
|
|
|
gMakefile hacks.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Extension modules
|
|
|
|
-----------------
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Performance and threading improvements to the socket and bsddb
|
|
|
|
modules, by Christopher Lindblad of Infoseek.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added operator.__not__ and operator.not_.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In the thread module, when a thread exits due to an unhandled
|
|
|
|
exception, don't store the exception information in sys.last_*; it
|
|
|
|
prevents proper calling of destructors of local variables.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a number of small bugs in the cPickle module.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Changed find() and rfind() in the strop module so that
|
|
|
|
find("x","",2) returns -1, matching the implementation in string.py.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In the time module, be more careful with the result of ctime(), and
|
|
|
|
test for HAVE_MKTIME before usinmg mktime().
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Doc strings contributed by Mitch Chapman to the termios, pwd, gdbm
|
|
|
|
modules.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added the LOG_SYSLOG constant to the syslog module, if defined.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Standard library modules
|
|
|
|
------------------------
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- All standard library modules have been converted to an indentation
|
|
|
|
style using either only tabs or only spaces -- never a mixture -- if
|
1998-04-13 18:00:54 -03:00
|
|
|
they weren't already consistent according to tabnanny. This means
|
|
|
|
that the new -t option (see above) won't complain about standard
|
|
|
|
library modules.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New standard library modules:
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
threading -- GvR and the thread-sig
|
|
|
|
Java style thread objects -- USE THIS!!!
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
getpass -- Piers Lauder
|
|
|
|
simple utilities to prompt for a password and to
|
|
|
|
retrieve the current username
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
imaplib -- Piers Lauder
|
|
|
|
interface for the IMAP4 protocol
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
poplib -- David Ascher, Piers Lauder
|
|
|
|
interface for the POP3 protocol
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
smtplib -- Dragon De Monsyne
|
|
|
|
interface for the SMTP protocol
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some obsolete modules moved to a separate directory (Lib/lib-old)
|
|
|
|
which is *not* in the default module search path:
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Para
|
|
|
|
addpack
|
|
|
|
codehack
|
|
|
|
fmt
|
|
|
|
lockfile
|
|
|
|
newdir
|
|
|
|
ni
|
|
|
|
rand
|
|
|
|
tb
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New version of the PCRE code (Perl Compatible Regular Expressions --
|
|
|
|
the re module and the supporting pcre extension) by Andrew Kuchling.
|
|
|
|
Incompatible new feature in re.sub(): the handling of escapes in the
|
|
|
|
replacement string has changed.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-13 18:00:54 -03:00
|
|
|
- Interface change in the copy module: a __deepcopy__ method is now
|
|
|
|
called with the memo dictionary as an argument.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Feature change in the tokenize module: differentiate between NEWLINE
|
|
|
|
token (an official newline) and NL token (a newline that the grammar
|
|
|
|
ignores).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Several bugfixes to the urllib module. It is now truly thread-safe,
|
|
|
|
and several bugs and a portability problem have been fixed. New
|
|
|
|
features, all due to Sjoerd Mullender: When creating a temporary file,
|
|
|
|
it gives it an appropriate suffix. Support the "data:" URL scheme.
|
|
|
|
The open() method uses the tempcache.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New version of the xmllib module (this time with a test suite!) by
|
|
|
|
Sjoerd Mullender.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added debugging code to the telnetlib module, to be able to trace
|
|
|
|
the actual traffic.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In the rfc822 module, added support for deleting a header (still no
|
|
|
|
support for adding headers, though). Also fixed a bug where an
|
|
|
|
illegal address would cause a crash in getrouteaddr(), fixed a
|
|
|
|
sign reversal in mktime_tz(), and use the local timezone by default
|
|
|
|
(the latter two due to Bill van Melle).
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The normpath() function in the dospath and ntpath modules no longer
|
|
|
|
does case normalization -- for that, use the separate function
|
|
|
|
normcase() (which always existed); normcase() has been sped up and
|
|
|
|
fixed (it was the cause of a crash in Mark Hammond's installer in
|
|
|
|
certain locales).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New command supported by the ftplib module: rmd(); also fixed some
|
|
|
|
minor bugs.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The profile module now uses a different timer function by default --
|
|
|
|
time.clock() is generally better than os.times(). This makes it work
|
|
|
|
better on Windows NT, too.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The tempfile module now recovers when os.getcwd() raises an
|
|
|
|
exception.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed some bugs in the random module; gauss() was subtly wrong, and
|
|
|
|
vonmisesvariate() should return a full circle. Courtesy Mike Miller,
|
|
|
|
Lambert Meertens (gauss()), and Magnus Kessler (vonmisesvariate()).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Better default seed in the whrandom module, courtesy Andrew Kuchling.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fix slow close() in shelve module.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Unix mailbox class in the mailbox module is now more robust when
|
|
|
|
a line begins with the string "From " but is definitely not the start
|
|
|
|
of a new message. The pattern used can be changed by overriding a
|
|
|
|
method or class variable.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added a rmtree() function to the copy module.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed several typos in the pickle module. Also fixed problems when
|
|
|
|
unpickling in restricted execution environments.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added docstrings and fixed a typo in the py_compile and compileall
|
|
|
|
modules. At Mark Hammond's repeated request, py_compile now append a
|
|
|
|
newline to the source if it needs one. Both modules support an extra
|
|
|
|
parameter to specify the purported source filename (to be used in
|
|
|
|
error messages).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some performance tweaks by Jeremy Hylton to the gzip module.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a bug in the merge order of dictionaries in the ConfigParser
|
|
|
|
module. Courtesy Barry Warsaw.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In the multifile module, support the optional second parameter to
|
|
|
|
seek() when possible.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Several fixes to the gopherlib module by Lars Marius Garshol. Also,
|
|
|
|
urlparse now correctly handles Gopher URLs with query strings.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a tiny bug in format_exception() in the traceback module.
|
|
|
|
Also rewrite tb_lineno() to be compatible with JPython (and not
|
|
|
|
disturb the current exception!); by Jim Hugunin.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The httplib module is more robust when servers send a short response
|
|
|
|
-- courtesy Tim O'Malley.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Tkinter and friends
|
|
|
|
-------------------
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Various typos and bugs fixed.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New module Tkdnd implements a drag-and-drop protocol (within one
|
|
|
|
application only).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The event_*() widget methods have been restructured slightly -- they
|
|
|
|
no longer use the default root.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The interfaces for the bind*() and unbind() widget methods have been
|
|
|
|
redesigned; the bind*() methods now return the name of the Tcl command
|
|
|
|
created for the callback, and this can be passed as a optional
|
|
|
|
argument to unbind() in order to delete the command (normally, such
|
|
|
|
commands are automatically unbound when the widget is destroyed, but
|
|
|
|
for some applications this isn't enough).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Variable objects now have trace methods to interface to Tcl's
|
|
|
|
variable tracing facilities.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Image objects now have an optional keyword argument, 'master', to
|
|
|
|
specify a widget (tree) to which they belong. The image_names() and
|
|
|
|
image_types() calls are now also widget methods.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There's a new global call, Tkinter.NoDefaultRoot(), which disables
|
|
|
|
all use of the default root by the Tkinter library. This is useful to
|
|
|
|
debug applications that are in the process of being converted from
|
|
|
|
relying on the default root to explicit specification of the root
|
|
|
|
widget.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The 'exit' command is deleted from the Tcl interpreter, since it
|
|
|
|
provided a loophole by which one could (accidentally) exit the Python
|
|
|
|
interpreter without invoking any cleanup code.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Tcl_Finalize() is now registered as a Python low-level exit handle,
|
|
|
|
so Tcl will be finalized when Python exits.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
The Python/C API
|
|
|
|
----------------
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-13 18:00:54 -03:00
|
|
|
- New function PyThreadState_GetDict() returns a per-thread dictionary
|
|
|
|
intended for storing thread-local global variables.
|
|
|
|
|
|
|
|
- New functions Py_ReprEnter() and Py_ReprLeave() use the per-thread
|
|
|
|
dictionary to allow recursive container types to detect recursion in
|
|
|
|
their repr(), str() and print implementations.
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New function PyObject_Not(x) calculates (not x) according to Python's
|
|
|
|
standard rules (basically, it negates the outcome PyObject_IsTrue(x).
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New function _PyModule_Clear(), which clears a module's dictionary
|
|
|
|
carefully without removing the __builtins__ entry. This is implied
|
|
|
|
when a module object is deallocated (this used to clear the dictionary
|
|
|
|
completely).
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New function PyImport_ExecCodeModuleEx(), which extends
|
|
|
|
PyImport_ExecCodeModule() by adding an extra parameter to pass it the
|
|
|
|
true file.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New functions Py_GetPythonHome() and Py_SetPythonHome(), intended to
|
|
|
|
allow embedded applications to force a different value for PYTHONHOME.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New global flag Py_FrozenFlag is set when this is a "frozen" Python
|
|
|
|
binary; it suppresses warnings about not being able to find the
|
|
|
|
standard library directories.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New global flag Py_TabcheckFlag is incremented by the -t option and
|
|
|
|
causes the tokenizer to issue warnings or errors about inconsistent
|
|
|
|
mixing of tabs and spaces for indentation.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Miscellaneous minor changes and bug fixes
|
|
|
|
-----------------------------------------
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Improved the error message when an attribute of an attribute-less
|
|
|
|
object is requested -- include the name of the attribute and the type
|
|
|
|
of the object in the message.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Sped up int(), long(), float() a bit.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a bug in list.sort() that would occasionally dump core.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a bug in PyNumber_Power() that caused numeric arrays to fail
|
|
|
|
when taken tothe real power.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a number of bugs in the file reading code, at least one of
|
|
|
|
which could cause a core dump on NT, and one of which would
|
|
|
|
occasionally cause file.read() to return less than the full contents
|
|
|
|
of the file.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Performance hack by Vladimir Marangozov for stack frame creation.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Make sure setvbuf() isn't used unless HAVE_SETVBUF is defined.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-13 18:00:54 -03:00
|
|
|
Windows 95/NT
|
|
|
|
-------------
|
|
|
|
|
|
|
|
- The .lib files are now part of the distribution; they are collected
|
|
|
|
in the subdirectory "libs" of the installation directory.
|
|
|
|
|
|
|
|
- The extension modules (.pyd files) are now collected in a separate
|
|
|
|
subdirectory of the installation directory named "DLLs".
|
|
|
|
|
|
|
|
- The case of a module's filename must now match the case of the
|
|
|
|
module name as specified in the import statement. This is an
|
|
|
|
experimental feature -- if it turns out to break in too many
|
|
|
|
situations, it will be removed (or disabled by default) in the future.
|
|
|
|
It can be disabled on a per-case basis by setting the environment
|
|
|
|
variable PYTHONCASEOK (to any value).
|
|
|
|
|
|
|
|
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
======================================================================
|
1997-08-14 23:50:47 -03:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
From 1.5b2 to 1.5
|
|
|
|
=================
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Newly documentated module: BaseHTTPServer.py, thanks to Greg Stein.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added doc strings to string.py, stropmodule.c, structmodule.c,
|
|
|
|
thanks to Charles Waldman.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Many nits fixed in the manuals, thanks to Fred Drake and many others
|
|
|
|
(especially Rob Hooft and Andrew Kuchling). The HTML version now uses
|
|
|
|
HTML markup instead of inline GIF images for tables; only two images
|
|
|
|
are left (for obsure bits of math). The index of the HTML version has
|
|
|
|
also been much improved. Finally, it is once again possible to
|
|
|
|
generate an Emacs info file from the library manual (but I don't
|
|
|
|
commit to supporting this in future versions).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New module: telnetlib.py (a simple telnet client library).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New tool: Tools/versioncheck/, by Jack Jansen.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Ported zlibmodule.c and bsddbmodule.c to NT; The project file for MS
|
|
|
|
DevStudio 5.0 now includes new subprojects to build the zlib and bsddb
|
|
|
|
extension modules.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Many small changes again to Tkinter.py -- mostly bugfixes and adding
|
|
|
|
missing routines. Thanks to Greg McFarlane for reporting a bunch of
|
|
|
|
problems and proofreading my fixes.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The re module and its documentation are up to date with the latest
|
|
|
|
version released to the string-sig (Dec. 22).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Stop test_grp.py from failing when the /etc/group file is empty
|
|
|
|
(yes, this happens!).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fix bug in integer conversion (mystrtoul.c) that caused
|
|
|
|
4294967296==0 to be true!
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The VC++ 4.2 project file should be complete again.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In tempfile.py, use a better template on NT, and add a new optional
|
|
|
|
argument "suffix" with default "" to specify a specific extension for
|
|
|
|
the temporary filename (needed sometimes on NT but perhaps also handy
|
|
|
|
elsewhere).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed some bugs in the FAQ wizard, and converted it to use re
|
|
|
|
instead of regex.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a mysteriously undetected error in dlmodule.c (it was using a
|
|
|
|
totally bogus routine name to raise an exception).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed bug in import.c which wasn't using the new "dos-8x3" name yet.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Hopefully harmless changes to the build process to support shared
|
|
|
|
libraries on DG/UX. This adds a target to create
|
|
|
|
libpython$(VERSION).so; however this target is *only* for DG/UX.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a bug in the new format string error checking in getargs.c.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A simple fix for infinite recursion when printing __builtins__:
|
|
|
|
reset '_' to None before printing and set it to the printed variable
|
|
|
|
*after* printing (and only when printing is successful).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed lib-tk/SimpleDialog.py to keep the dialog visible even if the
|
|
|
|
parent window is not (Skip Montanaro).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed the two most annoying problems with ftp URLs in
|
|
|
|
urllib.urlopen(); an empty file now correctly raises an error, and it
|
|
|
|
is no longer required to explicitly close the returned "file" object
|
|
|
|
before opening another ftp URL to the same host and directory.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
======================================================================
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
From 1.5b1 to 1.5b2
|
|
|
|
===================
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a bug in cPickle.c that caused it to crash right away because
|
|
|
|
the version string had a different format.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Changes in pickle.py and cPickle.c: when unpickling an instance of a
|
|
|
|
class that doesn't define the __getinitargs__() method, the __init__()
|
|
|
|
constructor is no longer called. This makes a much larger group of
|
|
|
|
classes picklable by default, but may occasionally change semantics.
|
|
|
|
To force calling __init__() on unpickling, define a __getinitargs__()
|
|
|
|
method. Other changes too, in particular cPickle now handles classes
|
|
|
|
defined in packages correctly. The same change applies to copying
|
|
|
|
instances with copy.py. The cPickle.c changes and some pickle.py
|
|
|
|
changes are courtesy Jim Fulton.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Locale support in he "re" (Perl regular expressions) module. Use
|
|
|
|
the flag re.L (or re.LOCALE) to enable locale-specific matching
|
|
|
|
rules for \w and \b. The in-line syntax for this flag is (?L).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The built-in function isinstance(x, y) now also succeeds when y is
|
|
|
|
a type object and type(x) is y.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- repr() and str() of class and instance objects now reflect the
|
|
|
|
package/module in which the class is defined.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Module "ni" has been removed. (If you really need it, it's been
|
|
|
|
renamed to "ni1". Let me know if this causes any problems for you.
|
|
|
|
Package authors are encouraged to write __init__.py files that
|
|
|
|
support both ni and 1.5 package support, so the same version can be
|
|
|
|
used with Python 1.4 as well as 1.5.)
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The thread module is now automatically included when threads are
|
|
|
|
configured. (You must remove it from your existing Setup file,
|
|
|
|
since it is now in its own Setup.thread file.)
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New command line option "-x" to skip the first line of the script;
|
|
|
|
handy to make executable scripts on non-Unix platforms.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In importdl.c, add the RTLD_GLOBAL to the dlopen() flags. I
|
|
|
|
haven't checked how this affects things, but it should make symbols
|
|
|
|
in one shared library available to the next one.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Windows installer now installs in the "Program Files" folder on
|
|
|
|
the proper volume by default.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Windows configuration adds a new main program, "pythonw", and
|
|
|
|
registers a new extension, ".pyw" that invokes this. This is a
|
|
|
|
pstandard Python interpreter that does not pop up a console window;
|
|
|
|
handy for pure Tkinter applications. All output to the original
|
|
|
|
stdout and stderr is lost; reading from the original stdin yields
|
|
|
|
EOF. Also, both python.exe and pythonw.exe now have a pretty icon
|
|
|
|
(a green snake in a box, courtesy Mark Hammond).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Lots of improvements to emacs-mode.el again. See Barry's web page:
|
|
|
|
http://www.python.org/ftp/emacs/pmdetails.html.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Lots of improvements and additions to the library reference manual;
|
|
|
|
many by Fred Drake.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Doc strings for the following modules: rfc822.py, posixpath.py,
|
|
|
|
ntpath.py, httplib.py. Thanks to Mitch Chapman and Charles Waldman.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some more regression testing.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- An optional 4th (maxsplit) argument to strop.replace().
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed handling of maxsplit in string.splitfields().
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Tweaked os.environ so it can be pickled and copied.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The portability problems caused by indented preprocessor commands
|
|
|
|
and C++ style comments should be gone now.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In random.py, added Pareto and Weibull distributions.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The crypt module is now disabled in Modules/Setup.in by default; it
|
|
|
|
is rarely needed and causes errors on some systems where users often
|
|
|
|
don't know how to deal with those.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some improvements to the _tkinter build line suggested by Case Roole.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A full suite of platform specific files for NetBSD 1.x, submitted by
|
|
|
|
Anders Andersen.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New Solaris specific header STROPTS.py.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Moved a confusing occurrence of *shared* from the comments in
|
|
|
|
Modules/Setup.in (people would enable this one instead of the real
|
|
|
|
one, and get disappointing results).
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Changed the default mode for directories to be group-writable when
|
|
|
|
the installation process creates them.
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Check for pthread support in "-l_r" for FreeBSD/NetBSD, and support
|
|
|
|
shared libraries for both.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Support FreeBSD and NetBSD in posixfile.py.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Support for the "event" command, new in Tk 4.2. By Case Roole.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Add Tix_SafeInit() support to tkappinit.c.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Various bugs fixed in "re.py" and "pcre.c".
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a bug (broken use of the syntax table) in the old "regexpr.c".
|
1997-08-15 01:39:58 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In frozenmain.c, stdin is made unbuffered too when PYTHONUNBUFFERED
|
|
|
|
is set.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Provide default blocksize for retrbinary in ftplib.py (Skip
|
|
|
|
Montanaro).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In NT, pick the username up from different places in user.py (Jeff
|
|
|
|
Bauer).
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Patch to urlparse.urljoin() for ".." and "..#1", Marc Lemburg.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Many small improvements to Jeff Rush' OS/2 support.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- ospath.py is gone; it's been obsolete for so many years now...
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The reference manual is now set up to prepare better HTML (still
|
|
|
|
using webmaker, alas).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Add special handling to /Tools/freeze for Python modules that are
|
|
|
|
imported implicitly by the Python runtime: 'site' and 'exceptions'.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Tools/faqwiz 0.8.3 -- add an option to suppress URL processing
|
|
|
|
inside <PRE>, by "Scott".
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added ConfigParser.py, a generic parser for sectioned configuration
|
|
|
|
files.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In _localemodule.c, LC_MESSAGES is not always defined; put it
|
|
|
|
between #ifdefs.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Typo in resource.c: RUSAGE_CHILDERN -> RUSAGE_CHILDREN.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Demo/scripts/newslist.py: Fix the way the version number is gotten
|
|
|
|
out of the RCS revision.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- PyArg_Parse[Tuple] now explicitly check for bad characters at the
|
|
|
|
end of the format string.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Revamped PC/example_nt to support VC++ 5.x.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- <listobject>.sort() now uses a modified quicksort by Raymund Galvin,
|
|
|
|
after studying the GNU libg++ quicksort. This should be much faster
|
|
|
|
if there are lots of duplicates, and otherwise at least as good.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added "uue" as an alias for "uuencode" to mimetools.py. (Hm, the
|
|
|
|
uudecode bug where it complaints about trailing garbage is still there
|
|
|
|
:-( ).
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- pickle.py requires integers in text mode to be in decimal notation
|
|
|
|
(it used to accept octal and hex, even though it would only generate
|
|
|
|
decimal numbers).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- In string.atof(), don't fail when the "re" module is unavailable.
|
|
|
|
Plug the ensueing security leak by supplying an empty __builtins__
|
|
|
|
directory to eval().
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A bunch of small fixes and improvements to Tkinter.py.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a buffer overrun in PC/getpathp.c.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
======================================================================
|
1997-08-14 23:50:47 -03:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
From 1.5a4 to 1.5b1
|
|
|
|
===================
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Windows NT/95 installer now includes full HTML of all manuals.
|
|
|
|
It also has a checkbox that lets you decide whether to install the
|
|
|
|
interpreter and library. The WISE installer script for the installer
|
|
|
|
is included in the source tree as PC/python15.wse, and so are the
|
|
|
|
icons used for Python files. The config.c file for the Windows build
|
|
|
|
is now complete with the pcre module.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- sys.ps1 and sys.ps2 can now arbitrary objects; their str() is
|
|
|
|
evaluated for the prompt.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The reference manual is brought up to date (more or less -- it still
|
|
|
|
needs work, e.g. in the area of package import).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The icons used by latex2html are now included in the Doc
|
|
|
|
subdirectory (mostly so that tarring up the HTML files can be fully
|
|
|
|
automated). A simple index.html is also added to Doc (it only works
|
|
|
|
after you have successfully run latex2html).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- For all you would-be proselytizers out there: a new version of
|
|
|
|
Misc/BLURB describes Python more concisely, and Misc/comparisons
|
|
|
|
compares Python to several other languages. Misc/BLURB.WINDOWS
|
|
|
|
contains a blurb specifically aimed at Windows programmers (by Mark
|
|
|
|
Hammond).
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A new version of the Python mode for Emacs is included as
|
|
|
|
Misc/python-mode.el. There are too many new features to list here.
|
|
|
|
See http://www.python.org/ftp/emacs/pmdetails.html for more info.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New module fileinput makes iterating over the lines of a list of
|
|
|
|
files easier. (This still needs some more thinking to make it more
|
|
|
|
extensible.)
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There's full OS/2 support, courtesy Jeff Rush. To build the OS/2
|
|
|
|
version, see PC/readme.txt and PC/os2vacpp. This is for IBM's Visual
|
|
|
|
Age C++ compiler. I expect that Jeff will also provide a binary
|
|
|
|
release for this platform.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- On Linux, the configure script now uses '-Xlinker -export-dynamic'
|
|
|
|
instead of '-rdynamic' to link the main program so that it exports its
|
|
|
|
symbols to shared libraries it loads dynamically. I hope this doesn't
|
|
|
|
break on older Linux versions; it is needed for mklinux and appears to
|
|
|
|
work on Linux 2.0.30.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some Tkinter resstructuring: the geometry methods that apply to a
|
|
|
|
master are now properly usable on toplevel master widgets. There's a
|
|
|
|
new (internal) widget class, BaseWidget. New, longer "official" names
|
|
|
|
for the geometry manager methods have been added,
|
|
|
|
e.g. "grid_columnconfigure()" instead of "columnconfigure()". The old
|
|
|
|
shorter names still work, and where there's ambiguity, pack wins over
|
|
|
|
place wins over grid. Also, the bind_class method now returns its
|
|
|
|
value.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New, RFC-822 conformant parsing of email addresses and address lists
|
|
|
|
in the rfc822 module, courtesy Ben Escoto.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New, revamped tkappinit.c with support for popular packages (PIL,
|
|
|
|
TIX, BLT, TOGL). For the last three, you need to execute the Tcl
|
|
|
|
command "load {} Tix" (or Blt, or Togl) to gain access to them.
|
|
|
|
The Modules/Setup line for the _tkinter module has been rewritten
|
|
|
|
using the cool line-breaking feature of most Bourne shells.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New socket method connect_ex() returns the error code from connect()
|
|
|
|
instead of raising an exception on errors; this makes the logic
|
|
|
|
required for asynchronous connects simpler and more efficient.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New "locale" module with (still experimental) interface to the
|
|
|
|
standard C library locale interface, courtesy Martin von Loewis. This
|
|
|
|
does not repeat my mistake in 1.5a4 of always calling
|
|
|
|
setlocale(LC_ALL, ""). In fact, we've pretty much decided that
|
|
|
|
Python's standard numerical formatting operations should always use
|
|
|
|
the conventions for the C locale; the locale module contains utility
|
|
|
|
functions to format numbers according to the user specified locale.
|
|
|
|
(All this is accomplished by an explicit call to setlocale(LC_NUMERIC,
|
|
|
|
"C") after locale-changing calls.) See the library manual. (Alas, the
|
|
|
|
promised changes to the "re" module for locale support have not been
|
|
|
|
materialized yet. If you care, volunteer!)
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Memory leak plugged in Py_BuildValue when building a dictionary.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Shared modules can now live inside packages (hierarchical module
|
|
|
|
namespaces). No changes to the shared module itself are needed.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Improved policy for __builtins__: this is a module in __main__ and a
|
|
|
|
dictionary everywhere else.
|
1997-08-18 18:17:32 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Python no longer catches SIGHUP and SIGTERM by default. This was
|
|
|
|
impossible to get right in the light of thread contexts. If you want
|
|
|
|
your program to clean up when a signal happens, use the signal module
|
|
|
|
to set up your own signal handler.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New Python/C API PyNumber_CoerceEx() does not return an exception
|
|
|
|
when no coercion is possible. This is used to fix a problem where
|
|
|
|
comparing incompatible numbers for equality would raise an exception
|
|
|
|
rather than return false as in Python 1.4 -- it once again will return
|
|
|
|
false.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The errno module is changed again -- the table of error messages
|
|
|
|
(errorstr) is removed. Instead, you can use os.strerror(). This
|
|
|
|
removes redundance and a potential locale dependency.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New module xmllib, to parse XML files. By Sjoerd Mullender.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New C API PyOS_AfterFork() is called after fork() in posixmodule.c.
|
|
|
|
It resets the signal module's notion of what the current process ID
|
|
|
|
and thread are, so that signal handlers will work after (and across)
|
|
|
|
calls to os.fork().
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed most occurrences of fatal errors due to missing thread state.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- For vgrind (a flexible source pretty printer) fans, there's a simple
|
|
|
|
Python definition in Misc/vgrindefs, courtesy Neale Pickett.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed memory leak in exec statement.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The test.pystone module has a new function, pystones(loops=LOOPS),
|
|
|
|
which returns a (benchtime, stones) tuple. The main() function now
|
|
|
|
calls this and prints the report.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Package directories now *require* the presence of an __init__.py (or
|
|
|
|
__init__.pyc) file before they are considered as packages. This is
|
|
|
|
done to prevent accidental subdirectories with common names from
|
|
|
|
overriding modules with the same name.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed some strange exceptions in __del__ methods in library modules
|
|
|
|
(e.g. urllib). This happens because the builtin names are already
|
|
|
|
deleted by the time __del__ is called. The solution (a hack, but it
|
|
|
|
works) is to set some instance variables to 0 instead of None.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The table of built-in module initializers is replaced by a pointer
|
|
|
|
variable. This makes it possible to switch to a different table at
|
|
|
|
run time, e.g. when a collection of modules is loaded from a shared
|
|
|
|
library. (No example code of how to do this is given, but it is
|
|
|
|
possible.) The table is still there of course, its name prefixed with
|
|
|
|
an underscore and used to initialize the pointer.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The warning about a thread still having a frame now only happens in
|
|
|
|
verbose mode.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Change the signal finialization so that it also resets the signal
|
|
|
|
handlers. After this has been called, our signal handlers are no
|
|
|
|
longer active!
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New version of tokenize.py (by Ka-Ping Yee) recognizes raw string
|
|
|
|
literals. There's now also a test fort this module.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The copy module now also uses __dict__.update(state) instead of
|
|
|
|
going through individual attribute assignments, for class instances
|
|
|
|
without a __setstate__ method.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New module reconvert translates old-style (regex module) regular
|
|
|
|
expressions to new-style (re module, Perl-style) regular expressions.
|
1997-10-06 18:04:35 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Most modules that used to use the regex module now use the re
|
|
|
|
module. The grep module has a new pgrep() function which uses
|
|
|
|
Perl-style regular expressions.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The (very old, backwards compatibility) regexp.py module has been
|
|
|
|
deleted.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Restricted execution (rexec): added the pcre module (support for the
|
|
|
|
re module) to the list of trusted extension modules.
|
|
|
|
|
|
|
|
- New version of Jim Fulton's CObject object type, adds
|
|
|
|
PyCObject_FromVoidPtrAndDesc() and PyCObject_GetDesc() APIs.
|
|
|
|
|
|
|
|
- Some patches to Lee Busby's fpectl mods that accidentally didn't
|
|
|
|
make it into 1.5a4.
|
|
|
|
|
|
|
|
- In the string module, add an optional 4th argument to count(),
|
|
|
|
matching find() etc.
|
|
|
|
|
|
|
|
- Patch for the nntplib module by Charles Waldman to add optional user
|
|
|
|
and password arguments to NNTP.__init__(), for nntp servers that need
|
|
|
|
them.
|
|
|
|
|
|
|
|
- The str() function for class objects now returns
|
|
|
|
"modulename.classname" instead of returning the same as repr().
|
|
|
|
|
|
|
|
- The parsing of \xXX escapes no longer relies on sscanf().
|
|
|
|
|
|
|
|
- The "sharedmodules" subdirectory of the installation is renamed to
|
|
|
|
"lib-dynload". (You may have to edit your Modules/Setup file to fix
|
|
|
|
this in an existing installation!)
|
|
|
|
|
|
|
|
- Fixed Don Beaudry's mess-up with the OPT test in the configure
|
|
|
|
script. Certain SGI platforms will still issue a warning for each
|
|
|
|
compile; there's not much I can do about this since the compiler's
|
|
|
|
exit status doesn't indicate that I was using an obsolete option.
|
|
|
|
|
|
|
|
- Fixed Barry's mess-up with {}.get(), and added test cases for it.
|
|
|
|
|
|
|
|
- Shared libraries didn't quite work under AIX because of the change
|
|
|
|
in status of the GNU readline interface. Fix due to by Vladimir
|
|
|
|
Marangozov.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
|
|
|
|
1997-10-06 21:12:43 -03:00
|
|
|
======================================================================
|
|
|
|
|
|
|
|
|
1997-11-26 12:36:28 -04:00
|
|
|
From 1.5a3 to 1.5a4
|
|
|
|
===================
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-28 00:43:21 -03:00
|
|
|
- faqwiz.py: version 0.8; Recognize https:// as URL; <html>...</html>
|
|
|
|
feature; better install instructions; removed faqmain.py (which was an
|
|
|
|
older version).
|
|
|
|
|
|
|
|
- nntplib.py: Fixed some bugs reported by Lars Wirzenius (to Debian)
|
|
|
|
about the treatment of lines starting with '.'. Added a minimal test
|
|
|
|
function.
|
|
|
|
|
|
|
|
- struct module: ignore most whitespace in format strings.
|
|
|
|
|
|
|
|
- urllib.py: close the socket and temp file in URLopener.retrieve() so
|
|
|
|
that multiple retrievals using the same connection work.
|
|
|
|
|
1997-10-06 21:12:43 -03:00
|
|
|
- All standard exceptions are now classes by default; use -X to make
|
|
|
|
them strings (for backward compatibility only).
|
|
|
|
|
|
|
|
- There's a new standard exception hierarchy, defined in the standard
|
|
|
|
library module exceptions.py (which you never need to import
|
|
|
|
explicitly). See
|
|
|
|
http://grail.cnri.reston.va.us/python/essays/stdexceptions.html for
|
|
|
|
more info.
|
|
|
|
|
1997-08-28 00:43:21 -03:00
|
|
|
- Three new C API functions:
|
|
|
|
|
|
|
|
- int PyErr_GivenExceptionMatches(obj1, obj2)
|
|
|
|
|
|
|
|
Returns 1 if obj1 and obj2 are the same object, or if obj1 is an
|
|
|
|
instance of type obj2, or of a class derived from obj2
|
|
|
|
|
|
|
|
- int PyErr_ExceptionMatches(obj)
|
|
|
|
|
|
|
|
Higher level wrapper around PyErr_GivenExceptionMatches() which uses
|
|
|
|
PyErr_Occurred() as obj1. This will be the more commonly called
|
|
|
|
function.
|
|
|
|
|
|
|
|
- void PyErr_NormalizeException(typeptr, valptr, tbptr)
|
|
|
|
|
|
|
|
Normalizes exceptions, and places the normalized values in the
|
|
|
|
arguments. If type is not a class, this does nothing. If type is a
|
|
|
|
class, then it makes sure that value is an instance of the class by:
|
|
|
|
|
|
|
|
1. if instance is of the type, or a class derived from type, it does
|
|
|
|
nothing.
|
|
|
|
|
|
|
|
2. otherwise it instantiates the class, using the value as an
|
|
|
|
argument. If value is None, it uses an empty arg tuple, and if
|
|
|
|
the value is a tuple, it uses just that.
|
|
|
|
|
1997-10-06 21:12:43 -03:00
|
|
|
- Another new C API function: PyErr_NewException() creates a new
|
|
|
|
exception class derived from Exception; when -X is given, it creates a
|
|
|
|
new string exception.
|
1997-08-28 00:43:21 -03:00
|
|
|
|
|
|
|
- core interpreter: remove the distinction between tuple and list
|
|
|
|
unpacking; allow an arbitrary sequence on the right hand side of any
|
|
|
|
unpack instruction. (UNPACK_LIST and UNPACK_TUPLE now do the same
|
|
|
|
thing, which should really be called UNPACK_SEQUENCE.)
|
|
|
|
|
|
|
|
- classes: Allow assignments to an instance's __dict__ or __class__,
|
|
|
|
so you can change ivars (including shared ivars -- shock horror) and
|
|
|
|
change classes dynamically. Also make the check on read-only
|
|
|
|
attributes of classes less draconic -- only the specials names
|
|
|
|
__dict__, __bases__, __name__ and __{get,set,del}attr__ can't be
|
|
|
|
assigned.
|
|
|
|
|
|
|
|
- Two new built-in functions: issubclass() and isinstance(). Both
|
|
|
|
take classes as their second arguments. The former takes a class as
|
|
|
|
the first argument and returns true iff first is second, or is a
|
|
|
|
subclass of second. The latter takes any object as the first argument
|
|
|
|
and returns true iff first is an instance of the second, or any
|
|
|
|
subclass of second.
|
|
|
|
|
|
|
|
- configure: Added configuration tests for presence of alarm(),
|
|
|
|
pause(), and getpwent().
|
|
|
|
|
|
|
|
- Doc/Makefile: changed latex2html targets.
|
|
|
|
|
|
|
|
- classes: Reverse the search order for the Don Beaudry hook so that
|
|
|
|
the first class with an applicable hook wins. Makes more sense.
|
|
|
|
|
|
|
|
- Changed the checks made in Py_Initialize() and Py_Finalize(). It is
|
|
|
|
now legal to call these more than once. The first call to
|
|
|
|
Py_Initialize() initializes, the first call to Py_Finalize()
|
|
|
|
finalizes. There's also a new API, Py_IsInitalized() which checks
|
|
|
|
whether we are already initialized (in case you want to leave things
|
|
|
|
as they were).
|
|
|
|
|
|
|
|
- Completely disable the declarations for malloc(), realloc() and
|
|
|
|
free(). Any 90's C compiler has these in header files, and the tests
|
|
|
|
to decide whether to suppress the declarations kept failing on some
|
|
|
|
platforms.
|
|
|
|
|
|
|
|
- *Before* (instead of after) signalmodule.o is added, remove both
|
|
|
|
intrcheck.o and sigcheck.o. This should get rid of warnings in ar or
|
|
|
|
ld on various systems.
|
|
|
|
|
|
|
|
- Added reop to PC/config.c
|
|
|
|
|
|
|
|
- configure: Decided to use -Aa -D_HPUX_SOURCE on HP-UX platforms.
|
|
|
|
Removed outdated HP-UX comments from README. Added Cray T3E comments.
|
|
|
|
|
|
|
|
- Various renames of statically defined functions that had name
|
|
|
|
conflicts on some systems, e.g. strndup (GNU libc), join (Cray),
|
|
|
|
roundup (sys/types.h).
|
|
|
|
|
|
|
|
- urllib.py: Interpret three slashes in file: URL as local file (for
|
|
|
|
Netscape on Windows/Mac).
|
|
|
|
|
|
|
|
- copy.py: Make sure the objects returned by __getinitargs__() are
|
|
|
|
kept alive (in the memo) to avoid a certain kind of nasty crash. (Not
|
|
|
|
easily reproducable because it requires a later call to
|
|
|
|
__getinitargs__() to return a tuple that happens to be allocated at
|
|
|
|
the same address.)
|
|
|
|
|
|
|
|
- Added definition of AR to toplevel Makefile. Renamed @buildno temp
|
|
|
|
file to buildno1.
|
|
|
|
|
|
|
|
- Moved Include/assert.h to Parser/assert.h, which seems to be the
|
|
|
|
only place where it's needed.
|
|
|
|
|
|
|
|
- Tweaked the dictionary lookup code again for some more speed
|
|
|
|
(Vladimir Marangozov).
|
|
|
|
|
|
|
|
- NT build: Changed the way python15.lib is included in the other
|
|
|
|
projects. Per Mark Hammond's suggestion, add it to the extra libs in
|
|
|
|
Settings instead of to the project's source files.
|
|
|
|
|
|
|
|
- regrtest.py: Change default verbosity so that there are only three
|
|
|
|
levels left: -q, default and -v. In default mode, the name of each
|
|
|
|
test is now printed. -v is the same as the old -vv. -q is more quiet
|
|
|
|
than the old default mode.
|
|
|
|
|
|
|
|
- Removed the old FAQ from the distribution. You now have to get it
|
|
|
|
from the web!
|
|
|
|
|
|
|
|
- Removed the PC/make_nt.in file from the distribution; it is no
|
|
|
|
longer needed.
|
|
|
|
|
|
|
|
- Changed the build sequence so that shared modules are built last.
|
|
|
|
This fixes things for AIX and doesn't hurt elsewhere.
|
|
|
|
|
|
|
|
- Improved test for GNU MP v1 in mpzmodule.c
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- fileobject.c: ftell() on Linux discards all buffered data; changed
|
1997-08-28 00:43:21 -03:00
|
|
|
read() code to use lseek() instead to get the same effect
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- configure.in, configure, importdl.c: NeXT sharedlib fixes
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- tupleobject.c: PyTuple_SetItem asserts refcnt==1
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-28 00:43:21 -03:00
|
|
|
- resource.c: Different strategy regarding whether to declare
|
|
|
|
getrusage() and getpagesize() -- #ifdef doesn't work, Linux has
|
|
|
|
conflicting decls in its headers. Choice: only declare the return
|
|
|
|
type, not the argument prototype, and not on Linux.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- importdl.c, configure*: set sharedlib extensions properly for NeXT
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- configure*, Makefile.in, Modules/Makefile.pre.in: AIX shared libraries
|
|
|
|
fixed; moved addition of PURIFY to LINKCC to configure
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-28 00:43:21 -03:00
|
|
|
- reopmodule.c, regexmodule.c, regexpr.c, zlibmodule.c: needed casts
|
|
|
|
added to shup up various compilers.
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- _tkinter.c: removed buggy mac #ifndef
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- Doc: various Mac documentation changes, added docs for 'ic' module
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- PC/make_nt.in: deleted
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-28 00:43:21 -03:00
|
|
|
- test_time.py, test_strftime.py: tweaks to catch %Z (which may return
|
|
|
|
"")
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- test_rotor.py: print b -> print `b`
|
1997-08-14 23:50:47 -03:00
|
|
|
|
1997-08-18 18:17:32 -03:00
|
|
|
- Tkinter.py: (tagOrId) -> (tagOrId,)
|
1997-10-06 18:04:35 -03:00
|
|
|
|
|
|
|
- Tkinter.py: the Tk class now also has a configure() method and
|
|
|
|
friends (they have been moved to the Misc class to accomplish this).
|
|
|
|
|
|
|
|
- dict.get(key[, default]) returns dict[key] if it exists, or default
|
|
|
|
if it doesn't. The default defaults to None. This is quicker for
|
|
|
|
some applications than using either has_key() or try:...except
|
|
|
|
KeyError:....
|
|
|
|
|
1997-10-06 21:12:43 -03:00
|
|
|
- Tools/webchecker/: some small changes to webchecker.py; added
|
|
|
|
websucker.py (a simple web site mirroring script).
|
|
|
|
|
|
|
|
- Dictionary objects now have a get() method (also in UserDict.py).
|
|
|
|
dict.get(key, default) returns dict[key] if it exists and default
|
|
|
|
otherwise; default defaults to None.
|
|
|
|
|
|
|
|
- Tools/scripts/logmerge.py: print the author, too.
|
|
|
|
|
|
|
|
- Changes to import: support for "import a.b.c" is now built in. See
|
|
|
|
http://grail.cnri.reston.va.us/python/essays/packages.html
|
|
|
|
for more info. Most important deviations from "ni.py": __init__.py is
|
|
|
|
executed in the package's namespace instead of as a submodule; and
|
|
|
|
there's no support for "__" or "__domain__". Note that "ni.py" is not
|
|
|
|
changed to match this -- it is simply declared obsolete (while at the
|
|
|
|
same time, it is documented...:-( ).
|
|
|
|
Unfortunately, "ihooks.py" has not been upgraded (but see "knee.py"
|
|
|
|
for an example implementation of hierarchical module import written in
|
|
|
|
Python).
|
|
|
|
|
|
|
|
- More changes to import: the site.py module is now imported by
|
|
|
|
default when Python is initialized; use -S to disable it. The site.py
|
|
|
|
module extends the path with several more directories: site-packages
|
|
|
|
inside the lib/python1.5/ directory, site-python in the lib/
|
|
|
|
directory, and pathnames mentioned in *.pth files found in either of
|
|
|
|
those directories. See
|
|
|
|
http://grail.cnri.reston.va.us/python/essays/packages.html
|
|
|
|
for more info.
|
|
|
|
|
|
|
|
- Changes to standard library subdirectory names: those subdirectories
|
|
|
|
that are not packages have been renamed with a hypen in their name,
|
|
|
|
e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3.
|
|
|
|
The test suite is now a package -- to run a test, you must now use
|
|
|
|
"import test.test_foo".
|
|
|
|
|
|
|
|
- A completely new re.py module is provided (thanks to Andrew
|
1997-12-02 15:44:54 -04:00
|
|
|
Kuchling, Tim Peters and Jeffrey Ollie) which uses Philip Hazel's
|
|
|
|
"pcre" re compiler and engine. For a while, the "old" re.py (which
|
|
|
|
was new in 1.5a3!) will be kept around as re1.py. The "old" regex
|
|
|
|
module and underlying parser and engine are still present -- while
|
|
|
|
regex is now officially obsolete, it will probably take several major
|
|
|
|
release cycles before it can be removed.
|
1997-10-06 21:12:43 -03:00
|
|
|
|
|
|
|
- The posix module now has a strerror() function which translates an
|
|
|
|
error code to a string.
|
|
|
|
|
|
|
|
- The emacs.py module (which was long obsolete) has been removed.
|
|
|
|
|
|
|
|
- The universal makefile Misc/Makefile.pre.in now features an
|
|
|
|
"install" target. By default, installed shared libraries go into
|
|
|
|
$exec_prefix/lib/python$VERSION/site-packages/.
|
|
|
|
|
|
|
|
- The install-sh script is installed with the other configuration
|
|
|
|
specific files (in the config/ subdirectory).
|
|
|
|
|
|
|
|
- It turns out whatsound.py and sndhdr.py were identical modules.
|
|
|
|
Since there's also an imghdr.py file, I propose to make sndhdr.py the
|
|
|
|
official one. For compatibility, whatsound.py imports * from
|
|
|
|
sndhdr.py.
|
|
|
|
|
|
|
|
- Class objects have a new attribute, __module__, giving the name of
|
|
|
|
the module in which they were declared. This is useful for pickle and
|
|
|
|
for printing the full name of a class exception.
|
|
|
|
|
|
|
|
- Many extension modules no longer issue a fatal error when their
|
|
|
|
initialization fails; the importing code now checks whether an error
|
|
|
|
occurred during module initialization, and correctly propagates the
|
|
|
|
exception to the import statement.
|
|
|
|
|
|
|
|
- Most extension modules now raise class-based exceptions (except when
|
|
|
|
-X is used).
|
|
|
|
|
|
|
|
- Subtle changes to PyEval_{Save,Restore}Thread(): always swap the
|
|
|
|
thread state -- just don't manipulate the lock if it isn't there.
|
|
|
|
|
|
|
|
- Fixed a bug in Python/getopt.c that made it do the wrong thing when
|
|
|
|
an option was a single '-'. Thanks to Andrew Kuchling.
|
|
|
|
|
|
|
|
- New module mimetypes.py will guess a MIME type from a filename's
|
|
|
|
extension.
|
|
|
|
|
|
|
|
- Windows: the DLL version is now settable via a resource rather than
|
|
|
|
being hardcoded. This can be used for "branding" a binary Python
|
|
|
|
distribution.
|
|
|
|
|
|
|
|
- urllib.py is now threadsafe -- it now uses re instead of regex, and
|
|
|
|
sys.exc_info() instead of sys.exc_{type,value}.
|
|
|
|
|
|
|
|
- Many other library modules that used to use
|
|
|
|
sys.exc_{type,value,traceback} are now more thread-safe by virtue of
|
|
|
|
using sys.exc_info().
|
|
|
|
|
|
|
|
- The functions in popen2 have an optional buffer size parameter.
|
|
|
|
Also, the command argument can now be either a string (passed to the
|
|
|
|
shell) or a list of arguments (passed directly to execv).
|
|
|
|
|
1997-10-07 16:12:50 -03:00
|
|
|
|
|
|
|
- Alas, the thread support for _tkinter released with 1.5a3 didn't
|
|
|
|
work. It's been rewritten. The bad news is that it now requires a
|
|
|
|
modified version of a file in the standard Tcl distribution, which you
|
|
|
|
must compile with a -I option pointing to the standard Tcl source
|
|
|
|
tree. For this reason, the thread support is disabled by default.
|
1997-10-06 21:12:43 -03:00
|
|
|
|
|
|
|
- The errno extension module adds two tables: errorcode maps errno
|
1997-10-08 19:49:49 -03:00
|
|
|
numbers to errno names (e.g. EINTR), and errorstr maps them to
|
1997-10-06 21:12:43 -03:00
|
|
|
message strings. (The latter is redundant because the new call
|
|
|
|
posix.strerror() now does the same, but alla...) (Marc-Andre Lemburg)
|
|
|
|
|
|
|
|
- The readline extension module now provides some interfaces to
|
|
|
|
internal readline routines that make it possible to write a completer
|
|
|
|
in Python. An example completer, rlcompleter.py, is provided.
|
|
|
|
|
|
|
|
When completing a simple identifier, it completes keywords,
|
|
|
|
built-ins and globals in __main__; when completing
|
|
|
|
NAME.NAME..., it evaluates (!) the expression up to the last
|
|
|
|
dot and completes its attributes.
|
|
|
|
|
|
|
|
It's very cool to do "import string" type "string.", hit the
|
|
|
|
completion key (twice), and see the list of names defined by
|
|
|
|
the string module!
|
|
|
|
|
|
|
|
Tip: to use the tab key as the completion key, call
|
|
|
|
|
|
|
|
readline.parse_and_bind("tab: complete")
|
|
|
|
|
|
|
|
- The traceback.py module has a new function tb_lineno() by Marc-Andre
|
|
|
|
Lemburg which extracts the line number from the linenumber table in
|
|
|
|
the code object. Apparently the traceback object doesn't contains the
|
|
|
|
right linenumber when -O is used. Rather than guessing whether -O is
|
|
|
|
on or off, the module itself uses tb_lineno() unconditionally.
|
|
|
|
|
|
|
|
- Fixed Demo/tkinter/matt/canvas-moving-or-creating.py: change bind()
|
|
|
|
to tag_bind() so it works again.
|
|
|
|
|
|
|
|
- The pystone script is now a standard library module. Example use:
|
|
|
|
"import test.pystone; test.pystone.main()".
|
|
|
|
|
|
|
|
- The import of the readline module in interactive mode is now also
|
|
|
|
attempted when -i is specified. (Yes, I know, giving in to Marc-Andre
|
|
|
|
Lemburg, who asked for this. :-)
|
|
|
|
|
|
|
|
- rfc822.py: Entirely rewritten parseaddr() function by Sjoerd
|
|
|
|
Mullender, to be closer to the standard. This fixes the getaddr()
|
|
|
|
method. Unfortunately, getaddrlist() is as broken as ever, since it
|
|
|
|
splits on commas without regard for RFC 822 quoting conventions.
|
|
|
|
|
|
|
|
- pprint.py: correctly emit trailing "," in singleton tuples.
|
|
|
|
|
|
|
|
- _tkinter.c: export names for its type objects, TkappType and
|
|
|
|
TkttType.
|
|
|
|
|
|
|
|
- pickle.py: use __module__ when defined; fix a particularly hard to
|
|
|
|
reproduce bug that confuses the memo when temporary objects are
|
|
|
|
returned by custom pickling interfaces; and a semantic change: when
|
|
|
|
unpickling the instance variables of an instance, use
|
|
|
|
inst.__dict__.update(value) instead of a for loop with setattr() over
|
|
|
|
the value.keys(). This is more consistent (the pickling doesn't use
|
|
|
|
getattr() either but pickles inst.__dict__) and avoids problems with
|
|
|
|
instances that have a __setattr__ hook. But it *is* a semantic change
|
|
|
|
(because the setattr hook is no longer used). So beware!
|
|
|
|
|
|
|
|
- config.h is now installed (at last) in
|
|
|
|
$exec_prefix/include/python1.5/. For most sites, this means that it
|
|
|
|
is actually in $prefix/include/python1.5/, with all the other Python
|
|
|
|
include files, since $prefix and $exec_prefix are the same by
|
|
|
|
default.
|
|
|
|
|
|
|
|
- The imp module now supports parts of the functionality to implement
|
|
|
|
import of hierarchical module names. It now supports find_module()
|
|
|
|
and load_module() for all types of modules. Docstrings have been
|
1997-10-07 16:12:50 -03:00
|
|
|
added for those functions in the built-in imp module that are still
|
1997-10-06 21:12:43 -03:00
|
|
|
relevant (some old interfaces are obsolete). For a sample
|
|
|
|
implementation of hierarchical module import in Python, see the new
|
|
|
|
library module knee.py.
|
|
|
|
|
|
|
|
- The % operator on string objects now allows arbitrary nested parens
|
|
|
|
in a %(...)X style format. (Brad Howes)
|
|
|
|
|
|
|
|
- Reverse the order in which Setup and Setup.local are passed to the
|
|
|
|
makesetup script. This allows variable definitions in Setup.local to
|
|
|
|
override definitions in Setup. (But you'll still have to edit Setup
|
|
|
|
if you want to disable modules that are enabled by default, or if such
|
|
|
|
modules need non-standard options.)
|
|
|
|
|
|
|
|
- Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this
|
|
|
|
is like PyImport_ImporModule(name) but receives the globals and locals
|
|
|
|
dict and the fromlist arguments as well. (The name is a char*; the
|
|
|
|
others are PyObject*s).
|
|
|
|
|
|
|
|
- The 'p' format in the struct extension module alloded to above is
|
|
|
|
new in 1.5a4.
|
|
|
|
|
|
|
|
- The types.py module now uses try-except in a few places to make it
|
|
|
|
more likely that it can be imported in restricted mode. Some type
|
|
|
|
names are undefined in that case, e.g. CodeType (inaccessible),
|
|
|
|
FileType (not always accessible), and TracebackType and FrameType
|
|
|
|
(inaccessible).
|
|
|
|
|
|
|
|
- In urllib.py: added separate administration of temporary files
|
|
|
|
created y URLopener.retrieve() so cleanup() can properly remove them.
|
|
|
|
The old code removed everything in tempcache which was a bad idea if
|
|
|
|
the user had passed a non-temp file into it. Also, in basejoin(),
|
|
|
|
interpret relative paths starting in "../". This is necessary if the
|
|
|
|
server uses symbolic links.
|
|
|
|
|
|
|
|
- The Windows build procedure and project files are now based on
|
|
|
|
Microsoft Visual C++ 5.x. The build now takes place in the PCbuild
|
|
|
|
directory. It is much more robust, and properly builds separate Debug
|
|
|
|
and Release versions. (The installer will be added shortly.)
|
|
|
|
|
|
|
|
- Added casts and changed some return types in regexpr.c to avoid
|
|
|
|
compiler warnings or errors on some platforms.
|
|
|
|
|
|
|
|
- The AIX build tools for shared libraries now supports VPATH. (Donn
|
|
|
|
Cave)
|
|
|
|
|
|
|
|
- By default, disable the "portable" multimedia modules audioop,
|
|
|
|
imageop, and rgbimg, since they don't work on 64-bit platforms.
|
|
|
|
|
|
|
|
- Fixed a nasty bug in cStringIO.c when code was actually using the
|
|
|
|
close() method (the destructors would try to free certain fields a
|
|
|
|
second time).
|
|
|
|
|
|
|
|
- For those who think they need it, there's a "user.py" module. This
|
|
|
|
is *not* imported by default, but can be imported to run user-specific
|
|
|
|
setup commands, ~/.pythonrc.py.
|
|
|
|
|
|
|
|
- Various speedups suggested by Fredrik Lundh, Marc-Andre Lemburg,
|
|
|
|
Vladimir Marangozov, and others.
|
|
|
|
|
|
|
|
- Added os.altsep; this is '/' on DOS/Windows, and None on systems
|
|
|
|
with a sane filename syntax.
|
|
|
|
|
|
|
|
- os.py: Write out the dynamic OS choice, to avoid exec statements.
|
|
|
|
Adding support for a new OS is now a bit more work, but I bet that
|
|
|
|
'dos' or 'nt' will cover most situations...
|
|
|
|
|
|
|
|
- The obsolete exception AccessError is now really gone.
|
|
|
|
|
|
|
|
- Tools/faqwiz/: New installation instructions show how to maintain
|
|
|
|
multiple FAQs. Removed bootstrap script from end of faqwiz.py module.
|
1997-10-07 16:12:50 -03:00
|
|
|
Added instructions to bootstrap script, too. Version bumped to 0.8.1.
|
1997-10-06 21:12:43 -03:00
|
|
|
Added <html>...</html> feature suggested by Skip Montanaro. Added
|
|
|
|
leading text for Roulette, default to 'Hit Reload ...'. Fix typo in
|
|
|
|
default SRCDIR.
|
|
|
|
|
|
|
|
- Documentation for the relatively new modules "keyword" and "symbol"
|
|
|
|
has been added (to the end of the section on the parser extension
|
|
|
|
module).
|
1997-10-07 16:12:50 -03:00
|
|
|
|
|
|
|
- In module bisect.py, but functions have two optional argument 'lo'
|
|
|
|
and 'hi' which allow you to specify a subsequence of the array to
|
|
|
|
operate on.
|
|
|
|
|
|
|
|
- In ftplib.py, changed most methods to return their status (even when
|
|
|
|
it is always "200 OK") rather than swallowing it.
|
1997-10-08 19:49:49 -03:00
|
|
|
|
|
|
|
- main() now calls setlocale(LC_ALL, ""), if setlocale() and
|
|
|
|
<locale.h> are defined.
|
1997-10-09 20:32:24 -03:00
|
|
|
|
|
|
|
- Changes to configure.in, the configure script, and both
|
|
|
|
Makefile.pre.in files, to support SGI's SGI_ABI platform selection
|
|
|
|
environment variable.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
|
|
|
|
|
|
|
======================================================================
|
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
From 1.4 to 1.5a3
|
|
|
|
=================
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Security
|
|
|
|
--------
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- If you are using the setuid script C wrapper (Misc/setuid-prog.c),
|
|
|
|
please use the new version. The old version has a huge security leak.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Miscellaneous
|
|
|
|
-------------
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Because of various (small) incompatible changes in the Python
|
|
|
|
bytecode interpreter, the magic number for .pyc files has changed
|
|
|
|
again.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The default module search path is now much saner. Both on Unix and
|
|
|
|
Windows, it is essentially derived from the path to the executable
|
|
|
|
(which can be overridden by setting the environment variable
|
|
|
|
$PYTHONHOME). The value of $PYTHONPATH on Windows is now inserted in
|
|
|
|
front of the default path, like in Unix (instead of overriding the
|
|
|
|
default path). On Windows, the directory containing the executable is
|
|
|
|
added to the end of the path.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A new version of python-mode.el for Emacs has been included. Also,
|
|
|
|
a new file ccpy-style.el has been added to configure Emacs cc-mode for
|
|
|
|
the preferred style in Python C sources.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- On Unix, when using sys.argv[0] to insert the script directory in
|
|
|
|
front of sys.path, expand a symbolic link. You can now install a
|
|
|
|
program in a private directory and have a symbolic link to it in a
|
|
|
|
public bin directory, and it will put the private directory in the
|
|
|
|
module search path. Note that the symlink is expanded in sys.path[0]
|
|
|
|
but not in sys.argv[0], so you can still tell the name by which you
|
|
|
|
were invoked.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- It is now recommended to use ``#!/usr/bin/env python'' instead of
|
|
|
|
``#!/usr/local/bin/python'' at the start of executable scripts, except
|
|
|
|
for CGI scripts. It has been determined that the use of /usr/bin/env
|
|
|
|
is more portable than that of /usr/local/bin/python -- scripts almost
|
|
|
|
never have to be edited when the Python interpreter lives in a
|
|
|
|
non-standard place. Note that this doesn't work for CGI scripts since
|
|
|
|
the python executable often doesn't live in the HTTP server's default
|
|
|
|
search path.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The silly -s command line option and the corresponding
|
|
|
|
PYTHONSUPPRESS environment variable (and the Py_SuppressPrint global
|
|
|
|
flag in the Python/C API) are gone.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Most problems on 64-bit platforms should now be fixed. Andrew
|
|
|
|
Kuchling helped. Some uncommon extension modules are still not
|
|
|
|
clean (image and audio ops?).
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Fixed a bug where multiple anonymous tuple arguments would be mixed up
|
|
|
|
when using the debugger or profiler (reported by Just van Rossum).
|
|
|
|
The simplest example is ``def f((a,b),(c,d)): print a,b,c,d''; this
|
|
|
|
would print the wrong value when run under the debugger or profiler.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The hacks that the dictionary implementation used to speed up
|
|
|
|
repeated lookups of the same C string were removed; these were a
|
|
|
|
source of subtle problems and don't seem to serve much of a purpose
|
|
|
|
any longer.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- All traces of support for the long dead access statement have been
|
|
|
|
removed from the sources.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Plugged the two-byte memory leak in the tokenizer when reading an
|
|
|
|
interactive EOF.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There's a -O option to the interpreter that removes SET_LINENO
|
|
|
|
instructions and assert statements (see below); it uses and produces
|
|
|
|
.pyo files instead of .pyc files. The speedup is only a few percent
|
|
|
|
in most cases. The line numbers are still available in the .pyo file,
|
|
|
|
as a separate table (which is also available in .pyc files). However,
|
|
|
|
the removal of the SET_LINENO instructions means that the debugger
|
|
|
|
(pdb) can't set breakpoints on lines in -O mode. The traceback module
|
|
|
|
contains a function to extract a line number from the code object
|
|
|
|
referenced in a traceback object. In the future it should be possible
|
|
|
|
to write external bytecode optimizers that create better optimized
|
|
|
|
.pyo files, and there should be more control over optimization;
|
|
|
|
consider the -O option a "teaser". Without -O, the assert statement
|
|
|
|
actually generates code that first checks __debug__; if this variable
|
|
|
|
is false, the assertion is not checked. __debug__ is a built-in
|
|
|
|
variable whose value is initialized to track the -O flag (it's true
|
|
|
|
iff -O is not specified). With -O, no code is generated for assert
|
|
|
|
statements, nor for code of the form ``if __debug__: <something>''.
|
|
|
|
Sorry, no further constant folding happens.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Performance
|
|
|
|
-----------
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- It's much faster (almost twice for pystone.py -- see
|
|
|
|
Tools/scripts). See the entry on string interning below.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some speedup by using separate free lists for method objects (both
|
|
|
|
the C and the Python variety) and for floating point numbers.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Big speedup by allocating frame objects with a single malloc() call.
|
|
|
|
The Python/C API for frames is changed (you shouldn't be using this
|
|
|
|
anyway).
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Significant speedup by inlining some common opcodes for common operand
|
|
|
|
types (e.g. i+i, i-i, and list[i]). Fredrik Lundh.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Small speedup by reordering the method tables of some common
|
|
|
|
objects (e.g. list.append is now first).
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Big optimization to the read() method of file objects. A read()
|
|
|
|
without arguments now attempts to use fstat to allocate a buffer of
|
|
|
|
the right size; for pipes and sockets, it will fall back to doubling
|
|
|
|
the buffer size. While that the improvement is real on all systems,
|
|
|
|
it is most dramatic on Windows.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Documentation
|
|
|
|
-------------
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Many new pieces of library documentation were contributed, mostly by
|
|
|
|
Andrew Kuchling. Even cmath is now documented! There's also a
|
|
|
|
chapter of the library manual, "libundoc.tex", which provides a
|
|
|
|
listing of all undocumented modules, plus their status (e.g. internal,
|
|
|
|
obsolete, or in need of documentation). Also contributions by Sue
|
|
|
|
Williams, Skip Montanaro, and some module authors who succumbed to
|
|
|
|
pressure to document their own contributed modules :-). Note that
|
|
|
|
printing the documentation now kills fewer trees -- the margins have
|
|
|
|
been reduced.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- I have started documenting the Python/C API. Unfortunately this project
|
|
|
|
hasn't been completed yet. It will be complete before the final release of
|
|
|
|
Python 1.5, though. At the moment, it's better to read the LaTeX source
|
|
|
|
than to attempt to run it through LaTeX and print the resulting dvi file.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The posix module (and hence os.py) now has doc strings! Thanks to Neil
|
|
|
|
Schemenauer. I received a few other contributions of doc strings. In most
|
|
|
|
other places, doc strings are still wishful thinking...
|
1997-11-26 12:36:28 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Language changes
|
|
|
|
----------------
|
|
|
|
|
|
|
|
- Private variables with leading double underscore are now a permanent
|
|
|
|
feature of the language. (These were experimental in release 1.4. I have
|
|
|
|
favorable experience using them; I can't label them "experimental"
|
|
|
|
forever.)
|
|
|
|
|
|
|
|
- There's new string literal syntax for "raw strings". Prefixing a string
|
|
|
|
literal with the letter r (or R) disables all escape processing in the
|
|
|
|
string; for example, r'\n' is a two-character string consisting of a
|
|
|
|
backslash followed by the letter n. This combines with all forms of string
|
|
|
|
quotes; it is actually useful for triple quoted doc strings which might
|
|
|
|
contain references to \n or \t. An embedded quote prefixed with a
|
|
|
|
backslash does not terminate the string, but the backslash is still
|
|
|
|
included in the string; for example, r'\'' is a two-character string
|
|
|
|
consisting of a backslash and a quote. (Raw strings are also
|
|
|
|
affectionately known as Robin strings, after their inventor, Robin
|
|
|
|
Friedrich.)
|
|
|
|
|
|
|
|
- There's a simple assert statement, and a new exception
|
|
|
|
AssertionError. For example, ``assert foo > 0'' is equivalent to ``if
|
|
|
|
not foo > 0: raise AssertionError''. Sorry, the text of the asserted
|
|
|
|
condition is not available; it would be too complicated to generate
|
|
|
|
code for this (since the code is generated from a parse tree).
|
|
|
|
However, the text is displayed as part of the traceback!
|
|
|
|
|
|
|
|
- The raise statement has a new feature: when using "raise SomeClass,
|
|
|
|
somevalue" where somevalue is not an instance of SomeClass, it
|
|
|
|
instantiates SomeClass(somevalue). In 1.5a4, if somevalue is an
|
|
|
|
instance of a *derived* class of SomeClass, the exception class raised
|
|
|
|
is set to somevalue.__class__, and SomeClass is ignored after that.
|
|
|
|
|
|
|
|
- Duplicate keyword arguments are now detected at compile time;
|
|
|
|
f(a=1,a=2) is now a syntax error.
|
|
|
|
|
|
|
|
|
|
|
|
Changes to builtin features
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
- There's a new exception FloatingPointError (used only by Lee Busby's
|
|
|
|
patches to catch floating point exceptions, at the moment).
|
|
|
|
|
|
|
|
- The obsolete exception ConflictError (presumably used by the long
|
|
|
|
obsolete access statement) has been deleted.
|
|
|
|
|
|
|
|
- There's a new function sys.exc_info() which returns the tuple
|
|
|
|
(sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way.
|
|
|
|
|
|
|
|
- There's a new variable sys.executable, pointing to the executable file
|
|
|
|
for the Python interpreter.
|
|
|
|
|
|
|
|
- The sort() methods for lists no longer uses the C library qsort(); I
|
|
|
|
wrote my own quicksort implementation, with lots of help (in the form
|
|
|
|
of a kind of competition) from Tim Peters. This solves a bug in
|
|
|
|
dictionary comparisons on some Solaris versions when Python is built
|
|
|
|
with threads, and makes sorting lists even faster.
|
|
|
|
|
|
|
|
- The semantics of comparing two dictionaries have changed, to make
|
|
|
|
comparison of unequal dictionaries faster. A shorter dictionary is
|
|
|
|
always considered smaller than a larger dictionary. For dictionaries
|
|
|
|
of the same size, the smallest differing element determines the
|
|
|
|
outcome (which yields the same results as before in this case, without
|
|
|
|
explicit sorting). Thanks to Aaron Watters for suggesting something
|
|
|
|
like this.
|
|
|
|
|
|
|
|
- The semantics of try-except have changed subtly so that calling a
|
|
|
|
function in an exception handler that itself raises and catches an
|
|
|
|
exception no longer overwrites the sys.exc_* variables. This also
|
|
|
|
alleviates the problem that objects referenced in a stack frame that
|
|
|
|
caught an exception are kept alive until another exception is caught
|
|
|
|
-- the sys.exc_* variables are restored to their previous value when
|
|
|
|
returning from a function that caught an exception.
|
|
|
|
|
|
|
|
- There's a new "buffer" interface. Certain objects (e.g. strings and
|
|
|
|
arrays) now support the "buffer" protocol. Buffer objects are acceptable
|
|
|
|
whenever formerly a string was required for a write operation; mutable
|
|
|
|
buffer objects can be the target of a read operation using the call
|
|
|
|
f.readinto(buffer). A cool feature is that regular expression matching now
|
|
|
|
also work on array objects. Contribution by Jack Jansen. (Needs
|
|
|
|
documentation.)
|
|
|
|
|
|
|
|
- String interning: dictionary lookups are faster when the lookup
|
|
|
|
string object is the same object as the key in the dictionary, not
|
|
|
|
just a string with the same value. This is done by having a pool of
|
|
|
|
"interned" strings. Most names generated by the interpreter are now
|
|
|
|
automatically interned, and there's a new built-in function intern(s)
|
|
|
|
that returns the interned version of a string. Interned strings are
|
|
|
|
not a different object type, and interning is totally optional, but by
|
|
|
|
interning most keys a speedup of about 15% was obtained for the
|
|
|
|
pystone benchmark.
|
|
|
|
|
|
|
|
- Dictionary objects have several new methods; clear() and copy() have
|
|
|
|
the obvious semantics, while update(d) merges the contents of another
|
|
|
|
dictionary d into this one, overriding existing keys. The dictionary
|
|
|
|
implementation file is now called dictobject.c rather than the
|
|
|
|
confusing mappingobject.c.
|
|
|
|
|
|
|
|
- The intrinsic function dir() is much smarter; it looks in __dict__,
|
|
|
|
__members__ and __methods__.
|
|
|
|
|
|
|
|
- The intrinsic functions int(), long() and float() can now take a
|
|
|
|
string argument and then do the same thing as string.atoi(),
|
|
|
|
string.atol(), and string.atof(). No second 'base' argument is
|
|
|
|
allowed, and complex() does not take a string (nobody cared enough).
|
|
|
|
|
|
|
|
- When a module is deleted, its globals are now deleted in two phases.
|
|
|
|
In the first phase, all variables whose name begins with exactly one
|
|
|
|
underscore are replaced by None; in the second phase, all variables
|
|
|
|
are deleted. This makes it possible to have global objects whose
|
|
|
|
destructors depend on other globals. The deletion order within each
|
|
|
|
phase is still random.
|
|
|
|
|
|
|
|
- It is no longer an error for a function to be called without a
|
|
|
|
global variable __builtins__ -- an empty directory will be provided
|
|
|
|
by default.
|
|
|
|
|
|
|
|
- Guido's corollary to the "Don Beaudry hook": it is now possible to
|
|
|
|
do metaprogramming by using an instance as a base class. Not for the
|
|
|
|
faint of heart; and undocumented as yet, but basically if a base class
|
|
|
|
is an instance, its class will be instantiated to create the new
|
|
|
|
class. Jim Fulton will love it -- it also works with instances of his
|
|
|
|
"extension classes", since it is triggered by the presence of a
|
|
|
|
__class__ attribute on the purported base class. See
|
|
|
|
Demo/metaclasses/index.html for an explanation and see that directory
|
|
|
|
for examples.
|
|
|
|
|
|
|
|
- Another change is that the Don Beaudry hook is now invoked when
|
|
|
|
*any* base class is special. (Up to 1.5a3, the *last* special base
|
|
|
|
class is used; in 1.5a4, the more rational choice of the *first*
|
|
|
|
special base class is used.)
|
|
|
|
|
|
|
|
- New optional parameter to the readlines() method of file objects.
|
|
|
|
This indicates the number of bytes to read (the actual number of bytes
|
|
|
|
read will be somewhat larger due to buffering reading until the end of
|
|
|
|
the line). Some optimizations have also been made to speed it up (but
|
|
|
|
not as much as read()).
|
|
|
|
|
|
|
|
- Complex numbers no longer have the ".conj" pseudo attribute; use
|
|
|
|
z.conjugate() instead, or complex(z.real, -z.imag). Complex numbers
|
|
|
|
now *do* support the __members__ and __methods__ special attributes.
|
|
|
|
|
|
|
|
- The complex() function now looks for a __complex__() method on class
|
|
|
|
instances before giving up.
|
|
|
|
|
|
|
|
- Long integers now support arbitrary shift counts, so you can now
|
|
|
|
write 1L<<1000000, memory permitting. (Python 1.4 reports "outrageous
|
|
|
|
shift count for this.)
|
|
|
|
|
|
|
|
- The hex() and oct() functions have been changed so that for regular
|
|
|
|
integers, they never emit a minus sign. For example, on a 32-bit
|
|
|
|
machine, oct(-1) now returns '037777777777' and hex(-1) returns
|
|
|
|
'0xffffffff'. While this may seem inconsistent, it is much more
|
|
|
|
useful. (For long integers, a minus sign is used as before, to fit
|
|
|
|
the result in memory :-)
|
|
|
|
|
|
|
|
- The hash() function computes better hashes for several data types,
|
|
|
|
including strings, floating point numbers, and complex numbers.
|
|
|
|
|
|
|
|
|
|
|
|
New extension modules
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
- New extension modules cStringIO.c and cPickle.c, written by Jim
|
|
|
|
Fulton and other folks at Digital Creations. These are much more
|
|
|
|
efficient than their Python counterparts StringIO.py and pickle.py,
|
|
|
|
but don't support subclassing. cPickle.c clocks up to 1000 times
|
|
|
|
faster than pickle.py; cStringIO.c's improvement is less dramatic but
|
|
|
|
still significant.
|
|
|
|
|
|
|
|
- New extension module zlibmodule.c, interfacing to the free zlib
|
|
|
|
library (gzip compatible compression). There's also a module gzip.py
|
|
|
|
which provides a higher level interface. Written by Andrew Kuchling
|
|
|
|
and Jeremy Hylton.
|
|
|
|
|
|
|
|
- New module readline; see the "miscellaneous" section above.
|
|
|
|
|
|
|
|
- New Unix extension module resource.c, by Jeremy Hylton, provides
|
|
|
|
access to getrlimit(), getrusage(), setrusage(), getpagesize(), and
|
|
|
|
related symbolic constants.
|
|
|
|
|
|
|
|
- New extension puremodule.c, by Barry Warsaw, which interfaces to the
|
|
|
|
Purify(TM) C API. See also the file Misc/PURIFY.README. It is also
|
|
|
|
possible to enable Purify by simply setting the PURIFY Makefile
|
|
|
|
variable in the Modules/Setup file.
|
|
|
|
|
|
|
|
|
|
|
|
Changes in extension modules
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
- The struct extension module has several new features to control byte
|
|
|
|
order and word size. It supports reading and writing IEEE floats even
|
|
|
|
on platforms where this is not the native format. It uses uppercase
|
|
|
|
format codes for unsigned integers of various sizes (always using
|
|
|
|
Python long ints for 'I' and 'L'), 's' with a size prefix for strings,
|
|
|
|
and 'p' for "Pascal strings" (with a leading length byte, included in
|
|
|
|
the size; blame Hannu Krosing; new in 1.5a4). A prefix '>' forces
|
|
|
|
big-endian data and '<' forces little-endian data; these also select
|
|
|
|
standard data sizes and disable automatic alignment (use pad bytes as
|
|
|
|
needed).
|
|
|
|
|
|
|
|
- The array module supports uppercase format codes for unsigned data
|
|
|
|
formats (like the struct module).
|
|
|
|
|
|
|
|
- The fcntl extension module now exports the needed symbolic
|
|
|
|
constants. (Formerly these were in FCNTL.py which was not available
|
|
|
|
or correct for all platforms.)
|
|
|
|
|
|
|
|
- The extension modules dbm, gdbm and bsddb now check that the
|
|
|
|
database is still open before making any new calls.
|
|
|
|
|
|
|
|
- The dbhash module is no more. Use bsddb instead. (There's a third
|
|
|
|
party interface for the BSD 2.x code somewhere on the web; support for
|
|
|
|
bsddb will be deprecated.)
|
|
|
|
|
|
|
|
- The gdbm module now supports a sync() method.
|
|
|
|
|
|
|
|
- The socket module now has some new functions: getprotobyname(), and
|
|
|
|
the set {ntoh,hton}{s,l}().
|
|
|
|
|
|
|
|
- Various modules now export their type object: socket.SocketType,
|
|
|
|
array.ArrayType.
|
|
|
|
|
|
|
|
- The socket module's accept() method now returns unknown addresses as
|
|
|
|
a tuple rather than raising an exception. (This can happen in
|
|
|
|
promiscuous mode.) Theres' also a new function getprotobyname().
|
|
|
|
|
|
|
|
- The pthread support for the thread module now works on most platforms.
|
|
|
|
|
|
|
|
- STDWIN is now officially obsolete. Support for it will eventually
|
|
|
|
be removed from the distribution.
|
|
|
|
|
|
|
|
- The binascii extension module is now hopefully fully debugged.
|
|
|
|
(XXX Oops -- Fredrik Lundh promised me a uuencode fix that I never
|
|
|
|
received.)
|
|
|
|
|
|
|
|
- audioop.c: added a ratecv() function; better handling of overflow in
|
|
|
|
add().
|
|
|
|
|
|
|
|
- posixmodule.c: now exports the O_* flags (O_APPEND etc.). On
|
|
|
|
Windows, also O_TEXT and O_BINARY. The 'error' variable (the
|
|
|
|
exception is raises) is renamed -- its string value is now "os.error",
|
|
|
|
so newbies don't believe they have to import posix (or nt) to catch
|
|
|
|
it when they see os.error reported as posix.error. The execve()
|
|
|
|
function now accepts any mapping object for the environment.
|
|
|
|
|
|
|
|
- A new version of the al (audio library) module for SGI was
|
|
|
|
contributed by Sjoerd Mullender.
|
|
|
|
|
|
|
|
- The regex module has a new function get_syntax() which retrieves the
|
|
|
|
syntax setting set by set_syntax(). The code was also sanitized,
|
|
|
|
removing worries about unclean error handling. See also below for its
|
|
|
|
successor, re.py.
|
|
|
|
|
|
|
|
- The "new" module (which creates new objects of various types) once
|
|
|
|
again has a fully functioning new.function() method. Dangerous as
|
|
|
|
ever! Also, new.code() has several new arguments.
|
|
|
|
|
|
|
|
- A problem has been fixed in the rotor module: on systems with signed
|
|
|
|
characters, rotor-encoded data was not portable when the key contained
|
|
|
|
8-bit characters. Also, setkey() now requires its argument rather
|
|
|
|
than having broken code to default it.
|
|
|
|
|
|
|
|
- The sys.builtin_module_names variable is now a tuple. Another new
|
|
|
|
variables in sys is sys.executable (the full path to the Python
|
|
|
|
binary, if known).
|
|
|
|
|
|
|
|
- The specs for time.strftime() have undergone some revisions. It
|
|
|
|
appears that not all format characters are supported in the same way
|
|
|
|
on all platforms. Rather than reimplement it, we note these
|
|
|
|
differences in the documentation, and emphasize the shared set of
|
|
|
|
features. There's also a thorough test set (that occasionally finds
|
|
|
|
problems in the C library implementation, e.g. on some Linuxes),
|
|
|
|
thanks to Skip Montanaro.
|
|
|
|
|
|
|
|
- The nis module seems broken when used with NIS+; unfortunately
|
|
|
|
nobody knows how to fix it. It should still work with old NIS.
|
|
|
|
|
|
|
|
|
|
|
|
New library modules
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
- New (still experimental) Perl-style regular expression module,
|
|
|
|
re.py, which uses a new interface for matching as well as a new
|
|
|
|
syntax; the new interface avoids the thread-unsafety of the regex
|
|
|
|
interface. This comes with a helper extension reopmodule.c and vastly
|
|
|
|
rewritten regexpr.c. Most work on this was done by Jeffrey Ollie, Tim
|
|
|
|
Peters, and Andrew Kuchling. See the documentation libre.tex. In
|
|
|
|
1.5, the old regex module is still fully supported; in the future, it
|
|
|
|
will become obsolete.
|
|
|
|
|
|
|
|
- New module gzip.py; see zlib above.
|
|
|
|
|
|
|
|
- New module keyword.py exports knowledge about Python's built-in
|
|
|
|
keywords. (New version by Ka-Ping Yee.)
|
|
|
|
|
|
|
|
- New module pprint.py (with documentation) which supports
|
|
|
|
pretty-printing of lists, tuples, & dictionaries recursively. By Fred
|
|
|
|
Drake.
|
|
|
|
|
|
|
|
- New module code.py. The function code.compile_command() can
|
|
|
|
determine whether an interactively entered command is complete or not,
|
|
|
|
distinguishing incomplete from invalid input. (XXX Unfortunately,
|
|
|
|
this seems broken at this moment, and I don't have the time to fix
|
|
|
|
it. It's probably better to add an explicit interface to the parser
|
|
|
|
for this.)
|
|
|
|
|
|
|
|
- There is now a library module xdrlib.py which can read and write the
|
|
|
|
XDR data format as used by Sun RPC, for example. It uses the struct
|
|
|
|
module.
|
|
|
|
|
|
|
|
|
|
|
|
Changes in library modules
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
- Module codehack.py is now completely obsolete.
|
|
|
|
|
|
|
|
- The pickle.py module has been updated to make it compatible with the
|
|
|
|
new binary format that cPickle.c produces. By default it produces the
|
|
|
|
old all-ASCII format compatible with the old pickle.py, still much
|
|
|
|
faster than pickle.py; it will read both formats automatically. A few
|
|
|
|
other updates have been made.
|
|
|
|
|
|
|
|
- A new helper module, copy_reg.py, is provided to register extensions
|
|
|
|
to the pickling code.
|
|
|
|
|
|
|
|
- Revamped module tokenize.py is much more accurate and has an
|
|
|
|
interface that makes it a breeze to write code to colorize Python
|
|
|
|
source code. Contributed by Ka-Ping Yee.
|
|
|
|
|
|
|
|
- In ihooks.py, ModuleLoader.load_module() now closes the file under
|
|
|
|
all circumstances.
|
|
|
|
|
|
|
|
- The tempfile.py module has a new class, TemporaryFile, which creates
|
|
|
|
an open temporary file that will be deleted automatically when
|
|
|
|
closed. This works on Windows and MacOS as well as on Unix. (Jim
|
|
|
|
Fulton.)
|
|
|
|
|
|
|
|
- Changes to the cgi.py module: Most imports are now done at the
|
|
|
|
top of the module, which provides a speedup when using ni (Jim
|
|
|
|
Fulton). The problem with file upload to a Windows platform is solved
|
|
|
|
by using the new tempfile.TemporaryFile class; temporary files are now
|
|
|
|
always opened in binary mode (Jim Fulton). The cgi.escape() function
|
|
|
|
now takes an optional flag argument that quotes '"' to '"'. It
|
|
|
|
is now possible to invoke cgi.py from a command line script, to test
|
|
|
|
cgi scripts more easily outside an http server. There's an optional
|
|
|
|
limit to the size of uploads to POST (Skip Montanaro). Added a
|
|
|
|
'strict_parsing' option to all parsing functions (Jim Fulton). The
|
|
|
|
function parse_qs() now uses urllib.unquote() on the name as well as
|
|
|
|
the value of fields (Clarence Gardner). The FieldStorage class now
|
|
|
|
has a __len__() method.
|
|
|
|
|
|
|
|
- httplib.py: the socket object is no longer closed; all HTTP/1.*
|
|
|
|
responses are now accepted; and it is now thread-safe (by not using
|
|
|
|
the regex module).
|
|
|
|
|
|
|
|
- BaseHTTPModule.py: treat all HTTP/1.* versions the same.
|
|
|
|
|
|
|
|
- The popen2.py module is now rewritten using a class, which makes
|
|
|
|
access to the standard error stream and the process id of the
|
|
|
|
subprocess possible.
|
|
|
|
|
|
|
|
- Added timezone support to the rfc822.py module, in the form of a
|
|
|
|
getdate_tz() method and a parsedate_tz() function; also a mktime_tz().
|
|
|
|
Also added recognition of some non-standard date formats, by Lars
|
|
|
|
Wirzenius, and RFC 850 dates (Chris Lawrence).
|
|
|
|
|
|
|
|
- mhlib.py: various enhancements, including almost compatible parsing
|
|
|
|
of message sequence specifiers without invoking a subprocess. Also
|
|
|
|
added a createmessage() method by Lars Wirzenius.
|
|
|
|
|
|
|
|
- The StringIO.StringIO class now supports readline(nbytes). (Lars
|
|
|
|
Wirzenius.) (Of course, you should be using cStringIO for performance.)
|
|
|
|
|
|
|
|
- UserDict.py supports the new dictionary methods as well.
|
|
|
|
|
|
|
|
- Improvements for whrandom.py by Tim Peters: use 32-bit arithmetic to
|
|
|
|
speed it up, and replace 0 seed values by 1 to avoid degeneration.
|
|
|
|
A bug was fixed in the test for invalid arguments.
|
|
|
|
|
|
|
|
- Module ftplib.py: added support for parsing a .netrc file (Fred
|
|
|
|
Drake). Also added an ntransfercmd() method to the FTP class, which
|
|
|
|
allows access to the expected size of a transfer when available, and a
|
|
|
|
parse150() function to the module which parses the corresponding 150
|
|
|
|
response.
|
|
|
|
|
|
|
|
- urllib.py: the ftp cache is now limited to 10 entries. Added
|
|
|
|
quote_plus() and unquote_plus() functions which are like quote() and
|
|
|
|
unquote() but also replace spaces with '+' or vice versa, for
|
|
|
|
encoding/decoding CGI form arguments. Catch all errors from the ftp
|
|
|
|
module. HTTP requests now add the Host: header line. The proxy
|
|
|
|
variable names are now mapped to lower case, for Windows. The
|
|
|
|
spliturl() function no longer erroneously throws away all data past
|
|
|
|
the first newline. The basejoin() function now intereprets "../"
|
|
|
|
correctly. I *believe* that the problems with "exception raised in
|
|
|
|
__del__" under certain circumstances have been fixed (mostly by
|
|
|
|
changes elsewher in the interpreter).
|
|
|
|
|
|
|
|
- In urlparse.py, there is a cache for results in urlparse.urlparse();
|
|
|
|
its size limit is set to 20. Also, new URL schemes shttp, https, and
|
|
|
|
snews are "supported".
|
|
|
|
|
|
|
|
- shelve.py: use cPickle and cStringIO when available. Also added
|
|
|
|
a sync() method, which calls the database's sync() method if there is
|
|
|
|
one.
|
|
|
|
|
|
|
|
- The mimetools.py module now uses the available Python modules for
|
|
|
|
decoding quoted-printable, uuencode and base64 formats, rather than
|
|
|
|
creating a subprocess.
|
|
|
|
|
|
|
|
- The python debugger (pdb.py, and its base class bdb.py) now support
|
|
|
|
conditional breakpoints. See the docs.
|
|
|
|
|
|
|
|
- The modules base64.py, uu.py and quopri.py can now be used as simple
|
|
|
|
command line utilities.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Various small fixes to the nntplib.py module that I can't bother to
|
|
|
|
document in detail.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Sjoerd Mullender's mimify.py module now supports base64 encoding and
|
|
|
|
includes functions to handle the funny encoding you sometimes see in mail
|
|
|
|
headers. It is now documented.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- mailbox.py: Added BabylMailbox. Improved the way the mailbox is
|
|
|
|
gotten from the environment.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Many more modules now correctly open files in binary mode when this
|
|
|
|
is necessary on non-Unix platforms.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The copying functions in the undocumented module shutil.py are
|
|
|
|
smarter.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Writer classes in the formatter.py module now have a flush()
|
|
|
|
method.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The sgmllib.py module accepts hyphens and periods in the middle of
|
|
|
|
attribute names. While this is against the SGML standard, there is
|
|
|
|
some HTML out there that uses this...
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The interface for the Python bytecode disassembler module, dis.py,
|
|
|
|
has been enhanced quite a bit. There's now one main function,
|
|
|
|
dis.dis(), which takes almost any kind of object (function, module,
|
|
|
|
class, instance, method, code object) and disassembles it; without
|
|
|
|
arguments it disassembles the last frame of the last traceback. The
|
|
|
|
other functions have changed slightly, too.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The imghdr.py module recognizes new image types: BMP, PNG.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The string.py module has a new function replace(str, old, new,
|
|
|
|
[maxsplit]) which does substring replacements. It is actually
|
|
|
|
implemented in C in the strop module. The functions [r]find() an
|
|
|
|
[r]index() have an optional 4th argument indicating the end of the
|
|
|
|
substring to search, alsoo implemented by their strop counterparts.
|
|
|
|
(Remember, never import strop -- import string uses strop when
|
|
|
|
available with zero overhead.)
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The string.join() function now accepts any sequence argument, not
|
|
|
|
just lists and tuples.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The string.maketrans() requires its first two arguments to be
|
|
|
|
present. The old version didn't require them, but there's not much
|
|
|
|
point without them, and the documentation suggests that they are
|
|
|
|
required, so we fixed the code to match the documentation.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The regsub.py module has a function clear_cache(), which clears its
|
|
|
|
internal cache of compiled regular expressions. Also, the cache now
|
|
|
|
takes the current syntax setting into account. (However, this module
|
|
|
|
is now obsolete -- use the sub() or subn() functions or methods in the
|
|
|
|
re module.)
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The undocumented module Complex.py has been removed, now that Python
|
|
|
|
has built-in complex numbers. A similar module remains as
|
|
|
|
Demo/classes/Complex.py, as an example.
|
1997-11-26 12:36:28 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Changes to the build process
|
|
|
|
----------------------------
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The way GNU readline is configured is totally different. The
|
|
|
|
--with-readline configure option is gone. It is now an extension
|
|
|
|
module, which may be loaded dynamically. You must enable it (and
|
|
|
|
specify the correct linraries to link with) in the Modules/Setup file.
|
|
|
|
Importing the module installs some hooks which enable command line
|
|
|
|
editing. When the interpreter shell is invoked interactively, it
|
|
|
|
attempts to import the readline module; when this fails, the default
|
|
|
|
input mechanism is used. The hook variables are PyOS_InputHook and
|
|
|
|
PyOS_ReadlineFunctionPointer. (Code contributed by Lee Busby, with
|
|
|
|
ideas from William Magro.)
|
1997-11-26 12:36:28 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New build procedure: a single library, libpython1.5.a, is now built,
|
|
|
|
which contains absolutely everything except for a one-line main()
|
|
|
|
program (which calls Py_Main(argc, argv) to start the interpreter
|
|
|
|
shell). This makes life much simpler for applications that need to
|
|
|
|
embed Python. The serial number of the build is now included in the
|
|
|
|
version string (sys.version).
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- As far as I can tell, neither gcc -Wall nor the Microsoft compiler
|
|
|
|
emits a single warning any more when compiling Python.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A number of new Makefile variables have been added for special
|
|
|
|
situations, e.g. LDLAST is appended to the link command. These are
|
|
|
|
used by editing the Makefile or passing them on the make command
|
|
|
|
line.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A set of patches from Lee Busby has been integrated that make it
|
|
|
|
possible to catch floating point exceptions. Use the configure option
|
|
|
|
--with-fpectl to enable the patches; the extension modules fpectl and
|
|
|
|
fpetest provide control to enable/disable and test the feature,
|
|
|
|
respectively.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The support for shared libraries under AIX is now simpler and more
|
|
|
|
robust. Thanks to Vladimir Marangozov for revamping his own patches!
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Modules/makesetup script now reads a file Setup.local as well as
|
|
|
|
a file Setup. Most changes to the Setup script can be done by editing
|
|
|
|
Setup.local instead, which makes it easier to carry a particular setup
|
|
|
|
over from one release to the next.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Modules/makesetup script now copies any "include" lines it
|
|
|
|
encounters verbatim into the output Makefile. It also recognizes .cxx
|
|
|
|
and .cpp as C++ source files.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The configure script is smarter about C compiler options; e.g. with
|
|
|
|
gcc it uses -O2 and -g when possible, and on some other platforms it
|
|
|
|
uses -Olimit 1500 to avoid a warning from the optimizer about the main
|
|
|
|
loop in ceval.c (which has more than 1000 basic blocks).
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The configure script now detects whether malloc(0) returns a NULL
|
|
|
|
pointer or a valid block (of length zero). This avoids the nonsense
|
|
|
|
of always adding one byte to all malloc() arguments on most platforms.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The configure script has a new option, --with-dec-threads, to enable
|
|
|
|
DEC threads on DEC Alpha platforms. Also, --with-threads is now an
|
|
|
|
alias for --with-thread (this was the Most Common Typo in configure
|
|
|
|
arguments).
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Many changes in Doc/Makefile; amongst others, latex2html is now used
|
|
|
|
to generate HTML from all latex documents.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Change to the Python/C API
|
|
|
|
--------------------------
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Because some interfaces have changed, the PYTHON_API macro has been
|
|
|
|
bumped. Most extensions built for the old API version will still run,
|
|
|
|
but I can't guarantee this. Python prints a warning message on
|
|
|
|
version mismatches; it dumps core when the version mismatch causes a
|
|
|
|
serious problem :-)
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- I've completed the Grand Renaming, with the help of Roger Masse and
|
|
|
|
Barry Warsaw. This makes reading or debugging the code much easier.
|
|
|
|
Many other unrelated code reorganizations have also been carried out.
|
|
|
|
The allobjects.h header file is gone; instead, you would have to
|
|
|
|
include Python.h followed by rename2.h. But you're better off running
|
|
|
|
Tools/scripts/fixcid.py -s Misc/RENAME on your source, so you can omit
|
|
|
|
the rename2.h; it will disappear in the next release.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Various and sundry small bugs in the "abstract" interfaces have been
|
|
|
|
fixed. Thanks to all the (involuntary) testers of the Python 1.4
|
|
|
|
version! Some new functions have been added, e.g. PySequence_List(o),
|
|
|
|
equivalent to list(o) in Python.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New API functions PyLong_FromUnsignedLong() and
|
|
|
|
PyLong_AsUnsignedLong().
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The API functions in the file cgensupport.c are no longer
|
|
|
|
supported. This file has been moved to Modules and is only ever
|
|
|
|
compiled when the SGI specific 'gl' module is built.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- PyObject_Compare() can now raise an exception. Check with
|
|
|
|
PyErr_Occurred(). The comparison function in an object type may also
|
|
|
|
raise an exception.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The slice interface uses an upper bound of INT_MAX when no explicit
|
|
|
|
upper bound is given (e.x. for a[1:]). It used to ask the object for
|
|
|
|
its length and do the calculations.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Support for multiple independent interpreters. See Doc/api.tex,
|
|
|
|
functions Py_NewInterpreter() and Py_EndInterpreter(). Since the
|
|
|
|
documentation is incomplete, also see the new Demo/pysvr example
|
|
|
|
(which shows how to use these in a threaded application) and the
|
|
|
|
source code.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There is now a Py_Finalize() function which "de-initializes"
|
|
|
|
Python. It is possible to completely restart the interpreter
|
|
|
|
repeatedly by calling Py_Finalize() followed by Py_Initialize(). A
|
|
|
|
change of functionality in Py_Initialize() means that it is now a
|
|
|
|
fatal error to call it while the interpreter is already initialized.
|
|
|
|
The old, half-hearted Py_Cleanup() routine is gone. Use of Py_Exit()
|
|
|
|
is deprecated (it is nothing more than Py_Finalize() followed by
|
|
|
|
exit()).
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There are no known memory leaks left. While Py_Finalize() doesn't
|
|
|
|
free *all* allocated memory (some of it is hard to track down),
|
|
|
|
repeated calls to Py_Finalize() and Py_Initialize() do not create
|
|
|
|
unaccessible heap blocks.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There is now explicit per-thread state. (Inspired by, but not the
|
|
|
|
same as, Greg Stein's free threading patches.)
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There is now better support for threading C applications. There are
|
|
|
|
now explicit APIs to manipulate the interpreter lock. Read the source
|
|
|
|
or the Demo/pysvr example; the new functions are
|
|
|
|
PyEval_{Acquire,Release}{Lock,Thread}().
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The test macro DEBUG has changed to Py_DEBUG, to avoid interference
|
|
|
|
with other libraries' DEBUG macros. Likewise for any other test
|
|
|
|
macros that didn't yet start with Py_.
|
|
|
|
|
|
|
|
- New wrappers around malloc() and friends: Py_Malloc() etc. call
|
|
|
|
malloc() and call PyErr_NoMemory() when it fails; PyMem_Malloc() call
|
|
|
|
just malloc(). Use of these wrappers could be essential if multiple
|
|
|
|
memory allocators exist (e.g. when using certain DLL setups under
|
|
|
|
Windows). (Idea by Jim Fulton.)
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New C API PyImport_Import() which uses whatever __import__() hook
|
|
|
|
that is installed for the current execution environment. By Jim
|
|
|
|
Fulton.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- It is now possible for an extension module's init function to fail
|
|
|
|
non-fatally, by calling one of the PyErr_* functions and returning.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The PyInt_AS_LONG() and PyFloat_AS_DOUBLE() macros now cast their
|
|
|
|
argument to the proper type, like the similar PyString macros already
|
|
|
|
did. (Suggestion by Marc-Andre Lemburg.) Similar for PyList_GET_SIZE
|
|
|
|
and PyList_GET_ITEM.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Some of the Py_Get* function, like Py_GetVersion() (but not yet
|
|
|
|
Py_GetPath()) are now declared as returning a const char *. (More
|
|
|
|
should follow.)
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Changed the run-time library to check for exceptions after object
|
|
|
|
comparisons. PyObject_Compare() can now return an exception; use
|
|
|
|
PyErr_Occurred() to check (there is *no* special return value).
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- PyFile_WriteString() and Py_Flushline() now return error indicators
|
|
|
|
instead of clearing exceptions. This fixes an obscure bug where using
|
|
|
|
these would clear a pending exception, discovered by Just van Rossum.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There's a new function, PyArg_ParseTupleAndKeywords(), which parses
|
|
|
|
an argument list including keyword arguments. Contributed by Geoff
|
|
|
|
Philbrick.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- PyArg_GetInt() is gone.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- It's no longer necessary to include graminit.h when calling one of
|
|
|
|
the extended parser API functions. The three public grammar start
|
|
|
|
symbols are now in Python.h as Py_single_input, Py_file_input, and
|
|
|
|
Py_eval_input.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The CObject interface has a new function,
|
|
|
|
PyCObject_Import(module, name). It calls PyCObject_AsVoidPtr()
|
|
|
|
on the object referenced by "module.name".
|
1997-12-11 16:35:47 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Tkinter
|
|
|
|
-------
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- On popular demand, _tkinter once again installs a hook for readline
|
|
|
|
that processes certain Tk events while waiting for the user to type
|
|
|
|
(using PyOS_InputHook).
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A patch by Craig McPheeters plugs the most obnoxious memory leaks,
|
|
|
|
caused by command definitions referencing widget objects beyond their
|
|
|
|
lifetime.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New standard dialog modules: tkColorChooser.py, tkCommonDialog.py,
|
|
|
|
tkMessageBox.py, tkFileDialog.py, tkSimpleDialog.py These interface
|
|
|
|
with the new Tk dialog scripts, and provide more "native platform"
|
|
|
|
style file selection dialog boxes on some platforms. Contributed by
|
|
|
|
Fredrik Lundh.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Tkinter.py: when the first Tk object is destroyed, it sets the
|
|
|
|
hiddel global _default_root to None, so that when another Tk object is
|
|
|
|
created it becomes the new default root. Other miscellaneous
|
|
|
|
changes and fixes.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The Image class now has a configure method.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Added a bunch of new winfo options to Tkinter.py; we should now be
|
|
|
|
up to date with Tk 4.2. The new winfo options supported are:
|
|
|
|
mananger, pointerx, pointerxy, pointery, server, viewable, visualid,
|
|
|
|
visualsavailable.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The broken bind() method on Canvas objects defined in the Canvas.py
|
|
|
|
module has been fixed. The CanvasItem and Group classes now also have
|
|
|
|
an unbind() method.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The problem with Tkinter.py falling back to trying to import
|
|
|
|
"tkinter" when "_tkinter" is not found has been fixed -- it no longer
|
|
|
|
tries "tkinter", ever. This makes diagnosing the problem "_tkinter
|
|
|
|
not configured" much easier and will hopefully reduce the newsgroup
|
|
|
|
traffic on this topic.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The ScrolledText module once again supports the 'cnf' parameter, to
|
|
|
|
be compatible with the examples in Mark Lutz' book (I know, I know,
|
|
|
|
too late...)
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The _tkinter.c extension module has been revamped. It now support
|
|
|
|
Tk versions 4.1 through 8.0; support for 4.0 has been dropped. It
|
|
|
|
works well under Windows and Mac (with the latest Tk ports to those
|
|
|
|
platforms). It also supports threading -- it is safe for one
|
|
|
|
(Python-created) thread to be blocked in _tkinter.mainloop() while
|
|
|
|
other threads modify widgets. To make the changes visible, those
|
|
|
|
threads must use update_idletasks()method. (The patch for threading
|
|
|
|
in 1.5a3 was broken; in 1.5a4, it is back in a different version,
|
|
|
|
which requires access to the Tcl sources to get it to work -- hence it
|
|
|
|
is disabled by default.)
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A bug in _tkinter.c has been fixed, where Split() with a string
|
|
|
|
containing an unmatched '"' could cause an exception or core dump.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Unfortunately, on Windows and Mac, Tk 8.0 no longer supports
|
|
|
|
CreateFileHandler, so _tkinter.createfilehandler is not available on
|
|
|
|
those platforms when using Tk 8.0 or later. I will have to rethink
|
|
|
|
how to interface with Tcl's lower-level event mechanism, or with its
|
|
|
|
channels (which are like Python's file-like objects). Jack Jansen has
|
|
|
|
provided a fix for the Mac, so createfilehandler *is* actually
|
|
|
|
supported there; maybe I can adapt his fix for Windows.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Tools and Demos
|
|
|
|
---------------
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- A new regression test suite is provided, which tests most of the
|
|
|
|
standard and built-in modules. The regression test is run by invoking
|
|
|
|
the script Lib/test/regrtest.py. Barry Warsaw wrote the test harnass;
|
|
|
|
he and Roger Masse contributed most of the new tests.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New tool: faqwiz -- the CGI script that is used to maintain the
|
|
|
|
Python FAQ (http://grail.cnri.reston.va.us/cgi-bin/faqw.py). In
|
|
|
|
Tools/faqwiz.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New tool: webchecker -- a simple extensible web robot that, when
|
|
|
|
aimed at a web server, checks that server for dead links. Available
|
|
|
|
are a command line utility as well as a Tkinter based GUI version. In
|
|
|
|
Tools/webchecker. A simplified version of this program is dissected
|
|
|
|
in my article in O'Reilly's WWW Journal, the issue on Scripting
|
|
|
|
Languages (Vol 2, No 2); Scripting the Web with Python (pp 97-120).
|
|
|
|
Includes a parser for robots.txt files by Skip Montanaro.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New small tools: cvsfiles.py (prints a list of all files under CVS
|
|
|
|
n a particular directory tree), treesync.py (a rather Guido-specific
|
|
|
|
script to synchronize two source trees, one on Windows NT, the other
|
|
|
|
one on Unix under CVS but accessible from the NT box), and logmerge.py
|
|
|
|
(sort a collection of RCS or CVS logs by date). In Tools/scripts.
|
1997-12-11 16:35:47 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The freeze script now also works under Windows (NT). Another
|
|
|
|
feature allows the -p option to be pointed at the Python source tree
|
|
|
|
instead of the installation prefix. This was loosely based on part of
|
|
|
|
xfreeze by Sam Rushing and Bill Tutt.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New examples (Demo/extend) that show how to use the generic
|
|
|
|
extension makefile (Misc/Makefile.pre.in).
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Tools/scripts/h2py.py now supports C++ comments.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Tools/scripts/pystone.py script is upgraded to version 1.1; there
|
|
|
|
was a bug in version 1.0 (distributed with Python 1.4) that leaked
|
|
|
|
memory. Also, in 1.1, the LOOPS variable is incremented to 10000.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Demo/classes/Rat.py completely rewritten by Sjoerd Mullender.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Windows (NT and 95)
|
|
|
|
-------------------
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- New project files for Developer Studio (Visual C++) 5.0 for Windows
|
|
|
|
NT (the old VC++ 4.2 Makefile is also still supported, but will
|
|
|
|
eventually be withdrawn due to its bulkiness).
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- See the note on the new module search path in the "Miscellaneous" section
|
|
|
|
above.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Support for Win32s (the 32-bit Windows API under Windows 3.1) is
|
|
|
|
basically withdrawn. If it still works for you, you're lucky.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- There's a new extension module, msvcrt.c, which provides various
|
|
|
|
low-level operations defined in the Microsoft Visual C++ Runtime Library.
|
|
|
|
These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and
|
|
|
|
console I/O functions like kbhit(), getch() and putch().
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The -u option not only sets the standard I/O streams to unbuffered
|
|
|
|
status, but also sets them in binary mode. (This can also be done
|
|
|
|
using msvcrt.setmode(), by the way.)
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The, sys.prefix and sys.exec_prefix variables point to the directory
|
|
|
|
where Python is installed, or to the top of the source tree, if it was run
|
|
|
|
from there.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The various os.path modules (posixpath, ntpath, macpath) now support
|
|
|
|
passing more than two arguments to the join() function, so
|
|
|
|
os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b,
|
|
|
|
c)).
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The ntpath module (normally used as os.path) supports ~ to $HOME
|
|
|
|
expansion in expanduser().
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The freeze tool now works on Windows.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- See also the Tkinter category for a sad note on
|
|
|
|
_tkinter.createfilehandler().
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The truncate() method for file objects now works on Windows.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Py_Initialize() is no longer called when the DLL is loaded. You
|
|
|
|
must call it yourself.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- The time module's clock() function now has good precision through
|
|
|
|
the use of the Win32 API QueryPerformanceCounter().
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- Mark Hammond will release Python 1.5 versions of PythonWin and his
|
|
|
|
other Windows specific code: the win32api extensions, COM/ActiveX
|
|
|
|
support, and the MFC interface.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
Mac
|
|
|
|
---
|
1997-12-30 20:04:35 -04:00
|
|
|
|
1998-04-10 17:06:21 -03:00
|
|
|
- As always, the Macintosh port will be done by Jack Jansen. He will
|
|
|
|
make a separate announcement for the Mac specific source code and the
|
|
|
|
binary distribution(s) when these are ready.
|
1997-12-30 20:04:35 -04:00
|
|
|
|
|
|
|
|
1997-12-11 16:35:47 -04:00
|
|
|
======================================================================
|