Commit Graph

3387 Commits

Author SHA1 Message Date
Asif Saif Uddin 1b36026435 update changelog for v5.2.0rc1 2021-09-07 12:04:37 +06:00
Asif Saif Uddin e0933713da
stop mentioning librabbitmq (#1381) 2021-09-07 11:24:10 +06:00
Asif Saif Uddin 429b224e75
v 1.4.x (#1338)
* v 1.4.x
2021-09-07 11:05:36 +06:00
pre-commit-ci[bot] de4716adda
[pre-commit.ci] pre-commit autoupdate (#1379)
updates:
- [github.com/asottile/pyupgrade: v2.24.0 → v2.25.0](https://github.com/asottile/pyupgrade/compare/v2.24.0...v2.25.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-08-31 15:29:58 +03:00
Matus Valo 8a770d2f18 Run integration tests for kombu also with global_keyprefix 2021-08-31 15:57:54 +06:00
Matus Valo 7230665e5c Make BrokerState Transport specific 2021-08-30 14:02:20 +06:00
Gábor Boros 24b0820d0b fix: add missing commands to prefix
Add missing DEL, RPUSH, RPOP and SREM commands to the list of commands to prefix.

Also, this commit refactors the prefixing logic a bit to make it simpler.
2021-08-27 16:35:35 +06:00
Steven cad7a88b3f
fix: raise BrokenPipeError (#1231)
Co-authored-by: Steven Joseph <steven@pointzi.com>
Co-authored-by: Steven Joseph <steven@stevenjoseph.in>
2021-08-26 19:16:24 +06:00
Gábor Boros 39584a1940
Add global key prefix for keys set by Redis transporter (#1349)
* Introduce global key prefix for redis transport

Co-authored-by: Matus Valo <matusvalo@users.noreply.github.com>

* refactor: use a custom redis client

As per the suggestions, refactor the redis key prefixing to use a custom
redis client that prefixes the keys it uses.

The custom client implementation does not prefix every key by default as
the way of prefixing keys may differ for some redis commands, instead it
lists those keys that will be prefixed. In case of commands, where
multiple keys can be passed as an argument, the custom client defines
where the arg positions are starting and ending for the given command.

* test: fix unit tests by moving import statement

* fix: wrap redis.parse_response to remove key prefixes

Co-authored-by: Matus Valo <matusvalo@users.noreply.github.com>

* fix: typo

* fix: lint

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
Co-authored-by: Matus Valo <matusvalo@users.noreply.github.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
2021-08-25 14:08:17 +02:00
pre-commit-ci[bot] 8d15a6602d
[pre-commit.ci] pre-commit autoupdate (#1374)
updates:
- [github.com/asottile/pyupgrade: v2.23.3 → v2.24.0](https://github.com/asottile/pyupgrade/compare/v2.23.3...v2.24.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-08-24 11:41:53 +03:00
Brad Smith 9a91e8b780 SQS Channel.predefined_queues should be `{}` if not defined
Previously, calling `reject` when `predefined_queues` was not configured would cause `AttributeError` to be raised from `_extract_backoff_policy_configuration_and_message`. That exception could crash the whole Celery worker and force it to exit early because `AttributeError` is not excepted in the nearby call stack.
2021-08-21 16:22:41 +06:00
SchizmOne 37a81bcd8c Fixed type comment 2021-08-21 00:32:43 +06:00
nikolas 78f9b60e50 Use Python's built-in json module by default, instead of simplejson
Only use simplejson if it's absolutely necessary - Python's built-in json module is better if it's available.
2021-08-14 12:27:06 +06:00
pre-commit-ci[bot] 8b3498416f [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.23.1 → v2.23.3](https://github.com/asottile/pyupgrade/compare/v2.23.1...v2.23.3)
2021-08-10 23:00:01 +06:00
pre-commit-ci[bot] 1a512ffac9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-08-05 20:05:25 +06:00
Matus Valo c0f2b847f0 Use hostname from URI when server_host is None 2021-08-05 20:05:25 +06:00
pre-commit-ci[bot] 200f183d96 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.23.0 → v2.23.1](https://github.com/asottile/pyupgrade/compare/v2.23.0...v2.23.1)
- [github.com/pycqa/isort: 5.9.2 → 5.9.3](https://github.com/pycqa/isort/compare/5.9.2...5.9.3)
2021-08-03 14:58:08 +06:00
Michał Bielawski 4f77faab77 Add support for Python 3.9 2021-07-31 10:27:29 +06:00
pre-commit-ci[bot] 0234ea2d61
[pre-commit.ci] pre-commit autoupdate (#1359)
updates:
- [github.com/asottile/pyupgrade: v2.21.2 → v2.23.0](https://github.com/asottile/pyupgrade/compare/v2.21.2...v2.23.0)
- https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-29 12:51:19 +03:00
Thomas Grainger 241b5dcff8
enable pre-commit (#1355)
* enable pre-commit

* use extend-ignore for flake8

* manual flake8 fixes

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

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

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

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

* Update kombu/__init__.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-20 19:07:49 +06:00
Matus Valo 1ce0afe39a Update docstrings of redis transport with user and password 2021-07-08 21:30:52 +00:00
Gábor Boros 2d036f54b6
Add support for setting redis username (#1351)
* feat: add support for setting redis username

* tests: add redis connparams credentials tests
2021-07-08 23:27:05 +02:00
Felix Yan e5dbfed8ae
Move pytest.importorskip to run earlier (#1346)
* Move pytest.importorskip to run earlier

Currently pytest fails to collect tests when `azure` is not present. Moving the pytest.importorskip clause before `from kombu.transport import azureservicebus` fixes it.

```
==================================== ERRORS ====================================
__________ ERROR collecting t/unit/transport/test_azureservicebus.py ___________
ImportError while importing test module '/build/python-kombu/src/kombu-5.1.0/t/unit/transport/test_azureservicebus.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
t/unit/transport/test_azureservicebus.py:12: in <module>
    from kombu.transport import azureservicebus
kombu/transport/azureservicebus.py:66: in <module>
    import azure.core.exceptions
E   ModuleNotFoundError: No module named 'azure'
```

* Add # noqa to make linter happy
2021-06-11 09:21:09 +02:00
Matus Valo 89b92f7f2c Make flake8 happy 2021-06-09 19:07:48 +00:00
Matus Valo ef1a7dd2c7 Small fixes in documentation 2021-06-09 15:15:32 +00:00
Matus Valo cc066228c1 Small fixes in documentation 2021-06-09 07:48:16 +00:00
Asif Saif Uddin 87b451b87f
fix typo 2021-05-26 21:30:55 +06:00
Matus Valo e3f97ef28e
Remove backward compatible code not used anymore (#1344)
* Fix broken nested() after #1320

* Remove backward compatible code not needed anymore
2021-05-25 16:31:16 +06:00
Omer Katz 4bd1f3ec15 Fix version replacement. 2021-05-23 18:55:35 +03:00
Omer Katz 0462d7b63e Bump version: 5.1.0b1 → 5.1.0 2021-05-23 18:53:07 +03:00
Omer Katz 4d1d0d277d Update release notes. 2021-05-23 18:49:41 +03:00
Matus Valo 4cf1a21712
prepare_accept_content() now raises SerializerNotInstalled instead of KeyError (#1343)
* Fix broken nested() after #1320

* prepare_accept_content now raises SerializerNotInstalled when wrong serializer alias is passed
2021-05-23 12:09:06 +06:00
Luis Saavedra e6d76d13fc
add accept parameter to SimpleQueue class (#1140)
* add accept parameter to SimpleQueue class

* Fixed missing accept for get_nowait() and added unittests

* Remove unused **kwargs from SimpleQueue.__init__

* Use self.consumer.accept instead of new attribute in SimpleQueue

* Add tests for simple interface when accept=[]

Co-authored-by: Matus Valo <matusvalo@gmail.com>
2021-05-22 21:28:05 +02:00
Matus Valo a920bb0365
Revert "chore: Refactor code quality issues (#1320)" (#1342)
This reverts commit 3b6cd13d3b.
2021-05-19 14:05:14 +02:00
Aksh Gupta 3b6cd13d3b
chore: Refactor code quality issues (#1320)
* chore: refactor code quality issues

* remove .deepsource.toml config file
2021-04-28 18:40:37 +03:00
Matus Valo 9dbe842195 Ignore kombu.transport.librabbitmq in apicheck.
We are ignoring kombu.transport.librabbitmq because apicheck is failing
due missing librabbitmq library.
2021-04-14 09:20:03 +06:00
Matus Valo 3fe833c4b5 Remove unused appveyor and travis configuration files 2021-04-14 09:18:49 +06:00
Matus Valo c35fd1d9b4
Make flake8 and pydocstyle happy (#1333)
* Make flake8 happy

* Make pydocstyle happy
2021-04-13 23:20:31 +02:00
Omer Katz 4615415bf0 Coerce seconds argument to a floating point number.
Celery does not coerce configuration values into the right type (See celery/celery#6696).
This is a workaround. This bug will be fixed in Celery NextGen when we will refactor our configuration subsystem.
2021-04-13 12:48:41 +06:00
Asif Saif Uddin fd4dfa475d re order CI jobs to make lint the last
it was decided long ago and it let the unit and integrations tests run fast for faster feedback loop
2021-04-13 10:20:42 +06:00
Omer Katz c7ba31d4fd Opencollective bot is now configured. 2021-04-13 09:58:16 +06:00
Omer Katz 7c34684ae8
Add support for SQLAlchemy 1.4. (#1328) 2021-04-06 14:20:46 +03:00
Omer Katz 4446438767
Fix CI failure (#1327)
* Update before installing system dependencies.

* Actually run the linters using tox.

There are no environments named py-flake8, py-pydocstyle and py-apicheck.
2021-04-06 12:40:25 +02:00
Tomasz Niedziela-Brach 44dcc33a74
Azure Service Bus - versatile queue names fix (#1324)
* fixed character replace table according to the comment above - dots replaced by dashes, other punctuations replaced by underscores

* optimised with precalculated punctuation set - according to @thedrow suggestion

* queue name tests

* cleanup
2021-04-04 18:02:03 +03:00
Asif Saif Uddin (Auvi) 78cc97b549 Bump version: 5.0.2 → 5.1.0b1 2021-04-01 22:29:22 +06:00
Asif Saif Uddin (Auvi) 45bc37e028 added changlog for v5.1.0b1 2021-04-01 22:19:53 +06:00
Omer Katz 560518287a
Use a thread-safe implementation of cached_property (#1316)
* Use a thread-safe implementation of cached_property.

* Restore setter and deleter.

* Restore tests.

* Fix __get__ signature for backport.

* Cleanup.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
2021-04-01 13:48:00 +03:00
Asif Saif Uddin 8474df9130
min py-amqp to v5.0.6 (#1325) 2021-04-01 15:26:40 +06:00
gal cohen b5a1edde48
SQS Broker - handle STS authentication with AWS (#1322)
* handle sqs sts

* add doc

* use string format

* improve docs

* Update kombu/transport/SQS.py

Co-authored-by: Omer Katz <omer.drow@gmail.com>

* add helper method and tests

* changer to private

Co-authored-by: galcohen <gal.cohen@autodesk.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Omer Katz <omer.drow@gmail.com>
2021-03-29 11:35:49 +03:00
Davis Kirkendall 0aa3953409
Update default login method for librabbitmq and pyamqp (#936)
- AMQPLAIN is only retained for backwards compatability and has become non-standard
2021-03-24 16:38:00 +02:00