Title: PackageMetadata.__getitem__ returns None · Issue #371 · python/importlib_metadata · GitHub
Open Graph Title: PackageMetadata.__getitem__ returns None · Issue #371 · python/importlib_metadata
X Title: PackageMetadata.__getitem__ returns None · Issue #371 · python/importlib_metadata
Description: The first problem is almost certainly a bug, the annotation for __getitem__ says it returns a str but it returns None if the metadata doesn't exist. https://github.com/python/importlib_metadata/blob/v4.11.2/importlib_metadata/_meta.py#L1...
Open Graph Description: The first problem is almost certainly a bug, the annotation for __getitem__ says it returns a str but it returns None if the metadata doesn't exist. https://github.com/python/importlib_metadata/blo...
X Description: The first problem is almost certainly a bug, the annotation for __getitem__ says it returns a str but it returns None if the metadata doesn't exist. https://github.com/python/importlib_metadata...
Opengraph URL: https://github.com/python/importlib_metadata/issues/371
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PackageMetadata.__getitem__ returns None","articleBody":"* The first problem is almost certainly a bug, the annotation for `__getitem__` says it returns a `str` but it returns `None` if the metadata doesn't exist. https://github.com/python/importlib_metadata/blob/v4.11.2/importlib_metadata/_meta.py#L15\r\n\r\n For example:\r\n ```python\r\n from importlib.metadata import metadata\r\n print(metadata(\"pip\")[\"asdfg\"] is None) # True\r\n ```\r\n\r\n(second problem moved to #374).","author":{"url":"https://github.com/saaketp","@type":"Person","name":"saaketp"},"datePublished":"2022-03-08T22:08:12Z","url":"https://github.com/python/importlib_metadata/issues/371"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b190171f-caad-b34e-5be0-f4051e7ec99c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D41C:2BEA87:DBBA9:13053D:6B0080D5 |
| html-safe-nonce | 02437bcd280e333618b624e9d0f2cacf754ae0cda02cbd70e5a265c9aad69617 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDFDOjJCRUE4NzpEQkJBOToxMzA1M0Q6NkIwMDgwRDUiLCJ2aXNpdG9yX2lkIjoiNjEyNDY5MzMxODAyMzU0NTA0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 27059d844e2dbcdd2caf007b74198f5d8cb14aaaaca6916c7e7d3ede7848a860 |
| hovercard-subject-tag | issue:1163191888 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/importlib_metadata/371/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82ecb64c78fc31d87c8564f256ba93e4085ae236335791daf01abeb51aa40804/python/importlib_metadata/issues/371 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82ecb64c78fc31d87c8564f256ba93e4085ae236335791daf01abeb51aa40804/python/importlib_metadata/issues/371 |
| og:image:alt | The first problem is almost certainly a bug, the annotation for __getitem__ says it returns a str but it returns None if the metadata doesn't exist. https://github.com/python/importlib_metadata/blo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | saaketp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/importlib_metadata git https://github.com/python/importlib_metadata.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 306448340 |
| octolytics-dimension-repository_nwo | python/importlib_metadata |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 306448340 |
| octolytics-dimension-repository_network_root_nwo | python/importlib_metadata |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1bc2aa1939001689f5ce935982c10a6138f745c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width