Skip to content

Commit 4208ba7

Browse files
authored
Allow use of Werkzeug 1.0.
Werkzeug 1.0 removed `werkzeug.contrib.cache` and advises replacing it with cachelib. See https://werkzeug.palletsprojects.com/en/0.15.x/transition/.
1 parent 66a29b8 commit 4208ba7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
license='Apache License, Version 2.0',
2525
packages=find_packages(),
2626
include_package_data=True,
27-
install_requires=['Werkzeug'],
27+
install_requires=['Werkzeug', 'cachelib'],
2828
extras_require={'python3-saml': saml_requires, 'test': tests_require}
2929
)

uw_saml2/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""UW-specific adapter for the python3-saml package."""
2-
import werkzeug.contrib.cache
2+
import cachelib
33
from .python3_saml import get_saml_authenticator
44
from .idp.uw import UwIdp
55
from .sp import Config, TWO_FACTOR_CONTEXT
@@ -8,7 +8,7 @@
88
logger = getLogger(__name__)
99

1010
# For distributed environments, inject a distributed cache.
11-
CACHE = werkzeug.contrib.cache.SimpleCache()
11+
CACHE = cachelib.SimpleCache()
1212

1313

1414
def login_redirect(entity_id=None, acs_url=None, return_to='/',

0 commit comments

Comments
 (0)