Commit Graph

3740 Commits

Author SHA1 Message Date
Omer Katz 1686c35a06
Apply retry policy to maybe_declare(). (#2174) 2024-10-24 19:15:15 +03:00
Roman Inflianskas c48be8800d
Add support for Python 3.13 (#2052)
Fixes https://github.com/celery/kombu/issues/2051.
2024-10-23 22:47:49 +03:00
Haim Daniel e5ea1f6d58
Fix: restrict google protobuf version (#2175)
- protobuf version in versions larger than 4.25.5 when used by google-cloud-pubsub
  raises the following error:

site-packages/google/protobuf/internal/well_known_types.py", line 443, in FromTimedelta
    raise AttributeError(
AttributeError: Fail to convert to Duration.
Expected a timedelta like object got str: 'str' object has no attribute 'seconds'

  Fix this by restriction of the allowed package versions
- Added unit test to validate pubsub and protobuf compatibility
- Enabled google-cloud-pubsub package versions bump

Co-authored-by: Haim Daniel <haimdaniel@gmail.com>
2024-10-23 19:22:34 +03:00
pyup.io bot c2b069d62a
Update mypy from 1.12.1 to 1.13.0 (#2172) 2024-10-23 08:12:14 +03:00
pre-commit-ci[bot] 2b57f0c9e5
[pre-commit.ci] pre-commit autoupdate (#2170)
updates:
- [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.12.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.12.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-21 20:29:49 +03:00
Tomer Nosrati 9806c22697
Revert "Update google-cloud-pubsub requirement (#2168)" (#2169)
This reverts commit f5c7356dab.
2024-10-21 13:30:38 +03:00
dependabot[bot] f5c7356dab
Update google-cloud-pubsub requirement (#2168)
Updates the requirements on [google-cloud-pubsub](https://github.com/googleapis/python-pubsub) to permit the latest version.
- [Release notes](https://github.com/googleapis/python-pubsub/releases)
- [Changelog](https://github.com/googleapis/python-pubsub/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/python-pubsub/compare/v2.18.4...v2.25.2)

---
updated-dependencies:
- dependency-name: google-cloud-pubsub
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-21 15:23:48 +06:00
Omer Katz 7e4f1bbecc
Fix regression from #2148 (#2165)
* Fix regression from #2148.

Fixes #2157.

* Fix linter error.
2024-10-21 15:22:45 +06:00
Omer Katz 2a206a12c4
Added a unit test that proves timeout is used when retry policy is specified. (#2166) 2024-10-20 20:23:29 +03:00
pyup.io bot 71919bc834
Update mypy from 1.12.0 to 1.12.1 (#2164) 2024-10-20 14:31:29 +03:00
Haim Daniel 6a77355fc6
Fix: restrict google-cloud-pubsub version (#2160)
- google-cloud-pubsub version in versions larger than 2.20.3 raises the following error:

site-packages/google/protobuf/internal/well_known_types.py", line 443, in FromTimedelta
    raise AttributeError(
AttributeError: Fail to convert to Duration.
Expected a timedelta like object got str: 'str' object has no attribute 'seconds'

  Fix this by restriction of the allowed package versions.

Co-authored-by: Haim Daniel <haimdaniel@gmail.com>
2024-10-17 15:35:13 +03:00
dependabot[bot] 6a1e43cb67
Bump grpcio from 1.66.2 to 1.67.0 (#2158)
Bumps [grpcio](https://github.com/grpc/grpc) from 1.66.2 to 1.67.0.
- [Release notes](https://github.com/grpc/grpc/releases)
- [Changelog](https://github.com/grpc/grpc/blob/master/doc/grpc_release_schedule.md)
- [Commits](https://github.com/grpc/grpc/compare/v1.66.2...v1.67.0)

---
updated-dependencies:
- dependency-name: grpcio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-17 13:07:41 +03:00
pre-commit-ci[bot] 47457c1707
[pre-commit.ci] pre-commit autoupdate (#2153)
updates:
- [github.com/asottile/pyupgrade: v3.17.0 → v3.18.0](https://github.com/asottile/pyupgrade/compare/v3.17.0...v3.18.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-14 20:24:48 +03:00
Tomer Nosrati 40f5b59b6f
Added missing changelog highlight for Google Pub/Sub (#2151) 2024-10-14 17:48:27 +03:00
Tomer Nosrati 1691d3e043
Prepare for (pre) release: v5.5.0rc1 (#2150)
* Bump version: 5.4.2 → 5.5.0rc1

* Added Changelog for v5.5.0rc1

* Fixed typo
2024-10-14 17:40:51 +03:00
pyup.io bot e417d927ab
Update mypy from 1.11.2 to 1.12.0 (#2149) 2024-10-14 15:54:38 +03:00
Paul Rysiavets 07c8852be5
Feature: urllib3 instead of curl (#2134)
* feature(urllib3): add urllib3 client

* test(urllib3): test urllib3 client

* test(urllib3): update http test for urllib3

* test(urllib3): use urllib3 client instead of curl

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

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

* style(urllib3): remove unused imports

* style(urllib3): fix pre-commit errors

* ci(urllib3): remove pycurl dependency

* docs(urllib3): add docs

* style(urllib3): fix failing gh-workflow py3.8

* style(urllib3): add mention of ProxyManager

* style(urllib3): fix pre-commit issues

* style(pycurl): remove curl-related code

* feat(urllib3): add missing request features (header, auth, ssl, proxy, redirects)

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

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

* fix(urllib3): improve styling

* test(urllib3): add new tests

* fix(urllib3): fix request auth

* fix(aws): validate certificate on request

* style(): add missing exports

* feat(aws): add ssl certificate verification from boto

* feat(urllib): try to use certifi.where() if request.ca_certs are not provided

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

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

* ci(pydocstyle): add missing docstring in public class

* test(urllib3): improve test case

* ci(pydocstyle): fix multi-line docstring summary should start at the first line

* feat(urllib3): remove assert_hostname

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

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

* test(boto): add test for get_cert_path returning .pem file path

* test(urllib3): add test for _get_pool_key_parts method

* [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>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Tomer Nosrati <tomer.nosrati@gmail.com>
2024-10-14 17:01:25 +06:00
Omer Katz 3f5d19973e
Update the transport options according to the retry policy (#2148)
* Update the transport options according to the retry policy.

* Add unit test.
2024-10-13 20:11:22 +03:00
Haim Daniel 2f58823312
Add support for Google Pub/Sub as transport broker (#2147)
* Add support for Google Pub/Sub as transport broker

 * Add tests
 * Add docs

* flake8

* flake8

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

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

* Fix future import

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

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

* Add missing test requirements

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

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

* Add monitoring dependency

* Fix test for python3.8

* Mock better google's monitoring api

* Flake8

* Add refdoc

* Add extra url to workaround pypy grpcio

* Add extra index url in tox for grpcio/pypy support

* Revert "Add extra url to workaround pypy grpcio"

This reverts commit dfde4d523c.

* pin grpcio version to match extra_index wheel

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

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

* Reduce poll calls if qos denies msg rx

---------

Co-authored-by: Haim Daniel <haimdaniel@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tomer Nosrati <tomer.nosrati@gmail.com>
2024-10-13 16:49:55 +03:00
Omer Katz 5a88a28f31
Add native delayed delivery API to kombu (#2128)
* Adjust flake8 configuration to match Celery's configuration.

* Add native delayed delivery API.

* Add documentation.

* Fix linter errors.

* Fix pydocstyle errors.

* Fix apicheck linter.

* Address code review.
2024-10-12 21:17:55 +03:00
pyup.io bot 96a497e5dd
Pin pre-commit to latest version 4.0.1 (#2144)
* Pin pre-commit to latest version 4.0.1

* Apply suggestions from code review

* Update requirements/test.txt

---------

Co-authored-by: Tomer Nosrati <tomer.nosrati@gmail.com>
2024-10-08 22:04:23 +03:00
pre-commit-ci[bot] 0f5e732be0
[pre-commit.ci] pre-commit autoupdate (#2143)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-07 20:52:39 +03:00
pyup.io bot a520b1b92c
Pin pre-commit to latest version 4.0.0 (Python 3.9+) (#2140)
* Pin pre-commit to latest version 4.0.0

* Update requirements/test.txt

* Update requirements/test.txt

* Update requirements/test.txt

* Update requirements/test.txt

---------

Co-authored-by: Tomer Nosrati <tomer.nosrati@gmail.com>
2024-10-06 20:07:48 +03:00
Omer Katz 72c0b8d992
Apply errback and callback when retry occurs (#2129)
* Apply errback and callback when retry occurs.

* Added unit tests.
2024-10-03 13:37:03 +03:00
Paul Rysiavets ea6a160f6b
fix(pytest): skip file-lock test on Windows (#2138) 2024-10-02 13:26:17 +03:00
pyup.io bot 727dd112a3
Update pymongo from 4.10.0 to 4.10.1 (#2136) 2024-10-02 05:18:51 +03:00
dependabot[bot] 06e1a7bf4f
Bump pymongo from 4.9.1 to 4.10.0 (#2130)
Bumps [pymongo](https://github.com/mongodb/mongo-python-driver) from 4.9.1 to 4.10.0.
- [Release notes](https://github.com/mongodb/mongo-python-driver/releases)
- [Changelog](https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst)
- [Commits](https://github.com/mongodb/mongo-python-driver/compare/4.9.1...4.10.0)

---
updated-dependencies:
- dependency-name: pymongo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 15:17:14 +03:00
Tomer Nosrati 072befec84
Removed "on push" from the linter GitHub Actions workflow (#2133) 2024-10-01 15:15:53 +03:00
Tomer Nosrati 225da0898a
Limit redis-py <5.1.0 (#2132) 2024-10-01 15:08:39 +03:00
pyup.io bot 74779a8078
Pin pre-commit to latest version 3.8.0 (#2125)
* Pin pre-commit to latest version 3.8.0

* Update requirements/test.txt

---------

Co-authored-by: Tomer Nosrati <tomer.nosrati@gmail.com>
2024-09-26 01:41:22 +03:00
Tomer Nosrati e927d07fe3
Removed codecov flags (#2126) 2024-09-26 01:00:17 +03:00
Tomer Nosrati b48d1cbab0
Improve pre-commit checks and fix all new lint errors (#2124)
* Added pyproject.toml

* Imported .pre-commit-config.yaml config from Celery

* Codespell Fixes

* Fixed lint errors

* Added back autoflake
2024-09-25 22:34:56 +03:00
Tomer Nosrati e845d5bf3a
Added unit tests to "tox -e parallel" environment (#2123) 2024-09-25 21:19:46 +03:00
Tomer Nosrati 3448887f78
Refactored CI (#2122)
* Refactored CI

* Added test-integration.txt for integration tests

* Removed .tox from "make clean"

* Fixed pypy

* Cleanup

* Added "--reruns 2" to integration tests
2024-09-25 21:10:28 +03:00
pyup.io bot 424de01b88
Pin tzdata to latest version 2024.2 (#2121) 2024-09-24 00:24:02 +03:00
Tomer Nosrati 8957e557bb
Prepare for release: v5.4.2 (#2119)
* Bump version: 5.4.1 → 5.4.2

* Added Changelog for v5.4.2
2024-09-19 15:25:14 +03:00
dependabot[bot] 4ee6933877
Bump pymongo from 4.9 to 4.9.1 (#2118)
Bumps [pymongo](https://github.com/mongodb/mongo-python-driver) from 4.9 to 4.9.1.
- [Release notes](https://github.com/mongodb/mongo-python-driver/releases)
- [Changelog](https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst)
- [Commits](https://github.com/mongodb/mongo-python-driver/compare/4.9...4.9.1)

---
updated-dependencies:
- dependency-name: pymongo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 10:35:14 +03:00
pyup-bot 952b4dc16b Update pymongo from 4.8.0 to 4.9 2024-09-18 23:26:17 +06:00
Tomer Nosrati a626f1f83a
Revert "Validate SSL certs by default (#2094)" (#2114)
This reverts commit 93d8ecb4bb.
2024-09-16 20:14:53 +03:00
blacksmith-sh[bot] 4d7946e489
Migrate workflows to Blacksmith (#2112)
Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com>
2024-09-13 00:43:21 +03:00
Wout De Nolf f560753582
tzdata is required for machines without IANA database (#2107) 2024-09-11 16:03:51 +03:00
Tomer Nosrati 5c9db06b27
Prepare for release: v5.4.1 (#2109)
* Bump version: 5.4.0 → 5.4.1

* Added Changelog for v5.4.1
2024-09-11 14:36:24 +03:00
pyup.io bot 26ea9cd3bc
Update pytest from 8.3.2 to 8.3.3 (#2108) 2024-09-10 19:47:39 +03:00
pyup-bot 8295d28295 Update msgpack from 1.0.8 to 1.1.0 2024-09-10 15:50:50 +06:00
FrankK-1234 33490adf9c Revert: allow users to disable broker heartbeats by not providing a timeout (#2097, #2016) 2024-09-05 20:47:59 +06:00
Ashkan Ranjbar f3ccc312f9
Resolving TypeError, during version unpacking (#2098)
* - This will make sure that the version unpacking doesn't stop connection to some versions of message brokers.

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

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

* - I updated the test in this version
- Improved my code

* - Removed `merge-conflict` comments in the code!

* - linting problem resolved.

* - Docstrings are now in accordance with `pydocstyle`.

* - resolving `"_unpack_version" has incompatible type "int"` problem in `_unpack_version` method
- `"` are sent back to `'` (apparently my company's formatter `black` is not compatible with `pydocstyle`, and mine integration with VSCode has messed with kombu's repository)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-25 10:12:28 +03:00
Jay Goel 93d8ecb4bb
Validate SSL certs by default (#2094)
Co-authored-by: Jay <jgoel@jays-air.mynetworksettings.com>
2024-08-25 10:00:08 +03:00
Iván Martín Vedriel a62e613da3
SQS: Fixes #2091 queue_delete() method doesn't actually delete the queue (#2099)
* SQS: wrap logic to resolve queue URL into a reusable method

* Create new `_resolve_queue_url` method for reusability.

`_new_queue` method retrieves the queue URL from cache
or fetches it from SQS, updating the cache if necessary.

`_delete` method needs to resolve the queue URL in order to
delete the queue from SQS (next commit).

Both methods will be able to reuse the same functionality by
calling the `_resolve_queue_url` method.

* Introduce DoesNotExistQueueException for easier error handling.

`_new_queue` method is responsible for creating a new queue when
 it doesn't exist, utilizing the new exception for clarity.

* Unit test coverage for `_resolve_queue_url` method.

* SQS: Fix missing queue deletion in Channel._delete

* Add call to `delete_queue` using sqs client.

`_delete` method is expected to delete the specified queue when
called. Previously, this functionality was missing, which has
now been corrected.

The method raises a `DoesNotExistQueueException` if the specified
queue name doesn’t exist.

* Update unit tests with new assertion and mock to verify queue deletion.

* [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>
2024-08-25 09:45:25 +03:00
pyup.io bot ad35ab507b
Update mypy from 1.11.1 to 1.11.2 (#2101) 2024-08-25 07:36:46 +03:00
Tomer Nosrati dbd93b0378
Prepare for release: v5.4.0 (#2095)
* Added Changelog for v5.4.0

* Bump version: 5.4.0rc3 → 5.4.0
2024-08-06 16:41:50 +03:00