<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython.git/Lib/weakref.py, branch v2.5b2</title>
<subtitle>
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/'/>
<entry>
<title>SF #1479988: add methods to allow access to weakrefs for the</title>
<updated>2006-05-02T06:53:59+00:00</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2006-05-02T06:53:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=52dd8758384537100f571c77261575e9fb958312'/>
<id>52dd8758384537100f571c77261575e9fb958312</id>
<content type='text'>
weakref.WeakKeyDictionary and weakref.WeakValueDictionary
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
weakref.WeakKeyDictionary and weakref.WeakValueDictionary
</pre>
</div>
</content>
</entry>
<entry>
<title>Bug #1196315: fix weakref.WeakValueDictionary constructor.</title>
<updated>2005-06-04T09:20:03+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2005-06-04T09:20:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=f0e0be874d2281b9934de15ba1a08736e5e72db3'/>
<id>f0e0be874d2281b9934de15ba1a08736e5e72db3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use multi-line import</title>
<updated>2004-08-31T11:38:12+00:00</updated>
<author>
<name>Andrew M. Kuchling</name>
<email>amk@amk.ca</email>
</author>
<published>2004-08-31T11:38:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=9a7f30e71529dce95d41c28587cab6efc3af91ad'/>
<id>9a7f30e71529dce95d41c28587cab6efc3af91ad</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>SF bug #1012315:  weakref.WeakValueDictionary should override .has_key()</title>
<updated>2004-08-19T21:32:06+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-08-19T21:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=50c7cc4a533ef20188adb2076fa5f621e37e08e8'/>
<id>50c7cc4a533ef20188adb2076fa5f621e37e08e8</id>
<content type='text'>
* Check the found object for a None value during a contains/has_key
  lookup.  Perhaps it will help the OP who is likely suffering from an
  occassional GC or threading object deletion after self.data is checked.

* Complete the previous patch by removing the unnecessary indirection
  for weak dict iterators.  Makes the code cleaner and more readable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Check the found object for a None value during a contains/has_key
  lookup.  Perhaps it will help the OP who is likely suffering from an
  occassional GC or threading object deletion after self.data is checked.

* Complete the previous patch by removing the unnecessary indirection
  for weak dict iterators.  Makes the code cleaner and more readable.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert weak iterators to generator form.</title>
<updated>2004-08-13T07:12:45+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-08-13T07:12:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=a062f3d77005ecb15352828fe3a56dafce35cf9a'/>
<id>a062f3d77005ecb15352828fe3a56dafce35cf9a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make weak references subclassable:</title>
<updated>2004-07-02T18:57:45+00:00</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2004-07-02T18:57:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=b2f80ec91de4ec374477be3d9fa1abb5f48ae63e'/>
<id>b2f80ec91de4ec374477be3d9fa1abb5f48ae63e</id>
<content type='text'>
- weakref.ref and weakref.ReferenceType will become aliases for each
  other

- weakref.ref will be a modern, new-style class with proper __new__
  and __init__ methods

- weakref.WeakValueDictionary will have a lighter memory footprint,
  using a new weakref.ref subclass to associate the key with the
  value, allowing us to have only a single object of overhead for each
  dictionary entry (currently, there are 3 objects of overhead per
  entry: a weakref to the value, a weakref to the dictionary, and a
  function object used as a weakref callback; the weakref to the
  dictionary could be avoided without this change)

- a new macro, PyWeakref_CheckRefExact(), will be added

- PyWeakref_CheckRef() will check for subclasses of weakref.ref

This closes SF patch #983019.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- weakref.ref and weakref.ReferenceType will become aliases for each
  other

- weakref.ref will be a modern, new-style class with proper __new__
  and __init__ methods

- weakref.WeakValueDictionary will have a lighter memory footprint,
  using a new weakref.ref subclass to associate the key with the
  value, allowing us to have only a single object of overhead for each
  dictionary entry (currently, there are 3 objects of overhead per
  entry: a weakref to the value, a weakref to the dictionary, and a
  function object used as a weakref callback; the weakref to the
  dictionary could be avoided without this change)

- a new macro, PyWeakref_CheckRefExact(), will be added

- PyWeakref_CheckRef() will check for subclasses of weakref.ref

This closes SF patch #983019.
</pre>
</div>
</content>
</entry>
<entry>
<title>The default argument in dict.setdefault() defaults to None.</title>
<updated>2004-05-27T18:16:25+00:00</updated>
<author>
<name>Walter Dörwald</name>
<email>walter@livinglogic.de</email>
</author>
<published>2004-05-27T18:16:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=774f3d2517c79ec418cda8737f97246064cc1673'/>
<id>774f3d2517c79ec418cda8737f97246064cc1673</id>
<content type='text'>
Add this default to weakref.WeakValueDictionary.setdefault()
and weakref.WeakKeyDictionary.setdefault() too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add this default to weakref.WeakValueDictionary.setdefault()
and weakref.WeakKeyDictionary.setdefault() too.
</pre>
</div>
</content>
</entry>
<entry>
<title>SF #904720:  dict.update should take a 2-tuple sequence like dict.__init_</title>
<updated>2004-03-04T08:25:44+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-03-04T08:25:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=d31e0c6289652e5d997755b7bc93afc6f88070e0'/>
<id>d31e0c6289652e5d997755b7bc93afc6f88070e0</id>
<content type='text'>
(Championed by Bob Ippolito.)

The update() method for mappings now accepts all the same argument forms
as the dict() constructor.  This includes item lists and/or keyword
arguments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(Championed by Bob Ippolito.)

The update() method for mappings now accepts all the same argument forms
as the dict() constructor.  This includes item lists and/or keyword
arguments.
</pre>
</div>
</content>
</entry>
<entry>
<title>SF 742860: WeakKeyDictionary __delitem__ uses iterkeys</title>
<updated>2003-05-25T01:45:11+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-05-25T01:45:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=c67e258ba7016cb3a5b1fb991cdd2e5e6d8f4a0a'/>
<id>c67e258ba7016cb3a5b1fb991cdd2e5e6d8f4a0a</id>
<content type='text'>
Someone review this, please!  Final releases are getting close, Fred
(the weakref guy) won't be around until Tuesday, and the pre-patch
code can indeed raise spurious RuntimeErrors in the presence of
threads or mutating comparison functions.

See the bug report for my confusions:  I can't see any reason for why
__delitem__ iterated over the keys.  The new one-liner implementation
is much faster, can't raise RuntimeError, and should be better-behaved
in all respects wrt threads.

New tests test_weak_keyed_bad_delitem and
test_weak_keyed_cascading_deletes fail before this patch.

Bugfix candidate for 2.2.3 too, if someone else agrees with this patch.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Someone review this, please!  Final releases are getting close, Fred
(the weakref guy) won't be around until Tuesday, and the pre-patch
code can indeed raise spurious RuntimeErrors in the presence of
threads or mutating comparison functions.

See the bug report for my confusions:  I can't see any reason for why
__delitem__ iterated over the keys.  The new one-liner implementation
is much faster, can't raise RuntimeError, and should be better-behaved
in all respects wrt threads.

New tests test_weak_keyed_bad_delitem and
test_weak_keyed_cascading_deletes fail before this patch.

Bugfix candidate for 2.2.3 too, if someone else agrees with this patch.
</pre>
</div>
</content>
</entry>
<entry>
<title>SF patch #667730: More DictMixin</title>
<updated>2003-03-09T07:05:43+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2003-03-09T07:05:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=44cb8592e443b8ffd4232e3cfca18dc1ffde321d'/>
<id>44cb8592e443b8ffd4232e3cfca18dc1ffde321d</id>
<content type='text'>
* Adds missing pop() methods to weakref.py
* Expands test suite to broaden coverage of objects with
  a mapping interface.

Contributed by Sebastien Keim.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Adds missing pop() methods to weakref.py
* Expands test suite to broaden coverage of objects with
  a mapping interface.

Contributed by Sebastien Keim.
</pre>
</div>
</content>
</entry>
</feed>
