FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-32381: Fix PyRun_SimpleFileExFlags() encoding by vstinner · Pull Request #23642 · python/cpython · GitHub

Repository navigation

bpo-32381: Fix PyRun_SimpleFileExFlags() encoding - #23642

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:pyrun_file
Dec 8, 2020
Merged

vstinner merged 1 commit into
python:masterfrom
vstinner:pyrun_file

Conversation

vstinner commented Dec 4, 2020 •
edited by bedevere-bot
Loading

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

https://bugs.python.org/issue32381

vstinner commented Dec 4, 2020

Copy link
Copy Markdown
Member Author

@FFY00: Hey, the "Check if generated files are up to date" worked as expected! It spotted a bug in my PR (already fixed):

Check that libpython3.10d.a only exports symbols starting with Py or _Py
+ nm --no-sort libpython3.10d.a
Ignore 20161 local symbols

Smelly symbol: pyrun_simple_file (type: T)

ERROR: Found 1 smelly symbols!

Thanks again for this nice new GitHub Action job ;-)

Comment thread Python/pythonrun.c Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

arena can't be NULL here anymore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Oh right, fixed, thanks ;-)

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

vstinner commented Dec 4, 2020

Copy link
Copy Markdown
Member Author

Strange. I pushed a fix for if (arena != NULL) but I cannot see yet. I guess that it will appear on the website soon.

vstinner merged commit b6d98c1 into python:master Dec 8, 2020
vstinner deleted the pyrun_file branch December 8, 2020 13:38
vstinner added a commit that referenced this pull request Dec 8, 2020
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 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)
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
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().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL