Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-kombu for openSUSE:Factory checked in at 2023-04-12 12:52:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-kombu (Old) and /work/SRC/openSUSE:Factory/.python-kombu.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-kombu" Wed Apr 12 12:52:07 2023 rev:77 rq:1078545 version:5.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-kombu/python-kombu.changes 2023-02-23 16:46:44.998812437 +0100 +++ /work/SRC/openSUSE:Factory/.python-kombu.new.19717/python-kombu.changes 2023-04-12 12:52:08.489121723 +0200 @@ -1,0 +2,7 @@ +Wed Apr 12 02:16:37 UTC 2023 - Steve Kowalik <[email protected]> + +- Add patch use-zoneinfo.patch: + * Use zoneinfo, rather than pytz. +- Switch BuildRequires to zoneinfo and timezone. + +------------------------------------------------------------------- New: ---- use-zoneinfo.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-kombu.spec ++++++ --- /var/tmp/diff_new_pack.hDaL47/_old 2023-04-12 12:52:08.981124598 +0200 +++ /var/tmp/diff_new_pack.hDaL47/_new 2023-04-12 12:52:08.985124622 +0200 @@ -26,11 +26,14 @@ # PATCH-FIX-OPENSUSE Use Pyro4 compatibility for now, upstream should switch # for 5.3 Patch0: support-pyro-5.patch +# PATCH-FIX-UPSTREAM Use zoneinfo, rather than pytz gh#celery/kombu#1680 +Patch1: use-zoneinfo.patch BuildRequires: %{python_module Brotli >= 1.0.0} BuildRequires: %{python_module PyYAML >= 3.10} BuildRequires: %{python_module Pyro5} BuildRequires: %{python_module SQLAlchemy} BuildRequires: %{python_module amqp >= 5.0.9} +BuildRequires: %{python_module backports.zoneinfo if %python-base < 3.9} BuildRequires: %{python_module boto3 >= 1.9.12} BuildRequires: %{python_module cached-property} BuildRequires: %{python_module case >= 1.5.2} @@ -38,12 +41,12 @@ BuildRequires: %{python_module msgpack} BuildRequires: %{python_module pycurl >= 7.43.0.2} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module pytz} BuildRequires: %{python_module redis >= 3.4.1} BuildRequires: %{python_module setuptools >= 20.6.7} BuildRequires: %{python_module vine} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: timezone Requires: python-amqp >= 5.0.9 Requires: python-cached-property Requires: python-importlib-metadata >= 0.18 ++++++ use-zoneinfo.patch ++++++ >From d9e705aa1c42af24adf49ca1ef3ae339abc908dc Mon Sep 17 00:00:00 2001 From: Maxwell Muoto <[email protected]> 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,
