This is due to https://bugs.python.org/issue38283. Very frustrating that the change log didn't mention that `sys._getframe()` behaviour had changed and that no work around is provided to resolve this.