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

[3.13] GH-134453: Fix subprocess memoryview input handling on POSIX (GH-134949)#142063

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

Merged
gpshead merged 1 commit intopython:3.13frommiss-islington:backport-cc6bc4c-3.13
Nov 29, 2025

Conversation

@miss-islington
Copy link
Contributor

@miss-islingtonmiss-islington commentedNov 29, 2025
edited by bedevere-appbot
Loading

Fix inconsistent subprocess.Popen.communicate() behavior between Windows
and POSIX when using memoryview objects with non-byte elements as input.

On POSIX systems, the code was incorrectly comparing bytes written against
element count instead of byte count, causing data truncation for large
inputs with non-byte element types.

Changes:

  • Cast memoryview inputs to byte view when input is already a memoryview
  • Fix progress tracking to use len(input_view) instead of len(self._input)
  • Add comprehensive test coverage for memoryview inputs

🤖 Generated withClaude Code

Co-Authored-By: Claudenoreply@anthropic.com

  • old-man-yells-at-ReST
  • Update 2025-05-30-18-37-44.gh-issue-134453.kxkA-o.rst
  • assertIsNone review feedback
  • fix memoryview_nonbytes test to fail without our fix on main, and have a nicer error.

Thanks to Peter Bierma@ZeroIntensity for the code review.
(cherry picked from commitcc6bc4c)

Co-authored-by: Gregory P. Smith68491+gpshead@users.noreply.github.com

…ythonGH-134949)Fix inconsistent subprocess.Popen.communicate() behavior between Windowsand POSIX when using memoryview objects with non-byte elements as input.On POSIX systems, the code was incorrectly comparing bytes written againstelement count instead of byte count, causing data truncation for largeinputs with non-byte element types.Changes:- Cast memoryview inputs to byte view when input is already a memoryview- Fix progress tracking to use len(input_view) instead of len(self._input)- Add comprehensive test coverage for memoryview inputs🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>* old-man-yells-at-ReST* Update 2025-05-30-18-37-44.gh-issue-134453.kxkA-o.rst* assertIsNone review feedback* fix memoryview_nonbytes test to fail without our fix on main, and have a nicer error.Thanks to Peter Bierma@ZeroIntensity for the code review.(cherry picked from commit cc6bc4c97f7be5b401a91119ba603e6c1a07c99b)Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@gpsheadgpsheadenabled auto-merge (squash)November 29, 2025 04:41
@gpsheadgpsheadenabled auto-merge (squash)November 29, 2025 06:42
@gpsheadgpshead merged commit704bb69 intopython:3.13Nov 29, 2025
74 of 76 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gpsheadgpsheadAwaiting requested review from gpsheadgpshead 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

@miss-islington@gpshead

[8]ページ先頭

©2009-2025 Movatter.jp