ae-base 0.3.71__tar.gz → 0.3.72__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.
- {ae_base-0.3.71/ae_base.egg-info → ae_base-0.3.72}/PKG-INFO +4 -4
- {ae_base-0.3.71 → ae_base-0.3.72}/README.md +3 -3
- {ae_base-0.3.71 → ae_base-0.3.72}/ae/base.py +11 -2
- {ae_base-0.3.71 → ae_base-0.3.72/ae_base.egg-info}/PKG-INFO +4 -4
- {ae_base-0.3.71 → ae_base-0.3.72}/setup.py +4 -4
- {ae_base-0.3.71 → ae_base-0.3.72}/tests/test_base.py +18 -9
- {ae_base-0.3.71 → ae_base-0.3.72}/LICENSE.md +0 -0
- {ae_base-0.3.71 → ae_base-0.3.72}/ae_base.egg-info/SOURCES.txt +0 -0
- {ae_base-0.3.71 → ae_base-0.3.72}/ae_base.egg-info/dependency_links.txt +0 -0
- {ae_base-0.3.71 → ae_base-0.3.72}/ae_base.egg-info/requires.txt +0 -0
- {ae_base-0.3.71 → ae_base-0.3.72}/ae_base.egg-info/top_level.txt +0 -0
- {ae_base-0.3.71 → ae_base-0.3.72}/ae_base.egg-info/zip-safe +0 -0
- {ae_base-0.3.71 → ae_base-0.3.72}/pyproject.toml +0 -0
- {ae_base-0.3.71 → ae_base-0.3.72}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_base
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.72
|
|
4
4
|
Summary: ae namespace module portion base: basic constants, helper functions and context managers
|
|
5
5
|
Home-page: https://gitlab.com/ae-group/ae_base
|
|
6
6
|
Author: AndiEcker
|
|
@@ -65,13 +65,13 @@ Dynamic: summary
|
|
|
65
65
|
|
|
66
66
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.97 -->
|
|
67
67
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.19 -->
|
|
68
|
-
# base 0.3.
|
|
68
|
+
# base 0.3.72
|
|
69
69
|
|
|
70
70
|
[](
|
|
71
71
|
https://gitlab.com/ae-group/ae_base)
|
|
72
72
|
[](
|
|
74
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.72)
|
|
75
75
|
[](
|
|
76
76
|
https://pypi.org/project/ae-base/#history)
|
|
77
77
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.97 -->
|
|
2
2
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.19 -->
|
|
3
|
-
# base 0.3.
|
|
3
|
+
# base 0.3.72
|
|
4
4
|
|
|
5
5
|
[](
|
|
6
6
|
https://gitlab.com/ae-group/ae_base)
|
|
7
7
|
[](
|
|
9
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.72)
|
|
10
10
|
[](
|
|
11
11
|
https://pypi.org/project/ae-base/#history)
|
|
12
12
|
|
|
@@ -246,7 +246,7 @@ from types import ModuleType
|
|
|
246
246
|
from typing import Any, Callable, Generator, Iterable, MutableMapping, Optional, Union, cast
|
|
247
247
|
|
|
248
248
|
|
|
249
|
-
__version__ = '0.3.
|
|
249
|
+
__version__ = '0.3.72'
|
|
250
250
|
|
|
251
251
|
|
|
252
252
|
os_path_abspath = os.path.abspath
|
|
@@ -1048,8 +1048,17 @@ def parse_dotenv(file_path: str) -> dict[str, str]:
|
|
|
1048
1048
|
:param file_path: string with the name/path of an existing ``.env``/:data:`DOTENV_FILE_NAME` file.
|
|
1049
1049
|
:return: dict with environment variable names and values
|
|
1050
1050
|
"""
|
|
1051
|
-
|
|
1051
|
+
lines = [] # unwrap multi-line .env variable values with backslash at line end (Docker/UNIX-style format)
|
|
1052
|
+
prev_lines = ""
|
|
1052
1053
|
for line in cast(str, read_file(file_path)).splitlines():
|
|
1054
|
+
if line.endswith('\\'):
|
|
1055
|
+
prev_lines += line[:-1]
|
|
1056
|
+
continue
|
|
1057
|
+
lines.append(prev_lines + line)
|
|
1058
|
+
prev_lines = ""
|
|
1059
|
+
|
|
1060
|
+
env_vars: dict[str, str] = {}
|
|
1061
|
+
for line in lines:
|
|
1053
1062
|
match = _env_line.search(line)
|
|
1054
1063
|
if not match:
|
|
1055
1064
|
if not re.search(r'^\s*(?:#.*)?$', line): # not comment or blank
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_base
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.72
|
|
4
4
|
Summary: ae namespace module portion base: basic constants, helper functions and context managers
|
|
5
5
|
Home-page: https://gitlab.com/ae-group/ae_base
|
|
6
6
|
Author: AndiEcker
|
|
@@ -65,13 +65,13 @@ Dynamic: summary
|
|
|
65
65
|
|
|
66
66
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.97 -->
|
|
67
67
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.19 -->
|
|
68
|
-
# base 0.3.
|
|
68
|
+
# base 0.3.72
|
|
69
69
|
|
|
70
70
|
[](
|
|
71
71
|
https://gitlab.com/ae-group/ae_base)
|
|
72
72
|
[](
|
|
74
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.72)
|
|
75
75
|
[](
|
|
76
76
|
https://pypi.org/project/ae-base/#history)
|
|
77
77
|
|
|
@@ -25,13 +25,13 @@ setup_kwargs = {
|
|
|
25
25
|
'license': 'GPL-3.0-or-later',
|
|
26
26
|
'long_description': ('<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.97 -->\n'
|
|
27
27
|
'<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.19 -->\n'
|
|
28
|
-
'# base 0.3.
|
|
28
|
+
'# base 0.3.72\n'
|
|
29
29
|
'\n'
|
|
30
30
|
'[](\n'
|
|
31
31
|
' https://gitlab.com/ae-group/ae_base)\n'
|
|
32
32
|
'[](\n'
|
|
34
|
+
' https://gitlab.com/ae-group/ae_base/-/tree/release0.3.72)\n'
|
|
35
35
|
'[](\n'
|
|
36
36
|
' https://pypi.org/project/ae-base/#history)\n'
|
|
37
37
|
'\n'
|
|
@@ -108,7 +108,7 @@ setup_kwargs = {
|
|
|
108
108
|
'Source': 'https://ae.readthedocs.io/en/latest/_modules/ae/base.html'},
|
|
109
109
|
'python_requires': '>=3.9',
|
|
110
110
|
'url': 'https://gitlab.com/ae-group/ae_base',
|
|
111
|
-
'version': '0.3.
|
|
111
|
+
'version': '0.3.72',
|
|
112
112
|
'zip_safe': True,
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -846,6 +846,24 @@ class TestBaseHelpers:
|
|
|
846
846
|
loaded = parse_dotenv(fp.name)
|
|
847
847
|
assert 'var_nam' not in loaded # added warning
|
|
848
848
|
|
|
849
|
+
def test_parse_dotenv_literal_dict_with_list(self):
|
|
850
|
+
with tempfile.NamedTemporaryFile(mode="w") as fp:
|
|
851
|
+
var_val = "{'key': {'sub-key': ['list-item', 'list-item with = char', ]}}"
|
|
852
|
+
fp.write("var_nam=" + var_val)
|
|
853
|
+
fp.seek(0)
|
|
854
|
+
loaded = parse_dotenv(fp.name)
|
|
855
|
+
assert 'var_nam' in loaded
|
|
856
|
+
assert loaded['var_nam'] == var_val
|
|
857
|
+
|
|
858
|
+
def test_parse_dotenv_multi_line_var_value(self):
|
|
859
|
+
with tempfile.NamedTemporaryFile(mode="w") as fp:
|
|
860
|
+
var_val = "{'key': {'sub-key':\\\n ['list-item',\\\n 'list-item with = char', ]}}"
|
|
861
|
+
fp.write("var_nam=" + var_val)
|
|
862
|
+
fp.seek(0)
|
|
863
|
+
loaded = parse_dotenv(fp.name)
|
|
864
|
+
assert 'var_nam' in loaded
|
|
865
|
+
assert loaded['var_nam'] == var_val.replace('\\\n', "")
|
|
866
|
+
|
|
849
867
|
def test_parse_dotenv_single_in_double_quoted_value(self):
|
|
850
868
|
with tempfile.NamedTemporaryFile(mode="w") as fp:
|
|
851
869
|
fp.write('''var_nam="'var val'"''')
|
|
@@ -862,15 +880,6 @@ class TestBaseHelpers:
|
|
|
862
880
|
assert 'var_nam' in loaded
|
|
863
881
|
assert loaded['var_nam'] == "var val"
|
|
864
882
|
|
|
865
|
-
def test_parse_dotenv_literal_dict_with_list(self):
|
|
866
|
-
with tempfile.NamedTemporaryFile(mode="w") as fp:
|
|
867
|
-
var_val = "{'key': {'sub-key': ['list-item', 'list-item with = char', ]}}"
|
|
868
|
-
fp.write("var_nam=" + var_val)
|
|
869
|
-
fp.seek(0)
|
|
870
|
-
loaded = parse_dotenv(fp.name)
|
|
871
|
-
assert 'var_nam' in loaded
|
|
872
|
-
assert loaded['var_nam'] == var_val
|
|
873
|
-
|
|
874
883
|
def test_parse_dotenv_literal_dict_with_list_quoted(self):
|
|
875
884
|
with tempfile.NamedTemporaryFile(mode="w") as fp:
|
|
876
885
|
var_val = "{'key': {'sub-key': ['list-item', 'list-item with = char']}}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|