Pre-release wheels (e.g., 4.0.0a1) breaking downstream CI
Describe the bug
pip install --pre aiohttp installs 4.0.0a1, which was uploaded in 2019 and seems to have been abandoned for further 3.x releases. Because only 3.6 and 3.7 wheels were uploaded, this simply fails on Python 3.8+ where the build dependencies are unavailable.
To Reproduce
pip install --pre aiohttp
Expected behavior
Installs without issue.
Logs/tracebacks
Running setup.py install for aiohttp: started
Running setup.py install for aiohttp: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for aiohttp did not run successfully.
│ exit code: 1
╰─> [391 lines of output]
**********************
* Accellerated build *
**********************
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/formdata.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/client_proto.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/client.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web_exceptions.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/log.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/multipart.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/http_exceptions.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/__init__.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/http_parser.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web_fileresponse.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/tracing.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web_request.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/connector.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/hdrs.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/payload.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web_server.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/client_ws.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/http_websocket.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web_middlewares.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/streams.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/frozenlist.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/client_exceptions.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/client_reqrep.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/http.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/base_protocol.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/worker.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/test_utils.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/cookiejar.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/abc.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/pytest_plugin.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web_response.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/typedefs.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/web_urldispatcher.py -> build/lib.linux-x86_64-3.10/aiohttp
copying aiohttp/tcp_helpers.py -> build/lib.linux-x86_64-3.10/aiohttp
/opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/unicodeobject.h:1046,
from /opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/unicodeobject.h:1046,
from /opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c: In function ‘__Pyx_decode_c_string’:
aiohttp/_http_parser.c:21230:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
21230 | return PyUnicode_FromUnicode(NULL, 0);
| ^~~~~~
In file included from /opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/unicodeobject.h:1046,
from /opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/opt/hostedtoolcache/Python/3.10.5/x64/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
| ^~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c: In function ‘__Pyx_Coroutine_Send’:
aiohttp/_http_parser.c:23271:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
23271 | ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
| ^~~~~~~~~~~
| _PyGen_yf
aiohttp/_http_parser.c:23271:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
23271 | ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
| ^
aiohttp/_http_parser.c:23276:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
23276 | ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
| ^
aiohttp/_http_parser.c: In function ‘__Pyx_Generator_Next’:
aiohttp/_http_parser.c:23360:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
23360 | ret = _PyGen_Send((PyGenObject*)yf, NULL);
| ^
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> aiohttp
### Python Version
```console
CPython (3.10.5)
aiohttp Version
4.0.0a1
multidict Version
4.7.6
yarl Version
1.7.2
OS
Ubuntu 20.04.4 LTS
Related component
Server, Client
Additional context
We use CI runs where we pip install --upgrade --pre our packages to ensure that we can catch breaking changes in upstream packages before they start affecting users. In this case, it seems to be less an issue with aiohttp as some old clutter on PyPI.
I'm not sure why we haven't seen this before, as this package has been around a while, perhaps an upstream tool has begun to depend on aiohttp. Still seems like it may be worth removing.
Code of Conduct
- [X] I agree to follow the aio-libs Code of Conduct
v4 does seem to be endlessly delayed, but maybe we should just push out another alpha with whatever is in master..
We use CI runs where we
pip install --upgrade --preour packages to ensure that we can catch breaking changes in upstream packages before they start affecting users. In this case, it seems to be less an issue withaiohttpas some old clutter on PyPI.
v4 is expected to not be backwards-compatible, so I'd suggest combining --pre with a <4 constraint, in order to test with 3.x prereleases. If you keep testing with v4 alpha releases, you may end up needing to maintain a bunch of version checks to work with both 3 and 4 (depending on your use).
Hello, @effigies, can you confirm this is still an issue?
I can't remember what package I had that was depending on this. Either I pinned aiohttp<4, the intermediate dependency did, or I got rid of the intermediate dependency. So this is no longer an active issue for me.
Would it make sense to yank the 4.0.0a* releases so that pip won't install them unless explicitly requested?
Pip already doesn't install pre-releases unless requested with --pre or directly.
Agreed, but it's a useful practice to have a CI test install things with --pre so that you can see breaks coming down the line and adapt to them or report bugs upstream before a release. This issue was me reporting it upstream, although the breakage here is just that installing is a pain because the wheels are 3 years old.
3.7 is nearly end-of-life (and lots of projects are starting to deprecate Python 3.8 support), and I'm not sure I see the value of this sdist getting installed with --pre. Yanking these won't prevent you from uploading 4.0.0a2 when it's time for downstream projects to start preparing.
I yanked the 4.x pre-releases so pip won't select them automatically.