René's URL Explorer Experiment


Title: INTERNAL ERROR running against a Trio PR · Issue #9967 · python/mypy · GitHub

Open Graph Title: INTERNAL ERROR running against a Trio PR · Issue #9967 · python/mypy

X Title: INTERNAL ERROR running against a Trio PR · Issue #9967 · python/mypy

Description: Crash Report I apologize but I don't know which change I made that triggered this. I was quickly reworking to _Fn = TypeVar("_Fn", bound=Callable[..., Any]) a few places from _F and _C and maybe more before and during that and then the c...

Open Graph Description: Crash Report I apologize but I don't know which change I made that triggered this. I was quickly reworking to _Fn = TypeVar("_Fn", bound=Callable[..., Any]) a few places from _F and _C and maybe mo...

X Description: Crash Report I apologize but I don't know which change I made that triggered this. I was quickly reworking to _Fn = TypeVar("_Fn", bound=Callable[..., Any]) a few places from _F and _...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"INTERNAL ERROR running against a Trio PR","articleBody":"**Crash Report**\r\n\r\nI apologize but I don't know which change I made that triggered this.  I was quickly reworking to `_Fn = TypeVar(\"_Fn\", bound=Callable[..., Any])` a few places from `_F` and `_C` and maybe more before and during that and then the crash and then kids and lunch and...  `:[`\r\n\r\nEdit: Here is a patch that makes the internal error go away.\r\n\r\n```diff\r\ndiff --git a/trio/_core/_run.py b/trio/_core/_run.py\r\nindex 114a5194..9e95816c 100644\r\n--- a/trio/_core/_run.py\r\n+++ b/trio/_core/_run.py\r\n@@ -80,7 +80,7 @@ DEADLINE_HEAP_MIN_PRUNE_THRESHOLD = 1000\r\n \r\n _NO_SEND = object()\r\n \r\n-_Fn = TypeVar(\"_fn\", bound=Callable[..., Any])\r\n+_Fn = TypeVar(\"_Fn\", bound=Callable[..., Any])\r\n \r\n \r\n # Decorator to mark methods public. This does nothing by itself, but\r\n```\r\n\r\n**Traceback**\r\n\r\n```\r\ntrio/_core/_run.py:83: error: String argument 1 '_fn' to TypeVar(...) does not match variable name '_Fn'  [misc]\r\ntrio/_core/_run.py:83: error: Argument \"bound\" to \"TypeVar\" has incompatible type \"object\"; expected \"Union[None, Type[Any], str]\"  [arg-type]\r\ntrio/_core/_run.py:88: error: Variable \"trio._core._run._Fn\" is not valid as a type  [valid-type]\r\ntrio/_core/_run.py:88: note: See https://mypy.readthedocs.io/en/latest/common_issues.html#variables-vs-type-aliases\r\ntrio/_threads.py:253: error: Name '_AF' is not defined  [name-defined]\r\ntrio/_threads.py:291: error: Name 'unprotected_afn' already defined on line 289  [no-redef]\r\ntrio/_socket.py:304: error: Type of decorated function contains type \"Any\" (\"Callable[[VarArg(Any), KwArg(Any)], Any]\")  [misc]\r\ntrio/_socket.py:595: error: Signature of \"family\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:599: error: Signature of \"type\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:606: error: Signature of \"proto\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:610: error: Signature of \"did_shutdown_SHUT_WR\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:926: error: Type of decorated function contains type \"Any\" (\"Callable[[_SocketType, VarArg(Any)], Any]\")  [misc]\r\ntrio/_socket.py:945: error: Type of decorated function contains type \"Any\" (\"Callable[[_SocketType, VarArg(Any)], Any]\")  [misc]\r\n/home/altendky/repos/trio/tmp/trio/trio/_core/_run.py:1438: error: INTERNAL ERROR -- Please try using mypy master on Github:\r\nhttps://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build\r\nPlease report a bug at https://github.com/python/mypy/issues\r\nversion: 0.810+dev.37d29fcb30dce646573b487f2c9375cee457724c\r\nTraceback (most recent call last):\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/bin/mypy\", line 8, in \u003cmodule>\r\n    sys.exit(console_entry())\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/__main__.py\", line 11, in console_entry\r\n    main(None, sys.stdout, sys.stderr)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/main.py\", line 90, in main\r\n    res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 179, in build\r\n    result = _build(\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 253, in _build\r\n    graph = dispatch(sources, manager, stdout)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 2632, in dispatch\r\n    process_graph(graph, manager)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 2958, in process_graph\r\n    process_stale_scc(graph, scc, manager)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 3056, in process_stale_scc\r\n    graph[id].type_check_first_pass()\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 2130, in type_check_first_pass\r\n    self.type_checker().check_first_pass()\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 294, in check_first_pass\r\n    self.accept(d)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 401, in accept\r\n    stmt.accept(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/nodes.py\", line 950, in accept\r\n    return visitor.visit_class_def(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 1723, in visit_class_def\r\n    self.accept(defn.defs)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 401, in accept\r\n    stmt.accept(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/nodes.py\", line 1015, in accept\r\n    return visitor.visit_block(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 1972, in visit_block\r\n    self.accept(s)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 401, in accept\r\n    stmt.accept(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/nodes.py\", line 526, in accept\r\n    return visitor.visit_overloaded_func_def(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 434, in visit_overloaded_func_def\r\n    self._visit_overloaded_func_def(defn)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 461, in _visit_overloaded_func_def\r\n    self.check_overlapping_overloads(defn)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 482, in check_overlapping_overloads\r\n    assert isinstance(inner_type, CallableType)\r\nAssertionError: \r\n/home/altendky/repos/trio/tmp/trio/trio/_core/_run.py:1438: : note: use --pdb to drop into pdb\r\n```\r\n\r\n\u003cdetails> \u003csummary>Full session\u003c/summary>\r\n\r\n```console\r\n$ git clone https://github.com/altendky/trio\r\nCloning into 'trio'...\r\nremote: Enumerating objects: 195, done.\r\nremote: Counting objects: 100% (195/195), done.\r\nremote: Compressing objects: 100% (144/144), done.\r\nremote: Total 18530 (delta 89), reused 98 (delta 51), pack-reused 18335\r\nReceiving objects: 100% (18530/18530), 5.69 MiB | 8.98 MiB/s, done.\r\nResolving deltas: 100% (13681/13681), done.\r\n```\r\n```console\r\n$ cd trio\r\n```\r\n```console\r\n$ git checkout 484f13f124f614cde356b50dbbf53f29731dcfc0\r\nNote: switching to '484f13f124f614cde356b50dbbf53f29731dcfc0'.\r\n\r\nYou are in 'detached HEAD' state. You can look around, make experimental\r\nchanges and commit them, and you can discard any commits you make in this\r\nstate without impacting any branches by switching back to a branch.\r\n\r\nIf you want to create a new branch to retain commits you create, you may\r\ndo so (now or later) by using -c with the switch command. Example:\r\n\r\n  git switch -c \u003cnew-branch-name>\r\n\r\nOr undo this operation with:\r\n\r\n  git switch -\r\n\r\nTurn off this advice by setting config variable advice.detachedHead to false\r\n\r\nHEAD is now at 484f13f1 use present mypy master\r\n```\r\n```console\r\n$ python3.9 -m venv venv\r\n```\r\n```console\r\n$ venv/bin/python --version --version\r\nPython 3.9.1 (default, Jan  6 2021, 10:22:00) \r\n[GCC 9.3.0]\r\n```\r\n```console\r\n$ venv/bin/python -m pip install --upgrade pip setuptools wheel\r\nCollecting pip\r\n  Using cached pip-21.0-py3-none-any.whl (1.5 MB)\r\nCollecting setuptools\r\n  Using cached setuptools-52.0.0-py3-none-any.whl (784 kB)\r\nCollecting wheel\r\n  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)\r\nInstalling collected packages: pip, setuptools, wheel\r\n  Attempting uninstall: pip\r\n    Found existing installation: pip 20.2.3\r\n    Uninstalling pip-20.2.3:\r\n      Successfully uninstalled pip-20.2.3\r\n  Attempting uninstall: setuptools\r\n    Found existing installation: setuptools 49.2.1\r\n    Uninstalling setuptools-49.2.1:\r\n      Successfully uninstalled setuptools-49.2.1\r\nSuccessfully installed pip-21.0 setuptools-52.0.0 wheel-0.36.2\r\n```\r\n```console\r\n$ venv/bin/python -m pip install --requirement test-requirements.txt\r\nCollecting mypy@ git+https://github.com/python/mypy@37d29fcb30dce646573b487f2c9375cee457724c\r\n  Cloning https://github.com/python/mypy (to revision 37d29fcb30dce646573b487f2c9375cee457724c) to /tmp/pip-install-p45zbfzu/mypy_99b38262e2ca42e78859b9d1be71322d\r\n  Running command git clone -q https://github.com/python/mypy /tmp/pip-install-p45zbfzu/mypy_99b38262e2ca42e78859b9d1be71322d\r\n  Running command git rev-parse -q --verify 'sha^37d29fcb30dce646573b487f2c9375cee457724c'\r\n  Running command git fetch -q https://github.com/python/mypy 37d29fcb30dce646573b487f2c9375cee457724c\r\n  Running command git submodule update --init --recursive -q\r\n  Installing build dependencies ... done\r\n  Getting requirements to build wheel ... done\r\n    Preparing wheel metadata ... done\r\nCollecting appdirs==1.4.4\r\n  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)\r\nCollecting astor==0.8.1\r\n  Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)\r\nCollecting astroid==2.4.2\r\n  Using cached astroid-2.4.2-py3-none-any.whl (213 kB)\r\nCollecting async-generator==1.10\r\n  Using cached async_generator-1.10-py3-none-any.whl (18 kB)\r\nCollecting attrs==20.3.0\r\n  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)\r\nCollecting backcall==0.2.0\r\n  Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)\r\nCollecting black==20.8b1\r\n  Using cached black-20.8b1-py3-none-any.whl\r\nCollecting cffi==1.14.4\r\n  Using cached cffi-1.14.4-cp39-cp39-manylinux1_x86_64.whl (405 kB)\r\nCollecting click==7.1.2\r\n  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)\r\nCollecting coverage==5.3.1\r\n  Using cached coverage-5.3.1-cp39-cp39-manylinux2010_x86_64.whl (244 kB)\r\nCollecting cryptography==3.3.1\r\n  Using cached cryptography-3.3.1-cp36-abi3-manylinux2010_x86_64.whl (2.6 MB)\r\nCollecting decorator==4.4.2\r\n  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)\r\nCollecting flake8==3.8.4\r\n  Using cached flake8-3.8.4-py2.py3-none-any.whl (72 kB)\r\nCollecting idna==2.10\r\n  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)\r\nCollecting immutables==0.14\r\n  Using cached immutables-0.14-cp39-cp39-linux_x86_64.whl\r\nCollecting iniconfig==1.1.1\r\n  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)\r\nCollecting ipython-genutils==0.2.0\r\n  Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)\r\nCollecting ipython==7.19.0\r\n  Using cached ipython-7.19.0-py3-none-any.whl (784 kB)\r\nCollecting isort==5.7.0\r\n  Using cached isort-5.7.0-py3-none-any.whl (104 kB)\r\nCollecting jedi==0.18.0\r\n  Using cached jedi-0.18.0-py2.py3-none-any.whl (1.4 MB)\r\nCollecting lazy-object-proxy==1.4.3\r\n  Using cached lazy_object_proxy-1.4.3-cp39-cp39-linux_x86_64.whl\r\nCollecting mccabe==0.6.1\r\n  Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)\r\nCollecting mypy-extensions==0.4.3\r\n  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)\r\nCollecting outcome==1.1.0\r\n  Using cached outcome-1.1.0-py2.py3-none-any.whl (9.7 kB)\r\nCollecting packaging==20.8\r\n  Using cached packaging-20.8-py2.py3-none-any.whl (39 kB)\r\nCollecting parso==0.8.1\r\n  Using cached parso-0.8.1-py2.py3-none-any.whl (93 kB)\r\nCollecting pathspec==0.8.1\r\n  Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB)\r\nCollecting pexpect==4.8.0\r\n  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)\r\nCollecting pickleshare==0.7.5\r\n  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)\r\nCollecting pluggy==0.13.1\r\n  Using cached pluggy-0.13.1-py2.py3-none-any.whl (18 kB)\r\nCollecting prompt-toolkit==3.0.11\r\n  Using cached prompt_toolkit-3.0.11-py3-none-any.whl (358 kB)\r\nCollecting ptyprocess==0.7.0\r\n  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)\r\nCollecting py==1.10.0\r\n  Using cached py-1.10.0-py2.py3-none-any.whl (97 kB)\r\nCollecting pycodestyle==2.6.0\r\n  Using cached pycodestyle-2.6.0-py2.py3-none-any.whl (41 kB)\r\nCollecting pycparser==2.20\r\n  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)\r\nCollecting pyflakes==2.2.0\r\n  Using cached pyflakes-2.2.0-py2.py3-none-any.whl (66 kB)\r\nCollecting pygments==2.7.4\r\n  Using cached Pygments-2.7.4-py3-none-any.whl (950 kB)\r\nCollecting pylint==2.6.0\r\n  Using cached pylint-2.6.0-py3-none-any.whl (325 kB)\r\nCollecting pyopenssl==20.0.1\r\n  Using cached pyOpenSSL-20.0.1-py2.py3-none-any.whl (54 kB)\r\nCollecting pyparsing==2.4.7\r\n  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)\r\nCollecting pytest-cov==2.11.1\r\n  Using cached pytest_cov-2.11.1-py2.py3-none-any.whl (20 kB)\r\nCollecting pytest==6.1.2\r\n  Using cached pytest-6.1.2-py3-none-any.whl (272 kB)\r\nCollecting regex==2020.11.13\r\n  Using cached regex-2020.11.13-cp39-cp39-manylinux2014_x86_64.whl (732 kB)\r\nCollecting six==1.15.0\r\n  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)\r\nCollecting sniffio==1.2.0\r\n  Using cached sniffio-1.2.0-py3-none-any.whl (10 kB)\r\nCollecting sortedcontainers==2.3.0\r\n  Using cached sortedcontainers-2.3.0-py2.py3-none-any.whl (29 kB)\r\nCollecting toml==0.10.2\r\n  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)\r\nCollecting traitlets==5.0.5\r\n  Using cached traitlets-5.0.5-py3-none-any.whl (100 kB)\r\nCollecting trustme==0.6.0\r\n  Using cached trustme-0.6.0-py2.py3-none-any.whl (14 kB)\r\nCollecting typed-ast==1.4.2\r\n  Using cached typed_ast-1.4.2-cp39-cp39-manylinux1_x86_64.whl (769 kB)\r\nCollecting typing-extensions==3.7.4.3\r\n  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)\r\nCollecting wcwidth==0.2.5\r\n  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)\r\nCollecting wrapt==1.12.1\r\n  Using cached wrapt-1.12.1-cp39-cp39-linux_x86_64.whl\r\nRequirement already satisfied: setuptools>=18.5 in ./venv/lib/python3.9/site-packages (from ipython==7.19.0->-r test-requirements.txt (line 48)) (52.0.0)\r\nBuilding wheels for collected packages: mypy\r\n  Building wheel for mypy (PEP 517) ... done\r\n  Created wheel for mypy: filename=mypy-0.810+dev.37d29fcb30dce646573b487f2c9375cee457724c-py3-none-any.whl size=2520253 sha256=b990d62239f9138edff2872006d9ecc173a1e8810164f0723fb991f03b881819\r\n  Stored in directory: /home/altendky/.cache/pip/wheels/07/53/e0/d045fb7c08e8a5d2dc09ffe202f58b15823611f212a8db75cf\r\nSuccessfully built mypy\r\nInstalling collected packages: pyparsing, pycparser, wrapt, wcwidth, toml, six, py, ptyprocess, pluggy, parso, packaging, lazy-object-proxy, ipython-genutils, iniconfig, cffi, attrs, typing-extensions, typed-ast, traitlets, regex, pytest, pygments, pyflakes, pycodestyle, prompt-toolkit, pickleshare, pexpect, pathspec, mypy-extensions, mccabe, jedi, isort, idna, decorator, cryptography, coverage, click, backcall, astroid, appdirs, trustme, sortedcontainers, sniffio, pytest-cov, pyopenssl, pylint, outcome, mypy, ipython, immutables, flake8, black, async-generator, astor\r\nSuccessfully installed appdirs-1.4.4 astor-0.8.1 astroid-2.4.2 async-generator-1.10 attrs-20.3.0 backcall-0.2.0 black-20.8b1 cffi-1.14.4 click-7.1.2 coverage-5.3.1 cryptography-3.3.1 decorator-4.4.2 flake8-3.8.4 idna-2.10 immutables-0.14 iniconfig-1.1.1 ipython-7.19.0 ipython-genutils-0.2.0 isort-5.7.0 jedi-0.18.0 lazy-object-proxy-1.4.3 mccabe-0.6.1 mypy-0.810+dev.37d29fcb30dce646573b487f2c9375cee457724c mypy-extensions-0.4.3 outcome-1.1.0 packaging-20.8 parso-0.8.1 pathspec-0.8.1 pexpect-4.8.0 pickleshare-0.7.5 pluggy-0.13.1 prompt-toolkit-3.0.11 ptyprocess-0.7.0 py-1.10.0 pycodestyle-2.6.0 pycparser-2.20 pyflakes-2.2.0 pygments-2.7.4 pylint-2.6.0 pyopenssl-20.0.1 pyparsing-2.4.7 pytest-6.1.2 pytest-cov-2.11.1 regex-2020.11.13 six-1.15.0 sniffio-1.2.0 sortedcontainers-2.3.0 toml-0.10.2 traitlets-5.0.5 trustme-0.6.0 typed-ast-1.4.2 typing-extensions-3.7.4.3 wcwidth-0.2.5 wrapt-1.12.1\r\n```\r\n```console\r\n$ venv/bin/pip freeze --all\r\nappdirs==1.4.4\r\nastor==0.8.1\r\nastroid==2.4.2\r\nasync-generator==1.10\r\nattrs==20.3.0\r\nbackcall==0.2.0\r\nblack==20.8b1\r\ncffi==1.14.4\r\nclick==7.1.2\r\ncoverage==5.3.1\r\ncryptography==3.3.1\r\ndecorator==4.4.2\r\nflake8==3.8.4\r\nidna==2.10\r\nimmutables==0.14\r\niniconfig==1.1.1\r\nipython==7.19.0\r\nipython-genutils==0.2.0\r\nisort==5.7.0\r\njedi==0.18.0\r\nlazy-object-proxy==1.4.3\r\nmccabe==0.6.1\r\nmypy @ git+https://github.com/python/mypy@37d29fcb30dce646573b487f2c9375cee457724c\r\nmypy-extensions==0.4.3\r\noutcome==1.1.0\r\npackaging==20.8\r\nparso==0.8.1\r\npathspec==0.8.1\r\npexpect==4.8.0\r\npickleshare==0.7.5\r\npip==21.0\r\npluggy==0.13.1\r\nprompt-toolkit==3.0.11\r\nptyprocess==0.7.0\r\npy==1.10.0\r\npycodestyle==2.6.0\r\npycparser==2.20\r\npyflakes==2.2.0\r\nPygments==2.7.4\r\npylint==2.6.0\r\npyOpenSSL==20.0.1\r\npyparsing==2.4.7\r\npytest==6.1.2\r\npytest-cov==2.11.1\r\nregex==2020.11.13\r\nsetuptools==52.0.0\r\nsix==1.15.0\r\nsniffio==1.2.0\r\nsortedcontainers==2.3.0\r\ntoml==0.10.2\r\ntraitlets==5.0.5\r\ntrustme==0.6.0\r\ntyped-ast==1.4.2\r\ntyping-extensions==3.7.4.3\r\nwcwidth==0.2.5\r\nwheel==0.36.2\r\nwrapt==1.12.1\r\n```\r\n```console\r\n$ venv/bin/mypy -p trio --show-error-codes --platform linux --show-traceback\r\ntrio/_core/_run.py:83: error: String argument 1 '_fn' to TypeVar(...) does not match variable name '_Fn'  [misc]\r\ntrio/_core/_run.py:83: error: Argument \"bound\" to \"TypeVar\" has incompatible type \"object\"; expected \"Union[None, Type[Any], str]\"  [arg-type]\r\ntrio/_core/_run.py:88: error: Variable \"trio._core._run._Fn\" is not valid as a type  [valid-type]\r\ntrio/_core/_run.py:88: note: See https://mypy.readthedocs.io/en/latest/common_issues.html#variables-vs-type-aliases\r\ntrio/_threads.py:253: error: Name '_AF' is not defined  [name-defined]\r\ntrio/_threads.py:291: error: Name 'unprotected_afn' already defined on line 289  [no-redef]\r\ntrio/_socket.py:304: error: Type of decorated function contains type \"Any\" (\"Callable[[VarArg(Any), KwArg(Any)], Any]\")  [misc]\r\ntrio/_socket.py:595: error: Signature of \"family\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:599: error: Signature of \"type\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:606: error: Signature of \"proto\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:610: error: Signature of \"did_shutdown_SHUT_WR\" incompatible with supertype \"SocketType\"  [override]\r\ntrio/_socket.py:926: error: Type of decorated function contains type \"Any\" (\"Callable[[_SocketType, VarArg(Any)], Any]\")  [misc]\r\ntrio/_socket.py:945: error: Type of decorated function contains type \"Any\" (\"Callable[[_SocketType, VarArg(Any)], Any]\")  [misc]\r\n/home/altendky/repos/trio/tmp/trio/trio/_core/_run.py:1438: error: INTERNAL ERROR -- Please try using mypy master on Github:\r\nhttps://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build\r\nPlease report a bug at https://github.com/python/mypy/issues\r\nversion: 0.810+dev.37d29fcb30dce646573b487f2c9375cee457724c\r\nTraceback (most recent call last):\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/bin/mypy\", line 8, in \u003cmodule>\r\n    sys.exit(console_entry())\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/__main__.py\", line 11, in console_entry\r\n    main(None, sys.stdout, sys.stderr)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/main.py\", line 90, in main\r\n    res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 179, in build\r\n    result = _build(\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 253, in _build\r\n    graph = dispatch(sources, manager, stdout)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 2632, in dispatch\r\n    process_graph(graph, manager)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 2958, in process_graph\r\n    process_stale_scc(graph, scc, manager)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 3056, in process_stale_scc\r\n    graph[id].type_check_first_pass()\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/build.py\", line 2130, in type_check_first_pass\r\n    self.type_checker().check_first_pass()\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 294, in check_first_pass\r\n    self.accept(d)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 401, in accept\r\n    stmt.accept(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/nodes.py\", line 950, in accept\r\n    return visitor.visit_class_def(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 1723, in visit_class_def\r\n    self.accept(defn.defs)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 401, in accept\r\n    stmt.accept(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/nodes.py\", line 1015, in accept\r\n    return visitor.visit_block(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 1972, in visit_block\r\n    self.accept(s)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 401, in accept\r\n    stmt.accept(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/nodes.py\", line 526, in accept\r\n    return visitor.visit_overloaded_func_def(self)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 434, in visit_overloaded_func_def\r\n    self._visit_overloaded_func_def(defn)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 461, in _visit_overloaded_func_def\r\n    self.check_overlapping_overloads(defn)\r\n  File \"/home/altendky/repos/trio/tmp/trio/venv/lib/python3.9/site-packages/mypy/checker.py\", line 482, in check_overlapping_overloads\r\n    assert isinstance(inner_type, CallableType)\r\nAssertionError: \r\n/home/altendky/repos/trio/tmp/trio/trio/_core/_run.py:1438: : note: use --pdb to drop into pdb\r\n```\r\n\r\n\u003c/details>\r\n\r\n\r\n**To Reproduce**\r\n\r\n```bash\r\ngit clone https://github.com/altendky/trio\r\ncd trio\r\ngit checkout 484f13f124f614cde356b50dbbf53f29731dcfc0\r\npython3.9 -m venv venv\r\nvenv/bin/python --version --version\r\nvenv/bin/python -m pip install --upgrade pip setuptools wheel\r\nvenv/bin/python -m pip install --requirement test-requirements.txt\r\nvenv/bin/pip freeze --all\r\nvenv/bin/mypy -p trio --show-error-codes --platform linux --show-traceback\r\n```\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: `git+https://github.com/python/mypy@37d29fcb30dce646573b487f2c9375cee457724c`\r\n- Mypy command-line flags: `-p trio --show-error-codes --platform linux --show-traceback`\r\n- Mypy configuration options from `mypy.ini` (and other config files):\r\n```ini\r\n[mypy]\r\n# TODO: run mypy against several OS/version combos in CI\r\n# https://mypy.readthedocs.io/en/latest/command_line.html#platform-configuration\r\n\r\n# Be flexible about dependencies that don't have stubs yet (like pytest)\r\nignore_missing_imports = True\r\n\r\n# Be strict about use of Mypy\r\nwarn_unused_ignores = True\r\nwarn_unused_configs = True\r\nwarn_redundant_casts = True\r\nwarn_return_any = True\r\n\r\n# Avoid subtle backsliding\r\ndisallow_any_decorated = True\r\ndisallow_incomplete_defs = True\r\ndisallow_subclassing_any = True\r\n\r\n# Enable gradually / for new modules\r\ncheck_untyped_defs = False\r\ndisallow_untyped_calls = False\r\ndisallow_untyped_defs = False\r\n\r\n# DO NOT use `ignore_errors`; it doesn't apply\r\n# downstream and users have to deal with them.\r\n```\r\n- Python version used:\r\n```\r\nPython 3.9.1 (default, Jan  6 2021, 10:22:00) \r\n[GCC 9.3.0]\r\n```\r\n- Operating system and version:\r\n```\r\nNo LSB modules are available.\r\nDistributor ID: Ubuntu\r\nDescription:    Ubuntu 20.04.1 LTS\r\nRelease:        20.04\r\nCodename:       focal\r\n```\r\n","author":{"url":"https://github.com/altendky","@type":"Person","name":"altendky"},"datePublished":"2021-01-25T18:49:47Z","url":"https://github.com/python/mypy/issues/9967"}

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:a4d025a2-254a-6c6c-59a2-f4300db99aff
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD6A4:26206F:2ECA54B:3DBCAC2:6B0023F7
html-safe-noncec154efa3f5dbb297f4ad32636c6728238a1904b4c60f47a1c291054b6d67fc00
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkE0OjI2MjA2RjoyRUNBNTRCOjNEQkNBQzI6NkIwMDIzRjciLCJ2aXNpdG9yX2lkIjoiMjk1MTM5MzcyODIyMjIwOTAxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4fa6136287b5ce3e49152485f2e7a3e7e80f9a7bef4de579b86af2ed4ba9e083
hovercard-subject-tagissue:793636855
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/9967/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b3f634b43522b2e2dc0d5185e63d1b048b6ea0f6a70a1d308e6c1e8f1183b341/python/mypy/issues/9967
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b3f634b43522b2e2dc0d5185e63d1b048b6ea0f6a70a1d308e6c1e8f1183b341/python/mypy/issues/9967
og:image:altCrash Report I apologize but I don't know which change I made that triggered this. I was quickly reworking to _Fn = TypeVar("_Fn", bound=Callable[..., Any]) a few places from _F and _C and maybe mo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamealtendky
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/9967#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F9967
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%2F9967
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/9967
Reloadhttps://github.com/python/mypy/issues/9967
Reloadhttps://github.com/python/mypy/issues/9967
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/9967
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/9967
#11630https://github.com/python/mypy/pull/11630
INTERNAL ERROR running against a Trio PRhttps://github.com/python/mypy/issues/9967#top
#11630https://github.com/python/mypy/pull/11630
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
https://github.com/altendky
altendkyhttps://github.com/altendky
on Jan 25, 2021https://github.com/python/mypy/issues/9967#issue-793636855
altendkyhttps://github.com/altendky
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Jan 25, 2021https://github.com/python/mypy/issues/9967#event-4247181088
https://github.com/pranavrajpal
pranavrajpalhttps://github.com/pranavrajpal
on Oct 9, 2021https://github.com/python/mypy/issues/9967#issuecomment-939360740
#8356https://github.com/python/mypy/issues/8356
#8356 (comment)https://github.com/python/mypy/issues/8356#issuecomment-884655875
herehttps://github.com/altendky/trio/blob/484f13f124f614cde356b50dbbf53f29731dcfc0/trio/_core/_run.py#L1446
https://github.com/pranavrajpal
pranavrajpalhttps://github.com/pranavrajpal
on Nov 27, 2021https://github.com/python/mypy/issues/9967#issuecomment-980784582
hauntsaninjahttps://github.com/hauntsaninja
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#11630https://github.com/python/mypy/pull/11630
on Nov 28, 2021https://github.com/python/mypy/issues/9967#event-5680669420
hauntsaninjahttps://github.com/hauntsaninja
on Nov 28, 2021https://github.com/python/mypy/issues/9967#event-5680669482
Fix crash with overload and callable object decorators (#11630)https://github.com/python/mypy/commit/7b13ff87a786e3511c9646bd3827a1344c4fb1f5
#11630https://github.com/python/mypy/pull/11630
https://docs.github.com/articles/closing-issues-via-commit-messages
7b13ff8https://github.com/python/mypy/commit/7b13ff87a786e3511c9646bd3827a1344c4fb1f5
ilevkivskyihttps://github.com/ilevkivskyi
on Dec 3, 2021https://github.com/python/mypy/issues/9967#event-5712765963
Fix crash with overload and callable object decorators (#11630)https://github.com/python/mypy/commit/dd086bc75c8b846ecd8a086dbf2067b92f5d432b
#11630https://github.com/python/mypy/pull/11630
https://docs.github.com/articles/closing-issues-via-commit-messages
dd086bchttps://github.com/python/mypy/commit/dd086bc75c8b846ecd8a086dbf2067b92f5d432b
tushar-deepsourcehttps://github.com/tushar-deepsource
on Jan 20, 2022https://github.com/python/mypy/issues/9967#event-5924012400
Fix crash with overload and callable object decorators (python#11630)https://github.com/DeepSourceCorp/mypy/commit/713df5ea34f8f92941511320aa921bb0c453dceb
python#11630https://github.com/python/mypy/pull/11630
https://docs.github.com/articles/closing-issues-via-commit-messages
713df5ehttps://github.com/DeepSourceCorp/mypy/commit/713df5ea34f8f92941511320aa921bb0c453dceb
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/9967
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/9967
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%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.