]> granicus.if.org Git - python/log
python
22 years agoMention new encoding.
Marc-André Lemburg [Fri, 12 Jul 2002 14:40:04 +0000 (14:40 +0000)]
Mention new encoding.

22 years agoPalm OS encoding from Sjoerd Mullender
Marc-André Lemburg [Fri, 12 Jul 2002 14:36:22 +0000 (14:36 +0000)]
Palm OS encoding from Sjoerd Mullender

22 years agoChange _begin() back to begin().
Jeremy Hylton [Fri, 12 Jul 2002 14:04:09 +0000 (14:04 +0000)]
Change _begin() back to begin().

Client code could create responses explicitly.

22 years agoFernando Pérez of SF bug 579701 fame.
Guido van Rossum [Fri, 12 Jul 2002 13:13:28 +0000 (13:13 +0000)]
Fernando Pérez of SF bug 579701 fame.

22 years agoFix SF bug 579701 (Fernando Pérez); an input line consisting of one or
Guido van Rossum [Fri, 12 Jul 2002 13:10:53 +0000 (13:10 +0000)]
Fix SF bug 579701 (Fernando Pérez); an input line consisting of one or
more spaces only crashed pdb.

While I was at it, cleaned up some style nits (spaces between function
and parenthesis, and redundant parentheses in if statement).

22 years agominor fixes, removed obsolete warning
Just van Rossum [Fri, 12 Jul 2002 12:06:17 +0000 (12:06 +0000)]
minor fixes, removed obsolete warning

22 years agoWell, Fred never did explain why the code to determine whether the
Michael W. Hudson [Fri, 12 Jul 2002 09:16:44 +0000 (09:16 +0000)]
Well, Fred never did explain why the code to determine whether the
calling Python was installed was so complicated, so I simplified it.

This should get the snake-farm's build scripts working again.

22 years agoHAVE_LIMITS_H -- raise #error if not defined; limits.h is std C
Tim Peters [Fri, 12 Jul 2002 05:01:20 +0000 (05:01 +0000)]
HAVE_LIMITS_H -- raise #error if not defined; limits.h is std C
ULONG_MAX -- removed; std C requires it in limits.h
LONGLONG_MAX -- removed; never used
ULONGLONGMAX -- removed; never used

22 years agoremove decl of unused variable
Jeremy Hylton [Thu, 11 Jul 2002 22:02:33 +0000 (22:02 +0000)]
remove decl of unused variable

22 years agoDo more robust test of whether global objects are accessible.
Jeremy Hylton [Thu, 11 Jul 2002 22:01:40 +0000 (22:01 +0000)]
Do more robust test of whether global objects are accessible.

PyImport_ImportModule() is not guaranteed to return a module object.
When another type of object was returned, the PyModule_GetDict() call
return NULL and the subsequent GetItem() seg faulted.

Bug fix candidate.

22 years agodocompare(): Use PyTuple_New instead of Py_BuildValue to build compare's
Tim Peters [Thu, 11 Jul 2002 21:46:16 +0000 (21:46 +0000)]
docompare():  Use PyTuple_New instead of Py_BuildValue to build compare's
arg tuple.  This was suggested on c.l.py but afraid I can't find the msg
again for proper attribution.  For

    list.sort(cmp)

where list is a list of random ints, and cmp is __builtin__.cmp, this
yields an overall 50-60% speedup on my Win2K box.  Of course this is a
best case, because the overhead of calling cmp relative to the cost of
actually comparing two ints is at an extreme.  Nevertheless it's huge
bang for the buck.  An additionak 20-30% can be bought by making the arg
tuple an immortal static (avoiding all but "the first" PyTuple_New), but
that's tricky to make correct since docompare needs to be reentrant.  So
this picks the cherry and leaves the pits for Fred <wink>.

Note that this makes no difference to the

    list.sort()

case; an arg tuple gets built only if the user specifies an explicit
sort function.

22 years agomove make_eiffel_method() out of base metaclass
Jeremy Hylton [Thu, 11 Jul 2002 21:17:26 +0000 (21:17 +0000)]
move make_eiffel_method() out of base metaclass

22 years agoRemove list prenpost. It's not used any longer.
Jeremy Hylton [Thu, 11 Jul 2002 21:14:14 +0000 (21:14 +0000)]
Remove list prenpost.  It's not used any longer.

22 years agoAdd a call to a Sub() method that actually works.
Jeremy Hylton [Thu, 11 Jul 2002 21:09:34 +0000 (21:09 +0000)]
Add a call to a Sub() method that actually works.

22 years agoAdd Enum and Eiffel examples using new-style classes.
Jeremy Hylton [Thu, 11 Jul 2002 21:08:06 +0000 (21:08 +0000)]
Add Enum and Eiffel examples using new-style classes.

22 years agoMake another pass through Misc/NEWS and add stuff.
Andrew M. Kuchling [Thu, 11 Jul 2002 20:50:34 +0000 (20:50 +0000)]
Make another pass through Misc/NEWS and add stuff.
Bump version number.

22 years ago_structure(): Don't get the whole Content-Type: header, just get the
Barry Warsaw [Thu, 11 Jul 2002 20:24:36 +0000 (20:24 +0000)]
_structure(): Don't get the whole Content-Type: header, just get the
type with get_type().

22 years agoRepair example code in doc string.
Jeremy Hylton [Thu, 11 Jul 2002 20:22:11 +0000 (20:22 +0000)]
Repair example code in doc string.

Bug fix candiadte.

22 years agoAdd some items
Andrew M. Kuchling [Thu, 11 Jul 2002 20:09:50 +0000 (20:09 +0000)]
Add some items
Expand the "Other Language Changes" section
Rewrite various passages.

22 years ago[Bug #567607] Suggest METH_NOARGS to replace PyArg_NoArgs
Andrew M. Kuchling [Thu, 11 Jul 2002 19:27:46 +0000 (19:27 +0000)]
[Bug #567607] Suggest METH_NOARGS to replace PyArg_NoArgs

22 years agotest_trashcan() and supporting class Ouch(): Jeremy noted that this test
Tim Peters [Thu, 11 Jul 2002 19:07:45 +0000 (19:07 +0000)]
test_trashcan() and supporting class Ouch():  Jeremy noted that this test
takes much longer to run in the context of the test suite than when run in
isolation.  That's because it forces a large number of full collections,
which take time proportional to the total number of gc'ed objects in the
whole system.

But since the dangerous implementation trickery that caused this test to
fail in 2.0, 2.1 and 2.2 doesn't exist in 2.3 anymore (the trashcan
mechanism stopped doing evil things when the possibility for compiling
without cyclic gc was taken away), such an expensive test is no longer
justified.  This checkin leaves the test intact, but fiddles the
constants to reduce the runtime by about a factor of 5.

22 years ago_dispatch(): Comment improvements.
Barry Warsaw [Thu, 11 Jul 2002 18:48:40 +0000 (18:48 +0000)]
_dispatch(): Comment improvements.

22 years agosubtype_resurrection(): Removed unused import.
Tim Peters [Thu, 11 Jul 2002 18:39:56 +0000 (18:39 +0000)]
subtype_resurrection():  Removed unused import.

22 years agoExtend function() to support an optional closure argument.
Jeremy Hylton [Thu, 11 Jul 2002 18:30:27 +0000 (18:30 +0000)]
Extend function() to support an optional closure argument.

Also, simplify some ref counting for other optional arguments.

22 years agosubtype_resurrection(): The test suite with -l properly reported the
Tim Peters [Thu, 11 Jul 2002 18:26:21 +0000 (18:26 +0000)]
subtype_resurrection():  The test suite with -l properly reported the
immortal object here as a leak.  Made the object mortal again at the end.

22 years agoDon't stomp on an exception set by PyCell_Get()
Jeremy Hylton [Thu, 11 Jul 2002 16:56:38 +0000 (16:56 +0000)]
Don't stomp on an exception set by PyCell_Get()

22 years agoI trust the parser accelators are getting added :-).
Jeremy Hylton [Thu, 11 Jul 2002 15:43:37 +0000 (15:43 +0000)]
I trust the parser accelators are getting added :-).

22 years agoRepaired optimistic comment in new test.
Tim Peters [Thu, 11 Jul 2002 07:09:42 +0000 (07:09 +0000)]
Repaired optimistic comment in new test.

22 years agoAdded a test that provokes the hypothesized (in my last checkin comment)
Tim Peters [Thu, 11 Jul 2002 06:56:07 +0000 (06:56 +0000)]
Added a test that provokes the hypothesized (in my last checkin comment)
debug-build failure when an instance of a new-style class is resurrected
by a __del__ method -- we simply never had any code that tried this.

This is already fixed in 2.3 CVS.  In 2.2.1, it blows up via

    Fatal Python error: GC object already in linked list

I'll fix it in 2.2.1 CVS next.

22 years agoobject.h special-build macro minefield: renamed all the new lexical
Tim Peters [Thu, 11 Jul 2002 06:23:50 +0000 (06:23 +0000)]
object.h special-build macro minefield:  renamed all the new lexical
helper macros to something saner, and used them appropriately in other
files too, to reduce #ifdef blocks.

classobject.c, instance_dealloc():  One of my worst Python Memories is
trying to fix this routine a few years ago when COUNT_ALLOCS was defined
but Py_TRACE_REFS wasn't.  The special-build code here is way too
complicated.  Now it's much simpler.  Difference:  in a Py_TRACE_REFS
build, the instance is no longer in the doubly-linked list of live
objects while its __del__ method is executing, and that may be visible
via sys.getobjects() called from a __del__ method.  Tough -- the object
is presumed dead while its __del__ is executing anyway, and not calling
_Py_NewReference() at the start allows enormous code simplification.

typeobject.c, call_finalizer():  The special-build instance_dealloc()
pain apparently spread to here too via cut-'n-paste, and this is much
simpler now too.  In addition, I didn't understand why this routine
was calling _PyObject_GC_TRACK() after a resurrection, since there's no
plausible way _PyObject_GC_UNTRACK() could have been called on the
object by this point.  I suspect it was left over from pasting the
instance_delloc() code.  Instead asserted that the object is still
tracked.  Caution:  I suspect we don't have a test that actually
exercises the subtype_dealloc() __del__-resurrected-me code.

22 years ago1. Prevent Undo before IOmark in PyShell.PyShell
Kurt B. Kaiser [Thu, 11 Jul 2002 04:33:41 +0000 (04:33 +0000)]
1. Prevent Undo before IOmark in PyShell.PyShell
2. Consolidate Undo code in EditorWindow.EditorWindow
3. Remove Formatting and Run menus from PyShell

22 years agoReplace rare tabs with 4 spaces, assuming that's what was intended.
Guido van Rossum [Thu, 11 Jul 2002 01:04:32 +0000 (01:04 +0000)]
Replace rare tabs with 4 spaces, assuming that's what was intended.

22 years agoNote the existence of SpecialBuilds.txt.
Guido van Rossum [Thu, 11 Jul 2002 01:01:49 +0000 (01:01 +0000)]
Note the existence of SpecialBuilds.txt.

22 years agoNoted the releases in which COUNT_ALLOCS can blow up.
Tim Peters [Thu, 11 Jul 2002 00:38:05 +0000 (00:38 +0000)]
Noted the releases in which COUNT_ALLOCS can blow up.

22 years agoRecorded the introduction release for each gimmick, as best I was able to
Tim Peters [Thu, 11 Jul 2002 00:23:58 +0000 (00:23 +0000)]
Recorded the introduction release for each gimmick, as best I was able to
reconstruct that info.
Filled out some sketchy explanations of pragmatics.

22 years agoSome clarifications.
Tim Peters [Thu, 11 Jul 2002 00:02:52 +0000 (00:02 +0000)]
Some clarifications.

22 years agoDocumented PYMALLOC_DEBUG. This completes primary coverage of all the
Tim Peters [Wed, 10 Jul 2002 19:29:49 +0000 (19:29 +0000)]
Documented PYMALLOC_DEBUG.  This completes primary coverage of all the
"special builds" I ever use.  If you use others, document them here, or
don't be surprised if I rip out the code for them <0.5 wink>.

22 years agoDocument gc.get_objects().
Fred Drake [Wed, 10 Jul 2002 19:21:07 +0000 (19:21 +0000)]
Document gc.get_objects().
Closes SF bug #578308.

22 years agoClarified sys.getobjects() pragmatics.
Tim Peters [Wed, 10 Jul 2002 18:47:03 +0000 (18:47 +0000)]
Clarified sys.getobjects() pragmatics.

22 years agoRemoved no-longer-relevant explanation of "alpha" builds.
Tim Peters [Wed, 10 Jul 2002 17:05:14 +0000 (17:05 +0000)]
Removed no-longer-relevant explanation of "alpha" builds.

22 years agoUglified the new Py_REF_DEBUG (etc) lexical helper macro definitions so
Tim Peters [Wed, 10 Jul 2002 06:34:15 +0000 (06:34 +0000)]
Uglified the new Py_REF_DEBUG (etc) lexical helper macro definitions so
that their uses can be prettier.  I've come to despise the names I picked
for these things, though, and expect to change all of them -- I changed
a bunch of other files to use them (replacing #ifdef blocks), but the
names were so obscure out of context that I backed that all out again.

22 years agoRemove the unused, and therefore distracting, "Alpha" build configurations.
Mark Hammond [Wed, 10 Jul 2002 06:22:10 +0000 (06:22 +0000)]
Remove the unused, and therefore distracting, "Alpha" build configurations.

22 years agoassertHasattr(): Made failure msg better than useless.
Tim Peters [Wed, 10 Jul 2002 02:37:21 +0000 (02:37 +0000)]
assertHasattr():  Made failure msg better than useless.
test_others():  httplib failed in two new ways.  Blame Thumb Boy <wink>.

22 years agoFix for SF bug 579107.
Jeremy Hylton [Tue, 9 Jul 2002 21:22:36 +0000 (21:22 +0000)]
Fix for SF bug 579107.

The recent SSL changes resulted in important, but subtle changes to
close() semantics.  Since builtin socket makefile() is not called for
SSL connections, we don't get separately closeable fds for connection
and response.  Comments in the code explain how to restore makefile
semantics.

Bug fix candidate.

22 years agoTypo repair.
Tim Peters [Tue, 9 Jul 2002 19:27:20 +0000 (19:27 +0000)]
Typo repair.

22 years agoMoved COUNT_ALLOCS down and finished writing its description.
Tim Peters [Tue, 9 Jul 2002 19:24:54 +0000 (19:24 +0000)]
Moved COUNT_ALLOCS down and finished writing its description.

22 years agoCheckin comment.
Tim Peters [Tue, 9 Jul 2002 18:48:32 +0000 (18:48 +0000)]
Checkin comment.

22 years agoActualized descrintro.html URL.
Guido van Rossum [Tue, 9 Jul 2002 18:44:09 +0000 (18:44 +0000)]
Actualized descrintro.html URL.

22 years agoNew file to try to document the "special build" preprocessor symbols.
Tim Peters [Tue, 9 Jul 2002 18:35:34 +0000 (18:35 +0000)]
New file to try to document the "special build" preprocessor symbols.
Incomplete.  Add to it!  Once it settles down, it would make a nice
appendix in the real docs.

22 years ago_Py_AskYesNo(): Removed this function. It was defined only in a
Tim Peters [Tue, 9 Jul 2002 18:22:55 +0000 (18:22 +0000)]
_Py_AskYesNo():  Removed this function.  It was defined only in a
Py_TRACE_REFS build, but wasn't referenced.

22 years agondiffAssertEqual(): Stringify the arguments before running
Barry Warsaw [Tue, 9 Jul 2002 16:36:36 +0000 (16:36 +0000)]
ndiffAssertEqual(): Stringify the arguments before running
.splitlines() on them, since they may be Header instances.

test_multilingual(), test_header_ctor_default_args(): New tests of
make_header() and that Header can take all default arguments.

22 years agomake_header(): New function to take the output of decode_header() and
Barry Warsaw [Tue, 9 Jul 2002 16:33:47 +0000 (16:33 +0000)]
make_header(): New function to take the output of decode_header() and
create a Header instance.  Closes feature request #539481.

Header.__init__(): Allow the initial string to be omitted.

__eq__(), __ne__(): Support rich comparisons for equality of Header
instances withy Header instances or strings.

Also, update a bunch of docstrings.

22 years agoFix SF Bug 564931: compile() traceback must include filename.
Thomas Heller [Tue, 9 Jul 2002 09:23:27 +0000 (09:23 +0000)]
Fix SF Bug 564931: compile() traceback must include filename.

22 years agoNote that unicode() can raise LookupError for unknown codecs.
Fred Drake [Tue, 9 Jul 2002 05:25:46 +0000 (05:25 +0000)]
Note that unicode() can raise LookupError for unknown codecs.
Closes SF bug #513666.

22 years agoRemove unused variable.
Fred Drake [Tue, 9 Jul 2002 03:24:32 +0000 (03:24 +0000)]
Remove unused variable.

22 years agoThe Py_REF_DEBUG/COUNT_ALLOCS/Py_TRACE_REFS macro minefield: added
Tim Peters [Tue, 9 Jul 2002 02:57:01 +0000 (02:57 +0000)]
The Py_REF_DEBUG/COUNT_ALLOCS/Py_TRACE_REFS macro minefield:  added
more trivial lexical helper macros so that uses of these guys expand
to nothing at all when they're not enabled.  This should help sub-
standard compilers that can't do a good job of optimizing away the
previous "(void)0" expressions.

Py_DECREF:  There's only one definition of this now.  Yay!  That
was that last one in the family defined multiple times in an #ifdef
maze.

Py_FatalError():  Changed the char* signature to const char*.

_Py_NegativeRefcount():  New helper function for the Py_REF_DEBUG
expansion of Py_DECREF.  Calling an external function cuts down on
the volume of generated code.  The previous inline expansion of abort()
didn't work as intended on Windows (the program often kept going, and
the error msg scrolled off the screen unseen).  _Py_NegativeRefcount
calls Py_FatalError instead, which captures our best knowledge of
how to abort effectively across platforms.

22 years agoAnthony Baxter's patch for non-strict parsing. This adds a `strict'
Barry Warsaw [Tue, 9 Jul 2002 02:50:02 +0000 (02:50 +0000)]
Anthony Baxter's patch for non-strict parsing.  This adds a `strict'
argument to the constructor -- defaulting to true -- which is
different than Anthony's approach of using global state.

parse(), parsestr(): Grow a `headersonly' argument which stops parsing
once the header block has been seen, i.e. it does /not/ parse or even
read the body of the message.  This is used for parsing message/rfc822
type messages.

We need test cases for the non-strict parsing.  Anthony will supply
these.

_parsebody(): We can get rid of the isdigest end-of-line kludges,
although we still need to know if we're parsing a multipart/digest so
we can set the default type accordingly.

22 years agoAdd the concept of a "default type". Normally the default type is
Barry Warsaw [Tue, 9 Jul 2002 02:46:12 +0000 (02:46 +0000)]
Add the concept of a "default type".  Normally the default type is
text/plain but the RFCs state that inside a multipart/digest, the
default type is message/rfc822.  To preserve idempotency, we need a
separate place to define the default type than the Content-Type:
header.

get_default_type(), set_default_type(): Accessor and mutator methods
for the default type.

22 years ago__init__(): Don't attach the subparts if its an empty tuple. If the
Barry Warsaw [Tue, 9 Jul 2002 02:44:26 +0000 (02:44 +0000)]
__init__(): Don't attach the subparts if its an empty tuple.  If the
boundary was given in the arguments, call set_boundary().

22 years agoclone(): A new method for creating a clone of this generator (for
Barry Warsaw [Tue, 9 Jul 2002 02:43:47 +0000 (02:43 +0000)]
clone(): A new method for creating a clone of this generator (for
recursive generation).

_dispatch(): If the message object doesn't have a Content-Type:
header, check its default type instead of assuming it's text/plain.
This makes for correct generation of message/rfc822 containers.

_handle_multipart(): We can get rid of the isdigest kludge.  Just
print the message as normal and everything will work out correctly.

_handle_mulitpart_digest(): We don't need this anymore either.

22 years ago__init__(): Be sure to set the default type to message/rfc822.
Barry Warsaw [Tue, 9 Jul 2002 02:40:35 +0000 (02:40 +0000)]
__init__(): Be sure to set the default type to message/rfc822.

22 years ago_structure(): A handy little debugging aid that I don't (yet) intend
Barry Warsaw [Tue, 9 Jul 2002 02:39:07 +0000 (02:39 +0000)]
_structure(): A handy little debugging aid that I don't (yet) intend
to make public, but that others might still find useful.

22 years agoTestEmailBase.ndiffAssertEqual(): Python 2.1's difflib doesn't have an
Barry Warsaw [Tue, 9 Jul 2002 02:38:24 +0000 (02:38 +0000)]
TestEmailBase.ndiffAssertEqual(): Python 2.1's difflib doesn't have an
ndiff function, so just alias it to assertEqual in that case.

Various: make sure all openfile()/read()'s are wrapped in
try/finally's so the file gets closed.

A bunch of new tests checking the corner cases for multipart/digest
and message/rfc822.

22 years agoNew files which test the corners of multipart/message and
Barry Warsaw [Tue, 9 Jul 2002 02:36:10 +0000 (02:36 +0000)]
New files which test the corners of multipart/message and
message/rfc822 compliance.

22 years agoWith the addition of Oleg's support for RFC 2231, it's time to bump
Barry Warsaw [Tue, 9 Jul 2002 02:13:10 +0000 (02:13 +0000)]
With the addition of Oleg's support for RFC 2231, it's time to bump
the version number to 2.1.

22 years agoSF bug 578752: COUNT_ALLOCS vs heap types
Tim Peters [Mon, 8 Jul 2002 22:11:52 +0000 (22:11 +0000)]
SF bug 578752: COUNT_ALLOCS vs heap types
Repair segfaults and infinite loops in COUNT_ALLOCS builds in the
presence of new-style (heap-allocated) classes/types.

Bugfix candidate.  I'll backport this to 2.2.  It's irrelevant in 2.1.

22 years agoThe readme file said that OSX Carbon modules were only built for
Jack Jansen [Mon, 8 Jul 2002 21:39:36 +0000 (21:39 +0000)]
The readme file said that OSX Carbon modules were only built for
-enable-framework builds, but setup.py built them anyway. Fixed.
Also normalized whitespace.

Bugfix candidate.

22 years agoPyNode_AddChild() and fancy_roundup(): Be paranoid about int overflow.
Tim Peters [Mon, 8 Jul 2002 19:11:07 +0000 (19:11 +0000)]
PyNode_AddChild() and fancy_roundup():  Be paranoid about int overflow.

22 years agoRemove the configure option for disabling the reference cycle GC.
Neil Schemenauer [Mon, 8 Jul 2002 14:47:12 +0000 (14:47 +0000)]
Remove the configure option for disabling the reference cycle GC.

22 years agoFix typo reported by Kent Engström, and a bunch of broken markup.
Fred Drake [Mon, 8 Jul 2002 14:42:22 +0000 (14:42 +0000)]
Fix typo reported by Kent Engström, and a bunch of broken markup.

22 years agoFix typo: "an Unicode string" --> "a Unicode string"
Fred Drake [Mon, 8 Jul 2002 14:29:05 +0000 (14:29 +0000)]
Fix typo:  "an Unicode string" --> "a Unicode string"
Clarify the return value when the parameter is a Unicode object.

22 years agoFixed a typo and updated information about using the Times fonts when
Fred Drake [Mon, 8 Jul 2002 14:10:41 +0000 (14:10 +0000)]
Fixed a typo and updated information about using the Times fonts when
formatting PostScript documents.  Reported by Dave Kuhlman.

22 years agoAdded font-setting line (and associated comments) to the A4 version of
Fred Drake [Mon, 8 Jul 2002 14:08:48 +0000 (14:08 +0000)]
Added font-setting line (and associated comments) to the A4 version of
this file; the lack of this was causing the A4 version of tutorial to
use really bad Type 3 fonts instead of Type 1 fonts, which also
bloated the file size substantially.

I thought there was a SourceForge bug for this, but couldn't find it.

22 years agoGot rid of symlink target, and in stead have "make dontinstallmacsubtree"
Jack Jansen [Mon, 8 Jul 2002 13:34:23 +0000 (13:34 +0000)]
Got rid of symlink target, and in stead have "make dontinstallmacsubtree"
which uses a .pth file to add the Mac/Lib from your source tree to sys.path.

Also put the Python version number in a variable.Killed by signal 2.

22 years agoChange the "__ private" names to "_ protected"; this has been a pain for
Fred Drake [Mon, 8 Jul 2002 12:28:06 +0000 (12:28 +0000)]
Change the "__ private" names to "_ protected"; this has been a pain for
subclassing so many times it should simply be changed.

22 years agoGot rid of special case for Macintosh realloc slowdown: Tim fixed the problem.
Jack Jansen [Mon, 8 Jul 2002 10:07:25 +0000 (10:07 +0000)]
Got rid of special case for Macintosh realloc slowdown: Tim fixed the problem.

22 years agoDefine WITH_PYMALLOC as 1
Jack Jansen [Mon, 8 Jul 2002 10:05:23 +0000 (10:05 +0000)]
Define WITH_PYMALLOC as 1

22 years agoPyNode_AddChild(): Do aggressive over-allocation when the number of
Tim Peters [Mon, 8 Jul 2002 06:32:09 +0000 (06:32 +0000)]
PyNode_AddChild():  Do aggressive over-allocation when the number of
children gets large, to avoid severe platform realloc() degeneration
in extreme cases (like test_longexp).

Bugfix candidate.

This was doing extremely timid over-allocation, just rounding up to the
nearest multiple of 3.  Now so long as the number of children is <= 128,
it rounds up to a multiple of 4 but via a much faster method.  When the
number of children exceeds 128, though, and more space is needed, it
doubles the capacity.  This is aggressive over-allocation.

SF patch <http://www.python.org/sf/578297> has Andrew MacIntyre using
PyMalloc in the parser to overcome platform malloc problems in
test_longexp on OS/2 EMX.  Jack Jansen notes there that it didn't help
him on the Mac, because the Mac has problems with frequent ever-growing
reallocs, not just with gazillions of teensy mallocs.  Win98 has no
visible problems with test_longexp, but I tried boosting the test-case
size and soon got "senseless" MemoryErrors out of it, and soon after
crashed the OS:  as I've seen in many other contexts before, while the
Win98 realloc remains zippy in bad cases, it leads to extreme
fragmentation of user address space, to the point that the OS barfs.

I don't yet know whether this fixes Jack's Mac problems, but it does cure
Win98's problems when boosting the test case size.  It also speeds
test_longexp in its unaltered state.

22 years ago- Got rid if WITH_CYCLE_GC
Jack Jansen [Sun, 7 Jul 2002 20:54:44 +0000 (20:54 +0000)]
- Got rid if WITH_CYCLE_GC
- Cleaned up Python banner string, so the normal build for MacPython 2.3
  will have a short banner.

22 years agoRearranged and added comments to object.h, to clarify many things
Tim Peters [Sun, 7 Jul 2002 19:59:50 +0000 (19:59 +0000)]
Rearranged and added comments to object.h, to clarify many things
that have taken me "too long" to reverse-engineer over the years.
Vastly reduced the nesting level and redundancy of #ifdef-ery.
Took a light stab at repairing comments that are no longer true.

sys_gettotalrefcount():  Changed to enable under Py_REF_DEBUG.
It was enabled under Py_TRACE_REFS, which was much heavier than
necessary.  sys.gettotalrefcount() is now available in a
Py_REF_DEBUG-only build.

22 years agoFix from SF patch #527518: proxy config with user+pass authentication.
Jeremy Hylton [Sun, 7 Jul 2002 16:57:35 +0000 (16:57 +0000)]
Fix from SF patch #527518: proxy config with user+pass authentication.

Bug fix candidate.

22 years agoRemoved 3 unlikely #includes that were only needed for the non-gc flavor
Tim Peters [Sun, 7 Jul 2002 16:52:50 +0000 (16:52 +0000)]
Removed 3 unlikely #includes that were only needed for the non-gc flavor
of the trashcan code.

22 years agoFix for SF bug #432621: httplib: multiple Set-Cookie headers
Jeremy Hylton [Sun, 7 Jul 2002 16:51:37 +0000 (16:51 +0000)]
Fix for SF bug #432621: httplib: multiple Set-Cookie headers

If multiple header fields with the same name occur, they are combined
according to the rules in RFC 2616 sec 4.2:

Appending each subsequent field-value to the first, each separated by
a comma. The order in which header fields with the same field-name are
received is significant to the interpretation of the combined field
value.

22 years agoTrashcan cleanup: Now that cyclic gc is always there, the trashcan
Tim Peters [Sun, 7 Jul 2002 05:13:56 +0000 (05:13 +0000)]
Trashcan cleanup:  Now that cyclic gc is always there, the trashcan
mechanism is no longer evil:  it no longer plays dangerous games with
the type pointer or refcounts, and objects in extension modules can play
along too without needing to edit the core first.

Rewrote all the comments to explain this, and (I hope) give clear
guidance to extension authors who do want to play along.  Documented
all the functions.  Added more asserts (it may no longer be evil, but
it's still dangerous <0.9 wink>).  Rearranged the generated code to
make it clearer, and to tolerate either the presence or absence of a
semicolon after the macros.  Rewrote _PyTrash_destroy_chain() to call
tp_dealloc directly; it was doing a Py_DECREF again, and that has all
sorts of obscure distorting effects in non-release builds (Py_DECREF
was already called on the object!).  Removed Christian's little "embedded
change log" comments -- that's what checkin messages are for, and since
it was impossible to correlate the comments with the code that changed,
I found them merely distracting.

22 years agoRemoved WITH_CYCLE_GC #ifdef-ery. Holes:
Tim Peters [Sun, 7 Jul 2002 03:59:34 +0000 (03:59 +0000)]
Removed WITH_CYCLE_GC #ifdef-ery.  Holes:

+ I'm not sure what to do about configure.in.  Left it alone.

+ Ditto pyexpat.c.  Fred or Martin will know what to do.

22 years agoFix SF bug #575360
Jeremy Hylton [Sat, 6 Jul 2002 18:55:01 +0000 (18:55 +0000)]
Fix SF bug #575360

Subclasses of Exception that define an __init__ must call
Exception.__init__ or define self.args.  Otherwise, str() will fail.

Bug fix candidate.

22 years agoHandle HTTP/0.9 responses.
Jeremy Hylton [Sat, 6 Jul 2002 18:48:07 +0000 (18:48 +0000)]
Handle HTTP/0.9 responses.

Section 19.6 of RFC 2616 (HTTP/1.1):

   It is beyond the scope of a protocol specification to mandate
   compliance with previous versions. HTTP/1.1 was deliberately
   designed, however, to make supporting previous versions easy....

   And we would expect HTTP/1.1 clients to:

      - recognize the format of the Status-Line for HTTP/1.0 and 1.1
        responses;

      - understand any valid response in the format of HTTP/0.9, 1.0, or
        1.1.

The changes to the code do handle response in the format of HTTP/0.9.
Some users may consider this a bug because all responses with a
sufficiently corrupted status line will look like an HTTP/0.9
response.  These users can pass strict=1 to the HTTP constructors to
get a BadStatusLine exception instead.

While this is a new feature of sorts, it enhances the robustness of
the code (be tolerant in what you accept).  Thus, I consider it a bug
fix candidate.

XXX strict needs to be documented.

22 years agoModifying EditorWindow causes breakpoints in that module to be removed
Kurt B. Kaiser [Sat, 6 Jul 2002 04:22:25 +0000 (04:22 +0000)]
Modifying EditorWindow causes breakpoints in that module to be removed
from both sides of the split debugger.
M Debugger.py
M EditorWindow.py

22 years agoDecent burial for venerated ancestor (urn in attic)
Kurt B. Kaiser [Sat, 6 Jul 2002 01:20:51 +0000 (01:20 +0000)]
Decent burial for venerated ancestor  (urn in attic)

22 years agoRemove dead code.
Kurt B. Kaiser [Sat, 6 Jul 2002 01:07:15 +0000 (01:07 +0000)]
Remove dead code.

22 years ago1. Test Sourceforge checkin, idle-dev posting
Kurt B. Kaiser [Sat, 6 Jul 2002 00:51:33 +0000 (00:51 +0000)]
1. Test Sourceforge checkin, idle-dev posting
2. Remove extraneous comment

22 years agoCombine OldStackViewer.py with Debugger.py, removing dead code.
unknown [Fri, 5 Jul 2002 22:05:24 +0000 (22:05 +0000)]
Combine OldStackViewer.py with Debugger.py, removing dead code.
M Debugger.py       : Incorporate StackViewer, NamespaceViewer classes
M StackViewer.py    : remove import OldStackViewer
U OldStackViewer.py : remove file

22 years agoprintlist(): Replaced the guts with a call to textwrap. Yay!
Tim Peters [Thu, 4 Jul 2002 19:45:06 +0000 (19:45 +0000)]
printlist():  Replaced the guts with a call to textwrap.  Yay!

22 years agogc_list_move defined but not used.
Michael W. Hudson [Thu, 4 Jul 2002 17:11:36 +0000 (17:11 +0000)]
gc_list_move defined but not used.

22 years agoDocstring improvements. In particular, added docstrings for the
Greg Ward [Thu, 4 Jul 2002 14:51:49 +0000 (14:51 +0000)]
Docstring improvements.  In particular, added docstrings for the
standalone wrap() and fill() functions.  This should address the
misunderstanding that led to SF bug 577106.

22 years agoFix a typo.
Thomas Heller [Thu, 4 Jul 2002 08:36:53 +0000 (08:36 +0000)]
Fix a typo.

22 years agoRevise asyncore documentation and document asynchat for the first time.
Steve Holden [Wed, 3 Jul 2002 18:36:39 +0000 (18:36 +0000)]
Revise asyncore documentation and document asynchat for the first time.

22 years agoNo need to be ambiguous about *how* extended slices and built-in types
Fred Drake [Wed, 3 Jul 2002 12:02:01 +0000 (12:02 +0000)]
No need to be ambiguous about *how* extended slices and built-in types
have changed.

Uncomment a heading so that PendingDeprecationWarning doesn't seem so
out of place.

22 years agoFix up a few more consistency nits and incorrectly applied markup.
Fred Drake [Wed, 3 Jul 2002 05:08:48 +0000 (05:08 +0000)]
Fix up a few more consistency nits and incorrectly applied markup.
Further clarify the English-centricity of fix_sentence_endings.

22 years agoappend(): Clarify the expected type of charset.
Barry Warsaw [Wed, 3 Jul 2002 05:04:04 +0000 (05:04 +0000)]
append(): Clarify the expected type of charset.