summaryrefslogtreecommitdiff
path: root/kombu
Commit message (Collapse)AuthorAgeFilesLines
* chore(python): remove Python 3.7 support (#1708)Stevie Gayet2023-05-151-7/+1
| | | | | | | | | | * chore(python): remove Python 3.7 support * Update setup.py --------- Co-authored-by: Stevie Gayet <stegayet@users.noreply.github.com> Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
* chore(ci): fix lint job (#1718)Stevie Gayet2023-05-1531-60/+222
| | | | | | | | | | | | | | | | | | | | | | | | | * chore(ci): align python version between matrix and tox config * chore(pydocstyle): upgrade pydocstyle to 6.3.0 * chore(pydocstyle): exclude rules * fix(mypy): fix `[truthy-function]` error * fix(pydocstyle): fix D205 rule * fix(pydocstyle): fix D212 rule * fix(pydocstyle): fix D407 rule * fix(pydocstyle): fix D412 rule * fix(pydocstyle): fix D406 rule * fix(pydocstyle): fix D411 rule --------- Co-authored-by: Stevie Gayet <stegayet@users.noreply.github.com>
* SQS: avoid excessive GetQueueURL calls by using cached queue url (#1621)Tom Sparrow2023-04-192-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix #1618: avoid re-fetching queue URL when we already have it `_get_from_sqs` was unnecessarily calling `get_queue_url` every time even though the only place which calls `_get_from_sqs` (that is `_get_async`) actually already knows the queue URL. This change avoids hundreds of `GetQueueUrl` AWS API calls per hour when using this SQS backend with celery. Also `connection` is set by the one-and-only caller (and `queue` is actually the queue name string now anyway so couldn't ever have `.connection`) so remove the None default and unused fallback code. * Clarify that `_new_queue` returns the queue URL It seems that prior to 129a9e4ed05b it returned a queue object but this is no longer the case so update comments variable names accordingly to make it clearer. Also remove the incorrect fallback which cannot be correct any more given the return value has to be the queue URL which must be a string. * Unit test coverage for SQS async codepath This key code path (which as far as I can see is the main route when using celery with SQS) was missing test coverage. This test adds coverage for: `_get_bulk_async` -> `_get_async` -> `_get_from_sqs`
* fix mongodb transport obsolete calls (#1694)Francis Charette-Migneault2023-04-181-4/+5
| | | | | * fix mongodb transport obsolete calls + add test mock specs to check valid methods * fix linting
* fix: handle keyerror in azureservicebus transport when message is not found ↵Ismael Jiménez Sánchez2023-04-111-14/+15
| | | | | | | | | in qos and perform basic_ack (#1691) * fix: handle keyerror when message is not found in qos and perform basic_ack * fix: added tests for basic_ack * fix: limit line length
* Deprecate pytz and use zoneinfo (#1680)Maxwell Muoto2023-04-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Main * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * Trigger Build * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * Fix * noqas * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove unused noqa * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * re-add import * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use pytest-freezer (#1683) * Main * Trigger Build * Fixes * remove * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * lint * Lint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
* Bump version: 5.3.0b2 → 5.3.0b3v5.3.0b3Asif Saif Uddin2023-03-201-1/+1
|
* refactor: Refactor utils/json (#1659)Serhii Tereshchenko2023-03-021-74/+93
| | | | | | | | | | | | | | | * refactor: Refactor utils/json * Update kombu/utils/json.py * Update kombu/utils/json.py * chore: Use older syntax (no walrus) * chore: Update doscstrings * chore: Fix pydocstyle complaints * chore: Restore previous docstring
* Remove unused `_setupfuns` from serialization.pySerhii Tereshchenko2023-03-011-12/+0
| | | | | Looks like `_setupfuns` is unused and should be removed. If they're used somehow, please explain how, so i can add comment here to avoid future confusion.
* Mark methods accepting Connection instances as suchAurelien Gateau2023-02-021-3/+4
| | | | | | | In MaybeChannelBound, the `__call__()`, `bind()` and `maybe_bind()` methods takes a channel argument. The type annotation say this argument must be a Channel, but it goes through `maybe_channel()`, so it can also be a Connection. Update the annotation to accept both Channel and Connection.
* support sqla v2.0 (#1651)Craig Mulligan2023-02-012-4/+4
| | | | | | | | | | | * support sqla v2.0 * Update kombu/transport/sqlalchemy/models.py * update (#1652) --------- Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
* azure service bus: add type annotations and use cached propertyJason Barnett2023-01-051-30/+23
|
* add type annotations to kombu/transport/azurestoragequeuesJason Barnett2023-01-031-15/+17
|
* add autoflake to .pre-commit-config.yaml to automatically remove unused ↵Jason Barnett2022-12-281-1/+1
| | | | | | | | | | | imports (#1637) * add autoflake to .pre-commit-config.yaml to automatically remove unused imports * [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>
* add managed identity support to azure storage queue (#1631)Jason Barnett2022-12-272-11/+54
| | | | | * add managed identity support to azure storage queue * flake8 fixes
* Allowing `Connection.ensure()` to retry on specific exceptions given by ↵Tomer Nosrati2022-12-181-1/+18
| | | | | | | | | 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
* Bump version: 5.3.0b1 → 5.3.0b2v5.3.0b2Asif Saif Uddin2022-10-191-1/+1
|
* Allow azurestoragequeues transport to be used with Azurite emulator in ↵David Bossanyi2022-10-161-1/+8
| | | | | | | | | | | | | | | 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>
* Fix errors from flake8 lintMarti Raudsepp2022-10-121-2/+2
| | | | | Python's `del` is a statement, not a function, and doesn't need parenthesis.
* Add separate transport option for retry loop timeout (#1599)Marti Raudsepp2022-10-121-1/+4
| | | | | | | | | | | | | | | | | | | | | * 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
* importlib_metadata remove deprecated entry point interfaces (#1601)woutdenolf2022-10-091-1/+6
| | | | | * importlib_metadata removed deprecated entry point interfaces * importlib-metadata usage requires 3.6
* Solve Kombu filesystem transport not thread safekarajan10012022-09-231-30/+34
| | | | | | partly fix: #398 1. add exclusive lock during the whole exchange file update. 2. add some unit test for file lock
* Make JSONEncoder keep the same type for date/datetime.Manuel Vázquez Acosta2022-09-211-1/+6
| | | | | | | 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.
* Revert "Solve Kombu filesystem transport not thread safe (#1593)" (#1595)Gao2022-09-091-59/+28
| | | This reverts commit 8699920e050727d385a6d5a19c939e55a86688d6.
* Solve Kombu filesystem transport not thread safe (#1593)Gao2022-09-071-28/+59
| | | | | | | | | | | | | | * 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.
* Fix incompatibility with redis in disconnect() (#1589)Shalabh Chaturvedi2022-08-251-2/+2
| | | | | * Accept *args in disconnect() * Add test for redis connection timeout error
* hub: tick delay fix (#1587)Shahar Lev2022-08-241-3/+4
| | | | | | | | | | | | | | | | | | | | | * 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>
* fix: save QueueProperties to _queue_name_cache instead of QueueClientdavidbossanyi2022-08-211-1/+1
|
* Bump version: 5.3.0a1 → 5.3.0b1v5.3.0b1Asif Saif Uddin2022-08-011-1/+1
|
* Avoid losing type of UUID when serializing/deserializing (#1575)Carlos Gottberg2022-07-171-1/+5
| | | | | | | | | | | | | | | | | | | | | * 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>
* Add WATCH to prefixed complex commandsDan Cecile2022-07-141-0/+1
|
* Add support to SQS DelaySeconds (#1567)eloranger2022-07-121-11/+16
| | | | | | | | | | | | | * 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>
* Bump version: 5.2.4 → 5.3.0a1v5.3.0a1Asif Saif Uddin2022-06-291-1/+1
|
* fix typing flake8 (#1560)Asif Saif Uddin2022-06-211-1/+1
| | | | | | | | | | | * 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>
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2022-06-191-1/+1
| | | | for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2022-06-191-4/+4
| | | | for more information, see https://pre-commit.ci
* Annotate `matcher.py` (#1532)Marcelo Trylesinski2022-06-031-11/+20
|
* Datetime serialization and deserialization fixed (#1515)dobosevych2022-05-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Annotate `abstract.py` (#1522)Marcelo Trylesinski2022-05-152-22/+52
| | | | | | | | | | | | | | | | | | | * 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>
* Added HLEN to the list of prefixed redis commands (#1540)vinay karanam2022-04-281-0/+1
|
* Upgrade Azure Storage Queues transport to version 12 (#1539)Jonas Miederer2022-04-231-26/+70
| | | | | | | | | | | | | | | | * updated azurestoragequeues transport for azure-storage-queues v12 + added basic tests * fixed flake8 issues * pinned azure-storage-queue lib to >= v12.0.0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * azure-storage-queue>=12.2.0 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
* Kafka support (#1506)CountRedClaw2022-04-212-0/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add kafka support * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix checks * Fix checks * Update kombu/transport/confluentkafka.py Co-authored-by: Asif Saif Uddin <auvipy@gmail.com> * Add customization ability * Add docs * Fix pypi integration tests * Fix pydocstyle * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleanup * Disable PyPy tests * Fix tests * Add docs Co-authored-by: ilbo0518 <ilia.borsuk@netcracker.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
* Annotate `exceptions.py` and `clocks.py` (#1526)Marcelo Trylesinski2022-04-182-17/+38
| | | | | * Annotate `exceptions.py` * Annotate `clocks.py`
* Support pymongo 4.x (#1536)Jakub Pieńkowski2022-04-181-30/+44
| | | | | | | | | | | * Support pymongo 4.x * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix problems detected by CI Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* json.py cleaning from outdated libs (#1533)dobosevych2022-04-161-16/+5
| | | | | | | | | | | | * 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>
* Bump pyupgrade version and add __future__.annotations importMarcelo Trylesinski2022-04-1574-83/+230
|
* Annotate init files (#1527)Marcelo Trylesinski2022-04-147-21/+41
| | | | | * Annotate init files * Fix fmatch_best annotation
* chore: Update `__exit__` signaturesSondre Lillebø Gundersen2022-04-129-13/+106
| | | | Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* Annotate `utils/uuid.py` and `utils/text.py` (#1514)Marcelo Trylesinski2022-04-122-14/+16
| | | | | | | * Annotate `utils/uuid.py` and `utils/text.py` * Use callable without any parameter * Update kombu/utils/text.py
* Added possibility to serialize and deserialize binary messages in json (#1516)dobosevych2022-04-121-2/+20
| | | | | | | | | | | | | | | | | * 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>