Commit Graph

21729 Commits

Author SHA1 Message Date
Tim Peters
a17fb2c8e6 subtype_resurrection(): The test suite with -l properly reported the
immortal object here as a leak.  Made the object mortal again at the end.
2002-07-11 18:30:02 +00:00
Tim Peters
7b63f46f3a Repaired optimistic comment in new test. 2002-07-11 07:11:13 +00:00
Tim Peters
8156b9019c Attempting to resurrect a dying instance of a new-style class in a
__del__ method died with

    Fatal Python error: GC object already in linked list

in both release and debug builds.  Fixed that.  Added a new test that
dies without the fix.
2002-07-11 07:06:44 +00:00
Fred Drake
dc14fb7b53 Document gc.get_objects().
Closes SF bug #578308.
2002-07-10 19:21:55 +00:00
Fred Drake
996425f366 Update the comments on building the pyexpat extension.
Closes SF bug #577774.
2002-07-10 19:01:25 +00:00
Fred Drake
68510797cd Note that unicode() can raise LookupError for unknown codecs.
Closes SF bug #513666.
2002-07-09 05:27:12 +00:00
Tim Peters
b1fb9abf09 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.

Note:  test_gc fails in a COUNT_ALLOCS build now, because it expects
a new-style class to get garbage collected.
2002-07-08 22:30:52 +00:00
Tim Peters
8625d7e5b5 PyNode_AddChild(): Backporting an aggressive over-allocation policy
when a parse node grows a very large number of children.  This sidesteps
platform realloc() disasters on several platforms.
2002-07-08 19:35:56 +00:00
Fred Drake
9f02d5b895 Fix typo.
Closes SF bug #578420.
2002-07-08 14:46:49 +00:00
Fred Drake
e0c82ee1d4 Fix typo reported by Kent Engström, and a bunch of broken markup. 2002-07-08 14:42:45 +00:00
Fred Drake
aa10404b7e Fix typo: "an Unicode string" --> "a Unicode string"
Clarify the return value when the parameter is a Unicode object.
2002-07-08 14:29:28 +00:00
Fred Drake
d095e88e2b Add annotations that describe the change in the "errors" and "failures"
attributes of the TestResult.
2002-07-02 22:46:53 +00:00
Fred Drake
2538284012 Update the documentation of the errors and failures attributes of the
TestResult object.  Add an example of how to get even more information for
apps that can use it.
Closes SF bug #558278.
2002-07-02 22:35:02 +00:00
Jeremy Hylton
feb7d02427 Track change of begin() to _begin(). 2002-07-02 20:39:37 +00:00
Jeremy Hylton
5b4f1c1201 Backport various bug fixes from trunk.
The 2.2 maintenace branch is now identical to the trunk through rev
1.53.
2002-07-02 17:19:47 +00:00
Tim Peters
9d8c8ff9ae Backport for SF bug #574132: Major GC related performance regression.
2.2.1 has another bug that prevents the regression (which isn't a
regression at all) from showing up.  "The regression" is actually a
glitch in cyclic gc that's been there forever.

As the generation being collected is analyzed, objects that can't be
collected (because, e.g., we find they're externally referenced, or
are in an unreachable cycle but have a __del__ method) are moved out
of the list of candidates.  A tricksy scheme uses negative values of
gc_refs to mark such objects as being moved.  However, the exact
negative value set at the start may become "more negative" over time
for objects not in the generation being collected, and the scheme was
checking for an exact match on the negative value originally assigned.
As a result, objects in generations older than the one being collected
could get scanned too, and yanked back into a younger generation.  Doing
so doesn't lead to an error, but doesn't do any good, and can burn an
unbounded amount of time doing useless work.

A test case is simple (thanks to Kevin Jacobs for finding it!):

x = []
for i in xrange(200000):
    x.append((1,))

Without the patch, this ends up scanning all of x on every gen0 collection,
scans all of x twice on every gen1 collection, and x gets yanked back into
gen1 on every gen0 collection.  With the patch, once x gets to gen2, it's
never scanned again until another gen2 collection, and stays in gen2.

Opened another bug about that 2.2.1 isn't actually tracking (at least)
iterators, generators, and bound method objects, due to using the 2.1
gc API internally in those places (which #defines itself out of existence
in 2.2.x).
2002-06-30 18:48:53 +00:00
Raymond Hettinger
bca71c989e Fixed bug 574978 shutil example out of sync with source code 2002-06-30 04:44:29 +00:00
Raymond Hettinger
e6a7ce123a Fix bug 575221 referred to dictionary type instead of dict. 2002-06-30 04:33:37 +00:00
Fred Drake
20ef4e108d Clarify the version information for the unicode() built-in.
Closes SF bug #575272.
2002-06-29 16:11:08 +00:00
Neal Norwitz
023b588d58 Backport 1.37: dis.dis() also supports modules, (also backport other changes back to 1.33 since these all apply to 2.2) 2002-06-26 22:37:28 +00:00
Fred Drake
5f5f630897 Fix various typos reported to python-docs. 2002-06-26 21:52:26 +00:00
Fred Drake
56d523306d Fix typo reported to python-docs. 2002-06-26 21:43:42 +00:00
Raymond Hettinger
d8a78e3a4d Fix bug #573916. Sender and recipients reversed in email example. 2002-06-26 07:52:41 +00:00
Fred Drake
ded92fefa3 [Backport of recent changes to the SAX documentation.]
Add more links to the "See also" section for the xml.sax package.
Talk about interfaces rather than implementation classes where appropriate.
Add hyperlinks to make the documentation on the Attributes and AttributesNS
interfaces more discoverable.
Closes SF bug #484603.
2002-06-25 17:18:48 +00:00
Raymond Hettinger
169d1ed891 Fix typo 2002-06-25 15:25:53 +00:00