ae-base 0.3.39__tar.gz → 0.3.40__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ae_base
3
- Version: 0.3.39
3
+ Version: 0.3.40
4
4
  Summary: ae namespace module portion base: basic constants, helper functions and context manager
5
5
  Home-page: https://gitlab.com/ae-group/ae_base
6
6
  Author: AndiEcker
@@ -53,17 +53,17 @@ Requires-Dist: twine; extra == "tests"
53
53
 
54
54
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.94 -->
55
55
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->
56
- # base 0.3.39
56
+ # base 0.3.40
57
57
 
58
58
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_base/develop?logo=python)](
59
59
  https://gitlab.com/ae-group/ae_base)
60
60
  [![LatestPyPIrelease](
61
- https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.38?logo=python)](
62
- https://gitlab.com/ae-group/ae_base/-/tree/release0.3.38)
61
+ https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.39?logo=python)](
62
+ https://gitlab.com/ae-group/ae_base/-/tree/release0.3.39)
63
63
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_base)](
64
64
  https://pypi.org/project/ae-base/#history)
65
65
 
66
- >ae_base module 0.3.39.
66
+ >ae_base module 0.3.40.
67
67
 
68
68
  [![Coverage](https://ae-group.gitlab.io/ae_base/coverage.svg)](
69
69
  https://ae-group.gitlab.io/ae_base/coverage/index.html)
@@ -1,16 +1,16 @@
1
1
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.94 -->
2
2
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->
3
- # base 0.3.39
3
+ # base 0.3.40
4
4
 
5
5
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_base/develop?logo=python)](
6
6
  https://gitlab.com/ae-group/ae_base)
7
7
  [![LatestPyPIrelease](
8
- https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.38?logo=python)](
9
- https://gitlab.com/ae-group/ae_base/-/tree/release0.3.38)
8
+ https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.39?logo=python)](
9
+ https://gitlab.com/ae-group/ae_base/-/tree/release0.3.39)
10
10
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_base)](
11
11
  https://pypi.org/project/ae-base/#history)
12
12
 
13
- >ae_base module 0.3.39.
13
+ >ae_base module 0.3.40.
14
14
 
15
15
  [![Coverage](https://ae-group.gitlab.io/ae_base/coverage.svg)](
16
16
  https://ae-group.gitlab.io/ae_base/coverage/index.html)
@@ -3,7 +3,7 @@ basic constants, helper functions and context manager
3
3
  =====================================================
4
4
 
5
5
  this module is pure python, has no external dependencies, and is providing base constants, common helper
6
- functions and context managers.
6
+ functions, useful classes and context managers.
7
7
 
8
8
 
9
9
  base constants
@@ -24,6 +24,9 @@ the constants :data:`PACKAGE_NAME`, :data:`PACKAGE_DOMAIN` and :data:`PERMISSION
24
24
  on mobile devices. to avoid redundancies, these values get loaded from the
25
25
  :data:`build config file <BUILD_CONFIG_FILE>` - if it exists in the current working directory.
26
26
 
27
+ with the help of the format string constant :data:`NOW_STR_FORMAT` and the function :func:`now_str` you can create a
28
+ sortable and compact string from a timestamp.
29
+
27
30
 
28
31
  base helper functions
29
32
  ---------------------
@@ -99,6 +102,15 @@ code and build Kivy apps for the Android OS, and to `Gabriel Pettier <https://gi
99
102
  osc example.
100
103
 
101
104
 
105
+ types, classes and mixins
106
+ -------------------------
107
+
108
+ the :class:`UnsetType` class can be used e.g. for the declaration of optional function and method parameters,
109
+ allowing also `None` is an accepted argument value.
110
+
111
+ to extend any class with an intelligent error message property, add the mixin :class:`ErrorMsgMixin` to it.
112
+
113
+
102
114
  generic context manager
103
115
  -----------------------
104
116
 
@@ -148,7 +160,7 @@ from types import ModuleType
148
160
  from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Tuple, Union, cast
149
161
 
150
162
 
151
- __version__ = '0.3.39'
163
+ __version__ = '0.3.40'
152
164
 
153
165
 
154
166
  DOCS_FOLDER = 'docs' #: project documentation root folder name
@@ -202,7 +214,9 @@ _env_variable = re.compile(r"""
202
214
  """, re.IGNORECASE | re.VERBOSE)
203
215
 
204
216
 
205
- NAME_PARTS_SEP = '_' #: name parts separator character, e.g. for :func:`norm_name`
217
+ NAME_PARTS_SEP = '_' #: name parts separator character, e.g. for :func:`norm_name`
218
+
219
+ NOW_STR_FORMAT = "{sep}%Y%m%d{sep}%H%M%S{sep}%f" #: timestamp format of :func:`now_str`
206
220
 
207
221
  SKIPPED_MODULES = ('ae.base', 'ae.paths', 'ae.dynamicod', 'ae.core', 'ae.console', 'ae.gui_app', 'ae.gui_help',
208
222
  'ae.kivy', 'ae.kivy.apps', 'ae.kivy.behaviors', 'ae.kivy.i18n', 'ae.kivy.tours', 'ae.kivy.widgets',
@@ -612,9 +626,12 @@ def now_str(sep: str = "") -> str:
612
626
 
613
627
  :param sep: optional prefix and separator character (separating date from time and in time part
614
628
  the seconds from the microseconds).
615
- :return: UTC timestamp as string (length=20 + 3 * len(sep)).
629
+ :return: naive UTC timestamp (without timezone info) as string (length=20 + 3 * len(sep)).
616
630
  """
617
- return datetime.datetime.utcnow().strftime("{sep}%Y%m%d{sep}%H%M%S{sep}%f".format(sep=sep))
631
+ # if sys.version_info >= (3, 12):
632
+ return datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None).strftime(NOW_STR_FORMAT.format(sep=sep))
633
+ # else:
634
+ # return datetime.datetime.utcnow().strftime(NOW_STR_FORMAT.format(sep=sep))
618
635
 
619
636
 
620
637
  def os_host_name() -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ae_base
3
- Version: 0.3.39
3
+ Version: 0.3.40
4
4
  Summary: ae namespace module portion base: basic constants, helper functions and context manager
5
5
  Home-page: https://gitlab.com/ae-group/ae_base
6
6
  Author: AndiEcker
@@ -53,17 +53,17 @@ Requires-Dist: twine; extra == "tests"
53
53
 
54
54
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.94 -->
55
55
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->
56
- # base 0.3.39
56
+ # base 0.3.40
57
57
 
58
58
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_base/develop?logo=python)](
59
59
  https://gitlab.com/ae-group/ae_base)
60
60
  [![LatestPyPIrelease](
61
- https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.38?logo=python)](
62
- https://gitlab.com/ae-group/ae_base/-/tree/release0.3.38)
61
+ https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.39?logo=python)](
62
+ https://gitlab.com/ae-group/ae_base/-/tree/release0.3.39)
63
63
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_base)](
64
64
  https://pypi.org/project/ae-base/#history)
65
65
 
66
- >ae_base module 0.3.39.
66
+ >ae_base module 0.3.40.
67
67
 
68
68
  [![Coverage](https://ae-group.gitlab.io/ae_base/coverage.svg)](
69
69
  https://ae-group.gitlab.io/ae_base/coverage/index.html)
File without changes
File without changes
File without changes
File without changes