[channels] Compatibility fixes for django-stubs 6.0.3#15653
[channels] Compatibility fixes for django-stubs 6.0.3#15653srittau merged 2 commits intopython:mainfrom
Conversation
`LazyObject` is generic since django-stubs 6.0.3.
|
Diff from mypy_primer, showing the effect of this PR on open source code: mypy (https://github.com/python/mypy)
error: INTERNAL ERROR -- Please try using mypy master on GitHub:
|
When did we introduce a mypy crash? That seems pretty concerning. Doesn't look like it's related to this PR, but we should probably try to fix that 😬 |
Unclear, but it's fairly recent. |
|
Looks like the mypy crash is due to mypy now setting Traceback for v1.20.0: $ uv run python3 -m mypy_primer --new 1.20.0 --old 1.20.0 -k 'mypy$'
...
new
> /tmp/mypy_primer/mypy_new/venv/bin/mypy --config-file mypy_self_check.ini -p mypy -p mypyc --python-executable=/tmp/mypy_primer/projects/_mypy_venv/bin/python --warn-unused-ignores --warn-redundant-casts --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit=-1 (10.6s)
UNEXPECTED FAILURE
error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.20.0
note: use --pdb to drop into pdb
Traceback (most recent call last):
File "/__main__.py", line 15, in console_entry
main()
~~~~^^
File "mypy/main.py", line 141, in main
return
File "mypy/main.py", line 225, in run_build
show_messages(new_messages, f, formatter, options)
File "mypy/build.py", line 384, in build
# Create metastore before workers to avoid race conditions.
File "mypy/build.py", line 298, in connect
try:
TypeError: mypy.ipc.BadStatus object expected; got AssertionErrorMypy master seems to fix the crash and shows a more explicit error: $ uv run python3 -m mypy_primer --new master --old master -k 'mypy$'
...
new
> /tmp/mypy_primer/mypy_new/venv/bin/mypy --config-file mypy_self_check.ini -p mypy -p mypyc --python-executable=/tmp/mypy_primer/projects/_mypy_venv/bin/python --warn-unused-ignores --warn-redundant-casts --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit=-1 (0.5s)
UNEXPECTED FAILURE
error: cache must be enabled in parallel mode |
LazyObjectis generic since django-stubs 6.0.3.This fixes problems in unrelated PRs and preempts upcoming daily CI errors.