Skip to content

gh-126451: Register contextvars.Context to collections.abc.Mapping #126452

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 10 commits into from
Nov 6, 2024

Conversation

tungol
Copy link
Contributor

@tungol tungol commented Nov 5, 2024

This MR registers contextvars.Context to collections.abc.Mapping. It's already documented that Context implements the Mapping interface.

@tungol
Copy link
Contributor Author

tungol commented Nov 5, 2024

The test failure doesn't reproduce locally for me, and I'm not sure how my MR is related. I'm open to suggestions.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thank you!

Co-authored-by: Alex Waygood <[email protected]>
@AlexWaygood AlexWaygood added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Nov 6, 2024
Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

LGTM, with one extra nitpick about adding an issubclass check to the test.

@sobolevn sobolevn merged commit 5dc36dc into python:main Nov 6, 2024
36 checks passed
@miss-islington-app
Copy link

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

@sobolevn
Copy link
Member

sobolevn commented Nov 6, 2024

Thanks everyone!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 6, 2024
…ing (pythonGH-126452)

(cherry picked from commit 5dc36dc)

Co-authored-by: Stephen Morton <[email protected]>
Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
@sobolevn sobolevn removed needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Nov 6, 2024
@bedevere-app
Copy link

bedevere-app bot commented Nov 6, 2024

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 6, 2024
…ing (pythonGH-126452)

(cherry picked from commit 5dc36dc)

Co-authored-by: Stephen Morton <[email protected]>
Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Nov 6, 2024

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

@sobolevn
Copy link
Member

sobolevn commented Nov 6, 2024

Should we really backport this?

@AlexWaygood
Copy link
Member

We backported #126419 (see discussion in that PR). But I agree it's borderline; I don't feel strongly! Feel free to close the backports if you'd rather not.

@sobolevn
Copy link
Member

sobolevn commented Nov 6, 2024

Let's be consistent with #126419 👍

sobolevn added a commit that referenced this pull request Nov 6, 2024
…ping (GH-126452) (#126519)

gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452)
(cherry picked from commit 5dc36dc)

Co-authored-by: Stephen Morton <[email protected]>
Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
sobolevn added a commit that referenced this pull request Nov 6, 2024
…ping (GH-126452) (#126518)

gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452)
(cherry picked from commit 5dc36dc)

Co-authored-by: Stephen Morton <[email protected]>
Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
@tungol tungol deleted the contextvars-abc branch November 6, 2024 22:43
AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Nov 12, 2024
AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Nov 12, 2024
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
…ing (python#126452)

Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
…ing (python#126452)

Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
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.

5 participants