Title: Exception while typechecking python3.4 program using asyncio.Queue.get · Issue #868 · python/mypy · GitHub
Open Graph Title: Exception while typechecking python3.4 program using asyncio.Queue.get · Issue #868 · python/mypy
X Title: Exception while typechecking python3.4 program using asyncio.Queue.get · Issue #868 · python/mypy
Description: Using the latest master from today mypy 0.2.0-dev. Traceback (most recent call last): File "/usr/local/bin/mypy", line 184, in
Open Graph Description: Using the latest master from today mypy 0.2.0-dev. Traceback (most recent call last): File "/usr/local/bin/mypy", line 184, in
X Description: Using the latest master from today mypy 0.2.0-dev. Traceback (most recent call last): File "/usr/local/bin/mypy", line 184, in <module> main() File "/usr/local/bin/mypy", ...
Opengraph URL: https://github.com/python/mypy/issues/868
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception while typechecking python3.4 program using asyncio.Queue.get","articleBody":"Using the latest master from today `mypy 0.2.0-dev`.\n\n``` Python\nTraceback (most recent call last):\n File \"/usr/local/bin/mypy\", line 184, in \u003cmodule>\n main()\n File \"/usr/local/bin/mypy\", line 36, in main\n type_check_only(path, module, bin_dir, options)\n File \"/usr/local/bin/mypy\", line 80, in type_check_only\n python_path=options.python_path)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/build.py\", line 160, in build\n result = manager.process(UnprocessedFile(info, program_text))\n File \"/usr/local/lib/python3.4/dist-packages/mypy/build.py\", line 337, in process\n next.process()\n File \"/usr/local/lib/python3.4/dist-packages/mypy/build.py\", line 786, in process\n self.type_checker().visit_file(self.tree, self.tree.path)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 353, in visit_file\n self.accept(d)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 360, in accept\n typ = node.accept(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/nodes.py\", line 380, in accept\n return visitor.visit_decorator(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 1646, in visit_decorator\n e.func.accept(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/nodes.py\", line 349, in accept\n return visitor.visit_func_def(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 417, in visit_func_def\n self.check_func_item(defn, name=defn.name())\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 450, in check_func_item\n self.check_func_def(defn, typ, name)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 517, in check_func_def\n self.accept_in_frame(item.body)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 373, in accept_in_frame\n answer = self.accept(node, type_context)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 360, in accept\n typ = node.accept(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/nodes.py\", line 493, in accept\n return visitor.visit_block(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 907, in visit_block\n self.accept(s)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 360, in accept\n typ = node.accept(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/nodes.py\", line 532, in accept\n return visitor.visit_assignment_stmt(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 916, in visit_assignment_stmt\n self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 944, in check_assignment\n self.infer_variable_type(inferred, lvalue, self.accept(rvalue),\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 360, in accept\n typ = node.accept(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/nodes.py\", line 944, in accept\n return visitor.visit_yield_from_expr(self)\n File \"/usr/local/lib/python3.4/dist-packages/mypy/checker.py\", line 1693, in visit_yield_from_expr\n if result_instance.type.fullname() == \"asyncio.futures.Future\":\nAttributeError: 'AnyType' object has no attribute 'type'\n```\n\nHere is a minimal program to reproduce:\n\n``` Python\nimport asyncio\n\n@asyncio.coroutine\ndef example_coro():\n q = asyncio.Queue()\n msg = yield from q.get()\n\nif __name__ == '__main__':\n loop = asyncio.get_event_loop()\n loop.run_until_complete(example_coro())\n```\n","author":{"url":"https://github.com/thomascellerier","@type":"Person","name":"thomascellerier"},"datePublished":"2015-09-03T07:39:42Z","url":"https://github.com/python/mypy/issues/868"}
| 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:91056dbc-c73a-2154-f53e-d29b580a060b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C964:31B4CC:47B6D9:60496E:6B00C9FE |
| html-safe-nonce | 1d292cb15720bf35ee8b472260dcafc21cae60b09666f1c20144aae845934260 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTY0OjMxQjRDQzo0N0I2RDk6NjA0OTZFOjZCMDBDOUZFIiwidmlzaXRvcl9pZCI6IjE1NzEyMjE5OTkyOTA3MzEwMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 703fa5621afff69e6b90b41f1597515eb0e17d9679c547fcb1a7239165edcbc4 |
| hovercard-subject-tag | issue:104639005 |
| 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/mypy/868/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04e3bc9ed08f4db9763eb5ac78817c149e0cc505a3ecaad2b826f3e21313d9bb/python/mypy/issues/868 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04e3bc9ed08f4db9763eb5ac78817c149e0cc505a3ecaad2b826f3e21313d9bb/python/mypy/issues/868 |
| og:image:alt | Using the latest master from today mypy 0.2.0-dev. Traceback (most recent call last): File "/usr/local/bin/mypy", line 184, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thomascellerier |
| hostname | github.com |
| expected-hostname | github.com |
| None | 98dc00e171c204462a6f367482a0f8c3c6b5dbca99cd7390e82d2df49ce096e4 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | ef013399cf0a3c324bea644a685d7c1e0f06b5b7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width