René's URL Explorer Experiment


Title: GH-141148: ensure tasks/threads get fresh copy of decimal.Context by nascheme · Pull Request #146482 · python/cpython · GitHub

Open Graph Title: GH-141148: ensure tasks/threads get fresh copy of decimal.Context by nascheme · Pull Request #146482 · python/cpython

X Title: GH-141148: ensure tasks/threads get fresh copy of decimal.Context by nascheme · Pull Request #146482 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Ensure that decimal.getcontext() returns a per-task copy of the decimal.Context so that mutations are isolated between asyncio tasks and threads when sys.flags.thread_inherit_context is set. This c...

X Description: Ensure that decimal.getcontext() returns a per-task copy of the decimal.Context so that mutations are isolated between asyncio tasks and threads when sys.flags.thread_inherit_context is set. This c...

Opengraph URL: https://github.com/python/cpython/pull/146482

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:350d33dd-c0cc-f42f-bf67-137f82aaae84
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC7FA:917F8:12C1642:18DF72A:6A533E3D
html-safe-nonce3b68d91465a562596dc9e4b0c05ee54d7d0e8456d9d4a12acfdc33a94f49ed76
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0ZBOjkxN0Y4OjEyQzE2NDI6MThERjcyQTo2QTUzM0UzRCIsInZpc2l0b3JfaWQiOiI5NTc2MDU1NjY1MDI2MTY2MzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac20ed691089c7474f7bfea1ad8d8706dc66ac3c9334234e36bf57702ded7306b6
hovercard-subject-tagpull_request:3453083668
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/146482/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/f202b01305a31ead83b072518e8f96629bdb6e3400611dd8d9ac4e3a6bdc6236/python/cpython/pull/146482
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f202b01305a31ead83b072518e8f96629bdb6e3400611dd8d9ac4e3a6bdc6236/python/cpython/pull/146482
og:image:altEnsure that decimal.getcontext() returns a per-task copy of the decimal.Context so that mutations are isolated between asyncio tasks and threads when sys.flags.thread_inherit_context is set. This c...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenascheme
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-cache
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/146482#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F146482
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F146482
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/146482
Reloadhttps://github.com/python/cpython/pull/146482
Reloadhttps://github.com/python/cpython/pull/146482
Please reload this pagehttps://github.com/python/cpython/pull/146482
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/146482
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests 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/pulse
naschemehttps://github.com/nascheme
python:mainhttps://github.com/python/cpython/tree/main
nascheme:decimal_ctx_inherithttps://github.com/nascheme/cpython/tree/decimal_ctx_inherit
Conversationhttps://github.com/python/cpython/pull/146482
Commits6 (6)https://github.com/python/cpython/pull/146482/commits
Checkshttps://github.com/python/cpython/pull/146482/checks
Files changedhttps://github.com/python/cpython/pull/146482/files
GH-141148: ensure tasks/threads get fresh copy of decimal.Contexthttps://github.com/python/cpython/pull/146482#top
naschemehttps://github.com/nascheme
python:mainhttps://github.com/python/cpython/tree/main
nascheme:decimal_ctx_inherithttps://github.com/nascheme/cpython/tree/decimal_ctx_inherit
https://github.com/nascheme
naschemehttps://github.com/nascheme
Mar 26, 2026https://github.com/python/cpython/pull/146482#issue-4146376797
Please reload this pagehttps://github.com/python/cpython/pull/146482
data races in decimal module with global context #141148https://github.com/python/cpython/issues/141148
https://cpython-previews--146482.org.readthedocs.build/https://cpython-previews--146482.org.readthedocs.build/
Please reload this pagehttps://github.com/python/cpython/pull/146482
naschemehttps://github.com/nascheme
March 25, 2026 18:08https://github.com/python/cpython/pull/146482#commits-pushed-0a20e79
https://github.com/nascheme
Add PyContextVar_GetChanged() method.https://github.com/python/cpython/pull/146482/commits/0a20e79268eafd2c3d3121e912ec8f165946f750
0a20e79https://github.com/python/cpython/pull/146482/commits/0a20e79268eafd2c3d3121e912ec8f165946f750
https://github.com/nascheme
Use ContextVar.get_changed() for decimal context.https://github.com/python/cpython/pull/146482/commits/b33469eb37f0746916353b539b36c2a03ea14eca
b33469ehttps://github.com/python/cpython/pull/146482/commits/b33469eb37f0746916353b539b36c2a03ea14eca
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Mar 26, 2026 https://github.com/python/cpython/pull/146482#ref-issue-3596171795
data races in decimal module with global context #141148 https://github.com/python/cpython/issues/141148
https://github.com/nascheme
Mark unit test that needs working threads.https://github.com/python/cpython/pull/146482/commits/74482e303587929b75143a6d4283a83073c88ff5
74482e3https://github.com/python/cpython/pull/146482/commits/74482e303587929b75143a6d4283a83073c88ff5
https://github.com/skirpichev
skirpichevhttps://github.com/skirpichev
Mar 26, 2026https://github.com/python/cpython/pull/146482#issuecomment-4139000954
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/nascheme
naschemehttps://github.com/nascheme
Mar 27, 2026https://github.com/python/cpython/pull/146482#issuecomment-4143993622
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/skirpichev
skirpichevhttps://github.com/skirpichev
Mar 29, 2026https://github.com/python/cpython/pull/146482#issuecomment-4149184131
https://github.com/gmpy2/gmpy2/blob/194a6dba7c3f497eebe1b3ffa234addc15f2c7c1/src/gmpy2_context.chttps://github.com/gmpy2/gmpy2/blob/194a6dba7c3f497eebe1b3ffa234addc15f2c7c1/src/gmpy2_context.c
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
Apr 5, 2026 https://github.com/python/cpython/pull/146482#pullrequestreview-4059375590
View reviewed changes https://github.com/python/cpython/pull/146482/files/74482e303587929b75143a6d4283a83073c88ff5
Python/context.chttps://github.com/python/cpython/pull/146482/files/74482e303587929b75143a6d4283a83073c88ff5#diff-90866884a04307bbbb14a8c99bcb5c4b96edde026113a014601b2ae38881f149
kumaraditya303https://github.com/kumaraditya303
Apr 5, 2026https://github.com/python/cpython/pull/146482#discussion_r3036730957
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/146482
naschemehttps://github.com/nascheme
Apr 5, 2026https://github.com/python/cpython/pull/146482#discussion_r3037187000
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/nascheme
naschemehttps://github.com/nascheme
April 9, 2026 15:34https://github.com/python/cpython/pull/146482#event-24341960666
https://github.com/nascheme
naschemehttps://github.com/nascheme
1st1https://github.com/1st1
code ownerhttps://github.com/python/cpython/blob/d8c56581560ed139d261dd14acd73597e40cf88b/.github/CODEOWNERS#L239
April 9, 2026 15:34https://github.com/python/cpython/pull/146482#event-24341961179
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Apr 9, 2026https://github.com/python/cpython/pull/146482#event-24341963297
https://github.com/devdanzin
devdanzinhttps://github.com/devdanzin
Apr 29, 2026 https://github.com/python/cpython/pull/146482#ref-issue-4349303323
_decimal: mpd_context_t::status/traps mutated non-atomically leading to data race #149142 https://github.com/python/cpython/issues/149142
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
May 18, 2026https://github.com/python/cpython/pull/146482#issuecomment-4473078932
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
stale https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Astale
May 18, 2026https://github.com/python/cpython/pull/146482#event-25635808888
https://github.com/LindaSummer
LindaSummerhttps://github.com/LindaSummer
May 30, 2026 https://github.com/python/cpython/pull/146482#ref-pullrequest-4553574156
GH-149142: Fix decimal mpd_context_t.status race in free-threading #150598 https://github.com/python/cpython/pull/150598
naschemehttps://github.com/nascheme
June 17, 2026 16:44https://github.com/python/cpython/pull/146482#commits-pushed-c2dbdca
https://github.com/nascheme
Remove public PyContextVar_GetChanged() API.https://github.com/python/cpython/pull/146482/commits/c2dbdca27fb97831bee4c23d3e9e857588d76b5e
c2dbdcahttps://github.com/python/cpython/pull/146482/commits/c2dbdca27fb97831bee4c23d3e9e857588d76b5e
https://github.com/nascheme
Merge remote-tracking branch 'origin/main' into decimal_ctx_inherithttps://github.com/python/cpython/pull/146482/commits/5835fac16d14bcce27977767956c5757232e8998
5835fachttps://github.com/python/cpython/pull/146482/commits/5835fac16d14bcce27977767956c5757232e8998
https://github.com/apps/read-the-docs-community
read-the-docs-communityhttps://github.com/apps/read-the-docs-community
Jun 17, 2026https://github.com/python/cpython/pull/146482#issuecomment-4736527427
cpython-previewshttps://app.readthedocs.org/projects/cpython-previews/
#33191341https://app.readthedocs.org/projects/cpython-previews/builds/33191341/
c2dbdcahttps://github.com/python/cpython/commit/c2dbdca27fb97831bee4c23d3e9e857588d76b5e
mainhttps://cpython-previews.readthedocs.io/en/main/
a8d74c0https://github.com/python/cpython/commit/a8d74c062fe3c5cb2962dde8bee83704fcfa1bc9
  🔍 Preview build   https://cpython-previews--146482.org.readthedocs.build/en/146482/
bugs.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/bugs.html
glossary.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/glossary.html
index.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/index.html
c-api/allocation.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/allocation.html
c-api/buffer.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/buffer.html
c-api/bytearray.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/bytearray.html
c-api/bytes.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/bytes.html
c-api/capsule.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/capsule.html
c-api/code.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/code.html
c-api/complex.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/complex.html
c-api/sentinel.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/sentinel.html
c-api/slots.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/c-api/slots.html
deprecations/pending-removal-in-3.21.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/deprecations/pending-removal-in-3.21.html
deprecations/soft-deprecations.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/deprecations/soft-deprecations.html
howto/abi3t-migration.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/howto/abi3t-migration.html
library/asyncio-threading.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/library/asyncio-threading.html
whatsnew/3.16.htmlhttps://cpython-previews--146482.org.readthedocs.build/en/146482/whatsnew/3.16.html
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/nascheme
Merge remote-tracking branch 'origin/main' into decimal_ctx_inherithttps://github.com/python/cpython/pull/146482/commits/a7dacfab8679fa605d9fb8037e5fb2753adff553
a7dacfahttps://github.com/python/cpython/pull/146482/commits/a7dacfab8679fa605d9fb8037e5fb2753adff553
https://github.com/nascheme
naschemehttps://github.com/nascheme
Jun 22, 2026https://github.com/python/cpython/pull/146482#issuecomment-4772535551
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/nascheme
naschemehttps://github.com/nascheme
Jun 22, 2026 https://github.com/python/cpython/pull/146482#ref-pullrequest-4721144419
GH-141148: Ensure decimal.getcontext() returns fresh copy. #151953 https://github.com/python/cpython/pull/151953
https://github.com/nascheme
naschemehttps://github.com/nascheme
Jun 23, 2026https://github.com/python/cpython/pull/146482#issuecomment-4775500113
GH-151953https://github.com/python/cpython/pull/151953
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/nascheme
naschemehttps://github.com/nascheme
June 23, 2026 04:07https://github.com/python/cpython/pull/146482#event-27074307191
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Jun 23, 2026https://github.com/python/cpython/pull/146482#event-27074308287
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
stale https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Astale
Jun 23, 2026https://github.com/python/cpython/pull/146482#event-27094044242
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F146482
https://github.com/kumaraditya303
kumaraditya303 https://github.com/kumaraditya303
https://github.com/python/cpython/pull/146482/files/74482e303587929b75143a6d4283a83073c88ff5
https://github.com/1st1
1st1 https://github.com/1st1
Please reload this pagehttps://github.com/python/cpython/pull/146482
https://github.com/nascheme
https://github.com/skirpichev
https://github.com/kumaraditya303
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.