[issue15004] add weakref support to types.SimpleNamespace

2020-11-17 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.9 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2013-06-24 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
assignee:  - eric.snow

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2013-02-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Good, except that you have to add a gc.collect() call for the non-refcounted 
implementations.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2013-02-20 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 Good, except that you have to add a gc.collect() call for the 
 non-refcounted implementations.

Better to use test.support.gc_collect().

--
nosy: +sbt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2013-02-19 Thread Eric Snow

Eric Snow added the comment:

Good point.  Thanks.  I've updated the test.  Does that cover it?

--
Added file: http://bugs.python.org/file29127/simplenamespace-weakref.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2013-02-19 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


Removed file: http://bugs.python.org/file29094/simplenamespace-weakref.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2013-02-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

No, you should also test the weakref returns None once the object is garbage 
collected.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2013-02-16 Thread Eric Snow

Eric Snow added the comment:

I've yanked the __weakref__ attr--apparently builtins don't have them.  I've 
also update the test.  Is the updated test sufficient?  I expect that if 
weakref.ref(ns) works, the rest of the weakref functionality works as well.

--
Added file: http://bugs.python.org/file29094/simplenamespace-weakref.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2012-12-03 Thread Christian Heimes

Christian Heimes added the comment:

The patch LGTM except for the extra code reformatting. However it's too late 
for 3.3.

--
nosy: +christian.heimes
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2012-12-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

You shouldn't have to export something named __weakref__.
Furthermore, the test should check that weakrefs work, not that an attribute 
exists.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2012-06-07 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2012-06-04 Thread Eric Snow

New submission from Eric Snow ericsnowcurren...@gmail.com:

Currently types.SimpleNamespace does not support weak references.  Amaury asked 
for this in #14673, but I'd like to see more discussion.  What are the use 
cases for weak references in this case?

The type is a simple wrapper around dict, which does not support weak 
references.  In fact most of the builtin types do not support them.  However, I 
freely admit that I haven't used weak references very much and am not familiar 
with the use cases.

--
messages: 162323
nosy: amaury.forgeotdarc, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: add weakref support to types.SimpleNamespace
type: enhancement
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2012-06-04 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

The only reason some of the builtin types don't support weakrefs is to save 
space.  That reason doesn't apply here.  Most types should support weakrefs 
unless there is a compelling reason not to.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15004] add weakref support to types.SimpleNamespace

2012-06-04 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

That's good enough for me. :)

--
keywords: +patch
Added file: http://bugs.python.org/file25826/issue15004.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com