appsettings2 2.1.0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {appsettings2-2.1.0/src/appsettings2.egg-info → appsettings2-2.1.1}/PKG-INFO +1 -1
- {appsettings2-2.1.0 → appsettings2-2.1.1}/pyproject.toml +1 -1
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/ConfigurationWatcher.py +18 -18
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/__init__.py +2 -2
- {appsettings2-2.1.0 → appsettings2-2.1.1/src/appsettings2.egg-info}/PKG-INFO +1 -1
- {appsettings2-2.1.0 → appsettings2-2.1.1}/LICENSE +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/README.md +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/setup.cfg +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/Configuration.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/ConfigurationBuilder.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/ConfigurationException.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/SKILL.md +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/helpers.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/CommandLineConfigurationProvider.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/ConfigurationProvider.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/EnvironmentConfigurationProvider.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/JsonConfigurationProvider.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/TomlConfigurationProvider.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/YamlConfigurationProvider.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/__init__.py +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/py.typed +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2.egg-info/SOURCES.txt +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2.egg-info/dependency_links.txt +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2.egg-info/requires.txt +0 -0
- {appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: appsettings2
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Unifies configuration sources into a Configuration object that can be bound to complex types, or accessed directly for configuration data.
|
|
5
5
|
Author-email: Shaun Wilson <mrshaunwilson@msn.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "appsettings2"
|
|
3
|
-
version = "2.1.
|
|
3
|
+
version = "2.1.1"
|
|
4
4
|
description = "Unifies configuration sources into a Configuration object that can be bound to complex types, or accessed directly for configuration data."
|
|
5
5
|
keywords = ["appsettings", "configuration"]
|
|
6
6
|
authors = [
|
|
@@ -87,7 +87,7 @@ class ConfigurationWatcher:
|
|
|
87
87
|
self.__handler_lock = threading.Lock()
|
|
88
88
|
self.__logger = logging.getLogger(__name__)
|
|
89
89
|
|
|
90
|
-
def add_watch(self, filepath: str) ->
|
|
90
|
+
def add_watch(self, filepath: str) -> ConfigurationWatcher:
|
|
91
91
|
"""Add a file path to be watched for changes.
|
|
92
92
|
|
|
93
93
|
The path is normalised to a fully-qualified (canonical) path via
|
|
@@ -100,18 +100,18 @@ class ConfigurationWatcher:
|
|
|
100
100
|
resolved = os.path.realpath(filepath)
|
|
101
101
|
with self.__lock:
|
|
102
102
|
is_first_watch = len(self.__watches) == 0
|
|
103
|
-
if resolved in self.__watches:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
def remove_watch(self, filepath: str) ->
|
|
103
|
+
if resolved not in self.__watches:
|
|
104
|
+
self.__watches[resolved] = {
|
|
105
|
+
'path': resolved,
|
|
106
|
+
'size': None,
|
|
107
|
+
'mtime': None,
|
|
108
|
+
'state': 'pending',
|
|
109
|
+
}
|
|
110
|
+
if is_first_watch:
|
|
111
|
+
self.__start_thread()
|
|
112
|
+
return self
|
|
113
|
+
|
|
114
|
+
def remove_watch(self, filepath: str) -> ConfigurationWatcher:
|
|
115
115
|
"""Remove a previously added watch.
|
|
116
116
|
|
|
117
117
|
Silently does nothing if the watch does not exist. The polling thread
|
|
@@ -122,11 +122,11 @@ class ConfigurationWatcher:
|
|
|
122
122
|
"""
|
|
123
123
|
resolved = os.path.realpath(filepath)
|
|
124
124
|
with self.__lock:
|
|
125
|
-
if resolved
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
if resolved in self.__watches:
|
|
126
|
+
del self.__watches[resolved]
|
|
127
|
+
if len(self.__watches) == 0 and self.__thread is not None:
|
|
128
|
+
self.__drain_thread()
|
|
129
|
+
return self
|
|
130
130
|
|
|
131
131
|
def list_watches(self) -> list[str]:
|
|
132
132
|
"""Return a fresh list of all currently watched file paths.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: appsettings2
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Unifies configuration sources into a Configuration object that can be bound to complex types, or accessed directly for configuration data.
|
|
5
5
|
Author-email: Shaun Wilson <mrshaunwilson@msn.com>
|
|
6
6
|
License-Expression: MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/ConfigurationProvider.py
RENAMED
|
File without changes
|
|
File without changes
|
{appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/JsonConfigurationProvider.py
RENAMED
|
File without changes
|
{appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/TomlConfigurationProvider.py
RENAMED
|
File without changes
|
{appsettings2-2.1.0 → appsettings2-2.1.1}/src/appsettings2/providers/YamlConfigurationProvider.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|