Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-133886: Fix sys.remote_exec() for non-UTF-8 paths#133887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedMay 11, 2025
edited by bedevere-appbot
Loading

It now supports non-ASCII paths in non-UTF-8 locales and non-UTF-8 paths in UTF-8 locales.

It now supports non-ASCII paths in non-UTF-8 locales andnon-UTF-8 paths in UTF-8 locales.
run_remote_debugger_script(path);
PyObject *path_obj = PyUnicode_DecodeFSDefault(path);
if (path_obj == NULL) {
PyErr_FormatUnraisable("Can't decode debugger script");
Copy link
Member

Choose a reason for hiding this comment

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

Can we include the script path in this exception ?

Copy link
Member

@pablogsalpablogsal left a comment

Choose a reason for hiding this comment

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

LGTM

Left a suggestion

'undecodable paths are not supported on macOS')
def test_remote_exec_undecodable(self):
script = 'print("Remote script executed successfully!")'
script_path = os_helper.TESTFN_UNDECODABLE + b'_undecodable_remote.py'
Copy link
Member

Choose a reason for hiding this comment

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

Oh nice! I didn't know about this

}
Py_DECREF(path);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can have a goto label for the error at this stage. I don't mind either way so up to you

@serhiy-storchakaserhiy-storchaka merged commitc09cec5 intopython:mainMay 13, 2025
39 checks passed
@miss-islington-app
Copy link

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 13, 2025
…133887)It now supports non-ASCII paths in non-UTF-8 locales andnon-UTF-8 paths in UTF-8 locales.(cherry picked from commitc09cec5)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchakaserhiy-storchaka deleted the sys-remote_exec-non-utf8 branchMay 13, 2025 08:55
@bedevere-app
Copy link

GH-133963 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 13, 2025
@serhiy-storchaka
Copy link
MemberAuthor

Thank you for your review,@pablogsal.

@serhiy-storchaka
Copy link
MemberAuthor

We could also use natural UTF-16 for paths on Windows, but this is more significant change.

serhiy-storchaka added a commit that referenced this pull requestMay 13, 2025
… (GH-133963)It now supports non-ASCII paths in non-UTF-8 locales andnon-UTF-8 paths in UTF-8 locales.(cherry picked from commitc09cec5)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pablogsalpablogsalpablogsal approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@serhiy-storchaka@pablogsal

[8]ページ先頭

©2009-2025 Movatter.jp