]> granicus.if.org Git - python/log
python
22 years agoWe need to (require 'compile) to guarantee that compile-internal is
Barry Warsaw [Wed, 17 Jul 2002 13:45:00 +0000 (13:45 +0000)]
We need to (require 'compile) to guarantee that compile-internal is
defined.  /Really/ closes SF # 580631.

22 years agoUse sys.executable to run Python, as suggested by Neal Norwitz.
Tim Peters [Wed, 17 Jul 2002 00:34:26 +0000 (00:34 +0000)]
Use sys.executable to run Python, as suggested by Neal Norwitz.

22 years agoThere's no need for generators to define an explicit next() method.
Tim Peters [Wed, 17 Jul 2002 00:15:22 +0000 (00:15 +0000)]
There's no need for generators to define an explicit next() method.

22 years agoBunch of tests to make sure that StopIteration is a sink state.
Guido van Rossum [Tue, 16 Jul 2002 21:48:11 +0000 (21:48 +0000)]
Bunch of tests to make sure that StopIteration is a sink state.

22 years agoFix typos and such caught by the pycheckerbot.
Jeremy Hylton [Tue, 16 Jul 2002 21:41:43 +0000 (21:41 +0000)]
Fix typos and such caught by the pycheckerbot.

22 years agoWhitespace normalization.
Tim Peters [Tue, 16 Jul 2002 21:35:23 +0000 (21:35 +0000)]
Whitespace normalization.

22 years agoSend HTTP requests with a single send() call instead of many.
Jeremy Hylton [Tue, 16 Jul 2002 21:21:11 +0000 (21:21 +0000)]
Send HTTP requests with a single send() call instead of many.

The implementation now stores all the lines of the request in a buffer
and makes a single send() call when the request is finished,
specifically when endheaders() is called.

This appears to improve performance.  The old code called send() for
each line.  The sends are all short, so they caused bad interactions
with the Nagle algorithm and delayed acknowledgements.  In simple
tests, the second packet was delayed by 100s of ms.  The second send was
delayed by the Nagle algorithm, waiting for the ack.  The delayed ack
strategy delays the ack in hopes of piggybacking it on a data packet,
but the server won't send any data until it receives the complete
request.

This change minimizes the problem that Nagle + delayed ack will cause
a problem, although a request large enough to be broken into two
packets will still suffer some delay.  Luckily the MSS is large enough
to accomodate most single packets.

XXX Bug fix candidate?

22 years agoRemove the next() method -- one is supplied automatically by
Guido van Rossum [Tue, 16 Jul 2002 21:02:42 +0000 (21:02 +0000)]
Remove the next() method -- one is supplied automatically by
PyType_Ready() because the tp_iternext slot is set (fortunately,
because using the tp_iternext implementation for the the next()
implementation is buggy).  Also changed the allocation order in
enum_next() so that the underlying iterator is only moved ahead when
we have successfully allocated the result tuple and index.

22 years agoRemove the next() method -- one is supplied automatically by
Guido van Rossum [Tue, 16 Jul 2002 20:47:50 +0000 (20:47 +0000)]
Remove the next() method -- one is supplied automatically by
PyType_Ready() because the tp_iternext slot is set.  Also removed the
redundant (and expensive!) call to raise StopIteration from
rangeiter_next().

22 years agoMake StopIteration a sink state. This is done by clearing out the
Guido van Rossum [Tue, 16 Jul 2002 20:30:22 +0000 (20:30 +0000)]
Make StopIteration a sink state.  This is done by clearing out the
di_dict field when the end of the list is reached.  Also make the
error ("dictionary changed size during iteration") a sticky state.

Also remove the next() method -- one is supplied automatically by
PyType_Ready() because the tp_iternext slot is set.  That's a good
thing, because the implementation given here was buggy (it never
raised StopIteration).

22 years agoMake StopIteration a sink state. This is done by clearing out the
Guido van Rossum [Tue, 16 Jul 2002 20:24:46 +0000 (20:24 +0000)]
Make StopIteration a sink state.  This is done by clearing out the
object references (it_seq for seqiterobject, it_callable and
it_sentinel for calliterobject) when the end of the list is reached.

Also remove the next() methods -- one is supplied automatically by
PyType_Ready() because the tp_iternext slot is set.  That's a good
thing, because the implementation given here was buggy (it never
raised StopIteration).

22 years agoWhitespace normalization.
Guido van Rossum [Tue, 16 Jul 2002 20:10:23 +0000 (20:10 +0000)]
Whitespace normalization.

22 years agoMake StopIteration a sink state. This is done by clearing out the
Guido van Rossum [Tue, 16 Jul 2002 20:07:32 +0000 (20:07 +0000)]
Make StopIteration a sink state.  This is done by clearing out the
it_seq field when the end of the list is reached.

Also remove the next() method -- one is supplied automatically by
PyType_Ready() because the tp_iternext slot is set.  That's a good
thing, because the implementation given here was buggy (it never
raised StopIteration).

22 years agoRecord the decision that StopIteration is a sink state (see recent
Guido van Rossum [Tue, 16 Jul 2002 19:53:39 +0000 (19:53 +0000)]
Record the decision that StopIteration is a sink state (see recent
discussion in python-dev with subject "Termination of two-arg iter()").

Implementation will follow.

22 years agoGiven the persistent id code a shot at a class before calling save_global().
Jeremy Hylton [Tue, 16 Jul 2002 19:47:43 +0000 (19:47 +0000)]
Given the persistent id code a shot at a class before calling save_global().

Some persistent picklers (well, probably, the *only* persistent
pickler) would like to pickle some classes in a special way.

22 years agoThe object returned by tp_new() may not have a tp_init.
Jeremy Hylton [Tue, 16 Jul 2002 19:39:38 +0000 (19:39 +0000)]
The object returned by tp_new() may not have a tp_init.

If the object is an ExtensionClass, for example, the slot is not even
defined.  So we must check that the type has the slot (implied by
HAVE_CLASS) before calling tp_init().

22 years agoThe atexit module effectively turned itself off if sys.exitfunc already
Tim Peters [Tue, 16 Jul 2002 19:30:59 +0000 (19:30 +0000)]
The atexit module effectively turned itself off if sys.exitfunc already
existed at the time atexit first got imported.  That's a bug, and this
fixes it.

Also reworked test_atexit.py to test for this too, and to stop using
an "expected output" file, and to test what actually happens at exit
instead of just simulating what it thinks atexit will do at exit.

Bugfix candidate, but it's messy so I'll backport to 2.2 myself.

22 years ago(py-imenu-create-index-function): Skip over stuff that looks like code
Barry Warsaw [Tue, 16 Jul 2002 16:04:13 +0000 (16:04 +0000)]
(py-imenu-create-index-function): Skip over stuff that looks like code
but which is in a comment or string.  Closes SF bug # 572341 reported
by Adrian van den Dries.

22 years agoMake list_iter() really static.
Guido van Rossum [Tue, 16 Jul 2002 15:56:52 +0000 (15:56 +0000)]
Make list_iter() really static.

22 years ago(py-pychecker-run): Thomas Heller points out that this function messes
Barry Warsaw [Tue, 16 Jul 2002 15:56:28 +0000 (15:56 +0000)]
(py-pychecker-run): Thomas Heller points out that this function messes
up the compile command's history.  Fix that by using compile-internal.

Fixes SF bug # 580631

22 years agovalid_identifier(): use an unsigned char* so that isalpha() will do
Guido van Rossum [Tue, 16 Jul 2002 14:30:28 +0000 (14:30 +0000)]
valid_identifier(): use an unsigned char* so that isalpha() will do
the right thing even if char is unsigned.

22 years agoAdd a blurb on the 3 Windows bugs I worked on over the last couple of days.
Mark Hammond [Tue, 16 Jul 2002 01:32:30 +0000 (01:32 +0000)]
Add a blurb on the 3 Windows bugs I worked on over the last couple of days.

22 years agoFix bug 581232 - [Windows] Can not interrupt time.sleep()
Mark Hammond [Tue, 16 Jul 2002 01:29:19 +0000 (01:29 +0000)]
Fix bug 581232 - [Windows] Can not interrupt time.sleep()

time.sleep() will now be interrupted on the main thread when Ctrl+C is pressed.  Other threads are never interrupted.

22 years agoAdded the "weird" ccTLDs ac, gg, im, and je. These are not recognized
Barry Warsaw [Mon, 15 Jul 2002 19:53:28 +0000 (19:53 +0000)]
Added the "weird" ccTLDs ac, gg, im, and je.  These are not recognized
by ISO 3166 as country codes, but the are reserved by IANA
nonetheless.  The commonly used uk ccTLD is part of this group, near
as I can tell.

22 years agoXXXROUNDUP(): Turns out this fixed Andrew MacIntyre's memory-mgmt
Tim Peters [Mon, 15 Jul 2002 17:58:03 +0000 (17:58 +0000)]
XXXROUNDUP():  Turns out this fixed Andrew MacIntyre's memory-mgmt
disaster too, so this change is here to stay.  Beefed up the comments
and added some stats Andrew reported.  Also a small change to the
macro body, to make it obvious how XXXROUNDUP(0) ends up returning 0.
See SF patch 578297 for context.

Not a bugfix candidate, as the functional changes here have already
been backported to the 2.2 line (this patch just improves clarity).

22 years agoAdded Andrew MacIntyre -- overdue!
Tim Peters [Mon, 15 Jul 2002 16:13:06 +0000 (16:13 +0000)]
Added Andrew MacIntyre -- overdue!

22 years ago/F revealed that ShellExecute() only requires shellapi.h, not the
Tim Peters [Mon, 15 Jul 2002 16:10:55 +0000 (16:10 +0000)]
/F revealed that ShellExecute() only requires shellapi.h, not the
full-blown windows.h, so changed accordingly.

22 years agoClarify that the description of sys.path[0] is only valid upon program
Guido van Rossum [Mon, 15 Jul 2002 16:08:10 +0000 (16:08 +0000)]
Clarify that the description of sys.path[0] is only valid upon program
start-up.

22 years agoTim_one's change to aggressively overallocate nodes when adding child
Andrew MacIntyre [Mon, 15 Jul 2002 12:03:19 +0000 (12:03 +0000)]
Tim_one's change to aggressively overallocate nodes when adding child
nodes (in Parser/node.c) resolves the gross memory consumption
exhibited by the EMX runtime on OS/2, so the test should be exercised
on this platform.

22 years agodocompare(): Another reasonable optimization from Jonathan Hogg for the
Tim Peters [Mon, 15 Jul 2002 05:16:13 +0000 (05:16 +0000)]
docompare():  Another reasonable optimization from Jonathan Hogg for the
explicit comparison function case:  use PyObject_Call instead of
PyEval_CallObject.  Same thing in context, but gives a 2.4% overall
speedup when sorting a list of ints via list.sort(__builtin__.cmp).

22 years agoFix bug 231273 - [windows] os.popen doens't kill subprocess when interrupted
Mark Hammond [Sun, 14 Jul 2002 23:28:16 +0000 (23:28 +0000)]
Fix bug 231273 - [windows] os.popen doens't kill subprocess when interrupted

Don't pass CREATE_NEW_CONSOLE to CreateProcess(), meaning our child process is in the same "console group" and therefore interrupted by the same Ctrl+C that interrupts the parent.

22 years agoFix bug 439992 - [win32] KeyboardInterrupt Not Caught.
Mark Hammond [Sun, 14 Jul 2002 23:12:29 +0000 (23:12 +0000)]
Fix bug 439992 - [win32] KeyboardInterrupt Not Caught.

This gets us closer to consistent Ctrl+C behaviour on NT and Win9x.  NT now reliably generates KeyboardInterrupt exceptions for NT when a file IO operation was aborted.  Bugfix candidate

22 years agoWINDOWS_LEAN_AND_MEAN: There is no such symbol, although a very few
Tim Peters [Sun, 14 Jul 2002 22:14:19 +0000 (22:14 +0000)]
WINDOWS_LEAN_AND_MEAN:  There is no such symbol, although a very few
MSDN sample programs use it, apparently in error.  The correct name
is WIN32_LEAN_AND_MEAN.  After switching to the correct name, in two
cases more was needed because the code actually relied on things that
disappear when WIN32_LEAN_AND_MEAN is defined.

22 years agoSF patch # 580411, move frame macros from frameobject.h into ceval.c
Neal Norwitz [Sun, 14 Jul 2002 00:27:26 +0000 (00:27 +0000)]
SF patch # 580411, move frame macros from frameobject.h into ceval.c
remove unused macros
use co alias instead of f->f_code in macros

22 years agoUndef MIN and MAX before defining them, to avoid warnings on certain
Guido van Rossum [Sat, 13 Jul 2002 14:31:51 +0000 (14:31 +0000)]
Undef MIN and MAX before defining them, to avoid warnings on certain
platforms.

22 years agoDon't declare a function with staticforward.
Jeremy Hylton [Sat, 13 Jul 2002 03:51:17 +0000 (03:51 +0000)]
Don't declare a function with staticforward.

Just declare it static so that lame (BAD_STATIC_FORWARD) compilers
don't see a mismatch between the prototype and the function.

22 years agoAdd more items
Andrew M. Kuchling [Fri, 12 Jul 2002 20:24:42 +0000 (20:24 +0000)]
Add more items
Use \cfunction instead of \function in various places
Add contributor names

22 years agoClarify the return value of __nonzero__(): It *must* be an integer.
Fred Drake [Fri, 12 Jul 2002 17:15:10 +0000 (17:15 +0000)]
Clarify the return value of __nonzero__(): It *must* be an integer.
Closes SF bug #579991.

22 years agofixed wrong classic MacOS pathname assumption
Just van Rossum [Fri, 12 Jul 2002 16:50:32 +0000 (16:50 +0000)]
fixed wrong classic MacOS pathname assumption

22 years agoRemove httplib from tested modules.
Jeremy Hylton [Fri, 12 Jul 2002 15:54:37 +0000 (15:54 +0000)]
Remove httplib from tested modules.

The test of httplib makes it difficult to maintain httplib.  There are
two many idioms that pyclbr doesn't seem to understand, and I don't
understand how to update these tests to make them work.

Also remove commented out test of urllib2.

22 years agoGet the meta class inheritance right.
Jeremy Hylton [Fri, 12 Jul 2002 15:42:10 +0000 (15:42 +0000)]
Get the meta class inheritance right.

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().