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

Release 3.10.0 (attempt 2) #8552

Merged
merged 24 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 53 additions & 63 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,6 @@
Bug fixes
---------

- Adjusted ``FileResponse`` to check file existence and access when preparing the response -- by :user:`steverep`.

The :py:class:`~aiohttp.web.FileResponse` class was modified to respond with
403 Forbidden or 404 Not Found as appropriate. Previously, it would cause a
server error if the path did not exist or could not be accessed. Checks for
existence, non-regular files, and permissions were expected to be done in the
route handler. For static routes, this now permits a compressed file to exist
without its uncompressed variant and still be served. In addition, this
changes the response status for files without read permission to 403, and for
non-regular files from 404 to 403 for consistency.


*Related issues and pull requests on GitHub:*
:issue:`8182`.



- Fixed server response headers for ``Content-Type`` and ``Content-Encoding`` for
static compressed files -- by :user:`steverep`.

Expand All @@ -47,15 +30,32 @@ Bug fixes



- Fix duplicate cookie expiration calls in the CookieJar implementation
- Fixed duplicate cookie expiration calls in the CookieJar implementation


*Related issues and pull requests on GitHub:*
:issue:`7784`.



- Fix ``AsyncResolver`` to match ``ThreadedResolver`` behavior
- Adjusted ``FileResponse`` to check file existence and access when preparing the response -- by :user:`steverep`.

The :py:class:`~aiohttp.web.FileResponse` class was modified to respond with
403 Forbidden or 404 Not Found as appropriate. Previously, it would cause a
server error if the path did not exist or could not be accessed. Checks for
existence, non-regular files, and permissions were expected to be done in the
route handler. For static routes, this now permits a compressed file to exist
without its uncompressed variant and still be served. In addition, this
changes the response status for files without read permission to 403, and for
non-regular files from 404 to 403 for consistency.


*Related issues and pull requests on GitHub:*
:issue:`8182`.



- Fixed ``AsyncResolver`` to match ``ThreadedResolver`` behavior
-- by :user:`bdraco`.

On system with IPv6 support, the :py:class:`~aiohttp.resolver.AsyncResolver` would not fallback
Expand All @@ -71,7 +71,7 @@ Bug fixes



- Fix ``ws_connect`` not respecting `receive_timeout`` on WS(S) connection.
- Fixed ``ws_connect`` not respecting `receive_timeout`` on WS(S) connection.
-- by :user:`arcivanov`.


Expand Down Expand Up @@ -99,7 +99,7 @@ Bug fixes
Features
--------

- Add a Request.wait_for_disconnection() method, as means of allowing request handlers to be notified of premature client disconnections.
- Added a Request.wait_for_disconnection() method, as means of allowing request handlers to be notified of premature client disconnections.


*Related issues and pull requests on GitHub:*
Expand Down Expand Up @@ -134,7 +134,7 @@ Features



- Implement filter_cookies() with domain-matching and path-matching on the keys, instead of testing every single cookie.
- Implemented filter_cookies() with domain-matching and path-matching on the keys, instead of testing every single cookie.
This may break existing cookies that have been saved with `CookieJar.save()`. Cookies can be migrated with this script::

import pickle
Expand All @@ -151,7 +151,7 @@ Features


*Related issues and pull requests on GitHub:*
:issue:`7583`.
:issue:`7583`, :issue:`8535`.



Expand All @@ -163,7 +163,7 @@ Features



- Implement happy eyeballs
- Implemented happy eyeballs


*Related issues and pull requests on GitHub:*
Expand All @@ -180,18 +180,41 @@ Features



Removals and backward incompatible breaking changes
---------------------------------------------------

- The shutdown logic in 3.9 waited on all tasks, which caused issues with some libraries.
In 3.10 we've changed this logic to only wait on request handlers. This means that it's
important for developers to correctly handle the lifecycle of background tasks using a
library such as ``aiojobs``. If an application is using ``handler_cancellation=True`` then
it is also a good idea to ensure that any :func:`asyncio.shield` calls are replaced with
:func:`aiojobs.aiohttp.shield`.

Please read the updated documentation on these points: \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bdraco here's the preview: https://aiohttp--8552.org.readthedocs.build/en/8552/changes.html#removals-and-backward-incompatible-breaking-changes. This didn't change the render. The right fix would be to have a list with leading dashes or asterisks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing something as the render looks fine to me
Screenshot 2024-07-31 at 7 48 36 PM

Maybe its my screen size?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's your screen. Inspect with DevTools and you'll see that it's a paragraph with no line breaks.
aiohttp-rm-changelog

FWIW, \ in RST has a rather weird meaning. Sometimes, I use it to escape invisible spaces in between bits of syntax.

P.S. I'd rather have this generate <li>s.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(that's at 200% zoom in Firefox)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did try leading dashes but that didn't work either as its a list inside of a list

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would work, but might need an extra empty line after :. Feel free to ask me for RST advice next time — I have some experience with it and Sphinx internals+extensions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an example of a nested list that does work and is still a part of said changelog document: https://github.com/aio-libs/aiohttp/pull/8066/files#diff-bd97a3018f85ae60eb7b42978db8f4ae548d3090cc95bc3e8d64f1d825d4c5ee

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. That helps.

https://docs.aiohttp.org/en/stable/web_advanced.html#graceful-shutdown \
https://docs.aiohttp.org/en/stable/web_advanced.html#web-handler-cancellation

-- by :user:`Dreamsorcerer`


*Related issues and pull requests on GitHub:*
:issue:`8495`.




Improved documentation
----------------------

- Add documentation for ``aiohttp.web.FileResponse``.
- Added documentation for ``aiohttp.web.FileResponse``.


*Related issues and pull requests on GitHub:*
:issue:`3958`.



- Improve the docs for the `ssl` params.
- Improved the docs for the `ssl` params.


*Related issues and pull requests on GitHub:*
Expand All @@ -212,42 +235,9 @@ Contributor-facing changes



Removals and backward incompatible breaking changes
---------------------------------------------------

- The shutdown logic in 3.9 waited on all tasks, which caused issues with some libraries.
In 3.10 we've changed this logic to only wait on request handlers. This means that it's
important for developers to correctly handle the lifecycle of background tasks using a
library such as ``aiojobs``. If an application is using ``handler_cancellation=True`` then
it is also a good idea to ensure that any :func:`asyncio.shield` calls are replaced with
:func:`aiojobs.aiohttp.shield`.

Please read the updated documentation on these points:
https://docs.aiohttp.org/en/stable/web_advanced.html#graceful-shutdown
https://docs.aiohttp.org/en/stable/web_advanced.html#web-handler-cancellation

-- by :user:`Dreamsorcerer`


*Related issues and pull requests on GitHub:*
:issue:`8495`.




Miscellaneous internal changes
------------------------------

- Improve performance of filtering cookies -- by :user:`bdraco`.

This change is a followup to the improvements in :issue:`7583`


*Related issues and pull requests on GitHub:*
:issue:`8535`.



- Improved URL handler resolution time by indexing resources in the UrlDispatcher.
For applications with a large number of handlers, this should increase performance significantly.
-- by :user:`bdraco`
Expand All @@ -258,7 +248,7 @@ Miscellaneous internal changes



- Add `nacl_middleware <https://github.com/CosmicDNA/nacl_middleware>`_ to the list of middlewares in the third party section of the documentation.
- Added `nacl_middleware <https://github.com/CosmicDNA/nacl_middleware>`_ to the list of middlewares in the third party section of the documentation.


*Related issues and pull requests on GitHub:*
Expand Down Expand Up @@ -290,15 +280,15 @@ Miscellaneous internal changes



- Avoid creating a future on every websocket receive -- by :user:`bdraco`.
- Avoided creating a future on every websocket receive -- by :user:`bdraco`.


*Related issues and pull requests on GitHub:*
:issue:`8498`.



- Use identity checks for all ``WSMsgType`` type compares -- by :user:`bdraco`.
- Updated identity checks for all ``WSMsgType`` type compares -- by :user:`bdraco`.


*Related issues and pull requests on GitHub:*
Expand All @@ -314,7 +304,7 @@ Miscellaneous internal changes



- Restore :py:class:`~aiohttp.resolver.AsyncResolver` to be the default resolver. -- by :user:`bdraco`.
- Restored :py:class:`~aiohttp.resolver.AsyncResolver` to be the default resolver. -- by :user:`bdraco`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That period in the middle could've been avoided.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it’s worth adjusting before 3.10.1, or should we leave it as is?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's up to you. I know that it takes a lot of energy to make the change log nice. There's more things that could be fixed, like unlinked/unhighlited function mentions and perhaps other inconsistencies. I'd fix all of them if we were to work on improving it more systemically.


:py:class:`~aiohttp.resolver.AsyncResolver` was disabled by default because
of IPv6 compatibility issues. These issues have been resolved and
Expand Down
Loading