Commit Graph

3442 Commits

Author SHA1 Message Date
Tomer Nosrati 44025bfa52
Allowing `Connection.ensure()` to retry on specific exceptions given by policy (#1629)
* Added unit test: test_ensure_retry_errors_is_not_looping_infinitely()

* Added unit test: test_ensure_retry_errors_is_limited_by_max_retries()

* Added retry_errors arg to Connection.ensure() to allow applying retry policy for specific errors additionally
2022-12-18 12:34:57 +02:00
pre-commit-ci[bot] 9ee6fdea7d [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.2.0 → v3.3.1](https://github.com/asottile/pyupgrade/compare/v3.2.0...v3.3.1)
- [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](https://github.com/PyCQA/flake8/compare/5.0.4...6.0.0)
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0)
2022-12-14 18:22:41 +06:00
Asif Saif Uddin 913d01ffa5
sqlalchemy==1.4.45 (#1626)
* pin sqlalchemy==1.4.44

* sqlalchemy==2.0.0b4

* sqlalchemy==1.4.45
2022-12-14 14:11:35 +06:00
Tomer Nosrati 0c4f9500d8 Added .python-version and .vscode to gitignore 2022-12-14 12:48:00 +06:00
pre-commit-ci[bot] 2bdeba1d76 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.1.0 → v3.2.0](https://github.com/asottile/pyupgrade/compare/v3.1.0...v3.2.0)
2022-11-05 10:53:25 +06:00
Frazer McLean c297e421e0 Use SPDX license expression in project metadata 2022-10-29 13:27:35 +06:00
Asif Saif Uddin 6e0d26d510 Bump version: 5.3.0b1 → 5.3.0b2 2022-10-19 20:01:00 +06:00
Asif Saif Uddin 8b55c71beb added changelog entry for v5.3.0b2 2022-10-19 19:54:51 +06:00
pre-commit-ci[bot] 6953404d0a [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.0.0 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v3.0.0...v3.1.0)
2022-10-19 14:23:46 +06:00
David Bossanyi 22b559684f
Allow azurestoragequeues transport to be used with Azurite emulator in docker-compose (#1611)
* Parse credential as a dict when using Azurite emulator

This more flexible credential allows the use of Azurite for integration testing in local docker-compose configurations.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix some lint errors

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-16 20:43:15 +06:00
pre-commit-ci[bot] c7615fc537 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.37.1 → v3.0.0](https://github.com/asottile/pyupgrade/compare/v2.37.1...v3.0.0)
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.4)
- [github.com/asottile/yesqa: v1.3.0 → v1.4.0](https://github.com/asottile/yesqa/compare/v1.3.0...v1.4.0)
2022-10-13 19:56:51 +06:00
Marti Raudsepp bfec7faf8d Fix errors from flake8 lint
Python's `del` is a statement, not a function, and doesn't need
parenthesis.
2022-10-12 20:47:19 +06:00
Marti Raudsepp 3a49533bc2
Add separate transport option for retry loop timeout (#1599)
* Add separate transport option for retry loop timeout

This only applies when using `Connect.default_channel`.

Before this change, the retry loop timeout was set equal to TCP connect timeout (`connect_timeout`), meaning when first connection attempt timeouted, no retry would be attempted.

Now if a new transport option `connect_total_timeout` is provided, this overrides `connect_timeout` for the retry loop (but not for TCP connect).

* Add tests

* Fix isort

* Rename to connect_retry_timeout

* Reformat

* connect_retry_timeout -> connect_retries_timeout

* Fix flake8
2022-10-12 19:41:04 +06:00
woutdenolf de560081d3
importlib_metadata remove deprecated entry point interfaces (#1601)
* importlib_metadata removed deprecated entry point interfaces

* importlib-metadata usage requires 3.6
2022-10-09 22:33:58 +06:00
karajan1001 6ae9fac150 Solve Kombu filesystem transport not thread safe
partly fix: #398
1. add exclusive lock during the whole exchange file update.
2. add some unit test for file lock
2022-09-23 17:29:34 +06:00
Manuel Vázquez Acosta 2d88c43fef Make JSONEncoder keep the same type for date/datetime.
Otherwise Celery jobs start to get `datetime` in place of `date` and that
could lead to errors.

See https://github.com/celery/celery/issues/7754, related PR #1515.
2022-09-21 12:24:08 +06:00
Gao afcde0a0bd
Revert "Solve Kombu filesystem transport not thread safe (#1593)" (#1595)
This reverts commit 8699920e05.
2022-09-09 22:52:53 +06:00
Gao 8699920e05
Solve Kombu filesystem transport not thread safe (#1593)
* Solve Kombu filesystem transport not thread safe

fix: #398
Currently only write lock used in msg/exchange file written. Cause
reading in other thread got some incomplete result.

1. Add timeout for the lock acquire.
2. Add Share locks when reading message from filesystem.
3. Add a unit test for the `lock` and `unlock`
4. Add a unit test to test the lock during message processing.

* Replace deprecated function.
2022-09-07 21:54:28 +06:00
Shalabh Chaturvedi ec533af9c1
Fix incompatibility with redis in disconnect() (#1589)
* Accept *args in disconnect()

* Add test for redis connection timeout error
2022-08-25 23:47:52 +06:00
Shahar Lev 717ad3ddc9
hub: tick delay fix (#1587)
* hub: tick delay fix

todo and timer callbacks can perform actions that
require a tick callback to be executed right away
without polling.

the current order can cause issues
when using single worker with no prefetch (acks late).

related issue in celery:
https://github.com/celery/celery/issues/7718

* add unit test for hub delay fix

* [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>
2022-08-24 14:32:35 +06:00
davidbossanyi 0e57a7b3a0 fix: save QueueProperties to _queue_name_cache instead of QueueClient 2022-08-21 01:48:19 +06:00
JaeyoungHeo 83e21c8382 Change print style 2022-08-03 10:26:35 +06:00
Asif Saif Uddin 712a1c12b5 Bump version: 5.3.0a1 → 5.3.0b1 2022-08-01 13:49:41 +06:00
Asif Saif Uddin 7384bd1e6a added changelog entry for v5.3.0b1 2022-08-01 13:46:20 +06:00
Meysam Azad ddf78fca44 chore: add confluentkafka to extras 📌 2022-07-18 11:58:38 +06:00
Carlos Gottberg 10a673b17c
Avoid losing type of UUID when serializing/deserializing (#1575)
* Avoid losing type of UUID when serializing/deserializing

Serializing UUIDs as strs and deserializing them as strs can lead to
somewhat obscure bugs such as the one that led to the creation of this
PR in django-cacheback
https://github.com/codeinthehole/django-cacheback/pull/100 which some
would call unexpected behaviour.

After all, an UUID is altogether a different type from strs and if
bytes got their own serializer/deserializer for UUID the same logic
should apply.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update documentation for JSON serialization

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-17 23:09:40 +06:00
Dan Cecile 4440c649e0 Add WATCH to prefixed complex commands 2022-07-14 22:56:41 +06:00
eloranger 674a645356
Add support to SQS DelaySeconds (#1567)
* Add DelaySeconds to kwargs

* Add test

* add default value for DelaySeconds

* Fix tests and add check for properties

* Fix flake8 style issue

Co-authored-by: Edmund Lam <2623895+edmundlam@users.noreply.github.com>
2022-07-12 22:31:21 +06:00
pre-commit-ci[bot] b4698b5023 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.34.0 → v2.37.1](https://github.com/asottile/pyupgrade/compare/v2.34.0...v2.37.1)
2022-07-12 22:13:36 +06:00
Marcelo Trylesinski f76726270a Add ext.py files to setup.cfg 2022-07-03 14:13:56 +06:00
Asif Saif Uddin 791056cd4d Bump version: 5.2.4 → 5.3.0a1 2022-06-29 15:53:11 +06:00
Asif Saif Uddin 3685f4e1e9 added changelog entry for v5.3.0a1 2022-06-29 15:32:32 +06:00
Asif Saif Uddin 7b8467989f
fix typing flake8 (#1560)
* fix typing flake8

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused imports

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-21 10:30:16 +06:00
Asif Saif Uddin e97223ffd5 stop cron job 2022-06-19 13:18:10 +06:00
pre-commit-ci[bot] e57ed2907b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-06-19 13:03:25 +06:00
pre-commit-ci[bot] 984c5ff324 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.32.1 → v2.34.0](https://github.com/asottile/pyupgrade/compare/v2.32.1...v2.34.0)
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0)
2022-06-19 13:03:25 +06:00
pre-commit-ci[bot] 008b8f78cd [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-06-19 12:58:06 +06:00
Asif Saif Uddin 72ec0e5c48 stop schedule 2022-06-19 12:58:06 +06:00
Marcelo Trylesinski 1a7b9c490b
Annotate `matcher.py` (#1532) 2022-06-03 08:43:36 +02:00
dobosevych c4829754db
Datetime serialization and deserialization fixed (#1515)
* Datetime serialization and deserialization fixed

* Unit test fixed

* Unit test fixed

* Fixed pylint

* Added Undocumented Autodoc Modules

* Update kombu/utils/json.py

Co-authored-by: Omer Katz <omer.katz@omerkatz.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Clean and freeze now

* Clean and freeze now

* Clean and freeze now

* Clean and freeze now

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Omer Katz <omer.katz@omerkatz.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-31 11:21:04 +06:00
Marcelo Trylesinski 0a2f54eac2
Annotate `abstract.py` (#1522)
* Annotate `abstract.py`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* apply pre-commit

* Use quotes

* Add typing_extensions as requirement

* Add quotes

* Add quotes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-15 13:17:49 +06:00
pre-commit-ci[bot] 2f62ea49db [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.32.0 → v2.32.1](https://github.com/asottile/pyupgrade/compare/v2.32.0...v2.32.1)
2022-05-14 10:59:42 +06:00
Asif Saif Uddin c6c1942214
update sql dependencies (#1547) 2022-04-28 23:34:32 +06:00
vinay karanam f182a98e75
Added HLEN to the list of prefixed redis commands (#1540) 2022-04-28 19:40:44 +03:00
Asif Saif Uddin 25afff7304
redis>=4.2.2 (#1546) 2022-04-28 13:06:29 +06:00
Asif Saif Uddin 6322038c19
kazoo>=2.8.0 (#1545) 2022-04-28 13:04:35 +06:00
Asif Saif Uddin a28c40e8e8
azure-servicebus>=7.6.1 (#1543) 2022-04-28 13:04:07 +06:00
Asif Saif Uddin 0b61ed8636
move to consul2 (#1544)
https://github.com/celery/celery/pull/6544
2022-04-28 13:02:31 +06:00
Asif Saif Uddin 154740d82d
remove pytest-travis-fold as not used 2022-04-28 12:17:39 +06:00
Asif Saif Uddin 341da74342
[gh-actions] 2022-04-27 14:02:38 +06:00