<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_gc.py, branch 2.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_gc.py?h=2.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_gc.py?h=2.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2003-04-08T20:33:05Z</updated>
<entry>
<title>Fixed the gc-vs-__del__ bugs for new-style classes.  That's it for this one.</title>
<updated>2003-04-08T20:33:05Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-04-08T20:33:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8998a819375d8aa439e560472edcee9d9fa5475c'/>
<id>urn:sha1:8998a819375d8aa439e560472edcee9d9fa5475c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Backporting new gc-vs-__del__ tests.  These pass, but are restricted</title>
<updated>2003-04-08T19:32:53Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-04-08T19:32:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1ac384995cf769fe2dbbe5515b1c07c7858cdf40'/>
<id>urn:sha1:1ac384995cf769fe2dbbe5515b1c07c7858cdf40</id>
<content type='text'>
to old-style classes.  New-style classes remain vulnerable in 2.2.
</content>
</entry>
<entry>
<title>Backport 1.15:</title>
<updated>2002-06-12T14:41:50Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-06-12T14:41:50Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=76c63a4980c7c08052b2284300af6a31fd8c650a'/>
<id>urn:sha1:76c63a4980c7c08052b2284300af6a31fd8c650a</id>
<content type='text'>
Add a testcase to ensure that cycles going through the __class__ link
of a new-style instance are detected by the garbage collector.
</content>
</entry>
<entry>
<title>Backport of a new test to check the interaction between cyclic GC</title>
<updated>2002-03-28T23:18:08Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2002-03-28T23:18:08Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2457a7e3688158717d3a7d87e84ae2021651fe5b'/>
<id>urn:sha1:2457a7e3688158717d3a7d87e84ae2021651fe5b</id>
<content type='text'>
and the trashcan mechanism.
</content>
</entry>
<entry>
<title>Remove obsolete __static__/__dynamic__ distinction.</title>
<updated>2001-10-15T22:49:27Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-10-15T22:49:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1ce150c675c946b5f626ca6bce2cb7eaba94d019'/>
<id>urn:sha1:1ce150c675c946b5f626ca6bce2cb7eaba94d019</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Enable GC for new-style instances.  This touches lots of files, since</title>
<updated>2001-10-05T20:51:39Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-05T20:51:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9475a2310d9cdec4b4c36dee8bf30c72605ae928'/>
<id>urn:sha1:9475a2310d9cdec4b4c36dee8bf30c72605ae928</id>
<content type='text'>
many types were subclassable but had a xxx_dealloc function that
called PyObject_DEL(self) directly instead of deferring to
self-&gt;ob_type-&gt;tp_free(self).  It is permissible to set tp_free in the
type object directly to _PyObject_Del, for non-GC types, or to
_PyObject_GC_Del, for GC types.  Still, PyObject_DEL was a tad faster,
so I'm fearing that our pystone rating is going down again.  I'm not
sure if doing something like

void xxx_dealloc(PyObject *self)
{
	if (PyXxxCheckExact(self))
		PyObject_DEL(self);
	else
		self-&gt;ob_type-&gt;tp_free(self);
}

is any faster than always calling the else branch, so I haven't
attempted that -- however those types whose own dealloc is fancier
(int, float, unicode) do use this pattern.
</content>
</entry>
<entry>
<title>Add Garbage Collection support to new-style classes (not yet to their</title>
<updated>2001-10-02T21:24:57Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-02T21:24:57Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=048eb75c2dca8bf6d483b290c901a53510c9b78a'/>
<id>urn:sha1:048eb75c2dca8bf6d483b290c901a53510c9b78a</id>
<content type='text'>
instances).

Also added GC support to various auxiliary types: super, property,
descriptors, wrappers, dictproxy.  (Only type objects have a tp_clear
field; the other types are.)

One change was necessary to the GC infrastructure.  We have statically
allocated type objects that don't have a GC header (and can't easily
be given one) and heap-allocated type objects that do have a GC
header.  Giving these different metatypes would be really ugly: I
tried, and I had to modify pickle.py, cPickle.c, copy.py, add a new
invent a new name for the new metatype and make it a built-in, change
affected tests...  In short, a mess.  So instead, we add a new type
slot tp_is_gc, which is a simple Boolean function that determines
whether a particular instance has GC headers or not.  This slot is
only relevant for types that have the (new) GC flag bit set.  If the
tp_is_gc slot is NULL (by far the most common case), all instances of
the type are deemed to have GC headers.  This slot is called by the
PyObject_IS_GC() macro (which is only used twice, both times in
gcmodule.c).

I also changed the extern declarations for a bunch of GC-related
functions (_PyObject_GC_Del etc.): these always exist but objimpl.h
only declared them when WITH_CYCLE_GC was defined, but I needed to be
able to reference them without #ifdefs.  (When WITH_CYCLE_GC is not
defined, they do the same as their non-GC counterparts anyway.)
</content>
</entry>
<entry>
<title>The error reporting here was a bit sparse.  In verbose mode, the code</title>
<updated>2001-10-02T19:49:47Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-02T19:49:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c907bd89de2af748dfe40d829477469de47c8ee1'/>
<id>urn:sha1:c907bd89de2af748dfe40d829477469de47c8ee1</id>
<content type='text'>
in run_test() referenced two non-existent variables, and in
non-verbose mode, the tests didn't report the actual number, when it
differed from the expected number.  Fixed this.

Also added an extra call to gc.collect() at the start of test_all().
This will be needed when I check in the changes to add GC to new-style
classes.
</content>
</entry>
<entry>
<title>Test GC of frame objects.</title>
<updated>2001-07-12T13:25:53Z</updated>
<author>
<name>Neil Schemenauer</name>
<email>nascheme@enme.ucalgary.ca</email>
</author>
<published>2001-07-12T13:25:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=88c761a117c42577378fca88dad5881418dbbf3c'/>
<id>urn:sha1:88c761a117c42577378fca88dad5881418dbbf3c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>This patch removes all uses of "assert" in the regression test suite</title>
<updated>2001-01-17T19:11:13Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-01-17T19:11:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e'/>
<id>urn:sha1:3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e</id>
<content type='text'>
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.

Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
</content>
</entry>
</feed>
