Note that sys._getframe is not guaranteed to exist in all implementations of Python, and a corresponding note in inspect.currentframe. Issue 6712.
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index bea12c9..ac89850 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -567,6 +567,11 @@
Return the frame object for the caller's stack frame.
+ This function relies on Python stack frame support in the interpreter, which
+ isn't guaranteed to exist in all implementations of Python. If running in
+ an implmentation without Python stack frame support this function returns
+ ``None``.
+
.. function:: stack([context])