-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-119690: Adds Unicode support for named pipes in _winapi #119717
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
def test_winapi_createnamedpipe(self): | ||
winapi = import_helper.import_module("_winapi") | ||
|
||
pipe_name = r"\\.\pipe\LOCAL\test_winapi_createnamed_pipe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the pipe name contain non-ASCII characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can, but the problem being checked here was due to misrepresenting char *
as wchar_t *
, and so ASCII is sufficient to turn into corruption when you s.encode('ascii').decode('utf-16-le')
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 🚀
Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…honGH-119717) (cherry picked from commit 78d697b) Co-authored-by: Steve Dower <steve.dower@python.org>
Sorry, @zooba, I could not cleanly backport this to
|
GH-119732 is a backport of this pull request to the 3.13 branch. |
GH-119733 is a backport of this pull request to the 3.12 branch. |
Also backports a minor improvement to test_audit.
This will need backporting further, but it's only getting to 3.12 in this form. I'll do the 3.11 and earlier ports separately.