Title: New threads should inherit the contextvars.Context of their creator · Issue #128555 · python/cpython · GitHub
Open Graph Title: New threads should inherit the contextvars.Context of their creator · Issue #128555 · python/cpython
X Title: New threads should inherit the contextvars.Context of their creator · Issue #128555 · python/cpython
Description: Feature or enhancement Proposal: It would be convenient and likely less surprising if threads inherited the context of their creator, rather than starting with an empty context. This would match what asynio.Task does. This has been reque...
Open Graph Description: Feature or enhancement Proposal: It would be convenient and likely less surprising if threads inherited the context of their creator, rather than starting with an empty context. This would match wh...
X Description: Feature or enhancement Proposal: It would be convenient and likely less surprising if threads inherited the context of their creator, rather than starting with an empty context. This would match wh...
Opengraph URL: https://github.com/python/cpython/issues/128555
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New threads should inherit the contextvars.Context of their creator","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nIt would be convenient and likely less surprising if threads inherited the context of their creator, rather than starting with an empty context. This would match what `asynio.Task` does. This has been requested before, as gh-86981.\n\n### Has this already been discussed elsewhere?\n\nI have already discussed this feature proposal on Discourse\n\n### Links to previous discussion of this feature:\n\nhttps://discuss.python.org/t/thread-safe-warning-filters/\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-128209\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/nascheme","@type":"Person","name":"nascheme"},"datePublished":"2025-01-06T19:03:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/128555/cpython/issues/128555"}
| 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:c0ec653a-7b67-4856-78d7-8ad3bef83276 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9482:F87E9:E48142:1371178:6A521B48 |
| html-safe-nonce | ca2668a5c5b447d5e26cc228799c31a9a329e24be48c4bf1bf7931abc5194766 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDgyOkY4N0U5OkU0ODE0MjoxMzcxMTc4OjZBNTIxQjQ4IiwidmlzaXRvcl9pZCI6IjY3NTMxMTkwMTI3NzM4Mjk0NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 897c06034094066deacbe8a037b677fa146a18fc5ab8c812b9a7090ad0605b64 |
| hovercard-subject-tag | issue:2771262563 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/128555/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a12498a6e9bbd5354fc54ef6ca8cb6549d6f7584838abba16f47790bfca7c075/python/cpython/issues/128555 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a12498a6e9bbd5354fc54ef6ca8cb6549d6f7584838abba16f47790bfca7c075/python/cpython/issues/128555 |
| og:image:alt | Feature or enhancement Proposal: It would be convenient and likely less surprising if threads inherited the context of their creator, rather than starting with an empty context. This would match wh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nascheme |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width