Title: Email example from python docs doesn't validate: Address as EmailMessage header · Issue #2863 · python/typeshed · GitHub
Open Graph Title: Email example from python docs doesn't validate: Address as EmailMessage header · Issue #2863 · python/typeshed
X Title: Email example from python docs doesn't validate: Address as EmailMessage header · Issue #2863 · python/typeshed
Description: EmailMessage.__setitem__ should support Address as a value. At least the Python docs email example think it does. See https://docs.python.org/3/library/email.examples.html test_mypy.py: from email.message import EmailMessage from email.h...
Open Graph Description: EmailMessage.__setitem__ should support Address as a value. At least the Python docs email example think it does. See https://docs.python.org/3/library/email.examples.html test_mypy.py: from email....
X Description: EmailMessage.__setitem__ should support Address as a value. At least the Python docs email example think it does. See https://docs.python.org/3/library/email.examples.html test_mypy.py: from email....
Opengraph URL: https://github.com/python/typeshed/issues/2863
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Email example from python docs doesn't validate: Address as EmailMessage header","articleBody":"`EmailMessage.__setitem__` should support `Address` as a value. At least the Python docs email example think it does. See https://docs.python.org/3/library/email.examples.html\r\n\r\ntest_mypy.py:\r\n```\r\nfrom email.message import EmailMessage\r\nfrom email.headerregistry import Address\r\n\r\nmsg = EmailMessage()\r\nmsg['From'] = Address(\"Pepé Le Pew\", \"pepe\", \"example.com\")\r\n```\r\n\r\nAnd then:\r\n```\r\n$ mypy test_mypy.py\r\ntest_mypy.py:5: error: Incompatible types in assignment (expression has type \"Address\", target has type \"Union[str, Header]\")\r\n```","author":{"url":"https://github.com/arjennienhuis","@type":"Person","name":"arjennienhuis"},"datePublished":"2019-03-13T14:38:33Z","url":"https://github.com/python/typeshed/issues/2863"}
| 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:7082b702-1a54-33be-6cc5-62f23eaf5dd1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DDB4:39D41C:291B73:38F3F4:6B0088AA |
| html-safe-nonce | d534b9828afe2378d4fc08efe7eb4fede9320130a1be5c5c6355a9f8626e30fe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREI0OjM5RDQxQzoyOTFCNzM6MzhGM0Y0OjZCMDA4OEFBIiwidmlzaXRvcl9pZCI6Ijg2MjY2OTI5ODEyMDM2OTk4ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e571a5cd3ed16cd0dd02f5fc7064fb73c67f1e67dede7c31e50858c21872208b |
| hovercard-subject-tag | issue:420536317 |
| 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/typeshed/2863/issue_layout |
| twitter:image | https://opengraph.githubassets.com/46fccaff442159af5eef757979fc4d4e612b1dd10ab6589c0f9cb8cb91ad555f/python/typeshed/issues/2863 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/46fccaff442159af5eef757979fc4d4e612b1dd10ab6589c0f9cb8cb91ad555f/python/typeshed/issues/2863 |
| og:image:alt | EmailMessage.__setitem__ should support Address as a value. At least the Python docs email example think it does. See https://docs.python.org/3/library/email.examples.html test_mypy.py: from email.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arjennienhuis |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4d3d8e50f02c1d7bf86d5acfa1d3bfe9366abd6528a6b429eb07a168429d2b61 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | db758f8e02b8257935fb03edf81a3e76eb3abd11 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width