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 amaury.forgeotdarc
Recipients Mark.Shannon, abarry, amaury.forgeotdarc, barry, beazley, benjamin.peterson, brett.cannon, ionelmc, ncoghlan, pingebretson, rhettinger, serhiy.storchaka, yselivanov
Date 2016-01-12.18:02:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452621770.55.0.630690129696.issue26060@psf.upfronthosting.co.za>
In-reply-to
Content
Indeed. Here is another version of the script, it crashes when I set PYTHONHASHSEED=1 and passes with PYTHONHASHSEED=3::

class Meta(type):
    def __new__(meta, clsname, bases, methods):
        cls = super(Meta, meta).__new__(meta, clsname, bases, methods)
        count = 0
        for name in vars(cls):
            if name.startswith('f_'):
                print('decorate', name)
                count += 1
                setattr(cls, name, getattr(cls, name))
        assert count == 8
        return cls

class Spam2(metaclass=Meta):
    def f_1(self): pass
    def f_2(self): pass
    def f_3(self): pass
    def f_4(self): pass
    def f_5(self): pass
    def f_6(self): pass
    def f_7(self): pass
    def f_8(self): pass
History
Date User Action Args
2016-01-12 18:02:50amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, barry, brett.cannon, rhettinger, beazley, ncoghlan, benjamin.peterson, ionelmc, Mark.Shannon, pingebretson, serhiy.storchaka, yselivanov, abarry
2016-01-12 18:02:50amaury.forgeotdarcsetmessageid: <1452621770.55.0.630690129696.issue26060@psf.upfronthosting.co.za>
2016-01-12 18:02:50amaury.forgeotdarclinkissue26060 messages
2016-01-12 18:02:50amaury.forgeotdarccreate