René's URL Explorer Experiment


Title: bpo-12022: Change error type for bad objects in "with" and "async with" by serhiy-storchaka · Pull Request #26809 · python/cpython · GitHub

Open Graph Title: bpo-12022: Change error type for bad objects in "with" and "async with" by serhiy-storchaka · Pull Request #26809 · python/cpython

X Title: bpo-12022: Change error type for bad objects in "with" and "async with" by serhiy-storchaka · Pull Request #26809 · python/cpython

Description: A TypeError is now raised instead of an AttributeError in "with" and "async with" statements for objects which do not support the context manager or asynchronous context manager protocols correspondingly. https://bugs.python.org/issue12022

Open Graph Description: A TypeError is now raised instead of an AttributeError in "with" and "async with" statements for objects which do not support the context manager or asynchronous context manager...

X Description: A TypeError is now raised instead of an AttributeError in "with" and "async with" statements for objects which do not support the context manager or asynchronous...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0b0a230d-45ad-9ae9-1a21-09e2f4c6d5c9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA396:28B0D7:F8BD9D:15D911D:696A29B2
html-safe-nonce4cb79a7f66a746b1ca2d88148158ff97decf6e57973f39ca72be932aabfe3e48
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzk2OjI4QjBENzpGOEJEOUQ6MTVEOTExRDo2OTZBMjlCMiIsInZpc2l0b3JfaWQiOiI2MTYwNzA1NTkyMjc2NjkxMzc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac459cc6a9c31f1ef6df9b9eba9e9b4739a4fb1590409a21d2e114c7b3fcdc1509
hovercard-subject-tagpull_request:673994895
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/26809/files
twitter:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
og:image:altA TypeError is now raised instead of an AttributeError in "with" and "async with" statements for objects which do not support the context manager or asynchronous context manager...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonea1022f03e4f0d91ea173e4e5dac892c982e0588c62f1ce56121d755a320a3569
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
releasef472b8e6c7b3fdd5d0354972a3f4c516289bf0be
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/26809/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F26809%2Ffiles
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%2F26809%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/26809/files
Reloadhttps://github.com/python/cpython/pull/26809/files
Reloadhttps://github.com/python/cpython/pull/26809/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/26809/files
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/26809/files
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
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
serhiy-storchaka:context-manager-type-errorhttps://github.com/serhiy-storchaka/cpython/tree/context-manager-type-error
Conversation 3 https://github.com/python/cpython/pull/26809
Commits 3 https://github.com/python/cpython/pull/26809/commits
Checks 0 https://github.com/python/cpython/pull/26809/checks
Files changed https://github.com/python/cpython/pull/26809/files
Please reload this pagehttps://github.com/python/cpython/pull/26809/files
bpo-12022: Change error type for bad objects in "with" and "async with" https://github.com/python/cpython/pull/26809/files#top
Show all changes 3 commits https://github.com/python/cpython/pull/26809/files
7cbf215 bpo-12022: Change error type for bad objects in "with" and "async with" serhiy-storchaka Jun 20, 2021 https://github.com/python/cpython/pull/26809/commits/7cbf2152e963fff9c682e122d013992a57c0d42f
4b994fc Ad hint about missed __exit__ method. serhiy-storchaka Jun 21, 2021 https://github.com/python/cpython/pull/26809/commits/4b994fc7a088c1fd17ddfbb352aeed9b132f3fa7
e3d5920 More specific tests. serhiy-storchaka Jun 21, 2021 https://github.com/python/cpython/pull/26809/commits/e3d59207f508e87d54eae606705f5d0413374c99
Clear filters https://github.com/python/cpython/pull/26809/files
Please reload this pagehttps://github.com/python/cpython/pull/26809/files
Please reload this pagehttps://github.com/python/cpython/pull/26809/files
3.11.rst https://github.com/python/cpython/pull/26809/files#diff-78f24041d66ab8ed2ae1aee94bcd42396d27af833cb96a3c506294c6d6dce82d
test_contextlib.py https://github.com/python/cpython/pull/26809/files#diff-36de20f5f33e93654722aa17ba15b51aa3f58c573c477d69856069944db7994f
test_coroutines.py https://github.com/python/cpython/pull/26809/files#diff-21593892ff47aa3c49795981144232d5d559af3da62e7fa1447caaa1fb0502da
test_with.py https://github.com/python/cpython/pull/26809/files#diff-b0199ef6a10ca56f0b6555ab6cf535706708cde2b46cdb10b77e9969ca254211
2021-06-20-10-53-21.bpo-12022.SW240M.rst https://github.com/python/cpython/pull/26809/files#diff-a86eeffb86c66ee485fa2ad0d84c9a75844222de612dfd90d4cfac10e9de458a
ceval.c https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/whatsnew/3.11.rsthttps://github.com/python/cpython/pull/26809/files#diff-78f24041d66ab8ed2ae1aee94bcd42396d27af833cb96a3c506294c6d6dce82d
View file https://github.com/serhiy-storchaka/cpython/blob/e3d59207f508e87d54eae606705f5d0413374c99/Doc/whatsnew/3.11.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26809/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26809/files#diff-78f24041d66ab8ed2ae1aee94bcd42396d27af833cb96a3c506294c6d6dce82d
https://github.com/python/cpython/pull/26809/files#diff-78f24041d66ab8ed2ae1aee94bcd42396d27af833cb96a3c506294c6d6dce82d
Lib/test/test_contextlib.pyhttps://github.com/python/cpython/pull/26809/files#diff-36de20f5f33e93654722aa17ba15b51aa3f58c573c477d69856069944db7994f
View file https://github.com/serhiy-storchaka/cpython/blob/e3d59207f508e87d54eae606705f5d0413374c99/Lib/test/test_contextlib.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26809/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26809/files#diff-36de20f5f33e93654722aa17ba15b51aa3f58c573c477d69856069944db7994f
https://github.com/python/cpython/pull/26809/files#diff-36de20f5f33e93654722aa17ba15b51aa3f58c573c477d69856069944db7994f
https://github.com/python/cpython/pull/26809/files#diff-36de20f5f33e93654722aa17ba15b51aa3f58c573c477d69856069944db7994f
Lib/test/test_coroutines.pyhttps://github.com/python/cpython/pull/26809/files#diff-21593892ff47aa3c49795981144232d5d559af3da62e7fa1447caaa1fb0502da
View file https://github.com/serhiy-storchaka/cpython/blob/e3d59207f508e87d54eae606705f5d0413374c99/Lib/test/test_coroutines.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26809/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26809/files#diff-21593892ff47aa3c49795981144232d5d559af3da62e7fa1447caaa1fb0502da
https://github.com/python/cpython/pull/26809/files#diff-21593892ff47aa3c49795981144232d5d559af3da62e7fa1447caaa1fb0502da
https://github.com/python/cpython/pull/26809/files#diff-21593892ff47aa3c49795981144232d5d559af3da62e7fa1447caaa1fb0502da
https://github.com/python/cpython/pull/26809/files#diff-21593892ff47aa3c49795981144232d5d559af3da62e7fa1447caaa1fb0502da
Lib/test/test_with.pyhttps://github.com/python/cpython/pull/26809/files#diff-b0199ef6a10ca56f0b6555ab6cf535706708cde2b46cdb10b77e9969ca254211
View file https://github.com/serhiy-storchaka/cpython/blob/e3d59207f508e87d54eae606705f5d0413374c99/Lib/test/test_with.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26809/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26809/files#diff-b0199ef6a10ca56f0b6555ab6cf535706708cde2b46cdb10b77e9969ca254211
https://github.com/python/cpython/pull/26809/files#diff-b0199ef6a10ca56f0b6555ab6cf535706708cde2b46cdb10b77e9969ca254211
https://github.com/python/cpython/pull/26809/files#diff-b0199ef6a10ca56f0b6555ab6cf535706708cde2b46cdb10b77e9969ca254211
https://github.com/python/cpython/pull/26809/files#diff-b0199ef6a10ca56f0b6555ab6cf535706708cde2b46cdb10b77e9969ca254211
Misc/NEWS.d/next/Core and Builtins/2021-06-20-10-53-21.bpo-12022.SW240M.rsthttps://github.com/python/cpython/pull/26809/files#diff-a86eeffb86c66ee485fa2ad0d84c9a75844222de612dfd90d4cfac10e9de458a
View file https://github.com/serhiy-storchaka/cpython/blob/e3d59207f508e87d54eae606705f5d0413374c99/Misc/NEWS.d/next/Core%20and%20Builtins/2021-06-20-10-53-21.bpo-12022.SW240M.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26809/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L222
Python/ceval.chttps://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
View file https://github.com/serhiy-storchaka/cpython/blob/e3d59207f508e87d54eae606705f5d0413374c99/Python/ceval.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26809/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26809/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
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.