René's URL Explorer Experiment


Title: `importlib.metadata.PackageMetadata` has no `get` method? · Issue #7767 · python/typeshed · GitHub

Open Graph Title: `importlib.metadata.PackageMetadata` has no `get` method? · Issue #7767 · python/typeshed

X Title: `importlib.metadata.PackageMetadata` has no `get` method? · Issue #7767 · python/typeshed

Description: Since the return value for importlib.metadata.metadata was fixed in #7331, mypy now incorrectly diagnoses calls to get as a call to an invalid method. That PR took the approach of importing PackageMetadata from the relevant module, but t...

Open Graph Description: Since the return value for importlib.metadata.metadata was fixed in #7331, mypy now incorrectly diagnoses calls to get as a call to an invalid method. That PR took the approach of importing Package...

X Description: Since the return value for importlib.metadata.metadata was fixed in #7331, mypy now incorrectly diagnoses calls to get as a call to an invalid method. That PR took the approach of importing Package...

Opengraph URL: https://github.com/python/typeshed/issues/7767

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`importlib.metadata.PackageMetadata` has no `get` method?","articleBody":"Since the return value for `importlib.metadata.metadata` was fixed in https://github.com/python/typeshed/pull/7331, mypy now incorrectly diagnoses calls to `get` as a call to an invalid method. That PR took the approach of importing `PackageMetadata` from the relevant module, but that protocol does not apparently capture the entire supported interface.\r\n\r\n(Maybe this is a bug in my understanding of the return value of metadata and `get` isn't a valid call? But I have a lot of code that does this and it's always worked.)\r\n\r\n```console\r\n% cat test.py\r\nfrom importlib.metadata import metadata\r\nprint(metadata(\"mypy\").get(\"Version\"))\r\n% python test.py\r\n0.950\r\n% mypy test.py\r\ntest.py:2: error: \"PackageMetadata\" has no attribute \"get\"\r\nFound 1 error in 1 file (checked 1 source file)\r\n```","author":{"url":"https://github.com/rra","@type":"Person","name":"rra"},"datePublished":"2022-05-02T04:31:16Z","url":"https://github.com/python/typeshed/issues/7767"}

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:faa43635-d770-b2fe-0d46-dc67ca684f67
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id80AC:1F8DB5:770F2B:A51935:6B009FA5
html-safe-nonce9d291098755551d071e7350b60606ae1ac3be190eb64d1a37b3b6735767a8a85
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEFDOjFGOERCNTo3NzBGMkI6QTUxOTM1OjZCMDA5RkE1IiwidmlzaXRvcl9pZCI6IjQwNzI2NjczNjY4NzY1NTMxMjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac63b4c5bd9574ee013bd747eef846af727205d59d720ff34027d87725ce1e0ed9
hovercard-subject-tagissue:1222470126
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/typeshed/7767/issue_layout
twitter:imagehttps://opengraph.githubassets.com/43eccc66a2c1fa4e45b0974777a00f7e965911b357fbbf9cb35006410f88d9ca/python/typeshed/issues/7767
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/43eccc66a2c1fa4e45b0974777a00f7e965911b357fbbf9cb35006410f88d9ca/python/typeshed/issues/7767
og:image:altSince the return value for importlib.metadata.metadata was fixed in #7331, mypy now incorrectly diagnoses calls to get as a call to an invalid method. That PR took the approach of importing Package...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerra
hostnamegithub.com
expected-hostnamegithub.com
None52c95ce7e48016ae14399656b4ee812462b6f1fa28c5008c8394da64794c00b8
turbo-cache-controlno-preview
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
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
release1c9ddec8215f9a94e295c8310c3579b9c54ba31a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typeshed/issues/7767#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F7767
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%2Ftypeshed%2Fissues%2F7767
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%2Ftypeshed
Reloadhttps://github.com/python/typeshed/issues/7767
Reloadhttps://github.com/python/typeshed/issues/7767
Reloadhttps://github.com/python/typeshed/issues/7767
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests254 (254)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
https://github.com/python/typeshed
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/7767
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/7767
importlib.metadata.PackageMetadata has no get method?https://github.com/python/typeshed/issues/7767#top
status: deferredIssue or PR deferred until some precondition is fixedhttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22status%3A%20deferred%22
https://github.com/rra
rrahttps://github.com/rra
on May 2, 2022https://github.com/python/typeshed/issues/7767#issue-1222470126
#7331https://github.com/python/typeshed/pull/7331
rrahttps://github.com/rra
on May 2, 2022https://github.com/python/typeshed/issues/7767#event-6535381238
Avoid get on PackageMetadata in FastAPI templatehttps://github.com/lsst/templates/commit/b5fe909e4bbdd0b6dad523a1f5028ceaf368571b
b5fe909https://github.com/lsst/templates/commit/b5fe909e4bbdd0b6dad523a1f5028ceaf368571b
Add casts for package metadatahttps://github.com/lsst-sqre/safir/commit/3612e45df6cdc542b6af1e7b4ab0cd41740a48ba
3612e45https://github.com/lsst-sqre/safir/commit/3612e45df6cdc542b6af1e7b4ab0cd41740a48ba
https://github.com/duckinator
duckinatorhttps://github.com/duckinator
on May 31, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1142526923
https://docs.python.org/3/library/importlib.metadata.htmlhttps://docs.python.org/3/library/importlib.metadata.html
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Jun 1, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1143634889
https://docs.python.org/3/library/importlib.metadata.htmlhttps://docs.python.org/3/library/importlib.metadata.html
https://github.com/python/importlib_metadatahttps://github.com/python/importlib_metadata
AlexWaygoodhttps://github.com/AlexWaygood
on Jun 1, 2022https://github.com/python/typeshed/issues/7767#event-6719472712
https://github.com/duckinator
duckinatorhttps://github.com/duckinator
on Jun 1, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1143944986
https://github.com/duckinator
duckinatorhttps://github.com/duckinator
on Jun 1, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1143977990
python/importlib_metadata#384https://github.com/python/importlib_metadata/issues/384
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Jun 1, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1143978775
python/importlib_metadata#384https://github.com/python/importlib_metadata/issues/384
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Jun 12, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1153310514
AlexWaygoodhttps://github.com/AlexWaygood
status: deferredIssue or PR deferred until some precondition is fixedhttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22status%3A%20deferred%22
on Jun 12, 2022https://github.com/python/typeshed/issues/7767#event-6792045136
https://github.com/duckinator
duckinatorhttps://github.com/duckinator
on Jun 16, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1157266861
python/importlib_metadata#384 (comment)https://github.com/python/importlib_metadata/issues/384#issuecomment-1157169173
python/importlib_metadata#371https://github.com/python/importlib_metadata/issues/371
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Jun 20, 2022https://github.com/python/typeshed/issues/7767#issuecomment-1160869643
AlexWaygoodhttps://github.com/AlexWaygood
not plannedhttps://github.com/python/typeshed/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jun 20, 2022https://github.com/python/typeshed/issues/7767#event-6842207484
s-weigandhttps://github.com/s-weigand
on Aug 27, 2022https://github.com/python/typeshed/issues/7767#event-7272340061
🔧🧹 Ignore false positive type errorhttps://github.com/s-weigand/verbose-version-info/commit/ce1b1e710f1943b5c5262ddc7bbe5df46736957f
ce1b1e7https://github.com/s-weigand/verbose-version-info/commit/ce1b1e710f1943b5c5262ddc7bbe5df46736957f
⬆️ UPGRADE: Autoupdate pre-commit config (#61)https://github.com/s-weigand/verbose-version-info/commit/77de07940dd9e6ce39c64cd17565077e10ef2484
#61https://github.com/s-weigand/verbose-version-info/pull/61
77de079https://github.com/s-weigand/verbose-version-info/commit/77de07940dd9e6ce39c64cd17565077e10ef2484
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typeshed/issues/7767
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typeshed/issues/7767
status: deferredIssue or PR deferred until some precondition is fixedhttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22status%3A%20deferred%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.