From 1a1551b0ab2add91d4a6428a390d18d7dc9618d9 Mon Sep 17 00:00:00 2001 From: Gert Burger Date: Thu, 11 Apr 2024 09:38:28 +0100 Subject: [PATCH] Use `lru_cache` instead of `cache` for python < 3.9 compat --- djangosaml2/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djangosaml2/utils.py b/djangosaml2/utils.py index 08fe96d8..3299da86 100644 --- a/djangosaml2/utils.py +++ b/djangosaml2/utils.py @@ -16,7 +16,7 @@ import re import urllib import zlib -from functools import cache, wraps +from functools import lru_cache, wraps from typing import Optional from django.conf import settings @@ -210,7 +210,7 @@ def add_idp_hinting(request, http_response) -> bool: return False -@cache +@lru_cache() def get_csp_handler(): """Returns a view decorator for CSP."""