Issue #24305: Prevent import subsystem stack frames from being counted

by the warnings.warn(stacklevel=) parameter.
This commit is contained in:
Larry Hastings 2015-09-06 00:39:37 -07:00
parent 62b24624dd
commit 714e49371b
7 changed files with 127 additions and 16 deletions

View file

@ -0,0 +1,9 @@
# Helper module for testing the skipmodules argument of warnings.warn()
import warnings
def outer(message, stacklevel=1):
inner(message, stacklevel)
def inner(message, stacklevel=1):
warnings.warn(message, stacklevel=stacklevel)