Author gvanrossum
Recipients Mark.Shannon, gvanrossum, kayhayen, levkivskyi, serhiy.storchaka, terry.reedy
Date 2018-07-21.03:14:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
(Serhiy: I think you meant Nuitka, not numba -- Nuitka is a Python-to-C++ compiler, and Kay is its author. Somehow he managed to confuse us all. :-)

I suspect that the way `python3 -m test` runs the tests whose name you pass on the command line causes there to be no `__annotations__` global, while the way `python3 -m test.test_opcodes` runs its argument causes there to be one.  It seems that when a module is run as `__main__` it always is endowed with an `__annotations__` global, but when it is an imported module, `__annotations__` is only created when there is at least one top-level annotation.

I don't know why the global is always created for a `__main__`, but I suspect there's a good reason; the test will have to cope, because I think it should be able to run the tests either way.
Date User Action Args
2018-07-21 03:14:05gvanrossumsetrecipients: + gvanrossum, terry.reedy, kayhayen, Mark.Shannon, serhiy.storchaka, levkivskyi
2018-07-21 03:14:05gvanrossumsetmessageid: <>
2018-07-21 03:14:05gvanrossumlinkissue34136 messages
2018-07-21 03:14:04gvanrossumcreate