| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9bcc5163-8c74-1038-885a-59163e9f3c08 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 86B0:4BB79:4300527:5567E60:6B023A94 |
| html-safe-nonce | 4dd031412b1bfdc0cf22dbc1292632c57e26cdae349e3b9fec60db89a1234500 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkIwOjRCQjc5OjQzMDA1Mjc6NTU2N0U2MDo2QjAyM0E5NCIsInZpc2l0b3JfaWQiOiIyMTE5MTYxNzIwNjE3NDUwMTMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cdf0a9f24c4947141c96da37737b56f08ffefafa846e0235fc3ac38047c7581a |
| hovercard-subject-tag | issue:1457353795 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/issues_fragments/issue_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/99633/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d71c47aca60fd7c2845bc13f7193340a59eea945773298e93e7ab15cdf14375f/python/cpython/issues/99633 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d71c47aca60fd7c2845bc13f7193340a59eea945773298e93e7ab15cdf14375f/python/cpython/issues/99633 |
| og:image:alt | Feature or enhancement I would like to add __enter__ and __exit__ methods to contextvars.Context such that these two are mostly equivalent: contextvars.copy_context().run(do_something_interesting) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rhansen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
| Skip to content | https://github.com/python/cpython/issues/99633#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F99633 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F99633 |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/issues/99633 |
| Reload | https://github.com/python/cpython/issues/99633 |
| Reload | https://github.com/python/cpython/issues/99633 |
| python | https://github.com/python |
| cpython | https://github.com/python/cpython |
| Code | https://github.com/python/cpython |
| Issues5k+ (5k+) | https://github.com/python/cpython/issues |
| Pull requests2.4k (2.4k) | https://github.com/python/cpython/pulls |
| Actions | https://github.com/python/cpython/actions |
| Projects | https://github.com/python/cpython/projects |
| Security and quality | https://github.com/python/cpython/security |
| Insights | https://github.com/python/cpython/insights |
| https://github.com/python/cpython |
| New issue | https://github.com/login?return_to=https://github.com/python/cpython/issues/99633 |
| New issue | https://github.com/login?return_to=https://github.com/python/cpython/issues/99633 |
| Context manager support for contextvars.Context | https://github.com/python/cpython/issues/99633#top |
| stdlibStandard Library Python modules in the Lib/ directory | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22 |
| type-featureA feature request or enhancement | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22 |
| https://github.com/rhansen |
| rhansen | https://github.com/rhansen |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633#issue-1457353795 |
| contextvars.Context | https://docs.python.org/3/library/contextvars.html#contextvars.Context |
| https://stackoverflow.com/q/59264158 | https://stackoverflow.com/q/59264158 |
| gh-124872: Refine contextvars documentation #124773 | https://github.com/python/cpython/pull/124773 |
| gh-124872: Replace enter/exit events with "switched" #124776 | https://github.com/python/cpython/pull/124776 |
| gh-99633: Add context manager support to contextvars.Context #99634 | https://github.com/python/cpython/pull/99634 |
| Next | https://github.com/python/cpython/issues/99633?timeline_page=1 |
| rhansen | https://github.com/rhansen |
| type-featureA feature request or enhancement | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22 |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633#event-7854080001 |
| rhansen | https://github.com/rhansen |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633#event-7854217827 |
| pythongh-99633: Add context manager support to `contextvars.Context` | https://github.com/rhansen/cpython/commit/45a83271d7101888622405a7d13a0a6d8394c1ad |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| 45a8327 | https://github.com/rhansen/cpython/commit/45a83271d7101888622405a7d13a0a6d8394c1ad |
| sobolevn | https://github.com/sobolevn |
| topic-asyncio | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-asyncio%22 |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633#event-7856177585 |
| ezio-melotti | https://github.com/ezio-melotti |
| asyncio | https://github.com/orgs/python/projects/29 |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633 |
| ezio-melotti | https://github.com/ezio-melotti |
| asyncio | https://github.com/orgs/python/projects/29 |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633#event-15231021126 |
| https://github.com/gvanrossum |
| gvanrossum | https://github.com/gvanrossum |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633#issuecomment-1322658777 |
| @1st1 | https://github.com/1st1 |
| rhansen | https://github.com/rhansen |
| on Nov 21, 2022 | https://github.com/python/cpython/issues/99633#event-7861536702 |
| pythongh-99633: Add context manager support to `contextvars.Context` | https://github.com/rhansen/cpython/commit/eb110b6895b575dd54976fbe5801342e672004d3 |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| eb110b6 | https://github.com/rhansen/cpython/commit/eb110b6895b575dd54976fbe5801342e672004d3 |
| rhansen | https://github.com/rhansen |
| on Feb 2, 2023 | https://github.com/python/cpython/issues/99633#event-8417733834 |
| pythongh-99633: Add context manager support to `contextvars.Context` | https://github.com/rhansen/cpython/commit/f5ef259390df69d1a6c993b3694c1773aafcca0a |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| f5ef259 | https://github.com/rhansen/cpython/commit/f5ef259390df69d1a6c993b3694c1773aafcca0a |
| https://github.com/rhansen |
| rhansen | https://github.com/rhansen |
| on Feb 2, 2023 | https://github.com/python/cpython/issues/99633#issuecomment-1413243460 |
| @1st1 | https://github.com/1st1 |
| kumaraditya303 | https://github.com/kumaraditya303 |
| topic-asyncio | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-asyncio%22 |
| on Feb 3, 2023 | https://github.com/python/cpython/issues/99633#event-8434307427 |
| kumaraditya303 | https://github.com/kumaraditya303 |
| asyncio | https://github.com/orgs/python/projects/29 |
| on Feb 3, 2023 | https://github.com/python/cpython/issues/99633 |
| iritkatriel | https://github.com/iritkatriel |
| stdlibStandard Library Python modules in the Lib/ directory | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22 |
| on Nov 27, 2023 | https://github.com/python/cpython/issues/99633#event-11074632966 |
| https://github.com/apostolos-geyer |
| apostolos-geyer | https://github.com/apostolos-geyer |
| on May 26, 2024 | https://github.com/python/cpython/issues/99633#issuecomment-2131894699 |
| https://github.com/gvanrossum |
| gvanrossum | https://github.com/gvanrossum |
| on May 26, 2024 | https://github.com/python/cpython/issues/99633#issuecomment-2131977723 |
| rhansen | https://github.com/rhansen |
| on Jul 10, 2024 | https://github.com/python/cpython/issues/99633#event-13463267649 |
| pythongh-99633: Add context manager support to `contextvars.Context` | https://github.com/rhansen/cpython/commit/b21b76f3b137105f9e9d559040e8e15b71b5df79 |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| b21b76f | https://github.com/rhansen/cpython/commit/b21b76f3b137105f9e9d559040e8e15b71b5df79 |
| rhansen | https://github.com/rhansen |
| on Oct 7, 2024 | https://github.com/python/cpython/issues/99633#event-14547952477 |
| pythongh-99633: Inline independent coroutine check | https://github.com/rhansen/cpython/commit/cc607c121b932e5381bf29f48a97bd4d6520fdd7 |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| cc607c1 | https://github.com/rhansen/cpython/commit/cc607c121b932e5381bf29f48a97bd4d6520fdd7 |
| pythongh-99633: Add context manager support to `contextvars.Context` | https://github.com/rhansen/cpython/commit/f3a5f93ec2df0a31def5eba3b4dc6971c54406af |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| f3a5f93 | https://github.com/rhansen/cpython/commit/f3a5f93ec2df0a31def5eba3b4dc6971c54406af |
| pythongh-99633: _contextvars: Change private types to reduce casting | https://github.com/rhansen/cpython/commit/1e02793f0c265a1f1cc4b96ca36d141c7c78fe06 |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| 1e02793 | https://github.com/rhansen/cpython/commit/1e02793f0c265a1f1cc4b96ca36d141c7c78fe06 |
| pythongh-99633: _contextvars: Clarify that the ref is stolen, not bor… | https://github.com/rhansen/cpython/commit/11c500b21097bb23b109e2453fb81038af721b3d |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| 11c500b | https://github.com/rhansen/cpython/commit/11c500b21097bb23b109e2453fb81038af721b3d |
| pythongh-99633: _contextvars: Enter the thread's initial context | https://github.com/rhansen/cpython/commit/543df99a2566fccd63e63c4dd68a722f4f0181f2 |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| 543df99 | https://github.com/rhansen/cpython/commit/543df99a2566fccd63e63c4dd68a722f4f0181f2 |
| pythongh-99633: _contextvars: Call non-tstate variants | https://github.com/rhansen/cpython/commit/f6ae9d7a3da04067e3eaf3cd48810d9fcc1b83fe |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| f6ae9d7 | https://github.com/rhansen/cpython/commit/f6ae9d7a3da04067e3eaf3cd48810d9fcc1b83fe |
| pythongh-99633: New generator/coroutine `_context` property | https://github.com/rhansen/cpython/commit/d08b88d941bc13b9ffab771a1566d6fba93a497a |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| d08b88d | https://github.com/rhansen/cpython/commit/d08b88d941bc13b9ffab771a1566d6fba93a497a |
| pythongh-99633: Inline independent coroutine check | https://github.com/rhansen/cpython/commit/37c3544c8723f34d6f14ea81a817c7303f9708a7 |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| 37c3544 | https://github.com/rhansen/cpython/commit/37c3544c8723f34d6f14ea81a817c7303f9708a7 |
| pythongh-99633: Add context manager support to `contextvars.Context` | https://github.com/rhansen/cpython/commit/01afd3c227de36afa69404ff35f0558d14ce28a5 |
| pythongh-99633 | https://github.com/python/cpython/issues/99633 |
| 01afd3c | https://github.com/rhansen/cpython/commit/01afd3c227de36afa69404ff35f0558d14ce28a5 |
| pythongh-124872: Replace enter/exit events with "switched" | https://github.com/rhansen/cpython/commit/b4cff7700cbc47aa3cfcb6400dea2456b8825ca5 |
| pythongh-124872 | https://github.com/python/cpython/issues/124872 |
| b4cff77 | https://github.com/rhansen/cpython/commit/b4cff7700cbc47aa3cfcb6400dea2456b8825ca5 |
| pythongh-124872: Replace enter/exit events with "switched" | https://github.com/rhansen/cpython/commit/d8985251e73b4c69001285b7ea04abde26c463e8 |
| pythongh-124872 | https://github.com/python/cpython/issues/124872 |
| d898525 | https://github.com/rhansen/cpython/commit/d8985251e73b4c69001285b7ea04abde26c463e8 |
| 1st1 | https://github.com/1st1 |
| on Oct 14, 2024 | https://github.com/python/cpython/issues/99633#event-14645020629 |
| gh-124872: Replace enter/exit events with "switched" (#124776) | https://github.com/python/cpython/commit/843d28f59d2616d052d9d45f31823976da07f0f3 |
| gh-124872 | https://github.com/python/cpython/issues/124872 |
| #124776 | https://github.com/python/cpython/pull/124776 |
| 843d28f | https://github.com/python/cpython/commit/843d28f59d2616d052d9d45f31823976da07f0f3 |
| Eclips4 | https://github.com/Eclips4 |
| on Oct 16, 2024 | https://github.com/python/cpython/issues/99633#event-14673307467 |
| pythongh-124872: Replace enter/exit events with "switched" (python#12… | https://github.com/Eclips4/cpython/commit/f0b3aa862b629690496d0336904a9bb1ada6dd47 |
| pythongh-124872 | https://github.com/python/cpython/issues/124872 |
| python#12… | https://github.com/python/cpython/pull/124776 |
| f0b3aa8 | https://github.com/Eclips4/cpython/commit/f0b3aa862b629690496d0336904a9bb1ada6dd47 |
| ambv | https://github.com/ambv |
| on Oct 16, 2024 | https://github.com/python/cpython/issues/99633#event-14676558847 |
| gh-124872: Replace enter/exit events with "switched" (#125532) | https://github.com/python/cpython/commit/bee112a94d688c8048ddeddaa7bbd5150aecad11 |
| gh-124872 | https://github.com/python/cpython/issues/124872 |
| #125532 | https://github.com/python/cpython/pull/125532 |
| bee112a | https://github.com/python/cpython/commit/bee112a94d688c8048ddeddaa7bbd5150aecad11 |
| ebonnal | https://github.com/ebonnal |
| on Jan 12, 2025 | https://github.com/python/cpython/issues/99633#event-15894557733 |
| pythongh-124872: Replace enter/exit events with "switched" (python#12… | https://github.com/ebonnal/cpython/commit/077ed71bd23529bc64f12d5f4437f7b4a416e2b3 |
| pythongh-124872 | https://github.com/python/cpython/issues/124872 |
| python#12… | https://github.com/python/cpython/pull/125532 |
| 077ed71 | https://github.com/ebonnal/cpython/commit/077ed71bd23529bc64f12d5f4437f7b4a416e2b3 |
| Sign up for free | https://github.com/signup?return_to=https://github.com/python/cpython/issues/99633 |
| Sign in to comment | https://github.com/login?return_to=https://github.com/python/cpython/issues/99633 |
| stdlibStandard Library Python modules in the Lib/ directory | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22 |
| type-featureA feature request or enhancement | https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22 |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |