forked from pool/python-celery
* Update task.py get_custom_headers missing 'compression' key
* Basic ElasticSearch / ElasticClient 8.x Support
* Fix eager tasks does not populate name field
* Fix: serialization error when gossip working
* Stamping bugfix with group/chord header errback linking
* Fixed issue: Flags broker_connection_retry_on_startup &
broker_connection_retry aren’t reliable
* Use string value for CELERY_SKIP_CHECKS envvar
* Added initial support for python 3.11
* Fixed a small float value of retry_backoff
* Update CELERY_TASK_EAGER setting in user guide
* Fixed bug where retrying a task loses its stamps
* Warn when an unnamed periodic task override another one.
* Fix Task.handle_ignore not wrapping exceptions properly
* Align revoke and revoke_by_stamped_headers return values (terminate=True)
* Added signal triggered before fork
* Deprecate pytz and use zoneinfo
* recreate_module: set spec to the new module
* Do not recommend using easy_install anymore
* importlib_metadata remove deprecated entry point interfaces
* New control command revoke_by_stamped_headers
* Remove reference to old Python version
* Stamping a task left the task properties dirty
* Bugfix for nested group stamping on task replace
* Add broker_channel_error_retry option
* async chords should pass it's kwargs to the group/body.
* Fix honor Django's TIME_ZONE setting.
* Remove Python 3.4 compatibility code.
* Use importlib instead of deprecated pkg_resources.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-celery?expand=0&rev=156
73 lines
2.0 KiB
Diff
73 lines
2.0 KiB
Diff
commit 8ebab3d94de46dc7074ffade0aec50d739d36e26
|
|
Author: Steve Kowalik <steven@wedontsleep.org>
|
|
Date: Fri Feb 9 11:58:01 2024 +1100
|
|
|
|
Support moto 5.0
|
|
|
|
moto 5.0 has been released, and the major change is to pull all of the
|
|
seperate mock calls into one -- mock_aws. Continue to support moto 4,
|
|
since it's easy to do so.
|
|
|
|
Index: celery-5.3.6/t/unit/backends/test_s3.py
|
|
===================================================================
|
|
--- celery-5.3.6.orig/t/unit/backends/test_s3.py
|
|
+++ celery-5.3.6/t/unit/backends/test_s3.py
|
|
@@ -3,7 +3,11 @@ from unittest.mock import patch
|
|
import boto3
|
|
import pytest
|
|
from botocore.exceptions import ClientError
|
|
-from moto import mock_s3
|
|
+
|
|
+try:
|
|
+ from moto import mock_aws
|
|
+except ImportError:
|
|
+ from moto import mock_s3 as mock_aws
|
|
|
|
from celery import states
|
|
from celery.backends.s3 import S3Backend
|
|
@@ -84,7 +88,7 @@ class test_S3Backend:
|
|
's3', endpoint_url=endpoint_url)
|
|
|
|
@pytest.mark.parametrize("key", ['uuid', b'uuid'])
|
|
- @mock_s3
|
|
+ @mock_aws
|
|
def test_set_and_get_a_key(self, key):
|
|
self._mock_s3_resource()
|
|
|
|
@@ -97,7 +101,7 @@ class test_S3Backend:
|
|
|
|
assert s3_backend.get(key) == 'another_status'
|
|
|
|
- @mock_s3
|
|
+ @mock_aws
|
|
def test_set_and_get_a_result(self):
|
|
self._mock_s3_resource()
|
|
|
|
@@ -111,7 +115,7 @@ class test_S3Backend:
|
|
value = s3_backend.get_result('foo')
|
|
assert value == 'baar'
|
|
|
|
- @mock_s3
|
|
+ @mock_aws
|
|
def test_get_a_missing_key(self):
|
|
self._mock_s3_resource()
|
|
|
|
@@ -141,7 +145,7 @@ class test_S3Backend:
|
|
s3_backend.get('uuidddd')
|
|
|
|
@pytest.mark.parametrize("key", ['uuid', b'uuid'])
|
|
- @mock_s3
|
|
+ @mock_aws
|
|
def test_delete_a_key(self, key):
|
|
self._mock_s3_resource()
|
|
|
|
@@ -157,7 +161,7 @@ class test_S3Backend:
|
|
|
|
assert s3_backend.get(key) is None
|
|
|
|
- @mock_s3
|
|
+ @mock_aws
|
|
def test_with_a_non_existing_bucket(self):
|
|
self._mock_s3_resource()
|
|
|