Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

### Bugs Fixed

* Fixes issue where loading configurations were slower do to returning a copy of the configurations.

### Other Changes

## 1.1.0 (2024-01-29)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -------------------------------------------------------------------------
import copy
import os
import json
import random
Expand Down Expand Up @@ -690,7 +689,7 @@ def keys(self) -> KeysView[str]:
:rtype: KeysView[str]
"""
with self._update_lock:
return copy.deepcopy(self._dict).keys()
return self._dict.keys()

def items(self) -> ItemsView[str, Union[str, Mapping[str, Any]]]:
"""
Expand All @@ -701,7 +700,7 @@ def items(self) -> ItemsView[str, Union[str, Mapping[str, Any]]]:
:rtype: ItemsView[str, Union[str, Mapping[str, Any]]]
"""
with self._update_lock:
return copy.deepcopy(self._dict).items()
return self._dict.items()

def values(self) -> ValuesView[Union[str, Mapping[str, Any]]]:
"""
Expand All @@ -713,7 +712,7 @@ def values(self) -> ValuesView[Union[str, Mapping[str, Any]]]:
:rtype: ValuesView[Union[str, Mapping[str, Any]]]
"""
with self._update_lock:
return copy.deepcopy((self._dict)).values()
return (self._dict).values()

@overload
def get(self, key: str, default: None = None) -> Union[str, JSON, None]:
Expand All @@ -734,7 +733,7 @@ def get(self, key: str, default: Optional[Union[str, JSON, _T]] = None) -> Union
:rtype: Union[str, JSON]
"""
with self._update_lock:
return copy.deepcopy(self._dict).get(key, default)
return self._dict.get(key, default)

def __eq__(self, other: Any) -> bool:
if not isinstance(other, AzureAppConfigurationProvider):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# license information.
# -------------------------------------------------------------------------
import json
import copy
from threading import Lock
import datetime
import logging
Expand Down Expand Up @@ -583,7 +582,7 @@ def keys(self) -> KeysView[str]:
:return: A list of keys loaded from Azure App Configuration.
:rtype: KeysView[str]
"""
return copy.deepcopy(self._dict).keys()
return self._dict.keys()

def items(self) -> ItemsView[str, Union[str, Mapping[str, Any]]]:
"""
Expand All @@ -593,7 +592,7 @@ def items(self) -> ItemsView[str, Union[str, Mapping[str, Any]]]:
:return: A set-like object of key-value pairs loaded from Azure App Configuration.
:rtype: ItemsView[str, Union[str, Mapping[str, Any]]]
"""
return copy.deepcopy(self._dict).items()
return self._dict.items()

def values(self) -> ValuesView[Union[str, Mapping[str, Any]]]:
"""
Expand All @@ -604,7 +603,7 @@ def values(self) -> ValuesView[Union[str, Mapping[str, Any]]]:
based on there content type.
:rtype: ValuesView[Union[str, Mapping[str, Any]]]
"""
return copy.deepcopy(self._dict).values()
return self._dict.values()

@overload
def get(self, key: str, default: None = None) -> Union[str, JSON, None]:
Expand All @@ -624,7 +623,7 @@ def get(self, key: str, default: Optional[Union[str, JSON, _T]] = None) -> Union
:return: The value of the specified key.
:rtype: Union[str, JSON]
"""
return copy.deepcopy(self._dict).get(key, default)
return self._dict.get(key, default)

def __eq__(self, other: Any) -> bool:
if not isinstance(other, AzureAppConfigurationProvider):
Expand Down