Jeremy Hylton [Fri, 19 Apr 2002 22:56:37 +0000 (22:56 +0000)]
Fix com_arglist() and update grammar fragment.
SF bug #522264 reported by Evelyn Mitchell.
The code included a comment about "STAR STAR" which was translated
into the code as the bogus attribute token.STARSTAR. This name never
caused an attribute error because it was never retrieved. The code
was based on an old version of the grammar that specified kwargs as
two tokens ('*' '*'). I checked as far back as 2.1 and didn't find
this production.
The fix is simple, because token.DOUBLESTAR is the only token
allowed. Also update the grammar fragment in com_arglist().
XXX I'll bet lots of other grammar fragments in comments are out of
date, probably in this module and in compile.c.
Tim Peters [Fri, 19 Apr 2002 18:41:46 +0000 (18:41 +0000)]
Added a stop-list to reduce the size of the full text search index. Fred,
populate the "stop_list" triple-quoted string with your favorite handful
of stop words.
Tim Peters [Fri, 19 Apr 2002 16:46:43 +0000 (16:46 +0000)]
+ Changed TOC to folder-tree style.
+ Increased size of the window the user sees the first time.
+ Arranged for the display to remember its last size and position.
+ Added a Favorites (bookmarks) tab.
+ Added the "Advanced Search" decorations.
Tim Peters [Fri, 19 Apr 2002 16:09:26 +0000 (16:09 +0000)]
Generates inputs to the Microsoft Help Compiler, which creates compiled
HTML help files (.chm). Obtained from Robin Dunn's packaging of the
2.2 docs at <http://alldunn.com/python/>, obtained in turn from
Hernán Martínez Foffani's original work at
<http://www.orgmf.com.ar/condor/pytstuff.html>.
Jack Jansen [Fri, 19 Apr 2002 14:29:47 +0000 (14:29 +0000)]
Oops: we used PyMem_DEL() to clean up objects, and that's a problem since
pymalloc, apparently. Fixed, but this means all bgen-generated modules will
have to be re-generated.
I hope (and expect) that the pymalloc fixes aren't bugfix candidates, because
if they are this is one too.
Fred Drake [Fri, 19 Apr 2002 04:04:57 +0000 (04:04 +0000)]
Clean up the use of version numbers in filenames; always use an "abstract"
version number, and explain what it is at the top of the chapter.
This closes SF bug #225003.
Tim Peters [Thu, 18 Apr 2002 22:25:03 +0000 (22:25 +0000)]
_PyObject_DebugMallocStats(): Added some potentially expensive internal
consistency checks, enabled only in a debug (Py_DEBUG) build. Note that
this never gets called automatically unless PYMALLOC_DEBUG is #define'd
too, and the envar PYTHONMALLOCSTATS exists.
Tim Peters [Thu, 18 Apr 2002 04:30:18 +0000 (04:30 +0000)]
SF bug 544733: Cygwin test_mmap fix for Python 2.2.1
Close a file before trying to unlink it, and apparently Cygwin needs
writes to an mmap'ed file to get flushed before they're visible.
Bugfix candidate, but I think only for the 2.2 line (it's testing
features that I think were new in 2.2).
Change type_get_doc (the get function for __doc__) to look in tp_dict
more often, and if it finds a descriptor in tp_dict, to call it (with
a NULL instance). This means you can add a __doc__ descriptor to a
new-style class that returns instance docs when called on an instance,
and class docs when called on a class -- or the same docs in either
case, but lazily computed.
I'll also check this into the 2.2 maintenance branch.
Change type_get_doc (the get function for __doc__) to look in tp_dict
more often, and if it finds a descriptor in tp_dict, to call it (with
a NULL instance). This means you can add a __doc__ descriptor to a
new-style class that returns instance docs when called on an instance,
and class docs when called on a class -- or the same docs in either
case, but lazily computed.
I'll also check this into the 2.2 maintenance branch.
Patch #531901 by Mark W. Alexander: adds a new distutils packager
base class (in bdist_packager) and two subclasses which make use
of this base class: bdist_pkgtool (for Solaris) and bdist_sdux (for
HP-UX).
Fred Drake [Wed, 17 Apr 2002 01:40:56 +0000 (01:40 +0000)]
Changed last remaining use of "./" to "index.html" when referring to the
index file for the top-level directory. This makes it easier to use an
unpacked version of the documentation via file: URLs.
This closes SF bug #541257.
Tim Peters [Tue, 16 Apr 2002 20:48:01 +0000 (20:48 +0000)]
Windows installer: disabled Wise's "delete in-use files" uninstall
option. It was the cause of at least one way UNWISE.EXE could vanish
(install a python; uninstall it; install it again; reboot the machine;
abracadabra the uinstaller is gone).
Fred Drake [Tue, 16 Apr 2002 19:27:23 +0000 (19:27 +0000)]
Added docstrings to the Profile class.
Avoid adding Python wrappers around the underlying C profiler if possible;
the extra layer of calls can lead to confusion in interpreting the logs.
PyNumber_InPlaceMultiply insisted on calling sq_inplace_repeat if it
existed, even if nb_inplace_multiply also existed and the arguments
weren't right for sq_inplace_repeat. Change this to only use
sq_inplace_repeat if nb_inplace_multiply isn't defined.
Thomas Heller [Tue, 16 Apr 2002 15:04:56 +0000 (15:04 +0000)]
Replace the simpleminded string.find with a re.search looking only for
full words. Before that, something like 'PyObject_Call' was missed
because 'PyObject_CallFunction' was found.
Tim Peters [Tue, 16 Apr 2002 02:08:51 +0000 (02:08 +0000)]
Apparently 3 of the tests here rely on trailing whitespace and/or hard
tab characters, so reverting the whitespace normalization. Barry,
please repair this.
Tim Peters [Tue, 16 Apr 2002 01:33:59 +0000 (01:33 +0000)]
resetwarnings(): change the docstring to reflect what the code
actually does. Note that the description in the Library Reference
manual is already accurate.
Tim Peters [Mon, 15 Apr 2002 23:56:04 +0000 (23:56 +0000)]
I expect test_univnewlines to be skipped on Windows. I expect this
because it *is* skipped. I'm not entirely sure it should be skipped, but
figuring that out would take actual thought <wink>.
Barry Warsaw [Mon, 15 Apr 2002 22:14:06 +0000 (22:14 +0000)]
test_main(): Added this so the test can actually get run under the
regrtest framework. Keep the original standalone-unittest
scaffolding (i.e. suite() and __main__).
Barry Warsaw [Mon, 15 Apr 2002 22:00:25 +0000 (22:00 +0000)]
parseaddr(): Don't use rfc822.parseaddr() because this now implies a
double call to AddressList.getaddrlist(), and /that/ always returns an
empty list for the second and subsequent calls.
Instead, instantiate an AddressList directly, and get the parsed
addresses out of the addresslist attribute.
Fred Drake [Mon, 15 Apr 2002 20:51:19 +0000 (20:51 +0000)]
Add documentation for PyObject_Call().
Note that PyObject_Size() is a synonym for PyObject_Length().
This closes SF patch #544330 (contributed by Thomas Heller).
Fred Drake [Mon, 15 Apr 2002 20:48:40 +0000 (20:48 +0000)]
Separate out a \cfuncline macro from the cfuncdesc environment.
This matches many other of the *desc environments, and is useful when
multiple functions share a description.
Barry Warsaw [Mon, 15 Apr 2002 20:03:30 +0000 (20:03 +0000)]
ehlo(): A proper fix for SF bug #498572. RFC 1869 describes ESMTP
which requires that if there are ehlo parameters returned with an ehlo
keyword (in the response to EHLO), the keyword and parameters must be
delimited by an ASCII space. Thus responses like
250-AUTH=LOGIN
should be ignored as non-conformant to the RFC (the `=' isn't allowed
in the ehlo keyword).
Fred Drake [Mon, 15 Apr 2002 19:40:07 +0000 (19:40 +0000)]
posix_fildes(): New helper: run a function that takes a file descriptor
and returns None. This allows any object that supports the fileno()
method to be passed as a file descriptor, not just an integer.
posix_fchdir(): New exposed function: implements posix.fchdir(). This
closes SF feature #536796.
posix_fsync(), posix_fdatasync(): Convert to use posix_fildes() instead
of posix_int(). This also changes them from METH_VARARGS to METH_O
functions.
setup_confname_table(): Remove unused variable. Change to take a module
rather than a dict to save the resulting table into.
setup_confname_tables(): Change to take a module instead of a dict to
pass to setup_confname_table().
Fred Drake [Mon, 15 Apr 2002 18:41:31 +0000 (18:41 +0000)]
Clean up the application of style to verbatim text.
This moves styling to the stylesheet; the use of <dl> structures to control
style sometimes produced improper indentation of subsequent text in many
browsers when the text was already part of the <dl> structure (as in a
function or class description).
Walter Dörwald [Mon, 15 Apr 2002 13:36:47 +0000 (13:36 +0000)]
Apply the second version of SF patch http://www.python.org/sf/536241
Add a method zfill to str, unicode and UserString and change
Lib/string.py accordingly.
This activates the zfill version in unicodeobject.c that was
commented out and implements the same in stringobject.c. It also
adds the test for unicode support in Lib/string.py back in and
uses repr() instead() of str() (as it was before Lib/string.py 1.62)
Complex numbers implement divmod() and //, neither of which makes one
lick of sense. Unfortunately this is documented, so I'm adding a
deprecation warning now, so we can delete this silliness, oh, around
2005 or so.