pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/py-aiohttp
Module Name: pkgsrc
Committed By: adam
Date: Wed Jul 31 09:03:56 UTC 2024
Modified Files:
pkgsrc/www/py-aiohttp: Makefile distinfo
Log Message:
py-aiohttp: updated to 3.10.0
3.10.0 (2024-07-30)
Bug fixes
- Fixed server response headers for ``Content-Type`` and ``Content-Encoding`` for
static compressed files
Server will now respond with a ``Content-Type`` appropriate for the compressed
file (e.g. ``"application/gzip"``), and omit the ``Content-Encoding`` header.
Users should expect that most clients will no longer decompress such responses
by default.
- Fixed duplicate cookie expiration calls in the CookieJar implementation
- Adjusted ``FileResponse`` to check file existence and access when preparing the response
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.
- Fixed ``AsyncResolver`` to match ``ThreadedResolver`` behavior
On system with IPv6 support, the :py:class:`~aiohttp.resolver.AsyncResolver` would not fallback
to providing A records when AAAA records were not available.
Additionally, unlike the :py:class:`~aiohttp.resolver.ThreadedResolver`, the :py:class:`~aiohttp.resolver.AsyncResolver`
did not handle link-local addresses correctly.
This change makes the behavior consistent with the :py:class:`~aiohttp.resolver.ThreadedResolver`.
- Fixed ``ws_connect`` not respecting `receive_timeout`` on WS(S) connection.
- Removed blocking I/O in the event loop for static resources and refactored
exception handling
File system calls when handling requests for static routes were moved to a
separate thread to potentially improve performance. Exception handling
was tightened in order to only return 403 Forbidden or 404 Not Found responses
for expected scenarios; 500 Internal Server Error would be returned for any
unknown errors.
Features
- Added a Request.wait_for_disconnection() method, as means of allowing request handlers to be notified of premature client disconnections.
- Added 5 new exceptions: :py:exc:`~aiohttp.InvalidUrlClientError`, :py:exc:`~aiohttp.RedirectClientError`,
:py:exc:`~aiohttp.NonHttpUrlClientError`, :py:exc:`~aiohttp.InvalidUrlRedirectClientError`,
:py:exc:`~aiohttp.NonHttpUrlRedirectClientError`
:py:exc:`~aiohttp.InvalidUrlRedirectClientError`, :py:exc:`~aiohttp.NonHttpUrlRedirectClientError`
are raised instead of :py:exc:`ValueError` or :py:exc:`~aiohttp.InvalidURL` when the redirect URL is invalid. Classes
:py:exc:`~aiohttp.InvalidUrlClientError`, :py:exc:`~aiohttp.RedirectClientError`,
:py:exc:`~aiohttp.NonHttpUrlClientError` are base for them.
The :py:exc:`~aiohttp.InvalidURL` now exposes a ``description`` property with the text explanation of the error details.
- Added a feature to retry closed connections automatically for idempotent methods.
- 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
with file_path.open("rb") as f:
cookies = pickle.load(f)
morsels = [(name, m) for c in cookies.values() for name, m in c.items()]
cookies.clear()
for name, m in morsels:
cookies[(m["domain"], m["path"].rstrip("/"))][name] = m
with file_path.open("wb") as f:
pickle.dump(cookies, f, pickle.HIGHEST_PROTOCOL)
- Separated connection and socket timeout errors, from ServerTimeoutError.
- Implemented happy eyeballs
- Added server capability to check for static files with Brotli compression via a ``.br`` extension
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`.
Improved documentation
- Added documentation for ``aiohttp.web.FileResponse``.
- Improved the docs for the `ssl` params.
Contributor-facing changes
- Enabled HTTP parser tests originally intended for 3.9.2 release
Miscellaneous internal changes
- Improved URL handler resolution time by indexing resources in the UrlDispatcher.
For applications with a large number of handlers, this should increase performance significantly.
- Added `nacl_middleware <https://github.com/CosmicDNA/nacl_middleware>`_ to the list of middlewares in the third party section of the documentation.
- Minor improvements to static typing
- Added a 3.11-specific overloads to ``ClientSession``
- Simplified path checks for ``UrlDispatcher.add_static()`` method
- Avoided creating a future on every websocket receive
- Updated identity checks for all ``WSMsgType`` type compares
- When using Python 3.12 or later, the writer is no longer scheduled on the event loop if it can finish synchronously. Avoiding event loop scheduling reduces latency and improves performance.
- Restored :py:class:`~aiohttp.resolver.AsyncResolver` to be the default resolver.
To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 pkgsrc/www/py-aiohttp/Makefile
cvs rdiff -u -r1.61 -r1.62 pkgsrc/www/py-aiohttp/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/py-aiohttp/Makefile
diff -u pkgsrc/www/py-aiohttp/Makefile:1.66 pkgsrc/www/py-aiohttp/Makefile:1.67
--- pkgsrc/www/py-aiohttp/Makefile:1.66 Wed Apr 17 14:54:22 2024
+++ pkgsrc/www/py-aiohttp/Makefile Wed Jul 31 09:03:55 2024
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.66 2024/04/17 14:54:22 adam Exp $
+# $NetBSD: Makefile,v 1.67 2024/07/31 09:03:55 adam Exp $
-DISTNAME= aiohttp-3.9.5
+DISTNAME= aiohttp-3.10.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= www python
MASTER_SITES= ${MASTER_SITE_PYPI:=a/aiohttp/}
@@ -13,33 +13,32 @@ LICENSE= apache-2.0
TOOL_DEPENDS+= ${PYPKGPREFIX}-cython-[0-9]*:../../devel/py-cython
TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=46.4.0:../../devel/py-setuptools
TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
-DEPENDS+= ${PYPKGPREFIX}-attrs>=17.3.0:../../devel/py-attrs
+DEPENDS+= ${PYPKGPREFIX}-aiohappyeyeballs>=2.3.0:../../net/py-aiohappyeyeballs
DEPENDS+= ${PYPKGPREFIX}-aiosignal>=1.1.2:../../devel/py-aiosignal
+DEPENDS+= ${PYPKGPREFIX}-attrs>=17.3.0:../../devel/py-attrs
DEPENDS+= ${PYPKGPREFIX}-frozenlist>=1.1.1:../../devel/py-frozenlist
-DEPENDS+= ${PYPKGPREFIX}-multidict>=4.5<7.0:../../databases/py-multidict
-DEPENDS+= ${PYPKGPREFIX}-yarl>=1.0<2.0:../../www/py-yarl
+DEPENDS+= ${PYPKGPREFIX}-multidict>=4.5:../../databases/py-multidict
+DEPENDS+= ${PYPKGPREFIX}-yarl>=1.0:../../www/py-yarl
TEST_DEPENDS+= ${PYPKGPREFIX}-brotli-[0-9]*:../../archivers/py-brotli
TEST_DEPENDS+= ${PYPKGPREFIX}-freezegun-[0-9]*:../../devel/py-freezegun
TEST_DEPENDS+= ${PYPKGPREFIX}-gunicorn-[0-9]*:../../www/py-gunicorn
+TEST_DEPENDS+= ${PYPKGPREFIX}-re-assert-[0-9]*:../../devel/py-re-assert
TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov-[0-9]*:../../devel/py-test-cov
TEST_DEPENDS+= ${PYPKGPREFIX}-test-timeout-[0-9]*:../../devel/py-test-timeout
TEST_DEPENDS+= ${PYPKGPREFIX}-test-xdist-[0-9]*:../../devel/py-test-xdist
PYTHON_VERSIONS_INCOMPATIBLE= 27
-# need to package: re-assert, python-on-whales, proxy (!?)
-# leads to, as of 3.9.0:
-# 8 failed, 2112 passed, 31 skipped, 3 deselected, 26 xfailed, 35 errors
-pre-test:
- cd ${WRKSRC} && ${RM} -f tests/test_client_session.py tests/test_proxy_functional.py \
- tests/test_streams.py tests/test_urldispatch.py tests/test_web_response.py \
- tests/autobahn/test_autobahn.py
-
.include "../../lang/python/pyversion.mk"
-
.if ${PYTHON_VERSION} < 311
DEPENDS+= ${PYPKGPREFIX}-async-timeout>=4.0.0:../../devel/py-async-timeout
.endif
.include "../../lang/python/wheel.mk"
+# need to package: proxy (!?)
+# leads to, as of 3.10.0:
+# 5 failed, 3107 passed, 21 skipped, 6 deselected, 33 xfailed, 37 errors
+pre-test:
+ cd ${WRKSRC} && ${RM} -f tests/test_proxy_functional.py tests/autobahn/test_autobahn.py
+
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/py-aiohttp/distinfo
diff -u pkgsrc/www/py-aiohttp/distinfo:1.61 pkgsrc/www/py-aiohttp/distinfo:1.62
--- pkgsrc/www/py-aiohttp/distinfo:1.61 Wed Apr 17 14:54:22 2024
+++ pkgsrc/www/py-aiohttp/distinfo Wed Jul 31 09:03:55 2024
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.61 2024/04/17 14:54:22 adam Exp $
+$NetBSD: distinfo,v 1.62 2024/07/31 09:03:55 adam Exp $
-BLAKE2s (aiohttp-3.9.5.tar.gz) = a2e7ae0d3e965821fc363ae1103b56eb8aa2ee338f06ba408e15dcade38abf4b
-SHA512 (aiohttp-3.9.5.tar.gz) = da11468a2f131275593395b052700a99cf79055a32d48327dca0f58547ad30add8cd0a375dbd831e2f06fe7a739183251e4ad69c16f3d141799bbed45a8a5dc4
-Size (aiohttp-3.9.5.tar.gz) = 7504841 bytes
+BLAKE2s (aiohttp-3.10.0.tar.gz) = 9827911967a9de3b26749c6dda26aaeae965a120fcca012cda73b1ce0db7258f
+SHA512 (aiohttp-3.10.0.tar.gz) = 69c8eaed5738c11ea994b64dcf75cbc5950b1cc4705ac40df80ad3311dceb1d25c15019527e32e9345a4677882e103a7c25dedc0dc99d874102a73771d6cfde9
+Size (aiohttp-3.10.0.tar.gz) = 7517100 bytes
Home |
Main Index |
Thread Index |
Old Index