Skip to content

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

Merged
vstinner merged 1 commit into
python:3.8from
vstinner:pyrun_file38
Dec 8, 2020
Merged

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

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)
(cherry picked from commit f0e42ae)

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