[Python-modules-commits] r32625 - in packages/kombu/trunk/debian/patches (2 files)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Fri May 8 12:26:03 UTC 2015


    Date: Friday, May 8, 2015 @ 12:26:02
  Author: fladi-guest
Revision: 32625

Add fix_test_pymongo_uri_options.patch to fix pymongo URI related test.

Added:
  packages/kombu/trunk/debian/patches/fix_test_pymongo_uri_options.patch
Modified:
  packages/kombu/trunk/debian/patches/series

Added: packages/kombu/trunk/debian/patches/fix_test_pymongo_uri_options.patch
===================================================================
--- packages/kombu/trunk/debian/patches/fix_test_pymongo_uri_options.patch	                        (rev 0)
+++ packages/kombu/trunk/debian/patches/fix_test_pymongo_uri_options.patch	2015-05-08 12:26:02 UTC (rev 32625)
@@ -0,0 +1,49 @@
+Description: The pymongo "safe" option has been deprecated.
+ Use a different boolean option for tests of pymongo URI handling.
+Origin: https://github.com/celery/kombu/commit/8e6aed9fcf978b6c34108c0d37b720bd125f0352
+Last-Update: 2015-05-08
+
+From 8e6aed9fcf978b6c34108c0d37b720bd125f0352 Mon Sep 17 00:00:00 2001
+From: Ask Solem <ask at celeryproject.org>
+Date: Thu, 7 May 2015 14:06:31 +0100
+Subject: [PATCH] Fixes mongodb tests
+
+---
+ kombu/tests/transport/test_mongodb.py | 4 ++--
+ kombu/transport/mongodb.py            | 5 +++++
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/kombu/tests/transport/test_mongodb.py
++++ b/kombu/tests/transport/test_mongodb.py
+@@ -64,12 +64,12 @@
+ 
+     @skip_if_not_module('pymongo')
+     def test_options(self):
+-        url = 'mongodb://localhost,localhost2:29017/dbname?safe=true'
++        url = 'mongodb://localhost,localhost2:29017/dbname?tz_aware=true'
+         c = self._get_connection(url)
+ 
+         hostname, dbname, options = c.channels[0]._parse_uri()
+ 
+-        self.assertEqual(options['safe'], True)
++        self.assertEqual(options['tz_aware'], True)
+ 
+     @skip_if_not_module('pymongo')
+     def test_real_connections(self):
+--- a/kombu/transport/mongodb.py
++++ b/kombu/transport/mongodb.py
+@@ -172,9 +172,14 @@
+ 
+         return hostname, dbname, options
+ 
++    def _prepare_client_options(self, options):
++        if pymongo.version_tuple >= (3, ):
++            options.pop('auto_start_request', None)
++
+     def _open(self, scheme='mongodb://'):
+         hostname, dbname, options = self._parse_uri(scheme=scheme)
+ 
++        self._prepare_client_options(options)
+         mongoconn = MongoClient(
+             host=hostname, ssl=options['ssl'],
+             auto_start_request=options['auto_start_request'],

Modified: packages/kombu/trunk/debian/patches/series
===================================================================
--- packages/kombu/trunk/debian/patches/series	2015-05-08 12:25:17 UTC (rev 32624)
+++ packages/kombu/trunk/debian/patches/series	2015-05-08 12:26:02 UTC (rev 32625)
@@ -1 +1,2 @@
 remove_logo.patch
+fix_test_pymongo_uri_options.patch




More information about the Python-modules-commits mailing list