summaryrefslogtreecommitdiff
path: root/tests/test_lock.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-08-06 15:15:02 -0700
committerGitHub <noreply@github.com>2020-08-06 15:15:02 -0700
commit8c5a41baf0bd2a1388d601e5b49d06b91997ccb8 (patch)
tree89cad14d95927f8ea696706c2b1399dde17fa244 /tests/test_lock.py
parentc6f13c3b69d32257ab75ba9d824e5b555f91572c (diff)
downloadredis-py-8c5a41baf0bd2a1388d601e5b49d06b91997ccb8.tar.gz
Remove support for end-of-life Python 2.7 (#1318)
Remove support for end-of-life Python 2.7 Python 2.7 is end of life. It is no longer receiving bug fixes, including for security issues. Python 2.7 went EOL on 2020-01-01. For additional details on support Python versions, see: Supported: https://devguide.python.org/#status-of-python-branches EOL: https://devguide.python.org/devcycle/#end-of-life-branches Removing support for EOL Pythons will reduce testing and maintenance resources while allowing the library to move towards a modern Python 3 style. Python 2.7 users can continue to use the previous version of redis-py. Was able to simplify the code: - Removed redis._compat module - Removed __future__ imports - Removed object from class definition (all classes are new style) - Removed long (Python 3 unified numeric types) - Removed deprecated __nonzero__ method - Use simpler Python 3 super() syntax - Use unified OSError exception - Use yield from syntax Co-authored-by: Andy McCurdy <andy@andymccurdy.com>
Diffstat (limited to 'tests/test_lock.py')
-rw-r--r--tests/test_lock.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_lock.py b/tests/test_lock.py
index e8bd874..8bb3c7e 100644
--- a/tests/test_lock.py
+++ b/tests/test_lock.py
@@ -7,7 +7,7 @@ from redis.lock import Lock
from .conftest import _get_client
-class TestLock(object):
+class TestLock:
@pytest.fixture()
def r_decoded(self, request):
return _get_client(Redis, request=request, decode_responses=True)
@@ -220,9 +220,9 @@ class TestLock(object):
lock.reacquire()
-class TestLockClassSelection(object):
+class TestLockClassSelection:
def test_lock_class_argument(self, r):
- class MyLock(object):
+ class MyLock:
def __init__(self, *args, **kwargs):
pass