Issue 15293: AST nodes do not support garbage collection (original) (raw)
Issue15293
Created on 2012-07-08 10:47 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg165001 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2012-07-08 10:47 |
Add the following to test_ast: diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -199,6 +199,7 @@ class AST_Tests(unittest.TestCase): x.foobar = 42 self.assertEqual(x.foobar, 42) self.assertEqual(x.__dict__["foobar"], 42) + x.x = x with self.assertRaises(AttributeError): x.vararg and you'll get a reference leak. | ||
msg165030 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2012-07-08 18:03 |
New changeset 85cccc38d01c by Benjamin Peterson in branch 'default': add gc support to the AST base type (closes #15293) http://hg.python.org/cpython/rev/85cccc38d01c | ||
msg218908 - (view) | Author: Charles-François Natali (neologix) * ![]() |
Date: 2014-05-22 18:38 |
Would it be possible to backport this to 2.7? We've been bitten by this at work (pyflakes introduces reference cycles in AST). | ||
msg219059 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2014-05-24 22:13 |
How are you reproducing the bug? In Python 2, the AST base class doesn't have a __dict__, and it's subtypes do support GC. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:32 | admin | set | github: 59498 |
2014-05-24 22:13:51 | benjamin.peterson | set | messages: + |
2014-05-22 19:05:56 | flox | set | nosy: + flox |
2014-05-22 18:38:33 | neologix | set | nosy: + neologixmessages: + |
2012-07-08 18:03:53 | python-dev | set | status: open -> closednosy: + python-devmessages: + resolution: fixedstage: resolved |
2012-07-08 10:47:33 | pitrou | create |