
Hello all, Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7? http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet I needed this in unittest and used a WeakKeyDictionary instead. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On Mon, Mar 29, 2010 at 12:16 PM, Michael Foord <michael@voidspace.org.uk>wrote:
Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7?
http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet
Backporting WeakSet would also make it possible to backport the fix for this reference leak: http://bugs.python.org/issue2521 -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>

On 29/03/2010 19:14, Daniel Stutzbach wrote:
On Mon, Mar 29, 2010 at 12:16 PM, Michael Foord <michael@voidspace.org.uk <mailto:michael@voidspace.org.uk>> wrote:
Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7?
http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet
Backporting WeakSet would also make it possible to backport the fix for this reference leak:
It should be possible to fix it with a WeakKeyDictionary instead of WeakSet. All the best, Michael Foord
-- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On Mon, Mar 29, 2010 at 2:21 PM, Michael Foord <michael@voidspace.org.uk>wrote:
It should be possible to fix it with a WeakKeyDictionary instead of WeakSet.
True. I should have said "Backporting WeakSet would make it *easier* to backport the fix ..." :-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>

On 29/03/2010 20:46, Daniel Stutzbach wrote:
On Mon, Mar 29, 2010 at 2:21 PM, Michael Foord <michael@voidspace.org.uk <mailto:michael@voidspace.org.uk>> wrote:
It should be possible to fix it with a WeakKeyDictionary instead of WeakSet.
True. I should have said "Backporting WeakSet would make it *easier* to backport the fix ..." :-)
WeakSet is now in. Michael
-- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.u...
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 29/03/2010 18:16, Michael Foord wrote:
Hello all,
Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7?
http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet
I needed this in unittest and used a WeakKeyDictionary instead.
Hmmm... I was under the mistaken impression that this was implemented in pure-Python. It's in C so beyond my threshold for simple porting I'm afraid. Still if someone else is up for it... All the best, Michael
Michael
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 29/03/2010 20:20, Michael Foord wrote:
On 29/03/2010 18:16, Michael Foord wrote:
Hello all,
Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7?
http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet
I needed this in unittest and used a WeakKeyDictionary instead.
Hmmm... I was under the mistaken impression that this was implemented in pure-Python. It's in C so beyond my threshold for simple porting I'm afraid. Still if someone else is up for it...
No, my mistake - it *is* implemented in Python. I'm porting it now. Michael
All the best,
Michael
Michael
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.
participants (3)
-
Daniel Stutzbach
-
Michael Foord
-
Michael Foord