]> granicus.if.org Git - python/log
python
23 years agodirectory chooser (requires a recent version of Tk)
Fredrik Lundh [Mon, 29 Oct 2001 22:58:55 +0000 (22:58 +0000)]
directory chooser (requires a recent version of Tk)

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

23 years agoAdd __del__ callbacks. They are too useful to leave out.
Guido van Rossum [Mon, 29 Oct 2001 22:11:00 +0000 (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.

23 years agoSF bug #476138: tempfile behavior across platforms
Tim Peters [Mon, 29 Oct 2001 21:46:08 +0000 (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.

23 years agoRevise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake [Mon, 29 Oct 2001 21:02:28 +0000 (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.

23 years agoUpdate to reflect changes to the low-level logreader: share the info
Fred Drake [Mon, 29 Oct 2001 20:57:23 +0000 (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.

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

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

23 years agoMake the low-level log-reader object export a dictionary mapping keys
Fred Drake [Mon, 29 Oct 2001 20:45:57 +0000 (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.

23 years agodictionary -> dict
Andrew M. Kuchling [Mon, 29 Oct 2001 20:37:47 +0000 (20:37 +0000)]
dictionary -> dict

23 years agoFix two typos noted by Jens Quade
Andrew M. Kuchling [Mon, 29 Oct 2001 18:09:42 +0000 (18:09 +0000)]
Fix two typos noted by Jens Quade
Bump version number

23 years agoAdd additional information on exceptions from time.mktime() and related to
Fred Drake [Mon, 29 Oct 2001 18:01:24 +0000 (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.

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

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

23 years agoMake sure we generate versions of each file in the Python/C API manual with
Fred Drake [Mon, 29 Oct 2001 17:40:40 +0000 (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.

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

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

23 years agoFix for SF bug 453099 -- select not defensive
Jeremy Hylton [Mon, 29 Oct 2001 16:32:19 +0000 (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.

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

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

23 years agomore loading from cfg files
Steven M. Gava [Mon, 29 Oct 2001 11:19:46 +0000 (11:19 +0000)]
more loading from cfg files

23 years agomore of config dialog reading from files
Steven M. Gava [Mon, 29 Oct 2001 08:05:34 +0000 (08:05 +0000)]
more of config dialog reading from files

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

23 years agoTest sendall().
Guido van Rossum [Mon, 29 Oct 2001 07:14:10 +0000 (07:14 +0000)]
Test sendall().

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

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

23 years agoOops. In the tp_name field, the name should be "_socket.socket", not
Guido van Rossum [Sun, 28 Oct 2001 12:31:33 +0000 (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).

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

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

23 years agoMade SocketType and socket the same thing: a subclassable type whose
Guido van Rossum [Sat, 27 Oct 2001 22:20:47 +0000 (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.)

23 years agoSF patch #475657 (Dietmar Schwertberger)
Guido van Rossum [Sat, 27 Oct 2001 21:16:16 +0000 (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

23 years agoSF bug #475327: type() produces incorrect error msg
Tim Peters [Sat, 27 Oct 2001 19:37:48 +0000 (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.

23 years agodictionary() constructor:
Tim Peters [Sat, 27 Oct 2001 18:27:48 +0000 (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.

23 years agovgetargskeywords()
Tim Peters [Sat, 27 Oct 2001 07:25:06 +0000 (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>.

23 years agovgetargskeywords: Now that it's clear that nkwlist must equal max, and
Tim Peters [Sat, 27 Oct 2001 07:00:56 +0000 (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.

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

23 years agovgetargskeywords: Verify kwlist has the required length while parsing
Tim Peters [Sat, 27 Oct 2001 06:42:16 +0000 (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.

23 years agoPyObject_CallFunction(), PyObject_CallMethod(): Make sure we do not touch
Fred Drake [Sat, 27 Oct 2001 06:16:31 +0000 (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.

23 years agovgetargskeywords: Removed all PyErr_Clear() calls. It's possible that
Tim Peters [Sat, 27 Oct 2001 06:14:32 +0000 (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.

23 years agovgetargskeywords: The keywords arg is a dict (if non-NULL), so use the
Tim Peters [Sat, 27 Oct 2001 05:50:39 +0000 (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.

23 years agovgetargskeywords: Removed one of the mysterious PyErr_Clear() calls.
Tim Peters [Sat, 27 Oct 2001 05:30:17 +0000 (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.

23 years agovgetargskeywords:
Tim Peters [Sat, 27 Oct 2001 05:07:41 +0000 (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.

23 years agovgetargskeywords:
Tim Peters [Sat, 27 Oct 2001 04:45:34 +0000 (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.

23 years agovgetargskeywords:
Tim Peters [Sat, 27 Oct 2001 04:38:11 +0000 (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.

23 years agovgetargskeywords:
Tim Peters [Sat, 27 Oct 2001 04:33:41 +0000 (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>).

23 years agoPyArg_ParseTupleAndKeywords: return false on internal error, not -1 (I
Tim Peters [Sat, 27 Oct 2001 04:26:57 +0000 (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).

23 years agoPyArg_ParseTupleAndKeywords: do basic sanity checks on the arguments,
Tim Peters [Sat, 27 Oct 2001 03:58:40 +0000 (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.

23 years agotuple(3,4,5,x=2) dumped core on my box. vgetargskeywords() overindexed
Tim Peters [Sat, 27 Oct 2001 00:46:09 +0000 (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.

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

23 years agodict_constructor(): The last test was passing for the wrong reason (it
Tim Peters [Fri, 26 Oct 2001 20:57:38 +0000 (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).

23 years agoFill in remaining XXX spots
Andrew M. Kuchling [Fri, 26 Oct 2001 20:37:55 +0000 (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...)

23 years agoFix up a number of small problems with the DOM documentation.
Fred Drake [Fri, 26 Oct 2001 20:09:49 +0000 (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.

23 years agoFinish off the type/class section; I don't think there's much else
Andrew M. Kuchling [Fri, 26 Oct 2001 20:07:03 +0000 (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.

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

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

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

23 years agoAdd notes pointing out that these classes are kept for backward compatibility
Fred Drake [Fri, 26 Oct 2001 18:37:27 +0000 (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.

23 years agoRe-arrange things and remove some unused variables/imports to keep pychecker
Fred Drake [Fri, 26 Oct 2001 18:02:28 +0000 (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.)

23 years agoBe smarter about clearing the weakref lists for instances, instance methods,
Fred Drake [Fri, 26 Oct 2001 17:56:51 +0000 (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.

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

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

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

23 years agoAdded two new functions to conveniently call functions/methods from C.
Fred Drake [Fri, 26 Oct 2001 16:21:32 +0000 (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.

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

23 years agoUpdated this README to reality.
Guido van Rossum [Fri, 26 Oct 2001 15:01:16 +0000 (15:01 +0000)]
Updated this README to reality.

23 years agoSome news.
Guido van Rossum [Fri, 26 Oct 2001 14:56:06 +0000 (14:56 +0000)]
Some news.

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

23 years agoClean up the tables of child links generated by stock LaTeX2HTML so we get
Fred Drake [Fri, 26 Oct 2001 14:16:23 +0000 (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!).

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

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

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

23 years agodynamic option menu widget.
Steven M. Gava [Fri, 26 Oct 2001 06:49:14 +0000 (06:49 +0000)]
dynamic option menu widget.

23 years agofurther work on loading config dialog values from the config files
Steven M. Gava [Fri, 26 Oct 2001 06:47:09 +0000 (06:47 +0000)]
further work on loading config dialog values from the config files

23 years agoGeneralize dictionary() to accept a sequence of 2-sequences. At the
Tim Peters [Fri, 26 Oct 2001 05:06:50 +0000 (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).

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

23 years agoAllow assignment to newinstance.__dict__.
Guido van Rossum [Fri, 26 Oct 2001 04:26:12 +0000 (04:26 +0000)]
Allow assignment to newinstance.__dict__.

23 years agoFix two typos, one noted by Noah Spurrier in SF bug #475166, the
Guido van Rossum [Fri, 26 Oct 2001 03:38:46 +0000 (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. :-(

23 years agoAdd sendall() method, which loops until all data is written or an
Guido van Rossum [Fri, 26 Oct 2001 03:25:00 +0000 (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.

23 years agoAdd yet more markup that let's a stylesheet pick out a small bit of the
Fred Drake [Fri, 26 Oct 2001 03:09:27 +0000 (03:09 +0000)]
Add yet more markup that let's a stylesheet pick out a small bit of the
presentation.  This is acceptable since it only occurs in the formatted
output and does not affect the document markup.

23 years agoEnforce a bit of markup consistency.
Fred Drake [Fri, 26 Oct 2001 03:04:23 +0000 (03:04 +0000)]
Enforce a bit of markup consistency.
When describing a Boolean return value, use "true" and "false" instead of
"1" and "0".
Style-guide conformance:  no "iff" -- to obscure for many readers.  ;-(

23 years agoMinor textual adjustment, and style-guide conformance (no use of "iff").
Fred Drake [Fri, 26 Oct 2001 03:00:39 +0000 (03:00 +0000)]
Minor textual adjustment, and style-guide conformance (no use of "iff").

23 years agoA fix for SF bug #472560, extra newlines returned by get_param() when
Barry Warsaw [Thu, 25 Oct 2001 22:43:46 +0000 (22:43 +0000)]
A fix for SF bug #472560, extra newlines returned by get_param() when
the separating semi-colon shows up on a continuation line (legal, but
weird).

Bug reported and fixed by Matthew Cowles.  Test case and sample email
included.

23 years agoAdded various tidbits.
Jack Jansen [Thu, 25 Oct 2001 22:26:00 +0000 (22:26 +0000)]
Added various tidbits.

23 years agoI went back and figured out the release date for Python 2.2a1.
Barry Warsaw [Thu, 25 Oct 2001 21:53:30 +0000 (21:53 +0000)]
I went back and figured out the release date for Python 2.2a1.

23 years agoApplying proposed patch for bug #474583, optional support for
Barry Warsaw [Thu, 25 Oct 2001 21:49:18 +0000 (21:49 +0000)]
Applying proposed patch for bug #474583, optional support for
non-standard but common types.  Including Martin's suggestion to add
rejected non-standard types from patch #438790.  Specifically,

guess_type(), guess_extension(): Both the functions and the methods
grow an optional "strict" flag, defaulting to true, which determines
whether to recognize non-standard, but commonly found types or not.

Also, I sorted, reformatted, and culled duplicates from the big
types_map dictionary.  Note that there are a few non-equivalent
duplicates (e.g. .cdf and .xls) for which the first will just get
thrown away.  I didn't remove those though.

Finally, use of the module as a script as grown the -l and -e options
to toggle strictness and to do guess_extension(), respectively.

Doc and unittest updates too.

23 years agoUse PyDict_Copy() and PyDict_Update() instead of using PyObject_CallMethod()
Fred Drake [Thu, 25 Oct 2001 21:38:59 +0000 (21:38 +0000)]
Use PyDict_Copy() and PyDict_Update() instead of using PyObject_CallMethod()
to call the corresponding methods.  This is not a performance improvement
since the times are still swamped by disk I/O, but cleans up the code just
a little.

23 years agoTypo: NamedNodeList --> NamedNodeMap
Fred Drake [Thu, 25 Oct 2001 20:42:57 +0000 (20:42 +0000)]
Typo: NamedNodeList --> NamedNodeMap

23 years agoFix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck)
Guido van Rossum [Thu, 25 Oct 2001 20:18:35 +0000 (20:18 +0000)]
Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck)

Replace some tortuous code that was trying to be clever but forgot to
DECREF the key and value, by more longwinded but obviously correct
code.

(Inspired by but not copying the fix from SF patch #475033.)

23 years agoIgnore the posixfile deprecation warning for the test suite.
Fred Drake [Thu, 25 Oct 2001 18:11:10 +0000 (18:11 +0000)]
Ignore the posixfile deprecation warning for the test suite.

23 years agocomplex_subtype_from_string(): move the declaration of s_buffer[] out
Guido van Rossum [Thu, 25 Oct 2001 18:07:22 +0000 (18:07 +0000)]
complex_subtype_from_string(): move the declaration of s_buffer[] out
of the if block where it was before.  The name is only used inside
that if block, but the storage is referenced outside it via the 's'
variable.

(This patch was part of SF patch #474590 -- RISC OS support.)

23 years agoSlightly better conformance to the Python C style guide.
Fred Drake [Thu, 25 Oct 2001 15:53:44 +0000 (15:53 +0000)]
Slightly better conformance to the Python C style guide.

23 years agoOne more LaTeX-ism that we'd rather ignore.
Fred Drake [Thu, 25 Oct 2001 15:14:57 +0000 (15:14 +0000)]
One more LaTeX-ism that we'd rather ignore.

23 years agoNo need to run make twice here.
Fred Drake [Thu, 25 Oct 2001 15:13:30 +0000 (15:13 +0000)]
No need to run make twice here.

23 years agoUpdate the rules so that changes to the HTML stylesheet cause appropriate
Fred Drake [Thu, 25 Oct 2001 15:12:31 +0000 (15:12 +0000)]
Update the rules so that changes to the HTML stylesheet cause appropriate
work to be done, but do not require the HTML to be re-built.

23 years agoAfter discussion with itojun, it was clarified that Tru64 is in error,
Martin v. Löwis [Thu, 25 Oct 2001 09:04:03 +0000 (09:04 +0000)]
After discussion with itojun, it was clarified that Tru64 is in error,
and that the work-around should be restricted to that system.

23 years ago(experimental) "finditer" method/function. this works pretty much
Fredrik Lundh [Wed, 24 Oct 2001 22:16:30 +0000 (22:16 +0000)]
(experimental) "finditer" method/function.  this works pretty much
like findall, but returns an iterator (which returns match objects)
instead of a list of strings/tuples.

23 years agoAdd a warning to the posixfile module stating that it will go away.
Fred Drake [Wed, 24 Oct 2001 22:03:35 +0000 (22:03 +0000)]
Add a warning to the posixfile module stating that it will go away.

23 years agoMake the deprecation notice use the same form as other such notices.
Fred Drake [Wed, 24 Oct 2001 21:56:59 +0000 (21:56 +0000)]
Make the deprecation notice use the same form as other such notices.
This has sat around in a deprecated state for a *long* time!

23 years agoMinor revision of the text.
Fred Drake [Wed, 24 Oct 2001 21:10:52 +0000 (21:10 +0000)]
Minor revision of the text.

23 years agoNote updated RISCOS port. Remove reference in the 2.1 release notes
Guido van Rossum [Wed, 24 Oct 2001 20:51:44 +0000 (20:51 +0000)]
Note updated RISCOS port.  Remove reference in the 2.1 release notes
to os.extsep -- that variable actually didn't exist in that release!

23 years agoConvert getrefcount() to METH_O, and sys_excepthook() to use
Fred Drake [Wed, 24 Oct 2001 20:47:48 +0000 (20:47 +0000)]
Convert getrefcount() to METH_O, and sys_excepthook() to use
PyArg_UnpackTuple().