| Server IP : 82.208.35.60 / Your IP : 216.73.216.238 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/www/py-cherrypy/files/ |
Upload File : |
Remove contextlib2 and use contextlib from the standard library.
* Contextlib has been in the Python standard library since Python 3.2.
* Contextlib2 is a backport to Python 2 (and is supported through Python 3.7).
Obtained from: https://github.com/cherrypy/cherrypy/commit/2fc78dc9af3e
--- cherrypy/lib/sessions.py.orig 2021-04-22 13:06:39 UTC
+++ cherrypy/lib/sessions.py
@@ -109,7 +109,7 @@ import binascii
import six
from six.moves import cPickle as pickle
-import contextlib2
+import contextlib
import zc.lockfile
@@ -572,7 +572,7 @@ class FileSession(Session):
def release_lock(self, path=None):
"""Release the lock on the currently-loaded session data."""
self.lock.close()
- with contextlib2.suppress(FileNotFoundError):
+ with contextlib.suppress(FileNotFoundError):
os.remove(self.lock._path)
self.locked = False