diff options
author | lowercase00 <21188280+lowercase00@users.noreply.github.com> | 2023-01-26 03:04:17 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 13:04:17 +0700 |
commit | 6813e5a2bafda0328fcee8a1c24f084e465accc8 (patch) | |
tree | 50a7ff54fcb01e16a3b7687c428c0fdbedc58c80 /tests | |
parent | 3be814c6d878c76a459145ee6f5f50b50543e6e9 (diff) | |
download | rq-6813e5a2bafda0328fcee8a1c24f084e465accc8.tar.gz |
Remove compatibility layer for < 3.5 (#1761)
* Remove unused code from compat module
* Remove unused dictconfig
* Remove total_ordering compat layer
* Remove compatibility layer
This completely removes the compat module. It moves utilities
functions (`as_text` and `decode_redis_hash`) to the `utils`
module, is eliminates the use of the proxies `text_type` and
`string_types`, using the `str` construct directly.
* Remove compat module
Finishes the cleaning of the compatibility module.
The last function being the `is_python_version` function
which was being used internally.
* Fix old import
* Fix Imports
* Remove Dummy (Force GH Actions)
* Fix Imports
* Organize Imports
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fixtures.py | 3 | ||||
-rw-r--r-- | tests/test_job.py | 2 | ||||
-rw-r--r-- | tests/test_registry.py | 2 | ||||
-rw-r--r-- | tests/test_worker.py | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/tests/fixtures.py b/tests/fixtures.py index 7307091..e75fb68 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -14,7 +14,6 @@ from multiprocessing import Process from redis import Redis from rq import Connection, get_current_job, get_current_connection, Queue from rq.decorators import job -from rq.compat import text_type from rq.worker import HerokuWorker, Worker @@ -36,7 +35,7 @@ async def say_hello_async(name=None): def say_hello_unicode(name=None): """A job with a single argument and a return value.""" - return text_type(say_hello(name)) # noqa + return str(say_hello(name)) # noqa def do_nothing(): diff --git a/tests/test_job.py b/tests/test_job.py index 237c5ef..46fbe73 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -7,7 +7,7 @@ from datetime import datetime, timedelta from redis import WatchError -from rq.compat import as_text +from rq.utils import as_text from rq.exceptions import DeserializationError, InvalidJobOperation, NoSuchJobError from rq.job import Job, JobStatus, Dependency, cancel_job, get_current_job from rq.queue import Queue diff --git a/tests/test_registry.py b/tests/test_registry.py index d7b607f..28a29ca 100644 --- a/tests/test_registry.py +++ b/tests/test_registry.py @@ -1,7 +1,7 @@ from datetime import datetime, timedelta from rq.serializers import JSONSerializer -from rq.compat import as_text +from rq.utils import as_text from rq.defaults import DEFAULT_FAILURE_TTL from rq.exceptions import InvalidJobOperation from rq.job import Job, JobStatus, requeue_job diff --git a/tests/test_worker.py b/tests/test_worker.py index 6c7b405..1977c93 100644 --- a/tests/test_worker.py +++ b/tests/test_worker.py @@ -28,7 +28,7 @@ from tests.fixtures import ( ) from rq import Queue, SimpleWorker, Worker, get_current_connection -from rq.compat import as_text +from rq.utils import as_text from rq.job import Job, JobStatus, Retry from rq.registry import StartedJobRegistry, FailedJobRegistry, FinishedJobRegistry from rq.results import Result |