KEMBAR78
urllib.request.urlopen results in AssertionError · Issue #852 · mypyc/mypyc · GitHub
Skip to content

urllib.request.urlopen results in AssertionError #852

@StSav012

Description

@StSav012

The file I try to compile can be found in my repo.
In the file, line 16 is

r: http.client.HTTPResponse = urllib.request.urlopen(commits_url, timeout=1)

I emphasize this because mypyc shows the following error lines:

Traceback (most recent call last):
  File "mypyc/irbuild/builder.py", line 158, in accept
  File "mypy/nodes.py", line 1487, in accept
  File "mypyc/irbuild/visitor.py", line 185, in visit_name_expr
  File "mypyc/irbuild/expression.py", line 59, in transform_name_expr
  File "mypyc/irbuild/builder.py", line 780, in emit_load_final
  File "mypyc/irbuild/builder.py", line 364, in load_final_static
updater.py:16: AssertionError:

The expected behavior is to compile the file without a hitch.

If it is not possible, then I expect mypyc to explain what the problem is. It just might be that urllib.request is not supported. However, what I face is a silent crash.

$  mypyc --version
mypy 0.812

Actually, I installed mypy from its git repo yesterday.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcrashFailing compile-time asserts, unhandled exceptions, or generated C code that's blowing up.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions