From 174e9fc59c8dbbe962092c85b3393c41cf3302ca Mon Sep 17 00:00:00 2001 From: Tracy Boehrer Date: Tue, 30 Apr 2024 11:28:03 -0500 Subject: [PATCH 1/2] Added CosmosDB warning --- libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py b/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py index b5e29e650..6e03ae7c5 100644 --- a/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py +++ b/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py @@ -7,6 +7,7 @@ from typing import Dict, List from threading import Semaphore import json +import warnings from jsonpickle.pickler import Pickler from jsonpickle.unpickler import Unpickler import azure.cosmos.cosmos_client as cosmos_client # pylint: disable=no-name-in-module,import-error @@ -107,6 +108,7 @@ def __init__( :param config: """ super(CosmosDbStorage, self).__init__() + warnings.warn('CosmosDbStorage is obsolete. Use CosmosDbPartitionedStorage instead.') self.config = config self.client = client or cosmos_client.CosmosClient( self.config.endpoint, {"masterKey": self.config.masterkey} From 239fb90e180f284cab5327369df73a54cab0a0ce Mon Sep 17 00:00:00 2001 From: Tracy Boehrer Date: Tue, 30 Apr 2024 12:39:23 -0500 Subject: [PATCH 2/2] CosmosDBStorage black --- .../botbuilder-azure/botbuilder/azure/cosmosdb_storage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py b/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py index 6e03ae7c5..2e383666f 100644 --- a/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py +++ b/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py @@ -108,7 +108,9 @@ def __init__( :param config: """ super(CosmosDbStorage, self).__init__() - warnings.warn('CosmosDbStorage is obsolete. Use CosmosDbPartitionedStorage instead.') + warnings.warn( + "CosmosDbStorage is obsolete. Use CosmosDbPartitionedStorage instead." + ) self.config = config self.client = client or cosmos_client.CosmosClient( self.config.endpoint, {"masterKey": self.config.masterkey}