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/sys.rst b/Doc/library/sys.rst
index 0005792..7a3f642 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -417,7 +417,8 @@
that is deeper than the call stack, :exc:`ValueError` is raised. The default
for *depth* is zero, returning the frame at the top of the call stack.
- This function should be used for internal and specialized purposes only.
+ This function should be used for internal and specialized purposes only. It
+ is not guaranteed to exist in all implementations of Python.
.. function:: getprofile()