Skip to content
Snippets Groups Projects
Commit f77cc90a authored by Florian Sesser's avatar Florian Sesser
Browse files

update-nixpkgs: The httpx client changed its public interface

https://github.com/encode/httpx/blob/master/CHANGELOG.md
> The allow_redirects flag is now follow_redirects and defaults to False.

[...]

> The raise_for_status() method will now raise an exception for any responses
> except those with 2xx status codes. Previously only 4xx and 5xx status codes
> would result in an exception.
parent ccda2a07
No related branches found
No related tags found
2 merge requests!387Upgrade to NixOS 22.11,!384update production
...@@ -10,7 +10,7 @@ from ps_tools import get_url_hash ...@@ -10,7 +10,7 @@ from ps_tools import get_url_hash
# We pass this to builtins.fetchTarball which only supports sha256 # We pass this to builtins.fetchTarball which only supports sha256
HASH_TYPE = "sha256" HASH_TYPE = "sha256"
DEFAULT_CHANNEL = "nixos-21.11" DEFAULT_CHANNEL = "nixos-22.11"
CHANNEL_URL_TEMPLATE = "https://channels.nixos.org/{channel}/nixexprs.tar.xz" CHANNEL_URL_TEMPLATE = "https://channels.nixos.org/{channel}/nixexprs.tar.xz"
...@@ -24,9 +24,8 @@ def get_nixos_channel_url(*, channel): ...@@ -24,9 +24,8 @@ def get_nixos_channel_url(*, channel):
the release. the release.
""" """
response = httpx.head( response = httpx.head(
CHANNEL_URL_TEMPLATE.format(channel=channel), allow_redirects=False CHANNEL_URL_TEMPLATE.format(channel=channel), follow_redirects=False
) )
response.raise_for_status()
assert response.is_redirect assert response.is_redirect
return str(response.next_request.url) return str(response.next_request.url)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment