<div dir="ltr">[Adding Raymond to the thread, since he doesn't always follow the lists closely.]<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 8:23 PM, Benjamin Peterson <span dir="ltr"><<a href="mailto:benjamin@python.org" target="_blank">benjamin@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On Tue, Oct 20, 2015, at 15:57, Antoine Pitrou wrote:<br>
><br>
> > These leaks have been here a while. Anyone know the cause?<br>
> ><br>
> > On Tue, 20 Oct 2015 at 01:47 <solipsis at <a href="http://pitrou.net" rel="noreferrer" target="_blank">pitrou.net</a>> wrote:<br>
> ><br>
> >> results for d7e490db8d54 on branch "default"<br>
> >> --------------------------------------------<br>
> >><br>
> >> test_capi leaked [5411, 5411, 5411] references, sum=16233<br>
> >> test_capi leaked [1421, 1423, 1423] memory blocks, sum=4267<br>
> >> test_functools leaked [0, 2, 2] memory blocks, sum=4<br>
> >> test_threading leaked [10820, 10820, 10820] references, sum=32460<br>
> >> test_threading leaked [2842, 2844, 2844] memory blocks, sum=8530<br>
><br>
> Bisection shows they were probably introduced by:<br>
><br>
> changeset:   97413:dccc4e63aef5<br>
> user:        Raymond Hettinger <<a href="mailto:python@rcn.com">python@rcn.com</a>><br>
> date:        Sun Aug 16 19:43:34 2015 -0700<br>
> files:       Doc/library/operator.rst Doc/whatsnew/3.6.rst<br>
> Lib/operator.py Lib/test/test_operator.py<br>
> description:<br>
> Issue #24379: Add operator.subscript() as a convenience for building<br>
> slices.<br>
><br>
><br>
> If you comment out `@object.__new__` on line 411 in operator.py, or if<br>
> you remove the __slots__ assignment (which is a bit worrying), the leak<br>
> seems suppressed.<br>
<br>
</span>The problem is that the "subscript" class is not a GC type, but<br>
participates in a cycle through its type. I suspect it's type to force<br>
all heap types to have GC. Armin Rigo found previous examples where this<br>
special case caused problems, and I don't see what it buys anyway.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>