From f77cc90ae63b07edcf2aabf3020a84efcfac3b9e Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@private.storage>
Date: Mon, 13 Feb 2023 13:57:18 +0000
Subject: [PATCH] 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.
---
 tools/update-nixpkgs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/update-nixpkgs b/tools/update-nixpkgs
index 12752892..58dedd9c 100755
--- a/tools/update-nixpkgs
+++ b/tools/update-nixpkgs
@@ -10,7 +10,7 @@ from ps_tools import get_url_hash
 # We pass this to builtins.fetchTarball which only supports 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"
 
 
@@ -24,9 +24,8 @@ def get_nixos_channel_url(*, channel):
     the release.
     """
     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
     return str(response.next_request.url)
 
-- 
GitLab