This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author levkivskyi
Recipients gvanrossum, josh.r, levkivskyi, ned.deily, python-dev, serhiy.storchaka, yselivanov
Date 2016-11-10.08:43:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> BTW, if I set maxsize=100000 for typing lru_cache, test_generic_forward_ref crashes in refleak-test mode. Maybe this is another bug...

This one is also related to the mentioned in my previous message. Namely, forward references are only evaluated once. However, in refleak hunting mode tests are repeated multiple times, and every time test_generic_forward_ref is called, this code:

    class CC: ...

creates a new local class, while forward ref is still pointing to an old one.

There are two options:
* keep this behaviour and update the test to use a globally defined class;
* change this and re-evaluate forward refs every times.

However I would vote for a compromise solution: if the ``locals`` argument is not given, just use the evaluated value. But if a user gives non-None ``locals`` argument then that user most probably wants to re-evaluate the forward ref locally.
Date User Action Args
2016-11-10 08:43:50levkivskyisetrecipients: + levkivskyi, gvanrossum, ned.deily, python-dev, serhiy.storchaka, yselivanov, josh.r
2016-11-10 08:43:50levkivskyisetmessageid: <>
2016-11-10 08:43:50levkivskyilinkissue28649 messages
2016-11-10 08:43:50levkivskyicreate