home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / Python2 / Python20_source / Misc / HISTORY < prev    next >
Encoding:
Text File  |  2000-10-25  |  305.2 KB  |  8,195 lines

  1. Python History
  2. --------------
  3.  
  4. This file contains the release messages for previous Python releases.
  5. As you read on you go back to the dark ages of Python's history.
  6.  
  7.  
  8. ======================================================================
  9.  
  10.  
  11. =======================================
  12. ==> Release 1.6 (September 5, 2000) <==
  13. =======================================
  14.  
  15. What's new in release 1.6?
  16. ==========================
  17.  
  18. Below is a list of all relevant changes since release 1.5.2.
  19.  
  20.  
  21. Source Incompatibilities
  22. ------------------------
  23.  
  24. Several small incompatible library changes may trip you up:
  25.  
  26.   - The append() method for lists can no longer be invoked with more
  27.   than one argument.  This used to append a single tuple made out of
  28.   all arguments, but was undocumented.  To append a tuple, use
  29.   e.g. l.append((a, b, c)).
  30.  
  31.   - The connect(), connect_ex() and bind() methods for sockets require
  32.   exactly one argument.  Previously, you could call s.connect(host,
  33.   port), but this was undocumented. You must now write
  34.   s.connect((host, port)).
  35.  
  36.   - The str() and repr() functions are now different more often.  For
  37.   long integers, str() no longer appends a 'L'.  Thus, str(1L) == '1',
  38.   which used to be '1L'; repr(1L) is unchanged and still returns '1L'.
  39.   For floats, repr() now gives 17 digits of precision, to ensure no
  40.   precision is lost (on all current hardware).
  41.  
  42.   - The -X option is gone.  Built-in exceptions are now always
  43.   classes.  Many more library modules also have been converted to
  44.   class-based exceptions.
  45.  
  46.  
  47. Binary Incompatibilities
  48. ------------------------
  49.  
  50. - Third party extensions built for Python 1.5.x cannot be used with
  51. Python 1.6; these extensions will have to be rebuilt for Python 1.6.
  52.  
  53. - On Windows, attempting to import a third party extension built for
  54. Python 1.5.x results in an immediate crash; there's not much we can do
  55. about this.  Check your PYTHONPATH environment variable!
  56.  
  57.  
  58. Overview of Changes since 1.5.2
  59. -------------------------------
  60.  
  61. For this overview, I have borrowed from the document "What's New in
  62. Python 2.0" by Andrew Kuchling and Moshe Zadka:
  63. http://starship.python.net/crew/amk/python/writing/new-python/.
  64.  
  65. There are lots of new modules and lots of bugs have been fixed.  A
  66. list of all new modules is included below.
  67.  
  68. Probably the most pervasive change is the addition of Unicode support.
  69. We've added a new fundamental datatype, the Unicode string, a new
  70. build-in function unicode(), an numerous C APIs to deal with Unicode
  71. and encodings.  See the file Misc/unicode.txt for details, or
  72. http://starship.python.net/crew/lemburg/unicode-proposal.txt.
  73.  
  74. Two other big changes, related to the Unicode support, are the
  75. addition of string methods and (yet another) new regular expression
  76. engine.
  77.  
  78.   - String methods mean that you can now say s.lower() etc. instead of
  79.   importing the string module and saying string.lower(s) etc.  One
  80.   peculiarity is that the equivalent of string.join(sequence,
  81.   delimiter) is delimiter.join(sequence).  Use " ".join(sequence) for
  82.   the effect of string.join(sequence); to make this more readable, try
  83.   space=" " first.  Note that the maxsplit argument defaults in
  84.   split() and replace() have changed from 0 to -1.
  85.  
  86.   - The new regular expression engine, SRE by Fredrik Lundh, is fully
  87.   backwards compatible with the old engine, and is in fact invoked
  88.   using the same interface (the "re" module).  You can explicitly
  89.   invoke the old engine by import pre, or the SRE engine by importing
  90.   sre.  SRE is faster than pre, and supports Unicode (which was the
  91.   main reason to put effort in yet another new regular expression
  92.   engine -- this is at least the fourth!).
  93.  
  94.  
  95. Other Changes
  96. -------------
  97.  
  98. Other changes that won't break code but are nice to know about:
  99.  
  100. Deleting objects is now safe even for deeply nested data structures.
  101.  
  102. Long/int unifications: long integers can be used in seek() calls, as
  103. slice indexes.
  104.  
  105. String formatting (s % args) has a new formatting option, '%r', which
  106. acts like '%s' but inserts repr(arg) instead of str(arg). (Not yet in
  107. alpha 1.)
  108.  
  109. Greg Ward's "distutils" package is included: this will make
  110. installing, building and distributing third party packages much
  111. simpler.
  112.  
  113. There's now special syntax that you can use instead of the apply()
  114. function.  f(*args, **kwds) is equivalent to apply(f, args, kwds).
  115. You can also use variations f(a1, a2, *args, **kwds) and you can leave
  116. one or the other out: f(*args), f(**kwds).
  117.  
  118. The built-ins int() and long() take an optional second argument to
  119. indicate the conversion base -- of course only if the first argument
  120. is a string.  This makes string.atoi() and string.atol() obsolete.
  121. (string.atof() was already obsolete).
  122.  
  123. When a local variable is known to the compiler but undefined when
  124. used, a new exception UnboundLocalError is raised.  This is a class
  125. derived from NameError so code catching NameError should still work.
  126. The purpose is to provide better diagnostics in the following example:
  127.   x = 1
  128.   def f():
  129.       print x
  130.       x = x+1
  131. This used to raise a NameError on the print statement, which confused
  132. even experienced Python programmers (especially if there are several
  133. hundreds of lines of code between the reference and the assignment to
  134. x :-).
  135.  
  136. You can now override the 'in' operator by defining a __contains__
  137. method.  Note that it has its arguments backwards: x in a causes
  138. a.__contains__(x) to be called.  That's why the name isn't __in__.
  139.  
  140. The exception AttributeError will have a more friendly error message,
  141. e.g.: <code>'Spam' instance has no attribute 'eggs'</code>.  This may
  142. <b>break code</b> that expects the message to be exactly the attribute
  143. name.
  144.  
  145.  
  146. New Modules in 1.6
  147. ------------------
  148.  
  149. UserString - base class for deriving from the string type.
  150.  
  151. distutils - tools for distributing Python modules.
  152.  
  153. robotparser - parse a robots.txt file, for writing web spiders.
  154. (Moved from Tools/webchecker/.)
  155.  
  156. linuxaudiodev - audio for Linux.
  157.  
  158. mmap - treat a file as a memory buffer.  (Windows and Unix.)
  159.  
  160. sre - regular expressions (fast, supports unicode).  Currently, this
  161. code is very rough.  Eventually, the re module will be reimplemented
  162. using sre (without changes to the re API).
  163.  
  164. filecmp - supersedes the old cmp.py and dircmp.py modules.
  165.  
  166. tabnanny - check Python sources for tab-width dependance.  (Moved from
  167. Tools/scripts/.)
  168.  
  169. urllib2 - new and improved but incompatible version of urllib (still
  170. experimental).
  171.  
  172. zipfile - read and write zip archives.
  173.  
  174. codecs - support for Unicode encoders/decoders.
  175.  
  176. unicodedata - provides access to the Unicode 3.0 database.
  177.  
  178. _winreg - Windows registry access.
  179.  
  180. encodings - package which provides a large set of standard codecs --
  181. currently only for the new Unicode support. It has a drop-in extension
  182. mechanism which allows you to add new codecs by simply copying them
  183. into the encodings package directory. Asian codec support will
  184. probably be made available as separate distribution package built upon
  185. this technique and the new distutils package.
  186.  
  187.  
  188. Changed Modules
  189. ---------------
  190.  
  191. readline, ConfigParser, cgi, calendar, posix, readline, xmllib, aifc,
  192. chunk, wave, random, shelve, nntplib - minor enhancements.
  193.  
  194. socket, httplib, urllib - optional OpenSSL support (Unix only).
  195.  
  196. _tkinter - support for 8.0 up to 8.3.  Support for versions older than
  197. 8.0 has been dropped.
  198.  
  199. string - most of this module is deprecated now that strings have
  200. methods.  This no longer uses the built-in strop module, but takes
  201. advantage of the new string methods to provide transparent support for
  202. both Unicode and ordinary strings.
  203.  
  204.  
  205. Changes on Windows
  206. ------------------
  207.  
  208. The installer no longer runs a separate Tcl/Tk installer; instead, it
  209. installs the needed Tcl/Tk files directly in the Python directory.  If
  210. you already have a Tcl/Tk installation, this wastes some disk space
  211. (about 4 Megs) but avoids problems with conflincting Tcl/Tk
  212. installations, and makes it much easier for Python to ensure that
  213. Tcl/Tk can find all its files.  Note: the alpha installers don't
  214. include the documentation.
  215.  
  216. The Windows installer now installs by default in \Python16\ on the
  217. default volume, instead of \Program Files\Python-1.6\.
  218.  
  219.  
  220. Changed Tools
  221. -------------
  222.  
  223. IDLE - complete overhaul.  See the <a href="../idle/">IDLE home
  224. page</a> for more information.  (Python 1.6 alpha 1 will come with
  225. IDLE 0.6.)
  226.  
  227. Tools/i18n/pygettext.py - Python equivalent of xgettext(1).  A message
  228. text extraction tool used for internationalizing applications written
  229. in Python.
  230.  
  231.  
  232. Obsolete Modules
  233. ----------------
  234.  
  235. stdwin and everything that uses it.  (Get Python 1.5.2 if you need
  236. it. :-)
  237.  
  238. soundex.  (Skip Montanaro has a version in Python but it won't be
  239. included in the Python release.)
  240.  
  241. cmp, cmpcache, dircmp.  (Replaced by filecmp.)
  242.  
  243. dump.  (Use pickle.)
  244.  
  245. find.  (Easily coded using os.walk().)
  246.  
  247. grep.  (Not very useful as a library module.)
  248.  
  249. packmail.  (No longer has any use.)
  250.  
  251. poly, zmod.  (These were poor examples at best.)
  252.  
  253. strop.  (No longer needed by the string module.)
  254.  
  255. util.  (This functionality was long ago built in elsewhere).
  256.  
  257. whatsound.  (Use sndhdr.)
  258.  
  259.  
  260. Detailed Changes from 1.6b1 to 1.6
  261. ----------------------------------
  262.  
  263. - Slight changes to the CNRI license.  A copyright notice has been
  264. added; the requirement to indicate the nature of modifications now
  265. applies when making a derivative work available "to others" instead of
  266. just "to the public"; the version and date are updated.  The new
  267. license has a new handle.
  268.  
  269. - Added the Tools/compiler package.  This is a project led by Jeremy
  270. Hylton to write the Python bytecode generator in Python.
  271.  
  272. - The function math.rint() is removed.
  273.  
  274. - In Python.h, "#define _GNU_SOURCE 1" was added.
  275.  
  276. - Version 0.9.1 of Greg Ward's distutils is included (instead of
  277. version 0.9).
  278.  
  279. - A new version of SRE is included.  It is more stable, and more
  280. compatible with the old RE module.  Non-matching ranges are indicated
  281. by -1, not None.  (The documentation said None, but the PRE
  282. implementation used -1; changing to None would break existing code.)
  283.  
  284. - The winreg module has been renamed to _winreg.  (There are plans for
  285. a higher-level API called winreg, but this has not yet materialized in
  286. a form that is acceptable to the experts.)
  287.  
  288. - The _locale module is enabled by default.
  289.  
  290. - Fixed the configuration line for the _curses module.
  291.  
  292. - A few crashes have been fixed, notably <file>.writelines() with a
  293. list containing non-string objects would crash, and there were
  294. situations where a lost SyntaxError could dump core.
  295.  
  296. - The <list>.extend() method now accepts an arbitrary sequence
  297. argument.
  298.  
  299. - If __str__() or __repr__() returns a Unicode object, this is
  300. converted to an 8-bit string.
  301.  
  302. - Unicode string comparisons is no longer aware of UTF-16
  303. encoding peculiarities; it's a straight 16-bit compare.
  304.  
  305. - The Windows installer now installs the LICENSE file and no longer
  306. registers the Python DLL version in the registry (this is no longer
  307. needed).  It now uses Tcl/Tk 8.3.2.
  308.  
  309. - A few portability problems have been fixed, in particular a
  310. compilation error involving socklen_t.
  311.  
  312. - The PC configuration is slightly friendlier to non-Microsoft
  313. compilers.
  314.  
  315.  
  316. ======================================================================
  317.  
  318.  
  319. ======================================
  320. ==> Release 1.5.2 (April 13, 1999) <==
  321. ======================================
  322.  
  323. From 1.5.2c1 to 1.5.2 (final)
  324. =============================
  325.  
  326. Tue Apr 13 15:44:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  327.  
  328.     * PCbuild/python15.wse: Bump version to 1.5.2 (final)
  329.  
  330.     * PCbuild/python15.dsp: Added shamodule.c
  331.  
  332.     * PC/config.c: Added sha module!
  333.  
  334.     * README, Include/patchlevel.h: Prepare for final release.
  335.  
  336.     * Misc/ACKS:
  337.     More (Cameron Laird is honorary; the others are 1.5.2c1 testers).
  338.  
  339.     * Python/thread_solaris.h:
  340.     While I can't really test this thoroughly, Pat Knight and the Solaris
  341.     man pages suggest that the proper thing to do is to add THR_NEW_LWP to
  342.     the flags on thr_create(), and that there really isn't a downside, so
  343.     I'll do that.
  344.  
  345.     * Misc/ACKS:
  346.     Bunch of new names who helped iron out the last wrinkles of 1.5.2.
  347.  
  348.     * PC/python_nt.rc:
  349.     Bump the myusterious M$ version number from 1,5,2,1 to 1,5,2,3.
  350.     (I can't even display this on NT, maybe Win/98 can?)
  351.  
  352.     * Lib/pstats.py:
  353.     Fix mysterious references to jprofile that were in the source since
  354.     its creation.  I'm assuming these were once valid references to "Jim
  355.     Roskind's profile"...
  356.  
  357.     * Lib/Attic/threading_api.py:
  358.     Removed; since long subsumed in Doc/lib/libthreading.tex
  359.  
  360.     * Modules/socketmodule.c:
  361.     Put back __osf__ support for gethostbyname_r(); the real bug was that
  362.     it was being used even without threads.  This of course might be an
  363.     all-platform problem so now we only use the _r variant when we are
  364.     using threads.
  365.  
  366. Mon Apr 12 22:51:20 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  367.  
  368.     * Modules/cPickle.c:
  369.     Fix accidentally reversed NULL test in load_mark().  Suggested by
  370.     Tamito Kajiyama.  (This caused a bug only on platforms where malloc(0)
  371.     returns NULL.)
  372.  
  373.     * README:
  374.     Add note about popen2 problem on Linux noticed by Pablo Bleyer.
  375.  
  376.     * README: Add note about -D_REENTRANT for HP-UX 10.20.
  377.  
  378.     * Modules/Makefile.pre.in: 'clean' target should remove hassignal.
  379.  
  380.     * PC/Attic/vc40.mak, PC/readme.txt:
  381.     Remove all VC++ info (except VC 1.5) from readme.txt;
  382.     remove the VC++ 4.0 project file; remove the unused _tkinter extern defs.
  383.  
  384.     * README: Clarify PC build instructions (point to PCbuild).
  385.  
  386.     * Modules/zlibmodule.c: Cast added by Jack Jansen (for Mac port).
  387.  
  388.     * Lib/plat-sunos5/CDIO.py, Lib/plat-linux2/CDROM.py:
  389.     Forgot to add this file.  CDROM device parameters.
  390.  
  391.     * Lib/gzip.py: Two different changes.
  392.  
  393.     1. Jack Jansen reports that on the Mac, the time may be negative, and
  394.     solves this by adding a write32u() function that writes an unsigned
  395.     long.
  396.  
  397.     2. On 64-bit platforms the CRC comparison fails; I've fixed this by
  398.     casting both values to be compared to "unsigned long" i.e. modulo
  399.     0x100000000L.
  400.  
  401. Sat Apr 10 18:42:02 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  402.  
  403.     * PC/Attic/_tkinter.def: No longer needed.
  404.  
  405.     * Misc/ACKS: Correct missed character in Andrew Dalke's name.
  406.  
  407.     * README: Add DEC Ultrix notes (from Donn Cave's email).
  408.  
  409.     * configure: The usual
  410.  
  411.     * configure.in:
  412.     Quote a bunch of shell variables used in test, related to long-long.
  413.  
  414.     * Objects/fileobject.c, Modules/shamodule.c, Modules/regexpr.c:
  415.     casts for picky compilers.
  416.  
  417.     * Modules/socketmodule.c:
  418.     3-arg gethostbyname_r doesn't really work on OSF/1.
  419.  
  420.     * PC/vc15_w31/_.c, PC/vc15_lib/_.c, Tools/pynche/__init__.py:
  421.     Avoid totally empty files.
  422.  
  423. Fri Apr  9 14:56:35 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  424.  
  425.     * Tools/scripts/fixps.py: Use re instead of regex.
  426.     Don't rewrite the file in place.
  427.     (Reported by Andy Dustman.)
  428.  
  429.     * Lib/netrc.py, Lib/shlex.py: Get rid of #! line
  430.  
  431. Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  432.  
  433.     * PCbuild/python15.wse: Use the Tcl 8.0.5 installer.
  434.     Add a variable %_TCL_% that makes it easier to switch to a different version.
  435.  
  436.  
  437. ======================================================================
  438.  
  439.  
  440. From 1.5.2b2 to 1.5.2c1
  441. =======================
  442.  
  443. Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  444.  
  445.     * PCbuild/python15.wse:
  446.     Release 1.5.2c1.  Add IDLE and Uninstall to program group.
  447.     Don't distribute zlib.dll.  Tweak some comments.
  448.  
  449.     * PCbuild/zlib.dsp: Now using static zlib 1.1.3
  450.  
  451.     * Lib/dos-8x3/userdict.py, Lib/dos-8x3/userlist.py, Lib/dos-8x3/test_zli.py, Lib/dos-8x3/test_use.py, Lib/dos-8x3/test_pop.py, Lib/dos-8x3/test_pic.py, Lib/dos-8x3/test_ntp.py, Lib/dos-8x3/test_gzi.py, Lib/dos-8x3/test_fcn.py, Lib/dos-8x3/test_cpi.py, Lib/dos-8x3/test_bsd.py, Lib/dos-8x3/posixfil.py, Lib/dos-8x3/mimetype.py, Lib/dos-8x3/nturl2pa.py, Lib/dos-8x3/compilea.py, Lib/dos-8x3/exceptio.py, Lib/dos-8x3/basehttp.py:
  452.     The usual
  453.  
  454.     * Include/patchlevel.h: Release 1.5.2c1
  455.  
  456.     * README: Release 1.5.2c1.
  457.  
  458.     * Misc/NEWS: News for the 1.5.2c1 release.
  459.  
  460.     * Lib/test/test_strftime.py:
  461.     On Windows, we suddenly find, strftime() may return "" for an
  462.     unsupported format string.  (I guess this is because the logic for
  463.     deciding whether to reallocate the buffer or not has been improved.)
  464.     This caused the test code to crash on result[0].  Fix this by assuming
  465.     an empty result also means the format is not supported.
  466.  
  467.     * Demo/tkinter/matt/window-creation-w-location.py:
  468.     This demo imported some private code from Matt.  Make it cripple along.
  469.  
  470.     * Lib/lib-tk/Tkinter.py:
  471.     Delete an accidentally checked-in feature that actually broke more
  472.     than was worth it: when deleting a canvas item, it would try to
  473.     automatically delete the bindings for that item.  Since there's
  474.     nothing that says you can't reuse the tag and still have the bindings,
  475.     this is not correct.  Also, it broke at least one demo
  476.     (Demo/tkinter/matt/rubber-band-box-demo-1.py).
  477.  
  478.     * Python/thread_wince.h: Win/CE thread support by Mark Hammond.
  479.  
  480. Wed Apr  7 20:23:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  481.  
  482.     * Modules/zlibmodule.c:
  483.     Patch by Andrew Kuchling to unflush() (flush() for deflating).
  484.     Without this, if inflate() returned Z_BUF_ERROR asking for more output
  485.     space, we would report the error; now, we increase the buffer size and
  486.     try again, just as for Z_OK.
  487.  
  488.     * Lib/test/test_gzip.py: Use binary mode for all gzip files we open.
  489.  
  490.     * Tools/idle/ChangeLog: New change log.
  491.  
  492.     * Tools/idle/README.txt, Tools/idle/NEWS.txt: New version.
  493.  
  494.     * Python/pythonrun.c:
  495.     Alas, get rid of the Win specific hack to ask the user to press Return
  496.     before exiting when an error happened.  This didn't work right when
  497.     Python is invoked from a daemon.
  498.  
  499.     * Tools/idle/idlever.py: Version bump awaiting impending new release.
  500.     (Not much has changed :-( )
  501.  
  502.     * Lib/lib-tk/Tkinter.py:
  503.     lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,
  504.     so the preferred name for them is tag_lower, tag_raise
  505.     (similar to tag_bind, and similar to the Text widget);
  506.     unfortunately can't delete the old ones yet (maybe in 1.6)
  507.  
  508.     * Python/thread.c, Python/strtod.c, Python/mystrtoul.c, Python/import.c, Python/ceval.c:
  509.     Changes by Mark Hammond for Windows CE.  Mostly of the form
  510.       #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
  511.  
  512.     * Python/bltinmodule.c:
  513.     Remove unused variable from complex_from_string() code.
  514.  
  515.     * Include/patchlevel.h:
  516.     Add the possibility of a gamma release (release candidate).
  517.     Add '+' to string version number to indicate we're beyond b2 now.
  518.  
  519.     * Modules/posixmodule.c: Add extern decl for fsync() for SunOS 4.x.
  520.  
  521.     * Lib/smtplib.py: Changes by Per Cederquist and The Dragon.
  522.  
  523.     Per writes:
  524.  
  525.     """
  526.     The application where Signum Support uses smtplib needs to be able to
  527.     report good error messages to the user when sending email fails.  To
  528.     help in diagnosing problems it is useful to be able to report the
  529.     entire message sent by the server, not only the SMTP error code of the
  530.     offending command.
  531.  
  532.     A lot of the functions in sendmail.py unfortunately discards the
  533.     message, leaving only the code.  The enclosed patch fixes that
  534.     problem.
  535.  
  536.     The enclosed patch also introduces a base class for exceptions that
  537.     include an SMTP error code and error message, and make the code and
  538.     message available on separate attributes, so that surrounding code can
  539.     deal with them in whatever way it sees fit.  I've also added some
  540.     documentation to the exception classes.
  541.  
  542.     The constructor will now raise an exception if it cannot connect to
  543.     the SMTP server.
  544.  
  545.     The data() method will raise an SMTPDataError if it doesn't receive
  546.     the expected 354 code in the middle of the exchange.
  547.  
  548.     According to section 5.2.10 of RFC 1123 a smtp client must accept "any
  549.     text, including no text at all" after the error code.  If the response
  550.     of a HELO command contains no text self.helo_resp will be set to the
  551.     empty string ("").  The patch fixes the test in the sendmail() method
  552.     so that helo_resp is tested against None; if it has the empty string
  553.     as value the sendmail() method would invoke the helo() method again.
  554.  
  555.     The code no longer accepts a -1 reply from the ehlo() method in
  556.     sendmail().
  557.  
  558.     [Text about removing SMTPRecipientsRefused deleted --GvR]
  559.     """
  560.  
  561.     and also:
  562.  
  563.     """
  564.     smtplib.py appends an extra blank line to the outgoing mail if the
  565.     `msg' argument to the sendmail method already contains a trailing
  566.     newline.  This patch should fix the problem.
  567.     """
  568.  
  569.     The Dragon writes:
  570.  
  571.     """
  572.         Mostly I just re-added the SMTPRecipientsRefused exception
  573.     (the exeption object now has the appropriate info in it ) [Per had
  574.     removed this in his patch --GvR] and tweaked the behavior of the
  575.     sendmail method whence it throws the newly added SMTPHeloException (it
  576.     was closing the connection, which it shouldn't.  whatever catches the
  577.     exception should do that. )
  578.  
  579.         I pondered the change of the return values to tuples all around,
  580.     and after some thinking I decided that regularizing the return values was
  581.     too much of the Right Thing (tm) to not do.
  582.  
  583.         My one concern is that code expecting an integer & getting a tuple
  584.     may fail silently.
  585.  
  586.     (i.e. if it's doing :
  587.  
  588.           x.somemethod() >= 400:
  589.     expecting an integer, the expression will always be true if it gets a
  590.     tuple instead. )
  591.  
  592.         However, most smtplib code I've seen only really uses the
  593.     sendmail() method, so this wouldn't bother it.  Usually code I've seen
  594.     that calls the other methods usually only calls helo() and ehlo() for
  595.     doing ESMTP, a feature which was not in the smtplib included with 1.5.1,
  596.     and thus I would think not much code uses it yet.
  597.     """
  598.  
  599. Tue Apr  6 19:38:18 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  600.  
  601.     * Lib/test/test_ntpath.py:
  602.     Fix the tests now that splitdrive() no longer treats UNC paths special.
  603.     (Some tests converted to splitunc() tests.)
  604.  
  605.     * Lib/ntpath.py:
  606.     Withdraw the UNC support from splitdrive().  Instead, a new function
  607.     splitunc() parses UNC paths.  The contributor of the UNC parsing in
  608.     splitdrive() doesn't like it, but I haven't heard a good reason to
  609.     keep it, and it causes some problems.  (I think there's a
  610.     philosophical problem -- to me, the split*() functions are purely
  611.     syntactical, and the fact that \\foo is not a valid path doesn't mean
  612.     that it shouldn't be considered an absolute path.)
  613.  
  614.     Also (quite separately, but strangely related to the philosophical
  615.     issue above) fix abspath() so that if win32api exists, it doesn't fail
  616.     when the path doesn't actually exist -- if GetFullPathName() fails,
  617.     fall back on the old strategy (join with getcwd() if neccessary, and
  618.     then use normpath()).
  619.  
  620.     * configure.in, configure, config.h.in, acconfig.h:
  621.     For BeOS PowerPC.  Chris Herborth.
  622.  
  623. Mon Apr  5 21:54:14 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  624.  
  625.     * Modules/timemodule.c:
  626.     Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
  627.     #else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
  628.  
  629.     * Misc/ACKS:
  630.     Bunch of new contributors, including 9 who contributed to the Docs,
  631.     reported by Fred.
  632.  
  633. Mon Apr  5 18:37:59 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  634.  
  635.     * Lib/gzip.py:
  636.     Oops, missed mode parameter to open().
  637.  
  638.     * Lib/gzip.py:
  639.     Made the default mode 'rb' instead of 'r', for better cross-platform
  640.     support.  (Based on comment on the documentation by Bernhard Reiter
  641.     <bernhard@csd.uwm.edu>).
  642.  
  643. Fri Apr  2 22:18:25 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  644.  
  645.     * Tools/scripts/dutree.py:
  646.     For reasons I dare not explain, this script should always execute
  647.     main() when imported (in other words, it is not usable as a module).
  648.  
  649. Thu Apr  1 15:32:30 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  650.  
  651.     * Lib/test/test_cpickle.py: Jonathan Giddy write:
  652.  
  653.     In test_cpickle.py, the module os got imported, but the line to remove
  654.     the temp file has gone missing.
  655.  
  656. Tue Mar 30 20:17:31 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  657.  
  658.     * Lib/BaseHTTPServer.py: Per Cederqvist writes:
  659.  
  660.     If you send something like "PUT / HTTP/1.0" to something derived from
  661.     BaseHTTPServer that doesn't define do_PUT, you will get a response
  662.     that begins like this:
  663.  
  664.         HTTP/1.0 501 Unsupported method ('do_PUT')
  665.         Server: SimpleHTTP/0.3 Python/1.5
  666.         Date: Tue, 30 Mar 1999 18:53:53 GMT
  667.  
  668.     The server should complain about 'PUT' instead of 'do_PUT'.  This
  669.     patch should fix the problem.
  670.  
  671. Mon Mar 29 20:33:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  672.  
  673.     * Lib/smtplib.py: Patch by Per Cederqvist, who writes:
  674.  
  675.     """
  676.      - It needlessly used the makefile() method for each response that is
  677.        read from the SMTP server.
  678.  
  679.      - If the remote SMTP server closes the connection unexpectedly the
  680.        code raised an IndexError.  It now raises an SMTPServerDisconnected
  681.        exception instead.
  682.  
  683.      - The code now checks that all lines in a multiline response actually
  684.        contains an error code.
  685.     """
  686.  
  687.     The Dragon approves.
  688.  
  689. Mon Mar 29 20:25:40 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  690.  
  691.     * Lib/compileall.py:
  692.     When run as a script, report failures in the exit code as well.
  693.     Patch largely based on changes by Andrew Dalke, as discussed in the
  694.     distutils-sig.
  695.  
  696. Mon Mar 29 20:23:41 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  697.  
  698.     * Lib/urllib.py:
  699.     Hack so that if a 302 or 301 redirect contains a relative URL, the
  700.     right thing "just happens" (basejoin() with old URL).
  701.  
  702.     * Modules/cPickle.c:
  703.     Protection against picling to/from closed (real) file.
  704.     The problem was reported by Moshe Zadka.
  705.  
  706.     * Lib/test/test_cpickle.py:
  707.     Test protection against picling to/from closed (real) file.
  708.  
  709.     * Modules/timemodule.c: Chris Lawrence writes:
  710.  
  711.     """
  712.     The GNU folks, in their infinite wisdom, have decided not to implement
  713.     altzone in libc6; this would not be horrible, except that timezone
  714.     (which is implemented) includes the current DST setting (i.e. timezone
  715.     for Central is 18000 in summer and 21600 in winter).  So Python's
  716.     timezone and altzone variables aren't set correctly during DST.
  717.  
  718.     Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
  719.     show the "right" thing on Linux (by using the tm_gmtoff stuff
  720.     available in BSD, which is how the GLIBC manual claims things should
  721.     be done) and (b) should cope with the southern hemisphere.  In pursuit
  722.     of (b), I also took the liberty of renaming the "summer" and "winter"
  723.     variables to "july" and "jan".  This patch should also make certain
  724.     time calculations on Linux actually work right (like the tz-aware
  725.     functions in the rfc822 module).
  726.  
  727.     (It's hard to find DST that's currently being used in the southern
  728.     hemisphere; I tested using Africa/Windhoek.)
  729.     """
  730.  
  731.     * Lib/test/output/test_gzip:
  732.     Jonathan Giddy discovered this file was missing.
  733.  
  734.     * Modules/shamodule.c:
  735.     Avoid warnings from AIX compiler.  Reported by Vladimir (AIX is my
  736.     middlename) Marangozov, patch coded by Greg Stein.
  737.  
  738.     * Tools/idle/ScriptBinding.py, Tools/idle/PyShell.py:
  739.     At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.
  740.  
  741. Sun Mar 28 17:55:32 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  742.  
  743.     * Tools/scripts/ndiff.py: Tim Peters writes:
  744.  
  745.     I should have waited overnight <wink/sigh>.  Nothing wrong with the one I
  746.     sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options
  747.     for recreating the original files from ndiff's output.  That's attached, if
  748.     you're game!  Us Windows guys don't usually have a sed sitting around
  749.     <wink>.
  750.  
  751. Sat Mar 27 13:34:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  752.  
  753.     * Tools/scripts/ndiff.py: Tim Peters writes:
  754.  
  755.     Attached is a cleaned-up version of ndiff (added useful module
  756.     docstring, now echo'ed in case of cmd line mistake); added -q option
  757.     to suppress initial file identification lines; + other minor cleanups,
  758.     & a slightly faster match engine.
  759.  
  760. Fri Mar 26 22:36:00 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  761.  
  762.     * Tools/scripts/dutree.py:
  763.     During display, if EPIPE is raised, it's probably because a pager was
  764.     killed.  Discard the error in that case, but propogate it otherwise.
  765.  
  766. Fri Mar 26 16:20:45 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  767.  
  768.     * Lib/test/output/test_userlist, Lib/test/test_userlist.py:
  769.     Test suite for UserList.
  770.  
  771.     * Lib/UserList.py: Use isinstance() where appropriate.
  772.     Reformatted with 4-space indent.
  773.  
  774. Fri Mar 26 16:11:40 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us>
  775.  
  776.     * Tools/pynche/PyncheWidget.py:
  777.     Helpwin.__init__(): The text widget should get focus.
  778.  
  779.     * Tools/pynche/pyColorChooser.py:
  780.     Removed unnecessary import `from PyncheWidget import PyncheWidget'
  781.  
  782. Fri Mar 26 15:32:05 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  783.  
  784.     * Lib/test/output/test_userdict, Lib/test/test_userdict.py:
  785.     Test suite for UserDict
  786.  
  787.     * Lib/UserDict.py: Improved a bunch of things.
  788.     The constructor now takes an optional dictionary.
  789.     Use isinstance() where appropriate.
  790.  
  791. Thu Mar 25 22:38:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  792.  
  793.     * Lib/test/output/test_pickle, Lib/test/output/test_cpickle, Lib/test/test_pickle.py, Lib/test/test_cpickle.py:
  794.     Basic regr tests for pickle/cPickle
  795.  
  796.     * Lib/pickle.py:
  797.     Don't use "exec" in find_class().  It's slow, unnecessary, and (as AMK
  798.     points out) it doesn't work in JPython Applets.
  799.  
  800. Thu Mar 25 21:50:27 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
  801.  
  802.     * Lib/test/test_gzip.py:
  803.     Added a simple test suite for gzip.  It simply opens a temp file,
  804.     writes a chunk of compressed data, closes it, writes another chunk, and
  805.     reads the contents back to verify that they are the same.
  806.  
  807.     * Lib/gzip.py:
  808.     Based on a suggestion from bruce@hams.com, make a trivial change to
  809.     allow using the 'a' flag as a mode for opening a GzipFile.  gzip
  810.     files, surprisingly enough, can be concatenated and then decompressed;
  811.     the effect is to concatenate the two chunks of data.
  812.  
  813.     If we support it on writing, it should also be supported on reading.
  814.     This *wasn't* trivial, and required rearranging the code in the
  815.     reading path, particularly the _read() method.
  816.  
  817.     Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file'
  818.     and 'Unknown compression method'
  819.  
  820. Thu Mar 25 21:25:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  821.  
  822.     * Lib/test/test_b1.py:
  823.     Add tests for float() and complex() with string args (Nick/Stephanie
  824.     Lockwood).
  825.  
  826. Thu Mar 25 21:21:08 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
  827.  
  828.     * Modules/zlibmodule.c:
  829.     Add an .unused_data attribute to decompressor objects.  If .unused_data
  830.     is not an empty string, this means that you have arrived at the
  831.     end of the stream of compressed data, and the contents of .unused_data are
  832.     whatever follows the compressed stream.
  833.  
  834. Thu Mar 25 21:16:07 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  835.  
  836.     * Python/bltinmodule.c:
  837.     Patch by Nick and Stephanie Lockwood to implement complex() with a string
  838.     argument.  This closes TODO item 2.19.
  839.  
  840. Wed Mar 24 19:09:00 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  841.  
  842.     * Tools/webchecker/wcnew.py: Added Samuel Bayer's new webchecker.
  843.     Unfortunately his code breaks wcgui.py in a way that's not easy
  844.     to fix.  I expect that this is a temporary situation --
  845.     eventually Sam's changes will be merged back in.
  846.     (The changes add a -t option to specify exceptions to the -x
  847.     option, and explicit checking for #foo style fragment ids.)
  848.  
  849.     * Objects/dictobject.c:
  850.     Vladimir Marangozov contributed updated comments.
  851.  
  852.     * Objects/bufferobject.c: Folded long lines.
  853.  
  854.     * Lib/test/output/test_sha, Lib/test/test_sha.py:
  855.     Added Jeremy's test code for the sha module.
  856.  
  857.     * Modules/shamodule.c, Modules/Setup.in:
  858.     Added Greg Stein and Andrew Kuchling's sha module.
  859.     Fix comments about zlib version and URL.
  860.  
  861.     * Lib/test/test_bsddb.py: Remove the temp file when we're done.
  862.  
  863.     * Include/pythread.h: Conform to standard boilerplate.
  864.  
  865.     * configure.in, configure, BeOS/linkmodule, BeOS/ar-fake:
  866.     Chris Herborth: the new compiler in R4.1 needs some new options to work...
  867.  
  868.     * Modules/socketmodule.c:
  869.     Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the
  870.     data struct before calling gethostby{name,addr}_r(); (2) ignore the
  871.     3/5/6 args determinations made by the configure script and switch on
  872.     platform identifiers instead:
  873.  
  874.     AIX, OSF have 3 args
  875.     Sun, SGI have 5 args
  876.     Linux has 6 args
  877.  
  878.     On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
  879.  
  880.     * Modules/socketmodule.c:
  881.     Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code.
  882.  
  883.     * Lib/mailbox.py:
  884.     Add readlines() to _Subfile class.  Not clear who would need it, but
  885.     Chris Lawrence sent me a broken version; this one is a tad simpler and
  886.     more conforming to the standard.
  887.  
  888. Tue Mar 23 23:05:34 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
  889.  
  890.     * Lib/gzip.py: use struct instead of bit-manipulate in Python
  891.  
  892. Tue Mar 23 19:00:55 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  893.  
  894.     * Modules/Makefile.pre.in:
  895.     Add $(EXE) to various occurrences of python so it will work on Cygwin
  896.     with egcs (after setting EXE=.exe).  Patch by Norman Vine.
  897.  
  898.     * configure, configure.in:
  899.     Ack!  It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
  900.  
  901. Mon Mar 22 22:25:39 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  902.  
  903.     * Include/thread.h:
  904.     Adding thread.h -- unused but for b/w compatibility.
  905.     As requested by Bill Janssen.
  906.  
  907.     * configure.in, configure:
  908.     Add code to test for all sorts of gethostbyname_r variants,
  909.     donated by David Arnold.
  910.  
  911.     * config.h.in, acconfig.h:
  912.     Add symbols for gethostbyname_r variants (sigh).
  913.  
  914.     * Modules/socketmodule.c: Clean up pass for the previous patches.
  915.  
  916.     - Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
  917.     glibc2.
  918.  
  919.     - If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
  920.     don't know what code should be used.
  921.  
  922.     - New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
  923.  
  924.     - Modify the gethostbyaddr() code to also hold on to the lock until
  925.     after it is safe to release, overlapping with the Python lock.
  926.  
  927.     (Note: I think that it could in theory be possible that Python code
  928.     executed while gethostbyname_lock is held could attempt to reacquire
  929.     the lock -- e.g. in a signal handler or destructor.  I will simply say
  930.     "don't do that then.")
  931.  
  932.     * Modules/socketmodule.c: Jonathan Giddy writes:
  933.  
  934.     Here's a patch to fix the race condition, which wasn't fixed by Rob's
  935.     patch.  It holds the gethostbyname lock until the results are copied out,
  936.     which means that this lock and the Python global lock are held at the same
  937.     time.  This shouldn't be a problem as long as the gethostbyname lock is
  938.     always acquired when the global lock is not held.
  939.  
  940. Mon Mar 22 19:25:30 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
  941.  
  942.     * Modules/zlibmodule.c:
  943.     Fixed the flush() method of compression objects; the test for
  944.         the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
  945.         Logic cleaned up and commented.
  946.  
  947.     * Lib/test/test_zlib.py:
  948.     Added simple test for the flush() method of compression objects, trying the
  949.         different flush values Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH.
  950.  
  951. Mon Mar 22 15:28:08 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  952.  
  953.     * Lib/shlex.py:
  954.     Bug reported by Tobias Thelen: missing "self." in assignment target.
  955.  
  956. Fri Mar 19 21:50:11 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  957.  
  958.     * Modules/arraymodule.c:
  959.     Use an unsigned cast to avoid a warning in VC++.
  960.  
  961.     * Lib/dospath.py, Lib/ntpath.py:
  962.     New code for split() by Tim Peters, behaves more like posixpath.split().
  963.  
  964.     * Objects/floatobject.c:
  965.     Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if
  966.     a block cannot be freed, add its free items back to the free list.
  967.     This is necessary to avoid leaking when Python is reinitialized later.
  968.  
  969.     * Objects/intobject.c:
  970.     Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if
  971.     a block cannot be freed, add its free items back to the free list, and
  972.     add its valid ints back to the small_ints array if they are in range.
  973.     This is necessary to avoid leaking when Python is reinitialized later.
  974.  
  975.     * Lib/types.py:
  976.     Added BufferType, the type returned by the new builtin buffer().  Greg Stein.
  977.  
  978.     * Python/bltinmodule.c:
  979.     New builtin buffer() creates a derived read-only buffer from any
  980.     object that supports the buffer interface (e.g. strings, arrays).
  981.  
  982.     * Objects/bufferobject.c:
  983.     Added check for negative offset for PyBuffer_FromObject and check for
  984.     negative size for PyBuffer_FromMemory.  Greg Stein.
  985.  
  986. Thu Mar 18 15:10:44 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  987.  
  988.     * Lib/urlparse.py: Sjoerd Mullender writes:
  989.  
  990.     If a filename on Windows starts with \\, it is converted to a URL
  991.     which starts with ////.  If this URL is passed to urlparse.urlparse
  992.     you get a path that starts with // (and an empty netloc).  If you pass
  993.     the result back to urlparse.urlunparse, you get a URL that starts with
  994.     //, which is parsed differently by urlparse.urlparse.  The fix is to
  995.     add the (empty) netloc with accompanying slashes if the path in
  996.     urlunparse starts with //.  Do this for all schemes that use a netloc.
  997.  
  998.     * Lib/nturl2path.py: Sjoerd Mullender writes:
  999.  
  1000.     Pathnames of files on other hosts in the same domain
  1001.     (\\host\path\to\file) are not translated correctly to URLs and back.
  1002.     The URL should be something like file:////host/path/to/file.
  1003.     Note that a combination of drive letter and remote host is not
  1004.     possible.
  1005.  
  1006. Wed Mar 17 22:30:10 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1007.  
  1008.     * Lib/urlparse.py:
  1009.     Delete non-standard-conforming code in urljoin() that would use the
  1010.     netloc from the base url as the default netloc for the resulting url
  1011.     even if the schemes differ.
  1012.  
  1013.     Once upon a time, when the web was wild, this was a valuable hack
  1014.     because some people had a URL referencing an ftp server colocated with
  1015.     an http server without having the host in the ftp URL (so they could
  1016.     replicate it or change the hostname easily).
  1017.  
  1018.     More recently, after the file: scheme got added back to the list of
  1019.     schemes that accept a netloc, it turns out that this caused weirdness
  1020.     when joining an http: URL with a file: URL -- the resulting file: URL
  1021.     would always inherit the host from the http: URL because the file:
  1022.     scheme supports a netloc but in practice never has one.
  1023.  
  1024.     There are two reasons to get rid of the old, once-valuable hack,
  1025.     instead of removing the file: scheme from the uses_netloc list.  One,
  1026.     the RFC says that file: uses the netloc syntax, and does not endorse
  1027.     the old hack.  Two, neither netscape 4.5 nor IE 4.0 support the old
  1028.     hack.
  1029.  
  1030.     * Include/ceval.h, Include/abstract.h:
  1031.     Add DLL level b/w compat for PySequence_In and PyEval_CallObject
  1032.  
  1033. Tue Mar 16 21:54:50 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1034.  
  1035.     * Lib/lib-tk/Tkinter.py: Bug reported by Jim Robinson:
  1036.  
  1037.     An attempt to execute grid_slaves with arguments (0,0) results in
  1038.     *all* of the slaves being returned, not just the slave associated with
  1039.     row 0, column 0.  This is because the test for arguments in the method
  1040.     does not test to see if row (and column) does not equal None, but
  1041.     rather just whether is evaluates to non-false.  A value of 0 fails
  1042.     this test.
  1043.  
  1044. Tue Mar 16 14:17:48 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1045.  
  1046.     * Modules/cmathmodule.c:
  1047.     Docstring fix:  acosh() returns the hyperbolic arccosine, not the
  1048.     hyperbolic cosine.  Problem report via David Ascher by one of his
  1049.     students.
  1050.  
  1051. Mon Mar 15 21:40:59 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1052.  
  1053.     * configure.in:
  1054.     Should test for gethost*by*name_r, not for gethostname_r (which
  1055.     doesn't exist and doesn't make sense).
  1056.  
  1057.     * Modules/socketmodule.c:
  1058.     Patch by Rob Riggs for Linux -- glibc2 has a different argument
  1059.     converntion for gethostbyname_r() etc. than Solaris!
  1060.  
  1061.     * Python/thread_pthread.h: Rob Riggs wrote:
  1062.  
  1063.     """
  1064.     Spec says that on success pthread_create returns 0. It does not say
  1065.     that an error code will be < 0. Linux glibc2 pthread_create() returns
  1066.     ENOMEM (12) when one exceed process limits. (It looks like it should
  1067.     return EAGAIN, but that's another story.)
  1068.  
  1069.     For reference, see:
  1070.     http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html
  1071.     """
  1072.  
  1073.     [I have a feeling that similar bugs were fixed before; perhaps someone
  1074.     could check that all error checks no check for != 0?]
  1075.  
  1076.     * Tools/bgen/bgen/bgenObjectDefinition.py:
  1077.     New mixin class that defines cmp and hash that use
  1078.     the ob_itself pointer.  This allows (when using the mixin)
  1079.     different Python objects pointing to the same C object and
  1080.     behaving well as dictionary keys.
  1081.  
  1082.     Or so sez Jack Jansen...
  1083.  
  1084.     * Lib/urllib.py: Yet another patch by Sjoerd Mullender:
  1085.  
  1086.     Don't convert URLs to URLs using pathname2url.
  1087.  
  1088. Fri Mar 12 22:15:43 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1089.  
  1090.     * Lib/cmd.py: Patch by Michael Scharf.  He writes:
  1091.  
  1092.         The module cmd requires for each do_xxx command a help_xxx
  1093.         function. I think this is a little old fashioned.
  1094.  
  1095.         Here is a patch: use the docstring as help if no help_xxx
  1096.         function can be found.
  1097.  
  1098.     [I'm tempted to rip out all the help_* functions from pdb, but I'll
  1099.     resist it.  Any takers?  --Guido]
  1100.  
  1101.     * Tools/freeze/freeze.py: Bug submitted by Wayne Knowles, who writes:
  1102.  
  1103.        Under Windows, python freeze.py -o hello hello.py
  1104.        creates all the correct files in the hello subdirectory, but the
  1105.        Makefile has the directory prefix in it for frozen_extensions.c
  1106.        nmake fails because it tries to locate hello/frozen_extensions.c
  1107.  
  1108.     (His fix adds a call to os.path.basename() in the appropriate place.)
  1109.  
  1110.     * Objects/floatobject.c, Objects/intobject.c:
  1111.     Vladimir has restructured his code somewhat so that the blocks are now
  1112.     represented by an explicit structure.  (There are still too many casts
  1113.     in the code, but that may be unavoidable.)
  1114.  
  1115.     Also added code so that with -vv it is very chatty about what it does.
  1116.  
  1117.     * Demo/zlib/zlibdemo.py, Demo/zlib/minigzip.py:
  1118.     Change #! line to modern usage; also chmod +x
  1119.  
  1120.     * Demo/pdist/rrcs, Demo/pdist/rcvs, Demo/pdist/rcsbump:
  1121.     Change #! line to modern usage
  1122.  
  1123.     * Lib/nturl2path.py, Lib/urllib.py: From: Sjoerd Mullender
  1124.  
  1125.     The filename to URL conversion didn't properly quote special
  1126.     characters.
  1127.     The URL to filename didn't properly unquote special chatacters.
  1128.  
  1129.     * Objects/floatobject.c:
  1130.     OK, try again.  Vladimir gave me a fix for the alignment bus error,
  1131.     so here's his patch again.  This time it works (at least on Solaris,
  1132.     Linux and Irix).
  1133.  
  1134. Thu Mar 11 23:21:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1135.  
  1136.     * Tools/idle/PathBrowser.py:
  1137.     Don't crash when sys.path contains an empty string.
  1138.  
  1139.     * Tools/idle/PathBrowser.py:
  1140.     - Don't crash in the case where a superclass is a string instead of a
  1141.     pyclbr.Class object; this can happen when the superclass is
  1142.     unrecognizable (to pyclbr), e.g. when module renaming is used.
  1143.  
  1144.     - Show a watch cursor when calling pyclbr (since it may take a while
  1145.     recursively parsing imported modules!).
  1146.  
  1147. Thu Mar 11 16:04:04 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1148.  
  1149.     * Lib/mimetypes.py:
  1150.     Added .rdf and .xsl as application/xml types.  (.rdf is for the
  1151.     Resource Description Framework, a metadata encoding, and .xsl is for
  1152.     the Extensible Stylesheet Language.)
  1153.  
  1154. Thu Mar 11 13:26:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1155.  
  1156.     * Lib/test/output/test_popen2, Lib/test/test_popen2.py:
  1157.     Test for popen2 module, by Chris Tismer.
  1158.  
  1159.     * Objects/floatobject.c:
  1160.     Alas, Vladimir's patch caused a bus error (probably double
  1161.     alignment?), and I didn't test it.  Withdrawing it for now.
  1162.  
  1163. Wed Mar 10 22:55:47 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1164.  
  1165.     * Objects/floatobject.c:
  1166.     Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
  1167.     floats on finalization.
  1168.  
  1169.     * Objects/intobject.c:
  1170.     Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
  1171.     integers on finalization.
  1172.  
  1173.     * Tools/idle/EditorWindow.py, Tools/idle/Bindings.py:
  1174.     Add PathBrowser to File module
  1175.  
  1176.     * Tools/idle/PathBrowser.py:
  1177.     "Path browser" - 4 scrolled lists displaying:
  1178.         directories on sys.path
  1179.         modules in selected directory
  1180.         classes in selected module
  1181.         methods of selected class
  1182.  
  1183.     Sinlge clicking in a directory, module or class item updates the next
  1184.     column with info about the selected item.  Double clicking in a
  1185.     module, class or method item opens the file (and selects the clicked
  1186.     item if it is a class or method).
  1187.  
  1188.     I guess eventually I should be using a tree widget for this, but the
  1189.     ones I've seen don't work well enough, so for now I use the old
  1190.     Smalltalk or NeXT style multi-column hierarchical browser.
  1191.  
  1192.     * Tools/idle/MultiScrolledLists.py:
  1193.     New utility: multiple scrolled lists in parallel
  1194.  
  1195.     * Tools/idle/ScrolledList.py: - White background.
  1196.     - Display "(None)" (or text of your choosing) when empty.
  1197.     - Don't set the focus.
  1198.  
  1199. Tue Mar  9 19:31:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1200.  
  1201.     * Lib/urllib.py:
  1202.     open_http also had the 'data is None' test backwards.  don't call with the
  1203.     extra argument if data is None.
  1204.  
  1205.     * Demo/embed/demo.c:
  1206.     Call Py_SetProgramName() instead of redefining getprogramname(),
  1207.     reflecting changes in the runtime around 1.5 or earlier.
  1208.  
  1209.     * Python/ceval.c:
  1210.     Always test for an error return (usually NULL or -1) without setting
  1211.     an exception.
  1212.  
  1213.     * Modules/timemodule.c: Patch by Chris Herborth for BeOS code.
  1214.     He writes:
  1215.  
  1216.     I had an off-by-1000 error in floatsleep(),
  1217.     and the problem with time.clock() is that it's not implemented properly
  1218.     on QNX... ANSI says it's supposed to return _CPU_ time used by the
  1219.     process, but on QNX it returns the amount of real time used... so I was
  1220.     confused.
  1221.  
  1222.     * Tools/bgen/bgen/macsupport.py: Small change by Jack Jansen.
  1223.     Test for self.returntype behaving like OSErr rather than being it.
  1224.  
  1225. Thu Feb 25 16:14:58 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
  1226.  
  1227.     * Lib/urllib.py:
  1228.     http_error had the 'data is None' test backwards.  don't call with the
  1229.     extra argument if data is None.
  1230.  
  1231.     * Lib/urllib.py: change indentation from 8 spaces to 4 spaces
  1232.  
  1233.     * Lib/urllib.py: pleasing the tabnanny
  1234.  
  1235. Thu Feb 25 14:26:02 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1236.  
  1237.     * Lib/colorsys.py:
  1238.     Oops, one more "x, y, z" to convert...
  1239.  
  1240.     * Lib/colorsys.py:
  1241.     Adjusted comment at the top to be less confusing, following Fredrik
  1242.     Lundh's example.
  1243.  
  1244.     Converted comment to docstring.
  1245.  
  1246. Wed Feb 24 18:49:15 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1247.  
  1248.     * Lib/toaiff.py:
  1249.     Use sndhdr instead of the obsolete whatsound module.
  1250.  
  1251. Wed Feb 24 18:42:38 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
  1252.  
  1253.     * Lib/urllib.py:
  1254.     When performing a POST request, i.e. when the second argument to
  1255.     urlopen is used to specify form data, make sure the second argument is
  1256.     threaded through all of the http_error_NNN calls.  This allows error
  1257.     handlers like the redirect and authorization handlers to properly
  1258.     re-start the connection.
  1259.  
  1260. Wed Feb 24 16:25:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1261.  
  1262.     * Lib/mhlib.py: Patch by Lars Wirzenius:
  1263.  
  1264.         o the initial comment is wrong: creating messages is already
  1265.           implemented
  1266.  
  1267.         o Message.getbodytext: if the mail or it's part contains an
  1268.           empty content-transfer-encoding header, the code used to
  1269.           break; the change below treats an empty encoding value the same
  1270.           as the other types that do not need decoding
  1271.  
  1272.         o SubMessage.getbodytext was missing the decode argument; the
  1273.           change below adds it; I also made it unconditionally return
  1274.           the raw text if decoding was not desired, because my own
  1275.           routines needed that (and it was easier than rewriting my
  1276.           own routines ;-)
  1277.  
  1278. Wed Feb 24 00:35:43 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us>
  1279.  
  1280.     * Python/bltinmodule.c (initerrors):
  1281.     Make sure that the exception tuples ("base-classes" when
  1282.     string-based exceptions are used) reflect the real class hierarchy,
  1283.     i.e. that SystemExit derives from Exception not StandardError.
  1284.  
  1285.     * Lib/exceptions.py:
  1286.     Document the correct class hierarchy for SystemExit.  It is not an
  1287.     error and so it derives from Exception and not SystemError.  The
  1288.     docstring was incorrect but the implementation was fine.
  1289.  
  1290. Tue Feb 23 23:07:51 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1291.  
  1292.     * Lib/shutil.py:
  1293.     Add import sys, needed by reference to sys.exc_info() in rmtree().
  1294.     Discovered by Mitch Chapman.
  1295.  
  1296.     * config.h.in:
  1297.     Now that we don't have AC_CHECK_LIB(m, pow), the HAVE_LIBM symbol
  1298.     disappears.  It wasn't used anywhere anyway...
  1299.  
  1300.     * Modules/arraymodule.c:
  1301.     Carefully check for overflow when allocating the memory for fromfile
  1302.     -- someone tried to pass in sys.maxint and got bitten by the bogus
  1303.     calculations.
  1304.  
  1305.     * configure.in:
  1306.     Get rid of AC_CHECK_LIB(m, pow) since this is taken care of later with
  1307.     LIBM (from --with-libm=...); this actually broke the customizability
  1308.     offered by the latter option.  Thanks go to Clay Spence for reporting
  1309.     this.
  1310.  
  1311.     * Lib/test/test_dl.py:
  1312.     1. Print the error message (carefully) when a dl.open() fails in verbose mode.
  1313.     2. When no test case worked, raise ImportError instead of failing.
  1314.  
  1315.     * Python/bltinmodule.c:
  1316.     Patch by Tim Peters to improve the range checks for range() and
  1317.     xrange(), especially for platforms where int and long are different
  1318.     sizes (so sys.maxint isn't actually the theoretical limit for the
  1319.     length of a list, but the largest C int is -- sys.maxint is the
  1320.     largest Python int, which is actually a C long).
  1321.  
  1322.     * Makefile.in:
  1323.     1. Augment the DG/UX rule so it doesn't break the BeOS build.
  1324.     2. Add $(EXE) to various occurrences of python so it will work on
  1325.        Cygwin with egcs (after setting EXE=.exe).  These patches by
  1326.        Norman Vine.
  1327.  
  1328.     * Lib/posixfile.py:
  1329.     According to Jeffrey Honig, bsd/os 2.0 - 4.0 should be added to the
  1330.     list (of bsd variants that have a different lock structure).
  1331.  
  1332.     * Lib/test/test_fcntl.py:
  1333.     According to Jeffrey Honig, bsd/os 4.0 should be added to the list.
  1334.  
  1335.     * Modules/timemodule.c:
  1336.     Patch by Tadayoshi Funaba (with some changes) to be smarter about
  1337.     guessing what happened when strftime() returns 0.  Is it buffer
  1338.     overflow or was the result simply 0 bytes long?  (This happens for an
  1339.     empty format string, or when the format string is a single %Z and the
  1340.     timezone is unknown.)  if the buffer is at least 256 times as long as
  1341.     the format, assume the latter.
  1342.  
  1343. Mon Feb 22 19:01:42 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1344.  
  1345.     * Lib/urllib.py:
  1346.     As Des Barry points out, we need to call pathname2url(file) in two
  1347.     calls to addinfourl() in open_file().
  1348.  
  1349.     * Modules/Setup.in: Document *static* -- in two places!
  1350.  
  1351.     * Modules/timemodule.c:
  1352.     We don't support leap seconds, so the seconds field of a time 9-tuple
  1353.     should be in the range [0-59].  Noted by Tadayoshi Funaba.
  1354.  
  1355.     * Modules/stropmodule.c:
  1356.     In atoi(), don't use isxdigit() to test whether the last character
  1357.     converted was a "digit" -- use isalnum().  This test is there only to
  1358.     guard against "+" or "-" being interpreted as a valid int literal.
  1359.     Reported by Takahiro Nakayama.
  1360.  
  1361.     * Lib/os.py:
  1362.     As Finn Bock points out, _P_WAIT etc. don't have a leading underscore
  1363.     so they don't need to be treated specially here.
  1364.  
  1365. Mon Feb 22 15:38:58 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1366.  
  1367.     * Misc/NEWS:
  1368.     Typo:  "apparentlt" --> "apparently"
  1369.  
  1370. Mon Feb 22 15:38:46 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
  1371.  
  1372.     * Lib/urlparse.py: Steve Clift pointed out that 'file' allows a netloc.
  1373.  
  1374.     * Modules/posixmodule.c:
  1375.     The docstring for ttyname(..) claims a second "mode" argument. The
  1376.     actual code does not allow such an argument.  (Finn Bock.)
  1377.  
  1378.     * Lib/lib-old/poly.py:
  1379.     Dang.  Even though this is obsolete code, somebody found a bug, and I
  1380.     fix it.  Oh well.
  1381.  
  1382. Thu Feb 18 20:51:50 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
  1383.  
  1384.     * Lib/pyclbr.py:
  1385.     Bow to font-lock at the end of the docstring, since it throws stuff
  1386.     off.
  1387.  
  1388.     Make sure the path paramter to readmodule() is a list before adding it
  1389.     with sys.path, or the addition could fail.
  1390.  
  1391.  
  1392. ======================================================================
  1393.  
  1394.  
  1395. From 1.5.2b1 to 1.5.2b2
  1396. =======================
  1397.  
  1398. General
  1399. -------
  1400.  
  1401. - Many memory leaks fixed.
  1402.  
  1403. - Many small bugs fixed.
  1404.  
  1405. - Command line option -OO (or -O -O) suppresses inclusion of doc
  1406. strings in resulting bytecode.
  1407.  
  1408. Windows-specific changes
  1409. ------------------------
  1410.  
  1411. - New built-in module winsound provides an interface to the Win32
  1412. PlaySound() call.
  1413.  
  1414. - Re-enable the audioop module in the config.c file.
  1415.  
  1416. - On Windows, support spawnv() and associated P_* symbols.
  1417.  
  1418. - Fixed the conversion of times() return values on Windows.
  1419.  
  1420. - Removed freeze from the installer -- it doesn't work without the
  1421. source tree.  (See FAQ 8.11.)
  1422.  
  1423. - On Windows 95/98, the Tkinter module now is smart enough to find
  1424. Tcl/Tk even when the PATH environment variable hasn't been set -- when
  1425. the import of _tkinter fails, it searches in a standard locations,
  1426. patches os.environ["PATH"], and tries again.  When it still fails, a
  1427. clearer error message is produced.  This should avoid most
  1428. installation problems with Tkinter use (e.g. in IDLE).
  1429.  
  1430. - The -i option doesn't make any calls to set[v]buf() for stdin --
  1431. this apparently screwed up _kbhit() and the _tkinter main loop.
  1432.  
  1433. - The ntpath module (and hence, os.path on Windows) now parses out UNC
  1434. paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that
  1435. splitdrive() will \\host\mountpoint as the drive and \dir\file as the
  1436. path.  ** EXPERIMENTAL **
  1437.  
  1438. - Added a hack to the exit code so that if (1) the exit status is
  1439. nonzero and (2) we think we have our own DOS box (i.e. we're not
  1440. started from a command line shell), we print a message and wait for
  1441. the user to hit a key before the DOS box is closed.
  1442.  
  1443. - Updated the installer to WISE 5.0g.  Added a dialog warning about
  1444. the imminent Tcl installation.  Added a dialog to specify the program
  1445. group name in the start menu.  Upgraded the Tcl installer to Tcl
  1446. 8.0.4.
  1447.  
  1448. Changes to intrinsics
  1449. ---------------------
  1450.  
  1451. - The repr() or str() of a module object now shows the __file__
  1452. attribute (i.e., the file which it was loaded), or the string
  1453. "(built-in)" if there is no __file__ attribute.
  1454.  
  1455. - The range() function now avoids overflow during its calculations (if
  1456. at all possible).
  1457.  
  1458. - New info string sys.hexversion, which is an integer encoding the
  1459. version in hexadecimal.  In other words, hex(sys.hexversion) ==
  1460. 0x010502b2 for Python 1.5.2b2.
  1461.  
  1462. New or improved ports
  1463. ---------------------
  1464.  
  1465. - Support for Nextstep descendants (future Mac systems).
  1466.  
  1467. - Improved BeOS support.
  1468.  
  1469. - Support dynamic loading of shared libraries on NetBSD platforms that 
  1470. use ELF (i.e., MIPS and Alpha systems).
  1471.  
  1472. Configuration/build changes
  1473. ---------------------------
  1474.  
  1475. - The Lib/test directory is no longer included in the default module
  1476. search path (sys.path) -- "test" has been a package ever since 1.5.
  1477.  
  1478. - Now using autoconf 2.13.
  1479.  
  1480. New library modules
  1481. -------------------
  1482.  
  1483. - New library modules asyncore and asynchat: these form Sam Rushing's
  1484. famous asynchronous socket library.  Sam has gracefully allowed me to
  1485. incorporate these in the standard Python library.
  1486.  
  1487. - New module statvfs contains indexing constants for [f]statvfs()
  1488. return tuple.
  1489.  
  1490. Changes to the library
  1491. ----------------------
  1492.  
  1493. - The wave module (platform-independent support for Windows sound
  1494. files) has been fixed to actually make it work.
  1495.  
  1496. - The sunau module (platform-independent support for Sun/NeXT sound
  1497. files) has been fixed to work across platforms.  Also, a weird
  1498. encoding bug in the header of the audio test data file has been
  1499. corrected.
  1500.  
  1501. - Fix a bug in the urllib module that occasionally tripped up
  1502. webchecker and other ftp retrieves.
  1503.  
  1504. - ConfigParser's get() method now accepts an optional keyword argument
  1505. (vars) that is substituted on top of the defaults that were setup in
  1506. __init__.  You can now also have recusive references in your
  1507. configuration file.
  1508.  
  1509. - Some improvements to the Queue module, including a put_nowait()
  1510. module and an optional "block" second argument, to get() and put(),
  1511. defaulting to 1.
  1512.  
  1513. - The updated xmllib module is once again compatible with the version
  1514. present in Python 1.5.1 (this was accidentally broken in 1.5.2b1).
  1515.  
  1516. - The bdb module (base class for the debugger) now supports
  1517. canonicalizing pathnames used in breakpoints.  The derived class must
  1518. override the new canonical() method for this to work.  Also changed
  1519. clear_break() to the backwards compatible old signature, and added
  1520. clear_bpbynumber() for the new functionality.
  1521.  
  1522. - In sgmllib (and hence htmllib), recognize attributes even if they
  1523. don't have space in front of them.  I.e.  '<a
  1524. name="foo"href="bar.html">' will now have two attributes recognized.
  1525.  
  1526. - In the debugger (pdb), change clear syntax to support three
  1527. alternatives: clear; clear file:line; clear bpno bpno ...
  1528.  
  1529. - The os.path module now pretends to be a submodule within the os
  1530. "package", so you can do things like "from os.path import exists".
  1531.  
  1532. - The standard exceptions now have doc strings.
  1533.  
  1534. - In the smtplib module, exceptions are now classes.  Also avoid
  1535. inserting a non-standard space after "TO" in rcpt() command.
  1536.  
  1537. - The rfc822 module's getaddrlist() method now uses all occurrences of
  1538. the specified header instead of just the first.  Some other bugfixes
  1539. too (to handle more weird addresses found in a very large test set,
  1540. and to avoid crashes on certain invalid dates), and a small test
  1541. module has been added.
  1542.  
  1543. - Fixed bug in urlparse in the common-case code for HTTP URLs; it
  1544. would lose the query, fragment, and/or parameter information.
  1545.  
  1546. - The sndhdr module no longer supports whatraw() -- it depended on a
  1547. rare extenral program.
  1548.  
  1549. - The UserList module/class now supports the extend() method, like
  1550. real list objects.
  1551.  
  1552. - The uu module now deals better with trailing garbage generated by
  1553. some broke uuencoders.
  1554.  
  1555. - The telnet module now has an my_interact() method which uses threads
  1556. instead of select.  The interact() method uses this by default on
  1557. Windows (where the single-threaded version doesn't work).
  1558.  
  1559. - Add a class to mailbox.py for dealing with qmail directory
  1560. mailboxes.  The test code was extended to notice these being used as
  1561. well.
  1562.  
  1563. Changes to extension modules
  1564. ----------------------------
  1565.  
  1566. - Support for the [f]statvfs() system call, where it exists.
  1567.  
  1568. - Fixed some bugs in cPickle where bad input could cause it to dump
  1569. core.
  1570.  
  1571. - Fixed cStringIO to make the writelines() function actually work.
  1572.  
  1573. - Added strop.expandtabs() so string.expandtabs() is now much faster.
  1574.  
  1575. - Added fsync() and fdatasync(), if they appear to exist.
  1576.  
  1577. - Support for "long files" (64-bit seek pointers).
  1578.  
  1579. - Fixed a bug in the zlib module's flush() function.
  1580.  
  1581. - Added access() system call.  It returns 1 if access granted, 0 if
  1582. not.
  1583.  
  1584. - The curses module implements an optional nlines argument to
  1585. w.scroll().  (It then calls wscrl(win, nlines) instead of scoll(win).)
  1586.  
  1587. Changes to tools
  1588. ----------------
  1589.  
  1590. - Some changes to IDLE; see Tools/idle/NEWS.txt.
  1591.  
  1592. - Latest version of Misc/python-mode.el included.
  1593.  
  1594. Changes to Tkinter
  1595. ------------------
  1596.  
  1597. - Avoid tracebacks when an image is deleted after its root has been
  1598. destroyed.
  1599.  
  1600. Changes to the Python/C API
  1601. ---------------------------
  1602.  
  1603. - When parentheses are used in a PyArg_Parse[Tuple]() call, any
  1604. sequence is now accepted, instead of requiring a tuple.  This is in
  1605. line with the general trend towards accepting arbitrary sequences.
  1606.  
  1607. - Added PyModule_GetFilename().
  1608.  
  1609. - In PyNumber_Power(), remove unneeded and even harmful test for float
  1610. to the negative power (which is already and better done in
  1611. floatobject.c).
  1612.  
  1613. - New version identification symbols; read patchlevel.h for info.  The
  1614. version numbers are now exported by Python.h.
  1615.  
  1616. - Rolled back the API version change -- it's back to 1007!
  1617.  
  1618. - The frozenmain.c function calls PyInitFrozenExtensions().
  1619.  
  1620. - Added 'N' format character to Py_BuildValue -- like 'O' but doesn't
  1621. INCREF.
  1622.  
  1623.  
  1624. ======================================================================
  1625.  
  1626.  
  1627. From 1.5.2a2 to 1.5.2b1
  1628. =======================
  1629.  
  1630. Changes to intrinsics
  1631. ---------------------
  1632.  
  1633. - New extension NotImplementedError, derived from RuntimeError.  Not
  1634. used, but recommended use is for "abstract" methods to raise this.
  1635.  
  1636. - The parser will now spit out a warning or error when -t or -tt is
  1637. used for parser input coming from a string, too.
  1638.  
  1639. - The code generator now inserts extra SET_LINENO opcodes when
  1640. compiling multi-line argument lists.
  1641.  
  1642. - When comparing bound methods, use identity test on the objects, not
  1643. equality test.
  1644.  
  1645. New or improved ports
  1646. ---------------------
  1647.  
  1648. - Chris Herborth has redone his BeOS port; it now works on PowerPC
  1649. (R3/R4) and x86 (R4 only).  Threads work too in this port.
  1650.  
  1651. Renaming
  1652. --------
  1653.  
  1654. - Thanks to Chris Herborth, the thread primitives now have proper Py*
  1655. names in the source code (they already had those for the linker,
  1656. through some smart macros; but the source still had the old, un-Py
  1657. names).
  1658.  
  1659. Configuration/build changes
  1660. ---------------------------
  1661.  
  1662. - Improved support for FreeBSD/3.
  1663.  
  1664. - Check for pthread_detach instead of pthread_create in libc.
  1665.  
  1666. - The makesetup script now searches EXECINCLUDEPY before INCLUDEPY.
  1667.  
  1668. - Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local.
  1669. Otherwise modules such as thread didn't get incorporated in extensions.
  1670.  
  1671. New library modules
  1672. -------------------
  1673.  
  1674. - shlex.py by Eric Raymond provides a lexical analyzer class for
  1675. simple shell-like syntaxes.
  1676.  
  1677. - netrc.py by Eric Raymond provides a parser for .netrc files.  (The
  1678. undocumented Netrc class in ftplib.py is now obsolete.)
  1679.  
  1680. - codeop.py is a new module that contains the compile_command()
  1681. function that was previously in code.py.  This is so that JPython can
  1682. provide its own version of this function, while still sharing the
  1683. higher-level classes in code.py.
  1684.  
  1685. - turtle.py is a new module for simple turtle graphics.  I'm still
  1686. working on it; let me know if you use this to teach Python to children 
  1687. or other novices without prior programming experience.
  1688.  
  1689. Obsoleted library modules
  1690. -------------------------
  1691.  
  1692. - poly.py and zmod.py have been moved to Lib/lib-old to emphasize
  1693. their status of obsoleteness.  They don't do a particularly good job
  1694. and don't seem particularly relevant to the Python core.
  1695.  
  1696. New tools
  1697. ---------
  1698.  
  1699. - I've added IDLE: my Integrated DeveLopment Environment for Python.
  1700. Requires Tcl/Tk (and Tkinter).  Works on Windows and Unix (and should
  1701. work on Macintosh, but I haven't been able to test it there; it does
  1702. depend on new features in 1.5.2 and perhaps even new features in
  1703. 1.5.2b1, especially the new code module).  This is very much a work in
  1704. progress.  I'd like to hear how people like it compared to PTUI (or
  1705. any other IDE they are familiar with).
  1706.  
  1707. - New tools by Barry Warsaw:
  1708.  
  1709.   = audiopy: controls the Solaris Audio device
  1710.   = pynche:  The PYthonically Natural Color and Hue Editor
  1711.   = world:   Print mappings between country names and DNS country codes
  1712.  
  1713. New demos
  1714. ---------
  1715.  
  1716. - Demo/scripts/beer.py prints the lyrics to an arithmetic drinking
  1717. song.
  1718.  
  1719. - Demo/tkinter/guido/optionmenu.py shows how to do an option menu in
  1720. Tkinter.  (By Fredrik Lundh -- not by me!)
  1721.  
  1722. Changes to the library
  1723. ----------------------
  1724.  
  1725. - compileall.py now avoids recompiling .py files that haven't changed;
  1726. it adds a -f option to force recompilation.
  1727.  
  1728. - New version of xmllib.py by Sjoerd Mullender (0.2 with latest
  1729. patches).
  1730.  
  1731. - nntplib.py: statparse() no longer lowercases the message-id.
  1732.  
  1733. - types.py: use type(__stdin__) for FileType.
  1734.  
  1735. - urllib.py: fix translations for filenames with "funny" characters.
  1736. Patch by Sjoerd Mullender.  Note that if you subclass one of the
  1737. URLopener classes, and you have copied code from the old urllib.py,
  1738. your subclass may stop working.  A long-term solution is to provide
  1739. more methods so that you don't have to copy code.
  1740.  
  1741. - cgi.py: In read_multi, allow a subclass to override the class we
  1742. instantiate when we create a recursive instance, by setting the class
  1743. variable 'FieldStorageClass' to the desired class.  By default, this
  1744. is set to None, in which case we use self.__class__ (as before).
  1745. Also, a patch by Jim Fulton to pass additional arguments to recursive
  1746. calls to the FieldStorage constructor from its read_multi method.
  1747.  
  1748. - UserList.py: In __getslice__, use self.__class__ instead of
  1749. UserList.
  1750.  
  1751. - In SimpleHTTPServer.py, the server specified in test() should be
  1752. BaseHTTPServer.HTTPServer, in case the request handler should want to
  1753. reference the two attributes added by BaseHTTPServer.server_bind.  (By
  1754. Jeff Rush, for Bobo).  Also open the file in binary mode, so serving
  1755. images from a Windows box might actually work.
  1756.  
  1757. - In CGIHTTPServer.py, the list of acceptable formats is -split-
  1758. on spaces but -joined- on commas, resulting in double commas
  1759. in the joined text.  (By Jeff Rush.)
  1760.  
  1761. - SocketServer.py, patch by Jeff Bauer: a minor change to declare two
  1762. new threaded versions of Unix Server classes, using the ThreadingMixIn
  1763. class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer.
  1764.  
  1765. - bdb.py: fix bomb on deleting a temporary breakpoint: there's no
  1766. method do_delete(); do_clear() was meant.  By Greg Ward.
  1767.  
  1768. - getopt.py: accept a non-list sequence for the long options (request
  1769. by Jack Jansen).  Because it might be a common mistake to pass a
  1770. single string, this situation is treated separately.  Also added
  1771. docstrings (copied from the library manual) and removed the (now
  1772. redundant) module comments.
  1773.  
  1774. - tempfile.py: improvements to avoid security leaks.
  1775.  
  1776. - code.py: moved compile_command() to new module codeop.py.
  1777.  
  1778. - pickle.py: support pickle format 1.3 (binary float added).  By Jim
  1779. Fulton. Also get rid of the undocumented obsolete Pickler dump_special
  1780. method.
  1781.  
  1782. - uu.py: Move 'import sys' to top of module, as noted by Tim Peters.
  1783.  
  1784. - imaplib.py: fix problem with some versions of IMAP4 servers that
  1785. choose to mix the case in their CAPABILITIES response.
  1786.  
  1787. - cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2.  Noted
  1788. by Fredrik Lundh.
  1789.  
  1790. Changes to extension modules
  1791. ----------------------------
  1792.  
  1793. - More doc strings for several modules were contributed by Chris
  1794. Petrilli: math, cmath, fcntl.
  1795.  
  1796. - Fixed a bug in zlibmodule.c that could cause core dumps on
  1797. decompression of rarely occurring input.
  1798.  
  1799. - cPickle.c: new version from Jim Fulton, with Open Source copyright
  1800. notice.  Also, initialize self->safe_constructors early on to prevent
  1801. crash in early dealloc.
  1802.  
  1803. - cStringIO.c: new version from Jim Fulton, with Open Source copyright
  1804. notice.  Also fixed a core dump in cStringIO.c when doing seeks.
  1805.  
  1806. - mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty).
  1807.  
  1808. - readline.c: Bernard Herzog pointed out that rl_parse_and_bind
  1809. modifies its argument string (bad function!), so we make a temporary
  1810. copy.
  1811.  
  1812. - sunaudiodev.c: Barry Warsaw added more smarts to get the device and
  1813. control pseudo-device, per audio(7I).
  1814.  
  1815. Changes to tools
  1816. ----------------
  1817.  
  1818. - New, improved version of Barry Warsaw's Misc/python-mode.el (editing 
  1819. support for Emacs).
  1820.  
  1821. - tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
  1822. only the names of offending files to be printed.
  1823.  
  1824. - freeze: when printing missing modules, also print the module they
  1825. were imported from.
  1826.  
  1827. - untabify.py: patch by Detlef Lannert to implement -t option
  1828. (set tab size).
  1829.  
  1830. Changes to Tkinter
  1831. ------------------
  1832.  
  1833. - grid_bbox(): support new Tk API: grid bbox ?column row? ?column2
  1834. row2?
  1835.  
  1836. - _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2)
  1837. doesn't work when running in a non-threaded environment.  He added
  1838. some #ifdefs that fix this.
  1839.  
  1840. Changes to the Python/C API
  1841. ---------------------------
  1842.  
  1843. - Bumped API version number to 1008 -- enough things have changed!
  1844.  
  1845. - There's a new macro, PyThreadState_GET(), which does the same work
  1846. as PyThreadState_Get() without the overhead of a function call (it
  1847. also avoids the error check).  The two top calling locations of
  1848. PyThreadState_Get() have been changed to use this macro.
  1849.  
  1850. - All symbols intended for export from a DLL or shared library are now
  1851. marked as such (with the DL_IMPORT() macro) in the header file that
  1852. declares them.  This was needed for the BeOS port, and should also
  1853. make some other ports easier.  The PC port no longer needs the file
  1854. with exported symbols (PC/python_nt.def).  There's also a DL_EXPORT
  1855. macro which is only used for init methods in extension modules, and
  1856. for Py_Main().
  1857.  
  1858. Invisible changes to internals
  1859. ------------------------------
  1860.  
  1861. - Fixed a bug in new_buffersize() in fileobject.c which could
  1862. return a buffer size that was way too large.
  1863.  
  1864. - Use PySys_WriteStderr instead of fprintf in most places.
  1865.  
  1866. - dictobject.c: remove dead code discovered by Vladimir Marangozov.
  1867.  
  1868. - tupleobject.c: make tuples less hungry -- an extra item was
  1869. allocated but never used.  Tip by Vladimir Marangozov.
  1870.  
  1871. - mymath.h: Metrowerks PRO4 finally fixes the hypot snafu.  (Jack
  1872. Jansen)
  1873.  
  1874. - import.c: Jim Fulton fixes a reference count bug in
  1875. PyEval_GetGlobals.
  1876.  
  1877. - glmodule.c: check in the changed version after running the stubber
  1878. again -- this solves the conflict with curses over the 'clear' entry
  1879. point much nicer.  (Jack Jansen had checked in the changes to cstubs
  1880. eons ago, but I never regenrated glmodule.c :-( )
  1881.  
  1882. - frameobject.c: fix reference count bug in PyFrame_New.  Vladimir
  1883. Marangozov.
  1884.  
  1885. - stropmodule.c: add a missing DECREF in an error exit.  Submitted by
  1886. Jonathan Giddy.
  1887.  
  1888.  
  1889. ======================================================================
  1890.  
  1891.  
  1892. From 1.5.2a1 to 1.5.2a2
  1893. =======================
  1894.  
  1895. General
  1896. -------
  1897.  
  1898. - It is now a syntax error to have a function argument without a
  1899. default following one with a default.
  1900.  
  1901. - __file__ is now set to the .py file if it was parsed (it used to
  1902. always be the .pyc/.pyo file).
  1903.  
  1904. - Don't exit with a fatal error during initialization when there's a
  1905. problem with the exceptions.py module.
  1906.  
  1907. - New environment variable PYTHONOPTIMIZE can be used to set -O.
  1908.  
  1909. - New version of python-mode.el for Emacs.
  1910.  
  1911. Miscellaneous fixed bugs
  1912. ------------------------
  1913.  
  1914. - No longer print the (confusing) error message about stack underflow
  1915. while compiling.
  1916.  
  1917. - Some threading and locking bugs fixed.
  1918.  
  1919. - When errno is zero, report "Error", not "Success".
  1920.  
  1921. Documentation
  1922. -------------
  1923.  
  1924. - Documentation will be released separately.
  1925.  
  1926. - Doc strings added to array and md5 modules by Chris Petrilli.
  1927.  
  1928. Ports and build procedure
  1929. -------------------------
  1930.  
  1931. - Stop installing when a move or copy fails.
  1932.  
  1933. - New version of the OS/2 port code by Jeff Rush.
  1934.  
  1935. - The makesetup script handles absolute filenames better.
  1936.  
  1937. - The 'new' module is now enabled by default in the Setup file.
  1938.  
  1939. - I *think* I've solved the problem with the Linux build blowing up
  1940. sometimes due to a conflict between sigcheck/intrcheck and
  1941. signalmodule.
  1942.  
  1943. Built-in functions
  1944. ------------------
  1945.  
  1946. - The second argument to apply() can now be any sequence, not just a
  1947. tuple.
  1948.  
  1949. Built-in types
  1950. --------------
  1951.  
  1952. - Lists have a new method: L1.extend(L2) is equivalent to the common
  1953. idiom L1[len(L1):] = L2.
  1954.  
  1955. - Better error messages when a sequence is indexed with a non-integer.
  1956.  
  1957. - Bettter error message when calling a non-callable object (include
  1958. the type in the message).
  1959.  
  1960. Python services
  1961. ---------------
  1962.  
  1963. - New version of cPickle.c fixes some bugs.
  1964.  
  1965. - pickle.py: improved instantiation error handling.
  1966.  
  1967. - code.py: reworked quite a bit.  New base class
  1968. InteractiveInterpreter and derived class InteractiveConsole.  Fixed
  1969. several problems in compile_command().
  1970.  
  1971. - py_compile.py: print error message and continue on syntax errors.
  1972. Also fixed an old bug with the fstat code (it was never used).
  1973.  
  1974. - pyclbr.py: support submodules of packages.
  1975.  
  1976. String Services
  1977. ---------------
  1978.  
  1979. - StringIO.py: raise the right exception (ValueError) for attempted
  1980. I/O on closed StringIO objects.
  1981.  
  1982. - re.py: fixed a bug in subn(), which caused .groups() to fail inside
  1983. the replacement function called by sub().
  1984.  
  1985. - The struct module has a new format 'P': void * in native mode.
  1986.  
  1987. Generic OS Services
  1988. -------------------
  1989.  
  1990. - Module time: Y2K robustness.  2-digit year acceptance depends on
  1991. value of time.accept2dyear, initialized from env var PYTHONY2K,
  1992. default 0.  Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999
  1993. (POSIX or X/Open recommendation).
  1994.  
  1995. - os.path: normpath(".//x") should return "x", not "/x".
  1996.  
  1997. - getpass.py: fall back on default_getpass() when sys.stdin.fileno()
  1998. doesn't work.
  1999.  
  2000. - tempfile.py: regenerate the template after a fork() call.
  2001.  
  2002. Optional OS Services
  2003. --------------------
  2004.  
  2005. - In the signal module, disable restarting interrupted system calls
  2006. when we have siginterrupt().
  2007.  
  2008. Debugger
  2009. --------
  2010.  
  2011. - No longer set __args__; this feature is no longer supported and can
  2012. affect the debugged code.
  2013.  
  2014. - cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who
  2015. added aliases and some other useful new features, e.g. much better
  2016. breakpoint support: temporary breakpoint, disabled breakpoints,
  2017. breakpoints with ignore counts, and conditions; breakpoints can be set
  2018. on a file before it is loaded.
  2019.  
  2020. Profiler
  2021. --------
  2022.  
  2023. - Changes so that JPython can use it.  Also fix the calibration code
  2024. so it actually works again
  2025. .
  2026. Internet Protocols and Support
  2027. ------------------------------
  2028.  
  2029. - imaplib.py: new version from Piers Lauder.
  2030.  
  2031. - smtplib.py: change sendmail() method to accept a single string or a
  2032. list or strings as the destination (commom newbie mistake).
  2033.  
  2034. - poplib.py: LIST with a msg argument fixed.
  2035.  
  2036. - urlparse.py: some optimizations for common case (http).
  2037.  
  2038. - urllib.py: support content-length in info() for ftp protocol;
  2039. support for a progress meter through a third argument to
  2040. urlretrieve(); commented out gopher test (the test site is dead).
  2041.  
  2042. Internet Data handling
  2043. ----------------------
  2044.  
  2045. - sgmllib.py: support tags with - or . in their name.
  2046.  
  2047. - mimetypes.py: guess_type() understands 'data' URLs.
  2048.  
  2049. Restricted Execution
  2050. --------------------
  2051.  
  2052. - The classes rexec.RModuleLoader and rexec.RModuleImporter no
  2053. longer exist.
  2054.  
  2055. Tkinter
  2056. -------
  2057.  
  2058. - When reporting an exception, store its info in sys.last_*.  Also,
  2059. write all of it to stderr.
  2060.  
  2061. - Added NS, EW, and NSEW constants, for grid's sticky option.
  2062.  
  2063. - Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h".
  2064.  
  2065. - Make bind variants without a sequence return a tuple of sequences
  2066. (formerly it returned a string, which wasn't very convenient).
  2067.  
  2068. - Add image commands to the Text widget (these are new in Tk 8.0).
  2069.  
  2070. - Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.)
  2071.  
  2072. - Improved the thread code (but you still can't call update() from
  2073. another thread on Windows).
  2074.  
  2075. - Fixed unnecessary references to _default_root in the new dialog
  2076. modules.
  2077.  
  2078. - Miscellaneous problems fixed.
  2079.  
  2080.  
  2081. Windows General
  2082. ---------------
  2083.  
  2084. - Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to
  2085. search for dependent dlls in the directory containing the .pyd.
  2086.  
  2087. - In debugging mode, call DebugBreak() in Py_FatalError().
  2088.  
  2089. Windows Installer
  2090. -----------------
  2091.  
  2092. - Install zlib.dll in the DLLs directory instead of in the win32
  2093. system directory, to avoid conflicts with other applications that have 
  2094. their own zlib.dll.
  2095.  
  2096. Test Suite
  2097. ----------
  2098.  
  2099. - test_long.py: new test for long integers, by Tim Peters.
  2100.  
  2101. - regrtest.py: improved so it can be used for other test suites as
  2102. well.
  2103.  
  2104. - test_strftime.py: use re to compare test results, to support legal
  2105. variants (e.g. on Linux).
  2106.  
  2107. Tools and Demos
  2108. ---------------
  2109.  
  2110. - Four new scripts in Tools/scripts: crlf.py and lfcr.py (to
  2111. remove/add Windows style '\r\n' line endings), untabify.py (to remove
  2112. tabs), and rgrep.yp (reverse grep).
  2113.  
  2114. - Improvements to Tools/freeze/.  Each Python module is now written to
  2115. its own C file.  This prevents some compilers or assemblers from
  2116. blowing up on large frozen programs, and saves recompilation time if
  2117. only a few modules are changed.  Other changes too, e.g. new command
  2118. line options -x and -i.
  2119.  
  2120. - Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py.
  2121.  
  2122. Python/C API
  2123. ------------
  2124.  
  2125. - New mechanism to support extensions of the type object while
  2126. remaining backward compatible with extensions compiled for previous
  2127. versions of Python 1.5.  A flags field indicates presence of certain
  2128. fields.
  2129.  
  2130. - Addition to the buffer API to differentiate access to bytes and
  2131. 8-bit characters (in anticipation of Unicode characters).
  2132.  
  2133. - New argument parsing format t# ("text") to indicate 8-bit
  2134. characters; s# simply means 8-bit bytes, for backwards compatibility.
  2135.  
  2136. - New object type, bufferobject.c is an example and can be used to
  2137. create buffers from memory.
  2138.  
  2139. - Some support for 64-bit longs, including some MS platforms.
  2140.  
  2141. - Many calls to fprintf(stderr, ...) have been replaced with calls to
  2142. PySys_WriteStderr(...).
  2143.  
  2144. - The calling context for PyOS_Readline() has changed: it must now be
  2145. called with the interpreter lock held!  It releases the lock around
  2146. the call to the function pointed to by PyOS_ReadlineFunctionPointer
  2147. (default PyOS_StdioReadline()).
  2148.  
  2149. - New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr().
  2150.  
  2151. - Renamed header file "thread.h" to "pythread.h".
  2152.  
  2153. - The code string of code objects may now be anything that supports the
  2154. buffer API.
  2155.  
  2156.  
  2157. ======================================================================
  2158.  
  2159.  
  2160. From 1.5.1 to 1.5.2a1
  2161. =====================
  2162.  
  2163. General
  2164. -------
  2165.  
  2166. - When searching for the library, a landmark that is a compiled module
  2167. (string.pyc or string.pyo) is also accepted.
  2168.  
  2169. - When following symbolic links to the python executable, use a loop
  2170. so that a symlink to a symlink can work.
  2171.  
  2172. - Added a hack so that when you type 'quit' or 'exit' at the
  2173. interpreter, you get a friendly explanation of how to press Ctrl-D (or 
  2174. Ctrl-Z) to exit.
  2175.  
  2176. - New and improved Misc/python-mode.el (Python mode for Emacs).
  2177.  
  2178. - Revert a new feature in Unix dynamic loading: for one or two
  2179. revisions, modules were loaded using the RTLD_GLOBAL flag.  It turned
  2180. out to be a bad idea.
  2181.  
  2182. Miscellaneous fixed bugs
  2183. ------------------------
  2184.  
  2185. - All patches on the patch page have been integrated.  (But much more
  2186. has been done!)
  2187.  
  2188. - Several memory leaks plugged (e.g. the one for classes with a
  2189. __getattr__ method).
  2190.  
  2191. - Removed the only use of calloc().  This triggered an obscure bug on
  2192. multiprocessor Sparc Solaris 2.6.
  2193.  
  2194. - Fix a peculiar bug that would allow "import sys.time" to succeed
  2195. (believing the built-in time module to be a part of the sys package).
  2196.  
  2197. - Fix a bug in the overflow checking when converting a Python long to
  2198. a C long (failed to convert -2147483648L, and some other cases).
  2199.  
  2200. Documentation
  2201. -------------
  2202.  
  2203. - Doc strings have been added to many extension modules: __builtin__,
  2204. errno, select, signal, socket, sys, thread, time.  Also to methods of
  2205. list objects (try [].append.__doc__).  A doc string on a type will now
  2206. automatically be propagated to an instance if the instance has methods
  2207. that are accessed in the usual way.
  2208.  
  2209. - The documentation has been expanded and the formatting improved.
  2210. (Remember that the documentation is now unbundled and has its own
  2211. release cycle though; see http://www.python.org/doc/.)
  2212.  
  2213. - Added Misc/Porting -- a mini-FAQ on porting to a new platform.
  2214.  
  2215. Ports and build procedure
  2216. -------------------------
  2217.  
  2218. - The BeOS port is now integrated.  Courtesy Chris Herborth.
  2219.  
  2220. - Symbol files for FreeBSD 2.x and 3.x have been contributed
  2221. (Lib/plat-freebsd[23]/*).
  2222.  
  2223. - Support HPUX 10.20 DCE threads.
  2224.  
  2225. - Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0
  2226. works, it won't also use -Olimit 1500 (which gives a warning for every
  2227. file).  Also support the SGI_ABI environment variable better.
  2228.  
  2229. - The makesetup script now understands absolute pathnames ending in .o
  2230. in the module -- it assumes it's a file for which we have no source.
  2231.  
  2232. - Other miscellaneous improvements to the configure script and
  2233. Makefiles.
  2234.  
  2235. - The test suite now uses a different sound sample.
  2236.  
  2237. Built-in functions
  2238. ------------------
  2239.  
  2240. - Better checks for invalid input to int(), long(), string.atoi(),
  2241. string.atol().  (Formerly, a sign without digits would be accepted as
  2242. a legal ways to spell zero.)
  2243.  
  2244. - Changes to map() and filter() to use the length of a sequence only
  2245. as a hint -- if an IndexError happens earlier, take that.  (Formerly,
  2246. this was considered an error.)
  2247.  
  2248. - Experimental feature in getattr(): a third argument can specify a
  2249. default (instead of raising AttributeError).
  2250.  
  2251. - Implement round() slightly different, so that for negative ndigits
  2252. no additional errors happen in the last step.
  2253.  
  2254. - The open() function now adds the filename to the exception when it
  2255. fails.
  2256.  
  2257. Built-in exceptions
  2258. -------------------
  2259.  
  2260. - New standard exceptions EnvironmentError and PosixError.
  2261. EnvironmentError is the base class for IOError and PosixError;
  2262. PosixError is the same as os.error.  All this so that either exception
  2263. class can be instantiated with a third argument indicating a filename.
  2264. The built-in function open() and most os/posix functions that take a
  2265. filename argument now use this.
  2266.  
  2267. Built-in types
  2268. --------------
  2269.  
  2270. - List objects now have an experimental pop() method; l.pop() returns
  2271. and removes the last item; l.pop(i) returns and removes the item at
  2272. i.  Also, the sort() method is faster again.  Sorting is now also
  2273. safer: it is impossible for the sorting function to modify the list
  2274. while the sort is going on (which could cause core dumps).
  2275.  
  2276. - Changes to comparisons: numbers are now smaller than any other type.
  2277. This is done to prevent the circularity where [] < 0L < 1 < [] is
  2278. true.  As a side effect, cmp(None, 0) is now positive instead of
  2279. negative.  This *shouldn't* affect any working code, but I've found
  2280. that the change caused several "sleeping" bugs to become active, so
  2281. beware!
  2282.  
  2283. - Instance methods may now have other callable objects than just
  2284. Python functions as their im_func.  Use new.instancemethod() or write
  2285. your own C code to create them; new.instancemethod() may be called
  2286. with None for the instance to create an unbound method.
  2287.  
  2288. - Assignment to __name__, __dict__ or __bases__ of a class object is
  2289. now allowed (with stringent type checks); also allow assignment to
  2290. __getattr__ etc.  The cached values for __getattr__ etc. are
  2291. recomputed after such assignments (but not for derived classes :-( ).
  2292.  
  2293. - Allow assignment to some attributes of function objects: func_code,
  2294. func_defaults and func_doc / __doc__.  (With type checks except for
  2295. __doc__ / func_doc .)
  2296.  
  2297. Python services
  2298. ---------------
  2299.  
  2300. - New tests (in Lib/test): reperf.py (regular expression benchmark),
  2301. sortperf.py (list sorting benchmark), test_MimeWriter.py (test case
  2302. for the MimeWriter module).
  2303.  
  2304. - Generalized test/regrtest.py so that it is useful for testing other
  2305. packages.
  2306.  
  2307. - The ihooks.py module now understands package imports.
  2308.  
  2309. - In code.py, add a class that subsumes Fredrik Lundh's
  2310. PythonInterpreter class.  The interact() function now uses this.
  2311.  
  2312. - In rlcompleter.py, in completer(), return None instead of raising an
  2313. IndexError when there are no more completions left.
  2314.  
  2315. - Fixed the marshal module to test for certain common kinds of invalid
  2316. input.  (It's still not foolproof!)
  2317.  
  2318. - In the operator module, add an alias (now the preferred name)
  2319. "contains" for "sequenceincludes".
  2320.  
  2321. String Services
  2322. ---------------
  2323.  
  2324. - In the string and strop modules, in the replace() function, treat an
  2325. empty pattern as an error (since it's not clear what was meant!).
  2326.  
  2327. - Some speedups to re.py, especially the string substitution and split
  2328. functions.  Also added new function/method findall(), to find all
  2329. occurrences of a given substring.
  2330.  
  2331. - In cStringIO, add better argument type checking and support the
  2332. readonly 'closed' attribute (like regular files).
  2333.  
  2334. - In the struct module, unsigned 1-2 byte sized formats no longer
  2335. result in long integer values.
  2336.  
  2337. Miscellaneous services
  2338. ----------------------
  2339.  
  2340. - In whrandom.py, added new method and function randrange(), same as
  2341. choice(range(start, stop, step)) but faster.  This addresses the
  2342. problem that randint() was accidentally defined as taking an inclusive
  2343. range.  Also, randint(a, b) is now redefined as randrange(a, b+1),
  2344. adding extra range and type checking to its arguments!
  2345.  
  2346. - Add some semi-thread-safety to random.gauss() (it used to be able to 
  2347. crash when invoked from separate threads; now the worst it can do is
  2348. give a duplicate result occasionally).
  2349.  
  2350. - Some restructuring and generalization done to cmd.py.
  2351.  
  2352. - Major upgrade to ConfigParser.py; converted to using 're', added new 
  2353. exceptions, support underscore in section header and option name.  No
  2354. longer add 'name' option to every section; instead, add '__name__'.
  2355.  
  2356. - In getpass.py, don't use raw_input() to ask for the password -- we
  2357. don't want it to show up in the readline history!  Also don't catch
  2358. interrupts (the try-finally already does all necessary cleanup).
  2359.  
  2360. Generic OS Services
  2361. -------------------
  2362.  
  2363. - New functions in os.py: makedirs(), removedirs(), renames().  New
  2364. variable: linesep (the line separator as found in binary files,
  2365. i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac.  Do *not* use
  2366. this with files opened in (default) text mode; the line separator used
  2367. will always be '\n'!
  2368.  
  2369. - Changes to the 'os.path' submodule of os.py: added getsize(),
  2370. getmtime(), getatime() -- these fetch the most popular items from the
  2371. stat return tuple.
  2372.  
  2373. - In the time module, add strptime(), if it exists.  (This parses a
  2374. time according to a format -- the inverse of strftime().)  Also,
  2375. remove the call to mktime() from strftime() -- it messed up the
  2376. formatting of some non-local times.
  2377.  
  2378. - In the socket module, added a new function gethostbyname_ex().
  2379. Also, don't use #ifdef to test for some symbols that are enums on some
  2380. platforms (and should exist everywhere).
  2381.  
  2382. Optional OS Services
  2383. --------------------
  2384.  
  2385. - Some fixes to gzip.py.  In particular, the readlines() method now
  2386. returns the lines *with* trailing newline characters, like readlines()
  2387. of regular file objects.  Also, it didn't work together with cPickle;
  2388. fixed that.
  2389.  
  2390. - In whichdb.py, support byte-swapped dbhash (bsddb) files.
  2391.  
  2392. - In anydbm.py, look at the type of an existing database to determine
  2393. which module to use to open it.  (The anydbm.error exception is now a
  2394. tuple.)
  2395.  
  2396. Unix Services
  2397. -------------
  2398.  
  2399. - In the termios module, in tcsetattr(), initialize the structure vy
  2400. calling tcgetattr().
  2401.  
  2402. - Added some of the "wait status inspection" macros as functions to
  2403. the posix module (and thus to the os module): WEXITSTATUS(),
  2404. WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
  2405.  
  2406. - In the syslog module, make the default facility more intuitive
  2407. (matching the docs).
  2408.  
  2409. Debugger
  2410. --------
  2411.  
  2412. - In pdb.py, support for setting breaks on files/modules that haven't
  2413. been loaded yet.
  2414.  
  2415. Internet Protocols and Support
  2416. ------------------------------
  2417.  
  2418. - Changes in urllib.py; sped up unquote() and quote().  Fixed an
  2419. obscure bug in quote_plus().  Added urlencode(dict) -- convenience
  2420. function for sending a POST request with urlopen().  Use the getpass
  2421. module to ask for a password.  Rewrote the (test) main program so that
  2422. when used as a script, it can retrieve one or more URLs to stdout.
  2423. Use -t to run the self-test.  Made the proxy code work again.
  2424.  
  2425. - In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't
  2426. fail when someone asks for their HEAD.  Also, for POST, set the
  2427. default content-type to application/x-www-form-urlencoded.  Also, in
  2428. FieldStorage.__init__(), when method='GET', always get the query
  2429. string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an
  2430. explicitly passed in fp.
  2431.  
  2432. - The smtplib.py module now supports ESMTP and has improved standard
  2433. compliance, for picky servers.
  2434.  
  2435. - Improved imaplib.py.
  2436.  
  2437. - Fixed UDP support in SocketServer.py (it never worked).
  2438.  
  2439. - Fixed a small bug in CGIHTTPServer.py.
  2440.  
  2441. Internet Data handling
  2442. ----------------------
  2443.  
  2444. - In rfc822.py, add a new class AddressList.  Also support a new
  2445. overridable method, isheader().  Also add a get() method similar to
  2446. dictionaries (and make getheader() an alias for it).  Also, be smarter
  2447. about seekable (test whether fp.tell() works) and test for presence of
  2448. unread() method before trying seeks.
  2449.  
  2450. - In sgmllib.py, restore the call to report_unbalanced() that was lost
  2451. long ago.  Also some other improvements: handle <? processing
  2452. instructions >, allow . and - in entity names, and allow \r\n as line
  2453. separator.
  2454.  
  2455. - Some restructuring and generalization done to multifile.py; support
  2456. a 'seekable' flag.
  2457.  
  2458. Restricted Execution
  2459. --------------------
  2460.  
  2461. - Improvements to rexec.py: package support; support a (minimal)
  2462. sys.exc_info().  Also made the (test) main program a bit fancier (you
  2463. can now use it to run arbitrary Python scripts in restricted mode).
  2464.  
  2465. Tkinter
  2466. -------
  2467.  
  2468. - On Unix, Tkinter can now safely be used from a multi-threaded
  2469. application.  (Formerly, no threads would make progress while
  2470. Tkinter's mainloop() was active, because it didn't release the Python
  2471. interpreter lock.)  Unfortunately, on Windows, threads other than the
  2472. main thread should not call update() or update_idletasks() because
  2473. this will deadlock the application.
  2474.  
  2475. - An interactive interpreter that uses readline and Tkinter no longer
  2476. uses up all available CPU time.
  2477.  
  2478. - Even if readline is not used, Tk windows created in an interactive
  2479. interpreter now get continuously updated.  (This even works in Windows
  2480. as long as you don't hit a key.)
  2481.  
  2482. - New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py.
  2483.  
  2484. - No longer register Tcl_finalize() as a low-level exit handler.  It
  2485. may call back into Python, and that's a bad idea.
  2486.  
  2487. - Allow binding of Tcl commands (given as a string).
  2488.  
  2489. - Some minor speedups; replace explicitly coded getint() with int() in
  2490. most places.
  2491.  
  2492. - In FileDialog.py, remember the directory of the selected file, if
  2493. given.
  2494.  
  2495. - Change the names of all methods in the Wm class: they are now
  2496. wm_title(), etc.  The old names (title() etc.) are still defined as
  2497. aliases.
  2498.  
  2499. - Add a new method of interpreter objects, interpaddr().  This returns
  2500. the address of the Tcl interpreter object, as an integer.  Not very
  2501. useful for the Python programmer, but this can be called by another C
  2502. extension that needs to make calls into the Tcl/Tk C API and needs to
  2503. get the address of the Tcl interpreter object.  A simple cast of the
  2504. return value to (Tcl_Interp *) will do the trick.
  2505.  
  2506. Windows General
  2507. ---------------
  2508.  
  2509. - Don't insist on proper case for module source files if the filename
  2510. is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still
  2511. doesn't).  This should address problems with this feature on
  2512. oldfashioned filesystems (Novell servers?).
  2513.  
  2514. Windows Library
  2515. ---------------
  2516.  
  2517. - os.environ is now all uppercase, but accesses are case insensitive,
  2518. and the putenv() calls made as a side effect of changing os.environ
  2519. are case preserving.
  2520.  
  2521. - Removed samefile(), sameopenfile(), samestat() from os.path (aka
  2522. ntpath.py) -- these cannot be made to work reliably (at least I
  2523. wouldn't know how).
  2524.  
  2525. - Fixed os.pipe() so that it returns file descriptors acceptable to
  2526. os.read() and os.write() (like it does on Unix), rather than Windows
  2527. file handles.
  2528.  
  2529. - Added a table of WSA error codes to socket.py.
  2530.  
  2531. - In the select module, put the (huge) file descriptor arrays on the
  2532. heap.
  2533.  
  2534. - The getpass module now raises KeyboardInterrupt when it sees ^C.
  2535.  
  2536. - In mailbox.py, fix tell/seek when using files opened in text mode.
  2537.  
  2538. - In rfc822.py, fix tell/seek when using files opened in text mode.
  2539.  
  2540. - In the msvcrt extension module, release the interpreter lock for
  2541. calls that may block: _locking(), _getch(), _getche().  Also fix a
  2542. bogus error return when open_osfhandle() doesn't have the right
  2543. argument list.
  2544.  
  2545. Windows Installer
  2546. -----------------
  2547.  
  2548. - The registry key used is now "1.5" instead of "1.5.x" -- so future
  2549. versions of 1.5 and Mark Hammond's win32all installer don't need to be 
  2550. resynchronized.
  2551.  
  2552. Windows Tools
  2553. -------------
  2554.  
  2555. - Several improvements to freeze specifically for Windows.
  2556.  
  2557. Windows Build Procedure
  2558. -----------------------
  2559.  
  2560. - The VC++ project files and the WISE installer have been moved to the
  2561. PCbuild subdirectory, so they are distributed in the same subdirectory
  2562. where they must be used.  This avoids confusion.
  2563.  
  2564. - New project files for Windows 3.1 port by Jim Ahlstrom.
  2565.  
  2566. - Got rid of the obsolete subdirectory PC/setup_nt/.
  2567.  
  2568. - The projects now use distinct filenames for the .exe, .dll, .lib and
  2569. .pyd files built in debug mode (by appending "_d" to the base name,
  2570. before the extension).  This makes it easier to switch between the two
  2571. and get the right versions.  There's a pragma in config.h that directs
  2572. the linker to include the appropriate .lib file (so python15.lib no
  2573. longer needs to be explicit in your project).
  2574.  
  2575. - The installer now installs more files (e.g. config.h).  The idea is
  2576. that you shouldn't need the source distribution if you want build your
  2577. own extensions in C or C++.
  2578.  
  2579. Tools and Demos
  2580. ---------------
  2581.  
  2582. - New script nm2def.py by Marc-Andre Lemburg, to construct
  2583. PC/python_nt.def automatically (some hand editing still required).
  2584.  
  2585. - New tool ndiff.py: Tim Peters' text diffing tool.
  2586.  
  2587. - Various and sundry improvements to the freeze script.
  2588.  
  2589. - The script texi2html.py (which was part of the Doc tree but is no
  2590. longer used there) has been moved to the Tools/scripts subdirectory.
  2591.  
  2592. - Some generalizations in the webchecker code.  There's now a
  2593. primnitive gui for websucker.py: wsgui.py.  (In Tools/webchecker/.)
  2594.  
  2595. - The ftpmirror.py script now handles symbolic links properly, and
  2596. also files with multiple spaces in their names.
  2597.  
  2598. - The 1.5.1 tabnanny.py suffers an assert error if fed a script whose
  2599. last line is both indented and lacks a newline.  This is now fixed.
  2600.  
  2601. Python/C API
  2602. ------------
  2603.  
  2604. - Added missing prototypes for PyEval_CallFunction() and
  2605. PyEval_CallMethod().
  2606.  
  2607. - New macro PyList_SET_ITEM().
  2608.  
  2609. - New macros to access object members for PyFunction, PyCFunction
  2610. objects.
  2611.  
  2612. - New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to
  2613. dynamically add one or many entries to the table of built-in modules.
  2614.  
  2615. - New macro Py_InitModule3(name, methods, doc) which calls
  2616. Py_InitModule4() with appropriate arguments.  (The -4 variant requires 
  2617. you to pass an obscure version number constant which is always the same.)
  2618.  
  2619. - New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
  2620. sys.stdout or sys.stderr using a printf-like interface.  (Used in
  2621. _tkinter.c, for example.)
  2622.  
  2623. - New APIs for conversion between Python longs and C 'long long' if
  2624. your compiler supports it.
  2625.  
  2626. - PySequence_In() is now called PySequence_Contains().
  2627. (PySequence_In() is still supported for b/w compatibility; it is
  2628. declared obsolete because its argument order is confusing.)
  2629.  
  2630. - PyDict_GetItem() and PyDict_GetItemString() are changed so that they
  2631. *never* raise an exception -- (even if the hash() fails, simply clear
  2632. the error).  This was necessary because there is lots of code out
  2633. there that already assumes this.
  2634.  
  2635. - Changes to PySequence_Tuple() and PySequence_List() to use the
  2636. length of a sequence only as a hint -- if an IndexError happens
  2637. earlier, take that.  (Formerly, this was considered an error.)
  2638.  
  2639. - Reformatted abstract.c to give it a more familiar "look" and fixed
  2640. many error checking bugs.
  2641.  
  2642. - Add NULL pointer checks to all calls of a C function through a type
  2643. object and extensions (e.g. nb_add).
  2644.  
  2645. - The code that initializes sys.path now calls Py_GetPythonHome()
  2646. instead of getenv("PYTHONHOME").  This, together with the new API
  2647. Py_SetPythonHome(), makes it easier for embedding applications to
  2648. change the notion of Python's "home" directory (where the libraries
  2649. etc. are sought).
  2650.  
  2651. - Fixed a very old bug in the parsing of "O?" format specifiers.
  2652.  
  2653.  
  2654. ======================================================================
  2655.  
  2656.  
  2657. ========================================
  2658. ==> Release 1.5.1 (October 31, 1998) <==
  2659. ========================================
  2660.  
  2661. From 1.5 to 1.5.1
  2662. =================
  2663.  
  2664. General
  2665. -------
  2666.  
  2667. - The documentation is now unbundled.  It has also been extensively
  2668. modified (mostly to implement a new and more uniform formatting
  2669. style).  We figure that most people will prefer to download one of the
  2670. preformatted documentation sets (HTML, PostScript or PDF) and that
  2671. only a minority have a need for the LaTeX or FrameMaker sources.  Of
  2672. course, the unbundled documentation sources still released -- just not
  2673. in the same archive file, and perhaps not on the same date.
  2674.  
  2675. - All bugs noted on the errors page (and many unnoted) are fixed.  All
  2676. new bugs take their places.
  2677.  
  2678. - No longer a core dump when attempting to print (or repr(), or str())
  2679. a list or dictionary that contains an instance of itself; instead, the
  2680. recursive entry is printed as [...] or {...}.  See Py_ReprEnter() and
  2681. Py_ReprLeave() below.  Comparisons of such objects still go beserk,
  2682. since this requires a different kind of fix; fortunately, this is a
  2683. less common scenario in practice.
  2684.  
  2685. Syntax change
  2686. -------------
  2687.  
  2688. - The raise statement can now be used without arguments, to re-raise 
  2689. a previously set exception.  This should be used after catching an
  2690. exception with an except clause only, either in the except clause or
  2691. later in the same function.
  2692.  
  2693. Import and module handling
  2694. --------------------------
  2695.  
  2696. - The implementation of import has changed to use a mutex (when
  2697. threading is supported).  This means that when two threads
  2698. simultaneously import the same module, the import statements are
  2699. serialized.  Recursive imports are not affected.
  2700.  
  2701. - Rewrote the finalization code almost completely, to be much more
  2702. careful with the order in which modules are destroyed.  Destructors
  2703. will now generally be able to reference built-in names such as None
  2704. without trouble.
  2705.  
  2706. - Case-insensitive platforms such as Mac and Windows require the case
  2707. of a module's filename to match the case of the module name as
  2708. specified in the import statement (see below).
  2709.  
  2710. - The code for figuring out the default path now distinguishes between
  2711. files, modules, executable files, and directories.  When expecting a
  2712. module, we also look for the .pyc or .pyo file.
  2713.  
  2714. Parser/tokenizer changes
  2715. ------------------------
  2716.  
  2717. - The tokenizer can now warn you when your source code mixes tabs and
  2718. spaces for indentation in a manner that depends on how much a tab is
  2719. worth in spaces.  Use "python -t" or "python -v" to enable this
  2720. option.  Use "python -tt" to turn the warnings into errors.  (See also
  2721. tabnanny.py and tabpolice.py below.)
  2722.  
  2723. - Return unsigned characters from tok_nextc(), so '\377' isn't
  2724. mistaken for an EOF character.
  2725.  
  2726. - Fixed two pernicious bugs in the tokenizer that only affected AIX.
  2727. One was actually a general bug that was triggered by AIX's smaller I/O
  2728. buffer size.  The other was a bug in the AIX optimizer's loop
  2729. unrolling code; swapping two statements made the problem go away.
  2730.  
  2731. Tools, demos and miscellaneous files
  2732. ------------------------------------
  2733.  
  2734. - There's a new version of Misc/python-mode.el (the Emacs mode for
  2735. Python) which is much smarter about guessing the indentation style
  2736. used in a particular file.  Lots of other cool features too!
  2737.  
  2738. - There are two new tools in Tools/scripts: tabnanny.py and
  2739. tabpolice.py, implementing two different ways of checking whether a
  2740. file uses indentation in a way that is sensitive to the interpretation
  2741. of a tab.  The preferred module is tabnanny.py (by Tim Peters).
  2742.  
  2743. - Some new demo programs:
  2744.  
  2745.     Demo/tkinter/guido/paint.py -- Dave Mitchell
  2746.     Demo/sockets/unixserver.py -- Piet van Oostrum
  2747.     
  2748.  
  2749. - Much better freeze support.  The freeze script can now freeze
  2750. hierarchical module names (with a corresponding change to import.c),
  2751. and has a few extra options (e.g. to suppress freezing specific
  2752. modules).  It also does much more on Windows NT.
  2753.  
  2754. - Version 1.0 of the faq wizard is included (only very small changes
  2755. since version 0.9.0).
  2756.  
  2757. - New feature for the ftpmirror script: when removing local files
  2758. (i.e., only when -r is used), do a recursive delete.
  2759.  
  2760. Configuring and building Python
  2761. -------------------------------
  2762.  
  2763. - Get rid of the check for -linet -- recent Sequent Dynix systems don't
  2764. need this any more and apparently it screws up their configuration.
  2765.  
  2766. - Some changes because gcc on SGI doesn't support '-all'.
  2767.  
  2768. - Changed the build rules to use $(LIBRARY) instead of
  2769.   -L.. -lpython$(VERSION)
  2770. since the latter trips up the SunOS 4.1.x linker (sigh).
  2771.  
  2772. - Fix the bug where the '# dgux is broken' comment in the Makefile
  2773. tripped over Make on some platforms.
  2774.  
  2775. - Changes for AIX: install the python.exp file; properly use
  2776. $(srcdir); the makexp_aix script now removes C++ entries of the form
  2777. Class::method.
  2778.  
  2779. - Deleted some Makefile targets only used by the (long obsolete)
  2780. gMakefile hacks.
  2781.  
  2782. Extension modules
  2783. -----------------
  2784.  
  2785. - Performance and threading improvements to the socket and bsddb
  2786. modules, by Christopher Lindblad of Infoseek.
  2787.  
  2788. - Added operator.__not__ and operator.not_.
  2789.  
  2790. - In the thread module, when a thread exits due to an unhandled
  2791. exception, don't store the exception information in sys.last_*; it
  2792. prevents proper calling of destructors of local variables.
  2793.  
  2794. - Fixed a number of small bugs in the cPickle module.
  2795.  
  2796. - Changed find() and rfind() in the strop module so that
  2797. find("x","",2) returns -1, matching the implementation in string.py.
  2798.  
  2799. - In the time module, be more careful with the result of ctime(), and
  2800. test for HAVE_MKTIME before usinmg mktime().
  2801.  
  2802. - Doc strings contributed by Mitch Chapman to the termios, pwd, gdbm
  2803. modules.
  2804.  
  2805. - Added the LOG_SYSLOG constant to the syslog module, if defined.
  2806.  
  2807. Standard library modules
  2808. ------------------------
  2809.  
  2810. - All standard library modules have been converted to an indentation
  2811. style using either only tabs or only spaces -- never a mixture -- if
  2812. they weren't already consistent according to tabnanny.  This means
  2813. that the new -t option (see above) won't complain about standard
  2814. library modules.
  2815.  
  2816. - New standard library modules:
  2817.  
  2818.     threading -- GvR and the thread-sig
  2819.         Java style thread objects -- USE THIS!!!
  2820.  
  2821.     getpass -- Piers Lauder
  2822.         simple utilities to prompt for a password and to
  2823.         retrieve the current username
  2824.  
  2825.     imaplib -- Piers Lauder
  2826.         interface for the IMAP4 protocol
  2827.  
  2828.     poplib -- David Ascher, Piers Lauder
  2829.         interface for the POP3 protocol
  2830.  
  2831.     smtplib -- Dragon De Monsyne
  2832.         interface for the SMTP protocol
  2833.  
  2834. - Some obsolete modules moved to a separate directory (Lib/lib-old)
  2835. which is *not* in the default module search path:
  2836.  
  2837.     Para
  2838.     addpack
  2839.     codehack
  2840.     fmt
  2841.     lockfile
  2842.     newdir
  2843.     ni
  2844.     rand
  2845.     tb
  2846.  
  2847. - New version of the PCRE code (Perl Compatible Regular Expressions --
  2848. the re module and the supporting pcre extension) by Andrew Kuchling.
  2849. Incompatible new feature in re.sub(): the handling of escapes in the
  2850. replacement string has changed.
  2851.  
  2852. - Interface change in the copy module: a __deepcopy__ method is now
  2853. called with the memo dictionary as an argument.
  2854.  
  2855. - Feature change in the tokenize module: differentiate between NEWLINE
  2856. token (an official newline) and NL token (a newline that the grammar
  2857. ignores).
  2858.  
  2859. - Several bugfixes to the urllib module.  It is now truly thread-safe,
  2860. and several bugs and a portability problem have been fixed.  New
  2861. features, all due to Sjoerd Mullender: When creating a temporary file,
  2862. it gives it an appropriate suffix.  Support the "data:" URL scheme.
  2863. The open() method uses the tempcache.
  2864.  
  2865. - New version of the xmllib module (this time with a test suite!) by
  2866. Sjoerd Mullender.
  2867.  
  2868. - Added debugging code to the telnetlib module, to be able to trace
  2869. the actual traffic.
  2870.  
  2871. - In the rfc822 module, added support for deleting a header (still no
  2872. support for adding headers, though).  Also fixed a bug where an
  2873. illegal address would cause a crash in getrouteaddr(), fixed a
  2874. sign reversal in mktime_tz(), and use the local timezone by default
  2875. (the latter two due to Bill van Melle).
  2876.  
  2877. - The normpath() function in the dospath and ntpath modules no longer
  2878. does case normalization -- for that, use the separate function
  2879. normcase() (which always existed); normcase() has been sped up and
  2880. fixed (it was the cause of a crash in Mark Hammond's installer in
  2881. certain locales).
  2882.  
  2883. - New command supported by the ftplib module: rmd(); also fixed some
  2884. minor bugs.
  2885.  
  2886. - The profile module now uses a different timer function by default -- 
  2887. time.clock() is generally better than os.times().  This makes it work
  2888. better on Windows NT, too.
  2889.  
  2890. - The tempfile module now recovers when os.getcwd() raises an
  2891. exception.
  2892.  
  2893. - Fixed some bugs in the random module; gauss() was subtly wrong, and
  2894. vonmisesvariate() should return a full circle.  Courtesy Mike Miller,
  2895. Lambert Meertens (gauss()), and Magnus Kessler (vonmisesvariate()).
  2896.  
  2897. - Better default seed in the whrandom module, courtesy Andrew Kuchling.
  2898.  
  2899. - Fix slow close() in shelve module.
  2900.  
  2901. - The Unix mailbox class in the mailbox module is now more robust when
  2902. a line begins with the string "From " but is definitely not the start
  2903. of a new message.  The pattern used can be changed by overriding a
  2904. method or class variable.
  2905.  
  2906. - Added a rmtree() function to the copy module.
  2907.  
  2908. - Fixed several typos in the pickle module.  Also fixed problems when
  2909. unpickling in restricted execution environments.
  2910.  
  2911. - Added docstrings and fixed a typo in the py_compile and compileall
  2912. modules.  At Mark Hammond's repeated request, py_compile now append a
  2913. newline to the source if it needs one.  Both modules support an extra
  2914. parameter to specify the purported source filename (to be used in
  2915. error messages).
  2916.  
  2917. - Some performance tweaks by Jeremy Hylton to the gzip module.
  2918.  
  2919. - Fixed a bug in the merge order of dictionaries in the ConfigParser
  2920. module.  Courtesy Barry Warsaw.
  2921.  
  2922. - In the multifile module, support the optional second parameter to
  2923. seek() when possible.
  2924.  
  2925. - Several fixes to the gopherlib module by Lars Marius Garshol.  Also, 
  2926. urlparse now correctly handles Gopher URLs with query strings.
  2927.  
  2928. - Fixed a tiny bug in format_exception() in the traceback module.
  2929. Also rewrite tb_lineno() to be compatible with JPython (and not
  2930. disturb the current exception!); by Jim Hugunin.
  2931.  
  2932. - The httplib module is more robust when servers send a short response 
  2933. -- courtesy Tim O'Malley.
  2934.  
  2935. Tkinter and friends
  2936. -------------------
  2937.  
  2938. - Various typos and bugs fixed.
  2939.  
  2940. - New module Tkdnd implements a drag-and-drop protocol (within one
  2941. application only).
  2942.  
  2943. - The event_*() widget methods have been restructured slightly -- they
  2944. no longer use the default root.
  2945.  
  2946. - The interfaces for the bind*() and unbind() widget methods have been
  2947. redesigned; the bind*() methods now return the name of the Tcl command 
  2948. created for the callback, and this can be passed as a optional
  2949. argument to unbind() in order to delete the command (normally, such
  2950. commands are automatically unbound when the widget is destroyed, but
  2951. for some applications this isn't enough).
  2952.  
  2953. - Variable objects now have trace methods to interface to Tcl's
  2954. variable tracing facilities.
  2955.  
  2956. - Image objects now have an optional keyword argument, 'master', to
  2957. specify a widget (tree) to which they belong.  The image_names() and
  2958. image_types() calls are now also widget methods.
  2959.  
  2960. - There's a new global call, Tkinter.NoDefaultRoot(), which disables
  2961. all use of the default root by the Tkinter library.  This is useful to
  2962. debug applications that are in the process of being converted from
  2963. relying on the default root to explicit specification of the root
  2964. widget.
  2965.  
  2966. - The 'exit' command is deleted from the Tcl interpreter, since it
  2967. provided a loophole by which one could (accidentally) exit the Python
  2968. interpreter without invoking any cleanup code.
  2969.  
  2970. - Tcl_Finalize() is now registered as a Python low-level exit handle,
  2971. so Tcl will be finalized when Python exits.
  2972.  
  2973. The Python/C API
  2974. ----------------
  2975.  
  2976. - New function PyThreadState_GetDict() returns a per-thread dictionary
  2977. intended for storing thread-local global variables.
  2978.  
  2979. - New functions Py_ReprEnter() and Py_ReprLeave() use the per-thread
  2980. dictionary to allow recursive container types to detect recursion in
  2981. their repr(), str() and print implementations.
  2982.  
  2983. - New function PyObject_Not(x) calculates (not x) according to Python's 
  2984. standard rules (basically, it negates the outcome PyObject_IsTrue(x).
  2985.  
  2986. - New function _PyModule_Clear(), which clears a module's dictionary
  2987. carefully without removing the __builtins__ entry.  This is implied
  2988. when a module object is deallocated (this used to clear the dictionary
  2989. completely).
  2990.  
  2991. - New function PyImport_ExecCodeModuleEx(), which extends
  2992. PyImport_ExecCodeModule() by adding an extra parameter to pass it the
  2993. true file.
  2994.  
  2995. - New functions Py_GetPythonHome() and Py_SetPythonHome(), intended to
  2996. allow embedded applications to force a different value for PYTHONHOME.
  2997.  
  2998. - New global flag Py_FrozenFlag is set when this is a "frozen" Python
  2999. binary; it suppresses warnings about not being able to find the
  3000. standard library directories.
  3001.  
  3002. - New global flag Py_TabcheckFlag is incremented by the -t option and
  3003. causes the tokenizer to issue warnings or errors about inconsistent
  3004. mixing of tabs and spaces for indentation.
  3005.  
  3006. Miscellaneous minor changes and bug fixes
  3007. -----------------------------------------
  3008.  
  3009. - Improved the error message when an attribute of an attribute-less
  3010. object is requested -- include the name of the attribute and the type
  3011. of the object in the message.
  3012.  
  3013. - Sped up int(), long(), float() a bit.
  3014.  
  3015. - Fixed a bug in list.sort() that would occasionally dump core.
  3016.  
  3017. - Fixed a bug in PyNumber_Power() that caused numeric arrays to fail
  3018. when taken tothe real power.
  3019.  
  3020. - Fixed a number of bugs in the file reading code, at least one of
  3021. which could cause a core dump on NT, and one of which would
  3022. occasionally cause file.read() to return less than the full contents
  3023. of the file.
  3024.  
  3025. - Performance hack by Vladimir Marangozov for stack frame creation.
  3026.  
  3027. - Make sure setvbuf() isn't used unless HAVE_SETVBUF is defined.
  3028.  
  3029. Windows 95/NT
  3030. -------------
  3031.  
  3032. - The .lib files are now part of the distribution; they are collected
  3033. in the subdirectory "libs" of the installation directory.
  3034.  
  3035. - The extension modules (.pyd files) are now collected in a separate
  3036. subdirectory of the installation directory named "DLLs".
  3037.  
  3038. - The case of a module's filename must now match the case of the
  3039. module name as specified in the import statement.  This is an
  3040. experimental feature -- if it turns out to break in too many
  3041. situations, it will be removed (or disabled by default) in the future.
  3042. It can be disabled on a per-case basis by setting the environment
  3043. variable PYTHONCASEOK (to any value).
  3044.  
  3045.  
  3046. ======================================================================
  3047.  
  3048.  
  3049. =====================================
  3050. ==> Release 1.5 (January 3, 1998) <==
  3051. =====================================
  3052.  
  3053.  
  3054. From 1.5b2 to 1.5
  3055. =================
  3056.  
  3057. - Newly documentated module: BaseHTTPServer.py, thanks to Greg Stein.
  3058.  
  3059. - Added doc strings to string.py, stropmodule.c, structmodule.c,
  3060. thanks to Charles Waldman.
  3061.  
  3062. - Many nits fixed in the manuals, thanks to Fred Drake and many others
  3063. (especially Rob Hooft and Andrew Kuchling).  The HTML version now uses
  3064. HTML markup instead of inline GIF images for tables; only two images
  3065. are left (for obsure bits of math).  The index of the HTML version has
  3066. also been much improved.  Finally, it is once again possible to
  3067. generate an Emacs info file from the library manual (but I don't
  3068. commit to supporting this in future versions).
  3069.  
  3070. - New module: telnetlib.py (a simple telnet client library).
  3071.  
  3072. - New tool: Tools/versioncheck/, by Jack Jansen.
  3073.  
  3074. - Ported zlibmodule.c and bsddbmodule.c to NT; The project file for MS
  3075. DevStudio 5.0 now includes new subprojects to build the zlib and bsddb
  3076. extension modules.
  3077.  
  3078. - Many small changes again to Tkinter.py -- mostly bugfixes and adding
  3079. missing routines.  Thanks to Greg McFarlane for reporting a bunch of
  3080. problems and proofreading my fixes.
  3081.  
  3082. - The re module and its documentation are up to date with the latest
  3083. version released to the string-sig (Dec. 22).
  3084.  
  3085. - Stop test_grp.py from failing when the /etc/group file is empty
  3086. (yes, this happens!).
  3087.  
  3088. - Fix bug in integer conversion (mystrtoul.c) that caused
  3089. 4294967296==0 to be true!
  3090.  
  3091. - The VC++ 4.2 project file should be complete again.
  3092.  
  3093. - In tempfile.py, use a better template on NT, and add a new optional
  3094. argument "suffix" with default "" to specify a specific extension for
  3095. the temporary filename (needed sometimes on NT but perhaps also handy
  3096. elsewhere).
  3097.  
  3098. - Fixed some bugs in the FAQ wizard, and converted it to use re
  3099. instead of regex.
  3100.  
  3101. - Fixed a mysteriously undetected error in dlmodule.c (it was using a
  3102. totally bogus routine name to raise an exception).
  3103.  
  3104. - Fixed bug in import.c which wasn't using the new "dos-8x3" name yet.
  3105.  
  3106. - Hopefully harmless changes to the build process to support shared
  3107. libraries on DG/UX.  This adds a target to create
  3108. libpython$(VERSION).so; however this target is *only* for DG/UX.
  3109.  
  3110. - Fixed a bug in the new format string error checking in getargs.c.
  3111.  
  3112. - A simple fix for infinite recursion when printing __builtins__:
  3113. reset '_' to None before printing and set it to the printed variable
  3114. *after* printing (and only when printing is successful).
  3115.  
  3116. - Fixed lib-tk/SimpleDialog.py to keep the dialog visible even if the
  3117. parent window is not (Skip Montanaro).
  3118.  
  3119. - Fixed the two most annoying problems with ftp URLs in
  3120. urllib.urlopen(); an empty file now correctly raises an error, and it
  3121. is no longer required to explicitly close the returned "file" object
  3122. before opening another ftp URL to the same host and directory.
  3123.  
  3124.  
  3125. ======================================================================
  3126.  
  3127.  
  3128. From 1.5b1 to 1.5b2
  3129. ===================
  3130.  
  3131. - Fixed a bug in cPickle.c that caused it to crash right away because
  3132. the version string had a different format.
  3133.  
  3134. - Changes in pickle.py and cPickle.c: when unpickling an instance of a
  3135. class that doesn't define the __getinitargs__() method, the __init__()
  3136. constructor is no longer called.  This makes a much larger group of
  3137. classes picklable by default, but may occasionally change semantics.
  3138. To force calling __init__() on unpickling, define a __getinitargs__()
  3139. method.  Other changes too, in particular cPickle now handles classes
  3140. defined in packages correctly.  The same change applies to copying
  3141. instances with copy.py.  The cPickle.c changes and some pickle.py
  3142. changes are courtesy Jim Fulton.
  3143.  
  3144. - Locale support in he "re" (Perl regular expressions) module.  Use 
  3145. the flag re.L (or re.LOCALE) to enable locale-specific matching
  3146. rules for \w and \b.  The in-line syntax for this flag is (?L).
  3147.  
  3148. - The built-in function isinstance(x, y) now also succeeds when y is
  3149. a type object and type(x) is y.
  3150.  
  3151. - repr() and str() of class and instance objects now reflect the
  3152. package/module in which the class is defined.
  3153.  
  3154. - Module "ni" has been removed.  (If you really need it, it's been
  3155. renamed to "ni1".  Let me know if this causes any problems for you.
  3156. Package authors are encouraged to write __init__.py files that
  3157. support both ni and 1.5 package support, so the same version can be
  3158. used with Python 1.4 as well as 1.5.)
  3159.  
  3160. - The thread module is now automatically included when threads are
  3161. configured.  (You must remove it from your existing Setup file,
  3162. since it is now in its own Setup.thread file.)
  3163.  
  3164. - New command line option "-x" to skip the first line of the script;
  3165. handy to make executable scripts on non-Unix platforms.
  3166.  
  3167. - In importdl.c, add the RTLD_GLOBAL to the dlopen() flags.  I
  3168. haven't checked how this affects things, but it should make symbols
  3169. in one shared library available to the next one.
  3170.  
  3171. - The Windows installer now installs in the "Program Files" folder on
  3172. the proper volume by default.
  3173.  
  3174. - The Windows configuration adds a new main program, "pythonw", and
  3175. registers a new extension, ".pyw" that invokes this.  This is a
  3176. pstandard Python interpreter that does not pop up a console window;
  3177. handy for pure Tkinter applications.  All output to the original
  3178. stdout and stderr is lost; reading from the original stdin yields
  3179. EOF.  Also, both python.exe and pythonw.exe now have a pretty icon
  3180. (a green snake in a box, courtesy Mark Hammond).
  3181.  
  3182. - Lots of improvements to emacs-mode.el again.  See Barry's web page:
  3183. http://www.python.org/ftp/emacs/pmdetails.html.
  3184.  
  3185. - Lots of improvements and additions to the library reference manual;
  3186. many by Fred Drake.
  3187.  
  3188. - Doc strings for the following modules: rfc822.py, posixpath.py,
  3189. ntpath.py, httplib.py.  Thanks to Mitch Chapman and Charles Waldman.
  3190.  
  3191. - Some more regression testing.
  3192.  
  3193. - An optional 4th (maxsplit) argument to strop.replace().
  3194.  
  3195. - Fixed handling of maxsplit in string.splitfields().
  3196.  
  3197. - Tweaked os.environ so it can be pickled and copied.
  3198.  
  3199. - The portability problems caused by indented preprocessor commands
  3200. and C++ style comments should be gone now.
  3201.  
  3202. - In random.py, added Pareto and Weibull distributions.
  3203.  
  3204. - The crypt module is now disabled in Modules/Setup.in by default; it
  3205. is rarely needed and causes errors on some systems where users often
  3206. don't know how to deal with those.
  3207.  
  3208. - Some improvements to the _tkinter build line suggested by Case Roole.
  3209.  
  3210. - A full suite of platform specific files for NetBSD 1.x, submitted by 
  3211. Anders Andersen.
  3212.  
  3213. - New Solaris specific header STROPTS.py.
  3214.  
  3215. - Moved a confusing occurrence of *shared* from the comments in
  3216. Modules/Setup.in (people would enable this one instead of the real
  3217. one, and get disappointing results).
  3218.  
  3219. - Changed the default mode for directories to be group-writable when
  3220. the installation process creates them.
  3221.  
  3222. - Check for pthread support in "-l_r" for FreeBSD/NetBSD, and support
  3223. shared libraries for both.
  3224.  
  3225. - Support FreeBSD and NetBSD in posixfile.py.
  3226.  
  3227. - Support for the "event" command, new in Tk 4.2.  By Case Roole.
  3228.  
  3229. - Add Tix_SafeInit() support to tkappinit.c.
  3230.  
  3231. - Various bugs fixed in "re.py" and "pcre.c".
  3232.  
  3233. - Fixed a bug (broken use of the syntax table) in the old "regexpr.c".
  3234.  
  3235. - In frozenmain.c, stdin is made unbuffered too when PYTHONUNBUFFERED
  3236. is set.
  3237.  
  3238. - Provide default blocksize for retrbinary in ftplib.py (Skip
  3239. Montanaro).
  3240.  
  3241. - In NT, pick the username up from different places in user.py (Jeff
  3242. Bauer).
  3243.  
  3244. - Patch to urlparse.urljoin() for ".." and "..#1", Marc Lemburg.
  3245.  
  3246. - Many small improvements to Jeff Rush' OS/2 support.
  3247.  
  3248. - ospath.py is gone; it's been obsolete for so many years now...
  3249.  
  3250. - The reference manual is now set up to prepare better HTML (still
  3251. using webmaker, alas).
  3252.  
  3253. - Add special handling to /Tools/freeze for Python modules that are
  3254. imported implicitly by the Python runtime: 'site' and 'exceptions'.
  3255.  
  3256. - Tools/faqwiz 0.8.3 -- add an option to suppress URL processing
  3257. inside <PRE>, by "Scott".
  3258.  
  3259. - Added ConfigParser.py, a generic parser for sectioned configuration
  3260. files.
  3261.  
  3262. - In _localemodule.c, LC_MESSAGES is not always defined; put it
  3263. between #ifdefs.
  3264.  
  3265. - Typo in resource.c: RUSAGE_CHILDERN -> RUSAGE_CHILDREN.
  3266.  
  3267. - Demo/scripts/newslist.py: Fix the way the version number is gotten
  3268. out of the RCS revision.
  3269.  
  3270. - PyArg_Parse[Tuple] now explicitly check for bad characters at the
  3271. end of the format string.
  3272.  
  3273. - Revamped PC/example_nt to support VC++ 5.x.
  3274.  
  3275. - <listobject>.sort() now uses a modified quicksort by Raymund Galvin,
  3276. after studying the GNU libg++ quicksort.  This should be much faster
  3277. if there are lots of duplicates, and otherwise at least as good.
  3278.  
  3279. - Added "uue" as an alias for "uuencode" to mimetools.py.  (Hm, the
  3280. uudecode bug where it complaints about trailing garbage is still there 
  3281. :-( ).
  3282.  
  3283. - pickle.py requires integers in text mode to be in decimal notation
  3284. (it used to accept octal and hex, even though it would only generate
  3285. decimal numbers).
  3286.  
  3287. - In string.atof(), don't fail when the "re" module is unavailable.
  3288. Plug the ensueing security leak by supplying an empty __builtins__
  3289. directory to eval().
  3290.  
  3291. - A bunch of small fixes and improvements to Tkinter.py.
  3292.  
  3293. - Fixed a buffer overrun in PC/getpathp.c.
  3294.  
  3295.  
  3296. ======================================================================
  3297.  
  3298.  
  3299. From 1.5a4 to 1.5b1
  3300. ===================
  3301.  
  3302. - The Windows NT/95 installer now includes full HTML of all manuals.
  3303. It also has a checkbox that lets you decide whether to install the
  3304. interpreter and library.  The WISE installer script for the installer
  3305. is included in the source tree as PC/python15.wse, and so are the
  3306. icons used for Python files.  The config.c file for the Windows build
  3307. is now complete with the pcre module.
  3308.  
  3309. - sys.ps1 and sys.ps2 can now arbitrary objects; their str() is
  3310. evaluated for the prompt.
  3311.  
  3312. - The reference manual is brought up to date (more or less -- it still
  3313. needs work, e.g. in the area of package import).
  3314.  
  3315. - The icons used by latex2html are now included in the Doc
  3316. subdirectory (mostly so that tarring up the HTML files can be fully
  3317. automated).  A simple index.html is also added to Doc (it only works
  3318. after you have successfully run latex2html).
  3319.  
  3320. - For all you would-be proselytizers out there: a new version of
  3321. Misc/BLURB describes Python more concisely, and Misc/comparisons
  3322. compares Python to several other languages.  Misc/BLURB.WINDOWS
  3323. contains a blurb specifically aimed at Windows programmers (by Mark
  3324. Hammond).
  3325.  
  3326. - A new version of the Python mode for Emacs is included as
  3327. Misc/python-mode.el.  There are too many new features to list here.
  3328. See http://www.python.org/ftp/emacs/pmdetails.html for more info.
  3329.  
  3330. - New module fileinput makes iterating over the lines of a list of
  3331. files easier.  (This still needs some more thinking to make it more
  3332. extensible.)
  3333.  
  3334. - There's full OS/2 support, courtesy Jeff Rush.  To build the OS/2
  3335. version, see PC/readme.txt and PC/os2vacpp.  This is for IBM's Visual
  3336. Age C++ compiler.  I expect that Jeff will also provide a binary
  3337. release for this platform.
  3338.  
  3339. - On Linux, the configure script now uses '-Xlinker -export-dynamic'
  3340. instead of '-rdynamic' to link the main program so that it exports its
  3341. symbols to shared libraries it loads dynamically.  I hope this doesn't
  3342. break on older Linux versions; it is needed for mklinux and appears to
  3343. work on Linux 2.0.30.
  3344.  
  3345. - Some Tkinter resstructuring: the geometry methods that apply to a
  3346. master are now properly usable on toplevel master widgets.  There's a
  3347. new (internal) widget class, BaseWidget.  New, longer "official" names
  3348. for the geometry manager methods have been added,
  3349. e.g. "grid_columnconfigure()" instead of "columnconfigure()".  The old
  3350. shorter names still work, and where there's ambiguity, pack wins over
  3351. place wins over grid.  Also, the bind_class method now returns its
  3352. value.
  3353.  
  3354. - New, RFC-822 conformant parsing of email addresses and address lists
  3355. in the rfc822 module, courtesy Ben Escoto.
  3356.  
  3357. - New, revamped tkappinit.c with support for popular packages (PIL,
  3358. TIX, BLT, TOGL).  For the last three, you need to execute the Tcl
  3359. command "load {} Tix" (or Blt, or Togl) to gain access to them.
  3360. The Modules/Setup line for the _tkinter module has been rewritten
  3361. using the cool line-breaking feature of most Bourne shells.
  3362.  
  3363. - New socket method connect_ex() returns the error code from connect()
  3364. instead of raising an exception on errors; this makes the logic
  3365. required for asynchronous connects simpler and more efficient.
  3366.  
  3367. - New "locale" module with (still experimental) interface to the
  3368. standard C library locale interface, courtesy Martin von Loewis.  This
  3369. does not repeat my mistake in 1.5a4 of always calling
  3370. setlocale(LC_ALL, "").  In fact, we've pretty much decided that
  3371. Python's standard numerical formatting operations should always use
  3372. the conventions for the C locale; the locale module contains utility
  3373. functions to format numbers according to the user specified locale.
  3374. (All this is accomplished by an explicit call to setlocale(LC_NUMERIC,
  3375. "C") after locale-changing calls.)  See the library manual. (Alas, the
  3376. promised changes to the "re" module for locale support have not been
  3377. materialized yet.  If you care, volunteer!)
  3378.  
  3379. - Memory leak plugged in Py_BuildValue when building a dictionary.
  3380.  
  3381. - Shared modules can now live inside packages (hierarchical module
  3382. namespaces).  No changes to the shared module itself are needed.
  3383.  
  3384. - Improved policy for __builtins__: this is a module in __main__ and a
  3385. dictionary everywhere else.
  3386.  
  3387. - Python no longer catches SIGHUP and SIGTERM by default.  This was
  3388. impossible to get right in the light of thread contexts.  If you want
  3389. your program to clean up when a signal happens, use the signal module
  3390. to set up your own signal handler.
  3391.  
  3392. - New Python/C API PyNumber_CoerceEx() does not return an exception
  3393. when no coercion is possible.  This is used to fix a problem where
  3394. comparing incompatible numbers for equality would raise an exception
  3395. rather than return false as in Python 1.4 -- it once again will return
  3396. false.
  3397.  
  3398. - The errno module is changed again -- the table of error messages
  3399. (errorstr) is removed.  Instead, you can use os.strerror().  This
  3400. removes redundance and a potential locale dependency.
  3401.  
  3402. - New module xmllib, to parse XML files.  By Sjoerd Mullender.
  3403.  
  3404. - New C API PyOS_AfterFork() is called after fork() in posixmodule.c.
  3405. It resets the signal module's notion of what the current process ID
  3406. and thread are, so that signal handlers will work after (and across)
  3407. calls to os.fork().
  3408.  
  3409. - Fixed most occurrences of fatal errors due to missing thread state.
  3410.  
  3411. - For vgrind (a flexible source pretty printer) fans, there's a simple
  3412. Python definition in Misc/vgrindefs, courtesy Neale Pickett.
  3413.  
  3414. - Fixed memory leak in exec statement.
  3415.  
  3416. - The test.pystone module has a new function, pystones(loops=LOOPS),
  3417. which returns a (benchtime, stones) tuple.  The main() function now
  3418. calls this and prints the report.
  3419.  
  3420. - Package directories now *require* the presence of an __init__.py (or
  3421. __init__.pyc) file before they are considered as packages.  This is
  3422. done to prevent accidental subdirectories with common names from
  3423. overriding modules with the same name.
  3424.  
  3425. - Fixed some strange exceptions in __del__ methods in library modules
  3426. (e.g. urllib).  This happens because the builtin names are already
  3427. deleted by the time __del__ is called.  The solution (a hack, but it
  3428. works) is to set some instance variables to 0 instead of None.
  3429.  
  3430. - The table of built-in module initializers is replaced by a pointer
  3431. variable.  This makes it possible to switch to a different table at
  3432. run time, e.g. when a collection of modules is loaded from a shared
  3433. library.  (No example code of how to do this is given, but it is
  3434. possible.)  The table is still there of course, its name prefixed with
  3435. an underscore and used to initialize the pointer.
  3436.  
  3437. - The warning about a thread still having a frame now only happens in
  3438. verbose mode.
  3439.  
  3440. - Change the signal finialization so that it also resets the signal
  3441. handlers.  After this has been called, our signal handlers are no
  3442. longer active!
  3443.  
  3444. - New version of tokenize.py (by Ka-Ping Yee) recognizes raw string
  3445. literals.  There's now also a test fort this module.
  3446.  
  3447. - The copy module now also uses __dict__.update(state) instead of
  3448. going through individual attribute assignments, for class instances
  3449. without a __setstate__ method.
  3450.  
  3451. - New module reconvert translates old-style (regex module) regular
  3452. expressions to new-style (re module, Perl-style) regular expressions.
  3453.  
  3454. - Most modules that used to use the regex module now use the re
  3455. module.  The grep module has a new pgrep() function which uses
  3456. Perl-style regular expressions.
  3457.  
  3458. - The (very old, backwards compatibility) regexp.py module has been
  3459. deleted.
  3460.  
  3461. - Restricted execution (rexec): added the pcre module (support for the
  3462. re module) to the list of trusted extension modules.
  3463.  
  3464. - New version of Jim Fulton's CObject object type, adds
  3465. PyCObject_FromVoidPtrAndDesc() and PyCObject_GetDesc() APIs.
  3466.  
  3467. - Some patches to Lee Busby's fpectl mods that accidentally didn't
  3468. make it into 1.5a4.
  3469.  
  3470. - In the string module, add an optional 4th argument to count(),
  3471. matching find() etc.
  3472.  
  3473. - Patch for the nntplib module by Charles Waldman to add optional user
  3474. and password arguments to NNTP.__init__(), for nntp servers that need
  3475. them.
  3476.  
  3477. - The str() function for class objects now returns
  3478. "modulename.classname" instead of returning the same as repr().
  3479.  
  3480. - The parsing of \xXX escapes no longer relies on sscanf().
  3481.  
  3482. - The "sharedmodules" subdirectory of the installation is renamed to
  3483. "lib-dynload".  (You may have to edit your Modules/Setup file to fix
  3484. this in an existing installation!)
  3485.  
  3486. - Fixed Don Beaudry's mess-up with the OPT test in the configure
  3487. script.  Certain SGI platforms will still issue a warning for each
  3488. compile; there's not much I can do about this since the compiler's
  3489. exit status doesn't indicate that I was using an obsolete option.
  3490.  
  3491. - Fixed Barry's mess-up with {}.get(), and added test cases for it.
  3492.  
  3493. - Shared libraries didn't quite work under AIX because of the change
  3494. in status of the GNU readline interface.  Fix due to by Vladimir
  3495. Marangozov.
  3496.  
  3497.  
  3498. ======================================================================
  3499.  
  3500.  
  3501. From 1.5a3 to 1.5a4
  3502. ===================
  3503.  
  3504. - faqwiz.py: version 0.8; Recognize https:// as URL; <html>...</html>
  3505. feature; better install instructions; removed faqmain.py (which was an
  3506. older version).
  3507.  
  3508. - nntplib.py: Fixed some bugs reported by Lars Wirzenius (to Debian)
  3509. about the treatment of lines starting with '.'.  Added a minimal test
  3510. function.
  3511.  
  3512. - struct module: ignore most whitespace in format strings.
  3513.  
  3514. - urllib.py: close the socket and temp file in URLopener.retrieve() so
  3515. that multiple retrievals using the same connection work.
  3516.  
  3517. - All standard exceptions are now classes by default; use -X to make
  3518. them strings (for backward compatibility only).
  3519.  
  3520. - There's a new standard exception hierarchy, defined in the standard
  3521. library module exceptions.py (which you never need to import
  3522. explicitly).  See
  3523. http://grail.cnri.reston.va.us/python/essays/stdexceptions.html for
  3524. more info.
  3525.  
  3526. - Three new C API functions:
  3527.  
  3528.   - int PyErr_GivenExceptionMatches(obj1, obj2)
  3529.  
  3530.     Returns 1 if obj1 and obj2 are the same object, or if obj1 is an
  3531.     instance of type obj2, or of a class derived from obj2
  3532.  
  3533.   - int PyErr_ExceptionMatches(obj)
  3534.  
  3535.     Higher level wrapper around PyErr_GivenExceptionMatches() which uses
  3536.     PyErr_Occurred() as obj1.  This will be the more commonly called
  3537.     function.
  3538.  
  3539.   - void PyErr_NormalizeException(typeptr, valptr, tbptr)
  3540.  
  3541.     Normalizes exceptions, and places the normalized values in the
  3542.     arguments.  If type is not a class, this does nothing.  If type is a
  3543.     class, then it makes sure that value is an instance of the class by:
  3544.  
  3545.     1. if instance is of the type, or a class derived from type, it does
  3546.        nothing.
  3547.  
  3548.     2. otherwise it instantiates the class, using the value as an
  3549.        argument.  If value is None, it uses an empty arg tuple, and if
  3550.        the value is a tuple, it uses just that.
  3551.  
  3552. - Another new C API function: PyErr_NewException() creates a new
  3553. exception class derived from Exception; when -X is given, it creates a
  3554. new string exception.
  3555.  
  3556. - core interpreter: remove the distinction between tuple and list
  3557. unpacking; allow an arbitrary sequence on the right hand side of any
  3558. unpack instruction.  (UNPACK_LIST and UNPACK_TUPLE now do the same
  3559. thing, which should really be called UNPACK_SEQUENCE.)
  3560.  
  3561. - classes: Allow assignments to an instance's __dict__ or __class__,
  3562. so you can change ivars (including shared ivars -- shock horror) and
  3563. change classes dynamically.  Also make the check on read-only
  3564. attributes of classes less draconic -- only the specials names
  3565. __dict__, __bases__, __name__ and __{get,set,del}attr__ can't be
  3566. assigned.
  3567.  
  3568. - Two new built-in functions: issubclass() and isinstance().  Both
  3569. take classes as their second arguments.  The former takes a class as
  3570. the first argument and returns true iff first is second, or is a
  3571. subclass of second.  The latter takes any object as the first argument
  3572. and returns true iff first is an instance of the second, or any
  3573. subclass of second.
  3574.  
  3575. - configure: Added configuration tests for presence of alarm(),
  3576. pause(), and getpwent().
  3577.  
  3578. - Doc/Makefile: changed latex2html targets.
  3579.  
  3580. - classes: Reverse the search order for the Don Beaudry hook so that
  3581. the first class with an applicable hook wins.  Makes more sense.
  3582.  
  3583. - Changed the checks made in Py_Initialize() and Py_Finalize().  It is
  3584. now legal to call these more than once.  The first call to
  3585. Py_Initialize() initializes, the first call to Py_Finalize()
  3586. finalizes.  There's also a new API, Py_IsInitalized() which checks
  3587. whether we are already initialized (in case you want to leave things
  3588. as they were).
  3589.  
  3590. - Completely disable the declarations for malloc(), realloc() and
  3591. free().  Any 90's C compiler has these in header files, and the tests
  3592. to decide whether to suppress the declarations kept failing on some
  3593. platforms.
  3594.  
  3595. - *Before* (instead of after) signalmodule.o is added, remove both
  3596. intrcheck.o and sigcheck.o.  This should get rid of warnings in ar or
  3597. ld on various systems.
  3598.  
  3599. - Added reop to PC/config.c
  3600.  
  3601. - configure: Decided to use -Aa -D_HPUX_SOURCE on HP-UX platforms.
  3602. Removed outdated HP-UX comments from README.  Added Cray T3E comments.
  3603.  
  3604. - Various renames of statically defined functions that had name
  3605. conflicts on some systems, e.g. strndup (GNU libc), join (Cray),
  3606. roundup (sys/types.h).
  3607.  
  3608. - urllib.py: Interpret three slashes in file: URL as local file (for
  3609. Netscape on Windows/Mac).
  3610.  
  3611. - copy.py: Make sure the objects returned by __getinitargs__() are
  3612. kept alive (in the memo) to avoid a certain kind of nasty crash.  (Not
  3613. easily reproducable because it requires a later call to
  3614. __getinitargs__() to return a tuple that happens to be allocated at
  3615. the same address.)
  3616.  
  3617. - Added definition of AR to toplevel Makefile.  Renamed @buildno temp
  3618. file to buildno1.
  3619.  
  3620. - Moved Include/assert.h to Parser/assert.h, which seems to be the
  3621. only place where it's needed.
  3622.  
  3623. - Tweaked the dictionary lookup code again for some more speed
  3624. (Vladimir Marangozov).
  3625.  
  3626. - NT build: Changed the way python15.lib is included in the other
  3627. projects.  Per Mark Hammond's suggestion, add it to the extra libs in
  3628. Settings instead of to the project's source files.
  3629.  
  3630. - regrtest.py: Change default verbosity so that there are only three
  3631. levels left: -q, default and -v.  In default mode, the name of each
  3632. test is now printed.  -v is the same as the old -vv.  -q is more quiet
  3633. than the old default mode.
  3634.  
  3635. - Removed the old FAQ from the distribution.  You now have to get it
  3636. from the web!
  3637.  
  3638. - Removed the PC/make_nt.in file from the distribution; it is no
  3639. longer needed.
  3640.  
  3641. - Changed the build sequence so that shared modules are built last.
  3642. This fixes things for AIX and doesn't hurt elsewhere.
  3643.  
  3644. - Improved test for GNU MP v1 in mpzmodule.c
  3645.  
  3646. - fileobject.c: ftell() on Linux discards all buffered data; changed
  3647. read() code to use lseek() instead to get the same effect
  3648.  
  3649. - configure.in, configure, importdl.c: NeXT sharedlib fixes
  3650.  
  3651. - tupleobject.c: PyTuple_SetItem asserts refcnt==1
  3652.  
  3653. - resource.c: Different strategy regarding whether to declare
  3654. getrusage() and getpagesize() -- #ifdef doesn't work, Linux has
  3655. conflicting decls in its headers.  Choice: only declare the return
  3656. type, not the argument prototype, and not on Linux.
  3657.  
  3658. - importdl.c, configure*: set sharedlib extensions properly for NeXT
  3659.  
  3660. - configure*, Makefile.in, Modules/Makefile.pre.in: AIX shared libraries
  3661. fixed; moved addition of PURIFY to LINKCC to configure
  3662.  
  3663. - reopmodule.c, regexmodule.c, regexpr.c, zlibmodule.c: needed casts
  3664. added to shup up various compilers.
  3665.  
  3666. - _tkinter.c: removed buggy mac #ifndef
  3667.  
  3668. - Doc: various Mac documentation changes, added docs for 'ic' module
  3669.  
  3670. - PC/make_nt.in: deleted
  3671.  
  3672. - test_time.py, test_strftime.py: tweaks to catch %Z (which may return
  3673. "")
  3674.  
  3675. - test_rotor.py: print b -> print `b`
  3676.  
  3677. - Tkinter.py: (tagOrId) -> (tagOrId,)
  3678.  
  3679. - Tkinter.py: the Tk class now also has a configure() method and
  3680. friends (they have been moved to the Misc class to accomplish this).
  3681.  
  3682. - dict.get(key[, default]) returns dict[key] if it exists, or default
  3683. if it doesn't.  The default defaults to None.  This is quicker for
  3684. some applications than using either has_key() or try:...except
  3685. KeyError:....
  3686.  
  3687. - Tools/webchecker/: some small changes to webchecker.py; added
  3688. websucker.py (a simple web site mirroring script).
  3689.  
  3690. - Dictionary objects now have a get() method (also in UserDict.py).
  3691. dict.get(key, default) returns dict[key] if it exists and default
  3692. otherwise; default defaults to None.
  3693.  
  3694. - Tools/scripts/logmerge.py: print the author, too.
  3695.  
  3696. - Changes to import: support for "import a.b.c" is now built in.  See
  3697. http://grail.cnri.reston.va.us/python/essays/packages.html
  3698. for more info.  Most important deviations from "ni.py": __init__.py is
  3699. executed in the package's namespace instead of as a submodule; and
  3700. there's no support for "__" or "__domain__".  Note that "ni.py" is not
  3701. changed to match this -- it is simply declared obsolete (while at the
  3702. same time, it is documented...:-( ).
  3703. Unfortunately, "ihooks.py" has not been upgraded (but see "knee.py"
  3704. for an example implementation of hierarchical module import written in
  3705. Python).
  3706.  
  3707. - More changes to import: the site.py module is now imported by
  3708. default when Python is initialized; use -S to disable it.  The site.py
  3709. module extends the path with several more directories: site-packages
  3710. inside the lib/python1.5/ directory, site-python in the lib/
  3711. directory, and pathnames mentioned in *.pth files found in either of
  3712. those directories.  See
  3713. http://grail.cnri.reston.va.us/python/essays/packages.html
  3714. for more info.
  3715.  
  3716. - Changes to standard library subdirectory names: those subdirectories
  3717. that are not packages have been renamed with a hypen in their name,
  3718. e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3.
  3719. The test suite is now a package -- to run a test, you must now use
  3720. "import test.test_foo".
  3721.  
  3722. - A completely new re.py module is provided (thanks to Andrew
  3723. Kuchling, Tim Peters and Jeffrey Ollie) which uses Philip Hazel's
  3724. "pcre" re compiler and engine.  For a while, the "old" re.py (which
  3725. was new in 1.5a3!) will be kept around as re1.py.  The "old" regex
  3726. module and underlying parser and engine are still present -- while
  3727. regex is now officially obsolete, it will probably take several major
  3728. release cycles before it can be removed.
  3729.  
  3730. - The posix module now has a strerror() function which translates an
  3731. error code to a string.
  3732.  
  3733. - The emacs.py module (which was long obsolete) has been removed.
  3734.  
  3735. - The universal makefile Misc/Makefile.pre.in now features an
  3736. "install" target.  By default, installed shared libraries go into
  3737. $exec_prefix/lib/python$VERSION/site-packages/.
  3738.  
  3739. - The install-sh script is installed with the other configuration
  3740. specific files (in the config/ subdirectory).
  3741.  
  3742. - It turns out whatsound.py and sndhdr.py were identical modules.
  3743. Since there's also an imghdr.py file, I propose to make sndhdr.py the
  3744. official one.  For compatibility, whatsound.py imports * from
  3745. sndhdr.py.
  3746.  
  3747. - Class objects have a new attribute, __module__, giving the name of
  3748. the module in which they were declared.  This is useful for pickle and
  3749. for printing the full name of a class exception.
  3750.  
  3751. - Many extension modules no longer issue a fatal error when their
  3752. initialization fails; the importing code now checks whether an error
  3753. occurred during module initialization, and correctly propagates the
  3754. exception to the import statement.
  3755.  
  3756. - Most extension modules now raise class-based exceptions (except when
  3757. -X is used).
  3758.  
  3759. - Subtle changes to PyEval_{Save,Restore}Thread(): always swap the
  3760. thread state -- just don't manipulate the lock if it isn't there.
  3761.  
  3762. - Fixed a bug in Python/getopt.c that made it do the wrong thing when
  3763. an option was a single '-'.  Thanks to Andrew Kuchling.
  3764.  
  3765. - New module mimetypes.py will guess a MIME type from a filename's
  3766. extension.
  3767.  
  3768. - Windows: the DLL version is now settable via a resource rather than
  3769. being hardcoded.  This can be used for "branding" a binary Python
  3770. distribution.
  3771.  
  3772. - urllib.py is now threadsafe -- it now uses re instead of regex, and
  3773. sys.exc_info() instead of sys.exc_{type,value}.
  3774.  
  3775. - Many other library modules that used to use
  3776. sys.exc_{type,value,traceback} are now more thread-safe by virtue of
  3777. using sys.exc_info().
  3778.  
  3779. - The functions in popen2 have an optional buffer size parameter.
  3780. Also, the command argument can now be either a string (passed to the
  3781. shell) or a list of arguments (passed directly to execv).
  3782.  
  3783. - Alas, the thread support for _tkinter released with 1.5a3 didn't
  3784. work.  It's been rewritten.  The bad news is that it now requires a
  3785. modified version of a file in the standard Tcl distribution, which you
  3786. must compile with a -I option pointing to the standard Tcl source
  3787. tree.  For this reason, the thread support is disabled by default.
  3788.  
  3789. - The errno extension module adds two tables: errorcode maps errno
  3790. numbers to errno names (e.g. EINTR), and errorstr maps them to
  3791. message strings.  (The latter is redundant because the new call
  3792. posix.strerror() now does the same, but alla...)  (Marc-Andre Lemburg)
  3793.  
  3794. - The readline extension module now provides some interfaces to
  3795. internal readline routines that make it possible to write a completer
  3796. in Python.  An example completer, rlcompleter.py, is provided.
  3797.  
  3798.     When completing a simple identifier, it completes keywords,
  3799.     built-ins and globals in __main__; when completing
  3800.     NAME.NAME..., it evaluates (!) the expression up to the last
  3801.     dot and completes its attributes.
  3802.  
  3803.     It's very cool to do "import string" type "string.", hit the
  3804.     completion key (twice), and see the list of names defined by
  3805.     the string module!
  3806.  
  3807.     Tip: to use the tab key as the completion key, call
  3808.  
  3809.         readline.parse_and_bind("tab: complete")
  3810.  
  3811. - The traceback.py module has a new function tb_lineno() by Marc-Andre
  3812. Lemburg which extracts the line number from the linenumber table in
  3813. the code object.  Apparently the traceback object doesn't contains the
  3814. right linenumber when -O is used.  Rather than guessing whether -O is
  3815. on or off, the module itself uses tb_lineno() unconditionally.
  3816.  
  3817. - Fixed Demo/tkinter/matt/canvas-moving-or-creating.py: change bind()
  3818. to tag_bind() so it works again.
  3819.  
  3820. - The pystone script is now a standard library module.  Example use:
  3821. "import test.pystone; test.pystone.main()".
  3822.  
  3823. - The import of the readline module in interactive mode is now also
  3824. attempted when -i is specified.  (Yes, I know, giving in to Marc-Andre
  3825. Lemburg, who asked for this. :-)
  3826.  
  3827. - rfc822.py: Entirely rewritten parseaddr() function by Sjoerd
  3828. Mullender, to be closer to the standard.  This fixes the getaddr()
  3829. method.  Unfortunately, getaddrlist() is as broken as ever, since it
  3830. splits on commas without regard for RFC 822 quoting conventions.
  3831.  
  3832. - pprint.py: correctly emit trailing "," in singleton tuples.
  3833.  
  3834. - _tkinter.c: export names for its type objects, TkappType and
  3835. TkttType.
  3836.  
  3837. - pickle.py: use __module__ when defined; fix a particularly hard to
  3838. reproduce bug that confuses the memo when temporary objects are
  3839. returned by custom pickling interfaces; and a semantic change: when
  3840. unpickling the instance variables of an instance, use
  3841. inst.__dict__.update(value) instead of a for loop with setattr() over
  3842. the value.keys().  This is more consistent (the pickling doesn't use
  3843. getattr() either but pickles inst.__dict__) and avoids problems with
  3844. instances that have a __setattr__ hook.  But it *is* a semantic change
  3845. (because the setattr hook is no longer used).  So beware!
  3846.  
  3847. - config.h is now installed (at last) in
  3848. $exec_prefix/include/python1.5/.  For most sites, this means that it
  3849. is actually in $prefix/include/python1.5/, with all the other Python
  3850. include files, since $prefix and $exec_prefix are the same by
  3851. default.
  3852.  
  3853. - The imp module now supports parts of the functionality to implement
  3854. import of hierarchical module names.  It now supports find_module()
  3855. and load_module() for all types of modules.  Docstrings have been
  3856. added for those functions in the built-in imp module that are still
  3857. relevant (some old interfaces are obsolete).  For a sample
  3858. implementation of hierarchical module import in Python, see the new
  3859. library module knee.py.
  3860.  
  3861. - The % operator on string objects now allows arbitrary nested parens
  3862. in a %(...)X style format.  (Brad Howes)
  3863.  
  3864. - Reverse the order in which Setup and Setup.local are passed to the
  3865. makesetup script.  This allows variable definitions in Setup.local to
  3866. override definitions in Setup.  (But you'll still have to edit Setup
  3867. if you want to disable modules that are enabled by default, or if such
  3868. modules need non-standard options.)
  3869.  
  3870. - Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this
  3871. is like PyImport_ImporModule(name) but receives the globals and locals
  3872. dict and the fromlist arguments as well.  (The name is a char*; the
  3873. others are PyObject*s).
  3874.  
  3875. - The 'p' format in the struct extension module alloded to above is
  3876. new in 1.5a4.
  3877.  
  3878. - The types.py module now uses try-except in a few places to make it
  3879. more likely that it can be imported in restricted mode.  Some type
  3880. names are undefined in that case, e.g. CodeType (inaccessible),
  3881. FileType (not always accessible), and TracebackType and FrameType
  3882. (inaccessible).
  3883.  
  3884. - In urllib.py: added separate administration of temporary files
  3885. created y URLopener.retrieve() so cleanup() can properly remove them.
  3886. The old code removed everything in tempcache which was a bad idea if
  3887. the user had passed a non-temp file into it.  Also, in basejoin(),
  3888. interpret relative paths starting in "../".  This is necessary if the
  3889. server uses symbolic links.
  3890.  
  3891. - The Windows build procedure and project files are now based on
  3892. Microsoft Visual C++ 5.x.  The build now takes place in the PCbuild
  3893. directory.  It is much more robust, and properly builds separate Debug
  3894. and Release versions.  (The installer will be added shortly.)
  3895.  
  3896. - Added casts and changed some return types in regexpr.c to avoid
  3897. compiler warnings or errors on some platforms.
  3898.  
  3899. - The AIX build tools for shared libraries now supports VPATH.  (Donn
  3900. Cave)
  3901.  
  3902. - By default, disable the "portable" multimedia modules audioop,
  3903. imageop, and rgbimg, since they don't work on 64-bit platforms.
  3904.  
  3905. - Fixed a nasty bug in cStringIO.c when code was actually using the
  3906. close() method (the destructors would try to free certain fields a
  3907. second time).
  3908.  
  3909. - For those who think they need it, there's a "user.py" module.  This
  3910. is *not* imported by default, but can be imported to run user-specific
  3911. setup commands, ~/.pythonrc.py.
  3912.  
  3913. - Various speedups suggested by Fredrik Lundh, Marc-Andre Lemburg,
  3914. Vladimir Marangozov, and others.
  3915.  
  3916. - Added os.altsep; this is '/' on DOS/Windows, and None on systems
  3917. with a sane filename syntax.
  3918.  
  3919. - os.py: Write out the dynamic OS choice, to avoid exec statements.
  3920. Adding support for a new OS is now a bit more work, but I bet that
  3921. 'dos' or 'nt' will cover most situations...
  3922.  
  3923. - The obsolete exception AccessError is now really gone.
  3924.  
  3925. - Tools/faqwiz/: New installation instructions show how to maintain
  3926. multiple FAQs.  Removed bootstrap script from end of faqwiz.py module.
  3927. Added instructions to bootstrap script, too.  Version bumped to 0.8.1.
  3928. Added <html>...</html> feature suggested by Skip Montanaro.  Added
  3929. leading text for Roulette, default to 'Hit Reload ...'.  Fix typo in
  3930. default SRCDIR.
  3931.  
  3932. - Documentation for the relatively new modules "keyword" and "symbol"
  3933. has been added (to the end of the section on the parser extension
  3934. module).
  3935.  
  3936. - In module bisect.py, but functions have two optional argument 'lo'
  3937. and 'hi' which allow you to specify a subsequence of the array to
  3938. operate on.
  3939.  
  3940. - In ftplib.py, changed most methods to return their status (even when
  3941. it is always "200 OK") rather than swallowing it.
  3942.  
  3943. - main() now calls setlocale(LC_ALL, ""), if setlocale() and
  3944. <locale.h> are defined.
  3945.  
  3946. - Changes to configure.in, the configure script, and both
  3947. Makefile.pre.in files, to support SGI's SGI_ABI platform selection
  3948. environment variable.
  3949.  
  3950.  
  3951. ======================================================================
  3952.  
  3953.  
  3954. From 1.4 to 1.5a3
  3955. =================
  3956.  
  3957. Security
  3958. --------
  3959.  
  3960. - If you are using the setuid script C wrapper (Misc/setuid-prog.c),
  3961. please use the new version.  The old version has a huge security leak.
  3962.  
  3963. Miscellaneous
  3964. -------------
  3965.  
  3966. - Because of various (small) incompatible changes in the Python
  3967. bytecode interpreter, the magic number for .pyc files has changed
  3968. again.
  3969.  
  3970. - The default module search path is now much saner.  Both on Unix and
  3971. Windows, it is essentially derived from the path to the executable
  3972. (which can be overridden by setting the environment variable
  3973. $PYTHONHOME).  The value of $PYTHONPATH on Windows is now inserted in
  3974. front of the default path, like in Unix (instead of overriding the
  3975. default path).  On Windows, the directory containing the executable is
  3976. added to the end of the path.
  3977.  
  3978. - A new version of python-mode.el for Emacs has been included.  Also,
  3979. a new file ccpy-style.el has been added to configure Emacs cc-mode for
  3980. the preferred style in Python C sources.
  3981.  
  3982. - On Unix, when using sys.argv[0] to insert the script directory in
  3983. front of sys.path, expand a symbolic link.  You can now install a
  3984. program in a private directory and have a symbolic link to it in a
  3985. public bin directory, and it will put the private directory in the
  3986. module search path.  Note that the symlink is expanded in sys.path[0]
  3987. but not in sys.argv[0], so you can still tell the name by which you
  3988. were invoked.
  3989.  
  3990. - It is now recommended to use ``#!/usr/bin/env python'' instead of
  3991. ``#!/usr/local/bin/python'' at the start of executable scripts, except
  3992. for CGI scripts.  It has been determined that the use of /usr/bin/env
  3993. is more portable than that of /usr/local/bin/python -- scripts almost
  3994. never have to be edited when the Python interpreter lives in a
  3995. non-standard place.  Note that this doesn't work for CGI scripts since
  3996. the python executable often doesn't live in the HTTP server's default
  3997. search path.
  3998.  
  3999. - The silly -s command line option and the corresponding
  4000. PYTHONSUPPRESS environment variable (and the Py_SuppressPrint global
  4001. flag in the Python/C API) are gone.
  4002.  
  4003. - Most problems on 64-bit platforms should now be fixed.  Andrew
  4004. Kuchling helped.  Some uncommon extension modules are still not
  4005. clean (image and audio ops?).
  4006.  
  4007. - Fixed a bug where multiple anonymous tuple arguments would be mixed up
  4008. when using the debugger or profiler (reported by Just van Rossum).
  4009. The simplest example is ``def f((a,b),(c,d)): print a,b,c,d''; this
  4010. would print the wrong value when run under the debugger or profiler.
  4011.  
  4012. - The hacks that the dictionary implementation used to speed up
  4013. repeated lookups of the same C string were removed; these were a
  4014. source of subtle problems and don't seem to serve much of a purpose
  4015. any longer.
  4016.  
  4017. - All traces of support for the long dead access statement have been
  4018. removed from the sources.
  4019.  
  4020. - Plugged the two-byte memory leak in the tokenizer when reading an
  4021. interactive EOF.
  4022.  
  4023. - There's a -O option to the interpreter that removes SET_LINENO
  4024. instructions and assert statements (see below); it uses and produces
  4025. .pyo files instead of .pyc files.  The speedup is only a few percent
  4026. in most cases.  The line numbers are still available in the .pyo file,
  4027. as a separate table (which is also available in .pyc files).  However,
  4028. the removal of the SET_LINENO instructions means that the debugger
  4029. (pdb) can't set breakpoints on lines in -O mode.  The traceback module
  4030. contains a function to extract a line number from the code object
  4031. referenced in a traceback object.  In the future it should be possible
  4032. to write external bytecode optimizers that create better optimized
  4033. .pyo files, and there should be more control over optimization;
  4034. consider the -O option a "teaser".  Without -O, the assert statement
  4035. actually generates code that first checks __debug__; if this variable
  4036. is false, the assertion is not checked.  __debug__ is a built-in
  4037. variable whose value is initialized to track the -O flag (it's true
  4038. iff -O is not specified).  With -O, no code is generated for assert
  4039. statements, nor for code of the form ``if __debug__: <something>''.
  4040. Sorry, no further constant folding happens.
  4041.  
  4042.  
  4043. Performance
  4044. -----------
  4045.  
  4046. - It's much faster (almost twice for pystone.py -- see
  4047. Tools/scripts).  See the entry on string interning below.
  4048.  
  4049. - Some speedup by using separate free lists for method objects (both
  4050. the C and the Python variety) and for floating point numbers.
  4051.  
  4052. - Big speedup by allocating frame objects with a single malloc() call.
  4053. The Python/C API for frames is changed (you shouldn't be using this
  4054. anyway).
  4055.  
  4056. - Significant speedup by inlining some common opcodes for common operand 
  4057. types (e.g.  i+i, i-i, and list[i]).  Fredrik Lundh.
  4058.  
  4059. - Small speedup by reordering the method tables of some common
  4060. objects (e.g. list.append is now first).
  4061.  
  4062. - Big optimization to the read() method of file objects.  A read()
  4063. without arguments now attempts to use fstat to allocate a buffer of
  4064. the right size; for pipes and sockets, it will fall back to doubling
  4065. the buffer size.  While that the improvement is real on all systems,
  4066. it is most dramatic on Windows.
  4067.  
  4068.  
  4069. Documentation
  4070. -------------
  4071.  
  4072. - Many new pieces of library documentation were contributed, mostly by
  4073. Andrew Kuchling.  Even cmath is now documented!  There's also a
  4074. chapter of the library manual, "libundoc.tex", which provides a
  4075. listing of all undocumented modules, plus their status (e.g. internal,
  4076. obsolete, or in need of documentation).  Also contributions by Sue
  4077. Williams, Skip Montanaro, and some module authors who succumbed to
  4078. pressure to document their own contributed modules :-).  Note that
  4079. printing the documentation now kills fewer trees -- the margins have
  4080. been reduced.
  4081.  
  4082. - I have started documenting the Python/C API. Unfortunately this project 
  4083. hasn't been completed yet.  It will be complete before the final release of 
  4084. Python 1.5, though.  At the moment, it's better to read the LaTeX source 
  4085. than to attempt to run it through LaTeX and print the resulting dvi file.
  4086.  
  4087. - The posix module (and hence os.py) now has doc strings!  Thanks to Neil 
  4088. Schemenauer.  I received a few other contributions of doc strings.  In most 
  4089. other places, doc strings are still wishful thinking...
  4090.  
  4091.  
  4092. Language changes
  4093. ----------------
  4094.  
  4095. - Private variables with leading double underscore are now a permanent 
  4096. feature of the language.  (These were experimental in release 1.4.  I have 
  4097. favorable experience using them; I can't label them "experimental" 
  4098. forever.)
  4099.  
  4100. - There's new string literal syntax for "raw strings".  Prefixing a string 
  4101. literal with the letter r (or R) disables all escape processing in the 
  4102. string; for example, r'\n' is a two-character string consisting of a 
  4103. backslash followed by the letter n.  This combines with all forms of string 
  4104. quotes; it is actually useful for triple quoted doc strings which might 
  4105. contain references to \n or \t.  An embedded quote prefixed with a 
  4106. backslash does not terminate the string, but the backslash is still 
  4107. included in the string; for example, r'\'' is a two-character string 
  4108. consisting of a backslash and a quote.  (Raw strings are also 
  4109. affectionately known as Robin strings, after their inventor, Robin 
  4110. Friedrich.)
  4111.  
  4112. - There's a simple assert statement, and a new exception
  4113. AssertionError.  For example, ``assert foo > 0'' is equivalent to ``if
  4114. not foo > 0: raise AssertionError''.  Sorry, the text of the asserted
  4115. condition is not available; it would be too complicated to generate
  4116. code for this (since the code is generated from a parse tree).
  4117. However, the text is displayed as part of the traceback!
  4118.  
  4119. - The raise statement has a new feature: when using "raise SomeClass,
  4120. somevalue" where somevalue is not an instance of SomeClass, it
  4121. instantiates SomeClass(somevalue).  In 1.5a4, if somevalue is an
  4122. instance of a *derived* class of SomeClass, the exception class raised
  4123. is set to somevalue.__class__, and SomeClass is ignored after that.
  4124.  
  4125. - Duplicate keyword arguments are now detected at compile time;
  4126. f(a=1,a=2) is now a syntax error.
  4127.  
  4128.  
  4129. Changes to builtin features
  4130. ---------------------------
  4131.  
  4132. - There's a new exception FloatingPointError (used only by Lee Busby's
  4133. patches to catch floating point exceptions, at the moment).
  4134.  
  4135. - The obsolete exception ConflictError (presumably used by the long
  4136. obsolete access statement) has been deleted.
  4137.  
  4138. - There's a new function sys.exc_info() which returns the tuple 
  4139. (sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way.
  4140.  
  4141. - There's a new variable sys.executable, pointing to the executable file 
  4142. for the Python interpreter.
  4143.  
  4144. - The sort() methods for lists no longer uses the C library qsort(); I
  4145. wrote my own quicksort implementation, with lots of help (in the form
  4146. of a kind of competition) from Tim Peters.  This solves a bug in
  4147. dictionary comparisons on some Solaris versions when Python is built
  4148. with threads, and makes sorting lists even faster.
  4149.  
  4150. - The semantics of comparing two dictionaries have changed, to make
  4151. comparison of unequal dictionaries faster.  A shorter dictionary is
  4152. always considered smaller than a larger dictionary.  For dictionaries
  4153. of the same size, the smallest differing element determines the
  4154. outcome (which yields the same results as before in this case, without
  4155. explicit sorting).  Thanks to Aaron Watters for suggesting something
  4156. like this.
  4157.  
  4158. - The semantics of try-except have changed subtly so that calling a
  4159. function in an exception handler that itself raises and catches an
  4160. exception no longer overwrites the sys.exc_* variables.  This also
  4161. alleviates the problem that objects referenced in a stack frame that
  4162. caught an exception are kept alive until another exception is caught
  4163. -- the sys.exc_* variables are restored to their previous value when
  4164. returning from a function that caught an exception.
  4165.  
  4166. - There's a new "buffer" interface.  Certain objects (e.g. strings and
  4167. arrays) now support the "buffer" protocol.  Buffer objects are acceptable 
  4168. whenever formerly a string was required for a write operation; mutable 
  4169. buffer objects can be the target of a read operation using the call
  4170. f.readinto(buffer).  A cool feature is that regular expression matching now 
  4171. also work on array objects.  Contribution by Jack Jansen.  (Needs 
  4172. documentation.)
  4173.  
  4174. - String interning: dictionary lookups are faster when the lookup
  4175. string object is the same object as the key in the dictionary, not
  4176. just a string with the same value.  This is done by having a pool of
  4177. "interned" strings.  Most names generated by the interpreter are now
  4178. automatically interned, and there's a new built-in function intern(s)
  4179. that returns the interned version of a string.  Interned strings are
  4180. not a different object type, and interning is totally optional, but by
  4181. interning most keys a speedup of about 15% was obtained for the
  4182. pystone benchmark.
  4183.  
  4184. - Dictionary objects have several new methods; clear() and copy() have
  4185. the obvious semantics, while update(d) merges the contents of another
  4186. dictionary d into this one, overriding existing keys.  The dictionary
  4187. implementation file is now called dictobject.c rather than the
  4188. confusing mappingobject.c.
  4189.  
  4190. - The intrinsic function dir() is much smarter; it looks in __dict__,
  4191. __members__ and __methods__.
  4192.  
  4193. - The intrinsic functions int(), long() and float() can now take a
  4194. string argument and then do the same thing as string.atoi(),
  4195. string.atol(), and string.atof().  No second 'base' argument is
  4196. allowed, and complex() does not take a string (nobody cared enough).
  4197.  
  4198. - When a module is deleted, its globals are now deleted in two phases.
  4199. In the first phase, all variables whose name begins with exactly one
  4200. underscore are replaced by None; in the second phase, all variables
  4201. are deleted.  This makes it possible to have global objects whose
  4202. destructors depend on other globals.  The deletion order within each
  4203. phase is still random.
  4204.  
  4205. - It is no longer an error for a function to be called without a
  4206. global variable __builtins__ -- an empty directory will be provided
  4207. by default.
  4208.  
  4209. - Guido's corollary to the "Don Beaudry hook": it is now possible to
  4210. do metaprogramming by using an instance as a base class.  Not for the
  4211. faint of heart; and undocumented as yet, but basically if a base class
  4212. is an instance, its class will be instantiated to create the new
  4213. class.  Jim Fulton will love it -- it also works with instances of his
  4214. "extension classes", since it is triggered by the presence of a
  4215. __class__ attribute on the purported base class.  See
  4216. Demo/metaclasses/index.html for an explanation and see that directory
  4217. for examples.
  4218.  
  4219. - Another change is that the Don Beaudry hook is now invoked when
  4220. *any* base class is special.  (Up to 1.5a3, the *last* special base
  4221. class is used; in 1.5a4, the more rational choice of the *first*
  4222. special base class is used.)
  4223.  
  4224. - New optional parameter to the readlines() method of file objects.
  4225. This indicates the number of bytes to read (the actual number of bytes
  4226. read will be somewhat larger due to buffering reading until the end of
  4227. the line).  Some optimizations have also been made to speed it up (but
  4228. not as much as read()).
  4229.  
  4230. - Complex numbers no longer have the ".conj" pseudo attribute; use
  4231. z.conjugate() instead, or complex(z.real, -z.imag).  Complex numbers
  4232. now *do* support the __members__ and __methods__ special attributes.
  4233.  
  4234. - The complex() function now looks for a __complex__() method on class
  4235. instances before giving up.
  4236.  
  4237. - Long integers now support arbitrary shift counts, so you can now
  4238. write 1L<<1000000, memory permitting.  (Python 1.4 reports "outrageous
  4239. shift count for this.)
  4240.  
  4241. - The hex() and oct() functions have been changed so that for regular
  4242. integers, they never emit a minus sign.  For example, on a 32-bit
  4243. machine, oct(-1) now returns '037777777777' and hex(-1) returns
  4244. '0xffffffff'.  While this may seem inconsistent, it is much more
  4245. useful.  (For long integers, a minus sign is used as before, to fit
  4246. the result in memory :-)
  4247.  
  4248. - The hash() function computes better hashes for several data types,
  4249. including strings, floating point numbers, and complex numbers.
  4250.  
  4251.  
  4252. New extension modules
  4253. ---------------------
  4254.  
  4255. - New extension modules cStringIO.c and cPickle.c, written by Jim
  4256. Fulton and other folks at Digital Creations.  These are much more
  4257. efficient than their Python counterparts StringIO.py and pickle.py,
  4258. but don't support subclassing.  cPickle.c clocks up to 1000 times
  4259. faster than pickle.py; cStringIO.c's improvement is less dramatic but
  4260. still significant.
  4261.  
  4262. - New extension module zlibmodule.c, interfacing to the free zlib
  4263. library (gzip compatible compression).  There's also a module gzip.py
  4264. which provides a higher level interface.  Written by Andrew Kuchling
  4265. and Jeremy Hylton.
  4266.  
  4267. - New module readline; see the "miscellaneous" section above.
  4268.  
  4269. - New Unix extension module resource.c, by Jeremy Hylton, provides
  4270. access to getrlimit(), getrusage(), setrusage(), getpagesize(), and
  4271. related symbolic constants.
  4272.  
  4273. - New extension puremodule.c, by Barry Warsaw, which interfaces to the
  4274. Purify(TM) C API.  See also the file Misc/PURIFY.README.  It is also
  4275. possible to enable Purify by simply setting the PURIFY Makefile
  4276. variable in the Modules/Setup file.
  4277.  
  4278.  
  4279. Changes in extension modules
  4280. ----------------------------
  4281.  
  4282. - The struct extension module has several new features to control byte
  4283. order and word size.  It supports reading and writing IEEE floats even
  4284. on platforms where this is not the native format.  It uses uppercase
  4285. format codes for unsigned integers of various sizes (always using
  4286. Python long ints for 'I' and 'L'), 's' with a size prefix for strings,
  4287. and 'p' for "Pascal strings" (with a leading length byte, included in
  4288. the size; blame Hannu Krosing; new in 1.5a4).  A prefix '>' forces
  4289. big-endian data and '<' forces little-endian data; these also select
  4290. standard data sizes and disable automatic alignment (use pad bytes as
  4291. needed).
  4292.  
  4293. - The array module supports uppercase format codes for unsigned data
  4294. formats (like the struct module).
  4295.  
  4296. - The fcntl extension module now exports the needed symbolic
  4297. constants.  (Formerly these were in FCNTL.py which was not available
  4298. or correct for all platforms.)
  4299.  
  4300. - The extension modules dbm, gdbm and bsddb now check that the
  4301. database is still open before making any new calls.
  4302.  
  4303. - The dbhash module is no more.  Use bsddb instead.  (There's a third
  4304. party interface for the BSD 2.x code somewhere on the web; support for
  4305. bsddb will be deprecated.)
  4306.  
  4307. - The gdbm module now supports a sync() method.
  4308.  
  4309. - The socket module now has some new functions: getprotobyname(), and
  4310. the set {ntoh,hton}{s,l}().
  4311.  
  4312. - Various modules now export their type object: socket.SocketType,
  4313. array.ArrayType.
  4314.  
  4315. - The socket module's accept() method now returns unknown addresses as
  4316. a tuple rather than raising an exception.  (This can happen in
  4317. promiscuous mode.)  Theres' also a new function getprotobyname().
  4318.  
  4319. - The pthread support for the thread module now works on most platforms.
  4320.  
  4321. - STDWIN is now officially obsolete.  Support for it will eventually
  4322. be removed from the distribution.
  4323.  
  4324. - The binascii extension module is now hopefully fully debugged.
  4325. (XXX Oops -- Fredrik Lundh promised me a uuencode fix that I never
  4326. received.)
  4327.  
  4328. - audioop.c: added a ratecv() function; better handling of overflow in
  4329. add().
  4330.  
  4331. - posixmodule.c: now exports the O_* flags (O_APPEND etc.).  On
  4332. Windows, also O_TEXT and O_BINARY.  The 'error' variable (the
  4333. exception is raises) is renamed -- its string value is now "os.error",
  4334. so newbies don't believe they have to import posix (or nt) to catch
  4335. it when they see os.error reported as posix.error.  The execve()
  4336. function now accepts any mapping object for the environment.
  4337.  
  4338. - A new version of the al (audio library) module for SGI was
  4339. contributed by Sjoerd Mullender.
  4340.  
  4341. - The regex module has a new function get_syntax() which retrieves the
  4342. syntax setting set by set_syntax().  The code was also sanitized,
  4343. removing worries about unclean error handling.  See also below for its
  4344. successor, re.py.
  4345.  
  4346. - The "new" module (which creates new objects of various types) once
  4347. again has a fully functioning new.function() method.  Dangerous as
  4348. ever!  Also, new.code() has several new arguments.
  4349.  
  4350. - A problem has been fixed in the rotor module: on systems with signed
  4351. characters, rotor-encoded data was not portable when the key contained
  4352. 8-bit characters.  Also, setkey() now requires its argument rather
  4353. than having broken code to default it.
  4354.  
  4355. - The sys.builtin_module_names variable is now a tuple.  Another new
  4356. variables in sys is sys.executable (the full path to the Python
  4357. binary, if known).
  4358.  
  4359. - The specs for time.strftime() have undergone some revisions.  It
  4360. appears that not all format characters are supported in the same way
  4361. on all platforms.  Rather than reimplement it, we note these
  4362. differences in the documentation, and emphasize the shared set of
  4363. features.  There's also a thorough test set (that occasionally finds
  4364. problems in the C library implementation, e.g. on some Linuxes),
  4365. thanks to Skip Montanaro.
  4366.  
  4367. - The nis module seems broken when used with NIS+; unfortunately
  4368. nobody knows how to fix it.  It should still work with old NIS.
  4369.  
  4370.  
  4371. New library modules
  4372. -------------------
  4373.  
  4374. - New (still experimental) Perl-style regular expression module,
  4375. re.py, which uses a new interface for matching as well as a new
  4376. syntax; the new interface avoids the thread-unsafety of the regex
  4377. interface.  This comes with a helper extension reopmodule.c and vastly
  4378. rewritten regexpr.c.  Most work on this was done by Jeffrey Ollie, Tim
  4379. Peters, and Andrew Kuchling.  See the documentation libre.tex.  In
  4380. 1.5, the old regex module is still fully supported; in the future, it
  4381. will become obsolete.
  4382.  
  4383. - New module gzip.py; see zlib above.
  4384.  
  4385. - New module keyword.py exports knowledge about Python's built-in
  4386. keywords.  (New version by Ka-Ping Yee.)
  4387.  
  4388. - New module pprint.py (with documentation) which supports
  4389. pretty-printing of lists, tuples, & dictionaries recursively.  By Fred
  4390. Drake.
  4391.  
  4392. - New module code.py.  The function code.compile_command() can
  4393. determine whether an interactively entered command is complete or not,
  4394. distinguishing incomplete from invalid input.  (XXX Unfortunately,
  4395. this seems broken at this moment, and I don't have the time to fix
  4396. it.  It's probably better to add an explicit interface to the parser
  4397. for this.)
  4398.  
  4399. - There is now a library module xdrlib.py which can read and write the
  4400. XDR data format as used by Sun RPC, for example.  It uses the struct
  4401. module.
  4402.  
  4403.  
  4404. Changes in library modules
  4405. --------------------------
  4406.  
  4407. - Module codehack.py is now completely obsolete.
  4408.  
  4409. - The pickle.py module has been updated to make it compatible with the
  4410. new binary format that cPickle.c produces.  By default it produces the
  4411. old all-ASCII format compatible with the old pickle.py, still much
  4412. faster than pickle.py; it will read both formats automatically.  A few
  4413. other updates have been made.
  4414.  
  4415. - A new helper module, copy_reg.py, is provided to register extensions
  4416. to the pickling code.
  4417.  
  4418. - Revamped module tokenize.py is much more accurate and has an
  4419. interface that makes it a breeze to write code to colorize Python
  4420. source code.  Contributed by Ka-Ping Yee.
  4421.  
  4422. - In ihooks.py, ModuleLoader.load_module() now closes the file under
  4423. all circumstances.
  4424.  
  4425. - The tempfile.py module has a new class, TemporaryFile, which creates
  4426. an open temporary file that will be deleted automatically when
  4427. closed.  This works on Windows and MacOS as well as on Unix.  (Jim
  4428. Fulton.)
  4429.  
  4430. - Changes to the cgi.py module: Most imports are now done at the
  4431. top of the module, which provides a speedup when using ni (Jim
  4432. Fulton).  The problem with file upload to a Windows platform is solved
  4433. by using the new tempfile.TemporaryFile class; temporary files are now
  4434. always opened in binary mode (Jim Fulton).  The cgi.escape() function
  4435. now takes an optional flag argument that quotes '"' to '"'.  It
  4436. is now possible to invoke cgi.py from a command line script, to test
  4437. cgi scripts more easily outside an http server.  There's an optional
  4438. limit to the size of uploads to POST (Skip Montanaro).  Added a
  4439. 'strict_parsing' option to all parsing functions (Jim Fulton).  The
  4440. function parse_qs() now uses urllib.unquote() on the name as well as
  4441. the value of fields (Clarence Gardner).  The FieldStorage class now
  4442. has a __len__() method.
  4443.  
  4444. - httplib.py: the socket object is no longer closed; all HTTP/1.*
  4445. responses are now accepted; and it is now thread-safe (by not using
  4446. the regex module).
  4447.  
  4448. - BaseHTTPModule.py: treat all HTTP/1.* versions the same.
  4449.  
  4450. - The popen2.py module is now rewritten using a class, which makes
  4451. access to the standard error stream and the process id of the
  4452. subprocess possible.
  4453.  
  4454. - Added timezone support to the rfc822.py module, in the form of a
  4455. getdate_tz() method and a parsedate_tz() function; also a mktime_tz().
  4456. Also added recognition of some non-standard date formats, by Lars
  4457. Wirzenius, and RFC 850 dates (Chris Lawrence).
  4458.  
  4459. - mhlib.py: various enhancements, including almost compatible parsing
  4460. of message sequence specifiers without invoking a subprocess.  Also
  4461. added a createmessage() method by Lars Wirzenius.
  4462.  
  4463. - The StringIO.StringIO class now supports readline(nbytes).  (Lars 
  4464. Wirzenius.)  (Of course, you should be using cStringIO for performance.)
  4465.  
  4466. - UserDict.py supports the new dictionary methods as well.
  4467.  
  4468. - Improvements for whrandom.py by Tim Peters: use 32-bit arithmetic to
  4469. speed it up, and replace 0 seed values by 1 to avoid degeneration.
  4470. A bug was fixed in the test for invalid arguments.
  4471.  
  4472. - Module ftplib.py: added support for parsing a .netrc file (Fred
  4473. Drake).  Also added an ntransfercmd() method to the FTP class, which
  4474. allows access to the expected size of a transfer when available, and a
  4475. parse150() function to the module which parses the corresponding 150
  4476. response.
  4477.  
  4478. - urllib.py: the ftp cache is now limited to 10 entries.  Added
  4479. quote_plus() and unquote_plus() functions which are like quote() and
  4480. unquote() but also replace spaces with '+' or vice versa, for
  4481. encoding/decoding CGI form arguments.  Catch all errors from the ftp
  4482. module.  HTTP requests now add the Host: header line.  The proxy
  4483. variable names are now mapped to lower case, for Windows.  The
  4484. spliturl() function no longer erroneously throws away all data past
  4485. the first newline.  The basejoin() function now intereprets "../"
  4486. correctly.  I *believe* that the problems with "exception raised in
  4487. __del__" under certain circumstances have been fixed (mostly by
  4488. changes elsewher in the interpreter).
  4489.  
  4490. - In urlparse.py, there is a cache for results in urlparse.urlparse();
  4491. its size limit is set to 20.  Also, new URL schemes shttp, https, and
  4492. snews are "supported".
  4493.  
  4494. - shelve.py: use cPickle and cStringIO when available.  Also added
  4495. a sync() method, which calls the database's sync() method if there is
  4496. one.
  4497.  
  4498. - The mimetools.py module now uses the available Python modules for
  4499. decoding quoted-printable, uuencode and base64 formats, rather than
  4500. creating a subprocess.
  4501.  
  4502. - The python debugger (pdb.py, and its base class bdb.py) now support
  4503. conditional breakpoints.  See the docs.
  4504.  
  4505. - The modules base64.py, uu.py and quopri.py can now be used as simple
  4506. command line utilities.
  4507.  
  4508. - Various small fixes to the nntplib.py module that I can't bother to
  4509. document in detail.
  4510.  
  4511. - Sjoerd Mullender's mimify.py module now supports base64 encoding and 
  4512. includes functions to handle the funny encoding you sometimes see in mail 
  4513. headers.  It is now documented.
  4514.  
  4515. - mailbox.py: Added BabylMailbox.  Improved the way the mailbox is
  4516. gotten from the environment.
  4517.  
  4518. - Many more modules now correctly open files in binary mode when this
  4519. is necessary on non-Unix platforms.
  4520.  
  4521. - The copying functions in the undocumented module shutil.py are
  4522. smarter.
  4523.  
  4524. - The Writer classes in the formatter.py module now have a flush()
  4525. method.
  4526.  
  4527. - The sgmllib.py module accepts hyphens and periods in the middle of
  4528. attribute names.  While this is against the SGML standard, there is
  4529. some HTML out there that uses this...
  4530.  
  4531. - The interface for the Python bytecode disassembler module, dis.py,
  4532. has been enhanced quite a bit.  There's now one main function,
  4533. dis.dis(), which takes almost any kind of object (function, module,
  4534. class, instance, method, code object) and disassembles it; without
  4535. arguments it disassembles the last frame of the last traceback.  The
  4536. other functions have changed slightly, too.
  4537.  
  4538. - The imghdr.py module recognizes new image types: BMP, PNG.
  4539.  
  4540. - The string.py module has a new function replace(str, old, new,
  4541. [maxsplit]) which does substring replacements.  It is actually
  4542. implemented in C in the strop module.  The functions [r]find() an
  4543. [r]index() have an optional 4th argument indicating the end of the
  4544. substring to search, alsoo implemented by their strop counterparts.
  4545. (Remember, never import strop -- import string uses strop when
  4546. available with zero overhead.)
  4547.  
  4548. - The string.join() function now accepts any sequence argument, not
  4549. just lists and tuples.
  4550.  
  4551. - The string.maketrans() requires its first two arguments to be
  4552. present.  The old version didn't require them, but there's not much
  4553. point without them, and the documentation suggests that they are
  4554. required, so we fixed the code to match the documentation.
  4555.  
  4556. - The regsub.py module has a function clear_cache(), which clears its
  4557. internal cache of compiled regular expressions.  Also, the cache now
  4558. takes the current syntax setting into account.  (However, this module
  4559. is now obsolete -- use the sub() or subn() functions or methods in the
  4560. re module.)
  4561.  
  4562. - The undocumented module Complex.py has been removed, now that Python
  4563. has built-in complex numbers.  A similar module remains as
  4564. Demo/classes/Complex.py, as an example.
  4565.  
  4566.  
  4567. Changes to the build process
  4568. ----------------------------
  4569.  
  4570. - The way GNU readline is configured is totally different.  The
  4571. --with-readline configure option is gone.  It is now an extension
  4572. module, which may be loaded dynamically.  You must enable it (and
  4573. specify the correct linraries to link with) in the Modules/Setup file.
  4574. Importing the module installs some hooks which enable command line
  4575. editing.  When the interpreter shell is invoked interactively, it
  4576. attempts to import the readline module; when this fails, the default
  4577. input mechanism is used.  The hook variables are PyOS_InputHook and
  4578. PyOS_ReadlineFunctionPointer.  (Code contributed by Lee Busby, with
  4579. ideas from William Magro.)
  4580.  
  4581. - New build procedure: a single library, libpython1.5.a, is now built,
  4582. which contains absolutely everything except for a one-line main()
  4583. program (which calls Py_Main(argc, argv) to start the interpreter
  4584. shell).  This makes life much simpler for applications that need to
  4585. embed Python.  The serial number of the build is now included in the
  4586. version string (sys.version).
  4587.  
  4588. - As far as I can tell, neither gcc -Wall nor the Microsoft compiler
  4589. emits a single warning any more when compiling Python.
  4590.  
  4591. - A number of new Makefile variables have been added for special
  4592. situations, e.g. LDLAST is appended to the link command.  These are
  4593. used by editing the Makefile or passing them on the make command
  4594. line.
  4595.  
  4596. - A set of patches from Lee Busby has been integrated that make it
  4597. possible to catch floating point exceptions.  Use the configure option
  4598. --with-fpectl to enable the patches; the extension modules fpectl and
  4599. fpetest provide control to enable/disable and test the feature,
  4600. respectively.
  4601.  
  4602. - The support for shared libraries under AIX is now simpler and more
  4603. robust.  Thanks to Vladimir Marangozov for revamping his own patches!
  4604.  
  4605. - The Modules/makesetup script now reads a file Setup.local as well as
  4606. a file Setup.  Most changes to the Setup script can be done by editing
  4607. Setup.local instead, which makes it easier to carry a particular setup
  4608. over from one release to the next.
  4609.  
  4610. - The Modules/makesetup script now copies any "include" lines it
  4611. encounters verbatim into the output Makefile.  It also recognizes .cxx
  4612. and .cpp as C++ source files.
  4613.  
  4614. - The configure script is smarter about C compiler options; e.g. with
  4615. gcc it uses -O2 and -g when possible, and on some other platforms it
  4616. uses -Olimit 1500 to avoid a warning from the optimizer about the main
  4617. loop in ceval.c (which has more than 1000 basic blocks).
  4618.  
  4619. - The configure script now detects whether malloc(0) returns a NULL
  4620. pointer or a valid block (of length zero).  This avoids the nonsense
  4621. of always adding one byte to all malloc() arguments on most platforms.
  4622.  
  4623. - The configure script has a new option, --with-dec-threads, to enable
  4624. DEC threads on DEC Alpha platforms.  Also, --with-threads is now an
  4625. alias for --with-thread (this was the Most Common Typo in configure
  4626. arguments).
  4627.  
  4628. - Many changes in Doc/Makefile; amongst others, latex2html is now used
  4629. to generate HTML from all latex documents.
  4630.  
  4631.  
  4632. Change to the Python/C API
  4633. --------------------------
  4634.  
  4635. - Because some interfaces have changed, the PYTHON_API macro has been
  4636. bumped.  Most extensions built for the old API version will still run,
  4637. but I can't guarantee this.  Python prints a warning message on
  4638. version mismatches; it dumps core when the version mismatch causes a
  4639. serious problem :-)
  4640.  
  4641. - I've completed the Grand Renaming, with the help of Roger Masse and
  4642. Barry Warsaw.  This makes reading or debugging the code much easier.
  4643. Many other unrelated code reorganizations have also been carried out.
  4644. The allobjects.h header file is gone; instead, you would have to
  4645. include Python.h followed by rename2.h.  But you're better off running
  4646. Tools/scripts/fixcid.py -s Misc/RENAME on your source, so you can omit
  4647. the rename2.h; it will disappear in the next release.
  4648.  
  4649. - Various and sundry small bugs in the "abstract" interfaces have been
  4650. fixed.  Thanks to all the (involuntary) testers of the Python 1.4
  4651. version!  Some new functions have been added, e.g. PySequence_List(o),
  4652. equivalent to list(o) in Python.
  4653.  
  4654. - New API functions PyLong_FromUnsignedLong() and
  4655. PyLong_AsUnsignedLong().
  4656.  
  4657. - The API functions in the file cgensupport.c are no longer
  4658. supported.  This file has been moved to Modules and is only ever
  4659. compiled when the SGI specific 'gl' module is built.
  4660.  
  4661. - PyObject_Compare() can now raise an exception.  Check with
  4662. PyErr_Occurred().  The comparison function in an object type may also
  4663. raise an exception.
  4664.  
  4665. - The slice interface uses an upper bound of INT_MAX when no explicit
  4666. upper bound is given (e.x. for a[1:]).  It used to ask the object for
  4667. its length and do the calculations.
  4668.  
  4669. - Support for multiple independent interpreters.  See Doc/api.tex,
  4670. functions Py_NewInterpreter() and Py_EndInterpreter().  Since the
  4671. documentation is incomplete, also see the new Demo/pysvr example
  4672. (which shows how to use these in a threaded application) and the
  4673. source code.
  4674.  
  4675. - There is now a Py_Finalize() function which "de-initializes"
  4676. Python.  It is possible to completely restart the interpreter
  4677. repeatedly by calling Py_Finalize() followed by Py_Initialize().  A
  4678. change of functionality in Py_Initialize() means that it is now a
  4679. fatal error to call it while the interpreter is already initialized.
  4680. The old, half-hearted Py_Cleanup() routine is gone.  Use of Py_Exit()
  4681. is deprecated (it is nothing more than Py_Finalize() followed by
  4682. exit()).
  4683.  
  4684. - There are no known memory leaks left.  While Py_Finalize() doesn't
  4685. free *all* allocated memory (some of it is hard to track down),
  4686. repeated calls to Py_Finalize() and Py_Initialize() do not create
  4687. unaccessible heap blocks.
  4688.  
  4689. - There is now explicit per-thread state.  (Inspired by, but not the
  4690. same as, Greg Stein's free threading patches.)
  4691.  
  4692. - There is now better support for threading C applications.  There are
  4693. now explicit APIs to manipulate the interpreter lock.  Read the source
  4694. or the Demo/pysvr example; the new functions are
  4695. PyEval_{Acquire,Release}{Lock,Thread}().
  4696.  
  4697. - The test macro DEBUG has changed to Py_DEBUG, to avoid interference
  4698. with other libraries' DEBUG macros.  Likewise for any other test
  4699. macros that didn't yet start with Py_.
  4700.  
  4701. - New wrappers around malloc() and friends: Py_Malloc() etc. call
  4702. malloc() and call PyErr_NoMemory() when it fails; PyMem_Malloc() call
  4703. just malloc().  Use of these wrappers could be essential if multiple
  4704. memory allocators exist (e.g. when using certain DLL setups under
  4705. Windows).  (Idea by Jim Fulton.)
  4706.  
  4707. - New C API PyImport_Import() which uses whatever __import__() hook
  4708. that is installed for the current execution environment.  By Jim
  4709. Fulton.
  4710.  
  4711. - It is now possible for an extension module's init function to fail
  4712. non-fatally, by calling one of the PyErr_* functions and returning.
  4713.  
  4714. - The PyInt_AS_LONG() and PyFloat_AS_DOUBLE() macros now cast their
  4715. argument to the proper type, like the similar PyString macros already
  4716. did.  (Suggestion by Marc-Andre Lemburg.)  Similar for PyList_GET_SIZE
  4717. and PyList_GET_ITEM.
  4718.  
  4719. - Some of the Py_Get* function, like Py_GetVersion() (but not yet
  4720. Py_GetPath()) are now declared as returning a const char *.  (More
  4721. should follow.)
  4722.  
  4723. - Changed the run-time library to check for exceptions after object
  4724. comparisons.  PyObject_Compare() can now return an exception; use
  4725. PyErr_Occurred() to check (there is *no* special return value).
  4726.  
  4727. - PyFile_WriteString() and Py_Flushline() now return error indicators
  4728. instead of clearing exceptions.  This fixes an obscure bug where using
  4729. these would clear a pending exception, discovered by Just van Rossum.
  4730.  
  4731. - There's a new function, PyArg_ParseTupleAndKeywords(), which parses
  4732. an argument list including keyword arguments.  Contributed by Geoff
  4733. Philbrick.
  4734.  
  4735. - PyArg_GetInt() is gone.
  4736.  
  4737. - It's no longer necessary to include graminit.h when calling one of
  4738. the extended parser API functions.  The three public grammar start
  4739. symbols are now in Python.h as Py_single_input, Py_file_input, and
  4740. Py_eval_input.
  4741.  
  4742. - The CObject interface has a new function,
  4743. PyCObject_Import(module, name).  It calls PyCObject_AsVoidPtr()
  4744. on the object referenced by "module.name".
  4745.  
  4746.  
  4747. Tkinter
  4748. -------
  4749.  
  4750. - On popular demand, _tkinter once again installs a hook for readline
  4751. that processes certain Tk events while waiting for the user to type
  4752. (using PyOS_InputHook).
  4753.  
  4754. - A patch by Craig McPheeters plugs the most obnoxious memory leaks,
  4755. caused by command definitions referencing widget objects beyond their
  4756. lifetime.
  4757.  
  4758. - New standard dialog modules: tkColorChooser.py, tkCommonDialog.py,
  4759. tkMessageBox.py, tkFileDialog.py, tkSimpleDialog.py These interface
  4760. with the new Tk dialog scripts, and provide more "native platform"
  4761. style file selection dialog boxes on some platforms.  Contributed by
  4762. Fredrik Lundh.
  4763.  
  4764. - Tkinter.py: when the first Tk object is destroyed, it sets the
  4765. hiddel global _default_root to None, so that when another Tk object is
  4766. created it becomes the new default root.  Other miscellaneous
  4767. changes and fixes.
  4768.  
  4769. - The Image class now has a configure method.
  4770.  
  4771. - Added a bunch of new winfo options to Tkinter.py; we should now be
  4772. up to date with Tk 4.2.  The new winfo options supported are:
  4773. mananger, pointerx, pointerxy, pointery, server, viewable, visualid,
  4774. visualsavailable.
  4775.  
  4776. - The broken bind() method on Canvas objects defined in the Canvas.py
  4777. module has been fixed.  The CanvasItem and Group classes now also have
  4778. an unbind() method.
  4779.  
  4780. - The problem with Tkinter.py falling back to trying to import
  4781. "tkinter" when "_tkinter" is not found has been fixed -- it no longer
  4782. tries "tkinter", ever.  This makes diagnosing the problem "_tkinter
  4783. not configured" much easier and will hopefully reduce the newsgroup
  4784. traffic on this topic.
  4785.  
  4786. - The ScrolledText module once again supports the 'cnf' parameter, to
  4787. be compatible with the examples in Mark Lutz' book (I know, I know,
  4788. too late...)
  4789.  
  4790. - The _tkinter.c extension module has been revamped.  It now support
  4791. Tk versions 4.1 through 8.0; support for 4.0 has been dropped.  It
  4792. works well under Windows and Mac (with the latest Tk ports to those
  4793. platforms).  It also supports threading -- it is safe for one
  4794. (Python-created) thread to be blocked in _tkinter.mainloop() while
  4795. other threads modify widgets.  To make the changes visible, those
  4796. threads must use update_idletasks()method.  (The patch for threading
  4797. in 1.5a3 was broken; in 1.5a4, it is back in a different version,
  4798. which requires access to the Tcl sources to get it to work -- hence it
  4799. is disabled by default.)
  4800.  
  4801. - A bug in _tkinter.c has been fixed, where Split() with a string
  4802. containing an unmatched '"' could cause an exception or core dump.
  4803.  
  4804. - Unfortunately, on Windows and Mac, Tk 8.0 no longer supports
  4805. CreateFileHandler, so _tkinter.createfilehandler is not available on
  4806. those platforms when using Tk 8.0 or later.  I will have to rethink
  4807. how to interface with Tcl's lower-level event mechanism, or with its
  4808. channels (which are like Python's file-like objects).  Jack Jansen has
  4809. provided a fix for the Mac, so createfilehandler *is* actually
  4810. supported there; maybe I can adapt his fix for Windows.
  4811.  
  4812.  
  4813. Tools and Demos
  4814. ---------------
  4815.  
  4816. - A new regression test suite is provided, which tests most of the
  4817. standard and built-in modules.  The regression test is run by invoking
  4818. the script Lib/test/regrtest.py.  Barry Warsaw wrote the test harnass;
  4819. he and Roger Masse contributed most of the new tests.
  4820.  
  4821. - New tool: faqwiz -- the CGI script that is used to maintain the
  4822. Python FAQ (http://grail.cnri.reston.va.us/cgi-bin/faqw.py).  In
  4823. Tools/faqwiz.
  4824.  
  4825. - New tool: webchecker -- a simple extensible web robot that, when
  4826. aimed at a web server, checks that server for dead links.  Available
  4827. are a command line utility as well as a Tkinter based GUI version.  In
  4828. Tools/webchecker.  A simplified version of this program is dissected
  4829. in my article in O'Reilly's WWW Journal, the issue on Scripting
  4830. Languages (Vol 2, No 2); Scripting the Web with Python (pp 97-120).
  4831. Includes a parser for robots.txt files by Skip Montanaro.
  4832.  
  4833. - New small tools: cvsfiles.py (prints a list of all files under CVS
  4834. n a particular directory tree), treesync.py (a rather Guido-specific
  4835. script to synchronize two source trees, one on Windows NT, the other
  4836. one on Unix under CVS but accessible from the NT box), and logmerge.py
  4837. (sort a collection of RCS or CVS logs by date).  In Tools/scripts.
  4838.  
  4839. - The freeze script now also works under Windows (NT).  Another
  4840. feature allows the -p option to be pointed at the Python source tree
  4841. instead of the installation prefix.  This was loosely based on part of
  4842. xfreeze by Sam Rushing and Bill Tutt.
  4843.  
  4844. - New examples (Demo/extend) that show how to use the generic
  4845. extension makefile (Misc/Makefile.pre.in).
  4846.  
  4847. - Tools/scripts/h2py.py now supports C++ comments.
  4848.  
  4849. - Tools/scripts/pystone.py script is upgraded to version 1.1; there
  4850. was a bug in version 1.0 (distributed with Python 1.4) that leaked
  4851. memory.  Also, in 1.1, the LOOPS variable is incremented to 10000.
  4852.  
  4853. - Demo/classes/Rat.py completely rewritten by Sjoerd Mullender.
  4854.  
  4855.  
  4856. Windows (NT and 95)
  4857. -------------------
  4858.  
  4859. - New project files for Developer Studio (Visual C++) 5.0 for Windows
  4860. NT (the old VC++ 4.2 Makefile is also still supported, but will
  4861. eventually be withdrawn due to its bulkiness).
  4862.  
  4863. - See the note on the new module search path in the "Miscellaneous" section 
  4864. above.
  4865.  
  4866. - Support for Win32s (the 32-bit Windows API under Windows 3.1) is
  4867. basically withdrawn.  If it still works for you, you're lucky.
  4868.  
  4869. - There's a new extension module, msvcrt.c, which provides various 
  4870. low-level operations defined in the Microsoft Visual C++ Runtime Library.  
  4871. These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and 
  4872. console I/O functions like kbhit(), getch() and putch().
  4873.  
  4874. - The -u option not only sets the standard I/O streams to unbuffered
  4875. status, but also sets them in binary mode.  (This can also be done
  4876. using msvcrt.setmode(), by the way.)
  4877.  
  4878. - The, sys.prefix and sys.exec_prefix variables point to the directory 
  4879. where Python is installed, or to the top of the source tree, if it was run 
  4880. from there.
  4881.  
  4882. - The various os.path modules (posixpath, ntpath, macpath) now support
  4883. passing more than two arguments to the join() function, so
  4884. os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b,
  4885. c)).
  4886.  
  4887. - The ntpath module (normally used as os.path) supports ~ to $HOME 
  4888. expansion in expanduser().
  4889.  
  4890. - The freeze tool now works on Windows.
  4891.  
  4892. - See also the Tkinter category for a sad note on
  4893. _tkinter.createfilehandler().
  4894.  
  4895. - The truncate() method for file objects now works on Windows.
  4896.  
  4897. - Py_Initialize() is no longer called when the DLL is loaded.  You
  4898. must call it yourself.
  4899.  
  4900. - The time module's clock() function now has good precision through
  4901. the use of the Win32 API QueryPerformanceCounter().
  4902.  
  4903. - Mark Hammond will release Python 1.5 versions of PythonWin and his
  4904. other Windows specific code: the win32api extensions, COM/ActiveX
  4905. support, and the MFC interface.
  4906.  
  4907.  
  4908. Mac
  4909. ---
  4910.  
  4911. - As always, the Macintosh port will be done by Jack Jansen.  He will
  4912. make a separate announcement for the Mac specific source code and the
  4913. binary distribution(s) when these are ready.
  4914.  
  4915.  
  4916. ======================================================================
  4917.  
  4918.  
  4919. =====================================
  4920. ==> Release 1.4 (October 25 1996) <==
  4921. =====================================
  4922.  
  4923. (Starting in reverse chronological order:)
  4924.  
  4925. - Changed disclaimer notice.
  4926.  
  4927. - Added SHELL=/bin/sh to Misc/Makefile.pre.in -- some Make versions
  4928. default to the user's login shell.
  4929.  
  4930. - In Lib/tkinter/Tkinter.py, removed bogus binding of <Delete> in Text
  4931. widget, and bogus bspace() function.
  4932.  
  4933. - In Lib/cgi.py, bumped __version__ to 2.0 and restored a truncated
  4934. paragraph.
  4935.  
  4936. - Fixed the NT Makefile (PC/vc40.mak) for VC 4.0 to set /MD for all
  4937. subprojects, and to remove the (broken) experimental NumPy
  4938. subprojects.
  4939.  
  4940. - In Lib/py_compile.py, cast mtime to long() so it will work on Mac
  4941. (where os.stat() returns mtimes as floats.)
  4942. - Set self.rfile unbuffered (like self.wfile) in SocketServer.py, to
  4943. fix POST in CGIHTTPServer.py.
  4944.  
  4945. - Version 2.83 of Misc/python-mode.el for Emacs is included.
  4946.  
  4947. - In Modules/regexmodule.c, fixed symcomp() to correctly handle a new
  4948. group starting immediately after a group tag.
  4949.  
  4950. - In Lib/SocketServer.py, changed the mode for rfile to unbuffered.
  4951.  
  4952. - In Objects/stringobject.c, fixed the compare function to do the
  4953. first char comparison in unsigned mode, for consistency with the way
  4954. other characters are compared by memcmp().
  4955.  
  4956. - In Lib/tkinter/Tkinter.py, fixed Scale.get() to support floats.
  4957.  
  4958. - In Lib/urllib.py, fix another case where openedurl wasn't set.
  4959.  
  4960. (XXX Sorry, the rest is in totally random order.  No time to fix it.)
  4961.  
  4962. - SyntaxError exceptions detected during code generation
  4963. (e.g. assignment to an expression) now include a line number.
  4964.  
  4965. - Don't leave trailing / or \ in script directory inserted in front of
  4966. sys.path.
  4967.  
  4968. - Added a note to Tools/scripts/classfix.py abouts its historical
  4969. importance.
  4970.  
  4971. - Added Misc/Makefile.pre.in, a universal Makefile for extensions
  4972. built outside the distribution.
  4973.  
  4974. - Rewritten Misc/faq2html.py, by Ka-Ping Yee.
  4975.  
  4976. - Install shared modules with mode 555 (needed for performance on some
  4977. platforms).
  4978.  
  4979. - Some changes to standard library modules to avoid calling append()
  4980. with more than one argument -- while supported, this should be
  4981. outlawed, and I don't want to set a bad example.
  4982.  
  4983. - bdb.py (and hence pdb.py) supports calling run() with a code object
  4984. instead of a code string.
  4985.  
  4986. - Fixed an embarrassing bug cgi.py which prevented correct uploading
  4987. of binary files from Netscape (which doesn't distinguish between
  4988. binary and text files).  Also added dormant logging support, which
  4989. makes it easier to debug the cgi module itself.
  4990.  
  4991. - Added default writer to constructor of NullFormatter class.
  4992.  
  4993. - Use binary mode for socket.makefile() calls in ftplib.py.
  4994.  
  4995. - The ihooks module no longer "installs" itself upon import -- this
  4996. was an experimental feature that helped ironing out some bugs but that
  4997. slowed down code that imported it without the need to install it
  4998. (e.g. the rexec module).  Also close the file in some cases and add
  4999. the __file__ attribute to loaded modules.
  5000.  
  5001. - The test program for mailbox.py is now more useful.
  5002.  
  5003. - Added getparamnames() to Message class in mimetools.py -- it returns
  5004. the names of parameters to the content-type header.
  5005.  
  5006. - Fixed a typo in ni that broke the loop stripping "__." from names.
  5007.  
  5008. - Fix sys.path[0] for scripts run via pdb.py's new main program.
  5009.  
  5010. - profile.py can now also run a script, like pdb.
  5011.  
  5012. - Fix a small bug in pyclbr -- don't add names starting with _ when
  5013. emulating from ... import *.
  5014.  
  5015. - Fixed a series of embarrassing typos in rexec's handling of standard
  5016. I/O redirection.  Added some more "safe" built-in modules: cmath,
  5017. errno, operator.
  5018.  
  5019. - Fixed embarrassing typo in shelve.py.
  5020.  
  5021. - Added SliceType and EllipsisType to types.py.
  5022.  
  5023. - In urllib.py, added handling for error 301 (same as 302); added
  5024. geturl() method to get the URL after redirection.
  5025.  
  5026. - Fixed embarrassing typo in xdrlib.py.  Also fixed typo in Setup.in
  5027. for _xdrmodule.c and removed redundant #include from _xdrmodule.c.
  5028.  
  5029. - Fixed bsddbmodule.c to add binary mode indicator on platforms that
  5030. have it.  This should make it working on Windows NT.
  5031.  
  5032. - Changed last uses of #ifdef NT to #ifdef MS_WINDOWS or MS_WIN32,
  5033. whatever applies.  Also rationalized some other tests for various MS
  5034. platforms.
  5035.  
  5036. - Added the sources for the NT installer script used for Python
  5037. 1.4beta3.  Not tested with this release, but better than nothing.
  5038.  
  5039. - A compromise in pickle's defenses against Trojan horses: a
  5040. user-defined function is now okay where a class is expected.  A
  5041. built-in function is not okay, to prevent pickling something that
  5042. will execute os.system("rm -f *") when unpickling.
  5043.  
  5044. - dis.py will print the name of local variables referenced by local
  5045. load/store/delete instructions.
  5046.  
  5047. - Improved portability of SimpleHTTPServer module to non-Unix
  5048. platform.
  5049.  
  5050. - The thread.h interface adds an extra argument to down_sema().  This
  5051. only affects other C code that uses thread.c; the Python thread module
  5052. doesn't use semaphores (which aren't provided on all platforms where
  5053. Python threads are supported).  Note: on NT, this change is not
  5054. implemented.
  5055.  
  5056. - Fixed some typos in abstract.h; corrected signature of
  5057. PyNumber_Coerce, added PyMapping_DelItem.  Also fixed a bug in
  5058. abstract.c's PyObject_CallMethod().
  5059.  
  5060. - apply(classname, (), {}) now works even if the class has no
  5061. __init__() method.
  5062.  
  5063. - Implemented complex remainder and divmod() (these would dump core!).
  5064. Conversion of complex numbers to int, long int or float now raises an
  5065. exception, since there is no meaningful way to do it without losing
  5066. information.
  5067.  
  5068. - Fixed bug in built-in complex() function which gave the wrong result
  5069. for two real arguments.
  5070.  
  5071. - Change the hash algorithm for strings -- the multiplier is now
  5072. 1000003 instead of 3, which gives better spread for short strings.
  5073.  
  5074. - New default path for Windows NT, the registry structure now supports
  5075. default paths for different install packages.  (Mark Hammond -- the
  5076. next PythonWin release will use this.)
  5077.  
  5078. - Added more symbols to the python_nt.def file.
  5079.  
  5080. - When using GNU readline, set rl_readline_name to "python".
  5081.  
  5082. - The Ellipses built-in name has been renamed to Ellipsis -- this is
  5083. the correct singular form.  Thanks to Ka-Ping Yee, who saved us from
  5084. eternal embarrassment.
  5085.  
  5086. - Bumped the PYTHON_API_VERSION to 1006, due to the Ellipses ->
  5087. Ellipsis name change.
  5088.  
  5089. - Updated the library reference manual.  Added documentation of
  5090. restricted mode (rexec, Bastion) and the formatter module (for use
  5091. with the htmllib module).  Fixed the documentation of htmllib
  5092. (finally).
  5093.  
  5094. - The reference manual is now maintained in FrameMaker.
  5095.  
  5096. - Upgraded scripts Doc/partparse.py and Doc/texi2html.py.
  5097.  
  5098. - Slight improvements to Doc/Makefile.
  5099.  
  5100. - Added fcntl.lockf(). This should be used for Unix file locking
  5101. instead of the posixfile module; lockf() is more portable.
  5102.  
  5103. - The getopt module now supports long option names, thanks to Lars
  5104. Wizenius.
  5105.  
  5106. - Plenty of changes to Tkinter and Canvas, mostly due to Fred Drake
  5107. and Nils Fischbeck.
  5108.  
  5109. - Use more bits of time.time() in whrandom's default seed().
  5110.  
  5111. - Performance hack for regex module's regs attribute.
  5112.  
  5113. - Don't close already closed socket in socket module.
  5114.  
  5115. - Correctly handle separators containing embedded nulls in
  5116. strop.split, strop.find and strop.rfind.  Also added more detail to
  5117. error message for strop.atoi and friends.
  5118.  
  5119. - Moved fallback definition for hypot() to Python/hypot.c.
  5120.  
  5121. - Added fallback definition for strdup, in Python/strdup.c.
  5122.  
  5123. - Fixed some bugs where a function would return 0 to indicate an error
  5124. where it should return -1.
  5125.  
  5126. - Test for error returned by time.localtime(), and rationalized its MS
  5127. tests.
  5128.  
  5129. - Added Modules/Setup.local file, which is processed after Setup.
  5130.  
  5131. - Corrected bug in toplevel Makefile.in -- execution of regen script
  5132. would not use the right PATH and PYTHONPATH.
  5133.  
  5134. - Various and sundry NeXT configuration changes (sigh).
  5135.  
  5136. - Support systems where libreadline needs neither termcap nor curses.
  5137.  
  5138. - Improved ld_so_aix script and python.exp file (for AIX).
  5139.  
  5140. - More stringent test for working <stdarg.h> in configure script.
  5141.  
  5142. - Removed Demo/www subdirectory -- it was totally out of date.
  5143.  
  5144. - Improved demos and docs for Fred Drake's parser module; fixed one
  5145. typo in the module itself.
  5146.  
  5147.  
  5148. =========================================
  5149. ==> Release 1.4beta3 (August 26 1996) <==
  5150. =========================================
  5151.  
  5152.  
  5153. (XXX This is less readable that it should.  I promise to restructure
  5154. it for the final 1.4 release.)
  5155.  
  5156.  
  5157. What's new in 1.4beta3 (since beta2)?
  5158. -------------------------------------
  5159.  
  5160. - Name mangling to implement a simple form of class-private variables.
  5161. A name of the form "__spam" can't easily be used outside the class.
  5162. (This was added in 1.4beta3, but left out of the 1.4beta3 release
  5163. message.)
  5164.  
  5165. - In urllib.urlopen(): HTTP URLs containing user:passwd@host are now
  5166. handled correctly when using a proxy server.
  5167.  
  5168. - In ntpath.normpath(): don't truncate to 8+3 format.
  5169.  
  5170. - In mimetools.choose_boundary(): don't die when getuid() or getpid()
  5171. aren't defined.
  5172.  
  5173. - Module urllib: some optimizations to (un)quoting.
  5174.  
  5175. - New module MimeWriter for writing MIME documents.
  5176.  
  5177. - More changes to formatter module.
  5178.  
  5179. - The freeze script works once again and is much more robust (using
  5180. sys.prefix etc.).  It also supports a -o option to specify an
  5181. output directory.
  5182.  
  5183. - New module whichdb recognizes dbm, gdbm and bsddb/dbhash files.
  5184.  
  5185. - The Doc/Makefile targets have been reorganized somewhat to remove the 
  5186. insistence on always generating PostScript.
  5187.  
  5188. - The texinfo to html filter (Doc/texi2html.py) has been improved somewhat.
  5189.  
  5190. - "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing 
  5191. name conflict on the Mac.
  5192.  
  5193. - Linking a module compiled with a different setting for Py_TRACE_REFS now 
  5194. generates a linker error rather than a core dump.
  5195.  
  5196. - The cgi module has a new convenience function print_exception(), which 
  5197. formats a python exception using HTML.  It also fixes a bug in the 
  5198. compatibility code and adds a dubious feature which makes it possible to 
  5199. have two query strings, one in the URL and one in the POST data.
  5200.  
  5201. - A subtle change in the unpickling of class instances makes it possible 
  5202. to unpickle in restricted execution mode, where the __dict__ attribute is 
  5203. not available (but setattr() is).
  5204.  
  5205. - Documentation for os.path.splitext() (== posixpath.splitext()) has been 
  5206. cleared up.  It splits at the *last* dot.
  5207.  
  5208. - posixfile locking is now also correctly supported on AIX.
  5209.  
  5210. - The tempfile module once again honors an initial setting of tmpdir.  It 
  5211. now works on Windows, too.
  5212.  
  5213. - The traceback module has some new functions to extract, format and print 
  5214. the active stack.
  5215.  
  5216. - Some translation functions in the urllib module have been made a little 
  5217. less sluggish.
  5218.  
  5219. - The addtag_* methods for Canvas widgets in Tkinter as well as in the 
  5220. separate Canvas class have been fixed so they actually do something 
  5221. meaningful.
  5222.  
  5223. - A tiny _test() function has been added to Tkinter.py.
  5224.  
  5225. - A generic Makefile for dynamically loaded modules is provided in the Misc 
  5226. subdirectory (Misc/gMakefile).
  5227.  
  5228. - A new version of python-mode.el for Emacs is provided.  See
  5229. http://www.python.org/ftp/emacs/pmdetails.html for details.  The
  5230. separate file pyimenu.el is no longer needed, imenu support is folded
  5231. into python-mode.el.
  5232.  
  5233. - The configure script can finally correctly find the readline library in a 
  5234. non-standard location.  The LDFLAGS variable is passed on the the Makefiles 
  5235. from the configure script.
  5236.  
  5237. - Shared libraries are now installed as programs (i.e. with executable 
  5238. permission).  This is required on HP-UX and won't hurt on other systems.
  5239.  
  5240. - The objc.c module is no longer part of the distribution.  Objective-C 
  5241. support may become available as contributed software on the ftp site.
  5242.  
  5243. - The sybase module is no longer part of the distribution.  A much
  5244. improved sybase module is available as contributed software from the
  5245. ftp site.
  5246.  
  5247. - _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and 
  5248. Mac (don't use unpatched Tcl/Tk!).  The default line in the Setup.in file 
  5249. now links with Tcl 7.5 / Tk 4.1 rather than 7.4/4.0.
  5250.  
  5251. - In Setup, you can now write "*shared*" instead of "*noconfig*", and you 
  5252. can use *.so and *.sl as shared libraries.
  5253.  
  5254. - Some more fidgeting for AIX shared libraries.
  5255.  
  5256. - The mpz module is now compatible with GMP 2.x.  (Not tested by me.)
  5257. (Note -- a complete replacement by Niels Mo"ller, called gpmodule, is
  5258. available from the contrib directory on the ftp site.)
  5259.  
  5260. - A warning is written to sys.stderr when a __del__ method raises an 
  5261. exception (formerly, such exceptions were completely ignored).
  5262.  
  5263. - The configure script now defines HAVE_OLD_CPP if the C preprocessor is 
  5264. incapable of ANSI style token concatenation and stringification.
  5265.  
  5266. - All source files (except a few platform specific modules) are once again 
  5267. compatible with K&R C compilers as well as ANSI compilers.  In particular,
  5268. ANSI-isms have been removed or made conditional in complexobject.c, 
  5269. getargs.c and operator.c.
  5270.  
  5271. - The abstract object API has three new functions, PyObject_DelItem, 
  5272. PySequence_DelItem, and PySequence_DelSlice.
  5273.  
  5274. - The operator module has new functions delitem and delslice, and the 
  5275. functions "or" and "and" are renamed to "or_" and "and_" (since "or" and 
  5276. "and" are reserved words).  ("__or__" and "__and__" are unchanged.)
  5277.  
  5278. - The environment module is no longer supported; putenv() is now a function 
  5279. in posixmodule (also under NT).
  5280.  
  5281. - Error in filter(<function>, "") has been fixed.
  5282.  
  5283. - Unrecognized keyword arguments raise TypeError, not KeyError.
  5284.  
  5285. - Better portability, fewer bugs and memory leaks, fewer compiler warnings, 
  5286. some more documentation.
  5287.  
  5288. - Bug in float power boundary case (0.0 to the negative integer power) 
  5289. fixed.
  5290.  
  5291. - The test of negative number to the float power has been moved from the 
  5292. built-in pow() functin to floatobject.c (so complex numbers can yield the 
  5293. correct result).
  5294.  
  5295. - The bug introduced in beta2 where shared libraries loaded (using 
  5296. dlopen()) from the current directory would fail, has been fixed.
  5297.  
  5298. - Modules imported as shared libraries now also have a __file__ attribute, 
  5299. giving the filename from which they were loaded.  The only modules without 
  5300. a __file__ attribute now are built-in modules.
  5301.  
  5302. - On the Mac, dynamically loaded modules can end in either ".slb" or 
  5303. ".<platform>.slb" where <platform> is either "CFM68K" or "ppc".  The ".slb" 
  5304. extension should only be used for "fat" binaries.
  5305.  
  5306. - C API addition: marshal.c now supports 
  5307. PyMarshal_WriteObjectToString(object).
  5308.  
  5309. - C API addition: getargs.c now supports
  5310. PyArg_ParseTupleAndKeywords(args, kwdict, format, kwnames, ...)
  5311. to parse keyword arguments.
  5312.  
  5313. - The PC versioning scheme (sys.winver) has changed once again.  the 
  5314. version number is now "<digit>.<digit>.<digit>.<apiversion>", where the 
  5315. first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4, 
  5316. "1.4.1" for Python 1.4.1 -- the beta level is not included) and 
  5317. <apiversion> is the four-digit PYTHON_API_VERSION (currently 1005).
  5318.  
  5319. - h2py.py accepts whitespace before the # in CPP directives
  5320.  
  5321. - On Solaris 2.5, it should now be possible to use either Posix threads or 
  5322. Solaris threads (XXX: how do you select which is used???).  (Note: the 
  5323. Python pthreads interface doesn't fully support semaphores yet -- anyone 
  5324. care to fix this?)
  5325.  
  5326. - Thread support should now work on AIX, using either DCE threads or 
  5327. pthreads.
  5328.  
  5329. - New file Demo/sockets/unicast.py
  5330.  
  5331. - Working Mac port, with CFM68K support, with Tk 4.1 support (though not 
  5332. both) (XXX)
  5333.  
  5334. - New project setup for PC port, now compatible with PythonWin, with 
  5335. _tkinter and NumPy support (XXX)
  5336.  
  5337. - New module site.py (XXX)
  5338.  
  5339. - New module xdrlib.py and optional support module _xdrmodule.c (XXX)
  5340.  
  5341. - parser module adapted to new grammar, complete w/ Doc & Demo (XXX)
  5342.  
  5343. - regen script fixed (XXX)
  5344.  
  5345. - new machdep subdirectories Lib/{aix3,aix4,next3_3,freebsd2,linux2} (XXX)
  5346.  
  5347. - testall now also tests math module (XXX)
  5348.  
  5349. - string.atoi c.s. now raise an exception for an empty input string.
  5350.  
  5351. - At last, it is no longer necessary to define HAVE_CONFIG_H in order to 
  5352. have config.h included at various places.
  5353.  
  5354. - Unrecognized keyword arguments now raise TypeError rather than KeyError.
  5355.  
  5356. - The makesetup script recognizes files with extension .so or .sl as
  5357. (shared) libraries.
  5358.  
  5359. - 'access' is no longer a reserved word, and all code related to its 
  5360. implementation is gone (or at least #ifdef'ed out).  This should make 
  5361. Python a little speedier too!
  5362.  
  5363. - Performance enhancements suggested by Sjoerd Mullender.  This includes 
  5364. the introduction of two new optional function pointers in type object, 
  5365. getattro and setattro, which are like getattr and setattr but take a 
  5366. string object instead of a C string pointer.
  5367.  
  5368. - New operations in string module: lstrip(s) and rstrip(s) strip whitespace 
  5369. only on the left or only on the right, A new optional third argument to 
  5370. split() specifies the maximum number of separators honored (so 
  5371. splitfields(s, sep, n) returns a list of at most n+1 elements).  (Since 
  5372. 1.3, splitfields(s, None) is totally equivalent to split(s).)
  5373. string.capwords() has an optional second argument specifying the 
  5374. separator (which is passed to split()).
  5375.  
  5376. - regsub.split() has the same addition as string.split().  regsub.splitx(s, 
  5377. sep, maxsep) implements the functionality that was regsub.split(s, 1) in 
  5378. 1.4beta2 (return a list containing the delimiters as well as the words).
  5379.  
  5380. - Final touch for AIX loading, rewritten Misc/AIX-NOTES.
  5381.  
  5382. - In Modules/_tkinter.c, when using Tk 4.1 or higher, use className
  5383. argument to _tkinter.create() to set Tcl's argv0 variable, so X
  5384. resources use the right resource class again.
  5385.  
  5386. - Add #undef fabs to Modules/mathmodule.c for macintosh.
  5387.  
  5388. - Added some macro renames for AIX in Modules/operator.c.
  5389.  
  5390. - Removed spurious 'E' from Doc/liberrno.tex.
  5391.  
  5392. - Got rid of some cruft in Misc/ (dlMakefile, pyimenu.el); added new
  5393. Misc/gMakefile and new version of Misc/python-mode.el.
  5394.  
  5395. - Fixed typo in Lib/ntpath.py (islink has "return false" which gives a
  5396. NameError).
  5397.  
  5398. - Added missing "from types import *" to Lib/tkinter/Canvas.py.
  5399.  
  5400. - Added hint about using default args for __init__ to pickle docs.
  5401.  
  5402. - Corrected typo in Inclide/abstract.h: PySequence_Lenth ->
  5403. PySequence_Length.
  5404.  
  5405. - Some improvements to Doc/texi2html.py.
  5406.  
  5407. - In Python/import.c, Cast unsigned char * in struct _frozen to char *
  5408. in calls to rds_object().
  5409.  
  5410. - In doc/ref4.tex, added note about scope of lambda bodies.
  5411.  
  5412. What's new in 1.4beta2 (since beta1)?
  5413. -------------------------------------
  5414.  
  5415. - Portability bug in the md5.h header solved.
  5416.  
  5417. - The PC build procedure now really works, and sets sys.platform to a
  5418. meaningful value (a few things were botched in beta 1).  Lib/dos_8x3
  5419. is now a standard part of the distribution (alas).
  5420.  
  5421. - More improvements to the installation procedure.  Typing "make install" 
  5422. now inserts the version number in the pathnames of almost everything 
  5423. installed, and creates the machine dependent modules (FCNTL.py etc.) if not 
  5424. supplied by the distribution.  (XXX There's still a problem with the latter 
  5425. because the "regen" script requires that Python is installed.  Some manual 
  5426. intervention may still be required.) (This has been fixed in 1.4beta3.)
  5427.  
  5428. - New modules: errno, operator (XXX).
  5429.  
  5430. - Changes for use with Numerical Python: builtin function slice() and
  5431. Ellipses object, and corresponding syntax:
  5432.  
  5433.     x[lo:hi:stride]        ==    x[slice(lo, hi, stride)]
  5434.     x[a, ..., z]        ==    x[(a, Ellipses, z)]
  5435.  
  5436. - New documentation for errno and cgi mdoules.
  5437.  
  5438. - The directory containing the script passed to the interpreter is
  5439. inserted in from of sys.path; "." is no longer a default path
  5440. component.
  5441.  
  5442. - Optional third string argument to string.translate() specifies
  5443. characters to delete.  New function string.maketrans() creates a
  5444. translation table for translate() or for regex.compile().
  5445.  
  5446. - Module posix (and hence module os under Unix) now supports putenv().
  5447. Moreover, module os is enhanced so that if putenv() is supported,
  5448. assignments to os.environ entries make the appropriate putenv() call.
  5449. (XXX the putenv() implementation can leak a small amount of memory per
  5450. call.)
  5451.  
  5452. - pdb.py can now be invoked from the command line to debug a script:
  5453. python pdb.py <script> <arg> ...
  5454.  
  5455. - Much improved parseaddr() in rfc822.
  5456.  
  5457. - In cgi.py, you can now pass an alternative value for environ to
  5458. nearly all functions.
  5459.  
  5460. - You can now assign to instance variables whose name begins and ends
  5461. with '__'.
  5462.  
  5463. - New version of Fred Drake's parser module and associates (token,
  5464. symbol, AST).
  5465.  
  5466. - New PYTHON_API_VERSION value and .pyc file magic number (again!).
  5467.  
  5468. - The "complex" internal structure type is now called "Py_complex" to
  5469. avoid name conflicts.
  5470.  
  5471. - Numerous small bugs fixed.
  5472.  
  5473. - Slight pickle speedups.
  5474.  
  5475. - Some slight speedups suggested by Sjoerd (more coming in 1.4 final).
  5476.  
  5477. - NeXT portability mods by Bill Bumgarner integrated.
  5478.  
  5479. - Modules regexmodule.c, bsddbmodule.c and xxmodule.c have been
  5480. converted to new naming style.
  5481.  
  5482.  
  5483. What's new in 1.4beta1 (since 1.3)?
  5484. -----------------------------------
  5485.  
  5486. - Added sys.platform and sys.exec_platform for Bill Janssen.
  5487.  
  5488. - Installation has been completely overhauled.  "make install" now installs 
  5489. everything, not just the python binary.  Installation uses the install-sh 
  5490. script (borrowed from X11) to install each file.
  5491.  
  5492. - New functions in the posix module: mkfifo, plock, remove (== unlink),
  5493. and ftruncate.  More functions are also available under NT.
  5494.  
  5495. - New function in the fcntl module: flock.
  5496.  
  5497. - Shared library support for FreeBSD.
  5498.  
  5499. - The --with-readline option can now be used without a DIRECTORY argument, 
  5500. for systems where libreadline.* is in one of the standard places.  It is 
  5501. also possible for it to be a shared library.
  5502.  
  5503. - The extension tkinter has been renamed to _tkinter, to avoid confusion 
  5504. with Tkinter.py oncase insensitive file systems.  It now supports Tk 4.1 as 
  5505. well as 4.0.
  5506.  
  5507. - Author's change of address from CWI in Amsterdam, The Netherlands, to 
  5508. CNRI in Reston, VA, USA.
  5509.  
  5510. - The math.hypot() function is now always available (if it isn't found in 
  5511. the C math library, Python provides its own implementation).
  5512.  
  5513. - The latex documentation is now compatible with latex2e, thanks to David 
  5514. Ascher.
  5515.  
  5516. - The expression x**y is now equivalent to pow(x, y).
  5517.  
  5518. - The indexing expression x[a, b, c] is now equivalent to x[(a, b, c)].
  5519.  
  5520. - Complex numbers are now supported.  Imaginary constants are written with 
  5521. a 'j' or 'J' prefix, general complex numbers can be formed by adding a real 
  5522. part to an imaginary part, like 3+4j.  Complex numbers are always stored in 
  5523. floating point form, so this is equivalent to 3.0+4.0j.  It is also 
  5524. possible to create complex numbers with the new built-in function 
  5525. complex(re, [im]).  For the footprint-conscious, complex number support can 
  5526. be disabled by defining the symbol WITHOUT_COMPLEX.
  5527.  
  5528. - New built-in function list() is the long-awaited counterpart of tuple().
  5529.  
  5530. - There's a new "cmath" module which provides the same functions as the 
  5531. "math" library but with complex arguments and results.  (There are very 
  5532. good reasons why math.sqrt(-1) still raises an exception -- you have to use 
  5533. cmath.sqrt(-1) to get 1j for an answer.)
  5534.  
  5535. - The Python.h header file (which is really the same as allobjects.h except 
  5536. it disables support for old style names) now includes several more files, 
  5537. so you have to have fewer #include statements in the average extension.
  5538.  
  5539. - The NDEBUG symbol is no longer used.  Code that used to be dependent on 
  5540. the presence of NDEBUG is now present on the absence of DEBUG.  TRACE_REFS 
  5541. and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG, 
  5542. respectively.  At long last, the source actually compiles and links without 
  5543. errors when this symbol is defined.
  5544.  
  5545. - Several symbols that didn't follow the new naming scheme have been 
  5546. renamed (usually by adding to rename2.h) to use a Py or _Py prefix.  There 
  5547. are no external symbols left without a Py or _Py prefix, not even those 
  5548. defined by sources that were incorporated from elsewhere (regexpr.c, 
  5549. md5c.c).  (Macros are a different story...)
  5550.  
  5551. - There are now typedefs for the structures defined in config.c and 
  5552. frozen.c.
  5553.  
  5554. - New PYTHON_API_VERSION value and .pyc file magic number.
  5555.  
  5556. - New module Bastion.  (XXX)
  5557.  
  5558. - Improved performance of StringIO module.
  5559.  
  5560. - UserList module now supports + and * operators.
  5561.  
  5562. - The binhex and binascii modules now actually work.
  5563.  
  5564. - The cgi module has been almost totally rewritten and documented.
  5565. It now supports file upload and a new data type to handle forms more 
  5566. flexibly.
  5567.  
  5568. - The formatter module (for use with htmllib) has been overhauled (again).
  5569.  
  5570. - The ftplib module now supports passive mode and has doc strings.
  5571.  
  5572. - In (ideally) all places where binary files are read or written, the file 
  5573. is now correctly opened in binary mode ('rb' or 'wb') so the code will work 
  5574. on Mac or PC.
  5575.  
  5576. - Dummy versions of os.path.expandvars() and expanduser() are now provided 
  5577. on non-Unix platforms.
  5578.  
  5579. - Module urllib now has two new functions url2pathname and pathname2url 
  5580. which turn local filenames into "file:..." URLs using the same rules as 
  5581. Netscape (why be different).  it also supports urlretrieve() with a 
  5582. pathname parameter, and honors the proxy environment variables (http_proxy 
  5583. etc.).  The URL parsing has been improved somewhat, too.
  5584.  
  5585. - Micro improvements to urlparse.  Added urlparse.urldefrag() which 
  5586. removes a trailing ``#fragment'' if any.
  5587.  
  5588. - The mailbox module now supports MH style message delimiters as well.
  5589.  
  5590. - The mhlib module contains some new functionality: setcontext() to set the 
  5591. current folder and parsesequence() to parse a sequence as commonly passed 
  5592. to MH commands (e.g. 1-10 or last:5).
  5593.  
  5594. - New module mimify for conversion to and from MIME format of email 
  5595. messages.
  5596.  
  5597. - Module ni now automatically installs itself when first imported -- this 
  5598. is against the normal rule that modules should define classes and functions 
  5599. but not invoke them, but appears more useful in the case that two 
  5600. different, independent modules want to use ni's features.
  5601.  
  5602. - Some small performance enhancements in module pickle.
  5603.  
  5604. - Small interface change to the profile.run*() family of functions -- more 
  5605. sensible handling of return values.
  5606.  
  5607. - The officially registered Mac creator for Python files is 'Pyth'.  This 
  5608. replaces 'PYTH' which was used before but never registered.
  5609.  
  5610. - Added regsub.capwords().  (XXX)
  5611.  
  5612. - Added string.capwords(), string.capitalize() and string.translate().  
  5613. (XXX)
  5614.  
  5615. - Fixed an interface bug in the rexec module: it was impossible to pass a 
  5616. hooks instance to the RExec class.  rexec now also supports the dynamic 
  5617. loading of modules from shared libraries.  Some other interfaces have been 
  5618. added too.
  5619.  
  5620. - Module rfc822 now caches the headers in a dictionary for more efficient 
  5621. lookup.
  5622.  
  5623. - The sgmllib module now understands a limited number of SGML "shorthands" 
  5624. like <A/.../ for <A>...</A>.  (It's not clear that this was a good idea...)
  5625.  
  5626. - The tempfile module actually tries a number of different places to find a 
  5627. usable temporary directory.  (This was prompted by certain Linux 
  5628. installations that appear to be missing a /usr/tmp directory.) [A bug in 
  5629. the implementation that would ignore a pre-existing tmpdir global has been 
  5630. fixed in beta3.]
  5631.  
  5632. - Much improved and enhanved FileDialog module for Tkinter.
  5633.  
  5634. - Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as 
  5635. well as Tk 4.1).
  5636.  
  5637. - New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and 
  5638. s.dup().  Sockets now work correctly on Windows.  On Windows, the built-in 
  5639. extension is called _socket and a wrapper module win/socket.py provides 
  5640. "makefile()" and "dup()" functionality.  On Windows, the select module 
  5641. works only with socket objects.
  5642.  
  5643. - Bugs in bsddb module fixed (e.g. missing default argument values).
  5644.  
  5645. - The curses extension now includes <ncurses.h> when available.
  5646.  
  5647. - The gdbm module now supports opening databases in "fast" mode by 
  5648. specifying 'f' as the second character or the mode string.
  5649.  
  5650. - new variables sys.prefix and sys.exec_prefix pass corresponding 
  5651. configuration options / Makefile variables to the Python programmer.
  5652.  
  5653. - The ``new'' module now supports creating new user-defined classes as well 
  5654. as instances thereof.
  5655.  
  5656. - The soundex module now sports get_soundex() to get the soundex value for an 
  5657. arbitrary string (formerly it would only do soundex-based string 
  5658. comparison) as well as doc strings.
  5659.  
  5660. - New object type "cobject" to safely wrap void pointers for passing them 
  5661. between various extension modules.
  5662.  
  5663. - More efficient computation of float**smallint.
  5664.  
  5665. - The mysterious bug whereby "x.x" (two occurrences of the same 
  5666. one-character name) typed from the commandline would sometimes fail 
  5667. mysteriously.
  5668.  
  5669. - The initialization of the readline function can now be invoked by a C 
  5670. extension through PyOS_ReadlineInit().
  5671.  
  5672. - There's now an externally visible pointer PyImport_FrozenModules which 
  5673. can be changed by an embedding application.
  5674.  
  5675. - The argument parsing functions now support a new format character 'D' to 
  5676. specify complex numbers.
  5677.  
  5678. - Various memory leaks plugged and bugs fixed.
  5679.  
  5680. - Improved support for posix threads (now that real implementations are 
  5681. beginning to apepar).  Still no fully functioning semaphores.
  5682.  
  5683. - Some various and sundry improvements and new entries in the Tools 
  5684. directory.
  5685.  
  5686.  
  5687. =====================================
  5688. ==> Release 1.3 (13 October 1995) <==
  5689. =====================================
  5690.  
  5691. Major change
  5692. ============
  5693.  
  5694. Two words: Keyword Arguments.  See the first section of Chapter 12 of
  5695. the Tutorial.
  5696.  
  5697. (The rest of this file is textually the same as the remaining sections
  5698. of that chapter.)
  5699.  
  5700.  
  5701. Changes to the WWW and Internet tools
  5702. =====================================
  5703.  
  5704. The "htmllib" module has been rewritten in an incompatible fashion.
  5705. The new version is considerably more complete (HTML 2.0 except forms,
  5706. but including all ISO-8859-1 entity definitions), and easy to use.
  5707. Small changes to "sgmllib" have also been made, to better match the
  5708. tokenization of HTML as recognized by other web tools.
  5709.  
  5710. A new module "formatter" has been added, for use with the new
  5711. "htmllib" module.
  5712.  
  5713. The "urllib"and "httplib" modules have been changed somewhat to allow
  5714. overriding unknown URL types and to support authentication.  They now
  5715. use "mimetools.Message" instead of "rfc822.Message" to parse headers.
  5716. The "endrequest()" method has been removed from the HTTP class since
  5717. it breaks the interaction with some servers.
  5718.  
  5719. The "rfc822.Message" class has been changed to allow a flag to be
  5720. passed in that says that the file is unseekable.
  5721.  
  5722. The "ftplib" module has been fixed to be (hopefully) more robust on
  5723. Linux.
  5724.  
  5725. Several new operations that are optionally supported by servers have
  5726. been added to "nntplib": "xover", "xgtitle", "xpath" and "date".
  5727.  
  5728. Other Language Changes
  5729. ======================
  5730.  
  5731. The "raise" statement now takes an optional argument which specifies
  5732. the traceback to be used when printing the exception's stack trace.
  5733. This must be a traceback object, such as found in "sys.exc_traceback".
  5734. When omitted or given as "None", the old behavior (to generate a stack
  5735. trace entry for the current stack frame) is used.
  5736.  
  5737. The tokenizer is now more tolerant of alien whitespace.  Control-L in
  5738. the leading whitespace of a line resets the column number to zero,
  5739. while Control-R just before the end of the line is ignored.
  5740.  
  5741. Changes to Built-in Operations
  5742. ==============================
  5743.  
  5744. For file objects, "f.read(0)" and "f.readline(0)" now return an empty
  5745. string rather than reading an unlimited number of bytes.  For the
  5746. latter, omit the argument altogether or pass a negative value.
  5747.  
  5748. A new system variable, "sys.platform", has been added.  It specifies
  5749. the current platform, e.g. "sunos5" or "linux1".
  5750.  
  5751. The built-in functions "input()" and "raw_input()" now use the GNU
  5752. readline library when it has been configured (formerly, only
  5753. interactive input to the interpreter itself was read using GNU
  5754. readline).  The GNU readline library provides elaborate line editing
  5755. and history.  The Python debugger ("pdb") is the first beneficiary of
  5756. this change.
  5757.  
  5758. Two new built-in functions, "globals()" and "locals()", provide access
  5759. to dictionaries containming current global and local variables,
  5760. respectively.  (These augment rather than replace "vars()", which
  5761. returns the current local variables when called without an argument,
  5762. and a module's global variables when called with an argument of type
  5763. module.)
  5764.  
  5765. The built-in function "compile()" now takes a third possible value for
  5766. the kind of code to be compiled: specifying "'single'" generates code
  5767. for a single interactive statement, which prints the output of
  5768. expression statements that evaluate to something else than "None".
  5769.  
  5770. Library Changes
  5771. ===============
  5772.  
  5773. There are new module "ni" and "ihooks" that support importing modules
  5774. with hierarchical names such as "A.B.C".  This is enabled by writing
  5775. "import ni; ni.ni()" at the very top of the main program.  These
  5776. modules are amply documented in the Python source.
  5777.  
  5778. The module "rexec" has been rewritten (incompatibly) to define a class
  5779. and to use "ihooks".
  5780.  
  5781. The "string.split()" and "string.splitfields()" functions are now the
  5782. same function (the presence or absence of the second argument
  5783. determines which operation is invoked); similar for "string.join()"
  5784. and "string.joinfields()".
  5785.  
  5786. The "Tkinter" module and its helper "Dialog" have been revamped to use
  5787. keyword arguments.  Tk 4.0 is now the standard.  A new module
  5788. "FileDialog" has been added which implements standard file selection
  5789. dialogs.
  5790.  
  5791. The optional built-in modules "dbm" and "gdbm" are more coordinated
  5792. --- their "open()" functions now take the same values for their "flag"
  5793. argument, and the "flag" and "mode" argument have default values (to
  5794. open the database for reading only, and to create the database with
  5795. mode "0666" minuse the umask, respectively).  The memory leaks have
  5796. finally been fixed.
  5797.  
  5798. A new dbm-like module, "bsddb", has been added, which uses the BSD DB
  5799. package's hash method.
  5800.  
  5801. A portable (though slow) dbm-clone, implemented in Python, has been
  5802. added for systems where none of the above is provided.  It is aptly
  5803. dubbed "dumbdbm".
  5804.  
  5805. The module "anydbm" provides a unified interface to "bsddb", "gdbm",
  5806. "dbm", and "dumbdbm", choosing the first one available.
  5807.  
  5808. A new extension module, "binascii", provides a variety of operations
  5809. for conversion of text-encoded binary data.
  5810.  
  5811. There are three new or rewritten companion modules implemented in
  5812. Python that can encode and decode the most common such formats: "uu"
  5813. (uuencode), "base64" and "binhex".
  5814.  
  5815. A module to handle the MIME encoding quoted-printable has also been
  5816. added: "quopri".
  5817.  
  5818. The parser module (which provides an interface to the Python parser's
  5819. abstract syntax trees) has been rewritten (incompatibly) by Fred
  5820. Drake.  It now lets you change the parse tree and compile the result!
  5821.  
  5822. The \code{syslog} module has been upgraded and documented.
  5823.  
  5824. Other Changes
  5825. =============
  5826.  
  5827. The dynamic module loader recognizes the fact that different filenames
  5828. point to the same shared library and loads the library only once, so
  5829. you can have a single shared library that defines multiple modules.
  5830. (SunOS / SVR4 style shared libraries only.)
  5831.  
  5832. Jim Fulton's ``abstract object interface'' has been incorporated into
  5833. the run-time API.  For more detailes, read the files
  5834. "Include/abstract.h" and "Objects/abstract.c".
  5835.  
  5836. The Macintosh version is much more robust now.
  5837.  
  5838. Numerous things I have forgotten or that are so obscure no-one will
  5839. notice them anyway :-)
  5840.  
  5841.  
  5842. ===================================
  5843. ==> Release 1.2 (13 April 1995) <==
  5844. ===================================
  5845.  
  5846. - Changes to Misc/python-mode.el:
  5847.   - Wrapping and indentation within triple quote strings should work
  5848.     properly now.
  5849.   - `Standard' bug reporting mechanism (use C-c C-b)
  5850.   - py-mark-block was moved to C-c C-m
  5851.   - C-c C-v shows you the python-mode version
  5852.   - a basic python-font-lock-keywords has been added for Emacs 19
  5853.     font-lock colorizations.
  5854.   - proper interaction with pending-del and del-sel modes.
  5855.   - New py-electric-colon (:) command for improved outdenting.  Also
  5856.     py-indent-line (TAB) should handle outdented lines better.
  5857.   - New commands py-outdent-left (C-c C-l) and py-indent-right (C-c C-r)
  5858.  
  5859. - The Library Reference has been restructured, and many new and
  5860. existing modules are now documented, in particular the debugger and
  5861. the profiler, as well as the persistency and the WWW/Internet support
  5862. modules.
  5863.  
  5864. - All known bugs have been fixed.  For example the pow(2,2,3L) bug on
  5865. Linux has been fixed.  Also the re-entrancy problems with __del__ have
  5866. been fixed.
  5867.  
  5868. - All known memory leaks have been fixed.
  5869.  
  5870. - Phase 2 of the Great Renaming has been executed.  The header files
  5871. now use the new names (PyObject instead of object, etc.).  The linker
  5872. also sees the new names.  Most source files still use the old names,
  5873. by virtue of the rename2.h header file.  If you include Python.h, you
  5874. only see the new names.  Dynamically linked modules have to be
  5875. recompiled.  (Phase 3, fixing the rest of the sources, will be
  5876. executed gradually with the release later versions.)
  5877.  
  5878. - The hooks for implementing "safe-python" (better called "restricted
  5879. execution") are in place.  Specifically, the import statement is
  5880. implemented by calling the built-in function __import__, and the
  5881. built-in names used in a particular scope are taken from the
  5882. dictionary __builtins__ in that scope's global dictionary.  See also
  5883. the new (unsupported, undocumented) module rexec.py.
  5884.  
  5885. - The import statement now supports the syntax "import a.b.c" and
  5886. "from a.b.c import name".  No officially supported implementation
  5887. exists, but one can be prototyped by replacing the built-in __import__
  5888. function.  A proposal by Ken Manheimer is provided as newimp.py.
  5889.  
  5890. - All machinery used by the import statement (or the built-in
  5891. __import__ function) is now exposed through the new built-in module
  5892. "imp" (see the library reference manual).  All dynamic loading
  5893. machinery is moved to the new file importdl.c.
  5894.  
  5895. - Persistent storage is supported through the use of the modules
  5896. "pickle" and "shelve" (implemented in Python).  There's also a "copy"
  5897. module implementing deepcopy and normal (shallow) copy operations.
  5898. See the library reference manual.
  5899.  
  5900. - Documentation strings for many objects types are accessible through
  5901. the __doc__ attribute.  Modules, classes and functions support special
  5902. syntax to initialize the __doc__ attribute: if the first statement
  5903. consists of just a string literal, that string literal becomes the
  5904. value of the __doc__ attribute.  The default __doc__ attribute is
  5905. None.  Documentation strings are also supported for built-in
  5906. functions, types and modules; however this feature hasn't been widely
  5907. used yet.  See the 'new' module for an example.  (Basically, the type
  5908. object's tp_doc field contains the doc string for the type, and the
  5909. 4th member of the methodlist structure contains the doc string for the
  5910. method.)
  5911.  
  5912. - The __coerce__ and __cmp__ methods for user-defined classes once
  5913. again work as expected.  As an example, there's a new standard class
  5914. Complex in the library.
  5915.  
  5916. - The functions posix.popen() and posix.fdopen() now have an optional
  5917. third argument to specify the buffer size, and default their second
  5918. (mode) argument to 'r' -- in analogy to the builtin open() function.
  5919. The same applies to posixfile.open() and the socket method makefile().
  5920.  
  5921. - The thread.exit_thread() function now raises SystemExit so that
  5922. 'finally' clauses are honored and a memory leak is plugged.
  5923.  
  5924. - Improved X11 and Motif support, by Sjoerd Mullender.  This extension
  5925. is being maintained and distributed separately.
  5926.  
  5927. - Improved support for the Apple Macintosh, in part by Jack Jansen,
  5928. e.g. interfaces to (a few) resource mananger functions, get/set file
  5929. type and creator, gestalt, sound manager, speech manager, MacTCP, comm
  5930. toolbox, and the think C console library.  This is being maintained
  5931. and distributed separately.
  5932.  
  5933. - Improved version for Windows NT, by Mark Hammond.  This is being
  5934. maintained and distributed separately.
  5935.  
  5936. - Used autoconf 2.0 to generate the configure script.  Adapted
  5937. configure.in to use the new features in autoconf 2.0.
  5938.  
  5939. - It now builds on the NeXT without intervention, even on the 3.3
  5940. Sparc pre-release.
  5941.  
  5942. - Characters passed to isspace() and friends are masked to nonnegative
  5943. values.
  5944.  
  5945. - Correctly compute pow(-3.0, 3).
  5946.  
  5947. - Fix portability problems with getopt (configure now checks for a
  5948. non-GNU getopt).
  5949.  
  5950. - Don't add frozenmain.o to libPython.a.
  5951.  
  5952. - Exceptions can now be classes.  ALl built-in exceptions are still
  5953. string objects, but this will change in the future.
  5954.  
  5955. - The socket module exports a long list of socket related symbols.
  5956. (More built-in modules will export their symbolic constants instead of
  5957. relying on a separately generated Python module.)
  5958.  
  5959. - When a module object is deleted, it clears out its own dictionary.
  5960. This fixes a circularity in the references between functions and
  5961. their global dictionary.
  5962.  
  5963. - Changed the error handling by [new]getargs() e.g. for "O&".
  5964.  
  5965. - Dynamic loading of modules using shared libraries is supported for
  5966. several new platforms.
  5967.  
  5968. - Support "O&", "[...]" and "{...}" in mkvalue().
  5969.  
  5970. - Extension to findmethod(): findmethodinchain() (where a chain is a
  5971. linked list of methodlist arrays).  The calling interface for
  5972. findmethod() has changed: it now gets a pointer to the (static!)
  5973. methodlist structure rather than just to the function name -- this
  5974. saves copying flags etc. into the (short-lived) method object.
  5975.  
  5976. - The callable() function is now public.
  5977.  
  5978. - Object types can define a few new operations by setting function
  5979. pointers in the type object structure: tp_call defines how an object
  5980. is called, and tp_str defines how an object's str() is computed.
  5981.  
  5982.  
  5983. ===================================
  5984. ==> Release 1.1.1 (10 Nov 1994) <==
  5985. ===================================
  5986.  
  5987. This is a pure bugfix release again.  See the ChangeLog file for details.
  5988.  
  5989. One exception: a few new features were added to tkinter.
  5990.  
  5991.  
  5992. =================================
  5993. ==> Release 1.1 (11 Oct 1994) <==
  5994. =================================
  5995.  
  5996. This release adds several new features, improved configuration and
  5997. portability, and fixes more bugs than I can list here (including some
  5998. memory leaks).
  5999.  
  6000. The source compiles and runs out of the box on more platforms than
  6001. ever -- including Windows NT.  Makefiles or projects for a variety of
  6002. non-UNIX platforms are provided.
  6003.  
  6004. APOLOGY: some new features are badly documented or not at all.  I had
  6005. the choice -- postpone the new release indefinitely, or release it
  6006. now, with working code but some undocumented areas.  The problem with
  6007. postponing the release is that people continue to suffer from existing
  6008. bugs, and send me patches based on the previous release -- which I
  6009. can't apply directly because my own source has changed.  Also, some
  6010. new modules (like signal) have been ready for release for quite some
  6011. time, and people are anxiously waiting for them.  In the case of
  6012. signal, the interface is simple enough to figure out without
  6013. documentation (if you're anxious enough :-).  In this case it was not
  6014. simple to release the module on its own, since it relies on many small
  6015. patches elsewhere in the source.
  6016.  
  6017. For most new Python modules, the source code contains comments that
  6018. explain how to use them.  Documentation for the Tk interface, written
  6019. by Matt Conway, is available as tkinter-doc.tar.gz from the Python
  6020. home and mirror ftp sites (see Misc/FAQ for ftp addresses).  For the
  6021. new operator overloading facilities, have a look at Demo/classes:
  6022. Complex.py and Rat.py show how to implement a numeric type without and
  6023. with __coerce__ method.  Also have a look at the end of the Tutorial
  6024. document (Doc/tut.tex).  If you're still confused: use the newsgroup
  6025. or mailing list.
  6026.  
  6027.  
  6028. New language features:
  6029.  
  6030.     - More flexible operator overloading for user-defined classes
  6031.     (INCOMPATIBLE WITH PREVIOUS VERSIONS!)  See end of tutorial.
  6032.  
  6033.     - Classes can define methods named __getattr__, __setattr__ and
  6034.     __delattr__ to trap attribute accesses.  See end of tutorial.
  6035.  
  6036.     - Classes can define method __call__ so instances can be called
  6037.     directly.  See end of tutorial.
  6038.  
  6039.  
  6040. New support facilities:
  6041.  
  6042.     - The Makefiles (for the base interpreter as well as for extensions)
  6043.     now support creating dynamically loadable modules if the platform
  6044.     supports shared libraries.
  6045.  
  6046.     - Passing the interpreter a .pyc file as script argument will execute
  6047.     the code in that file.  (On the Mac such files can be double-clicked!)
  6048.  
  6049.     - New Freeze script, to create independently distributable "binaries"
  6050.     of Python programs -- look in Demo/freeze
  6051.  
  6052.     - Improved h2py script (in Demo/scripts) follows #includes and
  6053.     supports macros with one argument
  6054.  
  6055.     - New module compileall generates .pyc files for all modules in a
  6056.     directory (tree) without also executing them
  6057.  
  6058.     - Threads should work on more platforms
  6059.  
  6060.  
  6061. New built-in modules:
  6062.  
  6063.     - tkinter (support for Tcl's Tk widget set) is now part of the base
  6064.     distribution
  6065.  
  6066.     - signal allows catching or ignoring UNIX signals (unfortunately still
  6067.     undocumented -- any taker?)
  6068.  
  6069.     - termios provides portable access to POSIX tty settings
  6070.  
  6071.     - curses provides an interface to the System V curses library
  6072.  
  6073.     - syslog provides an interface to the (BSD?) syslog daemon
  6074.  
  6075.     - 'new' provides interfaces to create new built-in object types
  6076.     (e.g. modules and functions)
  6077.  
  6078.     - sybase provides an interface to SYBASE database
  6079.  
  6080.  
  6081. New/obsolete built-in methods:
  6082.  
  6083.     - callable(x) tests whether x can be called
  6084.  
  6085.     - sockets now have a setblocking() method
  6086.  
  6087.     - sockets no longer have an allowbroadcast() method
  6088.  
  6089.     - socket methods send() and sendto() return byte count
  6090.  
  6091.  
  6092. New standard library modules:
  6093.  
  6094.     - types.py defines standard names for built-in types, e.g. StringType
  6095.  
  6096.     - urlparse.py parses URLs according to the latest Internet draft
  6097.  
  6098.     - uu.py does uuencode/uudecode (not the fastest in the world, but
  6099.     quicker than installing uuencode on a non-UNIX machine :-)
  6100.  
  6101.     - New, faster and more powerful profile module.py
  6102.  
  6103.     - mhlib.py provides interface to MH folders and messages
  6104.  
  6105.  
  6106. New facilities for extension writers (unfortunately still
  6107. undocumented):
  6108.  
  6109.     - newgetargs() supports optional arguments and improved error messages
  6110.  
  6111.     - O!, O& O? formats for getargs allow more versatile type checking of
  6112.     non-standard types
  6113.  
  6114.     - can register pending asynchronous callback, to be called the next
  6115.     time the Python VM begins a new instruction (Py_AddPendingCall)
  6116.  
  6117.     - can register cleanup routines to be called when Python exits
  6118.     (Py_AtExit)
  6119.  
  6120.     - makesetup script understands C++ files in Setup file (use file.C
  6121.     or file.cc)
  6122.  
  6123.     - Make variable OPT is passed on to sub-Makefiles
  6124.  
  6125.     - An init<module>() routine may signal an error by not entering
  6126.     the module in the module table and raising an exception instead
  6127.  
  6128.     - For long module names, instead of foobarbletchmodule.c you can
  6129.     use foobarbletch.c
  6130.  
  6131.     - getintvalue() and getfloatvalue() try to convert any object
  6132.     instead of requiring an "intobject" or "floatobject"
  6133.  
  6134.     - All the [new]getargs() formats that retrieve an integer value
  6135.     will now also work if a float is passed
  6136.  
  6137.     - C function listtuple() converts list to tuple, fast
  6138.  
  6139.     - You should now call sigcheck() instead of intrcheck();
  6140.     sigcheck() also sets an exception when it returns nonzero
  6141.  
  6142.  
  6143. ====================================
  6144. ==> Release 1.0.3 (14 July 1994) <==
  6145. ====================================
  6146.  
  6147. This release consists entirely of bug fixes to the C sources; see the
  6148. head of ../ChangeLog for a complete list.  Most important bugs fixed:
  6149.  
  6150. - Sometimes the format operator (string%expr) would drop the last
  6151. character of the format string
  6152.  
  6153. - Tokenizer looped when last line did not end in \n
  6154.  
  6155. - Bug when triple-quoted string ended in quote plus newline
  6156.  
  6157. - Typo in socketmodule (listen) (== instead of =)
  6158.  
  6159. - typing vars() at the >>> prompt would cause recursive output
  6160.  
  6161.  
  6162. ==================================
  6163. ==> Release 1.0.2 (4 May 1994) <==
  6164. ==================================
  6165.  
  6166. Overview of the most visible changes.  Bug fixes are not listed.  See
  6167. also ChangeLog.
  6168.  
  6169. Tokens
  6170. ------
  6171.  
  6172. * String literals follow Standard C rules: they may be continued on
  6173. the next line using a backslash; adjacent literals are concatenated
  6174. at compile time.
  6175.  
  6176. * A new kind of string literals, surrounded by triple quotes (""" or
  6177. '''), can be continued on the next line without a backslash.
  6178.  
  6179. Syntax
  6180. ------
  6181.  
  6182. * Function arguments may have a default value, e.g. def f(a, b=1);
  6183. defaults are evaluated at function definition time.  This also applies
  6184. to lambda.
  6185.  
  6186. * The try-except statement has an optional else clause, which is
  6187. executed when no exception occurs in the try clause.
  6188.  
  6189. Interpreter
  6190. -----------
  6191.  
  6192. * The result of a statement-level expression is no longer printed,
  6193. except_ for expressions entered interactively.  Consequently, the -k
  6194. command line option is gone.
  6195.  
  6196. * The result of the last printed interactive expression is assigned to
  6197. the variable '_'.
  6198.  
  6199. * Access to implicit global variables has been speeded up by removing
  6200. an always-failing dictionary lookup in the dictionary of local
  6201. variables (mod suggested by Steve Makewski and Tim Peters).
  6202.  
  6203. * There is a new command line option, -u, to force stdout and stderr
  6204. to be unbuffered.
  6205.  
  6206. * Incorporated Steve Majewski's mods to import.c for dynamic loading
  6207. under AIX.
  6208.  
  6209. * Fewer chances of dumping core when trying to reload or re-import
  6210. static built-in, dynamically loaded built-in, or frozen modules.
  6211.  
  6212. * Loops over sequences now don't ask for the sequence's length when
  6213. they start, but try to access items 0, 1, 2, and so on until they hit
  6214. an IndexError.  This makes it possible to create classes that generate
  6215. infinite or indefinite sequences a la Steve Majewski.  This affects
  6216. for loops, the (not) in operator, and the built-in functions filter(),
  6217. map(), max(), min(), reduce().
  6218.  
  6219. Changed Built-in operations
  6220. ---------------------------
  6221.  
  6222. * The '%' operator on strings (printf-style formatting) supports a new
  6223. feature (adapted from a patch by Donald Beaudry) to allow
  6224. '%(<key>)<format>' % {...} to take values from a dictionary by name
  6225. instead of from a tuple by position (see also the new function
  6226. vars()).
  6227.  
  6228. * The '%s' formatting operator is changed to accept any type and
  6229. convert it to a string using str().
  6230.  
  6231. * Dictionaries with more than 20,000 entries can now be created
  6232. (thanks to Steve Kirsch).
  6233.  
  6234. New Built-in Functions
  6235. ----------------------
  6236.  
  6237. * vars() returns a dictionary containing the local variables; vars(m)
  6238. returns a dictionary containing the variables of module m.  Note:
  6239. dir(x) is now equivalent to vars(x).keys().
  6240.  
  6241. Changed Built-in Functions
  6242. --------------------------
  6243.  
  6244. * open() has an optional third argument to specify the buffer size: 0
  6245. for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0
  6246. for default.
  6247.  
  6248. * open()'s second argument is now optional; it defaults to "r".
  6249.  
  6250. * apply() now checks that its second argument is indeed a tuple.
  6251.  
  6252. New Built-in Modules
  6253. --------------------
  6254.  
  6255. Changed Built-in Modules
  6256. ------------------------
  6257.  
  6258. The thread module no longer supports exit_prog().
  6259.  
  6260. New Python Modules
  6261. ------------------
  6262.  
  6263. * Module addpack contains a standard interface to modify sys.path to
  6264. find optional packages (groups of related modules).
  6265.  
  6266. * Module urllib contains a number of functions to access
  6267. World-Wide-Web files specified by their URL.
  6268.  
  6269. * Module httplib implements the client side of the HTTP protocol used
  6270. by World-Wide-Web servers.
  6271.  
  6272. * Module gopherlib implements the client side of the Gopher protocol.
  6273.  
  6274. * Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF
  6275. style mailbox files.
  6276.  
  6277. * Module random contains various random distributions, e.g. gauss().
  6278.  
  6279. * Module lockfile locks and unlocks open files using fcntl (inspired
  6280. by a similar module by Andy Bensky).
  6281.  
  6282. * Module ntpath (by Jaap Vermeulen) implements path operations for
  6283. Windows/NT.
  6284.  
  6285. * Module test_thread (in Lib/test) contains a small test set for the
  6286. thread module.
  6287.  
  6288. Changed Python Modules
  6289. ----------------------
  6290.  
  6291. * The string module's expandvars() function is now documented and is
  6292. implemented in Python (using regular expressions) instead of forking
  6293. off a shell process.
  6294.  
  6295. * Module rfc822 now supports accessing the header fields using the
  6296. mapping/dictionary interface, e.g. h['subject'].
  6297.  
  6298. * Module pdb now makes it possible to set a break on a function
  6299. (syntax: break <expression>, where <expression> yields a function
  6300. object).
  6301.  
  6302. Changed Demos
  6303. -------------
  6304.  
  6305. * The Demo/scripts/freeze.py script is working again (thanks to Jaap
  6306. Vermeulen).
  6307.  
  6308. New Demos
  6309. ---------
  6310.  
  6311. * Demo/threads/Generator.py is a proposed interface for restartable
  6312. functions a la Tim Peters.
  6313.  
  6314. * Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a
  6315. directory full of HTML pages which between them contain links to all
  6316. the newsgroups available on your server.
  6317.  
  6318. * Demo/dns contains a DNS (Domain Name Server) client.
  6319.  
  6320. * Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a
  6321. nice enhanced Python shell!!!).
  6322.  
  6323. * Demo/turing contains a Turing machine by Amrit Prem.
  6324.  
  6325. Documentation
  6326. -------------
  6327.  
  6328. * Documented new language features mentioned above (but not all new
  6329. modules).
  6330.  
  6331. * Added a chapter to the Tutorial describing recent additions to
  6332. Python.
  6333.  
  6334. * Clarified some sentences in the reference manual,
  6335. e.g. break/continue, local/global scope, slice assignment.
  6336.  
  6337. Source Structure
  6338. ----------------
  6339.  
  6340. * Moved Include/tokenizer.h to Parser/tokenizer.h.
  6341.  
  6342. * Added Python/getopt.c for systems that don't have it.
  6343.  
  6344. Emacs mode
  6345. ----------
  6346.  
  6347. * Indentation of continuated lines is done more intelligently;
  6348. consequently the variable py-continuation-offset is gone.
  6349.  
  6350.  
  6351. ========================================
  6352. ==> Release 1.0.1 (15 February 1994) <==
  6353. ========================================
  6354.  
  6355. * Many portability fixes should make it painless to build Python on
  6356. several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
  6357.  
  6358. * Fixed test for <stdarg.h> -- this broke on some platforms.
  6359.  
  6360. * Fixed test for shared library dynalic loading -- this broke on SunOS
  6361. 4.x using the GNU loader.
  6362.  
  6363. * Changed order and number of SVR4 networking libraries (it is now
  6364. -lsocket -linet -lnsl, if these libraries exist).
  6365.  
  6366. * Installing the build intermediate stages with "make libainstall" now
  6367. also installs config.c.in, Setup and makesetup, which are used by the
  6368. new Extensions mechanism.
  6369.  
  6370. * Improved README file contains more hints and new troubleshooting
  6371. section.
  6372.  
  6373. * The built-in module strop now defines fast versions of three more
  6374. functions of the standard string module: atoi(), atol() and atof().
  6375. The strop versions of atoi() and atol() support an optional second
  6376. argument to specify the base (default 10).  NOTE: you don't have to
  6377. explicitly import strop to use the faster versions -- the string
  6378. module contains code to let versions from stop override the default
  6379. versions.
  6380.  
  6381. * There is now a working Lib/dospath.py for those who use Python under
  6382. DOS (or Windows).  Thanks, Jaap!
  6383.  
  6384. * There is now a working Modules/dosmodule.c for DOS (or Windows)
  6385. system calls.
  6386.  
  6387. * Lib.os.py has been reorganized (making it ready for more operating
  6388. systems).
  6389.  
  6390. * Lib/ospath.py is now obsolete (use os.path instead).
  6391.  
  6392. * Many fixes to the tutorial to make it match Python 1.0.  Thanks,
  6393. Tim!
  6394.  
  6395. * Fixed Doc/Makefile, Doc/README and various scripts there.
  6396.  
  6397. * Added missing description of fdopen to Doc/libposix.tex.
  6398.  
  6399. * Made cleanup() global, for the benefit of embedded applications.
  6400.  
  6401. * Added parsing of addresses and dates to Lib/rfc822.py.
  6402.  
  6403. * Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
  6404. them usable at all.
  6405.  
  6406. * New module Lib/wave.py reads RIFF (*.wav) audio files.
  6407.  
  6408. * Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
  6409. belongs.
  6410.  
  6411. * New options and comments for Modules/makesetup (used by new
  6412. Extension mechanism).
  6413.  
  6414. * Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
  6415. and elsewhere.
  6416.  
  6417. * Fixed coredump in filter(None, 'abcdefg').
  6418.  
  6419.  
  6420. =======================================
  6421. ==> Release 1.0.0 (26 January 1994) <==
  6422. =======================================
  6423.  
  6424. As is traditional, so many things have changed that I can't pretend to
  6425. be complete in these release notes, but I'll try anyway :-)
  6426.  
  6427. Note that the very last section is labeled "remaining bugs".
  6428.  
  6429.  
  6430. Source organization and build process
  6431. -------------------------------------
  6432.  
  6433. * The sources have finally been split: instead of a single src
  6434. subdirectory there are now separate directories Include, Parser,
  6435. Grammar, Objects, Python and Modules.  Other directories also start
  6436. with a capital letter: Misc, Doc, Lib, Demo.
  6437.  
  6438. * A few extensions (notably Amoeba and X support) have been moved to a
  6439. separate subtree Extensions, which is no longer in the core
  6440. distribution, but separately ftp'able as extensions.tar.Z.  (The
  6441. distribution contains a placeholder Ext-dummy with a description of
  6442. the Extensions subtree as well as the most recent versions of the
  6443. scripts used there.)
  6444.  
  6445. * A few large specialized demos (SGI video and www) have been
  6446. moved to a separate subdirectory Demo2, which is no longer in the core
  6447. distribution, but separately ftp'able as demo2.tar.Z.
  6448.  
  6449. * Parts of the standard library have been moved to subdirectories:
  6450. there are now standard subdirectories stdwin, test, sgi and sun4.
  6451.  
  6452. * The configuration process has radically changed: I now use GNU
  6453. autoconf.  This makes it much easier to build on new Unix flavors, as
  6454. well as fully supporting VPATH (if your Make has it).  The scripts
  6455. Configure.py and Addmodule.sh are no longer needed.  Many source files
  6456. have been adapted in order to work with the symbols that the configure
  6457. script generated by autoconf defines (or not); the resulting source is
  6458. much more portable to different C compilers and operating systems,
  6459. even non Unix systems (a Mac port was done in an afternoon).  See the
  6460. toplevel README file for a description of the new build process.
  6461.  
  6462. * GNU readline (a slightly newer version) is now a subdirectory of the
  6463. Python toplevel.  It is still not automatically configured (being
  6464. totally autoconf-unaware :-).  One problem has been solved: typing
  6465. Control-C to a readline prompt will now work.  The distribution no
  6466. longer contains a "super-level" directory (above the python toplevel
  6467. directory), and dl, dl-dld and GNU dld are no longer part of the
  6468. Python distribution (you can still ftp them from
  6469. ftp.cwi.nl:/pub/dynload).
  6470.  
  6471. * The DOS functions have been taken out of posixmodule.c and moved
  6472. into a separate file dosmodule.c.
  6473.  
  6474. * There's now a separate file version.c which contains nothing but
  6475. the version number.
  6476.  
  6477. * The actual main program is now contained in config.c (unless NO_MAIN
  6478. is defined); pythonmain.c now contains a function realmain() which is
  6479. called from config.c's main().
  6480.  
  6481. * All files needed to use the built-in module md5 are now contained in
  6482. the distribution.  The module has been cleaned up considerably.
  6483.  
  6484.  
  6485. Documentation
  6486. -------------
  6487.  
  6488. * The library manual has been split into many more small latex files,
  6489. so it is easier to edit Doc/lib.tex file to create a custom library
  6490. manual, describing only those modules supported on your system.  (This
  6491. is not automated though.)
  6492.  
  6493. * A fourth manual has been added, titled "Extending and Embedding the
  6494. Python Interpreter" (Doc/ext.tex), which collects information about
  6495. the interpreter which was previously spread over several files in the
  6496. misc subdirectory.
  6497.  
  6498. * The entire documentation is now also available on-line for those who
  6499. have a WWW browser (e.g. NCSA Mosaic).  Point your browser to the URL
  6500. "http://www.cwi.nl/~guido/Python.html".
  6501.  
  6502.  
  6503. Syntax
  6504. ------
  6505.  
  6506. * Strings may now be enclosed in double quotes as well as in single
  6507. quotes.  There is no difference in interpretation.  The repr() of
  6508. string objects will use double quotes if the string contains a single
  6509. quote and no double quotes.  Thanks to Amrit Prem for these changes!
  6510.  
  6511. * There is a new keyword 'exec'.  This replaces the exec() built-in
  6512. function.  If a function contains an exec statement, local variable
  6513. optimization is not performed for that particular function, thus
  6514. making assignment to local variables in exec statements less
  6515. confusing.  (As a consequence, os.exec and python.exec have been
  6516. renamed to execv.)
  6517.  
  6518. * There is a new keyword 'lambda'.  An expression of the form
  6519.  
  6520.     lambda <parameters> : <expression>
  6521.  
  6522. yields an anonymous function.  This is really only syntactic sugar;
  6523. you can just as well define a local function using
  6524.  
  6525.     def some_temporary_name(<parameters>): return <expression>
  6526.  
  6527. Lambda expressions are particularly useful in combination with map(),
  6528. filter() and reduce(), described below.  Thanks to Amrit Prem for
  6529. submitting this code (as well as map(), filter(), reduce() and
  6530. xrange())!
  6531.  
  6532.  
  6533. Built-in functions
  6534. ------------------
  6535.  
  6536. * The built-in module containing the built-in functions is called
  6537. __builtin__ instead of builtin.
  6538.  
  6539. * New built-in functions map(), filter() and reduce() perform standard
  6540. functional programming operations (though not lazily):
  6541.  
  6542. - map(f, seq) returns a new sequence whose items are the items from
  6543. seq with f() applied to them.
  6544.  
  6545. - filter(f, seq) returns a subsequence of seq consisting of those
  6546. items for which f() is true.
  6547.  
  6548. - reduce(f, seq, initial) returns a value computed as follows:
  6549.     acc = initial
  6550.     for item in seq: acc = f(acc, item)
  6551.     return acc
  6552.  
  6553. * New function xrange() creates a "range object".  Its arguments are
  6554. the same as those of range(), and when used in a for loop a range
  6555. objects also behaves identical.  The advantage of xrange() over
  6556. range() is that its representation (if the range contains many
  6557. elements) is much more compact than that of range().  The disadvantage
  6558. is that the result cannot be used to initialize a list object or for
  6559. the "Python idiom" [RED, GREEN, BLUE] = range(3).  On some modern
  6560. architectures, benchmarks have shown that "for i in range(...): ..."
  6561. actually executes *faster* than "for i in xrange(...): ...", but on
  6562. memory starved machines like PCs running DOS range(100000) may be just
  6563. too big to be represented at all...
  6564.  
  6565. * Built-in function exec() has been replaced by the exec statement --
  6566. see above.
  6567.  
  6568.  
  6569. The interpreter
  6570. ---------------
  6571.  
  6572. * Syntax errors are now not printed to stderr by the parser, but
  6573. rather the offending line and other relevant information are packed up
  6574. in the SyntaxError exception argument.  When the main loop catches a
  6575. SyntaxError exception it will print the error in the same format as
  6576. previously, but at the proper position in the stack traceback.
  6577.  
  6578. * You can now set a maximum to the number of traceback entries
  6579. printed by assigning to sys.tracebacklimit.  The default is 1000.
  6580.  
  6581. * The version number in .pyc files has changed yet again.
  6582.  
  6583. * It is now possible to have a .pyc file without a corresponding .py
  6584. file.  (Warning: this may break existing installations if you have an
  6585. old .pyc file lingering around somewhere on your module search path
  6586. without a corresponding .py file, when there is a .py file for a
  6587. module of the same name further down the path -- the new interpreter
  6588. will find the first .pyc file and complain about it, while the old
  6589. interpreter would ignore it and use the .py file further down.)
  6590.  
  6591. * The list sys.builtin_module_names is now sorted and also contains
  6592. the names of a few hardwired built-in modules (sys, __main__ and
  6593. __builtin__).
  6594.  
  6595. * A module can now find its own name by accessing the global variable
  6596. __name__.  Assigning to this variable essentially renames the module
  6597. (it should also be stored under a different key in sys.modules).
  6598. A neat hack follows from this: a module that wants to execute a main
  6599. program when called as a script no longer needs to compare
  6600. sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
  6601.  
  6602. * When an object is printed by the print statement, its implementation
  6603. of str() is used.  This means that classes can define __str__(self) to
  6604. direct how their instances are printed.  This is different from
  6605. __repr__(self), which should define an unambigous string
  6606. representation of the instance.  (If __str__() is not defined, it
  6607. defaults to __repr__().)
  6608.  
  6609. * Functions and code objects can now be compared meaningfully.
  6610.  
  6611. * On systems supporting SunOS or SVR4 style shared libraries, dynamic
  6612. loading of modules using shared libraries is automatically configured.
  6613. Thanks to Bill Jansen and Denis Severson for contributing this change!
  6614.  
  6615.  
  6616. Built-in objects
  6617. ----------------
  6618.  
  6619. * File objects have acquired a new method writelines() which is the
  6620. reverse of readlines().  (It does not actually write lines, just a
  6621. list of strings, but the symmetry makes the choice of name OK.)
  6622.  
  6623.  
  6624. Built-in modules
  6625. ----------------
  6626.  
  6627. * Socket objects no longer support the avail() method.  Use the select
  6628. module instead, or use this function to replace it:
  6629.  
  6630.     def avail(f):
  6631.         import select
  6632.         return f in select.select([f], [], [], 0)[0]
  6633.  
  6634. * Initialization of stdwin is done differently.  It actually modifies
  6635. sys.argv (taking out the options the X version of stdwin recognizes)
  6636. the first time it is imported.
  6637.  
  6638. * A new built-in module parser provides a rudimentary interface to the
  6639. python parser.  Corresponding standard library modules token and symbol
  6640. defines the numeric values of tokens and non-terminal symbols.
  6641.  
  6642. * The posix module has aquired new functions setuid(), setgid(),
  6643. execve(), and exec() has been renamed to execv().
  6644.  
  6645. * The array module is extended with 8-byte object swaps, the 'i'
  6646. format character, and a reverse() method.  The read() and write()
  6647. methods are renamed to fromfile() and tofile().
  6648.  
  6649. * The rotor module has freed of portability bugs.  This introduces a
  6650. backward compatibility problem: strings encoded with the old rotor
  6651. module can't be decoded by the new version.
  6652.  
  6653. * For select.select(), a timeout (4th) argument of None means the same
  6654. as leaving the timeout argument out.
  6655.  
  6656. * Module strop (and hence standard library module string) has aquired
  6657. a new function: rindex().  Thanks to Amrit Prem!
  6658.  
  6659. * Module regex defines a new function symcomp() which uses an extended
  6660. regular expression syntax: parenthesized subexpressions may be labeled
  6661. using the form "\(<labelname>...\)", and the group() method can return
  6662. sub-expressions by name.  Thanks to Tracy Tims for these changes!
  6663.  
  6664. * Multiple threads are now supported on Solaris 2.  Thanks to Sjoerd
  6665. Mullender!
  6666.  
  6667.  
  6668. Standard library modules
  6669. ------------------------
  6670.  
  6671. * The library is now split in several subdirectories: all stuff using
  6672. stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
  6673. is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
  6674. test modules are in Lib/test.  The default module search path will
  6675. include all relevant subdirectories by default.
  6676.  
  6677. * Module os now knows about trying to import dos.  It defines
  6678. functions execl(), execle(), execlp() and execvp().
  6679.  
  6680. * New module dospath (should be attacked by a DOS hacker though).
  6681.  
  6682. * All modules defining classes now define __init__() constructors
  6683. instead of init() methods.  THIS IS AN INCOMPATIBLE CHANGE!
  6684.  
  6685. * Some minor changes and bugfixes module ftplib (mostly Steve
  6686. Majewski's suggestions); the debug() method is renamed to
  6687. set_debuglevel().
  6688.  
  6689. * Some new test modules (not run automatically by testall though):
  6690. test_audioop, test_md5, test_rgbimg, test_select.
  6691.  
  6692. * Module string now defines rindex() and rfind() in analogy of index()
  6693. and find().  It also defines atof() and atol() (and corresponding
  6694. exceptions) in analogy to atoi().
  6695.  
  6696. * Added help() functions to modules profile and pdb.
  6697.  
  6698. * The wdb debugger (now in Lib/stdwin) now shows class or instance
  6699. variables on a double click.  Thanks to Sjoerd Mullender!
  6700.  
  6701. * The (undocumented) module lambda has gone -- you couldn't import it
  6702. any more, and it was basically more a demo than a library module...
  6703.  
  6704.  
  6705. Multimedia extensions
  6706. ---------------------
  6707.  
  6708. * The optional built-in modules audioop and imageop are now standard
  6709. parts of the interpreter.  Thanks to Sjoerd Mullender and Jack Jansen
  6710. for contributing this code!
  6711.  
  6712. * There's a new operation in audioop: minmax().
  6713.  
  6714. * There's a new built-in module called rgbimg which supports portable
  6715. efficient reading of SGI RCG image files.  Thanks also to Paul
  6716. Haeberli for the original code!  (Who will contribute a GIF reader?)
  6717.  
  6718. * The module aifc is gone -- you should now always use aifc, which has
  6719. received a facelift.
  6720.  
  6721. * There's a new module sunau., for reading Sun (and NeXT) audio files.
  6722.  
  6723. * There's a new module audiodev which provides a uniform interface to
  6724. (SGI Indigo and Sun Sparc) audio hardware.
  6725.  
  6726. * There's a new module sndhdr which recognizes various sound files by
  6727. looking in their header and checking for various magic words.
  6728.  
  6729.  
  6730. Optimizations
  6731. -------------
  6732.  
  6733. * Most optimizations below can be configured by compile-time flags.
  6734. Thanks to Sjoerd Mullender for submitting these optimizations!
  6735.  
  6736. * Small integers (default -1..99) are shared -- i.e. if two different
  6737. functions compute the same value it is possible (but not
  6738. guaranteed!!!) that they return the same *object*.  Python programs
  6739. can detect this but should *never* rely on it.
  6740.  
  6741. * Empty tuples (which all compare equal) are shared in the same
  6742. manner.
  6743.  
  6744. * Tuples of size up to 20 (default) are put in separate free lists
  6745. when deallocated.
  6746.  
  6747. * There is a compile-time option to cache a string's hash function,
  6748. but this appeared to have a negligeable effect, and as it costs 4
  6749. bytes per string it is disabled by default.
  6750.  
  6751.  
  6752. Embedding Python
  6753. ----------------
  6754.  
  6755. * The initialization interface has been simplified somewhat.  You now
  6756. only call "initall()" to initialize the interpreter.
  6757.  
  6758. * The previously announced renaming of externally visible identifiers
  6759. has not been carried out.  It will happen in a later release.  Sorry.
  6760.  
  6761.  
  6762. Miscellaneous bugs that have been fixed
  6763. ---------------------------------------
  6764.  
  6765. * All known portability bugs.
  6766.  
  6767. * Version 0.9.9 dumped core in <listobject>.sort() which has been
  6768. fixed.  Thanks to Jaap Vermeulen for fixing this and posting the fix
  6769. on the mailing list while I was away!
  6770.  
  6771. * Core dump on a format string ending in '%', e.g. in the expression
  6772. '%' % None.
  6773.  
  6774. * The array module yielded a bogus result for concatenation (a+b would
  6775. yield a+a).
  6776.  
  6777. * Some serious memory leaks in strop.split() and strop.splitfields().
  6778.  
  6779. * Several problems with the nis module.
  6780.  
  6781. * Subtle problem when copying a class method from another class
  6782. through assignment (the method could not be called).
  6783.  
  6784.  
  6785. Remaining bugs
  6786. --------------
  6787.  
  6788. * One problem with 64-bit machines remains -- since .pyc files are
  6789. portable and use only 4 bytes to represent an integer object, 64-bit
  6790. integer literals are silently truncated when written into a .pyc file.
  6791. Work-around: use eval('123456789101112').
  6792.  
  6793. * The freeze script doesn't work any more.  A new and more portable
  6794. one can probably be cooked up using tricks from Extensions/mkext.py.
  6795.  
  6796. * The dos support hasn't been tested yet.  (Really Soon Now we should
  6797. have a PC with a working C compiler!)
  6798.  
  6799.  
  6800. ===================================
  6801. ==> Release 0.9.9 (29 Jul 1993) <==
  6802. ===================================
  6803.  
  6804. I *believe* these are the main user-visible changes in this release,
  6805. but there may be others.  SGI users may scan the {src,lib}/ChangeLog
  6806. files for improvements of some SGI specific modules, e.g. aifc and
  6807. cl.  Developers of extension modules should also read src/ChangeLog.
  6808.  
  6809.  
  6810. Naming of C symbols used by the Python interpreter
  6811. --------------------------------------------------
  6812.  
  6813. * This is the last release using the current naming conventions.  New
  6814. naming conventions are explained in the file misc/NAMING.
  6815. Summarizing, all externally visible symbols get (at least) a "Py"
  6816. prefix, and most functions are renamed to the standard form
  6817. PyModule_FunctionName.
  6818.  
  6819. * Writers of extensions are urged to start using the new naming
  6820. conventions.  The next release will use the new naming conventions
  6821. throughout (it will also have a different source directory
  6822. structure).
  6823.  
  6824. * As a result of the preliminary work for the great renaming, many
  6825. functions that were accidentally global have been made static.
  6826.  
  6827.  
  6828. BETA X11 support
  6829. ----------------
  6830.  
  6831. * There are now modules interfacing to the X11 Toolkit Intrinsics, the
  6832. Athena widgets, and the Motif 1.1 widget set.  These are not yet
  6833. documented except through the examples and README file in the demo/x11
  6834. directory.  It is expected that this interface will be replaced by a
  6835. more powerful and correct one in the future, which may or may not be
  6836. backward compatible.  In other words, this part of the code is at most
  6837. BETA level software!  (Note: the rest of Python is rock solid as ever!)
  6838.  
  6839. * I understand that the above may be a bit of a disappointment,
  6840. however my current schedule does not allow me to change this situation
  6841. before putting the release out of the door.  By releasing it
  6842. undocumented and buggy, at least some of the (working!) demo programs,
  6843. like itr (my Internet Talk Radio browser) become available to a larger
  6844. audience.
  6845.  
  6846. * There are also modules interfacing to SGI's "Glx" widget (a GL
  6847. window wrapped in a widget) and to NCSA's "HTML" widget (which can
  6848. format HyperText Markup Language, the document format used by the
  6849. World Wide Web).
  6850.  
  6851. * I've experienced some problems when building the X11 support.  In
  6852. particular, the Xm and Xaw widget sets don't go together, and it
  6853. appears that using X11R5 is better than using X11R4.  Also the threads
  6854. module and its link time options may spoil things.  My own strategy is
  6855. to build two Python binaries: one for use with X11 and one without
  6856. it, which can contain a richer set of built-in modules.  Don't even
  6857. *think* of loading the X11 modules dynamically...
  6858.  
  6859.  
  6860. Environmental changes
  6861. ---------------------
  6862.  
  6863. * Compiled files (*.pyc files) created by this Python version are
  6864. incompatible with those created by the previous version.  Both
  6865. versions detect this and silently create a correct version, but it
  6866. means that it is not a good idea to use the same library directory for
  6867. an old and a new interpreter, since they will start to "fight" over
  6868. the *.pyc files...
  6869.  
  6870. * When a stack trace is printed, the exception is printed last instead
  6871. of first.  This means that if the beginning of the stack trace
  6872. scrolled out of your window you can still see what exception caused
  6873. it.
  6874.  
  6875. * Sometimes interrupting a Python operation does not work because it
  6876. hangs in a blocking system call.  You can now kill the interpreter by
  6877. interrupting it three times.  The second time you interrupt it, a
  6878. message will be printed telling you that the third interrupt will kill
  6879. the interpreter.  The "sys.exitfunc" feature still makes limited
  6880. clean-up possible in this case.
  6881.  
  6882.  
  6883. Changes to the command line interface
  6884. -------------------------------------
  6885.  
  6886. * The python usage message is now much more informative.
  6887.  
  6888. * New option -i enters interactive mode after executing a script --
  6889. useful for debugging.
  6890.  
  6891. * New option -k raises an exception when an expression statement
  6892. yields a value other than None.
  6893.  
  6894. * For each option there is now also a corresponding environment
  6895. variable.
  6896.  
  6897.  
  6898. Using Python as an embedded language
  6899. ------------------------------------
  6900.  
  6901. * The distribution now contains (some) documentation on the use of
  6902. Python as an "embedded language" in other applications, as well as a
  6903. simple example.  See the file misc/EMBEDDING and the directory embed/.
  6904.  
  6905.  
  6906. Speed improvements
  6907. ------------------
  6908.  
  6909. * Function local variables are now generally stored in an array and
  6910. accessed using an integer indexing operation, instead of through a
  6911. dictionary lookup.  (This compensates the somewhat slower dictionary
  6912. lookup caused by the generalization of the dictionary module.)
  6913.  
  6914.  
  6915. Changes to the syntax
  6916. ---------------------
  6917.  
  6918. * Continuation lines can now *sometimes* be written without a
  6919. backslash: if the continuation is contained within nesting (), [] or
  6920. {} brackets the \ may be omitted.  There's a much improved
  6921. python-mode.el in the misc directory which knows about this as well.
  6922.  
  6923. * You can no longer use an empty set of parentheses to define a class
  6924. without base classes.  That is, you no longer write this:
  6925.  
  6926.     class Foo(): # syntax error
  6927.         ...
  6928.  
  6929. You must write this instead:
  6930.  
  6931.     class Foo:
  6932.         ...
  6933.  
  6934. This was already the preferred syntax in release 0.9.8 but many
  6935. people seemed not to have picked it up.  There's a Python script that
  6936. fixes old code: demo/scripts/classfix.py.
  6937.  
  6938. * There's a new reserved word: "access".  The syntax and semantics are
  6939. still subject of of research and debate (as well as undocumented), but
  6940. the parser knows about the keyword so you must not use it as a
  6941. variable, function, or attribute name.
  6942.  
  6943.  
  6944. Changes to the semantics of the language proper
  6945. -----------------------------------------------
  6946.  
  6947. * The following compatibility hack is removed: if a function was
  6948. defined with two or more arguments, and called with a single argument
  6949. that was a tuple with just as many arguments, the items of this tuple
  6950. would be used as the arguments.  This is no longer supported.
  6951.  
  6952.  
  6953. Changes to the semantics of classes and instances
  6954. -------------------------------------------------
  6955.  
  6956. * Class variables are now also accessible as instance variables for
  6957. reading (assignment creates an instance variable which overrides the
  6958. class variable of the same name though).
  6959.  
  6960. * If a class attribute is a user-defined function, a new kind of
  6961. object is returned: an "unbound method".  This contains a pointer to
  6962. the class and can only be called with a first argument which is a
  6963. member of that class (or a derived class).
  6964.  
  6965. * If a class defines a method __init__(self, arg1, ...) then this
  6966. method is called when a class instance is created by the classname()
  6967. construct.  Arguments passed to classname() are passed to the
  6968. __init__() method.  The __init__() methods of base classes are not
  6969. automatically called; the derived __init__() method must call these if
  6970. necessary (this was done so the derived __init__() method can choose
  6971. the call order and arguments for the base __init__() methods).
  6972.  
  6973. * If a class defines a method __del__(self) then this method is called
  6974. when an instance of the class is about to be destroyed.  This makes it
  6975. possible to implement clean-up of external resources attached to the
  6976. instance.  As with __init__(), the __del__() methods of base classes
  6977. are not automatically called.  If __del__ manages to store a reference
  6978. to the object somewhere, its destruction is postponed; when the object
  6979. is again about to be destroyed its __del__() method will be called
  6980. again.
  6981.  
  6982. * Classes may define a method __hash__(self) to allow their instances
  6983. to be used as dictionary keys.  This must return a 32-bit integer.
  6984.  
  6985.  
  6986. Minor improvements
  6987. ------------------
  6988.  
  6989. * Function and class objects now know their name (the name given in
  6990. the 'def' or 'class' statement that created them).
  6991.  
  6992. * Class instances now know their class name.
  6993.  
  6994.  
  6995. Additions to built-in operations
  6996. --------------------------------
  6997.  
  6998. * The % operator with a string left argument implements formatting
  6999. similar to sprintf() in C.  The right argument is either a single
  7000. value or a tuple of values.  All features of Standard C sprintf() are
  7001. supported except %p.
  7002.  
  7003. * Dictionaries now support almost any key type, instead of just
  7004. strings.  (The key type must be an immutable type or must be a class
  7005. instance where the class defines a method __hash__(), in order to
  7006. avoid losing track of keys whose value may change.)
  7007.  
  7008. * Built-in methods are now compared properly: when comparing x.meth1
  7009. and y.meth2, if x is equal to y and the methods are defined by the
  7010. same function, x.meth1 compares equal to y.meth2.
  7011.  
  7012.  
  7013. Additions to built-in functions
  7014. -------------------------------
  7015.  
  7016. * str(x) returns a string version of its argument.  If the argument is
  7017. a string it is returned unchanged, otherwise it returns `x`.
  7018.  
  7019. * repr(x) returns the same as `x`.  (Some users found it easier to
  7020. have this as a function.)
  7021.  
  7022. * round(x) returns the floating point number x rounded to an whole
  7023. number, represented as a floating point number.  round(x, n) returns x
  7024. rounded to n digits.
  7025.  
  7026. * hasattr(x, name) returns true when x has an attribute with the given
  7027. name.
  7028.  
  7029. * hash(x) returns a hash code (32-bit integer) of an arbitrary
  7030. immutable object's value.
  7031.  
  7032. * id(x) returns a unique identifier (32-bit integer) of an arbitrary
  7033. object.
  7034.  
  7035. * compile() compiles a string to a Python code object.
  7036.  
  7037. * exec() and eval() now support execution of code objects.
  7038.  
  7039.  
  7040. Changes to the documented part of the library (standard modules)
  7041. ----------------------------------------------------------------
  7042.  
  7043. * os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so
  7044. the border case '/foo/..' returns '/' instead of ''.
  7045.  
  7046. * A new function string.find() is added with similar semantics to
  7047. string.index(); however when it does not find the given substring it
  7048. returns -1 instead of raising string.index_error.
  7049.  
  7050.  
  7051. Changes to built-in modules
  7052. ---------------------------
  7053.  
  7054. * New optional module 'array' implements operations on sequences of
  7055. integers or floating point numbers of a particular size.  This is
  7056. useful to manipulate large numerical arrays or to read and write
  7057. binary files consisting of numerical data.
  7058.  
  7059. * Regular expression objects created by module regex now support a new
  7060. method named group(), which returns one or more \(...\) groups by number.
  7061. The number of groups is increased from 10 to 100.
  7062.  
  7063. * Function compile() in module regex now supports an optional mapping
  7064. argument; a variable casefold is added to the module which can be used
  7065. as a standard uppercase to lowercase mapping.
  7066.  
  7067. * Module time now supports many routines that are defined in the
  7068. Standard C time interface (<time.h>): gmtime(), localtime(),
  7069. asctime(), ctime(), mktime(), as well as these variables (taken from
  7070. System V): timezone, altzone, daylight and tzname.  (The corresponding
  7071. functions in the undocumented module calendar have been removed; the
  7072. undocumented and unfinished module tzparse is now obsolete and will
  7073. disappear in a future release.)
  7074.  
  7075. * Module strop (the fast built-in version of standard module string)
  7076. now uses C's definition of whitespace instead of fixing it to space,
  7077. tab and newline; in practice this usually means that vertical tab,
  7078. form feed and return are now also considered whitespace.  It exports
  7079. the string of characters that are considered whitespace as well as the
  7080. characters that are considered lowercase or uppercase.
  7081.  
  7082. * Module sys now defines the variable builtin_module_names, a list of
  7083. names of modules built into the current interpreter (including not
  7084. yet imported, but excluding two special modules that always have to be
  7085. defined -- sys and builtin).
  7086.  
  7087. * Objects created by module sunaudiodev now also support flush() and
  7088. close() methods.
  7089.  
  7090. * Socket objects created by module socket now support an optional
  7091. flags argument for their methods sendto() and recvfrom().
  7092.  
  7093. * Module marshal now supports dumping to and loading from strings,
  7094. through the functions dumps() and loads().
  7095.  
  7096. * Module stdwin now supports some new functionality.  You may have to
  7097. ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.)
  7098.  
  7099.  
  7100. Bugs fixed
  7101. ----------
  7102.  
  7103. * Fixed comparison of negative long integers.
  7104.  
  7105. * The tokenizer no longer botches input lines longer than BUFSIZ.
  7106.  
  7107. * Fixed several severe memory leaks in module select.
  7108.  
  7109. * Fixed memory leaks in modules socket and sv.
  7110.  
  7111. * Fixed memory leak in divmod() for long integers.
  7112.  
  7113. * Problems with definition of floatsleep() on Suns fixed.
  7114.  
  7115. * Many portability bugs fixed (and undoubtedly new ones added :-).
  7116.  
  7117.  
  7118. Changes to the build procedure
  7119. ------------------------------
  7120.  
  7121. * The Makefile supports some new targets: "make default" and "make
  7122. all".  Both are by normally equivalent to "make python".
  7123.  
  7124. * The Makefile no longer uses $> since it's not supported by all
  7125. versions of Make.
  7126.  
  7127. * The header files now all contain #ifdef constructs designed to make
  7128. it safe to include the same header file twice, as well as support for
  7129. inclusion from C++ programs (automatic extern "C" { ... } added).
  7130.  
  7131.  
  7132. Freezing Python scripts
  7133. -----------------------
  7134.  
  7135. * There is now some support for "freezing" a Python script as a
  7136. stand-alone executable binary file.  See the script
  7137. demo/scripts/freeze.py.  It will require some site-specific tailoring
  7138. of the script to get this working, but is quite worthwhile if you write
  7139. Python code for other who may not have built and installed Python.
  7140.  
  7141.  
  7142. MS-DOS
  7143. ------
  7144.  
  7145. * A new MS-DOS port has been done, using MSC 6.0 (I believe).  Thanks,
  7146. Marcel van der Peijl!  This requires fewer compatibility hacks in
  7147. posixmodule.c.  The executable is not yet available but will be soon
  7148. (check the mailing list).
  7149.  
  7150. * The default PYTHONPATH has changed.
  7151.  
  7152.  
  7153. Changes for developers of extension modules
  7154. -------------------------------------------
  7155.  
  7156. * Read src/ChangeLog for full details.
  7157.  
  7158.  
  7159. SGI specific changes
  7160. --------------------
  7161.  
  7162. * Read src/ChangeLog for full details.
  7163.  
  7164.  
  7165. ==================================
  7166. ==> Release 0.9.8 (9 Jan 1993) <==
  7167. ==================================
  7168.  
  7169. I claim no completeness here, but I've tried my best to scan the log
  7170. files throughout my source tree for interesting bits of news.  A more
  7171. complete account of the changes is to be found in the various
  7172. ChangeLog files. See also "News for release 0.9.7beta" below if you're
  7173. still using release 0.9.6, and the file HISTORY if you have an even
  7174. older release.
  7175.  
  7176.     --Guido
  7177.  
  7178.  
  7179. Changes to the language proper
  7180. ------------------------------
  7181.  
  7182. There's only one big change: the conformance checking for function
  7183. argument lists (of user-defined functions only) is stricter.  Earlier,
  7184. you could get away with the following:
  7185.  
  7186.     (a) define a function of one argument and call it with any
  7187.         number of arguments; if the actual argument count wasn't
  7188.         one, the function would receive a tuple containing the
  7189.         arguments arguments (an empty tuple if there were none).
  7190.  
  7191.     (b) define a function of two arguments, and call it with more
  7192.         than two arguments; if there were more than two arguments,
  7193.         the second argument would be passed as a tuple containing
  7194.         the second and further actual arguments.
  7195.  
  7196. (Note that an argument (formal or actual) that is a tuple is counted as
  7197. one; these rules don't apply inside such tuples, only at the top level
  7198. of the argument list.)
  7199.  
  7200. Case (a) was needed to accommodate variable-length argument lists;
  7201. there is now an explicit "varargs" feature (precede the last argument
  7202. with a '*').  Case (b) was needed for compatibility with old class
  7203. definitions: up to release 0.9.4 a method with more than one argument
  7204. had to be declared as "def meth(self, (arg1, arg2, ...)): ...".
  7205. Version 0.9.6 provide better ways to handle both casees, bot provided
  7206. backward compatibility; version 0.9.8 retracts the compatibility hacks
  7207. since they also cause confusing behavior if a function is called with
  7208. the wrong number of arguments.
  7209.  
  7210. There's a script that helps converting classes that still rely on (b),
  7211. provided their methods' first argument is called "self":
  7212. demo/scripts/methfix.py.
  7213.  
  7214. If this change breaks lots of code you have developed locally, try
  7215. #defining COMPAT_HACKS in ceval.c.
  7216.  
  7217. (There's a third compatibility hack, which is the reverse of (a): if a
  7218. function is defined with two or more arguments, and called with a
  7219. single argument that is a tuple with just as many arguments, the items
  7220. of this tuple will be used as the arguments.  Although this can (and
  7221. should!) be done using the built-in function apply() instead, it isn't
  7222. withdrawn yet.)
  7223.  
  7224.  
  7225. One minor change: comparing instance methods works like expected, so
  7226. that if x is an instance of a user-defined class and has a method m,
  7227. then (x.m==x.m) yields 1.
  7228.  
  7229.  
  7230. The following was already present in 0.9.7beta, but not explicitly
  7231. mentioned in the NEWS file: user-defined classes can now define types
  7232. that behave in almost allrespects like numbers.  See
  7233. demo/classes/Rat.py for a simple example.
  7234.  
  7235.  
  7236. Changes to the build process
  7237. ----------------------------
  7238.  
  7239. The Configure.py script and the Makefile has been made somewhat more
  7240. bullet-proof, after reports of (minor) trouble on certain platforms.
  7241.  
  7242. There is now a script to patch Makefile and config.c to add a new
  7243. optional built-in module: Addmodule.sh.  Read the script before using!
  7244.  
  7245. Useing Addmodule.sh, all optional modules can now be configured at
  7246. compile time using Configure.py, so there are no modules left that
  7247. require dynamic loading.
  7248.  
  7249. The Makefile has been fixed to make it easier to use with the VPATH
  7250. feature of some Make versions (e.g. SunOS).
  7251.  
  7252.  
  7253. Changes affecting portability
  7254. -----------------------------
  7255.  
  7256. Several minor portability problems have been solved, e.g. "malloc.h"
  7257. has been renamed to "mymalloc.h", "strdup.c" is no longer used, and
  7258. the system now tolerates malloc(0) returning 0.
  7259.  
  7260. For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now
  7261. distributed with Python.  This solves several minor problems, in
  7262. particular scripts invoked using #! can now use dynamic loading.
  7263.  
  7264.  
  7265. Changes to the interpreter interface
  7266. ------------------------------------
  7267.  
  7268. On popular demand, there's finally a "profile" feature for interactive
  7269. use of the interpreter.  If the environment variable $PYTHONSTARTUP is
  7270. set to the name of an existing file, Python statements in this file
  7271. are executed when the interpreter is started in interactive mode.
  7272.  
  7273. There is a new clean-up mechanism, complementing try...finally: if you
  7274. assign a function object to sys.exitfunc, it will be called when
  7275. Python exits or receives a SIGTERM or SIGHUP signal.
  7276.  
  7277. The interpreter is now generally assumed to live in
  7278. /usr/local/bin/python (as opposed to /usr/local/python).  The script
  7279. demo/scripts/fixps.py will update old scripts in place (you can easily
  7280. modify it to do other similar changes).
  7281.  
  7282. Most I/O that uses sys.stdin/stdout/stderr will now use any object
  7283. assigned to those names as long as the object supports readline() or
  7284. write() methods.
  7285.  
  7286. The parser stack has been increased to 500 to accommodate more
  7287. complicated expressions (7 levels used to be the practical maximum,
  7288. it's now about 38).
  7289.  
  7290. The limit on the size of the *run-time* stack has completely been
  7291. removed -- this means that tuple or list displays can contain any
  7292. number of elements (formerly more than 50 would crash the
  7293. interpreter). 
  7294.  
  7295.  
  7296. Changes to existing built-in functions and methods
  7297. --------------------------------------------------
  7298.  
  7299. The built-in functions int(), long(), float(), oct() and hex() now
  7300. also apply to class instalces that define corresponding methods
  7301. (__int__ etc.).
  7302.  
  7303.  
  7304. New built-in functions
  7305. ----------------------
  7306.  
  7307. The new functions str() and repr() convert any object to a string.
  7308. The function repr(x) is in all respects equivalent to `x` -- some
  7309. people prefer a function for this.  The function str(x) does the same
  7310. except if x is already a string -- then it returns x unchanged
  7311. (repr(x) adds quotes and escapes "funny" characters as octal escapes).
  7312.  
  7313. The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y.
  7314.  
  7315.  
  7316. Changes to general built-in modules
  7317. -----------------------------------
  7318.  
  7319. The time module's functions are more general: time() returns a
  7320. floating point number and sleep() accepts one.  Their accuracies
  7321. depends on the precision of the system clock.  Millisleep is no longer
  7322. needed (although it still exists for now), but millitimer is still
  7323. needed since on some systems wall clock time is only available with
  7324. seconds precision, while a source of more precise time exists that
  7325. isn't synchronized with the wall clock.  (On UNIX systems that support
  7326. the BSD gettimeofday() function, time.time() is as time.millitimer().)
  7327.  
  7328. The string representation of a file object now includes an address:
  7329. '<file 'filename', mode 'r' at #######>' where ###### is a hex number
  7330. (the object's address) to make it unique.
  7331.  
  7332. New functions added to posix: nice(), setpgrp(), and if your system
  7333. supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp().
  7334.  
  7335. Improvements to the socket module: socket objects have new methods
  7336. getpeername() and getsockname(), and the {get,set}sockopt methods can
  7337. now get/set any kind of option using strings built with the new struct
  7338. module.  And there's a new function fromfd() which creates a socket
  7339. object given a file descriptor (useful for servers started by inetd,
  7340. which have a socket connected to stdin and stdout).
  7341.  
  7342.  
  7343. Changes to SGI-specific built-in modules
  7344. ----------------------------------------
  7345.  
  7346. The FORMS library interface (fl) now requires FORMS 2.1a.  Some new
  7347. functions have been added and some bugs have been fixed.
  7348.  
  7349. Additions to al (audio library interface): added getname(),
  7350. getdefault() and getminmax().
  7351.  
  7352. The gl modules doesn't call "foreground()" when initialized (this
  7353. caused some problems) like it dit in 0.9.7beta (but not before).
  7354. There's a new gl function 'gversion() which returns a version string.
  7355.  
  7356. The interface to sv (Indigo video interface) has totally changed.
  7357. (Sorry, still no documentation, but see the examples in
  7358. demo/sgi/{sv,video}.)
  7359.  
  7360.  
  7361. Changes to standard library modules
  7362. -----------------------------------
  7363.  
  7364. Most functions in module string are now much faster: they're actually
  7365. implemented in C.  The module containing the C versions is called
  7366. "strop" but you should still import "string" since strop doesn't
  7367. provide all the interfaces defined in string (and strop may be renamed
  7368. to string when it is complete in a future release).
  7369.  
  7370. string.index() now accepts an optional third argument giving an index
  7371. where to start searching in the first argument, so you can find second
  7372. and further occurrences (this is similar to the regular expression
  7373. functions in regex).
  7374.  
  7375. The definition of what string.splitfields(anything, '') should return
  7376. is changed for the last time: it returns a singleton list containing
  7377. its whole first argument unchanged.  This is compatible with
  7378. regsub.split() which also ignores empty delimiter matches.
  7379.  
  7380. posixpath, macpath: added dirname() and normpath() (and basename() to
  7381. macpath).
  7382.  
  7383. The mainloop module (for use with stdwin) can now demultiplex input
  7384. from other sources, as long as they can be polled with select().
  7385.  
  7386.  
  7387. New built-in modules
  7388. --------------------
  7389.  
  7390. Module struct defines functions to pack/unpack values to/from strings
  7391. representing binary values in native byte order.
  7392.  
  7393. Module strop implements C versions of many functions from string (see
  7394. above).
  7395.  
  7396. Optional module fcntl defines interfaces to fcntl() and ioctl() --
  7397. UNIX only.  (Not yet properly documented -- see however src/fcntl.doc.)
  7398.  
  7399. Optional module mpz defines an interface to an altaernative long
  7400. integer implementation, the GNU MPZ library.
  7401.  
  7402. Optional module md5 uses the GNU MPZ library to calculate MD5
  7403. signatures of strings.
  7404.  
  7405. There are also optional new modules specific to SGI machines: imageop
  7406. defines some simple operations to images represented as strings; sv
  7407. interfaces to the Indigo video board; cl interfaces to the (yet
  7408. unreleased) compression library.
  7409.  
  7410.  
  7411. New standard library modules
  7412. ----------------------------
  7413.  
  7414. (Unfortunately the following modules are not all documented; read the
  7415. sources to find out more about them!)
  7416.  
  7417. autotest: run testall without showing any output unless it differs
  7418. from the expected output
  7419.  
  7420. bisect: use bisection to insert or find an item in a sorted list
  7421.  
  7422. colorsys: defines conversions between various color systems (e.g. RGB
  7423. <-> YUV)
  7424.  
  7425. nntplib: a client interface to NNTP servers
  7426.  
  7427. pipes: utility to construct pipeline from templates, e.g. for
  7428. conversion from one file format to another using several utilities.
  7429.  
  7430. regsub: contains three functions that are more or less compatible with
  7431. awk functions of the same name: sub() and gsub() do string
  7432. substitution, split() splits a string using a regular expression to
  7433. define how separators are define.
  7434.  
  7435. test_types: test operations on the built-in types of Python
  7436.  
  7437. toaiff: convert various audio file formats to AIFF format
  7438.  
  7439. tzparse: parse the TZ environment parameter (this may be less general
  7440. than it could be, let me know if you fix it).
  7441.  
  7442. (Note that the obsolete module "path" no longer exists.)
  7443.  
  7444.  
  7445. New SGI-specific library modules
  7446. --------------------------------
  7447.  
  7448. CL: constants for use with the built-in compression library interface (cl)
  7449.  
  7450. Queue: a multi-producer, multi-consumer queue class implemented for
  7451. use with the built-in thread module
  7452.  
  7453. SOCKET: constants for use with built-in module socket, e.g. to set/get
  7454. socket options.  This is SGI-specific because the constants to be
  7455. passed are system-dependent.  You can generate a version for your own
  7456. system by running the script demo/scripts/h2py.py with
  7457. /usr/include/sys/socket.h as input.
  7458.  
  7459. cddb: interface to the database used the the CD player
  7460.  
  7461. torgb: convert various image file types to rgb format (requires pbmplus)
  7462.  
  7463.  
  7464. New demos
  7465. ---------
  7466.  
  7467. There's an experimental interface to define Sun RPC clients and
  7468. servers in demo/rpc.
  7469.  
  7470. There's a collection of interfaces to WWW, WAIS and Gopher (both
  7471. Python classes and program providing a user interface) in demo/www.
  7472. This includes a program texi2html.py which converts texinfo files to
  7473. HTML files (the format used hy WWW).
  7474.  
  7475. The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse.
  7476.  
  7477. For SGI systems, there's a whole collection of programs and classes
  7478. that make use of the Indigo video board in demo/sgi/{sv,video}.  This
  7479. represents a significant amount of work that we're giving away!
  7480.  
  7481. There are demos "rsa" and "md5test" that exercise the mpz and md5
  7482. modules, respectively.  The rsa demo is a complete implementation of
  7483. the RSA public-key cryptosystem!
  7484.  
  7485. A bunch of games and examples submitted by Stoffel Erasmus have been
  7486. included in demo/stoffel.
  7487.  
  7488. There are miscellaneous new files in some existing demo
  7489. subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py,
  7490. sgi/al/cmpaf.py, sockets/{mcast,gopher}.py.
  7491.  
  7492. There are also many minor changes to existing files, but I'm too lazy
  7493. to run a diff and note the differences -- you can do this yourself if
  7494. you save the old distribution's demos.  One highlight: the
  7495. stdwin/python.py demo is much improved!
  7496.  
  7497.  
  7498. Changes to the documentation
  7499. ----------------------------
  7500.  
  7501. The LaTeX source for the library uses different macros to enable it to
  7502. be converted to texinfo, and from there to INFO or HTML format so it
  7503. can be browsed as a hypertext.  The net result is that you can now
  7504. read the Python library documentation in Emacs info mode!
  7505.  
  7506.  
  7507. Changes to the source code that affect C extension writers
  7508. ----------------------------------------------------------
  7509.  
  7510. The function strdup() no longer exists (it was used only in one places
  7511. and is somewhat of a a portability problem sice some systems have the
  7512. same function in their C library.
  7513.  
  7514. The functions NEW() and RENEW() allocate one spare byte to guard
  7515. against a NULL return from malloc(0) being taken for an error, but
  7516. this should not be relied upon.
  7517.  
  7518.  
  7519. =========================
  7520. ==> Release 0.9.7beta <==
  7521. =========================
  7522.  
  7523.  
  7524. Changes to the language proper
  7525. ------------------------------
  7526.  
  7527. User-defined classes can now implement operations invoked through
  7528. special syntax, such as x[i] or `x` by defining methods named
  7529. __getitem__(self, i) or __repr__(self), etc.
  7530.  
  7531.  
  7532. Changes to the build process
  7533. ----------------------------
  7534.  
  7535. Instead of extensive manual editing of the Makefile to select
  7536. compile-time options, you can now run a Configure.py script.
  7537. The Makefile as distributed builds a minimal interpreter sufficient to
  7538. run Configure.py.  See also misc/BUILD
  7539.  
  7540. The Makefile now includes more "utility" targets, e.g. install and
  7541. tags/TAGS
  7542.  
  7543. Using the provided strtod.c and strtol.c are now separate options, as
  7544. on the Sun the provided strtod.c dumps core :-(
  7545.  
  7546. The regex module is now an option chosen by the Makefile, since some
  7547. (old) C compilers choke on regexpr.c
  7548.  
  7549.  
  7550. Changes affecting portability
  7551. -----------------------------
  7552.  
  7553. You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin
  7554. interface
  7555.  
  7556. Dynamic loading is now supported for Sun (and other non-COFF systems)
  7557. throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
  7558. DL is out, 1.4)
  7559.  
  7560. The system-dependent code for the use of the select() system call is
  7561. moved to one file: myselect.h
  7562.  
  7563. Thanks to Jaap Vermeulen, the code should now port cleanly to the
  7564. SEQUENT
  7565.  
  7566.  
  7567. Changes to the interpreter interface
  7568. ------------------------------------
  7569.  
  7570. The interpretation of $PYTHONPATH in the environment is different: it
  7571. is inserted in front of the default path instead of overriding it
  7572.  
  7573.  
  7574. Changes to existing built-in functions and methods
  7575. --------------------------------------------------
  7576.  
  7577. List objects now support an optional argument to their sort() method,
  7578. which is a comparison function similar to qsort(3) in C
  7579.  
  7580. File objects now have a method fileno(), used by the new select module
  7581. (see below)
  7582.  
  7583.  
  7584. New built-in function
  7585. ---------------------
  7586.  
  7587. coerce(x, y): take two numbers and return a tuple containing them
  7588. both converted to a common type
  7589.  
  7590.  
  7591. Changes to built-in modules
  7592. ---------------------------
  7593.  
  7594. sys: fixed core dumps in settrace() and setprofile()
  7595.  
  7596. socket: added socket methods setsockopt() and getsockopt(); and
  7597. fileno(), used by the new select module (see below)
  7598.  
  7599. stdwin: added fileno() == connectionnumber(), in support of new module
  7600. select (see below)
  7601.  
  7602. posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function.
  7603.  
  7604. gl: added qgetfd()
  7605.  
  7606. fl: added several new functions, fixed several obscure bugs, adapted
  7607. to FORMS 2.1
  7608.  
  7609.  
  7610. Changes to standard modules
  7611. ---------------------------
  7612.  
  7613. posixpath: changed implementation of ismount()
  7614.  
  7615. string: atoi() no longer mistakes leading zero for octal number
  7616.  
  7617. ...
  7618.  
  7619.  
  7620. New built-in modules
  7621. --------------------
  7622.  
  7623. Modules marked "dynamic only" are not configured at compile time but
  7624. can be loaded dynamically.  You need to turn on the DL or DLD option in
  7625. the Makefile for support dynamic loading of modules (this requires
  7626. external code).
  7627.  
  7628. select: interfaces to the BSD select() system call
  7629.  
  7630. dbm: interfaces to the (new) dbm library (dynamic only)
  7631.  
  7632. nis: interfaces to some NIS functions (aka yellow pages)
  7633.  
  7634. thread: limited form of multiple threads (sgi only)
  7635.  
  7636. audioop: operations useful for audio programs, e.g. u-LAW and ADPCM
  7637. coding (dynamic only)
  7638.  
  7639. cd: interface to Indigo SCSI CDROM player audio library (sgi only)
  7640.  
  7641. jpeg: read files in JPEG format (dynamic only, sgi only; needs
  7642. external code)
  7643.  
  7644. imgfile: read SGI image files (dynamic only, sgi only)
  7645.  
  7646. sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only)
  7647.  
  7648. sv: interface to Indigo video library (sgi only)
  7649.  
  7650. pc: a minimal set of MS-DOS interfaces (MS-DOS only)
  7651.  
  7652. rotor: encryption, by Lance Ellinghouse (dynamic only)
  7653.  
  7654.  
  7655. New standard modules
  7656. --------------------
  7657.  
  7658. Not all these modules are documented.  Read the source:
  7659. lib/<modulename>.py.  Sometimes a file lib/<modulename>.doc contains
  7660. additional documentation.
  7661.  
  7662. imghdr: recognizes image file headers
  7663.  
  7664. sndhdr: recognizes sound file headers
  7665.  
  7666. profile: print run-time statistics of Python code
  7667.  
  7668. readcd, cdplayer: companion modules for built-in module cd (sgi only)
  7669.  
  7670. emacs: interface to Emacs using py-connect.el (see below).
  7671.  
  7672. SOCKET: symbolic constant definitions for socket options
  7673.  
  7674. SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only)
  7675.  
  7676. SV: symbolic constat definitions for sv (sgi only)
  7677.  
  7678. CD: symbolic constat definitions for cd (sgi only)
  7679.  
  7680.  
  7681. New demos
  7682. ---------
  7683.  
  7684. scripts/pp.py: execute Python as a filter with a Perl-like command
  7685. line interface
  7686.  
  7687. classes/: examples using the new class features
  7688.  
  7689. threads/: examples using the new thread module
  7690.  
  7691. sgi/cd/: examples using the new cd module
  7692.  
  7693.  
  7694. Changes to the documentation
  7695. ----------------------------
  7696.  
  7697. The last-minute syntax changes of release 0.9.6 are now reflected
  7698. everywhere in the manuals
  7699.  
  7700. The reference manual has a new section (3.2) on implementing new kinds
  7701. of numbers, sequences or mappings with user classes
  7702.  
  7703. Classes are now treated extensively in the tutorial (chapter 9)
  7704.  
  7705. Slightly restructured the system-dependent chapters of the library
  7706. manual
  7707.  
  7708. The file misc/EXTENDING incorporates documentation for mkvalue() and
  7709. a new section on error handling
  7710.  
  7711. The files misc/CLASSES and misc/ERRORS are no longer necessary
  7712.  
  7713. The doc/Makefile now creates PostScript files automatically
  7714.  
  7715.  
  7716. Miscellaneous changes
  7717. ---------------------
  7718.  
  7719. Incorporated Tim Peters' changes to python-mode.el, it's now version
  7720. 1.06
  7721.  
  7722. A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python
  7723. program running in an Emacs buffer execute Emacs lisp code.  The
  7724. necessary Python code is in lib/emacs.py.  The Emacs code is
  7725. misc/py-connect.el (it needs some external Emacs lisp code)
  7726.  
  7727.  
  7728. Changes to the source code that affect C extension writers
  7729. ----------------------------------------------------------
  7730.  
  7731. New service function mkvalue() to construct a Python object from C
  7732. values according to a "format" string a la getargs()
  7733.  
  7734. Most functions from pythonmain.c moved to new pythonrun.c which is
  7735. in libpython.a.  This should make embedded versions of Python easier
  7736.  
  7737. ceval.h is split in eval.h (which needs compile.h and only declares
  7738. eval_code) and ceval.h (which doesn't need compile.hand declares the
  7739. rest)
  7740.  
  7741. ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to
  7742. improve the parallellism of multi-threaded programs by letting other
  7743. Python code run when a blocking system call or something similar is
  7744. made)
  7745.  
  7746. In structmember.[ch], new member types BYTE, CHAR and unsigned
  7747. variants have been added
  7748.  
  7749. New file xxmodule.c is a template for new extension modules.
  7750.  
  7751.  
  7752. ==================================
  7753. ==> Release 0.9.6 (6 Apr 1992) <==
  7754. ==================================
  7755.  
  7756. Misc news in 0.9.6:
  7757. - Restructured the misc subdirectory
  7758. - Reference manual completed, library manual much extended (with indexes!)
  7759. - the GNU Readline library is now distributed standard with Python
  7760. - the script "../demo/scripts/classfix.py" fixes Python modules using old
  7761.   class syntax
  7762. - Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!)
  7763. - Because of the GNU copyleft business I am not using the GNU regular
  7764.   expression implementation but a free re-implementation by Tatu Ylonen
  7765.   that recently appeared in comp.sources.misc (Bravo, Tatu!)
  7766.  
  7767. New features in 0.9.6:
  7768. - stricter try stmt syntax: cannot mix except and finally clauses on 1 try
  7769. - New module 'os' supplants modules 'mac' and 'posix' for most cases;
  7770.   module 'path' is replaced by 'os.path'
  7771. - os.path.split() return value differs from that of old path.split()
  7772. - sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception
  7773.   currently being handled
  7774. - sys.last_type, sys.last_value, sys.last_traceback remember last unhandled
  7775.   exception
  7776. - New function string.expandtabs() expands tabs in a string
  7777. - Added times() interface to posix (user & sys time of process & children)
  7778. - Added uname() interface to posix (returns OS type, hostname, etc.)
  7779. - New built-in function execfile() is like exec() but from a file
  7780. - Functions exec() and eval() are less picky about whitespace/newlines
  7781. - New built-in functions getattr() and setattr() access arbitrary attributes
  7782. - More generic argument handling in built-in functions (see "./EXTENDING")
  7783. - Dynamic loading of modules written in C or C++ (see "./DYNLOAD")
  7784. - Division and modulo for long and plain integers with negative operands
  7785.   have changed; a/b is now floor(float(a)/float(b)) and a%b is defined
  7786.   as a-(a/b)*b.  So now the outcome of divmod(a,b) is the same as
  7787.   (a/b, a%b) for integers.  For floats, % is also changed, but of course
  7788.   / is unchanged, and divmod(x,y) does not yield (x/y, x%y)...
  7789. - A function with explicit variable-length argument list can be declared
  7790.   like this: def f(*args): ...; or even like this: def f(a, b, *rest): ...
  7791. - Code tracing and profiling features have been added, and two source
  7792.   code debuggers are provided in the library (pdb.py, tty-oriented,
  7793.   and wdb, window-oriented); you can now step through Python programs!
  7794.   See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc"
  7795. - '==' is now the only equality operator; "../demo/scripts/eqfix.py" is
  7796.   a script that fixes old Python modules
  7797. - Plain integer right shift now uses sign extension
  7798. - Long integer shift/mask operations now simulate 2's complement
  7799.   to give more useful results for negative operands
  7800. - Changed/added range checks for long/plain integer shifts
  7801. - Options found after "-c command" are now passed to the command in sys.argv
  7802.   (note subtle incompatiblity with "python -c command -- -options"!)
  7803. - Module stdwin is better protected against touching objects after they've
  7804.   been closed; menus can now also be closed explicitly
  7805. - Stdwin now uses its own exception (stdwin.error)
  7806.  
  7807. New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992):
  7808. - dictionary objects can now be compared properly; e.g., {}=={} is true
  7809. - new exception SystemExit causes termination if not caught;
  7810.   it is raised by sys.exit() so that 'finally' clauses can clean up,
  7811.   and it may even be caught.  It does work interactively!
  7812. - new module "regex" implements GNU Emacs style regular expressions;
  7813.   module "regexp" is rewritten in Python for backward compatibility
  7814. - formal parameter lists may contain trailing commas
  7815.  
  7816. Bugs fixed in 0.9.6:
  7817. - assigning to or deleting a list item with a negative index dumped core
  7818. - divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L)
  7819.  
  7820. Bugs fixed in 0.9.5:
  7821. - masking operations involving negative long integers gave wrong results
  7822.  
  7823.  
  7824. ===================================
  7825. ==> Release 0.9.4 (24 Dec 1991) <==
  7826. ===================================
  7827.  
  7828. - new function argument handling (see below)
  7829. - built-in apply(func, args) means func(args[0], args[1], ...)
  7830. - new, more refined exceptions
  7831. - new exception string values (NameError = 'NameError' etc.)
  7832. - better checking for math exceptions
  7833. - for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i]
  7834. - fixed list assignment bug: "a[1:1] = a" now works correctly
  7835. - new class syntax, without extraneous parentheses
  7836. - new 'global' statement to assign global variables from within a function
  7837.  
  7838.  
  7839. New class syntax
  7840. ----------------
  7841.  
  7842. You can now declare a base class as follows:
  7843.  
  7844.     class B:            # Was: class B():
  7845.         def some_method(self): ...
  7846.         ...
  7847.  
  7848. and a derived class thusly:
  7849.  
  7850.     class D(B):            # Was: class D() = B():
  7851.         def another_method(self, arg): ...
  7852.  
  7853. Multiple inheritance looks like this:
  7854.  
  7855.     class M(B, D):            # Was: class M() = B(), D():
  7856.         def this_or_that_method(self, arg): ...
  7857.  
  7858. The old syntax is still accepted by Python 0.9.4, but will disappear
  7859. in Python 1.0 (to be posted to comp.sources).
  7860.  
  7861.  
  7862. New 'global' statement
  7863. ----------------------
  7864.  
  7865. Every now and then you have a global variable in a module that you
  7866. want to change from within a function in that module -- say, a count
  7867. of calls to a function, or an option flag, etc.  Until now this was
  7868. not directly possible.  While several kludges are known that
  7869. circumvent the problem, and often the need for a global variable can
  7870. be avoided by rewriting the module as a class, this does not always
  7871. lead to clearer code.
  7872.  
  7873. The 'global' statement solves this dilemma.  Its occurrence in a
  7874. function body means that, for the duration of that function, the
  7875. names listed there refer to global variables.  For instance:
  7876.  
  7877.     total = 0.0
  7878.     count = 0
  7879.  
  7880.     def add_to_total(amount):
  7881.         global total, count
  7882.         total = total + amount
  7883.         count = count + 1
  7884.  
  7885. 'global' must be repeated in each function where it is needed.  The
  7886. names listed in a 'global' statement must not be used in the function
  7887. before the statement is reached.
  7888.  
  7889. Remember that you don't need to use 'global' if you only want to *use*
  7890. a global variable in a function; nor do you need ot for assignments to
  7891. parts of global variables (e.g., list or dictionary items or
  7892. attributes of class instances).  This has not changed; in fact
  7893. assignment to part of a global variable was the standard workaround.
  7894.  
  7895.  
  7896. New exceptions
  7897. --------------
  7898.  
  7899. Several new exceptions have been defined, to distinguish more clearly
  7900. between different types of errors.
  7901.  
  7902. name            meaning                    was
  7903.  
  7904. AttributeError        reference to non-existing attribute    NameError
  7905. IOError            unexpected I/O error            RuntimeError
  7906. ImportError        import of non-existing module or name    NameError
  7907. IndexError        invalid string, tuple or list index    RuntimeError
  7908. KeyError        key not in dictionary            RuntimeError
  7909. OverflowError        numeric overflow            RuntimeError
  7910. SyntaxError        invalid syntax                RuntimeError
  7911. ValueError        invalid argument value            RuntimeError
  7912. ZeroDivisionError    division by zero            RuntimeError
  7913.  
  7914. The string value of each exception is now its name -- this makes it
  7915. easier to experimentally find out which operations raise which
  7916. exceptions; e.g.:
  7917.  
  7918.     >>> KeyboardInterrupt
  7919.     'KeyboardInterrupt'
  7920.     >>>
  7921.  
  7922.  
  7923. New argument passing semantics
  7924. ------------------------------
  7925.  
  7926. Off-line discussions with Steve Majewski and Daniel LaLiberte have
  7927. convinced me that Python's parameter mechanism could be changed in a
  7928. way that made both of them happy (I hope), kept me happy, fixed a
  7929. number of outstanding problems, and, given some backward compatibility
  7930. provisions, would only break a very small amount of existing code --
  7931. probably all mine anyway.  In fact I suspect that most Python users
  7932. will hardly notice the difference.  And yet it has cost me at least
  7933. one sleepless night to decide to make the change...
  7934.  
  7935. Philosophically, the change is quite radical (to me, anyway): a
  7936. function is no longer called with either zero or one argument, which
  7937. is a tuple if there appear to be more arguments.  Every function now
  7938. has an argument list containing 0, 1 or more arguments.  This list is
  7939. always implemented as a tuple, and it is a (run-time) error if a
  7940. function is called with a different number of arguments than expected.
  7941.  
  7942. What's the difference? you may ask.  The answer is, very little unless
  7943. you want to write variadic functions -- functions that may be called
  7944. with a variable number of arguments.  Formerly, you could write a
  7945. function that accepted one or more arguments with little trouble, but
  7946. writing a function that could be called with either 0 or 1 argument
  7947. (or more) was next to impossible.  This is now a piece of cake: you
  7948. can simply declare an argument that receives the entire argument
  7949. tuple, and check its length -- it will be of size 0 if there are no
  7950. arguments.
  7951.  
  7952. Another anomaly of the old system was the way multi-argument methods
  7953. (in classes) had to be declared, e.g.:
  7954.  
  7955.     class Point():
  7956.         def init(self, (x, y, color)): ...
  7957.         def setcolor(self, color): ...
  7958.         dev moveto(self, (x, y)): ...
  7959.         def draw(self): ...
  7960.  
  7961. Using the new scheme there is no need to enclose the method arguments
  7962. in an extra set of parentheses, so the above class could become:
  7963.  
  7964.     class Point:
  7965.         def init(self, x, y, color): ...
  7966.         def setcolor(self, color): ...
  7967.         dev moveto(self, x, y): ...
  7968.         def draw(self): ...
  7969.  
  7970. That is, the equivalence rule between methods and functions has
  7971. changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y)
  7972. while formerly it was equivalent to Point.moveto(p,(x,y)).
  7973.  
  7974. A special backward compatibility rule makes that the old version also
  7975. still works: whenever a function with exactly two arguments (at the top
  7976. level) is called with more than two arguments, the second and further
  7977. arguments are packed into a tuple and passed as the second argument.
  7978. This rule is invoked independently of whether the function is actually a
  7979. method, so there is a slight chance that some erroneous calls of
  7980. functions expecting two arguments with more than that number of
  7981. arguments go undetected at first -- when the function tries to use the
  7982. second argument it may find it is a tuple instead of what was expected.
  7983. Note that this rule will be removed from future versions of the
  7984. language; it is a backward compatibility provision *only*.
  7985.  
  7986. Two other rules and a new built-in function handle conversion between
  7987. tuples and argument lists:
  7988.  
  7989. Rule (a): when a function with more than one argument is called with a
  7990. single argument that is a tuple of the right size, the tuple's items
  7991. are used as arguments.
  7992.  
  7993. Rule (b): when a function with exactly one argument receives no
  7994. arguments or more than one, that one argument will receive a tuple
  7995. containing the arguments (the tuple will be empty if there were no
  7996. arguments).
  7997.  
  7998.  
  7999. A new built-in function, apply(), was added to support functions that
  8000. need to call other functions with a constructed argument list.  The call
  8001.  
  8002.     apply(function, tuple)
  8003.  
  8004. is equivalent to
  8005.  
  8006.     function(tuple[0], tuple[1], ..., tuple[len(tuple)-1])
  8007.  
  8008.  
  8009. While no new argument syntax was added in this phase, it would now be
  8010. quite sensible to add explicit syntax to Python for default argument
  8011. values (as in C++ or Modula-3), or a "rest" argument to receive the
  8012. remaining arguments of a variable-length argument list.
  8013.  
  8014.  
  8015. ========================================================
  8016. ==> Release 0.9.3 (never made available outside CWI) <==
  8017. ========================================================
  8018.  
  8019. - string sys.version shows current version (also printed on interactive entry)
  8020. - more detailed exceptions, e.g., IOError, ZeroDivisionError, etc.
  8021. - 'global' statement to declare module-global variables assigned in functions.
  8022. - new class declaration syntax: class C(Base1, Base2, ...): suite
  8023.   (the old syntax is still accepted -- be sure to convert your classes now!)
  8024. - C shifting and masking operators: << >> ~ & ^ | (for ints and longs).
  8025. - C comparison operators: == != (the old = and <> remain valid).
  8026. - floating point numbers may now start with a period (e.g., .14).
  8027. - definition of integer division tightened (always truncates towards zero).
  8028. - new builtins hex(x), oct(x) return hex/octal string from (long) integer.
  8029. - new list method l.count(x) returns the number of occurrences of x in l.
  8030. - new SGI module: al (Indigo and 4D/35 audio library).
  8031. - the FORMS interface (modules fl and FL) now uses FORMS 2.0
  8032. - module gl: added lrect{read,write}, rectzoom and pixmode;
  8033.   added (non-GL) functions (un)packrect.
  8034. - new socket method: s.allowbroadcast(flag).
  8035. - many objects support __dict__, __methods__ or __members__.
  8036. - dir() lists anything that has __dict__.
  8037. - class attributes are no longer read-only.
  8038. - classes support __bases__, instances support __class__ (and __dict__).
  8039. - divmod() now also works for floats.
  8040. - fixed obscure bug in eval('1            ').
  8041.  
  8042.  
  8043. ===================================
  8044. ==> Release 0.9.2 (Autumn 1991) <==
  8045. ===================================
  8046.  
  8047. Highlights
  8048. ----------
  8049.  
  8050. - tutorial now (almost) complete; library reference reorganized
  8051. - new syntax: continue statement; semicolons; dictionary constructors;
  8052.   restrictions on blank lines in source files removed
  8053. - dramatically improved module load time through precompiled modules
  8054. - arbitrary precision integers: compute 2 to the power 1000 and more...
  8055. - arithmetic operators now accept mixed type operands, e.g., 3.14/4
  8056. - more operations on list: remove, index, reverse; repetition
  8057. - improved/new file operations: readlines, seek, tell, flush, ...
  8058. - process management added to the posix module: fork/exec/wait/kill etc.
  8059. - BSD socket operations (with example servers and clients!)
  8060. - many new STDWIN features (color, fonts, polygons, ...)
  8061. - new SGI modules: font manager and FORMS library interface
  8062.  
  8063.  
  8064. Extended list of changes in 0.9.2
  8065. ---------------------------------
  8066.  
  8067. Here is a summary of the most important user-visible changes in 0.9.2,
  8068. in somewhat arbitrary order.  Changes in later versions are listed in
  8069. the "highlights" section above.
  8070.  
  8071.  
  8072. 1. Changes to the interpreter proper
  8073.  
  8074. - Simple statements can now be separated by semicolons.
  8075.   If you write "if t: s1; s2", both s1 and s2 are executed
  8076.   conditionally.
  8077. - The 'continue' statement was added, with semantics as in C.
  8078. - Dictionary displays are now allowed on input: {key: value, ...}.
  8079. - Blank lines and lines bearing only a comment no longer need to
  8080.   be indented properly.  (A completely empty line still ends a multi-
  8081.   line statement interactively.)
  8082. - Mixed arithmetic is supported, 1 compares equal to 1.0, etc.
  8083. - Option "-c command" to execute statements from the command line
  8084. - Compiled versions of modules are cached in ".pyc" files, giving a
  8085.   dramatic improvement of start-up time
  8086. - Other, smaller speed improvements, e.g., extracting characters from
  8087.   strings, looking up single-character keys, and looking up global
  8088.   variables
  8089. - Interrupting a print operation raises KeyboardInterrupt instead of
  8090.   only cancelling the print operation
  8091. - Fixed various portability problems (it now passes gcc with only
  8092.   warnings -- more Standard C compatibility will be provided in later
  8093.   versions)
  8094. - Source is prepared for porting to MS-DOS
  8095. - Numeric constants are now checked for overflow (this requires
  8096.   standard-conforming strtol() and strtod() functions; a correct
  8097.   strtol() implementation is provided, but the strtod() provided
  8098.   relies on atof() for everything, including error checking
  8099.  
  8100.  
  8101. 2. Changes to the built-in types, functions and modules
  8102.  
  8103. - New module socket: interface to BSD socket primitives
  8104. - New modules pwd and grp: access the UNIX password and group databases
  8105. - (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager
  8106. - (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library
  8107. - New numeric type: long integer, for unlimited precision
  8108.     - integer constants suffixed with 'L' or 'l' are long integers
  8109.     - new built-in function long(x) converts int or float to long
  8110.     - int() and float() now also convert from long integers
  8111. - New built-in function:
  8112.     - pow(x, y) returns x to the power y
  8113. - New operation and methods for lists:
  8114.     - l*n returns a new list consisting of n concatenated copies of l
  8115.     - l.remove(x) removes the first occurrence of the value x from l
  8116.     - l.index(x) returns the index of the first occurrence of x in l
  8117.     - l.reverse() reverses l in place
  8118. - New operation for tuples:
  8119.     - t*n returns a tuple consisting of n concatenated copies of t
  8120. - Improved file handling:
  8121.     - f.readline() no longer restricts the line length, is faster,
  8122.       and isn't confused by null bytes; same for raw_input()
  8123.     - f.read() without arguments reads the entire (rest of the) file
  8124.     - mixing of print and sys.stdout.write() has different effect
  8125. - New methods for files:
  8126.     - f.readlines() returns a list containing the lines of the file,
  8127.       as read with f.readline()
  8128.     - f.flush(), f.tell(), f.seek() call their stdio counterparts
  8129.     - f.isatty() tests for "tty-ness"
  8130. - New posix functions:
  8131.     - _exit(), exec(), fork(), getpid(), getppid(), kill(), wait()
  8132.     - popen() returns a file object connected to a pipe
  8133.     - utime() replaces utimes() (the latter is not a POSIX name)
  8134. - New stdwin features, including:
  8135.     - font handling
  8136.     - color drawing
  8137.     - scroll bars made optional
  8138.     - polygons
  8139.     - filled and xor shapes
  8140.     - text editing objects now have a 'settext' method
  8141.  
  8142.  
  8143. 3. Changes to the standard library
  8144.  
  8145. - Name change: the functions path.cat and macpath.cat are now called
  8146.   path.join and macpath.join
  8147. - Added new modules: formatter, mutex, persist, sched, mainloop
  8148. - Added some modules and functionality to the "widget set" (which is
  8149.   still under development, so please bear with me):
  8150.     DirList, FormSplit, TextEdit, WindowSched
  8151. - Fixed module testall to work non-interactively
  8152. - Module string:
  8153.     - added functions join() and joinfields()
  8154.     - fixed center() to work correct and make it "transitive"
  8155. - Obsolete modules were removed: util, minmax
  8156. - Some modules were moved to the demo directory
  8157.  
  8158.  
  8159. 4. Changes to the demonstration programs
  8160.  
  8161. - Added new useful scipts: byteyears, eptags, fact, from, lfact,
  8162.   objgraph, pdeps, pi, primes, ptags, which
  8163. - Added a bunch of socket demos
  8164. - Doubled the speed of ptags
  8165. - Added new stdwin demos: microedit, miniedit
  8166. - Added a windowing interface to the Python interpreter: python (most
  8167.   useful on the Mac)
  8168. - Added a browser for Emacs info files: demo/stdwin/ibrowse
  8169.   (yes, I plan to put all STDWIN and Python documentation in texinfo
  8170.   form in the future)
  8171.  
  8172.  
  8173. 5. Other changes to the distribution
  8174.  
  8175. - An Emacs Lisp file "python.el" is provided to facilitate editing
  8176.   Python programs in GNU Emacs (slightly improved since posted to
  8177.   gnu.emacs.sources)
  8178. - Some info on writing an extension in C is provided
  8179. - Some info on building Python on non-UNIX platforms is provided
  8180.  
  8181.  
  8182. =====================================
  8183. ==> Release 0.9.1 (February 1991) <==
  8184. =====================================
  8185.  
  8186. - Micro changes only
  8187. - Added file "patchlevel.h"
  8188.  
  8189.  
  8190. =====================================
  8191. ==> Release 0.9.0 (February 1991) <==
  8192. =====================================
  8193.  
  8194. Original posting to alt.sources.
  8195.