Looks good to me. I like that skipmodules is a
regular expression, but I don't know how will it
affect the intended rewrite in C:
http://www.python.org/sf/1631171
It would be nice if the documentation mentioned
what is the interaction between stacklevel and
skipmodules parameters, at least something like:
"If you want to issue a warning outside your module,
and you don't know how many frames will have to be
skipped for that, pass some big integer for stacklevel"
If this patch is accepted, it should be put to use in
the _struct module:
>>> struct.Struct("<l").pack(4023029188) # note: module is sys
sys:1: DeprecationWarning: struct integer overflow masking is deprecated
|