Skip to content

Mypy v1.18.2, django-stubs 5.2.7, Django 5.1 on python 3.13.9 #2911

@jlustgarten

Description

@jlustgarten

Bug report

What's wrong

I am running mypy (1.18.2) and django-stubs (5.2.7) on python 3.13 and while doing so, I am getting an INTERNAL ERROR issue that is blocking its use. It is related to an AssertionError on request.pyi:56
Traceback (most recent call last):
File "mypy/semanal.py", line 7350, in accept
File "mypy/nodes.py", line 1624, in accept
File "mypy/semanal.py", line 3272, in visit_assignment_stmt
File "mypy/semanal.py", line 3806, in process_type_annotation
File "mypy/semanal.py", line 6996, in defer
AssertionError: Must not defer during final iteration
venv/lib/python3.13/site-packages/django-stubs/http/request.pyi:56: error: INTERNAL ERROR

How is that should be

It should complete the run without any issue

System information

  • OS: macOS Tahoe 26.1
  • python version: 3.13.9
  • django version: 5.1
  • mypy version: 1.18.2
  • django-stubs version: 5.2.7
  • django-stubs-ext version: 5.2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions