René's URL Explorer Experiment


Title: gh-116738: Use PyMutex for bz2 module by yoney · Pull Request #140555 · python/cpython · GitHub

Open Graph Title: gh-116738: Use PyMutex for bz2 module by yoney · Pull Request #140555 · python/cpython

X Title: gh-116738: Use PyMutex for bz2 module by yoney · Pull Request #140555 · python/cpython

Description: I was initially looking into the bz2 module for free-threading. The methods are already wrapped with a lock, which I believe is primarily used to release the GIL. This locking makes the methods thr...

Open Graph Description: I was initially looking into the bz2 module for free-threading. The methods are already wrapped with a lock, which I believe is primarily used to release the GIL. This locking makes the methods thr...

X Description: I was initially looking into the bz2 module for free-threading. The methods are already wrapped with a lock, which I believe is primarily used to release the GIL. This locking makes the methods thr...

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

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:03a34fb5-48c5-2970-8ccb-0f9590b9e156
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9DAE:275F42:1347618:1A87DED:696A9F2C
html-safe-nonce7131e7b6c15ba015ace73dd05520c901ad6cb05675e8b3fe710446092b59471a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REFFOjI3NUY0MjoxMzQ3NjE4OjFBODdERUQ6Njk2QTlGMkMiLCJ2aXNpdG9yX2lkIjoiODYxNjcxMjE2ODY3MDkyODY4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca2fed8fe01ed0bf8fb1b9255a6dd762928edaffabae8dcf6ff0fa6a55d04e347
hovercard-subject-tagpull_request:2945275591
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/140555/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/3f7b888a3ab043e2447b669b16aaae7dbbfeb666575037d09481f26cba5be2ea/python/cpython/pull/140555
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3f7b888a3ab043e2447b669b16aaae7dbbfeb666575037d09481f26cba5be2ea/python/cpython/pull/140555
og:image:altI was initially looking into the bz2 module for free-threading. The methods are already wrapped with a lock, which I believe is primarily used to release the GIL. This locking makes the methods thr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameyoney
hostnamegithub.com
expected-hostnamegithub.com
Nonea51f97dbb9326f71c08ecb61577457d543c602124d1a2672871258ef37ac5261
turbo-cache-controlno-preview
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
release4bd0eac606c70914085176ef312ebdcd97a8cdf1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/140555#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F140555
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2F140555
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/140555
Reloadhttps://github.com/python/cpython/pull/140555
Reloadhttps://github.com/python/cpython/pull/140555
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/140555
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/140555
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 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
Jump to bottomhttps://github.com/python/cpython/pull/140555#issue-comment-box
colesburyhttps://github.com/colesbury
python:mainhttps://github.com/python/cpython/tree/main
yoney:ft_bz2https://github.com/yoney/cpython/tree/ft_bz2
gh-116738: Use PyMutex for bz2 module https://github.com/python/cpython/pull/140555#top
colesburyhttps://github.com/colesbury
python:mainhttps://github.com/python/cpython/tree/main
yoney:ft_bz2https://github.com/yoney/cpython/tree/ft_bz2
Conversation 14 https://github.com/python/cpython/pull/140555
Commits 5 https://github.com/python/cpython/pull/140555/commits
Checks 41 https://github.com/python/cpython/pull/140555/checks
Files changed https://github.com/python/cpython/pull/140555/files
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/yoney
yoneyhttps://github.com/yoney
Oct 24, 2025https://github.com/python/cpython/pull/140555#issue-3550125271
Please reload this pagehttps://github.com/python/cpython/pull/140555
@mpagehttps://github.com/mpage
@colesburyhttps://github.com/colesbury
Audit all built-in modules for thread safety #116738https://github.com/python/cpython/issues/116738
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/yoney
pythongh-116738https://github.com/python/cpython/issues/116738
: Use PyMutex for bz2 modulehttps://github.com/python/cpython/pull/140555/commits/c46e9758017c387d07daceec74b7c2d6bf7960e4
c46e975https://github.com/python/cpython/pull/140555/commits/c46e9758017c387d07daceec74b7c2d6bf7960e4
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Oct 24, 2025 https://github.com/python/cpython/pull/140555#ref-issue-2184479275
Audit all built-in modules for thread safety #116738 https://github.com/python/cpython/issues/116738
https://github.com/yoney
yoneyhttps://github.com/yoney
October 24, 2025 16:35https://github.com/python/cpython/pull/140555#event-20488633364
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Oct 24, 2025https://github.com/python/cpython/pull/140555#event-20488634133
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
topic-free-threading https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atopic-free-threading
Oct 24, 2025https://github.com/python/cpython/pull/140555#event-20488637968
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
Oct 24, 2025 https://github.com/python/cpython/pull/140555#pullrequestreview-3377839378
View reviewed changes https://github.com/python/cpython/pull/140555/files/26760f1f8da2642b9c968cd95d7dad6392a910fb
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Oct 24, 2025https://github.com/python/cpython/pull/140555#event-20488783151
https://github.com/picnixz
picnixzhttps://github.com/picnixz
Oct 24, 2025 https://github.com/python/cpython/pull/140555#pullrequestreview-3377850082
View reviewed changes https://github.com/python/cpython/pull/140555/files/c46e9758017c387d07daceec74b7c2d6bf7960e4
Modules/_bz2module.chttps://github.com/python/cpython/pull/140555/files/c46e9758017c387d07daceec74b7c2d6bf7960e4#diff-6b7a70749b23278bf36e74a08f378b3645598912d7fa8c33f45d34dc95b7a6b7
Please reload this pagehttps://github.com/python/cpython/pull/140555
yoneyhttps://github.com/yoney
October 24, 2025 11:39https://github.com/python/cpython/pull/140555#commits-pushed-5362112
https://github.com/yoney
pythongh-116738https://github.com/python/cpython/issues/116738
: Keep the macroshttps://github.com/python/cpython/pull/140555/commits/53621127768627a5024328f58b766b1cdf1d21ed
5362112https://github.com/python/cpython/pull/140555/commits/53621127768627a5024328f58b766b1cdf1d21ed
https://github.com/yoney
Revert "https://github.com/python/cpython/pull/140555/commits/26760f1f8da2642b9c968cd95d7dad6392a910fb
pythongh-116738https://github.com/python/cpython/issues/116738
: Keep the macros"https://github.com/python/cpython/pull/140555/commits/26760f1f8da2642b9c968cd95d7dad6392a910fb
26760f1https://github.com/python/cpython/pull/140555/commits/26760f1f8da2642b9c968cd95d7dad6392a910fb
5362112https://github.com/yoney/cpython/commit/53621127768627a5024328f58b766b1cdf1d21ed
https://github.com/picnixz
picnixzhttps://github.com/picnixz
Oct 25, 2025 https://github.com/python/cpython/pull/140555#pullrequestreview-3379840661
View reviewed changes https://github.com/python/cpython/pull/140555/files/26760f1f8da2642b9c968cd95d7dad6392a910fb
picnixzhttps://github.com/picnixz
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/python/cpython/pull/140555#pullrequestreview-3379840661
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/yoney
yoneyhttps://github.com/yoney
Oct 25, 2025https://github.com/python/cpython/pull/140555#issuecomment-3446312906
@picnixzhttps://github.com/picnixz
@emmatypinghttps://github.com/emmatyping
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/emmatyping
emmatypinghttps://github.com/emmatyping
Oct 25, 2025 https://github.com/python/cpython/pull/140555#pullrequestreview-3380199759
View reviewed changes https://github.com/python/cpython/pull/140555/files/26760f1f8da2642b9c968cd95d7dad6392a910fb
Modules/_bz2module.chttps://github.com/python/cpython/pull/140555/files/26760f1f8da2642b9c968cd95d7dad6392a910fb#diff-6b7a70749b23278bf36e74a08f378b3645598912d7fa8c33f45d34dc95b7a6b7
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/yoney
Assert that mutex is not locked during deallocationhttps://github.com/python/cpython/pull/140555/commits/43617f8c591523e329fb84c52cf63cc36507255f
43617f8https://github.com/python/cpython/pull/140555/commits/43617f8c591523e329fb84c52cf63cc36507255f
https://github.com/emmatyping
emmatypinghttps://github.com/emmatyping
Oct 26, 2025 https://github.com/python/cpython/pull/140555#pullrequestreview-3380710095
View reviewed changes https://github.com/python/cpython/pull/140555/files/43617f8c591523e329fb84c52cf63cc36507255f
emmatypinghttps://github.com/emmatyping
https://github.com/python/cpython/pull/140555#pullrequestreview-3380710095
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/emmatyping
emmatypinghttps://github.com/emmatyping
Oct 26, 2025https://github.com/python/cpython/pull/140555#issuecomment-3448260085
https://github.com/python/cpython/blob/main/Lib/test/test_zstd.py#L2668https://github.com/python/cpython/blob/main/Lib/test/test_zstd.py#L2668
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Oct 26, 2025 https://github.com/python/cpython/pull/140555#pullrequestreview-3381230924
View reviewed changes https://github.com/python/cpython/pull/140555/files/43617f8c591523e329fb84c52cf63cc36507255f
vstinnerhttps://github.com/vstinner
https://github.com/python/cpython/pull/140555#pullrequestreview-3381230924
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/yoney
Add bz2 free threading testhttps://github.com/python/cpython/pull/140555/commits/45f313fee7b90ae9f3ea20937a49fd63be1e0769
45f313fhttps://github.com/python/cpython/pull/140555/commits/45f313fee7b90ae9f3ea20937a49fd63be1e0769
https://github.com/yoney
yoneyhttps://github.com/yoney
Oct 27, 2025https://github.com/python/cpython/pull/140555#issuecomment-3449036594
https://github.com/python/cpython/blob/main/Lib/test/test_zstd.py#L2668https://github.com/python/cpython/blob/main/Lib/test/test_zstd.py#L2668
@emmatypinghttps://github.com/emmatyping
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/colesbury
colesburyhttps://github.com/colesbury
Oct 27, 2025 https://github.com/python/cpython/pull/140555#pullrequestreview-3383612894
View reviewed changes https://github.com/python/cpython/pull/140555/files/45f313fee7b90ae9f3ea20937a49fd63be1e0769
https://github.com/colesbury
colesburyhttps://github.com/colesbury
9479a62https://github.com/python/cpython/commit/9479a62a51e6fbcb3372f5ac07b3ab861e7d17e3
Oct 27, 2025https://github.com/python/cpython/pull/140555#event-20526173389
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Oct 27, 2025https://github.com/python/cpython/pull/140555#event-20526174695
https://github.com/yoney
yoneyhttps://github.com/yoney
October 28, 2025 15:51https://github.com/python/cpython/pull/140555#event-20557784811
https://github.com/yoney
yoneyhttps://github.com/yoney
Oct 28, 2025 https://github.com/python/cpython/pull/140555#ref-pullrequest-3562306688
gh-116738: Use PyMutex for lzma module #140711 https://github.com/python/cpython/pull/140711
StanFromIrelandhttps://github.com/StanFromIreland
Dec 6, 2025 https://github.com/python/cpython/pull/140555#ref-commit-1a3563f
https://github.com/yoney
https://github.com/StanFromIreland
pythongh-116738https://github.com/python/cpython/issues/116738
: Use PyMutex for bz2 module (https://github.com/StanFromIreland/cpython/commit/1a3563fd2cea7618f294f2f5e7c95bba6f0bb164
pythongh-140555https://github.com/python/cpython/pull/140555
)https://github.com/StanFromIreland/cpython/commit/1a3563fd2cea7618f294f2f5e7c95bba6f0bb164
1a3563fhttps://github.com/StanFromIreland/cpython/commit/1a3563fd2cea7618f294f2f5e7c95bba6f0bb164
gh-116738: Make zlib module thread-safe #142432 https://github.com/python/cpython/pull/142432
gh-116738: Make _bz2 module thread-safe #142756 https://github.com/python/cpython/pull/142756
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%2F140555
https://github.com/vstinner
vstinner https://github.com/vstinner
https://github.com/python/cpython/pull/140555/files/43617f8c591523e329fb84c52cf63cc36507255f
https://github.com/colesbury
colesbury https://github.com/colesbury
https://github.com/python/cpython/pull/140555/files/45f313fee7b90ae9f3ea20937a49fd63be1e0769
https://github.com/emmatyping
emmatyping https://github.com/emmatyping
https://github.com/python/cpython/pull/140555/files/43617f8c591523e329fb84c52cf63cc36507255f
https://github.com/picnixz
picnixz https://github.com/picnixz
https://github.com/python/cpython/pull/140555/files/26760f1f8da2642b9c968cd95d7dad6392a910fb
https://github.com/kumaraditya303
kumaraditya303 https://github.com/kumaraditya303
https://github.com/python/cpython/pull/140555/files/26760f1f8da2642b9c968cd95d7dad6392a910fb
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
topic-free-threading https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atopic-free-threading
Please reload this pagehttps://github.com/python/cpython/pull/140555
https://github.com/yoney
https://github.com/emmatyping
https://github.com/vstinner
https://github.com/colesbury
https://github.com/picnixz
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.