1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/py3-secure-cookie/werkzeug-2-0-compattible.patch
Kevin Daudt 6374ece94b community/py3-secure-cookie: fix compatibility with werkzeug 2.0
- werkzeug.posixrename has been removed, use os.rename instead.
- don't fail tests on deprecation warnings (safe_str_cmp)

See alpine/aports#12699
2021-05-25 05:50:39 +00:00

33 lines
919 B
Diff

diff --git a/setup.cfg b/setup.cfg
index fd793c9..13f2695 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -43,6 +43,7 @@ universal = true
testpaths = tests
filterwarnings =
error
+ ignore::DeprecationWarning
[coverage:run]
branch = True
diff --git a/src/secure_cookie/session.py b/src/secure_cookie/session.py
index e157d5f..a6715a4 100644
--- a/src/secure_cookie/session.py
+++ b/src/secure_cookie/session.py
@@ -87,7 +87,7 @@ import pickle
import re
import tempfile
from hashlib import sha1
-from os import path
+from os import path, rename
from random import random
from time import time
@@ -95,7 +95,6 @@ from werkzeug.datastructures import CallbackDict
from werkzeug.filesystem import get_filesystem_encoding
from werkzeug.http import dump_cookie
from werkzeug.http import parse_cookie
-from werkzeug.posixemulation import rename
from werkzeug.wsgi import ClosingIterator
from ._compat import PY2