-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
** 3.9 Beta testing ** #7675
Comments
One thing that bothers me about 3.12 is that our import time test always fails in the initial test run, and then passes in the rerun. I'm not sure what change in 3.12 would cause that, but it seems to happen 100% of the time. It's not a small margin either, it misses the target time by around 30-50%. Maybe someone else has some ideas? |
I spent some time to enable the test suite on our conda-forge "feedstock" that repackages aiohttp - unfortunately this wasn't turned on so far, most likely because it's a somewhat non-trivial effort, especially as aiohttp is really cumbersome to build 100% from source (I gave up on that after ~5 onion layers and used a work-around that's... kinda acceptable, but bespoke). Compared to the "existing" failures (w.r.t. our infrastructure) for 3.8.6, this is the delta for 3.9.0b0: @@ -60,14 +60,17 @@ test:
{% set tests_to_skip = "_not_a_real_test" %}
- {% set tests_to_skip = tests_to_skip + " or test_feed_eof_no_err_brotli" %}
{% set tests_to_skip = tests_to_skip + " or test_http_response_parser_bad_chunked_strict_c[pyloop]" %}
{% set tests_to_skip = tests_to_skip + " or test_http_response_parser_bad_chunked_strict_py[pyloop]" %}
{% set tests_to_skip = tests_to_skip + " or test_http_response_parser_strict_headers[c-parser-pyloop]" %}
- {% set tests_to_skip = tests_to_skip + " or test_request_tracing_url_params[pyloop]" %}
{% set tests_to_skip = tests_to_skip + " or test_tcp_connector_raise_connector_ssl_error[pyloop]" %}
# test failing with python >=3.11
{% set tests_to_skip = tests_to_skip + " or test_https_proxy_unsupported_tls_in_tls[pyloop-https]" %} # [py>=311]
+ # fails to open socket at desired IP/port
+ {% set tests_to_skip = tests_to_skip + " or (test_web_server and test_handler_cancellation)" %} # [linux]
+ {% set tests_to_skip = tests_to_skip + " or (test_web_server and test_no_handler_cancellation)" %} # [linux]
+ # emulation is too slow for expected speed
+ {% set tests_to_skip = tests_to_skip + " or (test_imports and test_import_time)" %} # [aarch64 or ppc64le]
# aio seems to hard-code expectation for cpython (i.e. not "pypy3.9" in SP_DIR path)
{% set tests_to_skip = tests_to_skip + " or test_static_route_user_home" %} # [python_impl == "pypy"]
# not working with pypy (all platforms)
[...] The timeout failure is unsurprising, as we have no native hardware for aach64/ppc64le, and so those run through emulation in QEMU, which is obviously slower. The other two look like this:
All in all, I think this looks pretty OK 👍 |
I can see how the "It is recommended to use web.AppKey instances for keys" warning (here) is useful when upgrading to 3.9.0, but IMHO there also needs to be a way for it to be suppressed until libraries such as aiohttp-security can be updated, see e.g. this. I guess this could be done either by making a |
It's a warning, so normal warning filters can be used (CLI argument or |
Hmm, maybe I misunderstood the module parameter, it doesn't look like I can filter it with Also, the warning was not meant to be displayed by default (only when the user enables warnings with |
Ah, I see. I run my test suite with |
Hmm, well ignoring it via CLI won't be so easy: python/cpython#66733 |
OK, subclassed and ignored by default in #7677. Should be able to separately ignore it with |
Thanks! Other than that no issues so far, my test suite passes on 3.9.0b0 and Python 3.12; I just switched over to using class AppKeys(enum.Enum):
FOO = web.AppKey('foo', Foo)
BAR = web.AppKey('bar', Bar)
@property
def value(self) -> web.AppKey:
return super().value # type: ignore
...
app[AppKeys.FOO.value] = Foo()
# etc. |
Another place that makes use of string app keys and causes the warning is https://github.com/aio-libs/aiohttp-devtools/blob/master/aiohttp_devtools/runserver/serve.py |
That still throws away the typing information, making it pointless to use AppKey().
Compared with:
|
My JupyterLab Python docker stack seems to work fine. Build chain:
Run container: docker run -it --rm -p 8888:8888 jupyterlab/python/base:3.12.0 Enjoy! |
One more issue I've found while testing is with using websockets. If we have open websockets, then the graceful shutdown will always wait for the timeout (as the websocket tasks won't end) before continuing with shutdown. Should we add a pre_shutdown signal or something? Then websocket closing (as shown in https://docs.aiohttp.org/en/stable/web_advanced.html#graceful-shutdown) can be done in a pre-shutdown handler before the server waits for running tasks to complete. |
Isn't that a hardcoded annotation? It should work without an annotation. |
When trying to
|
See PyPI, aiohttp 4.0.0a1 is a pre-build from 2019. Use |
It's not obvious from the screenshot but that annotation isn't hardcoded, it's auto generated by Pylance because I have its "Inlay Hints: Variable Types" featured turned on. Here's a better screenshot: In my actual app I have it split across multiple files so it really does pick up on it correctly. But anyway, since mypy isn't picking up on it, I guess I'll have to switch away from an enum. |
This comment has been minimized.
This comment has been minimized.
Not directly related to the functionality, but to packaging: In 3.9.0b0, the |
I've beat this up as much as I can. From my perspective, 3.9.0 seems good to go. |
I've pushed 3.9.0rc0, which contains some fixes and performance improvements. One of the fixes required a few changes to some of our tests, I'm expecting this will only affect our internal tests, but if a couple of people can confirm their test suite is still passing that'd be helpful. If no further issues are found, I'll promote it to a stable release over the weekend (when I have some time to make releases for the other libraries). |
Perfect. I'll get some wider testing on rc0 once the wheels finish cooking & approval home-assistant/core#103507 (that PR was stuck due to the issue above) |
Please add classifiers for 3.11 and 3.12 to |
See suggestion at aio-libs#7675 (comment)
See the duplicate issues and PRs that are all closed. It was decided not to add them until the test suite is stable and passing. It still doesn't pass for 3.11 or 3.12 yet, which means support is still considered somewhat experimental. bdraco started to try and fix them in #7773. |
Any news about release date? |
|
3.9.0rc0 is now out, likely to be promoted as a stable release at the weekend.
We've introduced a few significant changes in 3.9, so it would be great to get some community testing before promoting it as a stable release. We've released 3.9.0b1 as a prerelease to help with this.
Can be installed with:
pip install 'aiohttp<4' --pre --upgrade
In particular, these are things we are interested on testing or gathering feedback on:
Client-side
Server-side
AppKey
for static typing support: https://docs.aiohttp.org/en/latest/web_advanced.html#application-s-configTODO: Prepare aiohttp libraries for AppKey:
The text was updated successfully, but these errors were encountered: