Eryk Sun <eryk...@gmail.com> added the comment: In Python/pythonrun.c, PyRun_SimpleFileExFlags() reopens the PYC file in binary mode, passes it to run_pyc_file(), and only closes it after executing the script. The file should instead be closed in run_pyc_file(), before calling PyEval_EvalCode().
---------- nosy: +eryksun versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33451> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com