From 2a92a5cd6b5c390a479c167d0079e153fae9ff12 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 24 Sep 2024 21:45:21 +0100 Subject: [PATCH 1/8] Bump version --- aiohttp/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py index 8830d340940..63367052646 100644 --- a/aiohttp/__init__.py +++ b/aiohttp/__init__.py @@ -1,4 +1,4 @@ -__version__ = "3.10.6" +__version__ = "3.10.6.dev0" from typing import TYPE_CHECKING, Tuple From 0b82655f873c7c3883dc66aa3bd5ead0636a2a46 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 24 Sep 2024 16:02:39 -0500 Subject: [PATCH 2/8] [PR #9083/a6dd415 backport][3.10] Remove unused backwards compatibility code for old yarl versions (#9289) --- aiohttp/client_reqrep.py | 11 ++--------- aiohttp/typedefs.py | 13 +------------ tests/test_client_functional.py | 26 +++++++------------------- 3 files changed, 10 insertions(+), 40 deletions(-) diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index aa8f54e67b8..aeabf0161b8 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -27,7 +27,7 @@ import attr from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy -from yarl import URL, __version__ as yarl_version +from yarl import URL from . import hdrs, helpers, http, multipart, payload from .abc import AbstractStreamWriter @@ -89,7 +89,6 @@ _CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]") -_YARL_SUPPORTS_EXTEND_QUERY = tuple(map(int, yarl_version.split(".")[:2])) >= (1, 11) json_re = re.compile(r"^application/(?:[\w.+-]+?\+)?json") @@ -303,13 +302,7 @@ def __init__( # assert session is not None self._session = cast("ClientSession", session) if params: - if _YARL_SUPPORTS_EXTEND_QUERY: - url = url.extend_query(params) - else: - q = MultiDict(url.query) - url2 = url.with_query(params) - q.extend(url2.query) - url = url.with_query(q) + url = url.extend_query(params) self.original_url = url self.url = url.with_fragment(None) self.method = method.upper() diff --git a/aiohttp/typedefs.py b/aiohttp/typedefs.py index 2e285fa2561..cc8c0825b4e 100644 --- a/aiohttp/typedefs.py +++ b/aiohttp/typedefs.py @@ -8,23 +8,12 @@ Iterable, Mapping, Protocol, - Sequence, Tuple, Union, ) from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy, istr -from yarl import URL - -try: - # Available in yarl>=1.10.0 - from yarl import Query as _Query -except ImportError: # pragma: no cover - SimpleQuery = Union[str, int, float] # pragma: no cover - QueryVariable = Union[SimpleQuery, "Sequence[SimpleQuery]"] # pragma: no cover - _Query = Union[ # type: ignore[misc] # pragma: no cover - None, str, "Mapping[str, QueryVariable]", "Sequence[Tuple[str, QueryVariable]]" - ] +from yarl import URL, Query as _Query Query = _Query diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py index 60af4930f14..f1b9c89ff97 100644 --- a/tests/test_client_functional.py +++ b/tests/test_client_functional.py @@ -20,7 +20,7 @@ from yarl import URL import aiohttp -from aiohttp import Fingerprint, ServerFingerprintMismatch, client_reqrep, hdrs, web +from aiohttp import Fingerprint, ServerFingerprintMismatch, hdrs, web from aiohttp.abc import AbstractResolver from aiohttp.client_exceptions import ( ClientResponseError, @@ -676,10 +676,7 @@ async def handler(request): assert 200 == resp.status -@pytest.mark.parametrize("yarl_supports_extend_query", [True, False]) -async def test_params_and_query_string( - aiohttp_client: AiohttpClient, yarl_supports_extend_query: bool -) -> None: +async def test_params_and_query_string(aiohttp_client: AiohttpClient) -> None: """Test combining params with an existing query_string.""" async def handler(request: web.Request) -> web.Response: @@ -690,18 +687,13 @@ async def handler(request: web.Request) -> web.Response: app.router.add_route("GET", "/", handler) client = await aiohttp_client(app) - # Ensure the old path is tested for old yarl versions - with mock.patch.object( - client_reqrep, "_YARL_SUPPORTS_EXTEND_QUERY", yarl_supports_extend_query - ): - async with client.get("/?q=abc", params="q=test&d=dog") as resp: - assert resp.status == 200 + async with client.get("/?q=abc", params="q=test&d=dog") as resp: + assert resp.status == 200 @pytest.mark.parametrize("params", [None, "", {}, MultiDict()]) -@pytest.mark.parametrize("yarl_supports_extend_query", [True, False]) async def test_empty_params_and_query_string( - aiohttp_client: AiohttpClient, params: Any, yarl_supports_extend_query: bool + aiohttp_client: AiohttpClient, params: Any ) -> None: """Test combining empty params with an existing query_string.""" @@ -713,12 +705,8 @@ async def handler(request: web.Request) -> web.Response: app.router.add_route("GET", "/", handler) client = await aiohttp_client(app) - # Ensure the old path is tested for old yarl versions - with mock.patch.object( - client_reqrep, "_YARL_SUPPORTS_EXTEND_QUERY", yarl_supports_extend_query - ): - async with client.get("/?q=abc", params=params) as resp: - assert resp.status == 200 + async with client.get("/?q=abc", params=params) as resp: + assert resp.status == 200 async def test_drop_params_on_redirect(aiohttp_client: AiohttpClient) -> None: From e6bcfbe302806558d3d6d08e411a1f9f3187dcac Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:18:12 +0000 Subject: [PATCH 3/8] [PR #9171/0462ae6b backport][3.10] Switch to using `yarl.URL.absolute` over `yarl.URL.is_absolute()` (#9291) Co-authored-by: J. Nick Koston --- CHANGES/9171.misc.rst | 3 +++ aiohttp/client.py | 2 +- aiohttp/test_utils.py | 2 +- aiohttp/web_request.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 CHANGES/9171.misc.rst diff --git a/CHANGES/9171.misc.rst b/CHANGES/9171.misc.rst new file mode 100644 index 00000000000..c6742edd891 --- /dev/null +++ b/CHANGES/9171.misc.rst @@ -0,0 +1,3 @@ +Improved performance of determining if a URL is absolute -- by :user:`bdraco`. + +The property :attr:`~yarl.URL.absolute` is more performant than the method ``URL.is_absolute()`` and preferred when newer versions of yarl are used. diff --git a/aiohttp/client.py b/aiohttp/client.py index da89ee2a790..e50d216cf5a 100644 --- a/aiohttp/client.py +++ b/aiohttp/client.py @@ -444,7 +444,7 @@ def _build_url(self, str_or_url: StrOrURL) -> URL: if self._base_url is None: return url else: - assert not url.is_absolute() and url.path.startswith("/") + assert not url.absolute and url.path.startswith("/") return self._base_url.join(url) async def _request( diff --git a/aiohttp/test_utils.py b/aiohttp/test_utils.py index 01496b6711a..850efcb8b65 100644 --- a/aiohttp/test_utils.py +++ b/aiohttp/test_utils.py @@ -148,7 +148,7 @@ def make_url(self, path: StrOrURL) -> URL: assert self._root is not None url = URL(path) if not self.skip_url_asserts: - assert not url.is_absolute() + assert not url.absolute return self._root.join(url) else: return URL(str(self._root) + str(path)) diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py index eca71e4413a..91fc1f42bfe 100644 --- a/aiohttp/web_request.py +++ b/aiohttp/web_request.py @@ -174,7 +174,7 @@ def __init__( self._version = message.version self._cache: Dict[str, Any] = {} url = message.url - if url.is_absolute(): + if url.absolute: if scheme is not None: url = url.with_scheme(scheme) if host is not None: From d6d2bcc2ba6dc2d8933b89365dfbbfc22f259ca9 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:38:22 +0100 Subject: [PATCH 4/8] [PR #9294/552dea53 backport][3.10] Backport type fix from #9226 (#9299) **This is a backport of PR #9294 as merged into 3.11 (552dea531d06d9388ce7e110a52960c515228b16).** Co-authored-by: Sam Bull --- aiohttp/web_ws.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aiohttp/web_ws.py b/aiohttp/web_ws.py index 382223097ea..bf35f3bb1f6 100644 --- a/aiohttp/web_ws.py +++ b/aiohttp/web_ws.py @@ -379,14 +379,14 @@ async def pong(self, message: bytes = b"") -> None: raise RuntimeError("Call .prepare() first") await self._writer.pong(message) - async def send_str(self, data: str, compress: Optional[bool] = None) -> None: + async def send_str(self, data: str, compress: Optional[int] = None) -> None: if self._writer is None: raise RuntimeError("Call .prepare() first") if not isinstance(data, str): raise TypeError("data argument must be str (%r)" % type(data)) await self._writer.send(data, binary=False, compress=compress) - async def send_bytes(self, data: bytes, compress: Optional[bool] = None) -> None: + async def send_bytes(self, data: bytes, compress: Optional[int] = None) -> None: if self._writer is None: raise RuntimeError("Call .prepare() first") if not isinstance(data, (bytes, bytearray, memoryview)): @@ -396,7 +396,7 @@ async def send_bytes(self, data: bytes, compress: Optional[bool] = None) -> None async def send_json( self, data: Any, - compress: Optional[bool] = None, + compress: Optional[int] = None, *, dumps: JSONEncoder = json.dumps, ) -> None: From fd5ece6dfd5f68d02144280813aa44005431e271 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 26 Sep 2024 21:23:09 -0500 Subject: [PATCH 5/8] Bump yarl to 1.13.0 (#9302) (#9304) --- requirements/base.txt | 2 +- requirements/constraints.txt | 2 +- requirements/dev.txt | 2 +- requirements/runtime-deps.txt | 2 +- requirements/test.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 6359f4d60c7..e089d2bd2c1 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -38,5 +38,5 @@ pycparser==2.21 # via cffi uvloop==0.21.0b1 ; platform_system != "Windows" and implementation_name == "cpython" # via -r requirements/base.in -yarl==1.12.0 +yarl==1.13.0 # via -r requirements/runtime-deps.in diff --git a/requirements/constraints.txt b/requirements/constraints.txt index b9a6c80e86f..30356d04664 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -274,7 +274,7 @@ webcolors==1.11.1 # via blockdiag wheel==0.37.0 # via pip-tools -yarl==1.12.0 +yarl==1.13.0 # via -r requirements/runtime-deps.in zipp==3.17.0 # via diff --git a/requirements/dev.txt b/requirements/dev.txt index 92ec10aa4c1..8aeea4ee844 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -261,7 +261,7 @@ webcolors==1.13 # via blockdiag wheel==0.41.0 # via pip-tools -yarl==1.12.0 +yarl==1.13.0 # via -r requirements/runtime-deps.in zipp==3.17.0 # via diff --git a/requirements/runtime-deps.txt b/requirements/runtime-deps.txt index b7a3828955e..a70b633b88c 100644 --- a/requirements/runtime-deps.txt +++ b/requirements/runtime-deps.txt @@ -32,5 +32,5 @@ pycares==4.3.0 # via aiodns pycparser==2.21 # via cffi -yarl==1.12.0 +yarl==1.13.0 # via -r requirements/runtime-deps.in diff --git a/requirements/test.txt b/requirements/test.txt index 9900af5bd19..8be1e493f2d 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -125,5 +125,5 @@ uvloop==0.21.0b1 ; platform_system != "Windows" and implementation_name == "cpyt # via -r requirements/base.in wait-for-it==2.2.2 # via -r requirements/test.in -yarl==1.12.0 +yarl==1.13.0 # via -r requirements/runtime-deps.in From d32d5805e39fa8b75f7a688788de5b73b6ce0077 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 27 Sep 2024 12:41:34 -0500 Subject: [PATCH 6/8] [PR #9301/c240b52 backport][3.10] Replace code that can now be handled by yarl (#9314) --- CHANGES/9301.misc.rst | 1 + aiohttp/client_reqrep.py | 32 +++++++++++++++++++++----------- tests/test_client_request.py | 15 +++++++++++---- tests/test_proxy_functional.py | 24 ++++++++++++++++-------- 4 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 CHANGES/9301.misc.rst diff --git a/CHANGES/9301.misc.rst b/CHANGES/9301.misc.rst new file mode 100644 index 00000000000..a751bdfc6dc --- /dev/null +++ b/CHANGES/9301.misc.rst @@ -0,0 +1 @@ +Replaced code that can now be handled by ``yarl`` -- by :user:`bdraco`. diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index aeabf0161b8..10682f57885 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -27,7 +27,7 @@ import attr from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy -from yarl import URL +from yarl import URL, __version__ as yarl_version from . import hdrs, helpers, http, multipart, payload from .abc import AbstractStreamWriter @@ -90,6 +90,10 @@ _CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]") json_re = re.compile(r"^application/(?:[\w.+-]+?\+)?json") +_YARL_SUPPORTS_HOST_SUBCOMPONENT = tuple(map(int, yarl_version.split(".")[:2])) >= ( + 1, + 13, +) def _gen_default_accept_encoding() -> str: @@ -429,9 +433,13 @@ def update_headers(self, headers: Optional[LooseHeaders]) -> None: self.headers: CIMultiDict[str] = CIMultiDict() # add host - netloc = cast(str, self.url.raw_host) - if helpers.is_ipv6_address(netloc): - netloc = f"[{netloc}]" + if _YARL_SUPPORTS_HOST_SUBCOMPONENT: + netloc = self.url.host_subcomponent + assert netloc is not None + else: + netloc = cast(str, self.url.raw_host) + if helpers.is_ipv6_address(netloc): + netloc = f"[{netloc}]" # See https://github.com/aio-libs/aiohttp/issues/3636. netloc = netloc.rstrip(".") if self.url.port is not None and not self.url.is_default_port(): @@ -676,17 +684,19 @@ async def send(self, conn: "Connection") -> "ClientResponse": # - not CONNECT proxy must send absolute form URI # - most common is origin form URI if self.method == hdrs.METH_CONNECT: - connect_host = self.url.raw_host - assert connect_host is not None - if helpers.is_ipv6_address(connect_host): - connect_host = f"[{connect_host}]" + if _YARL_SUPPORTS_HOST_SUBCOMPONENT: + connect_host = self.url.host_subcomponent + assert connect_host is not None + else: + connect_host = self.url.raw_host + assert connect_host is not None + if helpers.is_ipv6_address(connect_host): + connect_host = f"[{connect_host}]" path = f"{connect_host}:{self.url.port}" elif self.proxy and not self.is_ssl(): path = str(self.url) else: - path = self.url.raw_path - if self.url.raw_query_string: - path += "?" + self.url.raw_query_string + path = self.url.raw_path_qs protocol = conn.protocol assert protocol is not None diff --git a/tests/test_client_request.py b/tests/test_client_request.py index f2eff019504..7853b541fc9 100644 --- a/tests/test_client_request.py +++ b/tests/test_client_request.py @@ -14,7 +14,7 @@ from yarl import URL import aiohttp -from aiohttp import BaseConnector, hdrs, helpers, payload +from aiohttp import BaseConnector, client_reqrep, hdrs, helpers, payload from aiohttp.client_exceptions import ClientConnectionError from aiohttp.client_reqrep import ( ClientRequest, @@ -280,9 +280,16 @@ def test_host_header_ipv4(make_request) -> None: assert req.headers["HOST"] == "127.0.0.2" -def test_host_header_ipv6(make_request) -> None: - req = make_request("get", "http://[::2]") - assert req.headers["HOST"] == "[::2]" +@pytest.mark.parametrize("yarl_supports_host_subcomponent", [True, False]) +def test_host_header_ipv6(make_request, yarl_supports_host_subcomponent: bool) -> None: + # Ensure the old path is tested for old yarl versions + with mock.patch.object( + client_reqrep, + "_YARL_SUPPORTS_HOST_SUBCOMPONENT", + yarl_supports_host_subcomponent, + ): + req = make_request("get", "http://[::2]") + assert req.headers["HOST"] == "[::2]" def test_host_header_ipv4_with_port(make_request) -> None: diff --git a/tests/test_proxy_functional.py b/tests/test_proxy_functional.py index c15ca326288..4b11d11e3a7 100644 --- a/tests/test_proxy_functional.py +++ b/tests/test_proxy_functional.py @@ -12,7 +12,7 @@ from yarl import URL import aiohttp -from aiohttp import web +from aiohttp import client_reqrep, web from aiohttp.client_exceptions import ClientConnectionError from aiohttp.helpers import IS_MACOS, IS_WINDOWS @@ -95,6 +95,7 @@ async def handler(*args, **kwargs): reason="asyncio on this python does not support TLS in TLS", ) @pytest.mark.parametrize("web_server_endpoint_type", ("http", "https")) +@pytest.mark.parametrize("yarl_supports_host_subcomponent", [True, False]) @pytest.mark.filterwarnings(r"ignore:.*ssl.OP_NO_SSL*") # Filter out the warning from # https://github.com/abhinavsingh/proxy.py/blob/30574fd0414005dfa8792a6e797023e862bdcf43/proxy/common/utils.py#L226 @@ -104,18 +105,25 @@ async def test_secure_https_proxy_absolute_path( secure_proxy_url: URL, web_server_endpoint_url: str, web_server_endpoint_payload: str, + yarl_supports_host_subcomponent: bool, ) -> None: """Ensure HTTP(S) sites are accessible through a secure proxy.""" conn = aiohttp.TCPConnector() sess = aiohttp.ClientSession(connector=conn) - async with sess.get( - web_server_endpoint_url, - proxy=secure_proxy_url, - ssl=client_ssl_ctx, # used for both proxy and endpoint connections - ) as response: - assert response.status == 200 - assert await response.text() == web_server_endpoint_payload + # Ensure the old path is tested for old yarl versions + with mock.patch.object( + client_reqrep, + "_YARL_SUPPORTS_HOST_SUBCOMPONENT", + yarl_supports_host_subcomponent, + ): + async with sess.get( + web_server_endpoint_url, + proxy=secure_proxy_url, + ssl=client_ssl_ctx, # used for both proxy and endpoint connections + ) as response: + assert response.status == 200 + assert await response.text() == web_server_endpoint_payload await sess.close() await conn.close() From 8220ced9f7515901cbf0976fb48ed867ff541241 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 19:15:12 +0000 Subject: [PATCH 7/8] [PR #9309/e4028333 backport][3.10] Fix building the URL in BaseRequest when the host contains a port or IPv6 address (#9318) Co-authored-by: J. Nick Koston fixes #9307 --- CHANGES/9309.bugfix.rst | 1 + aiohttp/web_request.py | 10 ++++++++-- tests/test_web_request.py | 10 ++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 CHANGES/9309.bugfix.rst diff --git a/CHANGES/9309.bugfix.rst b/CHANGES/9309.bugfix.rst new file mode 100644 index 00000000000..73870da1938 --- /dev/null +++ b/CHANGES/9309.bugfix.rst @@ -0,0 +1 @@ +Fixed assembling the :class:`~yarl.URL` for web requests when the host contains a non-default port or IPv6 address -- by :user:`bdraco`. diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py index 91fc1f42bfe..62a08ea248b 100644 --- a/aiohttp/web_request.py +++ b/aiohttp/web_request.py @@ -431,6 +431,10 @@ def host(self) -> str: - overridden value by .clone(host=new_host) call. - HOST HTTP header - socket.getfqdn() value + + For example, 'example.com' or 'localhost:8080'. + + For historical reasons, the port number may be included. """ host = self._message.headers.get(hdrs.HOST) if host is not None: @@ -454,8 +458,10 @@ def remote(self) -> Optional[str]: @reify def url(self) -> URL: - url = URL.build(scheme=self.scheme, host=self.host) - return url.join(self._rel_url) + """The full URL of the request.""" + # authority is used here because it may include the port number + # and we want yarl to parse it correctly + return URL.build(scheme=self.scheme, authority=self.host).join(self._rel_url) @reify def path(self) -> str: diff --git a/tests/test_web_request.py b/tests/test_web_request.py index ba12d6f54e7..9e613bb6613 100644 --- a/tests/test_web_request.py +++ b/tests/test_web_request.py @@ -526,6 +526,16 @@ def test_url_url() -> None: assert URL("http://example.com/path") == req.url +def test_url_non_default_port() -> None: + req = make_mocked_request("GET", "/path", headers={"HOST": "example.com:8123"}) + assert req.url == URL("http://example.com:8123/path") + + +def test_url_ipv6() -> None: + req = make_mocked_request("GET", "/path", headers={"HOST": "[::1]:8123"}) + assert req.url == URL("http://[::1]:8123/path") + + def test_clone() -> None: req = make_mocked_request("GET", "/path") req2 = req.clone() From f9a9e853802a26a9bdef4cfe4ac2328b6ab21190 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 27 Sep 2024 14:48:37 -0500 Subject: [PATCH 8/8] Release 3.10.7 (#9320) --- CHANGES.rst | 40 ++++++++++++++++++++++++++++++++++++++++ CHANGES/9171.misc.rst | 3 --- CHANGES/9301.misc.rst | 1 - CHANGES/9309.bugfix.rst | 1 - aiohttp/__init__.py | 2 +- 5 files changed, 41 insertions(+), 6 deletions(-) delete mode 100644 CHANGES/9171.misc.rst delete mode 100644 CHANGES/9301.misc.rst delete mode 100644 CHANGES/9309.bugfix.rst diff --git a/CHANGES.rst b/CHANGES.rst index f6010b9840a..443c62a184d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,46 @@ .. towncrier release notes start +3.10.7 (2024-09-27) +=================== + +Bug fixes +--------- + +- Fixed assembling the :class:`~yarl.URL` for web requests when the host contains a non-default port or IPv6 address -- by :user:`bdraco`. + + + *Related issues and pull requests on GitHub:* + :issue:`9309`. + + + + +Miscellaneous internal changes +------------------------------ + +- Improved performance of determining if a URL is absolute -- by :user:`bdraco`. + + The property :attr:`~yarl.URL.absolute` is more performant than the method ``URL.is_absolute()`` and preferred when newer versions of yarl are used. + + + *Related issues and pull requests on GitHub:* + :issue:`9171`. + + + +- Replaced code that can now be handled by ``yarl`` -- by :user:`bdraco`. + + + *Related issues and pull requests on GitHub:* + :issue:`9301`. + + + + +---- + + 3.10.6 (2024-09-24) =================== diff --git a/CHANGES/9171.misc.rst b/CHANGES/9171.misc.rst deleted file mode 100644 index c6742edd891..00000000000 --- a/CHANGES/9171.misc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Improved performance of determining if a URL is absolute -- by :user:`bdraco`. - -The property :attr:`~yarl.URL.absolute` is more performant than the method ``URL.is_absolute()`` and preferred when newer versions of yarl are used. diff --git a/CHANGES/9301.misc.rst b/CHANGES/9301.misc.rst deleted file mode 100644 index a751bdfc6dc..00000000000 --- a/CHANGES/9301.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Replaced code that can now be handled by ``yarl`` -- by :user:`bdraco`. diff --git a/CHANGES/9309.bugfix.rst b/CHANGES/9309.bugfix.rst deleted file mode 100644 index 73870da1938..00000000000 --- a/CHANGES/9309.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed assembling the :class:`~yarl.URL` for web requests when the host contains a non-default port or IPv6 address -- by :user:`bdraco`. diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py index 63367052646..cd3834cd3ff 100644 --- a/aiohttp/__init__.py +++ b/aiohttp/__init__.py @@ -1,4 +1,4 @@ -__version__ = "3.10.6.dev0" +__version__ = "3.10.7" from typing import TYPE_CHECKING, Tuple