forked from pool/python-kombu
- update to 5.3.5:
* Fix ReadTheDocs CI * fix(docs): add Redis to the list of transports where SSL is supported * Fixed Improper Method Call: Replaced `mktemp` * fix: freeze set during ticks iter in async hub * azure service bus: fix TypeError when using Managed Identities * Fix unacknowledge typo in restore_visible() * Changed pyup -> dependabot for updating dependencies * Fix crash when using global_keyprefix with a sentinel connection - update to 5.3.4: * Use the correct protocol for SQS requests - update to 5.3.3: * Update redis.txt to align with celery main * Handle Access Denied Exception in basic_ack Method * fix azure servicebus using managed identity support * Added as_uri method to MongoDB transport - Fixes #1795 * Revert "[fix #1726] Use boto3 for SQS async requests" * Create a lock on cached_property if not present * added Python 3.12 in the CI * using assert_called_once() in est__pop_ready_uses_lock * fix: redis requeue concurrency bug #1800 - update to 5.3.2: * Reverted unwanted constraint introduced in #1629 with max_retries * Doc fix (hotfix for #1755) * Python3.12: fix imports in kombu/utils/objects.py * [fix #1726] Use boto3 for SQS async requests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-kombu?expand=0&rev=178
This commit is contained in:
parent
c1cb3cf773
commit
fb61a4a193
@ -1,44 +0,0 @@
|
|||||||
From 3402c3489c5dd9833208d51c67259190bedfa35a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
|
||||||
Date: Mon, 29 May 2023 08:59:01 +0200
|
|
||||||
Subject: [PATCH] Support redis >= 4.5.2
|
|
||||||
|
|
||||||
The redis-py 4.5.2 changes the UnixDomainSocketConnection class so now
|
|
||||||
it inherits from AbstractConnection:
|
|
||||||
https://github.com/redis/redis-py/releases/tag/v4.5.2
|
|
||||||
|
|
||||||
This patch makes sure that the health_check_interval parameter is
|
|
||||||
checked for the __init__ method of the main class and also the bases, so
|
|
||||||
it doesn't fail with the newer version of redis-py.
|
|
||||||
---
|
|
||||||
kombu/transport/redis.py | 14 +++++++++-----
|
|
||||||
requirements/extras/redis.txt | 2 +-
|
|
||||||
2 files changed, 10 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
Index: kombu-5.2.4/kombu/transport/redis.py
|
|
||||||
===================================================================
|
|
||||||
--- kombu-5.2.4.orig/kombu/transport/redis.py
|
|
||||||
+++ kombu-5.2.4/kombu/transport/redis.py
|
|
||||||
@@ -1139,11 +1139,17 @@ class Channel(virtual.Channel):
|
|
||||||
|
|
||||||
# If the connection class does not support the `health_check_interval`
|
|
||||||
# argument then remove it.
|
|
||||||
- if (
|
|
||||||
- hasattr(conn_class, '__init__') and
|
|
||||||
- not accepts_argument(conn_class.__init__, 'health_check_interval')
|
|
||||||
- ):
|
|
||||||
- connparams.pop('health_check_interval')
|
|
||||||
+ if hasattr(conn_class, '__init__'):
|
|
||||||
+ # check health_check_interval for the class and bases
|
|
||||||
+ # classes
|
|
||||||
+ classes = [conn_class]
|
|
||||||
+ if hasattr(conn_class, '__bases__'):
|
|
||||||
+ classes += list(conn_class.__bases__)
|
|
||||||
+ for klass in classes:
|
|
||||||
+ if accepts_argument(klass.__init__, 'health_check_interval'):
|
|
||||||
+ break
|
|
||||||
+ else: # no break
|
|
||||||
+ connparams.pop('health_check_interval')
|
|
||||||
|
|
||||||
if conninfo.ssl:
|
|
||||||
# Connection(ssl={}) must be a dict containing the keys:
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:37cee3ee725f94ea8bb173eaab7c1760203ea53bbebae226328600f9d2799610
|
|
||||||
size 423450
|
|
3
kombu-5.3.5.tar.gz
Normal file
3
kombu-5.3.5.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:30e470f1a6b49c70dc6f6d13c3e4cc4e178aa6c469ceb6bcd55645385fc84b93
|
||||||
|
size 438460
|
@ -1,3 +1,69 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 1 10:44:57 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 5.3.5:
|
||||||
|
* Fix ReadTheDocs CI
|
||||||
|
* fix(docs): add Redis to the list of transports where SSL is
|
||||||
|
supported
|
||||||
|
* Fixed Improper Method Call: Replaced `mktemp`
|
||||||
|
* fix: freeze set during ticks iter in async hub
|
||||||
|
* azure service bus: fix TypeError when using Managed
|
||||||
|
Identities
|
||||||
|
* Fix unacknowledge typo in restore_visible()
|
||||||
|
* Changed pyup -> dependabot for updating dependencies
|
||||||
|
* Fix crash when using global_keyprefix with a sentinel
|
||||||
|
connection
|
||||||
|
- update to 5.3.4:
|
||||||
|
* Use the correct protocol for SQS requests
|
||||||
|
- update to 5.3.3:
|
||||||
|
* Update redis.txt to align with celery main
|
||||||
|
* Handle Access Denied Exception in basic_ack Method
|
||||||
|
* fix azure servicebus using managed identity support
|
||||||
|
* Added as_uri method to MongoDB transport - Fixes #1795
|
||||||
|
* Revert "[fix #1726] Use boto3 for SQS async requests"
|
||||||
|
* Create a lock on cached_property if not present
|
||||||
|
* added Python 3.12 in the CI
|
||||||
|
* using assert_called_once() in est__pop_ready_uses_lock
|
||||||
|
* fix: redis requeue concurrency bug #1800
|
||||||
|
- update to 5.3.2:
|
||||||
|
* Reverted unwanted constraint introduced in #1629 with
|
||||||
|
max_retries
|
||||||
|
* Doc fix (hotfix for #1755)
|
||||||
|
* Python3.12: fix imports in kombu/utils/objects.py
|
||||||
|
* [fix #1726] Use boto3 for SQS async requests
|
||||||
|
* docs: Remove SimpleQueue import
|
||||||
|
* Fixed pre-commit issues
|
||||||
|
* azure service bus: add managed identity support
|
||||||
|
* fix: Prevent redis task loss when closing connection while in
|
||||||
|
poll
|
||||||
|
* Kombu & celery with SQS #222
|
||||||
|
* syntax correction
|
||||||
|
- update to 5.3.1:
|
||||||
|
* Update pycurl version
|
||||||
|
* Update librabbitmq restrict py3.11
|
||||||
|
* Update PyCurl version in SQS
|
||||||
|
* try python 3.11 on CI
|
||||||
|
- update to 5.3.0:
|
||||||
|
* [pre-commit.ci] pre-commit autoupdate
|
||||||
|
* Add fanout to filesystem
|
||||||
|
* Protect set of ready tasks by lock to avoid concurrent
|
||||||
|
updates
|
||||||
|
* Documentation: Update serialization page to indicate pickle
|
||||||
|
protocol version has been updated
|
||||||
|
* Use new entry_points interface
|
||||||
|
* Add `mypy` to the pipeline
|
||||||
|
* [pre-commit.ci] pre-commit autoupdate
|
||||||
|
* chore: Annotate semaphore.py
|
||||||
|
* Added possibility to serialize and deserialize binary
|
||||||
|
messages in json
|
||||||
|
* Annotate init files
|
||||||
|
* pytest~=7.1.1
|
||||||
|
* Support pymongo 4.x
|
||||||
|
* Annotate `exceptions.py` and `clocks.py`
|
||||||
|
* azure-servicebus>=7.6.1
|
||||||
|
- drop 0001-Support-redis-4.5.2.patch,
|
||||||
|
use-zoneinfo.patch, sqlalchemy-2.0.patch: upstream
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jun 11 13:48:39 UTC 2023 - ecsos <ecsos@opensuse.org>
|
Sun Jun 11 13:48:39 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
@ -16,14 +82,14 @@ Wed Apr 12 02:16:37 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
|||||||
|
|
||||||
- Add patch use-zoneinfo.patch:
|
- Add patch use-zoneinfo.patch:
|
||||||
* Use zoneinfo, rather than pytz.
|
* Use zoneinfo, rather than pytz.
|
||||||
- Switch BuildRequires to zoneinfo and timezone.
|
- Switch BuildRequires to zoneinfo and timezone.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 23 06:08:55 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
Thu Feb 23 06:08:55 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
- Add patch support-pyro-5.patch:
|
- Add patch support-pyro-5.patch:
|
||||||
* Use Pyro5's compatability layer.
|
* Use Pyro5's compatability layer.
|
||||||
- Switch BuildRequires to Pyro5.
|
- Switch BuildRequires to Pyro5.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 21 08:16:03 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
Mon Mar 21 08:16:03 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
@ -66,7 +132,7 @@ Mon Jan 3 14:16:01 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
|||||||
* prevent redis event loop stopping on ‘consumer: Cannot connect’ (#1477).
|
* prevent redis event loop stopping on ‘consumer: Cannot connect’ (#1477).
|
||||||
* Bump redis version to >= 3.4.1.
|
* Bump redis version to >= 3.4.1.
|
||||||
* try latest sqs dependencies to fix security warning.
|
* try latest sqs dependencies to fix security warning.
|
||||||
* Tests & dependency updates
|
* Tests & dependency updates
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Nov 6 18:40:20 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Sat Nov 6 18:40:20 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
@ -74,16 +140,16 @@ Sat Nov 6 18:40:20 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
|||||||
- update to 5.2.0:
|
- update to 5.2.0:
|
||||||
* stop mentioning librabbitmq
|
* stop mentioning librabbitmq
|
||||||
* Use ANY from unittest instead of case.mock
|
* Use ANY from unittest instead of case.mock
|
||||||
* fix flake8 in kombu/asynchronous/aws/connection.py
|
* fix flake8 in kombu/asynchronous/aws/connection.py
|
||||||
* Dont failfast when pypy3 tests fail
|
* Dont failfast when pypy3 tests fail
|
||||||
* Return empty list instead of InconsistencyError when exchange table is empty
|
* Return empty list instead of InconsistencyError when exchange table is empty
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 30 09:16:13 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
Wed Jun 30 09:16:13 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
- Update to 5.1.0
|
- Update to 5.1.0
|
||||||
* Add support for SQLAlchemy 1.4.
|
* Add support for SQLAlchemy 1.4.
|
||||||
* prepare_accept_content() now raises SerializerNotInstalled instead of
|
* prepare_accept_content() now raises SerializerNotInstalled instead of
|
||||||
KeyError.
|
KeyError.
|
||||||
* Wheels are no longer universal.
|
* Wheels are no longer universal.
|
||||||
* Remove python2 compatibility code
|
* Remove python2 compatibility code
|
||||||
@ -100,7 +166,7 @@ Mon Nov 16 01:50:08 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
|||||||
* Adjusted the stable documentation's version in Sphinx's configuration
|
* Adjusted the stable documentation's version in Sphinx's configuration
|
||||||
since that was overlooked in the latest release
|
since that was overlooked in the latest release
|
||||||
* BREAKING CHANGE: Dropped support for Python 2 (#1232)
|
* BREAKING CHANGE: Dropped support for Python 2 (#1232)
|
||||||
* Add an SQS transport option for custom botocore config (#1219)
|
* Add an SQS transport option for custom botocore config (#1219)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 9 06:20:03 UTC 2020 - Matthias Fehring <buschmann23@opensuse.org>
|
Thu Jul 9 06:20:03 UTC 2020 - Matthias Fehring <buschmann23@opensuse.org>
|
||||||
@ -178,14 +244,14 @@ Fri Dec 13 12:23:22 UTC 2019 - Matthias Fehring <buschmann23@opensuse.org>
|
|||||||
Tue Oct 8 08:39:47 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Tue Oct 8 08:39:47 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
- Update to 4.6.5:
|
- Update to 4.6.5:
|
||||||
- Revert _lookup api and correct redis implemetnation.
|
- Revert _lookup api and correct redis implemetnation.
|
||||||
- Major overhaul of redis test cases by adding more full featured fakeredis module.
|
- Major overhaul of redis test cases by adding more full featured fakeredis module.
|
||||||
- Add more test cases to boost coverage of kombu redis transport.
|
- Add more test cases to boost coverage of kombu redis transport.
|
||||||
- Refactor the producer consumer test cases to be based on original mocks and be passing
|
- Refactor the producer consumer test cases to be based on original mocks and be passing
|
||||||
- Fix lingering line length issue in test.
|
- Fix lingering line length issue in test.
|
||||||
- Sanitise url when include_password is false
|
- Sanitise url when include_password is false
|
||||||
- Pinned pycurl to 7.43.0.2 as it is the latest build with wheels provided
|
- Pinned pycurl to 7.43.0.2 as it is the latest build with wheels provided
|
||||||
- Bump py-amqp to 2.5.2
|
- Bump py-amqp to 2.5.2
|
||||||
- Rebase python38.patch
|
- Rebase python38.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
@ -194,7 +260,7 @@ Wed Sep 11 13:09:23 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
|||||||
- Update to 4.6.4:
|
- Update to 4.6.4:
|
||||||
- Use importlib-metadata instead of pkg_resources for better performance
|
- Use importlib-metadata instead of pkg_resources for better performance
|
||||||
- Allow users to switch URLs while omitting the resource identifier (#1032)
|
- Allow users to switch URLs while omitting the resource identifier (#1032)
|
||||||
- Don't stop receiving tasks on 503 SQS error. (#1064)
|
- Don't stop receiving tasks on 503 SQS error. (#1064)
|
||||||
- Fix maybe declare (#1066)
|
- Fix maybe declare (#1066)
|
||||||
- Revert "Revert "Use SIMEMBERS instead of SMEMBERS to check for queue (Redis Broker)
|
- Revert "Revert "Use SIMEMBERS instead of SMEMBERS to check for queue (Redis Broker)
|
||||||
- Fix MongoDB backend to work properly with TTL (#1076)
|
- Fix MongoDB backend to work properly with TTL (#1076)
|
||||||
@ -596,7 +662,7 @@ Tue Jan 21 13:48:22 UTC 2014 - dmueller@suse.com
|
|||||||
|
|
||||||
- update to 3.0.10:
|
- update to 3.0.10:
|
||||||
* Now depends on amqp 1.4.1.
|
* Now depends on amqp 1.4.1.
|
||||||
* maybe_declare now raises a “recoverable connection error”
|
* maybe_declare now raises a “recoverable connection error”
|
||||||
if the channel is disconnected
|
if the channel is disconnected
|
||||||
* Redis: Consumer.cancel() is now thread safe.
|
* Redis: Consumer.cancel() is now thread safe.
|
||||||
* Fixed “unhashable type” error on Python 3
|
* Fixed “unhashable type” error on Python 3
|
||||||
@ -665,7 +731,7 @@ Mon Sep 16 14:32:40 UTC 2013 - speilicke@suse.com
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 3 08:08:47 UTC 2013 - dmueller@suse.com
|
Tue Sep 3 08:08:47 UTC 2013 - dmueller@suse.com
|
||||||
|
|
||||||
- update to 2.5.14:
|
- update to 2.5.14:
|
||||||
* safe_str did not work properly resulting in UnicodeDecodeError
|
* safe_str did not work properly resulting in UnicodeDecodeError
|
||||||
* Now depends on amqp 1.0.13
|
* Now depends on amqp 1.0.13
|
||||||
* Fixed typo in Django functional tests.
|
* Fixed typo in Django functional tests.
|
||||||
@ -1410,7 +1476,7 @@ Tue Jan 17 01:15:23 UTC 2012 - alexandre@exatati.com.br
|
|||||||
- Producer.publish now supports automatic retry.
|
- Producer.publish now supports automatic retry.
|
||||||
- Producer.publish now supports a declare keyword argument.
|
- Producer.publish now supports a declare keyword argument.
|
||||||
Fixes
|
Fixes
|
||||||
- Redis transport: Timeout was multiplied by 1000 seconds when
|
- Redis transport: Timeout was multiplied by 1000 seconds when
|
||||||
using select for event I/O (Issue #86).
|
using select for event I/O (Issue #86).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-kombu
|
# spec file for package python-kombu
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-kombu
|
Name: python-kombu
|
||||||
Version: 5.2.4
|
Version: 5.3.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: AMQP Messaging Framework for Python
|
Summary: AMQP Messaging Framework for Python
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
@ -27,21 +27,17 @@ Source: https://files.pythonhosted.org/packages/source/k/kombu/kombu-%{v
|
|||||||
# PATCH-FIX-OPENSUSE Use Pyro4 compatibility for now, upstream should switch
|
# PATCH-FIX-OPENSUSE Use Pyro4 compatibility for now, upstream should switch
|
||||||
# for 5.3
|
# for 5.3
|
||||||
Patch0: support-pyro-5.patch
|
Patch0: support-pyro-5.patch
|
||||||
# PATCH-FIX-UPSTREAM Use zoneinfo, rather than pytz gh#celery/kombu#1680
|
|
||||||
Patch1: use-zoneinfo.patch
|
|
||||||
# PATCH-FIX-UPSTREAM gh#celery/kombu#1651
|
|
||||||
Patch2: sqlalchemy-2.0.patch
|
|
||||||
# PATCH-FIX-UPSTREAM gh#celery/kombu#1735
|
|
||||||
Patch3: 0001-Support-redis-4.5.2.patch
|
|
||||||
BuildRequires: %{python_module Brotli >= 1.0.0}
|
BuildRequires: %{python_module Brotli >= 1.0.0}
|
||||||
BuildRequires: %{python_module PyYAML >= 3.10}
|
BuildRequires: %{python_module PyYAML >= 3.10}
|
||||||
BuildRequires: %{python_module Pyro5}
|
BuildRequires: %{python_module Pyro5}
|
||||||
BuildRequires: %{python_module SQLAlchemy}
|
BuildRequires: %{python_module SQLAlchemy}
|
||||||
BuildRequires: %{python_module amqp >= 5.0.9}
|
BuildRequires: %{python_module amqp >= 5.0.9}
|
||||||
|
BuildRequires: %{python_module azure-identity >= 1.12.0}
|
||||||
BuildRequires: %{python_module backports.zoneinfo if %python-base < 3.9}
|
BuildRequires: %{python_module backports.zoneinfo if %python-base < 3.9}
|
||||||
BuildRequires: %{python_module boto3 >= 1.9.12}
|
BuildRequires: %{python_module boto3 >= 1.9.12}
|
||||||
BuildRequires: %{python_module cached-property}
|
BuildRequires: %{python_module cached-property}
|
||||||
BuildRequires: %{python_module case >= 1.5.2}
|
BuildRequires: %{python_module case >= 1.5.2}
|
||||||
|
BuildRequires: %{python_module hypothesis}
|
||||||
BuildRequires: %{python_module importlib-metadata >= 0.18}
|
BuildRequires: %{python_module importlib-metadata >= 0.18}
|
||||||
BuildRequires: %{python_module msgpack}
|
BuildRequires: %{python_module msgpack}
|
||||||
BuildRequires: %{python_module pycurl >= 7.43.0.2}
|
BuildRequires: %{python_module pycurl >= 7.43.0.2}
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
Index: kombu-5.2.4/kombu/transport/sqlalchemy/__init__.py
|
|
||||||
===================================================================
|
|
||||||
--- kombu-5.2.4.orig/kombu/transport/sqlalchemy/__init__.py
|
|
||||||
+++ kombu-5.2.4/kombu/transport/sqlalchemy/__init__.py
|
|
||||||
@@ -58,7 +58,7 @@ import threading
|
|
||||||
from json import dumps, loads
|
|
||||||
from queue import Empty
|
|
||||||
|
|
||||||
-from sqlalchemy import create_engine
|
|
||||||
+from sqlalchemy import create_engine, text
|
|
||||||
from sqlalchemy.exc import OperationalError
|
|
||||||
from sqlalchemy.orm import sessionmaker
|
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ class Channel(virtual.Channel):
|
|
||||||
def _get(self, queue):
|
|
||||||
obj = self._get_or_create(queue)
|
|
||||||
if self.session.bind.name == 'sqlite':
|
|
||||||
- self.session.execute('BEGIN IMMEDIATE TRANSACTION')
|
|
||||||
+ self.session.execute(text('BEGIN IMMEDIATE TRANSACTION'))
|
|
||||||
try:
|
|
||||||
msg = self.session.query(self.message_cls) \
|
|
||||||
.with_for_update() \
|
|
||||||
Index: kombu-5.2.4/kombu/transport/sqlalchemy/models.py
|
|
||||||
===================================================================
|
|
||||||
--- kombu-5.2.4.orig/kombu/transport/sqlalchemy/models.py
|
|
||||||
+++ kombu-5.2.4/kombu/transport/sqlalchemy/models.py
|
|
||||||
@@ -4,7 +4,7 @@ import datetime
|
|
||||||
|
|
||||||
from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer,
|
|
||||||
Sequence, SmallInteger, String, Text)
|
|
||||||
-from sqlalchemy.orm import relation
|
|
||||||
+from sqlalchemy.orm import relationship
|
|
||||||
from sqlalchemy.schema import MetaData
|
|
||||||
|
|
||||||
try:
|
|
||||||
@@ -35,7 +35,7 @@ class Queue:
|
|
||||||
|
|
||||||
@declared_attr
|
|
||||||
def messages(cls):
|
|
||||||
- return relation('Message', backref='queue', lazy='noload')
|
|
||||||
+ return relationship('Message', backref='queue', lazy='noload')
|
|
||||||
|
|
||||||
|
|
||||||
class Message:
|
|
||||||
Index: kombu-5.2.4/requirements/test.txt
|
|
||||||
===================================================================
|
|
||||||
--- kombu-5.2.4.orig/requirements/test.txt
|
|
||||||
+++ kombu-5.2.4/requirements/test.txt
|
|
||||||
@@ -1,3 +1,4 @@
|
|
||||||
-pytest~=7.0.1
|
|
||||||
+pytz
|
|
||||||
+pytest>=7.1.1
|
|
||||||
pytest-sugar
|
|
||||||
Pyro4
|
|
@ -1,87 +0,0 @@
|
|||||||
From d9e705aa1c42af24adf49ca1ef3ae339abc908dc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maxwell Muoto <41130755+max-muoto@users.noreply.github.com>
|
|
||||||
Date: Thu, 30 Mar 2023 09:32:24 -0500
|
|
||||||
Subject: [PATCH 01/30] Main
|
|
||||||
|
|
||||||
---
|
|
||||||
kombu/asynchronous/timer.py | 10 +++++-----
|
|
||||||
requirements/test.txt | 2 +-
|
|
||||||
t/unit/utils/test_json.py | 7 +++++--
|
|
||||||
3 files changed, 11 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
Index: kombu-5.2.4/kombu/asynchronous/timer.py
|
|
||||||
===================================================================
|
|
||||||
--- kombu-5.2.4.orig/kombu/asynchronous/timer.py
|
|
||||||
+++ kombu-5.2.4/kombu/asynchronous/timer.py
|
|
||||||
@@ -13,23 +13,23 @@ from vine.utils import wraps
|
|
||||||
|
|
||||||
from kombu.log import get_logger
|
|
||||||
|
|
||||||
-try:
|
|
||||||
- from pytz import utc
|
|
||||||
-except ImportError: # pragma: no cover
|
|
||||||
- utc = None
|
|
||||||
+if sys.version_info >= (3, 9):
|
|
||||||
+ from zoneinfo import ZoneInfo
|
|
||||||
+else:
|
|
||||||
+ from backports.zoneinfo import ZoneInfo
|
|
||||||
|
|
||||||
__all__ = ('Entry', 'Timer', 'to_timestamp')
|
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
|
||||||
|
|
||||||
DEFAULT_MAX_INTERVAL = 2
|
|
||||||
-EPOCH = datetime.utcfromtimestamp(0).replace(tzinfo=utc)
|
|
||||||
+EPOCH = datetime.utcfromtimestamp(0).replace(tzinfo=ZoneInfo("UTC"))
|
|
||||||
IS_PYPY = hasattr(sys, 'pypy_version_info')
|
|
||||||
|
|
||||||
scheduled = namedtuple('scheduled', ('eta', 'priority', 'entry'))
|
|
||||||
|
|
||||||
|
|
||||||
-def to_timestamp(d, default_timezone=utc, time=monotonic):
|
|
||||||
+def to_timestamp(d, default_timezone=ZoneInfo("UTC"), time=monotonic):
|
|
||||||
"""Convert datetime to timestamp.
|
|
||||||
|
|
||||||
If d' is already a timestamp, then that will be used.
|
|
||||||
Index: kombu-5.2.4/requirements/test.txt
|
|
||||||
===================================================================
|
|
||||||
--- kombu-5.2.4.orig/requirements/test.txt
|
|
||||||
+++ kombu-5.2.4/requirements/test.txt
|
|
||||||
@@ -1,4 +1,3 @@
|
|
||||||
-pytz>dev
|
|
||||||
pytest~=7.0.1
|
|
||||||
pytest-sugar
|
|
||||||
Pyro4
|
|
||||||
Index: kombu-5.2.4/t/unit/utils/test_json.py
|
|
||||||
===================================================================
|
|
||||||
--- kombu-5.2.4.orig/t/unit/utils/test_json.py
|
|
||||||
+++ kombu-5.2.4/t/unit/utils/test_json.py
|
|
||||||
@@ -3,13 +3,18 @@ from datetime import datetime
|
|
||||||
from decimal import Decimal
|
|
||||||
from unittest.mock import MagicMock, Mock
|
|
||||||
from uuid import uuid4
|
|
||||||
+import sys
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
-import pytz
|
|
||||||
|
|
||||||
from kombu.utils.encoding import str_to_bytes
|
|
||||||
from kombu.utils.json import _DecodeError, dumps, loads
|
|
||||||
|
|
||||||
+if sys.version_info >= (3, 9):
|
|
||||||
+ from zoneinfo import ZoneInfo
|
|
||||||
+else:
|
|
||||||
+ from backports.zoneinfo import ZoneInfo
|
|
||||||
+
|
|
||||||
|
|
||||||
class Custom:
|
|
||||||
|
|
||||||
@@ -24,7 +29,7 @@ class test_JSONEncoder:
|
|
||||||
|
|
||||||
def test_datetime(self):
|
|
||||||
now = datetime.utcnow()
|
|
||||||
- now_utc = now.replace(tzinfo=pytz.utc)
|
|
||||||
+ now_utc = now.replace(tzinfo=ZoneInfo("UTC"))
|
|
||||||
stripped = datetime(*now.timetuple()[:3])
|
|
||||||
serialized = loads(dumps({
|
|
||||||
'datetime': now,
|
|
Loading…
Reference in New Issue
Block a user