Commit 4c2fb0f9 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Disable warnings.warn() from looking at the previous stack frame

parent 8aea2cc5
......@@ -183,6 +183,12 @@ def warn(message, category=None, stacklevel=1):
assert issubclass(category, Warning)
# Get context information
try:
# Pyston change: manually skip the call to _getframe.
# A ValueError() is supposed to specify that the "depth" argument is greater
# than the stack level, so it doesn't seem appropriate for us to throw as
# a signal that it's unimplemented.
raise ValueError()
caller = sys._getframe(stacklevel)
except ValueError:
globals = sys.__dict__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment