bpo-33720: Reduces maximum marshal recursion depth on release builds. by zooba · Pull Request #7401 · python/cpython

if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):
# BUG: https://bugs.python.org/issue33720
# Windows always limits the maximum depth on release and debug builds
#if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to mark it as a temporary fix, I suggest:

# Windows always limits the maximum depth on release and debug builds
if os.name == 'nt': 

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I want it to be a temporary fix :) I want the compiler bug that's generating bad stack frames to be fixed. Hopefully I'll hear back from them today whether it's really a bug or not though - if there's a good reason for it then this can become a permanent change.