<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git, branch v2.1c2</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/?h=v2.1c2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/?h=v2.1c2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-04-16T02:07:08Z</updated>
<entry>
<title>This commit was manufactured by cvs2svn to create tag 'r21c2'.</title>
<updated>2001-04-16T02:07:08Z</updated>
<author>
<name>cvs2svn</name>
<email>tools@python.org</email>
</author>
<published>2001-04-16T02:07:08Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8c83ec63f59b5a9512f907aa4f2c63d3ed7af7a0'/>
<id>urn:sha1:8c83ec63f59b5a9512f907aa4f2c63d3ed7af7a0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>This is (hopefully) last checkin before releasing 2.1c2 -- get rid of</title>
<updated>2001-04-16T02:07:08Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-16T02:07:08Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=16e809e40014b2ff906d18b6aa3155bcb44f1634'/>
<id>urn:sha1:16e809e40014b2ff906d18b6aa3155bcb44f1634</id>
<content type='text'>
trailing whitespace.
</content>
</entry>
<entry>
<title>Added news for 2.1c2.</title>
<updated>2001-04-16T02:05:23Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-16T02:05:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5b08f13a0cc61bdbaedecbed2985145e6b235655'/>
<id>urn:sha1:5b08f13a0cc61bdbaedecbed2985145e6b235655</id>
<content type='text'>
Greatly updated news for 2.1c1 (!).
</content>
</entry>
<entry>
<title>Update Windows installer &amp; build number to 2.1c2 release.</title>
<updated>2001-04-16T01:44:08Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-04-16T01:44:08Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b093166f934ae562ec8fb424ff0c0cca82b71e47'/>
<id>urn:sha1:b093166f934ae562ec8fb424ff0c0cca82b71e47</id>
<content type='text'>
</content>
</entry>
<entry>
<title>We need another release candidate after so many "small" changes.</title>
<updated>2001-04-16T00:33:29Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-16T00:33:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a7a391c580aabe48e397616da0ce87199e37d8ce'/>
<id>urn:sha1:a7a391c580aabe48e397616da0ce87199e37d8ce</id>
<content type='text'>
DO NOT CHECK ANYTHHING IN FROM NOW ON WITHOUT ASKING ME.
</content>
</entry>
<entry>
<title>Change the test data to ask for class C from module __main__ rather</title>
<updated>2001-04-16T00:28:21Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-16T00:28:21Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=42f92da307dfa466bc7d665c4e717af47c27d393'/>
<id>urn:sha1:42f92da307dfa466bc7d665c4e717af47c27d393</id>
<content type='text'>
than from module pickletester.  Using the latter turned out to cause
the test to break when invoked as "import test.test_pickle" or "import
test.autotest".
</content>
</entry>
<entry>
<title>Reverting Moshe's EGD patch *and* Martin's patch to make it work with</title>
<updated>2001-04-16T00:21:33Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-16T00:21:33Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=13324e1e1fc2fe50f4344c65ace88a1e037aa23a'/>
<id>urn:sha1:13324e1e1fc2fe50f4344c65ace88a1e037aa23a</id>
<content type='text'>
OpenSSL versions beore 0.9.5.  This just is too experimental to be
worth it, especially since the user would have to do some severe
hacking of the Modules/Setup file to even enable the EGD code, and
without the EGD code it would always spit out a warning on some
systems -- even when socket.ssl() is not used.  Fixing that properly
is not my job; the EGD patch is clearly not so important that it
should hold up the 2.1 release.
</content>
</entry>
<entry>
<title>Tim pointed out a remaining vulnerability in popitem(): the</title>
<updated>2001-04-16T00:02:32Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-16T00:02:32Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e04eaec5b60a41b114dd3b7d78c3a389f8534af8'/>
<id>urn:sha1:e04eaec5b60a41b114dd3b7d78c3a389f8534af8</id>
<content type='text'>
PyTuple_New() could *conceivably* clear the dict, so move the test for
an empty dict after the tuple allocation.  It means that we waste time
allocating and deallocating a 2-tuple when the dict is empty, but who
cares.  It also means that when the dict is empty *and* there's no
memory to allocate a 2-tuple, we raise MemoryError, not KeyError --
but that may actually a good idea: if there's no room for a lousy
2-tuple, what are the chances that there's room for a KeyError
instance?
</content>
</entry>
<entry>
<title>Tentative fix for a problem that Tim discovered at the last moment,</title>
<updated>2001-04-15T22:16:26Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-15T22:16:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a4dd011259fa6f3079bd0efd95b3a136c0e3c190'/>
<id>urn:sha1:a4dd011259fa6f3079bd0efd95b3a136c0e3c190</id>
<content type='text'>
and reported to python-dev: because we were calling dict_resize() in
PyDict_Next(), and because GC's dict_traverse() uses PyDict_Next(),
and because PyTuple_New() can cause GC, and because dict_items() calls
PyTuple_New(), it was possible for dict_items() to have the dict
resized right under its nose.

The solution is convoluted, and touches several places: keys(),
values(), items(), popitem(), PyDict_Next(), and PyDict_SetItem().

There are two parts to it. First, we no longer call dict_resize() in
PyDict_Next(), which seems to solve the immediate problem.  But then
PyDict_SetItem() must have a different policy about when *it* calls
dict_resize(), because we want to guarantee (e.g. for an algorithm
that Jeremy uses in the compiler) that you can loop over a dict using
PyDict_Next() and make changes to the dict as long as those changes
are only value replacements for existing keys using PyDict_SetItem().
This is done by resizing *after* the insertion instead of before, and
by remembering the size before we insert the item, and if the size is
still the same, we don't bother to even check if we might need to
resize.  An additional detail is that if the dict starts out empty, we
must still resize it before the insertion.

That was the first part. :-)

The second part is to make keys(), values(), items(), and popitem()
safe against side effects on the dict caused by allocations, under the
assumption that if the GC can cause arbitrary Python code to run, it
can cause other threads to run, and it's not inconceivable that our
dict could be resized -- it would be insane to write code that relies
on this, but not all code is sane.

Now, I have this nagging feeling that the loops in lookdict probably
are blissfully assuming that doing a simple key comparison does not
change the dict's size.  This is not necessarily true (the keys could
be class instances after all).  But that's a battle for another day.
</content>
</entry>
<entry>
<title>SF bug reporters.</title>
<updated>2001-04-15T20:48:27Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-15T20:48:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0aa30b0072c53c912e9a3ad929c0be377f3c9ffa'/>
<id>urn:sha1:0aa30b0072c53c912e9a3ad929c0be377f3c9ffa</id>
<content type='text'>
</content>
</entry>
</feed>
