STINNER Victor <vstinner at python.org> added the comment: Yeah, sys must be imported first. Did you try to fix the patch? Does it work? ---------- _______________________________________ Python tracker <report at bugs.python.org> <https://bugs.python.org/issue39936> _______________________________________