Message248603
Frames can be skipped only for warnings issued by imported module code, not for warnings issued by import machinery itself.
I propose following algorithm:
Before executing module code push the current frame and the number of frames to skip in global stack in the warnings module, and pop it after execution (public context manager can help). In warnings.warn() skip stacklevel frames and if saved frame was skipped, skip corresponding additional number of frames. Repeat for all saved frames. |
|
Date |
User |
Action |
Args |
2015-08-14 19:24:31 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, brett.cannon, ncoghlan, larry, jwilk, Arfrever, njs, eric.snow, takluyver, berker.peksag |
2015-08-14 19:24:31 | serhiy.storchaka | set | messageid: <1439580271.57.0.0128153483092.issue24305@psf.upfronthosting.co.za> |
2015-08-14 19:24:31 | serhiy.storchaka | link | issue24305 messages |
2015-08-14 19:24:31 | serhiy.storchaka | create | |
|