14
0

Accepting request 547681 from Application:ERP:Tryton:4.2

- update to version 3.5.1
  tests_should_pass_without_MongoDB_running.patch removed - not needed anymore

OBS-URL: https://build.opensuse.org/request/show/547681
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymongo?expand=0&rev=49
This commit is contained in:
2017-12-04 08:17:56 +00:00
committed by Git OBS Bridge
parent 68f1e24870
commit df5c713588
5 changed files with 13 additions and 39 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d359349c6c9ff9f482805f89e66e476846317dc7b1eea979d7da9c0857ee2721
size 583303

3
pymongo-3.5.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e820d93414f3bec1fa456c84afbd4af1b43ff41366321619db74e6bc065d6924
size 1332463

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Nov 25 17:07:57 UTC 2017 - axel.braun@gmx.de
- update to version 3.5.1
tests_should_pass_without_MongoDB_running.patch removed - not needed anymore
-------------------------------------------------------------------
Wed Apr 26 15:36:48 UTC 2017 - toddrme2178@gmail.com

View File

@@ -19,8 +19,9 @@
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pymongo
Version: 3.4.0
Version: 3.5.1
Release: 0
Url: http://github.com/mongodb/mongo-python-driver
Summary: Python driver for MongoDB
@@ -28,12 +29,11 @@ License: Apache-2.0
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pymongo/pymongo-%{version}.tar.gz
# PATCH-FIX-UPSTREAm -- tests_should_pass_without_MongoDB_running.patch -- https://jira.mongodb.org/browse/PYTHON-1216
Patch0: tests_should_pass_without_MongoDB_running.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Suggests: mongodb
%python_subpackages
@@ -46,7 +46,6 @@ implementation on top of pymongo.
%prep
%setup -q -n pymongo-%{version}
%patch0 -p1
%build
export CFLAGS="%{optflags}"

View File

@@ -1,31 +0,0 @@
From 6142f761e7ad7807eba0c5fcdbad78bfe364b01a Mon Sep 17 00:00:00 2001
From: Shane Harvey <shane.harvey@mongodb.com>
Date: Mon, 23 Jan 2017 13:59:01 -0800
Subject: [PATCH] PYTHON-1216 Tests should pass without MongoDB running
---
test/__init__.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/__init__.py b/test/__init__.py
index be0eea8..d012334 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -259,6 +259,8 @@ def pair(self):
@property
def has_secondaries(self):
+ if not self.client:
+ return False
return bool(len(self.client.secondaries))
def _check_user_provided(self):
@@ -375,7 +377,7 @@ def require_secondaries_count(self, count):
"""Run a test only if the client is connected to a replica set that has
`count` secondaries.
"""
- sec_count = len(self.client.secondaries)
+ sec_count = 0 if not self.client else len(self.client.secondaries)
return self._require(sec_count >= count,
"Need %d secondaries, %d available"
% (count, sec_count))