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 terry.reedy
Recipients ezio.melotti, martin.panter, ncoghlan, njs, serhiy.storchaka, takluyver, terry.reedy
Date 2015-05-28.06:16:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432793770.94.0.440063211107.issue24294@psf.upfronthosting.co.za>
In-reply-to
Content
For Idle, the addition could be made in current versions. Idle compiles user code in the idle process and ships it to the user process for execution.  In particular, idlelib.run.Executive.runcode, line 351, is
                exec(code, self.locals)
Am I to presume that a) the warnings that you want to display will escape the exec call and that b) they are currently being caught at the module level and c) that the filterwarnings line or lines would do what you want if added to run.main, such as at line 104?  Do warnings from python code and user code get treated the same?

Please post test cases to enter by hand, both at the prompt and in the editor, to get system warnings for 2.7 and 3.4 or 3.5. Also, please copy the positive and negative examples you posted to python-ideas.
History
Date User Action Args
2015-05-28 06:16:10terry.reedysetrecipients: + terry.reedy, ncoghlan, ezio.melotti, njs, takluyver, martin.panter, serhiy.storchaka
2015-05-28 06:16:10terry.reedysetmessageid: <1432793770.94.0.440063211107.issue24294@psf.upfronthosting.co.za>
2015-05-28 06:16:10terry.reedylinkissue24294 messages
2015-05-28 06:16:10terry.reedycreate