Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Rotkraut:Data
python-pysaml2
pymongo-4-support.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pymongo-4-support.patch of Package python-pysaml2
From 32a3c24ae1292ad04065aaaee6324ab9441fad8e Mon Sep 17 00:00:00 2001 From: Johan Lundberg <lundberg@sunet.se> Date: Wed, 8 Dec 2021 15:10:27 +0100 Subject: [PATCH] MongoReplicaSetClient removed in pymongo>=4 from pymongo docs: Since PyMongo 3.0, MongoReplicaSetClient has been identical to pymongo.mongo_client.MongoClient. Applications can simply replace MongoReplicaSetClient with pymongo.mongo_client.MongoClient and get the same behavior. --- src/saml2/mongo_store.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/saml2/mongo_store.py b/src/saml2/mongo_store.py index 7df1b5655..d7f834d1b 100644 --- a/src/saml2/mongo_store.py +++ b/src/saml2/mongo_store.py @@ -2,8 +2,7 @@ from hashlib import sha1 import logging -from pymongo import MongoClient -from pymongo.mongo_replica_set_client import MongoReplicaSetClient +from pymongo.mongo_client import MongoClient import pymongo.uri_parser import pymongo.errors from saml2.saml import NAMEID_FORMAT_PERSISTENT @@ -288,8 +287,6 @@ def _mdb_get_database(uri, **kwargs): _conn = MongoClient() pass else: - if "replicaset" in _parsed_uri["options"]: - connection_factory = MongoReplicaSetClient db_name = _parsed_uri.get("database", "pysaml2") _conn = connection_factory(uri, **kwargs)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor