python/dscho.git
20 years agoThis commit was manufactured by cvs2svn to create tag 'v0_08'.svn/tags/v0_08v0_08
(no author) [Tue, 30 Oct 2001 22:18:21 +0000 (30 22:18 +0000)]
This commit was manufactured by cvs2svn to create tag 'v0_08'.

git-svn-id: http://svn.python.org/projects/python/tags/v0_08@24051 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix grammar error
akuchling [Tue, 30 Oct 2001 22:18:21 +0000 (30 22:18 +0000)]
Fix grammar error

git-svn-id: http://svn.python.org/projects/python/trunk@24050 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRewrites and additions resulting from today's feedback
akuchling [Tue, 30 Oct 2001 21:36:04 +0000 (30 21:36 +0000)]
Rewrites and additions resulting from today's feedback

git-svn-id: http://svn.python.org/projects/python/trunk@24049 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoSF bug #474077 2.2b1: Error compiling extns with BCC
tim_one [Tue, 30 Oct 2001 21:09:55 +0000 (30 21:09 +0000)]
SF bug #474077 2.2b1: Error compiling extns with BCC
Removed "#undef HAVE_HYPOT" line from Borland config, as suggested.
Whether this will break some other Borland usage is a good question I
can't answer.

git-svn-id: http://svn.python.org/projects/python/trunk@24048 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAlways use --dvips-safe when generating HTML for the standard documentation
fdrake [Tue, 30 Oct 2001 16:28:46 +0000 (30 16:28 +0000)]
Always use --dvips-safe when generating HTML for the standard documentation
since we do not have anything that causes dvips to be run except when
PostScript is specifically requested, which is a separate target.

git-svn-id: http://svn.python.org/projects/python/trunk@24047 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd a new option, --dvips-safe, which sets the $DVIPS_SAFE option in
fdrake [Tue, 30 Oct 2001 16:09:51 +0000 (30 16:09 +0000)]
Add a new option, --dvips-safe, which sets the $DVIPS_SAFE option in
LaTeX2HTML.  This is not safe to do in general (for the reasons LaTeX2HTML
protects against dvips to begin with), but is safe if we do not actually
need to run dvips.  Note that we also assume it is safe if the user
specifically requests PostScript generation.  See the comments for further
explanation.

git-svn-id: http://svn.python.org/projects/python/trunk@24046 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoVarious minor rewrites
akuchling [Tue, 30 Oct 2001 14:35:03 +0000 (30 14:35 +0000)]
Various minor rewrites
Bump version number

git-svn-id: http://svn.python.org/projects/python/trunk@24045 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoCorrections noted by Michael McLay
akuchling [Tue, 30 Oct 2001 14:22:11 +0000 (30 14:22 +0000)]
Corrections noted by Michael McLay

git-svn-id: http://svn.python.org/projects/python/trunk@24044 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years ago/F observes that we need an else: in connect()
jhylton [Tue, 30 Oct 2001 14:16:17 +0000 (30 14:16 +0000)]
/F observes that we need an else: in connect()

git-svn-id: http://svn.python.org/projects/python/trunk@24043 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoDon't override asplit_pat in Scanner_UH3. No reason to do so, and it broke
jackjansen [Tue, 30 Oct 2001 13:11:24 +0000 (30 13:11 +0000)]
Don't override asplit_pat in Scanner_UH3. No reason to do so, and it broke
generating Waste.

git-svn-id: http://svn.python.org/projects/python/trunk@24042 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoOn the macintosh don't take a quick exit in find_module() for frozen submodule import...
jackjansen [Tue, 30 Oct 2001 13:08:39 +0000 (30 13:08 +0000)]
On the macintosh don't take a quick exit in find_module() for frozen submodule imports: the frozen import goes through a different mechanism.

git-svn-id: http://svn.python.org/projects/python/trunk@24041 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPromote file objects out of the "Other Objects" category, so they become
fdrake [Tue, 30 Oct 2001 06:23:14 +0000 (30 06:23 +0000)]
Promote file objects out of the "Other Objects" category, so they become
visible in the table of contents.

git-svn-id: http://svn.python.org/projects/python/trunk@24040 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPromote built-in functions to come before built-in types.
fdrake [Tue, 30 Oct 2001 06:22:02 +0000 (30 06:22 +0000)]
Promote built-in functions to come before built-in types.

git-svn-id: http://svn.python.org/projects/python/trunk@24039 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoWhitespace normalization.
tim_one [Tue, 30 Oct 2001 05:56:40 +0000 (30 05:56 +0000)]
Whitespace normalization.

git-svn-id: http://svn.python.org/projects/python/trunk@24038 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMention the new file() builtin in the section on file objects.
tim_one [Tue, 30 Oct 2001 05:54:04 +0000 (30 05:54 +0000)]
Mention the new file() builtin in the section on file objects.

git-svn-id: http://svn.python.org/projects/python/trunk@24037 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoTo cover a recent checkin, added a test to ensure dir(None) == dir(Ellipsis).
tim_one [Tue, 30 Oct 2001 05:45:26 +0000 (30 05:45 +0000)]
To cover a recent checkin, added a test to ensure dir(None) == dir(Ellipsis).

git-svn-id: http://svn.python.org/projects/python/trunk@24036 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoJust changed some continued-line indentation to read better, due to
tim_one [Tue, 30 Oct 2001 05:41:07 +0000 (30 05:41 +0000)]
Just changed some continued-line indentation to read better, due to
the earlier s/dictionary/dict/ change.

git-svn-id: http://svn.python.org/projects/python/trunk@24035 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix SF bug #456386: test_commands regression failure (Andrew Dalke)
gvanrossum [Tue, 30 Oct 2001 03:17:30 +0000 (30 03:17 +0000)]
Fix SF bug #456386: test_commands regression failure (Andrew Dalke)

    test_commands does not work on IRIX

    It assumes the output of "ls /bin/ls" is a line
    that starts with a '-'. On IRIX that file is
    a symbolic link, so the first character is an l.
    This causes test_getstatus to fail.

git-svn-id: http://svn.python.org/projects/python/trunk@24034 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoNews and attribution for SF bug #473009.
gvanrossum [Tue, 30 Oct 2001 03:03:03 +0000 (30 03:03 +0000)]
News and attribution for SF bug #473009.

git-svn-id: http://svn.python.org/projects/python/trunk@24033 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoChange the limit on the input size for b2a_base64 to what will fit in
gvanrossum [Tue, 30 Oct 2001 03:00:52 +0000 (30 03:00 +0000)]
Change the limit on the input size for b2a_base64 to what will fit in
memory, rather than the standard's 57.

This fixes SF bug #473009.

git-svn-id: http://svn.python.org/projects/python/trunk@24032 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd values to tp_getattro and tp_flags so that dir(Ellipsis) will
gvanrossum [Tue, 30 Oct 2001 02:40:52 +0000 (30 02:40 +0000)]
Add values to tp_getattro and tp_flags so that dir(Ellipsis) will
return the same as dir(None).

git-svn-id: http://svn.python.org/projects/python/trunk@24031 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMinimal test for __del__ hook.
gvanrossum [Tue, 30 Oct 2001 02:33:02 +0000 (30 02:33 +0000)]
Minimal test for __del__ hook.

git-svn-id: http://svn.python.org/projects/python/trunk@24030 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPySocketSock_connect_ex(): On Windows, return the correct Windows exit
tim_one [Tue, 30 Oct 2001 01:26:49 +0000 (30 01:26 +0000)]
PySocketSock_connect_ex():  On Windows, return the correct Windows exit
code.  The patch is from Jeremy, and allows test_asynchat to run again.
Bugfix candidate.

git-svn-id: http://svn.python.org/projects/python/trunk@24029 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agodirectory chooser (requires a recent version of Tk)
effbot [Mon, 29 Oct 2001 22:58:55 +0000 (29 22:58 +0000)]
directory chooser (requires a recent version of Tk)

git-svn-id: http://svn.python.org/projects/python/trunk@24028 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRename "dictionary" (type and constructor) to "dict".
tim_one [Mon, 29 Oct 2001 22:25:45 +0000 (29 22:25 +0000)]
Rename "dictionary" (type and constructor) to "dict".

git-svn-id: http://svn.python.org/projects/python/trunk@24027 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd __del__ callbacks. They are too useful to leave out.
gvanrossum [Mon, 29 Oct 2001 22:11:00 +0000 (29 22:11 +0000)]
Add __del__ callbacks.  They are too useful to leave out.

XXX Remaining problems:

- The GC module doesn't know about these; I think it has its reasons
  to disallow calling __del__, but for now, __del__ on new-style
  objects is called when the GC module discards an object, for better
  or for worse.

- The code to call a __del__ handler is really ridiculously
  complicated, due to all the different debug #ifdefs.  I've copied
  this from the similar code in classobject.c, so I'm pretty sure I
  did it right, but it's not pretty. :-(

- No tests yet.

git-svn-id: http://svn.python.org/projects/python/trunk@24026 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoSF bug #476138: tempfile behavior across platforms
tim_one [Mon, 29 Oct 2001 21:46:08 +0000 (29 21:46 +0000)]
SF bug #476138:  tempfile behavior across platforms
Ensure that a tempfile can be closed any number of times without error.
This wasn't true on Windows.

git-svn-id: http://svn.python.org/projects/python/trunk@24025 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRevise the PDF support in the LaTeX style sheet. This still isn't quite
fdrake [Mon, 29 Oct 2001 21:02:28 +0000 (29 21:02 +0000)]
Revise the PDF support in the LaTeX style sheet.  This still isn't quite
right, but the tests for whether we are generating PDF are a bit more
readable, and some unnecessary indirection has been removed.

git-svn-id: http://svn.python.org/projects/python/trunk@24024 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoUpdate to reflect changes to the low-level logreader: share the info
fdrake [Mon, 29 Oct 2001 20:57:23 +0000 (29 20:57 +0000)]
Update to reflect changes to the low-level logreader:  share the info
dictionary instead of building a new one, and provide an overridable method
to allow subclasses to catch ADD_INFO records that are not part of the
initial block of ADD_INFO records created by the profiler itself.

git-svn-id: http://svn.python.org/projects/python/trunk@24023 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd a test for the insertion of user-provided ADD_INFO records.
fdrake [Mon, 29 Oct 2001 20:54:01 +0000 (29 20:54 +0000)]
Add a test for the insertion of user-provided ADD_INFO records.

git-svn-id: http://svn.python.org/projects/python/trunk@24022 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAllow user code to call the addinfo() method on the profiler object.
fdrake [Mon, 29 Oct 2001 20:48:09 +0000 (29 20:48 +0000)]
Allow user code to call the addinfo() method on the profiler object.

git-svn-id: http://svn.python.org/projects/python/trunk@24021 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMake the low-level log-reader object export a dictionary mapping keys
fdrake [Mon, 29 Oct 2001 20:45:57 +0000 (29 20:45 +0000)]
Make the low-level log-reader object export a dictionary mapping keys
to lists of values, giving the contents of all the ADD_INFO records
seen so far.  This is initialized agressively when the log file is
opened, so that whoever is looking at the log reader can always see
the initial data loaded into the data stream.  ADD_INFO events later
in the log file continue to be reported to the application layer as
before.

Add a new method, addinfo(), to the profiler.  This can be used to
insert additional ADD_INFO records into the profiler log.

Fix the tp_flags and tp_name slots on the type objects.

git-svn-id: http://svn.python.org/projects/python/trunk@24020 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agodictionary -> dict
akuchling [Mon, 29 Oct 2001 20:37:47 +0000 (29 20:37 +0000)]
dictionary -> dict

git-svn-id: http://svn.python.org/projects/python/trunk@24018 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix two typos noted by Jens Quade
akuchling [Mon, 29 Oct 2001 18:09:42 +0000 (29 18:09 +0000)]
Fix two typos noted by Jens Quade
Bump version number

git-svn-id: http://svn.python.org/projects/python/trunk@24017 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd additional information on exceptions from time.mktime() and related to
fdrake [Mon, 29 Oct 2001 18:01:24 +0000 (29 18:01 +0000)]
Add additional information on exceptions from time.mktime() and related to
improper time tuples passed to various functions.  Based on comments from
Andreas Jung.

git-svn-id: http://svn.python.org/projects/python/trunk@24016 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMore refcount information.
fdrake [Mon, 29 Oct 2001 17:43:14 +0000 (29 17:43 +0000)]
More refcount information.

git-svn-id: http://svn.python.org/projects/python/trunk@24015 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoIgnore all *.tex files in the typesetting output directories since there are
fdrake [Mon, 29 Oct 2001 17:42:17 +0000 (29 17:42 +0000)]
Ignore all *.tex files in the typesetting output directories since there are
a bunch of them now.

git-svn-id: http://svn.python.org/projects/python/trunk@24014 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMake sure we generate versions of each file in the Python/C API manual with
fdrake [Mon, 29 Oct 2001 17:40:40 +0000 (29 17:40 +0000)]
Make sure we generate versions of each file in the Python/C API manual with
reference-count annotations; this is needed for the typeset forms of the
manuals.

git-svn-id: http://svn.python.org/projects/python/trunk@24013 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoUse connect_ex() instead of connect().
jhylton [Mon, 29 Oct 2001 16:44:37 +0000 (29 16:44 +0000)]
Use connect_ex() instead of connect().

Removes old XXX comment and possible source of long-delays.

git-svn-id: http://svn.python.org/projects/python/trunk@24012 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix for SF bug 453099 -- select not defensive
jhylton [Mon, 29 Oct 2001 16:32:19 +0000 (29 16:32 +0000)]
Fix for SF bug 453099 -- select not defensive
And SF patch 473223 -- infinite getattr loop

Wrap select() and poll() calls with try/except for EINTR.  If EINTR is
raised, treat as a response where no fd is ready.

In dispatcher constructor, make sure self.socket is always
initialized.

git-svn-id: http://svn.python.org/projects/python/trunk@24011 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix some markup errors noted by MH
akuchling [Mon, 29 Oct 2001 15:47:33 +0000 (29 15:47 +0000)]
Fix some markup errors noted by MH
Use attribute assignment to illustrate __slots__ raising an error

git-svn-id: http://svn.python.org/projects/python/trunk@24010 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoWhen overriding __str__ or __repr__, set the tp_print slot to NULL.
gvanrossum [Mon, 29 Oct 2001 14:33:44 +0000 (29 14:33 +0000)]
When overriding __str__ or __repr__, set the tp_print slot to NULL.

git-svn-id: http://svn.python.org/projects/python/trunk@24009 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agomore loading from cfg files
elguavas [Mon, 29 Oct 2001 11:19:46 +0000 (29 11:19 +0000)]
more loading from cfg files

git-svn-id: http://svn.python.org/projects/python/trunk@24008 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agomore of config dialog reading from files
elguavas [Mon, 29 Oct 2001 08:05:34 +0000 (29 08:05 +0000)]
more of config dialog reading from files

git-svn-id: http://svn.python.org/projects/python/trunk@24007 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoUse sendall() in the stream test instead of send().
gvanrossum [Mon, 29 Oct 2001 07:18:02 +0000 (29 07:18 +0000)]
Use sendall() in the stream test instead of send().

git-svn-id: http://svn.python.org/projects/python/trunk@24006 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoTest sendall().
gvanrossum [Mon, 29 Oct 2001 07:14:10 +0000 (29 07:14 +0000)]
Test sendall().

git-svn-id: http://svn.python.org/projects/python/trunk@24005 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd 'sendall' to list of socket methods.
gvanrossum [Mon, 29 Oct 2001 07:13:53 +0000 (29 07:13 +0000)]
Add 'sendall' to list of socket methods.

git-svn-id: http://svn.python.org/projects/python/trunk@24004 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoadded finditer sanity check
effbot [Sun, 28 Oct 2001 20:15:40 +0000 (28 20:15 +0000)]
added finditer sanity check

git-svn-id: http://svn.python.org/projects/python/trunk@24003 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoOops. In the tp_name field, the name should be "_socket.socket", not
gvanrossum [Sun, 28 Oct 2001 12:31:33 +0000 (28 12:31 +0000)]
Oops.  In the tp_name field, the name should be "_socket.socket", not
"socket.socket" -- on Windows, "socket.socket" is the wrapper class.
Also added the module name to the SSL type (which is not a new-style
class -- I don't want to mess with it yet).

git-svn-id: http://svn.python.org/projects/python/trunk@24002 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPyObject_CallFunctionObArgs() ---> PyObject_CallFunctionObjArgs()
fdrake [Sun, 28 Oct 2001 02:39:03 +0000 (28 02:39 +0000)]
PyObject_CallFunctionObArgs() ---> PyObject_CallFunctionObjArgs()
PyObject_CallMethodObArgs() ---> PyObject_CallMethodObjArgs()

git-svn-id: http://svn.python.org/projects/python/trunk@24001 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoNews about the socket type and the HP-UX port.
gvanrossum [Sat, 27 Oct 2001 22:28:54 +0000 (27 22:28 +0000)]
News about the socket type and the HP-UX port.

git-svn-id: http://svn.python.org/projects/python/trunk@24000 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMade SocketType and socket the same thing: a subclassable type whose
gvanrossum [Sat, 27 Oct 2001 22:20:47 +0000 (27 22:20 +0000)]
Made SocketType and socket the same thing: a subclassable type whose
constructor acts just like socket() before.  All three arguments have
a sensible default now; socket() is equivalent to
socket(AF_INET, SOCK_STREAM).

One minor issue: the socket() function and the SocketType had
different doc strings; socket.__doc__ gave the signature,
SocketType.__doc__ gave the methods.  I've merged these for now, but
maybe the list of methods is no longer necessary since it can easily
be recovered through socket.__dict__.keys().  The problem with keeping
it is that the total doc string is a bit long (34 lines -- it scrolls
of a standard tty screen).

Another general issue with the socket module is that it's a big mess.
There's pages and pages of random platform #ifdefs, and the naming
conventions are totally wrong: it uses Py prefixes and CapWords for
static functions.  That's a cleanup for another day...  (Also I think
the big starting comment that summarizes the API can go -- it's a
repeat of the docstring.)

git-svn-id: http://svn.python.org/projects/python/trunk@23999 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoSF patch #475657 (Dietmar Schwertberger)
gvanrossum [Sat, 27 Oct 2001 21:16:16 +0000 (27 21:16 +0000)]
SF patch  #475657 (Dietmar Schwertberger)

RISCOS/Makefile:
include structseq and weakrefobject;
changes to keep command line length below 2048

RISCOS/Modules/riscosmodule.c:
typos from the stat structseq patch

Include/pyport.h:
don't re-#define __attribute__(__x) on RISC OS as it is already defined in c library

git-svn-id: http://svn.python.org/projects/python/trunk@23998 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoSF bug #475327: type() produces incorrect error msg
tim_one [Sat, 27 Oct 2001 19:37:48 +0000 (27 19:37 +0000)]
SF bug #475327:  type() produces incorrect error msg

object.h:  Added PyType_CheckExact macro.

typeobject.c, type_new():

+ Use the new macro.
+ Assert that the arguments have the right types rather than do incomplete
  runtime checks "sometimes".
+ If this isn't the 1-argument flavor() of type, and there aren't 3 args
  total, produce a "types() takes 1 or 3 args" msg before
  PyArg_ParseTupleAndKeywords produces a "takes exactly 3" msg.

git-svn-id: http://svn.python.org/projects/python/trunk@23997 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agodictionary() constructor:
tim_one [Sat, 27 Oct 2001 18:27:48 +0000 (27 18:27 +0000)]
dictionary() constructor:
+ Change keyword arg name from "x" to "items".  People passing a mapping
  object can stretch their imaginations <wink>.
+ Simplify the docstring text.

git-svn-id: http://svn.python.org/projects/python/trunk@23996 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords()
tim_one [Sat, 27 Oct 2001 07:25:06 +0000 (27 07:25 +0000)]
vgetargskeywords()
+ Squash another potential buffer overrun.
+ Simplify the keyword-arg loop by decrementing the count of keywords
  remaining instead of incrementing Yet Another Variable; also break
  out early if the number of keyword args remaining hits 0.

Since I hit the function's closing curly brace with this patch, that's
enough of this for now <wink>.

git-svn-id: http://svn.python.org/projects/python/trunk@23995 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords: Now that it's clear that nkwlist must equal max, and
tim_one [Sat, 27 Oct 2001 07:00:56 +0000 (27 07:00 +0000)]
vgetargskeywords:  Now that it's clear that nkwlist must equal max, and
we're ensuring that's true during the format parse, get rid of nkwlist.

git-svn-id: http://svn.python.org/projects/python/trunk@23994 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords: Prevent another potential sprintf buffer overrun.
tim_one [Sat, 27 Oct 2001 06:53:00 +0000 (27 06:53 +0000)]
vgetargskeywords:  Prevent another potential sprintf buffer overrun.

git-svn-id: http://svn.python.org/projects/python/trunk@23993 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords: Verify kwlist has the required length while parsing
tim_one [Sat, 27 Oct 2001 06:42:16 +0000 (27 06:42 +0000)]
vgetargskeywords:  Verify kwlist has the required length while parsing
the format, instead of waiting until after we can overindex it by
mistake.

git-svn-id: http://svn.python.org/projects/python/trunk@23992 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPyObject_CallFunction(), PyObject_CallMethod(): Make sure we do not touch
fdrake [Sat, 27 Oct 2001 06:16:31 +0000 (27 06:16 +0000)]
PyObject_CallFunction(), PyObject_CallMethod():  Make sure we do not touch
the va_list until we are sure we have a format string and need to use it;
this avoid premature initialization and having to finalize it several
different places because of error returns.

git-svn-id: http://svn.python.org/projects/python/trunk@23991 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords: Removed all PyErr_Clear() calls. It's possible that
tim_one [Sat, 27 Oct 2001 06:14:32 +0000 (27 06:14 +0000)]
vgetargskeywords:  Removed all PyErr_Clear() calls.  It's possible that
this routine will report an error now when it didn't before, but, if so,
it's a legitimate error that should never have been suppressed.

git-svn-id: http://svn.python.org/projects/python/trunk@23990 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords: The keywords arg is a dict (if non-NULL), so use the
tim_one [Sat, 27 Oct 2001 05:50:39 +0000 (27 05:50 +0000)]
vgetargskeywords:  The keywords arg is a dict (if non-NULL), so use the
dict API everywhere on it instead of sometimes using the slower mapping
API.

git-svn-id: http://svn.python.org/projects/python/trunk@23989 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords: Removed one of the mysterious PyErr_Clear() calls.
tim_one [Sat, 27 Oct 2001 05:30:17 +0000 (27 05:30 +0000)]
vgetargskeywords:  Removed one of the mysterious PyErr_Clear() calls.
The "need" for this was probably removed by an earlier patch that stopped
the loop right before it from passing NULL to a dict lookup routine.
I still haven't convinced myself that the next loop is correct, so am
leaving the next mysterious PyErr_Clear() call in for now.

git-svn-id: http://svn.python.org/projects/python/trunk@23988 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords:
tim_one [Sat, 27 Oct 2001 05:07:41 +0000 (27 05:07 +0000)]
vgetargskeywords:
+ Generally test nkeywords against 0 instead of keywords against NULL
  (saves a little work if an empty keywords dict is passed, and is
  conceptually more on-target regardless).
+ When a call erroneously specifies a keyword argument both by position
  and by keyword name:
    - It was easy to provoke this routine into an internal buffer overrun
      by using a long argument name.  Now uses PyErr_format instead (which
      computes a safe buffer size).
    - Improved the error msg.

git-svn-id: http://svn.python.org/projects/python/trunk@23987 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords:
tim_one [Sat, 27 Oct 2001 04:45:34 +0000 (27 04:45 +0000)]
vgetargskeywords:
+ Got rid of now-redundant dict typecheck.
+ Renamed nkwds to nkwlist.  Now all the "counting" vrbls have names
  related to the things they're counting in an obvious way.

git-svn-id: http://svn.python.org/projects/python/trunk@23986 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords:
tim_one [Sat, 27 Oct 2001 04:38:11 +0000 (27 04:38 +0000)]
vgetargskeywords:
+ Renamed argslen to nargs.
+ Renamed kwlen to nkeywords.  This one was especially confusing because
  kwlen wasn't the length of the kwlist argument, but of the keywords
  argument.

git-svn-id: http://svn.python.org/projects/python/trunk@23985 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords:
tim_one [Sat, 27 Oct 2001 04:33:41 +0000 (27 04:33 +0000)]
vgetargskeywords:
+ Removed now-redundant tuple typecheck.
+ Renamed "tplen" local to "argslen" (it's the length of the "args"
  argument; I suppose "tp" was for "Tim Peters should rename me
  someday <wink>).

git-svn-id: http://svn.python.org/projects/python/trunk@23984 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPyArg_ParseTupleAndKeywords: return false on internal error, not -1 (I
tim_one [Sat, 27 Oct 2001 04:26:57 +0000 (27 04:26 +0000)]
PyArg_ParseTupleAndKeywords:  return false on internal error, not -1 (I
introduced this bug just a little while ago, when *adding* internal error
checks).

vgetargskeywords:  Rewrote the section that crawls over the format string.
+ Added block comment so it won't take the next person 15 minutes to
  reverse-engineer what it's doing.
+ Lined up the "else" clauses.
+ Rearranged the ifs in decreasing order of likelihood (for speed).

git-svn-id: http://svn.python.org/projects/python/trunk@23983 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPyArg_ParseTupleAndKeywords: do basic sanity checks on the arguments,
tim_one [Sat, 27 Oct 2001 03:58:40 +0000 (27 03:58 +0000)]
PyArg_ParseTupleAndKeywords:  do basic sanity checks on the arguments,
and raise an error if they're insane.
vgetargskeywords:  the same, except that since this is an internal routine,
just assert that the arguments are sane.

git-svn-id: http://svn.python.org/projects/python/trunk@23982 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agotuple(3,4,5,x=2) dumped core on my box. vgetargskeywords() overindexed
tim_one [Sat, 27 Oct 2001 00:46:09 +0000 (27 00:46 +0000)]
tuple(3,4,5,x=2) dumped core on my box.  vgetargskeywords() overindexed
the kwlist vector whenever there was a mix of positional and keyword
arguments, and the number of positional arguments exceeded the length
of the kwlist vector.  If there was just one more positional arg than
keyword, the kwlist-terminating NULL got passed to PyMapping_HasKeyString,
which set an internal error that vgetargskeywords() then squashed (but
it's impossible to say whether it knew it was masking an error).  If
more than one more positional argument, it went on to pass random trash
to PyMapping_HasKeyString, which is why the example at the start
happened to kill the process.

Pure bugfix candidate.

git-svn-id: http://svn.python.org/projects/python/trunk@23981 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agovgetargskeywords(): remove test that can't succeed. Not a bugfix, just
tim_one [Sat, 27 Oct 2001 00:17:34 +0000 (27 00:17 +0000)]
vgetargskeywords():  remove test that can't succeed.  Not a bugfix, just
removing useless obfuscation.

git-svn-id: http://svn.python.org/projects/python/trunk@23980 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agodict_constructor(): The last test was passing for the wrong reason (it
tim_one [Fri, 26 Oct 2001 20:57:38 +0000 (26 20:57 +0000)]
dict_constructor():  The last test was passing for the wrong reason (it
was intended to verify that sub-sequences of lengths 1 and 3 raise
ValueError, but was actually testing string lengths).

git-svn-id: http://svn.python.org/projects/python/trunk@23979 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFill in remaining XXX spots
akuchling [Fri, 26 Oct 2001 20:37:55 +0000 (26 20:37 +0000)]
Fill in remaining XXX spots
        - Describe UnpackTuple()
        - Credit __unicode__ to MAL
Use \pep macro everywhere in body text.
   (Listening to "The Great Gate of Kiev" -- appropriately triumphal
    music for this check-in...)

git-svn-id: http://svn.python.org/projects/python/trunk@23977 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix up a number of small problems with the DOM documentation.
fdrake [Fri, 26 Oct 2001 20:09:49 +0000 (26 20:09 +0000)]
Fix up a number of small problems with the DOM documentation.
There's still a lot to do, but it's better now.

git-svn-id: http://svn.python.org/projects/python/trunk@23976 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFinish off the type/class section; I don't think there's much else
akuchling [Fri, 26 Oct 2001 20:07:03 +0000 (26 20:07 +0000)]
Finish off the type/class section; I don't think there's much else
    to be covered in an overview article like this.

git-svn-id: http://svn.python.org/projects/python/trunk@23975 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRemove unused variable.
fdrake [Fri, 26 Oct 2001 19:50:26 +0000 (26 19:50 +0000)]
Remove unused variable.

git-svn-id: http://svn.python.org/projects/python/trunk@23974 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoNow that Misc/Makefile.pre.in is gone, do not attempt to install it.
fdrake [Fri, 26 Oct 2001 19:48:06 +0000 (26 19:48 +0000)]
Now that Misc/Makefile.pre.in is gone, do not attempt to install it.

git-svn-id: http://svn.python.org/projects/python/trunk@23973 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoExplain what [].insert() does when the target index is negative.
fdrake [Fri, 26 Oct 2001 18:57:14 +0000 (26 18:57 +0000)]
Explain what [].insert() does when the target index is negative.

git-svn-id: http://svn.python.org/projects/python/trunk@23972 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd notes pointing out that these classes are kept for backward compatibility
fdrake [Fri, 26 Oct 2001 18:37:27 +0000 (26 18:37 +0000)]
Add notes pointing out that these classes are kept for backward compatibility
and suggeest that new code that does not require compatibility with older
Python versions subclass dictionary, list, or str.

git-svn-id: http://svn.python.org/projects/python/trunk@23971 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRe-arrange things and remove some unused variables/imports to keep pychecker
fdrake [Fri, 26 Oct 2001 18:02:28 +0000 (26 18:02 +0000)]
Re-arrange things and remove some unused variables/imports to keep pychecker
happy.  (This does not cover everything it complained about, though.)

git-svn-id: http://svn.python.org/projects/python/trunk@23970 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoBe smarter about clearing the weakref lists for instances, instance methods,
fdrake [Fri, 26 Oct 2001 17:56:51 +0000 (26 17:56 +0000)]
Be smarter about clearing the weakref lists for instances, instance methods,
and functions: we only need to call PyObject_ClearWeakRefs() if the weakref
list is non-NULL.  Since these objects are common but weakrefs are still
unusual, saving the call at deallocation time makes a lot of sense.

git-svn-id: http://svn.python.org/projects/python/trunk@23969 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMany, many small fixes and improvements, most suggested by Detlef Lannert.
fdrake [Fri, 26 Oct 2001 17:40:22 +0000 (26 17:40 +0000)]
Many, many small fixes and improvements, most suggested by Detlef Lannert.

git-svn-id: http://svn.python.org/projects/python/trunk@23968 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdded docs for PyObject_CallFunctionObArgs() and PyObject_CallMethodObArgs().
fdrake [Fri, 26 Oct 2001 16:38:38 +0000 (26 16:38 +0000)]
Added docs for PyObject_CallFunctionObArgs() and PyObject_CallMethodObArgs().
Minor cleanups & markup consistency fixes.

git-svn-id: http://svn.python.org/projects/python/trunk@23967 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdded refcount data for PyObject_CallFunctionObArgs() and
fdrake [Fri, 26 Oct 2001 16:29:22 +0000 (26 16:29 +0000)]
Added refcount data for PyObject_CallFunctionObArgs() and
PyObject_CallMethodObArgs().

git-svn-id: http://svn.python.org/projects/python/trunk@23966 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdded two new functions to conveniently call functions/methods from C.
fdrake [Fri, 26 Oct 2001 16:21:32 +0000 (26 16:21 +0000)]
Added two new functions to conveniently call functions/methods from C.
PyObject_CallFunctionObArgs() and PyObject_CallMethodObArgs() have the
advantage that no format strings need to be parsed.  The CallMethod
variant also avoids creating a new string object in order to retrieve
a method from an object as well.

git-svn-id: http://svn.python.org/projects/python/trunk@23965 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoSome style changes and typo fixes.
fdrake [Fri, 26 Oct 2001 15:04:33 +0000 (26 15:04 +0000)]
Some style changes and typo fixes.

git-svn-id: http://svn.python.org/projects/python/trunk@23964 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoUpdated this README to reality.
gvanrossum [Fri, 26 Oct 2001 15:01:16 +0000 (26 15:01 +0000)]
Updated this README to reality.

git-svn-id: http://svn.python.org/projects/python/trunk@23963 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoSome news.
gvanrossum [Fri, 26 Oct 2001 14:56:06 +0000 (26 14:56 +0000)]
Some news.

git-svn-id: http://svn.python.org/projects/python/trunk@23962 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoDelete Makefile.pre.in (BDFL pronouncement)
akuchling [Fri, 26 Oct 2001 14:54:16 +0000 (26 14:54 +0000)]
Delete Makefile.pre.in (BDFL pronouncement)

git-svn-id: http://svn.python.org/projects/python/trunk@23961 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoClean up the tables of child links generated by stock LaTeX2HTML so we get
fdrake [Fri, 26 Oct 2001 14:16:23 +0000 (26 14:16 +0000)]
Clean up the tables of child links generated by stock LaTeX2HTML so we get
consistent (lack of) vertical space between sections, and remove some of the
unnecessary cruft that was added in (finally we get to *remove* something
that got generated!).

git-svn-id: http://svn.python.org/projects/python/trunk@23960 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMoved PythonScript to unsupported at Bill Bedford's request. It'll go
jackjansen [Fri, 26 Oct 2001 12:55:39 +0000 (26 12:55 +0000)]
Moved PythonScript to unsupported at Bill Bedford's request. It'll go
away completely next release, unless someone complains.

git-svn-id: http://svn.python.org/projects/python/trunk@23959 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoTypo: destuction --> destruction
fdrake [Fri, 26 Oct 2001 11:27:54 +0000 (26 11:27 +0000)]
Typo: destuction --> destruction
Reported by Thomas Heller.

git-svn-id: http://svn.python.org/projects/python/trunk@23958 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agofurther work supporting reading config dialog values form config files.
elguavas [Fri, 26 Oct 2001 06:50:54 +0000 (26 06:50 +0000)]
further work supporting reading config dialog values form config files.

git-svn-id: http://svn.python.org/projects/python/trunk@23957 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agodynamic option menu widget.
elguavas [Fri, 26 Oct 2001 06:49:14 +0000 (26 06:49 +0000)]
dynamic option menu widget.

git-svn-id: http://svn.python.org/projects/python/trunk@23956 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agofurther work on loading config dialog values from the config files
elguavas [Fri, 26 Oct 2001 06:47:09 +0000 (26 06:47 +0000)]
further work on loading config dialog values from the config files

git-svn-id: http://svn.python.org/projects/python/trunk@23955 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoGeneralize dictionary() to accept a sequence of 2-sequences. At the
tim_one [Fri, 26 Oct 2001 05:06:50 +0000 (26 05:06 +0000)]
Generalize dictionary() to accept a sequence of 2-sequences.  At the
outer level, the iterator protocol is used for memory-efficiency (the
outer sequence may be very large if fully materialized); at the inner
level, PySequence_Fast() is used for time-efficiency (these should
always be sequences of length 2).

dictobject.c, new functions PyDict_{Merge,Update}FromSeq2.  These are
wholly analogous to PyDict_{Merge,Update}, but process a sequence-of-2-
sequences argument instead of a mapping object.  For now, I left these
functions file static, so no corresponding doc changes.  It's tempting
to change dict.update() to allow a sequence-of-2-seqs argument too.

Also changed the name of dictionary's keyword argument from "mapping"
to "x".  Got a better name?  "mapping_or_sequence_of_pairs" isn't
attractive, although more so than "mosop" <wink>.

abstract.h, abstract.tex:  Added new PySequence_Fast_GET_SIZE function,
much faster than going thru the all-purpose PySequence_Size.

libfuncs.tex:
- Document dictionary().
- Fiddle tuple() and list() to admit that their argument is optional.
- The long-winded repetitions of "a sequence, a container that supports
  iteration, or an iterator object" is getting to be a PITA.  Many
  months ago I suggested factoring this out into "iterable object",
  where the definition of that could include being explicit about
  generators too (as is, I'm not sure a reader outside of PythonLabs
  could guess that "an iterator object" includes a generator call).
- Please check my curly braces -- I'm going blind <0.9 wink>.

abstract.c, PySequence_Tuple():  When PyObject_GetIter() fails, leave
its error msg alone now (the msg it produces has improved since
PySequence_Tuple was generalized to accept iterable objects, and
PySequence_Tuple was also stomping on the msg in cases it shouldn't
have even before PyObject_GetIter grew a better msg).

git-svn-id: http://svn.python.org/projects/python/trunk@23954 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoUpdate. __dict__ assignment done. Reorder remaining "to do" items by
gvanrossum [Fri, 26 Oct 2001 04:31:54 +0000 (26 04:31 +0000)]
Update.  __dict__ assignment done.  Reorder remaining "to do" items by
priority.  Add tp_cache; add some comments to others.

git-svn-id: http://svn.python.org/projects/python/trunk@23953 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAllow assignment to newinstance.__dict__.
gvanrossum [Fri, 26 Oct 2001 04:26:12 +0000 (26 04:26 +0000)]
Allow assignment to newinstance.__dict__.

git-svn-id: http://svn.python.org/projects/python/trunk@23952 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix two typos, one noted by Noah Spurrier in SF bug #475166, the
gvanrossum [Fri, 26 Oct 2001 03:38:46 +0000 (26 03:38 +0000)]
Fix two typos, one noted by Noah Spurrier in SF bug #475166, the
second noted after a second's thought about what the next line should
do. :-(

git-svn-id: http://svn.python.org/projects/python/trunk@23951 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd sendall() method, which loops until all data is written or an
gvanrossum [Fri, 26 Oct 2001 03:25:00 +0000 (26 03:25 +0000)]
Add sendall() method, which loops until all data is written or an
error occurs, and doesn't return a count.  (This is my second patch
from SF patch #474307, with small change to the docstring for send().)

2.1.2 "bugfix" candidate.

git-svn-id: http://svn.python.org/projects/python/trunk@23950 6015fed2-1504-0410-9fe1-9d1591cc4771