René's URL Explorer Experiment


Title: mypy bug with try/except conditional imports · Issue #1153 · python/mypy · GitHub

Open Graph Title: mypy bug with try/except conditional imports · Issue #1153 · python/mypy

X Title: mypy bug with try/except conditional imports · Issue #1153 · python/mypy

Description: try: import simplejson except ImportError: import json as simplejson resulst in the error error: Name 'simplejson' already defined

Open Graph Description: try: import simplejson except ImportError: import json as simplejson resulst in the error error: Name 'simplejson' already defined

X Description: try: import simplejson except ImportError: import json as simplejson resulst in the error error: Name 'simplejson' already defined

Mail addresses
notifications@github.com

Opengraph URL: https://github.com/python/mypy/issues/1153

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mypy bug with try/except conditional imports","articleBody":"```\ntry:\n    import simplejson\nexcept ImportError:\n    import json as simplejson\n```\n\nresulst in the error `error: Name 'simplejson' already defined`\n","author":{"url":"https://github.com/timabbott","@type":"Person","name":"timabbott"},"datePublished":"2016-01-25T22:11:52Z","url":"https://github.com/python/mypy/issues/1153"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:aa4e5cc6-b151-b154-8ee5-19d1296f6ec6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAF16:3A13A0:205D02C:2BD7CB2:6B001D01
html-safe-nonce2ac94cbec55817b7e8cfc03b0c07456380a9af949e518854159aafba6bca2158
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjE2OjNBMTNBMDoyMDVEMDJDOjJCRDdDQjI6NkIwMDFEMDEiLCJ2aXNpdG9yX2lkIjoiNDUwODEzMTgyMzY2MTk0OTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc79f66a4a187ffd272a5af12f5909adecb7678356968ec0b36d6fbbe50cbcbc7
hovercard-subject-tagissue:128654343
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/1153/issue_layout
twitter:imagehttps://opengraph.githubassets.com/29716fb161d1d06dc6bd4d49f3a7fa549bea458bb782031b903dcd450a833dcb/python/mypy/issues/1153
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/29716fb161d1d06dc6bd4d49f3a7fa549bea458bb782031b903dcd450a833dcb/python/mypy/issues/1153
og:image:alttry: import simplejson except ImportError: import json as simplejson resulst in the error error: Name 'simplejson' already defined
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametimabbott
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
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
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/1153#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F1153
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F1153
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/1153
Reloadhttps://github.com/python/mypy/issues/1153
Reloadhttps://github.com/python/mypy/issues/1153
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/1153
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/1153
mypy bug with try/except conditional importshttps://github.com/python/mypy/issues/1153#top
false-positivemypy gave an error on correct codehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22false-positive%22
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
https://github.com/timabbott
timabbotthttps://github.com/timabbott
on Jan 25, 2016https://github.com/python/mypy/issues/1153#issue-128654343
Nexthttps://github.com/python/mypy/issues/1153?timeline_page=1
https://github.com/refi64
refi64https://github.com/refi64
on Jan 25, 2016https://github.com/python/mypy/issues/1153#issuecomment-174725046
https://github.com/refi64
refi64https://github.com/refi64
on Jan 25, 2016https://github.com/python/mypy/issues/1153#issuecomment-174725436
#649https://github.com/python/mypy/issues/649
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Jan 25, 2016https://github.com/python/mypy/issues/1153#issuecomment-174732622
#649https://github.com/python/mypy/issues/649
#649https://github.com/python/mypy/issues/649
#649https://github.com/python/mypy/issues/649
#1153 (comment)https://github.com/python/mypy/issues/1153#issuecomment-174725436
gvanrossumhttps://github.com/gvanrossum
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
on Jan 26, 2016https://github.com/python/mypy/issues/1153#event-525792601
gvanrossumhttps://github.com/gvanrossum
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 29, 2016https://github.com/python/mypy/issues/1153#event-531848291
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Jan 30, 2016https://github.com/python/mypy/issues/1153#issuecomment-177059337
gvanrossumhttps://github.com/gvanrossum
on Jan 30, 2016https://github.com/python/mypy/issues/1153#event-532206572
ddfisherhttps://github.com/ddfisher
on Mar 1, 2016https://github.com/python/mypy/issues/1153#event-573903424
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 14, 2016https://github.com/python/mypy/issues/1153#issuecomment-253763118
#2251https://github.com/python/mypy/issues/2251
@RitwikGuptahttps://github.com/RitwikGupta
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 14, 2016https://github.com/python/mypy/issues/1153#issuecomment-253837459
#2253https://github.com/python/mypy/issues/2253
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 14, 2016https://github.com/python/mypy/issues/1153#issuecomment-253842414
gvanrossumhttps://github.com/gvanrossum
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
on Jan 6, 2017https://github.com/python/mypy/issues/1153#event-914705453
https://github.com/posita
positahttps://github.com/posita
on Jan 25, 2017https://github.com/python/mypy/issues/1153#issuecomment-275258376
gvanrossumhttps://github.com/gvanrossum
on Mar 29, 2017https://github.com/python/mypy/issues/1153#event-1021273908
https://github.com/quodlibetor
quodlibetorhttps://github.com/quodlibetor
on Oct 12, 2017https://github.com/python/mypy/issues/1153#issuecomment-336138982
zklaushttps://github.com/zklaus
on Jun 9, 2021https://github.com/python/mypy/issues/1153#event-4866910057
Add basic support for variable mappings (#1124)https://github.com/ESMValGroup/ESMValCore/commit/1235fb574290cc1c0e36bb6cc1389f78e9bef412
#1124https://github.com/ESMValGroup/ESMValCore/pull/1124
1235fb5https://github.com/ESMValGroup/ESMValCore/commit/1235fb574290cc1c0e36bb6cc1389f78e9bef412
https://github.com/cal-pratt
cal-pratthttps://github.com/cal-pratt
on Oct 13, 2021https://github.com/python/mypy/issues/1153#issuecomment-942573356
notatallshawhttps://github.com/notatallshaw
on Oct 31, 2021https://github.com/python/mypy/issues/1153#event-5545237038
Fix mypy failureshttps://github.com/notatallshaw/resolvelib/commit/c1516d952e1851a6fd323513dff89702bdaad1bd
c1516d9https://github.com/notatallshaw/resolvelib/commit/c1516d952e1851a6fd323513dff89702bdaad1bd
thesofakillershttps://github.com/thesofakillers
on Jan 14, 2022https://github.com/python/mypy/issues/1153#event-5896264135
ignore type checking on importlib metadata try/except; see python/myp…https://github.com/thesofakillers/badder-seeds/commit/47baa5daeca1d2d69c23eddb4c398d6213951a59
python/myp…https://github.com/python/mypy/issues/1153
47baa5dhttps://github.com/thesofakillers/badder-seeds/commit/47baa5daeca1d2d69c23eddb4c398d6213951a59
toslunarhttps://github.com/toslunar
on Mar 11, 2022https://github.com/python/mypy/issues/1153#event-6223456928
Workaround python/mypy#1153https://github.com/toslunar/pfrl/commit/0c2118191d5c0d402bb170525b98bf8625db8046
python/mypy#1153https://github.com/python/mypy/issues/1153
0c21181https://github.com/toslunar/pfrl/commit/0c2118191d5c0d402bb170525b98bf8625db8046
https://github.com/adam-grant-hendry
adam-grant-hendryhttps://github.com/adam-grant-hendry
on Jun 27, 2022https://github.com/python/mypy/issues/1153#issuecomment-1167676627
@cjerdonekhttps://github.com/python/mypy/issues/1297#issuecomment-508593494
BryceStevenWilleyhttps://github.com/BryceStevenWilley
on Aug 5, 2022https://github.com/python/mypy/issues/1153#event-7138726443
Mypy doesn't handle importing from submodules wellhttps://github.com/SuffolkLITLab/docassemble-AssemblyLine/commit/fc5e34ba21b1f4cbd69fbd101ecdf6c995ce4e9d
fc5e34bhttps://github.com/SuffolkLITLab/docassemble-AssemblyLine/commit/fc5e34ba21b1f4cbd69fbd101ecdf6c995ce4e9d
https://github.com/atrigent
atrigenthttps://github.com/atrigent
on Aug 7, 2022https://github.com/python/mypy/issues/1153#issuecomment-1207332260
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Aug 7, 2022https://github.com/python/mypy/issues/1153#issuecomment-1207333806
#5018https://github.com/python/mypy/issues/5018
hauntsaninjahttps://github.com/hauntsaninja
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 7, 2022https://github.com/python/mypy/issues/1153#event-7141733002
jpmckinneyhttps://github.com/jpmckinney
on Aug 23, 2022https://github.com/python/mypy/issues/1153#event-7242639764
chore: Remove comments about python/mypy#1153 (orjson != json, but it…https://github.com/open-contracting/yapw/commit/7b5aff5e2cd36811aeea7f2a615111c198e8c128
python/mypy#1153https://github.com/python/mypy/issues/1153
7b5aff5https://github.com/open-contracting/yapw/commit/7b5aff5e2cd36811aeea7f2a615111c198e8c128
lilydjwghttps://github.com/lilydjwg
on May 9, 2023https://github.com/python/mypy/issues/1153#event-9196666056
fight mypy[1]https://github.com/lilydjwg/nvchecker/commit/af77af34f33224bd3b103f0bb4a3da22a208a51b
af77af3https://github.com/lilydjwg/nvchecker/commit/af77af34f33224bd3b103f0bb4a3da22a208a51b
https://github.com/lilydjwg
lilydjwghttps://github.com/lilydjwg
on May 9, 2023https://github.com/python/mypy/issues/1153#issuecomment-1539438463
https://github.com/cebtenzzre
cebtenzzrehttps://github.com/cebtenzzre
on May 9, 2023https://github.com/python/mypy/issues/1153#issuecomment-1540576320
@lilydjwghttps://github.com/lilydjwg
#8823https://github.com/python/mypy/issues/8823
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/1153
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/1153
false-positivemypy gave an error on correct codehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22false-positive%22
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
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.