Skip to content

Conversation

@encukou
Copy link
Member

@encukou encukou commented Dec 5, 2025

(cherry picked from commit 4172644)

In 3.14, send messages the simpler original protocol by default (that is: except for filenames with newlines).

@encukou
Copy link
Member Author

encukou commented Dec 5, 2025

@hugovk This backport should be ready to merge, maybe you want to do a quick sanity check?

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. I just have a minor coding style suggestion.

Comment on lines +322 to +323
except Exception as e:
raise ValueError("malformed resource_tracker message: %r" % (line,)) from e
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
except Exception as e:
raise ValueError("malformed resource_tracker message: %r" % (line,)) from e
except Exception as exc:
raise ValueError("malformed resource_tracker message: %r" % (line,)) from exc

Same suggestion for the similar try/except below.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't see this message; I merged at the same time you sent it :(

Anyway, I wouldn't change style in a backport.
(Also note that this part of the code was moved -- see git show --color-moved --color-moved-ws=allow-indentation-change f130b06da or a fancy Git client.)

Copy link
Member

Choose a reason for hiding this comment

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

No problem. It just was a minor suggestion.

@encukou encukou merged commit f130b06 into python:3.14 Dec 5, 2025
57 checks passed
@miss-islington-app
Copy link

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

@encukou encukou deleted the backport-4172644-3.14 branch December 5, 2025 11:47
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2025
…ages using older protocol (pythonGH-142215) (pythonGH-142285)

(cherry picked from commit 4172644)

Difference from the original commit: the default in 3.14 is to use
the simpler original protocol (except for filenames with newlines).
(cherry picked from commit f130b06)

Co-authored-by: Petr Viktorin <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Dec 5, 2025

GH-142287 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 Dec 5, 2025
Yhg1s pushed a commit that referenced this pull request Dec 5, 2025
…sing older protocol (GH-142215) (#142287)

[3.14] gh-142206: multiprocessing.resource_tracker: Decode messages using older protocol (GH-142215) (GH-142285)

(cherry picked from commit 4172644)

Difference from the original commit: the default in 3.14 is to use
the simpler original protocol (except for filenames with newlines).
(cherry picked from commit f130b06)

Co-authored-by: Petr Viktorin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants