Skip to content

[3.9] bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642)#23692

Merged
vstinner merged 1 commit into
python:3.9from
vstinner:pyrun_file39
Dec 8, 2020
Merged

[3.9] bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642)#23692
vstinner merged 1 commit into
python:3.9from
vstinner:pyrun_file39

Conversation

@vstinner

@vstinner vstinner commented Dec 8, 2020

Copy link
Copy Markdown
Member

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().

(cherry picked from commit b6d98c1)

https://bugs.python.org/issue32381

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().

(cherry picked from commit b6d98c1)
@vstinner vstinner merged commit f0e42ae into python:3.9 Dec 8, 2020
@vstinner vstinner deleted the pyrun_file39 branch December 8, 2020 15:16
vstinner added a commit that referenced this pull request Dec 8, 2020
… (GH-23696)

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().

(cherry picked from commit b6d98c1)
(cherry picked from commit f0e42ae)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants