Received: from mail.netlandish.com (mail.netlandish.com [174.136.98.166]) by code.netlandish.com (Postfix) with ESMTP id 035B081940 for <~petersanchez/public-inbox@lists.code.netlandish.com>; Fri, 22 Sep 2023 13:47:10 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.53; helo=mail-wr1-f53.google.com; envelope-from=sarahvboyce95@gmail.com; receiver= Authentication-Results: mail.netlandish.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=E9khMzIa Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mail.netlandish.com (Postfix) with ESMTP id 5027E152FC8 for <~petersanchez/public-inbox@lists.code.netlandish.com>; Fri, 22 Sep 2023 13:47:07 +0000 (UTC) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3215f19a13aso2088333f8f.3 for <~petersanchez/public-inbox@lists.code.netlandish.com>; Fri, 22 Sep 2023 06:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695390426; x=1695995226; darn=lists.code.netlandish.com; h=to:from:date:user-agent:message-id:subject :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Bc/JjIBJfUdvt25cxxPCchneOqDhQpqYbXRE9UTSt9o=; b=E9khMzIagRiu/Zs//EJrrL9aRrbO0H7wWkAzwfe6mshTrBy4CB9/zxzMlW84CYXlBi vvrElmY6Pn/ND6Ig4CZD5ahvfWKkjqGDHx7XytBsmDUpFYZVc/3hf2zxJEhiNShvNua8 ZnK2EksDrPDykhEvCluTNnZ2x5a9TKXDurRvekpTWTYX7Ee9T9seilBnJg3wZyMV1Rh4 0krhRLrILjMmApSVUueSzYudEbzOCONDarYfWeDrHBMWs/yLao6rp39azzNnx43Qo16a jp6lImQJ6u0Go/SjR1UrhWKrNQLBULe0ReNStqQTf2yLiLk8nzGYBIoWddcqawJUAiA0 9vYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695390426; x=1695995226; h=to:from:date:user-agent:message-id:subject :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Bc/JjIBJfUdvt25cxxPCchneOqDhQpqYbXRE9UTSt9o=; b=wbaNTxHuUzFof7ZPvTRtPc9XMOZP2XUbgl6las0+c4gIe5RDmjmvZ740G8P75FS6EW 0GFDFBe3wR2RTrFYEKCtWcEtzZpwbQ8Z1oFaxr5koi9blP3SSoa0UomT+JFv58e5X5hD SB2ltv6M6fxYoAQYfS79VmpzXAYBZmLzupvETeZVaNZyHrtCjO/3eCOytbP+IUUjH1BP 0fdTh31BmoMzT+pKCvCObyi6V2wYfdLHcBaXMqSzJipRBwuLLfbunNYZIQbTZM7pSDHA FjbUyTF8eWtYRIa9j6oYMeGRN+FwtloZwaa+bqxQtsbC49/ECQ3xK5t0DQnpo1FXlALh WAkg== X-Gm-Message-State: AOJu0Yy8eUbsf626sb9lOe/Fimasg4EgakrCX9cis+5+Kg96vJNIIHpp 6rGuyDfcOlWxSrPCpa8Ak+ostI8odbOHzw== X-Google-Smtp-Source: AGHT+IHd9P+Wc6PJ2XXVEYoGBMJV3LibXgZYOuLjvsSdv6bt+k4HD81e9zcaeYMeGAyKmFpuuEHJGA== X-Received: by 2002:a5d:660f:0:b0:317:e515:d623 with SMTP id n15-20020a5d660f000000b00317e515d623mr7233636wru.60.1695390426310; Fri, 22 Sep 2023 06:47:06 -0700 (PDT) Received: from localhost.localdomain ([2a0a:a540:bef1:0:8a7e:9018:5c1e:5b06]) by smtp.gmail.com with ESMTPSA id z8-20020adfd0c8000000b00317a29af4b2sm4494084wrh.68.2023.09.22.06.47.05 for <~petersanchez/public-inbox@lists.code.netlandish.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:47:05 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: [PATCH django-impersonate] Removed usages of django.utils.timezone.utc for Django 5.0 support X-Mercurial-Node: c0672089c42607eda5f423483cdc79092c9d1efa X-Mercurial-Series-Index: 1 X-Mercurial-Series-Total: 1 Message-Id: X-Mercurial-Series-Id: User-Agent: Mercurial-patchbomb/6.2.3 Date: Fri, 22 Sep 2023 15:46:59 +0200 From: =?iso-8859-1?q?Sarah_Boyce?= To: ~petersanchez/public-inbox@lists.code.netlandish.com # HG changeset patch # User sarahboyce@localhost.localdomain # Date 1695390294 -7200 # Fri Sep 22 15:44:54 2023 +0200 # Node ID c0672089c42607eda5f423483cdc79092c9d1efa # Parent 76e93d43501e5304d6b27e7f7072e4d8aab15104 Removed usages of django.utils.timezone.utc for Django 5.0 support. diff --git a/impersonate/middleware.py b/impersonate/middleware.py --- a/impersonate/middleware.py +++ b/impersonate/middleware.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone from django.http import HttpResponseNotAllowed from django.shortcuts import redirect, reverse -from django.utils import timezone from django.utils.deprecation import MiddlewareMixin from django.utils.functional import SimpleLazyObject diff --git a/impersonate/views.py b/impersonate/views.py --- a/impersonate/views.py +++ b/impersonate/views.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- import logging -from datetime import datetime +from datetime import datetime, timezone from django.db.models import Q from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render -from django.utils import timezone from .decorators import allowed_user_required from .helpers import (