Received: from mail.netlandish.com (mail.netlandish.com [174.136.98.166])
	by code.netlandish.com (Postfix) with ESMTP id DC06F81982
	for <~petersanchez/public-inbox@lists.code.netlandish.com>; Tue, 10 Oct 2023 14:37:44 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.217.54; helo=mail-vs1-f54.google.com; envelope-from=peter@netlandish.com; receiver=<UNKNOWN> 
Authentication-Results: mail.netlandish.com;
	dkim=pass (1024-bit key; unprotected) header.d=netlandish.com header.i=@netlandish.com header.b=G9c4GpXw
Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54])
	by mail.netlandish.com (Postfix) with ESMTP id C1B51152E8A
	for <~petersanchez/public-inbox@lists.code.netlandish.com>; Tue, 10 Oct 2023 14:37:43 +0000 (UTC)
Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-452b0430cc5so2380377137.3
        for <~petersanchez/public-inbox@lists.code.netlandish.com>; Tue, 10 Oct 2023 07:37:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=netlandish.com; s=google; t=1696948662; x=1697553462; darn=lists.code.netlandish.com;
        h=in-reply-to:content-disposition:mime-version:references:message-id
         :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
        bh=D0LME/vJGUKjUkYstUx5rt90Gn3U/BvkDTCtum/PAaY=;
        b=G9c4GpXwbJOS1TcA/0AabuqFXUtnu8lD35L8vKtd/MvrSEtHdBf7eiCaNjSzAFY31w
         B8PXgvUQOb7xj3jIjOwDWIDQZjBW1y/2IMPODosFiuQoXheI6+RTHuF5MHGx42I+jj/q
         FfI1VJKX/vTRGGcogiIuuPDKRfqZBcqgqO5wk=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1696948662; x=1697553462;
        h=in-reply-to:content-disposition:mime-version:references:message-id
         :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to;
        bh=D0LME/vJGUKjUkYstUx5rt90Gn3U/BvkDTCtum/PAaY=;
        b=XfhEENAMHMLgNUMIdflCw012d+ekzCkkS8hISoOT7RE7c9l2te2hVqM+jsVxiE3xyA
         fz6B0u2K5L0nuECzFXxwA/BV3Ay7k9gQBvOdhelTQMGU9n8SzJXoFI7C8wF1epkn68xz
         dZf3DiRd5ghFSbzaz/xx2EgVhi9HwhnGl8YVep2fuRATLoDQu7a0jGrWNAWNHl46iWPf
         EY8n0JHUdZtN/edncNWSs0IlWdtwKYrnOmABU1UeiDlA8aZ6qPPe0iB7Xn5YQzVEBqwR
         uNuefFuOnXjaTATHxittAe3l+LKkaqGsKBCGbGe5ceds3EgNU37D1uqwHrRHHQfmaCap
         Twog==
X-Gm-Message-State: AOJu0Yyp6lxyslNiDoUETQvmfAvf+cIuBjLd5UiZKPDHveEK8fssnNsa
	3JXwNxV0uOHx3qe3N7RHiOovmLlh
X-Google-Smtp-Source: AGHT+IHzVfP/0brhHbPJYbQy92jACuDLRDe099nkjh3XhgyfHlZTnZ0SiZyJ1lk63A6mATizOh8Lqg==
X-Received: by 2002:a05:6102:3c7:b0:452:8422:1318 with SMTP id n7-20020a05610203c700b0045284221318mr16566696vsq.27.1696948662653;
        Tue, 10 Oct 2023 07:37:42 -0700 (PDT)
Received: from localhost ([186.77.207.217])
        by smtp.gmail.com with ESMTPSA id q3-20020ab04a03000000b0079b3282b5f5sm2249734uae.2.2023.10.10.07.37.41
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 10 Oct 2023 07:37:42 -0700 (PDT)
Date: Tue, 10 Oct 2023 08:37:40 -0600
From: Peter Sanchez <peter@netlandish.com>
To: Hugo Rodger-Brown <hugo@yunojuno.com>
Cc: ~petersanchez/public-inbox@lists.code.netlandish.com
Subject: Re: [PATCH django-impersonate] Add support for Django 5.0 (pre)
Message-ID: <20231010143740.eyuf2t7a6d3b7mw7@thinkpad.my.domain>
X-PGP-Key: https://petersanchez.com/publickey.txt
X-Sourcehut-Patchset-Update: NEEDS_REVISION
References: <4abfc208f5ac1289c52f.1687947872@C17FQ18CQ6L4>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <4abfc208f5ac1289c52f.1687947872@C17FQ18CQ6L4>

>diff --git a/impersonate/compat.py b/impersonate/compat.py
>new file mode 100644
>--- /dev/null
>+++ b/impersonate/compat.py
>@@ -0,0 +1,12 @@
>+try:
>+    from django.urls import reverse
>+except ImportError:
>+    from django.core.urlresolvers import reverse
>+
>+
>+# timezone.utc removed in Django 5
>+try:
>+    from django.utils.timezone import utc
>+except ImportError:
>+    from zoneinfo import ZoneInfo
>+    utc = ZoneInfo("UTC")

This doesn't actually define `timezone` which is imported in other
files. Am I missing something here? Tests can't possibly pass as it is
now.

PS, sorry for the delay in reviewing this.
