#6 kombu 4.6.9
Merged 2 years ago by frantisekz. Opened 2 years ago by frantisekz.
rpms/ frantisekz/python-kombu kombu_4_6_9  into  master

@@ -0,0 +1,53 @@ 

+ From 255b85229b7395b7424a26eac0ab79fb813d596e Mon Sep 17 00:00:00 2001

+ From: Conor Stevenson <c.stevenson@outlook.com>

+ Date: Mon, 1 Jun 2020 22:23:05 +0100

+ Subject: [PATCH] set _connection in _ensure_connection (#1205)

+ 

+ Co-authored-by: Conor Stevenson <conor@lendingblock.com>

+ ---

+  kombu/connection.py       | 5 +++--

+  t/unit/test_connection.py | 2 ++

+  2 files changed, 5 insertions(+), 2 deletions(-)

+ 

+ diff --git a/kombu/connection.py b/kombu/connection.py

+ index 989a58682..5922c0187 100644

+ --- a/kombu/connection.py

+ +++ b/kombu/connection.py

+ @@ -434,12 +434,13 @@ def on_error(exc, intervals, retries, interval=0):

+          if not reraise_as_library_errors:

+              ctx = self._dummy_context

+          with ctx():

+ -            return retry_over_time(

+ +            self._connection = retry_over_time(

+                  self._connection_factory, self.recoverable_connection_errors,

+                  (), {}, on_error, max_retries,

+                  interval_start, interval_step, interval_max,

+                  callback, timeout=timeout

+              )

+ +            return self._connection

+  

+      @contextmanager

+      def _reraise_as_library_errors(

+ @@ -860,7 +861,7 @@ def connection(self):

+          if not self._closed:

+              if not self.connected:

+                  conn_opts = self._extract_failover_opts()

+ -                self._connection = self._ensure_connection(**conn_opts)

+ +                self._ensure_connection(**conn_opts)

+              return self._connection

+  

+      def _connection_factory(self):

+ diff --git a/t/unit/test_connection.py b/t/unit/test_connection.py

+ index 017dfae49..8a39855c6 100644

+ --- a/t/unit/test_connection.py

+ +++ b/t/unit/test_connection.py

+ @@ -131,7 +131,9 @@ def setup(self):

+  

+      def test_establish_connection(self):

+          conn = self.conn

+ +        assert not conn.connected

+          conn.connect()

+ +        assert conn.connected

+          assert conn.connection.connected

+          assert conn.host == 'localhost:5672'

+          channel = conn.channel()

@@ -1,37 +0,0 @@ 

- From 97e887605b21a110e0ec304913930a8115987c6a Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

- Date: Tue, 3 Dec 2019 02:57:07 +0100

- Subject: [PATCH] Use importlib.metadata from the standard library on Python

-  3.8+ (#1086)

- 

- ---

-  kombu/utils/compat.py    | 6 +++++-

-  requirements/default.txt | 3 ++-

-  2 files changed, 7 insertions(+), 2 deletions(-)

- 

- diff --git a/kombu/utils/compat.py b/kombu/utils/compat.py

- index c5f0bf118..a741c4350 100644

- --- a/kombu/utils/compat.py

- +++ b/kombu/utils/compat.py

- @@ -7,7 +7,11 @@

-  from functools import wraps

-  

-  from contextlib import contextmanager

- -import importlib_metadata

- +

- +try:

- +    from importlib import metadata as importlib_metadata

- +except ImportError:

- +    import importlib_metadata

-  

-  from kombu.five import reraise

-  

- diff --git a/requirements/default.txt b/requirements/default.txt

- index 67311143c..bf121e54c 100644

- --- a/requirements/default.txt

- +++ b/requirements/default.txt

- @@ -1,2 +1,3 @@

- +importlib-metadata>=0.18; python_version<"3.8"

-  amqp>=2.5.2,<2.6

- -importlib-metadata>=0.18

- +

file modified
+20 -9
@@ -13,8 +13,8 @@ 

  %global srcname kombu

  

  Name:           python-%{srcname}

- Version:        4.6.6

- Release:        4%{?dist}

+ Version:        4.6.9

+ Release:        1%{?dist}

  Epoch:          1

  Summary:        An AMQP Messaging Framework for Python

  
@@ -23,8 +23,8 @@ 

  URL:            http://kombu.readthedocs.org/

  Source0:        https://github.com/celery/kombu/archive/%{version}/%{srcname}-%{version}.tar.gz

  

- # [PATCH] Use importlib.metadata from the standard library on Python 3.8+

- Patch0001:      https://github.com/celery/kombu/commit/97e887605b21a110e0ec304913930a8115987c6a.patch

+ # set _connection in _ensure_connection (#1205)

+ Patch0001:      https://github.com/celery/kombu/commit/255b85229b7395b7424a26eac0ab79fb813d596e.patch

  

  BuildArch: noarch

  
@@ -103,6 +103,9 @@ 

  BuildRequires:  python3-vine

  BuildRequires:  python3-case

  BuildRequires:  python3-pytz

+ BuildRequires:  python3-sqlalchemy

+ BuildRequires:  python3-boto3

+ BuildRequires:  python3-pytest

  %endif

  %{?python_provide:%python_provide python3-%{srcname}}

  
@@ -129,12 +132,14 @@ 

  %{?with_python2:%py2_install}

  

  %check

- # test requires python-vine, which is not packaged yet

- # py.test -xv --cov=kombu --cov-report=xml --no-cov-on-fail

+ %if %{with tests}

+ # python3-pyro is outdated and FTI in Fedora, ignore pyro tests

+ py.test-3 --ignore=t/unit/transport/test_pyro.py

+ %endif

  

  %if %{with python2}

  %files -n python2-%{srcname}

- %doc AUTHORS Changelog FAQ READ* THANKS TODO examples/

+ %doc AUTHORS FAQ READ* THANKS TODO examples/

  %license LICENSE

  %{python2_sitelib}/%{srcname}

  %{python2_sitelib}/%{srcname}*.egg-info
@@ -142,13 +147,19 @@ 

  

  %if %{with python3}

  %files -n python3-%{srcname}

- %doc AUTHORS Changelog FAQ READ* THANKS TODO examples/

+ %doc AUTHORS FAQ READ* THANKS TODO examples/

  %license LICENSE

  %{python3_sitelib}/%{srcname}

  %{python3_sitelib}/%{srcname}*.egg-info

  %endif

  

  %changelog

+ * Mon Jun 01 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 1:4.6.9-1

+ - kombu 4.6.9

+ 

+ * Mon Jun 01 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 1:4.6.6-5

+ - Enable testsuite as python-vine is now packaged

+ 

  * Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 1:4.6.6-4

  - Rebuilt for Python 3.9

  
@@ -350,7 +361,7 @@ 

  - Update to 3.0.8 (rhbz#1037549)

  

  * Fri Nov 22 2013 Matthias Runge <mrunge@redhat.com> - 3.0.6-1

- - Update to 3.0.6 and enable tests for py3 as well 

+ - Update to 3.0.6 and enable tests for py3 as well

  

  * Sun Nov 17 2013 Fabian Affolter <mail@fabian-affolter.ch> - 3.0.5-1

  - Updated to latest upstream version 3.0.5 (rhbz#1024916)

I'll update python-celery once is this and billiard update[0] merged.

[0] https://src.fedoraproject.org/rpms/python-billiard/pull-request/3

2 new commits added

  • kombu 4.6.9
  • Enable tests as python-vine is now packaged
2 years ago

2 new commits added

  • kombu 4.6.9
  • Enable tests as python-vine is now packaged
2 years ago

rebased onto 6705438

2 years ago

Pull-Request has been merged by frantisekz

2 years ago