* json.py cleaning from outdated libs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 1. Removed cjson and simplejson from documentation, as those libraries aren't supported anymore
2. Removed _json_extra_kwargs from json.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added possibility to serialize and deserialize binary messages in json
* Flake8 fixed
* Hypothesis added to improve test range. Fixed issue b'\x80' serialization.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added docstring
* Fixed pylint
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add `mypy` to the pipeline
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
When there is no locking then there is a possibility that multiple threads
manipulate with the same object at the same time.
The issue is manifested as:
```
RuntimeError: Set changed size during iteration
```
See: https://github.com/celery/celery/issues/7162
* Create a folder for each queue when using filesystem transport and add fanout support
* clean up unused variables
* Add fanout support to filesystem transport
filesystem transport lacks of fanout support.
1. Add fanout support to filesystem transport.
2. Add a unit test for it.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove the refactoring work and make the test passed
1. Remove all of refactoring work
2. make the test pass
* Use pathlib for some Path operation
* Some reviewed changes
Co-authored-by: Yuriy Halytskyy <y.halytskyy@auckland.ac.nz>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Warn about missing hostname only when default one is available
The `No hostname was supplied` warning is affecting projects that use
AWS SQS (as detailed in #1357), as a hostname is not required when
setting up the broker URL. Instead, the official documentation [0] specifies
that the valid broker URL formats are:
* `sqs://`
* `sqs://aws_access_key_id:aws_secret_access_key@`
With these formats, the `kombu.utils.url.parse_url` util doesn't return
a hostname, and workers end up triggering the following warning:
> No hostname was supplied. Reverting to default 'None'
As the SQS transport doesn't provide a default value for hostname, this
diff changes the behavior to only warn the user when the hostname hasn't
been supplied but a default one is being set by the default connection
parameters for the defined transport.
Fixes#1357.
[0] https://docs.celeryproject.org/en/stable/getting-started/backends-and-brokers/sqs.html#configuration
* Use caplog default logging level of WARNING
* Remove use of OrderedDict in Connection.info.
* Remove remnant use of collections.OrderedDict
* Undo QoS._delivered move to Python standard dictionary.
This requires more work to convert, due to a hack in how the dictionary
is used.
* Undo LRUCache.data to dict conversion.
It's also problematic, and caused tests to fail.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Revert QoS._delivered comment chagne.
* Update comment
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Set redelivered property for Celery with Redis
Fixed setting `redelivered` value for Celery when Redis broker is used.
* Add `test_do_restore_message_celery` test
* Fix long line
* (Issue #789) Don't reset the proxy config in the async curl based http request building unless that is specified by the caller
* Test curl proxy only set when explicitly specified by caller
Co-authored-by: Adam Aljets <aljets@users.noreply.github.com>
* allow getting recoverable_connection_errors without an active transport
* move redis transport errors to class
* move consul transport errors to class
* move etcd transport errors to class
* remove redis.Transport._get_errors and references in tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix flake8 errors
* add integration test for redis ConnectionError
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* test amqp v5.0.8
* bump to 5.0.9 in an attempt to fix the regression
* try restrict setuptool in CI
* try pining setuptools (#1466)
* try pining setuptools
* try more lower version
* try 59.7.0
* try pin to setuptools==58.2.0
* try restrict setuptool in CI
* setuptools>=59.1.1,<59.7.0
* try pining setuptools
* try more lower version
* try 59.7.0
* try pin to setuptools==58.2.0
* try restrict setuptool in CI
* setuptools>=59.1.1,<59.7.0
* Ensure that restore is atomic in redis transport
* Fix wrong variable
* Added integration tests
* Update unittests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix integration tests
* Fix flake8
* Fix queue name in int. tests
* Cosmetic clean up of integration tests
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>