TypeError in web.py - '<' not supported between instances of 'sys.version_info' and 'float' #5127
Closed
Description
🐞 Describe the bug
💡 To Reproduce
- Windows, Python 3.9.0 x64
- "from aiohttp import web"
📋 Logs/tracebacks
File "C:\_dev\.venv\lib\site-packages\aiohttp\web.py", line 379, in _run_app
if sys.platform == "win32" and sys.version_info < 3.8:
TypeError: '<' not supported between instances of 'sys.version_info' and 'float'
📋 Your version of the Python
$ python --version
Python 3.9.0
...
📋 Your version of the aiohttp/yarl/multidict distributions
$ python -m pip show aiohttp
Name: aiohttp
Version: 3.7.0
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp
Author: Nikolay Kim
Author-email: fafhrd91@gmail.com
License: Apache 2
Location: c:\_dev\.venv\lib\site-packages
Requires: async-timeout, multidict, chardet, yarl, attrs
$ python -m pip show multidict
Name: multidict
Version: 5.0.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: c:\_dev\.venv\lib\site-packages
Requires:
Required-by: yarl, aiohttp
$ python -m pip show yarl
Name: yarl
Version: 1.6.2
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl/
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: c:\_dev\.venv\lib\site-packages
Requires: multidict, idna
Required-by: aiormq, aiohttp, aio-pika
📋 Additional context
This can be reproduced by simply doing:
import sys
print(sys.version_info < 3.8)