ae-base 0.3.70__py3-none-any.whl → 0.3.72__py3-none-any.whl
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.py +22 -10
- {ae_base-0.3.70.dist-info → ae_base-0.3.72.dist-info}/METADATA +4 -4
- ae_base-0.3.72.dist-info/RECORD +7 -0
- ae_base-0.3.70.dist-info/RECORD +0 -7
- {ae_base-0.3.70.dist-info → ae_base-0.3.72.dist-info}/WHEEL +0 -0
- {ae_base-0.3.70.dist-info → ae_base-0.3.72.dist-info}/licenses/LICENSE.md +0 -0
- {ae_base-0.3.70.dist-info → ae_base-0.3.72.dist-info}/top_level.txt +0 -0
- {ae_base-0.3.70.dist-info → ae_base-0.3.72.dist-info}/zip-safe +0 -0
ae/base.py
CHANGED
|
@@ -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
|
|
@@ -1362,17 +1371,20 @@ def url_failure(url: str, token: str = "", username: str = "", password: str = "
|
|
|
1362
1371
|
return f"{exception.code} {mask_url(url)} raised HTTPError {exception.reason=}"
|
|
1363
1372
|
|
|
1364
1373
|
except URLError as exception:
|
|
1365
|
-
|
|
1374
|
+
err_msg = f" {mask_url(url)} raised {exception.errno=} {exception.reason=};"
|
|
1366
1375
|
if isinstance(exception.reason, socket.gaierror):
|
|
1367
|
-
return f"{
|
|
1368
|
-
if isinstance(exception.reason, socket.timeout):
|
|
1369
|
-
return f"{err_prefix} connection timed out after {timeout} seconds"
|
|
1376
|
+
return '995' + f"{err_msg} could not resolve hostname"
|
|
1370
1377
|
if isinstance(exception.reason, ssl.SSLCertVerificationError):
|
|
1371
|
-
return f"{
|
|
1372
|
-
|
|
1378
|
+
return '996' + f"{err_msg} SSL certificate verification failed"
|
|
1379
|
+
if isinstance(exception.reason, socket.timeout):
|
|
1380
|
+
return '997' + f"{err_msg} connection timed out after {timeout} seconds"
|
|
1381
|
+
return '998' + f"{err_msg} could not reach the server"
|
|
1382
|
+
|
|
1383
|
+
except socket.timeout as _exception: # noqa: F841 # str(_exception) could contain password|token
|
|
1384
|
+
return '997' + f" {mask_url(url)} raised socket-timeout exception after {timeout} seconds"
|
|
1373
1385
|
|
|
1374
|
-
except Exception:
|
|
1375
|
-
return f"
|
|
1386
|
+
except Exception as _exception: # noqa: F841 # pylint: disable=broad-exception-caught
|
|
1387
|
+
return '999' + f" {mask_url(url)} raised unexpected exception" # str(_exception) COULD contain password
|
|
1376
1388
|
|
|
1377
1389
|
|
|
1378
1390
|
def utc_datetime() -> datetime.datetime:
|
|
@@ -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
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ae/base.py,sha256=0NKSAHkG6T29LaCikwt6ue0zY-4jplfdrZX6S-6rxXw,79222
|
|
2
|
+
ae_base-0.3.72.dist-info/licenses/LICENSE.md,sha256=0g3tHWG2bfmLGyuM0e0YzSXT8As8eN1b0VQIqXMWTMg,35003
|
|
3
|
+
ae_base-0.3.72.dist-info/METADATA,sha256=h0FJQKWlITisLG2YVNW3O-tZ_BRCLRVB-LpUTpdxjyU,5470
|
|
4
|
+
ae_base-0.3.72.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
+
ae_base-0.3.72.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
+
ae_base-0.3.72.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
+
ae_base-0.3.72.dist-info/RECORD,,
|
ae_base-0.3.70.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
ae/base.py,sha256=hIgo28nJJr6rMV-KLvnfiAREF0wZx5EhQgnGhOANAJs,78705
|
|
2
|
-
ae_base-0.3.70.dist-info/licenses/LICENSE.md,sha256=0g3tHWG2bfmLGyuM0e0YzSXT8As8eN1b0VQIqXMWTMg,35003
|
|
3
|
-
ae_base-0.3.70.dist-info/METADATA,sha256=HjSggbiVRRnU89mVsTmMUlizZtKTNkxfYz6mo7qVspM,5470
|
|
4
|
-
ae_base-0.3.70.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
-
ae_base-0.3.70.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
-
ae_base-0.3.70.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
-
ae_base-0.3.70.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|