René's URL Explorer Experiment


Title: bpo-37444: Update differing exception between builtins and importlib by nsiregar · Pull Request #14869 · python/cpython · GitHub

Open Graph Title: bpo-37444: Update differing exception between builtins and importlib by nsiregar · Pull Request #14869 · python/cpython

X Title: bpo-37444: Update differing exception between builtins and importlib by nsiregar · Pull Request #14869 · python/cpython

Description: Imports now raise TypeError instead of ValueError for relative import failures. This makes things consistent between builtins.__import__ and importlib.__import__ as well as using a more natural import for the failure. https://bugs.python.org/issue37444 Automerge-Triggered-By: @brettcannon

Open Graph Description: Imports now raise TypeError instead of ValueError for relative import failures. This makes things consistent between builtins.__import__ and importlib.__import__ as well as using a more natural imp...

X Description: Imports now raise TypeError instead of ValueError for relative import failures. This makes things consistent between builtins.__import__ and importlib.__import__ as well as using a more natural imp...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:af0224fc-22f2-1582-d58d-5ec8ff6e2b43
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC6A0:8F893:1227137:1A58888:6A5775AF
html-safe-nonced9c5546acb4629eaebb95de5070b3cee52f7557ba0cdb167c83eaef7dc74f6a6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkEwOjhGODkzOjEyMjcxMzc6MUE1ODg4ODo2QTU3NzVBRiIsInZpc2l0b3JfaWQiOiIyMTgyMjE3ODEwNTE2MDgwMDQ3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac623c356a0d3e4435dff9156970aec2d5cbd21bfa43704d63c7c60d6ee854b5dd
hovercard-subject-tagpull_request:299572198
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/14869/files
twitter:imagehttps://avatars.githubusercontent.com/u/18432852?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/18432852?s=400&v=4
og:image:altImports now raise TypeError instead of ValueError for relative import failures. This makes things consistent between builtins.__import__ and importlib.__import__ as well as using a more natural imp...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
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
releasec0ca805e53f128ba1f966be1d3ccd81d0d1959c7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/14869/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F14869%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/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%2F14869%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/14869/files
Reloadhttps://github.com/python/cpython/pull/14869/files
Reloadhttps://github.com/python/cpython/pull/14869/files
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
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
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
miss-islingtonhttps://github.com/miss-islington
python:masterhttps://github.com/python/cpython/tree/master
nsiregar:bpo-37444-exceptions-builtin-importlibhttps://github.com/nsiregar/cpython/tree/bpo-37444-exceptions-builtin-importlib
Conversation 21 https://github.com/python/cpython/pull/14869
Commits 10 https://github.com/python/cpython/pull/14869/commits
Checks 0 https://github.com/python/cpython/pull/14869/checks
Files changed https://github.com/python/cpython/pull/14869/files
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
bpo-37444: Update differing exception between builtins and importlib https://github.com/python/cpython/pull/14869/files#top
Show all changes 10 commits https://github.com/python/cpython/pull/14869/files
314b4a4 bpo-37444: Update differing exception between builtins and importlib nsiregar Jul 20, 2019 https://github.com/python/cpython/pull/14869/commits/314b4a4820956c0369819b2d960d49eaf1ca07a4
223ce2d Update documentation for resolve_name nsiregar Jul 23, 2019 https://github.com/python/cpython/pull/14869/commits/223ce2d07a66f46e50c7d21167b10032a0c4f67e
027dce0 Updated correct spelling and inline markup nsiregar Jul 28, 2019 https://github.com/python/cpython/pull/14869/commits/027dce008d23df64405ebaaef9bb35e67a158fe8
8455d7f Update versionchanged note for importlib doc nsiregar Jul 29, 2019 https://github.com/python/cpython/pull/14869/commits/8455d7f2e689c1bfe2bb9b8457abcc0fd9a57d8d
375dd4f Tweak wordiing on versionchanged note ncoghlan Jul 30, 2019 https://github.com/python/cpython/pull/14869/commits/375dd4f58e438e4d3250bec431cd8f222ac76589
8fa4256 Note the porting issue in What's New ncoghlan Jul 30, 2019 https://github.com/python/cpython/pull/14869/commits/8fa425649b2c4584a08aca0984e89f70897948e9
d450331 Markup fix ncoghlan Jul 30, 2019 https://github.com/python/cpython/pull/14869/commits/d450331c5bbfcefff153694e0d71df4e3da5520b
bf5bc8c Add a mention of the change to builtins.__import__ no longer raising … brettcannon Aug 2, 2019 https://github.com/python/cpython/pull/14869/commits/bf5bc8cc073117d7521771da20f6e0907743e1fe
fca53f9 Add missing parameter markup brettcannon Aug 2, 2019 https://github.com/python/cpython/pull/14869/commits/fca53f9e33150de45b13e68daef6b7a7fa84fce4
b0c8536 Fix whatsnew documentation nsiregar Aug 3, 2019 https://github.com/python/cpython/pull/14869/commits/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced
Clear filters https://github.com/python/cpython/pull/14869/files
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
importlib.rst https://github.com/python/cpython/pull/14869/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
3.9.rst https://github.com/python/cpython/pull/14869/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
_bootstrap.py https://github.com/python/cpython/pull/14869/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
util.py https://github.com/python/cpython/pull/14869/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
test_relative_imports.py https://github.com/python/cpython/pull/14869/files#diff-9322547370ad6a4eb13b91f18b7003ede050e0310c06b87f383d00d86b29b876
test_util.py https://github.com/python/cpython/pull/14869/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
2019-07-20-22-34-42.bpo-37444.UOd3Xs.rst https://github.com/python/cpython/pull/14869/files#diff-f5ba0467621cd07ce47d8ca4d27cc4e6f3395947e2538cb26bc89fead94576e5
import.c https://github.com/python/cpython/pull/14869/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
importlib.h https://github.com/python/cpython/pull/14869/files#diff-f22c3fe718474bf1830c047f516ef95818493a9a9fcf8f2d5b159b1b5b76ecd6
Doc/library/importlib.rsthttps://github.com/python/cpython/pull/14869/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Doc/library/importlib.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
https://github.com/python/cpython/pull/14869/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
https://github.com/python/cpython/pull/14869/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
Doc/whatsnew/3.9.rsthttps://github.com/python/cpython/pull/14869/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Doc/whatsnew/3.9.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
https://github.com/python/cpython/pull/14869/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
https://github.com/python/cpython/pull/14869/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
https://github.com/python/cpython/pull/14869/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
https://github.com/python/cpython/pull/14869/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
https://github.com/python/cpython/pull/14869/files#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36
Lib/importlib/_bootstrap.pyhttps://github.com/python/cpython/pull/14869/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Lib/importlib/_bootstrap.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
https://github.com/python/cpython/pull/14869/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
https://github.com/python/cpython/pull/14869/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
Lib/importlib/util.pyhttps://github.com/python/cpython/pull/14869/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Lib/importlib/util.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
https://github.com/python/cpython/pull/14869/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
https://github.com/python/cpython/pull/14869/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
Lib/test/test_importlib/import_/test_relative_imports.pyhttps://github.com/python/cpython/pull/14869/files#diff-9322547370ad6a4eb13b91f18b7003ede050e0310c06b87f383d00d86b29b876
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Lib/test/test_importlib/import_/test_relative_imports.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
https://github.com/python/cpython/pull/14869/files#diff-9322547370ad6a4eb13b91f18b7003ede050e0310c06b87f383d00d86b29b876
https://github.com/python/cpython/pull/14869/files#diff-9322547370ad6a4eb13b91f18b7003ede050e0310c06b87f383d00d86b29b876
https://github.com/python/cpython/pull/14869/files#diff-9322547370ad6a4eb13b91f18b7003ede050e0310c06b87f383d00d86b29b876
Lib/test/test_importlib/test_util.pyhttps://github.com/python/cpython/pull/14869/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Lib/test/test_importlib/test_util.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
https://github.com/python/cpython/pull/14869/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
https://github.com/python/cpython/pull/14869/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
https://github.com/python/cpython/pull/14869/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
https://github.com/python/cpython/pull/14869/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
https://github.com/python/cpython/pull/14869/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
Misc/NEWS.d/next/Core and Builtins/2019-07-20-22-34-42.bpo-37444.UOd3Xs.rsthttps://github.com/python/cpython/pull/14869/files#diff-f5ba0467621cd07ce47d8ca4d27cc4e6f3395947e2538cb26bc89fead94576e5
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Misc/NEWS.d/next/Core%20and%20Builtins/2019-07-20-22-34-42.bpo-37444.UOd3Xs.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
Python/import.chttps://github.com/python/cpython/pull/14869/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Python/import.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/14869/{{ revealButtonHref }}
https://github.com/python/cpython/pull/14869/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
https://github.com/python/cpython/pull/14869/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
Python/importlib.hhttps://github.com/python/cpython/pull/14869/files#diff-f22c3fe718474bf1830c047f516ef95818493a9a9fcf8f2d5b159b1b5b76ecd6
View file https://github.com/nsiregar/cpython/blob/b0c8536ee8ccb4dee3f0fb8c4470f7971b045ced/Python/importlib.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/14869/files
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.