8000 gh-119690: Adds Unicode support for named pipes in _winapi by zooba · Pull Request #119717 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 2 commits into from
May 29, 2024

Conversation

zooba
Copy link
Member
@zooba zooba commented May 29, 2024

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.

@zooba zooba added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels May 29, 2024
@zooba zooba requested a review from eryksun May 29, 2024 10:08
@zooba zooba self-assigned this May 29, 2024
def test_winapi_createnamedpipe(self):
winapi = import_helper.import_module("_winapi")

pipe_name = r"\\.\pipe\LOCAL\test_winapi_createnamed_pipe"
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Contributor
@eryksun eryksun left a comment

Choose a reason for hiding this comment

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

Looks good. 🚀

@zooba zooba merged commit 78d697b into python:main May 29, 2024
36 checks passed
@miss-islington-app
Copy link

Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 29, 2024
…honGH-119717)

(cherry picked from commit 78d697b)

Co-authored-by: Steve Dower <steve.dower@python.org>
@miss-islington-app
Copy link

Sorry, @zooba, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 78d697b7d5ec2a6fa046b0e1c34e804f49e750b4 3.12

@bedevere-app
Copy link
bedevere-app bot commented May 29, 2024

GH-119732 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 29, 2024
@zooba zooba deleted the gh-119690 branch May 29, 2024 15:52
@bedevere-app
Copy link
bedevere-app bot commented May 29, 2024

GH-119733 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label May 29, 2024
zooba added a commit that referenced this pull request May 30, 2024
Also backports a minor improvement to test_audit.
zooba added a commit that referenced this pull request May 31, 2024
(cherry picked from commit 78d697b)

Co-authored-by: Steve Dower <steve.dower@python.org>
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
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
0