René's URL Explorer Experiment


Title: bpo-32299: Return patched dict when using patch.dict as a context manager by mariocj89 · Pull Request #11062 · python/cpython · GitHub

Open Graph Title: bpo-32299: Return patched dict when using patch.dict as a context manager by mariocj89 · Pull Request #11062 · python/cpython

X Title: bpo-32299: Return patched dict when using patch.dict as a context manager by mariocj89 · Pull Request #11062 · python/cpython

Description: Return the patched version of the dict when unittest.mock.patch.dict is used as a context manager. This change mirrors the rest of the APIs that patch objects in unittest.mock Closes: #4834 This PR brings the commit from the abandoned PR #4834 with the comments addressed. See #4834 (comment) https://bugs.python.org/issue32299

Open Graph Description: Return the patched version of the dict when unittest.mock.patch.dict is used as a context manager. This change mirrors the rest of the APIs that patch objects in unittest.mock Closes: #4834 This PR...

X Description: Return the patched version of the dict when unittest.mock.patch.dict is used as a context manager. This change mirrors the rest of the APIs that patch objects in unittest.mock Closes: #4834 This PR...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a2e19f11-9e78-5b2e-dd16-3e268869ce82
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8356:29EB19:824AC5:B163B8:6A4D6C51
html-safe-nonceafcc17062fed62fa97f53a07d7d7c20874a6c9393219d57be670acf4dbc37b1a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzU2OjI5RUIxOTo4MjRBQzU6QjE2M0I4OjZBNEQ2QzUxIiwidmlzaXRvcl9pZCI6IjMzNTgzMTI5MDU2NTcxMTc3NzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2bda4937ab6517d64b447a6c513be8c5f33f56af5252c7101b590d5d24c80f1c
hovercard-subject-tagpull_request:237246942
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/11062/files
twitter:imagehttps://avatars.githubusercontent.com/u/3709683?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3709683?s=400&v=4
og:image:altReturn the patched version of the dict when unittest.mock.patch.dict is used as a context manager. This change mirrors the rest of the APIs that patch objects in unittest.mock Closes: #4834 This PR...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecd8f6a71db61d6012a0cbb134be844fdbe9b8a45
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/11062/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F11062%2Ffiles
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/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/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/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%2F11062%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/11062/files
Reloadhttps://github.com/python/cpython/pull/11062/files
Reloadhttps://github.com/python/cpython/pull/11062/files
Please reload this pagehttps://github.com/python/cpython/pull/11062/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/11062/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k 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
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
csabellahttps://github.com/csabella
python:masterhttps://github.com/python/cpython/tree/master
mariocj89:pu/patch-dict-returnshttps://github.com/mariocj89/cpython/tree/pu/patch-dict-returns
Conversation 27 https://github.com/python/cpython/pull/11062
Commits 2 https://github.com/python/cpython/pull/11062/commits
Checks 0 https://github.com/python/cpython/pull/11062/checks
Files changed https://github.com/python/cpython/pull/11062/files
Please reload this pagehttps://github.com/python/cpython/pull/11062/files
bpo-32299: Return patched dict when using patch.dict as a context manager https://github.com/python/cpython/pull/11062/files#top
Show all changes 2 commits https://github.com/python/cpython/pull/11062/files
9320c85 bpo-32299: Return patched dict when using patch.dict as a context man… mariocj89 Dec 13, 2017 https://github.com/python/cpython/pull/11062/commits/9320c851e50a9e844a86f89b2e5178237014c24c
511836f fixup! bpo-32299: Return patched dict when using patch.dict as a cont… mariocj89 May 7, 2019 https://github.com/python/cpython/pull/11062/commits/511836fe119438008da6697233d0b9628a0822d8
Clear filters https://github.com/python/cpython/pull/11062/files
Please reload this pagehttps://github.com/python/cpython/pull/11062/files
Please reload this pagehttps://github.com/python/cpython/pull/11062/files
unittest.mock.rst https://github.com/python/cpython/pull/11062/files#diff-e24490db2cf4ecf0da79ab5fe9aa0ab7de1b333424356e079a5d56a263d2082a
mock.py https://github.com/python/cpython/pull/11062/files#diff-347d0254250a1ab7ab8e31b405e2c35b74cd2838df4ee74f1b658a459eb91f1a
testpatch.py https://github.com/python/cpython/pull/11062/files#diff-dcd0b5de9d01782451a153daca6b4ac8da777f793eae0cd0a8ad7f7af56aaa80
2017-12-13-17-49-56.bpo-32299.eqAPWs.rst https://github.com/python/cpython/pull/11062/files#diff-320bd43adcdccbcec10fa250ade36a2e7d95176a86f8753f4fae8a6b2000b3fd
Doc/library/unittest.mock.rsthttps://github.com/python/cpython/pull/11062/files#diff-e24490db2cf4ecf0da79ab5fe9aa0ab7de1b333424356e079a5d56a263d2082a
View file https://github.com/mariocj89/cpython/blob/511836fe119438008da6697233d0b9628a0822d8/Doc/library/unittest.mock.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11062/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11062/files#diff-e24490db2cf4ecf0da79ab5fe9aa0ab7de1b333424356e079a5d56a263d2082a
Please reload this pagehttps://github.com/python/cpython/pull/11062/files
https://github.com/python/cpython/pull/11062/files#diff-e24490db2cf4ecf0da79ab5fe9aa0ab7de1b333424356e079a5d56a263d2082a
Lib/unittest/mock.pyhttps://github.com/python/cpython/pull/11062/files#diff-347d0254250a1ab7ab8e31b405e2c35b74cd2838df4ee74f1b658a459eb91f1a
View file https://github.com/mariocj89/cpython/blob/511836fe119438008da6697233d0b9628a0822d8/Lib/unittest/mock.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11062/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11062/files#diff-347d0254250a1ab7ab8e31b405e2c35b74cd2838df4ee74f1b658a459eb91f1a
https://github.com/python/cpython/pull/11062/files#diff-347d0254250a1ab7ab8e31b405e2c35b74cd2838df4ee74f1b658a459eb91f1a
Lib/unittest/test/testmock/testpatch.pyhttps://github.com/python/cpython/pull/11062/files#diff-dcd0b5de9d01782451a153daca6b4ac8da777f793eae0cd0a8ad7f7af56aaa80
View file https://github.com/mariocj89/cpython/blob/511836fe119438008da6697233d0b9628a0822d8/Lib/unittest/test/testmock/testpatch.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11062/{{ revealButtonHref }}
https://github.com/python/cpython/pull/11062/files#diff-dcd0b5de9d01782451a153daca6b4ac8da777f793eae0cd0a8ad7f7af56aaa80
https://github.com/python/cpython/pull/11062/files#diff-dcd0b5de9d01782451a153daca6b4ac8da777f793eae0cd0a8ad7f7af56aaa80
Misc/NEWS.d/next/Library/2017-12-13-17-49-56.bpo-32299.eqAPWs.rsthttps://github.com/python/cpython/pull/11062/files#diff-320bd43adcdccbcec10fa250ade36a2e7d95176a86f8753f4fae8a6b2000b3fd
View file https://github.com/mariocj89/cpython/blob/511836fe119438008da6697233d0b9628a0822d8/Misc/NEWS.d/next/Library/2017-12-13-17-49-56.bpo-32299.eqAPWs.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/11062/{{ revealButtonHref }}
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.