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 petr.viktorin
Recipients Dormouse759, docs@python, miss-islington, ncoghlan, petr.viktorin, pitrou, scoder, vstinner
Date 2018-05-25.08:02:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527235374.1.0.682650639539.issue32374@psf.upfronthosting.co.za>
In-reply-to
Content
> That's a weak test: if the script fails before calling spec.loader.create_module(), the test also pass. If the function raises an exception but don't crash, the test pass as well.

That's a good argument, thanks.
Marcel, would you mind adding a patch for that?

> More generally, I'm not sure about the idea of making sure that doing bad stuff with traverse does crash. What is the purpose of the test?

This particular kind of bad traverse is quite easy to write if an extension author doesn't read docs carefully, or has read an old version of them (before the fix here). And resulting errors aren't too obvious. So, there's code to crash early and loudly in "--with-pydebug" for simple oversight cases. See comment at the call site of bad_traverse_test in Objects/moduleobject.c
And since there's code, there's a test to make sure it works :)

> In the meanwhile, I fixed bpo-33629 by adding test.support.SuppressCrashReport().

Thanks! Didn't know about that one, will keep it in mind for next time!
History
Date User Action Args
2018-05-25 08:02:54petr.viktorinsetrecipients: + petr.viktorin, ncoghlan, pitrou, scoder, vstinner, docs@python, Dormouse759, miss-islington
2018-05-25 08:02:54petr.viktorinsetmessageid: <1527235374.1.0.682650639539.issue32374@psf.upfronthosting.co.za>
2018-05-25 08:02:54petr.viktorinlinkissue32374 messages
2018-05-25 08:02:53petr.viktorincreate