Github user superbobry commented on the issue:
https://github.com/apache/spark/pull/21180
I agree that in theory, the use of `_getframe` is somewhat limiting, but I
doubt it would be a major concern in practice. Python does not have a standard,
so the best we can hope for, as far as portability goes, is for other
interpreters to behave identically to CPython.
A possible alternative to `_getframe` is to use
[`traceback.extract_stack`](https://docs.python.org/2/library/traceback.html#traceback.extract_stack)
which seems to behave identically on CPython/PyPy/Jython/IronPython. The
caveat there though is that we'll have to guess the name of the module, as
`f_globals` is not available. Wdyt?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]