]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642)
authorVictor Stinner <vstinner@python.org>
Tue, 8 Dec 2020 13:38:08 +0000 (14:38 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Dec 2020 13:38:08 +0000 (14:38 +0100)
commitb6d98c10fff6f320f8fdf595c3f9a05d8be4e31d
treeef735bfae1b85af4fd583fe1f3d3bd51359e2fda
parent233fddfe395e0de79a3866c9067ae7c544373ebf
bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642)

Fix encoding name when running a ".pyc" file on Windows:
PyRun_SimpleFileExFlags() now uses the correct encoding to decode the
filename.

* Add pyrun_file() subfunction.
* Add pyrun_simple_file() subfunction.
* PyRun_SimpleFileExFlags() now calls _Py_fopen_obj() rather than
  _Py_fopen().
Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst [new file with mode: 0644]
Python/pythonrun.c