[Python-Dev] [Python-checkins] Daily reference leaks (d7e490db8d54): sum=61494
Raymond Hettinger
raymond.hettinger at gmail.com
Wed Oct 21 11:32:39 EDT 2015
> On Oct 20, 2015, at 3:57 PM, Antoine Pitrou <antoine at pitrou.net> wrote:
>
>
>> These leaks have been here a while. Anyone know the cause?
>>
>> On Tue, 20 Oct 2015 at 01:47 <solipsis at pitrou.net> wrote:
>>
>>> results for d7e490db8d54 on branch "default"
>>> --------------------------------------------
>>>
>>> test_capi leaked [5411, 5411, 5411] references, sum=16233
>>> test_capi leaked [1421, 1423, 1423] memory blocks, sum=4267
>>> test_functools leaked [0, 2, 2] memory blocks, sum=4
>>> test_threading leaked [10820, 10820, 10820] references, sum=32460
>>> test_threading leaked [2842, 2844, 2844] memory blocks, sum=8530
>
> Bisection shows they were probably introduced by:
>
> changeset: 97413:dccc4e63aef5
> user: Raymond Hettinger <python at rcn.com>
> date: Sun Aug 16 19:43:34 2015 -0700
> files: Doc/library/operator.rst Doc/whatsnew/3.6.rst
> Lib/operator.py Lib/test/test_operator.py
> description:
> Issue #24379: Add operator.subscript() as a convenience for building slices.
>
>
> If you comment out `@object.__new__` on line 411 in operator.py, or if
> you remove the __slots__ assignment (which is a bit worrying), the leak
> seems suppressed.
>
Thanks for hunting this down. I had seen the automated reference leak posts
but didn't suspect that a pure python class would have caused the leak.
I'm re-opening https://mail.python.org/pipermail/python-dev/2015-October/141993.html
and will take a look at it this weekend. If I don't see an obvious fix, I'll revert Joe's patch
until a correct patch is supplied and reviewed.
Raymond
More information about the Python-Dev
mailing list