René's URL Explorer Experiment


Title: gh-142651: use `NonCallableMock._lock` for thread safety of call_count by kumaraditya303 · Pull Request #142922 · python/cpython · GitHub

Open Graph Title: gh-142651: use `NonCallableMock._lock` for thread safety of call_count by kumaraditya303 · Pull Request #142922 · python/cpython

X Title: gh-142651: use `NonCallableMock._lock` for thread safety of call_count by kumaraditya303 · Pull Request #142922 · python/cpython

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

Open Graph Description: Issue: ThreadingMock.call_count is not thread safe #142651 Skipping news as the there is already a news entry in the original PR.

X Description: Issue: ThreadingMock.call_count is not thread safe #142651 Skipping news as the there is already a news entry in the original PR.

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

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:80596a30-1745-fc76-21df-7904ab9822bb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA532:281FF8:9FF5BF:D75B9A:6A52946D
html-safe-noncecb190315c59d3c4ca69eee2d32627f6df518a711baf35682dec665da8b39b2a9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTMyOjI4MUZGODo5RkY1QkY6RDc1QjlBOjZBNTI5NDZEIiwidmlzaXRvcl9pZCI6IjgxMjIzMzczMjk1NjAwNjUxMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb24a1639612f88ded081a8e5db2a6a4c11d71a03bb6e70d5b1b34a6115b096b4
hovercard-subject-tagpull_request:3112479997
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/142922/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/bab9f0e7ddb43b2772b81d5d27bdb1aecf07871ca496fba7b8c0dee7b3e96a96/python/cpython/pull/142922
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bab9f0e7ddb43b2772b81d5d27bdb1aecf07871ca496fba7b8c0dee7b3e96a96/python/cpython/pull/142922
og:image:altIssue: ThreadingMock.call_count is not thread safe #142651 Skipping news as the there is already a news entry in the original PR.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekumaraditya303
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/142922#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F142922
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%2F142922
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/142922
Reloadhttps://github.com/python/cpython/pull/142922
Reloadhttps://github.com/python/cpython/pull/142922
Please reload this pagehttps://github.com/python/cpython/pull/142922
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/142922
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
kumaraditya303https://github.com/kumaraditya303
python:mainhttps://github.com/python/cpython/tree/main
kumaraditya303:mockhttps://github.com/kumaraditya303/cpython/tree/mock
Conversationhttps://github.com/python/cpython/pull/142922
Commits2 (2)https://github.com/python/cpython/pull/142922/commits
Checkshttps://github.com/python/cpython/pull/142922/checks
Files changedhttps://github.com/python/cpython/pull/142922/files
gh-142651: use NonCallableMock._lock for thread safety of call_counthttps://github.com/python/cpython/pull/142922#top
kumaraditya303https://github.com/kumaraditya303
python:mainhttps://github.com/python/cpython/tree/main
kumaraditya303:mockhttps://github.com/kumaraditya303/cpython/tree/mock
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
Dec 18, 2025https://github.com/python/cpython/pull/142922#issue-3741716154
Please reload this pagehttps://github.com/python/cpython/pull/142922
ThreadingMock.call_count is not thread safe #142651https://github.com/python/cpython/issues/142651
Please reload this pagehttps://github.com/python/cpython/pull/142922
https://github.com/kumaraditya303
use NonCallableMock._lock for thread safety of call_counthttps://github.com/python/cpython/pull/142922/commits/819dc5793c2d603692bffa5a9a3011916f46463f
819dc57https://github.com/python/cpython/pull/142922/commits/819dc5793c2d603692bffa5a9a3011916f46463f
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
cjw296https://github.com/cjw296
code ownerhttps://github.com/python/cpython/blob/8b64dd853ded593e1f0c5df786f1f1cc74dc7239/.github/CODEOWNERS#L607
December 18, 2025 06:46https://github.com/python/cpython/pull/142922#event-21634812930
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Dec 18, 2025 https://github.com/python/cpython/pull/142922#ref-issue-3724925789
ThreadingMock.call_count is not thread safe #142651 https://github.com/python/cpython/issues/142651
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
Dec 18, 2025https://github.com/python/cpython/pull/142922#event-21634815582
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
needs backport to 3.14 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.14%22
Dec 18, 2025https://github.com/python/cpython/pull/142922#event-21635021646
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
Dec 18, 2025https://github.com/python/cpython/pull/142922#issuecomment-3668809979
Please reload this pagehttps://github.com/python/cpython/pull/142922
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
colesburyhttps://github.com/colesbury
December 18, 2025 17:27https://github.com/python/cpython/pull/142922#event-21649326706
https://github.com/chaope
chaopehttps://github.com/chaope
Dec 19, 2025https://github.com/python/cpython/pull/142922#issuecomment-3674776232
Please reload this pagehttps://github.com/python/cpython/pull/142922
@kumaraditya303https://github.com/kumaraditya303
Please reload this pagehttps://github.com/python/cpython/pull/142922
https://github.com/colesbury
colesburyhttps://github.com/colesbury
Mar 9, 2026 https://github.com/python/cpython/pull/142922#pullrequestreview-3917326826
View reviewed changes https://github.com/python/cpython/pull/142922/files/7a142686caa292d322aec9cda7bf2ae0fcf13e4d
colesburyhttps://github.com/colesbury
https://github.com/python/cpython/pull/142922#pullrequestreview-3917326826
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@chaopehttps://github.com/chaope
Please reload this pagehttps://github.com/python/cpython/pull/142922
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 core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Mar 9, 2026https://github.com/python/cpython/pull/142922#event-23405412925
https://github.com/kumaraditya303
Merge branch 'main' into mockhttps://github.com/python/cpython/pull/142922/commits/7a142686caa292d322aec9cda7bf2ae0fcf13e4d
7a14268https://github.com/python/cpython/pull/142922/commits/7a142686caa292d322aec9cda7bf2ae0fcf13e4d
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
March 10, 2026 11:43https://github.com/python/cpython/pull/142922#event-23429144432
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
728e4a0https://github.com/python/cpython/commit/728e4a075e3dae7e04edf90ad137a35073deb141
Mar 10, 2026https://github.com/python/cpython/pull/142922#event-23429935857
Please reload this pagehttps://github.com/python/cpython/pull/142922
https://github.com/apps/miss-islington-app
miss-islington-apphttps://github.com/apps/miss-islington-app
Mar 10, 2026https://github.com/python/cpython/pull/142922#issuecomment-4030934857
@kumaraditya303https://github.com/kumaraditya303
Please reload this pagehttps://github.com/python/cpython/pull/142922
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
Mar 10, 2026https://github.com/python/cpython/pull/142922#event-23429938616
miss-islingtonhttps://github.com/miss-islington
Mar 10, 2026 https://github.com/python/cpython/pull/142922#ref-commit-33a46f6
https://github.com/kumaraditya303
https://github.com/miss-islington
pythongh-142651https://github.com/python/cpython/issues/142651
: usehttps://github.com/miss-islington/cpython/commit/33a46f65ca8ca8e628ee3fbdc41304408a6b5f02
NonCallableMock._lockhttps://github.com/miss-islington/cpython/commit/33a46f65ca8ca8e628ee3fbdc41304408a6b5f02
for thread safety of `ca…https://github.com/miss-islington/cpython/commit/33a46f65ca8ca8e628ee3fbdc41304408a6b5f02
33a46f6https://github.com/miss-islington/cpython/commit/33a46f65ca8ca8e628ee3fbdc41304408a6b5f02
pythonGH-142922https://github.com/python/cpython/pull/142922
728e4a0https://github.com/miss-islington/cpython/commit/728e4a075e3dae7e04edf90ad137a35073deb141
miss-islingtonhttps://github.com/miss-islington
Mar 10, 2026 https://github.com/python/cpython/pull/142922#ref-commit-3336a28
https://github.com/kumaraditya303
https://github.com/miss-islington
pythongh-142651https://github.com/python/cpython/issues/142651
: usehttps://github.com/miss-islington/cpython/commit/3336a28adc269cfec6ae2fa0b9fe261747c97dc4
NonCallableMock._lockhttps://github.com/miss-islington/cpython/commit/3336a28adc269cfec6ae2fa0b9fe261747c97dc4
for thread safety of `ca…https://github.com/miss-islington/cpython/commit/3336a28adc269cfec6ae2fa0b9fe261747c97dc4
3336a28https://github.com/miss-islington/cpython/commit/3336a28adc269cfec6ae2fa0b9fe261747c97dc4
pythonGH-142922https://github.com/python/cpython/pull/142922
728e4a0https://github.com/miss-islington/cpython/commit/728e4a075e3dae7e04edf90ad137a35073deb141
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Mar 10, 2026https://github.com/python/cpython/pull/142922#issuecomment-4030936007
GH-145739https://github.com/python/cpython/pull/145739
3.14 branchhttps://github.com/python/cpython/tree/3.14
Please reload this pagehttps://github.com/python/cpython/pull/142922
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
needs backport to 3.14 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.14%22
Mar 10, 2026https://github.com/python/cpython/pull/142922#event-23429944406
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Mar 10, 2026https://github.com/python/cpython/pull/142922#issuecomment-4030936507
GH-145740https://github.com/python/cpython/pull/145740
3.13 branchhttps://github.com/python/cpython/tree/3.13
Please reload this pagehttps://github.com/python/cpython/pull/142922
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
Mar 10, 2026https://github.com/python/cpython/pull/142922#event-23429946937
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
March 10, 2026 12:13https://github.com/python/cpython/pull/142922#event-23430004383
kumaraditya303https://github.com/kumaraditya303
Mar 10, 2026 https://github.com/python/cpython/pull/142922#ref-commit-4e33246
https://github.com/miss-islington
https://github.com/kumaraditya303
[3.13]https://github.com/python/cpython/commit/4e332464b4f4e0f877bf91aca19d11b9ebe80c86
gh-142651https://github.com/python/cpython/issues/142651
: usehttps://github.com/python/cpython/commit/4e332464b4f4e0f877bf91aca19d11b9ebe80c86
NonCallableMock._lockhttps://github.com/python/cpython/commit/4e332464b4f4e0f877bf91aca19d11b9ebe80c86
for thread safety of `c…https://github.com/python/cpython/commit/4e332464b4f4e0f877bf91aca19d11b9ebe80c86
4e33246https://github.com/python/cpython/commit/4e332464b4f4e0f877bf91aca19d11b9ebe80c86
GH-142922https://github.com/python/cpython/pull/142922
#145740https://github.com/python/cpython/pull/145740
gh-142651https://github.com/python/cpython/issues/142651
GH-142922https://github.com/python/cpython/pull/142922
728e4a0https://github.com/python/cpython/commit/728e4a075e3dae7e04edf90ad137a35073deb141
kumaraditya303https://github.com/kumaraditya303
Mar 10, 2026 https://github.com/python/cpython/pull/142922#ref-commit-a5ed66d
https://github.com/miss-islington
https://github.com/kumaraditya303
[3.14]https://github.com/python/cpython/commit/a5ed66df8ac5ef951f39a4e5591ac3895db4d140
gh-142651https://github.com/python/cpython/issues/142651
: usehttps://github.com/python/cpython/commit/a5ed66df8ac5ef951f39a4e5591ac3895db4d140
NonCallableMock._lockhttps://github.com/python/cpython/commit/a5ed66df8ac5ef951f39a4e5591ac3895db4d140
for thread safety of `c…https://github.com/python/cpython/commit/a5ed66df8ac5ef951f39a4e5591ac3895db4d140
a5ed66dhttps://github.com/python/cpython/commit/a5ed66df8ac5ef951f39a4e5591ac3895db4d140
GH-142922https://github.com/python/cpython/pull/142922
#145739https://github.com/python/cpython/pull/145739
gh-142651https://github.com/python/cpython/issues/142651
GH-142922https://github.com/python/cpython/pull/142922
728e4a0https://github.com/python/cpython/commit/728e4a075e3dae7e04edf90ad137a35073deb141
ljfphttps://github.com/ljfp
Apr 25, 2026 https://github.com/python/cpython/pull/142922#ref-commit-49211a9
https://github.com/kumaraditya303
https://github.com/ljfp
pythongh-142651https://github.com/python/cpython/issues/142651
: usehttps://github.com/ljfp/cpython/commit/49211a9f1482f2f3d3a439db989cc63725924421
NonCallableMock._lockhttps://github.com/ljfp/cpython/commit/49211a9f1482f2f3d3a439db989cc63725924421
for thread safety of `ca…https://github.com/ljfp/cpython/commit/49211a9f1482f2f3d3a439db989cc63725924421
49211a9https://github.com/ljfp/cpython/commit/49211a9f1482f2f3d3a439db989cc63725924421
python#142922https://github.com/python/cpython/pull/142922
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%2F142922
https://github.com/colesbury
colesbury https://github.com/colesbury
https://github.com/python/cpython/pull/142922/files/7a142686caa292d322aec9cda7bf2ae0fcf13e4d
https://github.com/cjw296
cjw296 https://github.com/cjw296
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Please reload this pagehttps://github.com/python/cpython/pull/142922
https://github.com/kumaraditya303
https://github.com/chaope
https://github.com/colesbury
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.