]> granicus.if.org Git - python/log
python
23 years agouse proper APIs for activate/deactivate
Just van Rossum [Fri, 2 Nov 2001 21:12:52 +0000 (21:12 +0000)]
use proper APIs for activate/deactivate

23 years agoFix stupid bug recently introduced for DVI version of the docs (used to
Fred Drake [Fri, 2 Nov 2001 20:53:19 +0000 (20:53 +0000)]
Fix stupid bug recently introduced for DVI version of the docs (used to
generate PostScript).

23 years agoAdd deprecation notice to statcache.
Fred Drake [Fri, 2 Nov 2001 20:20:19 +0000 (20:20 +0000)]
Add deprecation notice to statcache.

23 years agoMake sure there are no weird nesting behaviors; the PDF version will not
Fred Drake [Fri, 2 Nov 2001 19:41:23 +0000 (19:41 +0000)]
Make sure there are no weird nesting behaviors; the PDF version will not
format if there are (building the "bookmarks" for the reader breaks).

23 years agowintertime blues
Just van Rossum [Fri, 2 Nov 2001 19:30:49 +0000 (19:30 +0000)]
wintertime blues

23 years agoremoved import display hackery
Just van Rossum [Fri, 2 Nov 2001 19:30:21 +0000 (19:30 +0000)]
removed import display hackery

23 years agosome support for syntax coloring, disabled for now
Just van Rossum [Fri, 2 Nov 2001 19:24:41 +0000 (19:24 +0000)]
some support for syntax coloring, disabled for now

23 years agochanged the default font
Just van Rossum [Fri, 2 Nov 2001 19:22:55 +0000 (19:22 +0000)]
changed the default font

23 years agofixed a non-Carbon Carbon import
Just van Rossum [Fri, 2 Nov 2001 19:21:34 +0000 (19:21 +0000)]
fixed a non-Carbon Carbon import

23 years ago- rearranged some imports
Just van Rossum [Fri, 2 Nov 2001 19:17:16 +0000 (19:17 +0000)]
- rearranged some imports
- removed default button drawing code: this doesn't work well
  under OSX. Needs to be replaced by SetWindowDefaultButton()
  calls, once we have those.

23 years agorearranged some imports
Just van Rossum [Fri, 2 Nov 2001 19:09:34 +0000 (19:09 +0000)]
rearranged some imports

23 years agoSF bug #476912: flag repeated use of the same groupname as
Fredrik Lundh [Fri, 2 Nov 2001 13:59:51 +0000 (13:59 +0000)]
SF bug #476912: flag repeated use of the same groupname as
the error it really is (and always has been)

23 years agofloat_divmod(): the code wasn't sick enough to stop the MS optimizer
Tim Peters [Thu, 1 Nov 2001 23:59:56 +0000 (23:59 +0000)]
float_divmod():  the code wasn't sick enough to stop the MS optimizer
from optimizing away mod's sign adjustment when mod == 0; so it got
the intended result only in the debug build.

23 years agoWe always install the Sioux menubar, in stead of only when no menubar
Jack Jansen [Thu, 1 Nov 2001 23:17:35 +0000 (23:17 +0000)]
We always install the Sioux menubar, in stead of only when no menubar
was installed previously. This fixes bug #476904, but I'm not 100%
sure it doesn't break anything else. But if it does I'll notice tomorrow
when I try to build GRiNS:-)

23 years agoSF bug #477221: abs and divmod act oddly with -0.0
Tim Peters [Thu, 1 Nov 2001 23:12:27 +0000 (23:12 +0000)]
SF bug #477221: abs and divmod act oddly with -0.0
Try to ensure that divmod(-0.0, 1.0) -> (-0.0, +0.0) across platforms.
It always did on Windows, and still does.  It didn't on Linux.  Alas,
there's no platform-independent way to write a test case for this.
Bugfix candidate.

23 years agofloat_abs() again: Guido pointed out that this could screw up in the
Tim Peters [Thu, 1 Nov 2001 21:51:15 +0000 (21:51 +0000)]
float_abs() again:  Guido pointed out that this could screw up in the
presence of NaNs.  So pass the issue on to the platform libm fabs();
after all, fabs() is a std C function because you can't implement it
correctly in portable C89.

23 years agoThe GC issues with __del__ are now dealt with.
Guido van Rossum [Thu, 1 Nov 2001 21:36:48 +0000 (21:36 +0000)]
The GC issues with __del__ are now dealt with.

23 years agoPyFunction_Call() did not check the result of PyObject_Repr() for NULL, and
Fred Drake [Thu, 1 Nov 2001 20:26:12 +0000 (20:26 +0000)]
PyFunction_Call() did not check the result of PyObject_Repr() for NULL, and
should just avoid calling it in the first place to avoid waiting for a repr
of a large object like a dict or list.  The result of PyObject_Repr() was
being leaked as well.
Bugfix candidate!

23 years agoSF bug #477221: abs and divmod act oddly with -0.0.
Tim Peters [Thu, 1 Nov 2001 20:09:42 +0000 (20:09 +0000)]
SF bug #477221: abs and divmod act oddly with -0.0.
Partial fix.
float_abs():  ensure abs(-0.0) returns +0.0.
Bugfix candidate.

23 years agoCorrect misspelling of "separate" in two places.
Fred Drake [Thu, 1 Nov 2001 19:48:01 +0000 (19:48 +0000)]
Correct misspelling of "separate" in two places.
This closes SF bug #476898.

23 years agohas_finalizer(): simplified "if (complicated_bool) 1 else 0" to
Tim Peters [Thu, 1 Nov 2001 19:35:45 +0000 (19:35 +0000)]
has_finalizer():  simplified "if (complicated_bool) 1 else 0" to
"complicated_bool".

23 years agoBrute-force performance hackery; buys back about 20% of the time for
Fred Drake [Thu, 1 Nov 2001 17:50:38 +0000 (17:50 +0000)]
Brute-force performance hackery; buys back about 20% of the time for
saferepr(), a bit less for pformat().

23 years agoAdd has_finalizer predictate function. Use it when deciding which
Neil Schemenauer [Thu, 1 Nov 2001 17:35:23 +0000 (17:35 +0000)]
Add has_finalizer predictate function.  Use it when deciding which
objects to save in gc.garbage.  This should be the last change needed to
fix SF bug 477059: "__del__ on new classes vs. GC".

Note that this change slightly changes the behavior of the collector.
Before, if a cycle was found that contained instances with __del__
methods then all instance objects in that cycle were saved in
gc.garbage.  Now, only objects with __del__ methods are saved in
gc.garbage.

23 years agoThe import check in setup.py fails on Mac OS X for Carbon-based modules
Jack Jansen [Thu, 1 Nov 2001 14:44:15 +0000 (14:44 +0000)]
The import check in setup.py fails on Mac OS X for Carbon-based modules
if you are not building while logged in to the console (you cannot
connect to the window server, so the Carbon library doesn't initialize).
Added a quick hack to skip the import test, with a warning, for modules
linked against Carbon.

23 years agoSF bug #477059 (my own): __del__ on new classes vs. GC.
Guido van Rossum [Thu, 1 Nov 2001 14:23:28 +0000 (14:23 +0000)]
SF bug #477059 (my own): __del__ on new classes vs. GC.

When moving objects with a __del__ attribute to a special list, look
for __del__ on new-style classes with the HEAPTYPE flag set as well.
(HEAPTYPE means the class was created by a class statement.)

23 years agoUnder MachO-Python unconditionally import macfsn.
Jack Jansen [Thu, 1 Nov 2001 14:00:19 +0000 (14:00 +0000)]
Under MachO-Python unconditionally import macfsn.

23 years ago__del__ is done -- except for the GC issue.
Guido van Rossum [Thu, 1 Nov 2001 04:11:06 +0000 (04:11 +0000)]
__del__ is done -- except for the GC issue.

23 years agoMake the gc.collect() function respect the collection lock. This fixes
Neil Schemenauer [Wed, 31 Oct 2001 23:09:35 +0000 (23:09 +0000)]
Make the gc.collect() function respect the collection lock.  This fixes
SF bug 476129: "gc.collect sometimes hangs".

23 years agoWorkaround for odd problem on my machine: without this I get a traceback
Just van Rossum [Wed, 31 Oct 2001 22:58:23 +0000 (22:58 +0000)]
Workaround for odd problem on my machine: without this I get a traceback
if I hit enter instead of return upon file selection.

23 years agoMoved macfsn hackery from macmain.c to macfsmodule.c so it loads
Just van Rossum [Wed, 31 Oct 2001 22:55:08 +0000 (22:55 +0000)]
Moved macfsn hackery from macmain.c to macfsmodule.c so it loads
on demand instead of at startup.

23 years agofix for
Michael W. Hudson [Wed, 31 Oct 2001 18:51:01 +0000 (18:51 +0000)]
fix for

[ #476557 ] Wrong error message for file.write(a, b)

Makes file.write a METH_VARARGS function.

23 years agoFix markup typo
Andrew M. Kuchling [Wed, 31 Oct 2001 13:16:10 +0000 (13:16 +0000)]
Fix markup typo

23 years agoAdd paragraph about difflib suggested by David Goodger
Andrew M. Kuchling [Wed, 31 Oct 2001 13:13:36 +0000 (13:13 +0000)]
Add paragraph about difflib suggested by David Goodger
Bump version number

23 years agocall the correct base method (found due to better inheritance checking in 2.2)
Just van Rossum [Wed, 31 Oct 2001 12:55:07 +0000 (12:55 +0000)]
call the correct base method (found due to better inheritance checking in 2.2)

23 years agoLink the core with CoreServices, not with Carbon, and don't use any Carbon
Jack Jansen [Wed, 31 Oct 2001 12:11:48 +0000 (12:11 +0000)]
Link the core with CoreServices, not with Carbon, and don't use any Carbon
routines. As of 10.1 using Carbon will crash Python if no window server is
available (ssh connection, console mode, MacOSX Server). This fixes bug
#466907.

A result of this mod is that the default 8bit encoding on OSX is now ASCII,
for the time being. Also, the extension modules that need the Carbon
framework now explicitly include it in setup.py.

23 years agoRegenerated
Jack Jansen [Wed, 31 Oct 2001 11:41:25 +0000 (11:41 +0000)]
Regenerated

23 years agoDocumentation patches by bsherwood
Chui Tey [Wed, 31 Oct 2001 10:40:28 +0000 (10:40 +0000)]
Documentation patches by bsherwood

23 years agoAdded structseq.c
Just van Rossum [Wed, 31 Oct 2001 10:27:19 +0000 (10:27 +0000)]
Added structseq.c

23 years agoAdded Donovan Preston and reformatted to 80-char lines.
Jack Jansen [Wed, 31 Oct 2001 10:13:52 +0000 (10:13 +0000)]
Added Donovan Preston and reformatted to 80-char lines.

23 years agoMove a name into correct position.
Tim Peters [Wed, 31 Oct 2001 04:45:45 +0000 (04:45 +0000)]
Move a name into correct position.

23 years agoSF patch #474485: pydoc generates some bad html, from Rich Salz.
Tim Peters [Wed, 31 Oct 2001 04:20:26 +0000 (04:20 +0000)]
SF patch #474485:  pydoc generates some bad html, from Rich Salz.

23 years agoSF patch #474500: Make OS/2 locks work like posix locks, from Michael
Tim Peters [Wed, 31 Oct 2001 03:50:45 +0000 (03:50 +0000)]
SF patch #474500:  Make OS/2 locks work like posix locks, from Michael
Muller.

23 years agoHuh. In an effort to be less thorough <wink>, seems I checked in a new
Tim Peters [Wed, 31 Oct 2001 03:46:14 +0000 (03:46 +0000)]
Huh.  In an effort to be less thorough <wink>, seems I checked in a new
test that wouldn't even compile,

23 years agoFix bad bug in structseq slicing (NULL pointers in result). Reported by
Tim Peters [Tue, 30 Oct 2001 23:20:46 +0000 (23:20 +0000)]
Fix bad bug in structseq slicing (NULL pointers in result).  Reported by
Jack Jansen on python-dev.
Add simple test case.
Move vereq() from test_descr to test_support (it's handy!).

23 years agoMod by Donovan Preston to allow MacPython to live in a Python.app bundle and understa...
Jack Jansen [Tue, 30 Oct 2001 22:48:36 +0000 (22:48 +0000)]
Mod by Donovan Preston to allow MacPython to live in a Python.app bundle and understand the __main__.py convention used there for applets. This gives us applets that work on both OS9 and OSX! (Although "applet" may not be the correct word for something that is going to be multimegabyte:-).

But: the code is currently disabled, as it requires CodeWarrior 7 and I'm still using 6.

23 years agoFiles used for MacPython 2.2b1 distribution.
Jack Jansen [Tue, 30 Oct 2001 22:42:45 +0000 (22:42 +0000)]
Files used for MacPython 2.2b1 distribution.

23 years agoFix grammar error
Andrew M. Kuchling [Tue, 30 Oct 2001 22:18:21 +0000 (22:18 +0000)]
Fix grammar error

23 years agoRewrites and additions resulting from today's feedback
Andrew M. Kuchling [Tue, 30 Oct 2001 21:36:04 +0000 (21:36 +0000)]
Rewrites and additions resulting from today's feedback

23 years agoSF bug #474077 2.2b1: Error compiling extns with BCC
Tim Peters [Tue, 30 Oct 2001 21:09:55 +0000 (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.

23 years agoAlways use --dvips-safe when generating HTML for the standard documentation
Fred Drake [Tue, 30 Oct 2001 16:28:46 +0000 (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.

23 years agoAdd a new option, --dvips-safe, which sets the $DVIPS_SAFE option in
Fred Drake [Tue, 30 Oct 2001 16:09:51 +0000 (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.

23 years agoVarious minor rewrites
Andrew M. Kuchling [Tue, 30 Oct 2001 14:35:03 +0000 (14:35 +0000)]
Various minor rewrites
Bump version number

23 years agoCorrections noted by Michael McLay
Andrew M. Kuchling [Tue, 30 Oct 2001 14:22:11 +0000 (14:22 +0000)]
Corrections noted by Michael McLay

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

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

23 years agoOn the macintosh don't take a quick exit in find_module() for frozen submodule import...
Jack Jansen [Tue, 30 Oct 2001 13:08:39 +0000 (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.

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

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

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

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

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

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

23 years agoFix SF bug #456386: test_commands regression failure (Andrew Dalke)
Guido van Rossum [Tue, 30 Oct 2001 03:17:30 +0000 (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.

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

23 years agoChange the limit on the input size for b2a_base64 to what will fit in
Guido van Rossum [Tue, 30 Oct 2001 03:00:52 +0000 (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.

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

23 years agoMinimal test for __del__ hook.
Guido van Rossum [Tue, 30 Oct 2001 02:33:02 +0000 (02:33 +0000)]
Minimal test for __del__ hook.

23 years agoPySocketSock_connect_ex(): On Windows, return the correct Windows exit
Tim Peters [Tue, 30 Oct 2001 01:26:49 +0000 (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.

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.