[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I am not sure what does this mean, but when I remove __slots__ = () from some classes, numbers of leaked references change. -- ___ Python tracker

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Wow. I can reproduce refleaks in test_typing, but not in test_functools. This > is weird. Indeed, I copied the new test from test_functools to test_typing, but now I see that pure Python version of lru_cache fails even if I remove this test and test that w

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Yury Selivanov
Yury Selivanov added the comment: > Anyway, this is not urgent Not so sure, a refleak in pure-python version kind of scares me. It can be a bug in the core. -- ___ Python tracker

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Yury Selivanov
Changes by Yury Selivanov : -- stage: commit review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Yury Selivanov
Yury Selivanov added the comment: > It seems to be unrelated to typing.py Wow. I can reproduce refleaks in test_typing, but not in test_functools. This is weird. -- ___ Python tracker

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Anyway, this is not urgent, typing.py uses the default version, which is the C version. -- ___ Python tracker ___

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: It seems to be unrelated to typing.py With your test from test_functools: def test_lru_type_error(self): @functools.lru_cache(maxsize=None) def infinite_cache(o): pass with self.assertRaises(TypeError): infini

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Yury Selivanov
Yury Selivanov added the comment: > FWIW, if I comment out this code Oh boy... This is something else. Please re-open #28649 explaining that it now leaks with pure-Python lru_cache. Could you please take a look at it? -- ___ Python tracker

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset ba59f3328032 by Yury Selivanov in branch '3.5': Issue #28653: Fix a refleak in functools.lru_cache. https://hg.python.org/cpython/rev/ba59f3328032 New changeset 5b253d641826 by Yury Selivanov in branch '3.6': Merge 3.6 (issue #28653) https://hg.pyth

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: FWIW, if I comment out this code try: from _functools import _lru_cache_wrapper except ImportError: pass in functools.py to use the pure Python version, then I get much larger numbers: $ ./python -m test -R : test_typing Run tests sequentially 0:00:00

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> yselivanov stage: patch review -> commit review ___ Python tracker ___ ___

[issue28653] refleak in functools.lru_cache

2016-11-09 Thread Yury Selivanov
New submission from Yury Selivanov: The attached patch fixes a refleak in functools.lru_cache. -- components: Library (Lib) files: refleak.patch keywords: patch messages: 280468 nosy: gvanrossum, larry, ned.deily, serhiy.storchaka, yselivanov priority: release blocker severity: normal st