Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test run on python3.6 on 3.8 branch after type annotations for mypy --strict #5447

Closed
derlih opened this issue Jan 28, 2021 · 3 comments
Closed
Labels

Comments

@derlih
Copy link
Contributor

derlih commented Jan 28, 2021

🐞 Describe the bug

After 9e3a28a pytest fails on python 3.6

💡 To Reproduce

run make vvtest on 3.8 branch using python.36

💡 Expected behavior

tests should pass

📋 Logs/tracebacks

ImportError while loading conftest '/home/runner/work/aiohttp/aiohttp/tests/conftest.py'.
tests/conftest.py:12: in <module>
    from aiohttp.test_utils import loop_context
aiohttp/__init__.py:6: in <module>
    from .client import (
aiohttp/client.py:36: in <module>
    from . import hdrs, http, payload
aiohttp/http.py:7: in <module>
    from .http_parser import (
aiohttp/http_parser.py:75: in <module>
    class RawRequestMessage(NamedTuple):
aiohttp/http_parser.py:79: in RawRequestMessage
    headers: CIMultiDictProxy[str]
E   TypeError: 'type' object is not subscriptable

📋 Your version of the Python

$ python --version
3.6
@derlih derlih added the bug label Jan 28, 2021
@derlih derlih changed the title Fix test run on python3.6 on 3.8 branch after type annotations (9e3a28a) Fix test run on python3.6 on 3.8 branch after type annotations for mypy --strict (9e3a28a) Jan 28, 2021
@derlih derlih changed the title Fix test run on python3.6 on 3.8 branch after type annotations for mypy --strict (9e3a28a) Fix test run on python3.6 on 3.8 branch after type annotations for mypy --strict Jan 28, 2021
@derlih derlih mentioned this issue Jan 28, 2021
5 tasks
@Dreamsorcerer
Copy link
Member

A simple fix may to to just add from __future__ import annotations at the top of the file.

@derlih
Copy link
Contributor Author

derlih commented Jan 29, 2021

Unfortunately it is not present in python 3.6 :-(

@asvetlov
Copy link
Member

Update multidict>=4.7.0: aio-libs/multidict#392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants