moat-src 0.8.5__py3-none-any.whl → 0.8.10__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.
Files changed (31) hide show
  1. moat/src/_cfg.yaml +2 -0
  2. moat/src/_main.py +286 -196
  3. moat/src/_templates/moat/_main.py +23 -0
  4. moat/src/test.py +1 -1
  5. {moat_src-0.8.5.dist-info → moat_src-0.8.10.dist-info}/METADATA +2 -2
  6. moat_src-0.8.10.dist-info/RECORD +14 -0
  7. {moat_src-0.8.5.dist-info → moat_src-0.8.10.dist-info}/WHEEL +1 -1
  8. moat_src-0.8.10.dist-info/top_level.txt +1 -0
  9. build/lib/moat/src/__init__.py +0 -0
  10. build/lib/moat/src/_main.py +0 -1113
  11. build/lib/moat/src/_templates/moat/__init__.py +0 -3
  12. build/lib/moat/src/inspect.py +0 -65
  13. build/lib/moat/src/test.py +0 -89
  14. debian/.gitignore +0 -8
  15. debian/changelog +0 -78
  16. debian/control +0 -20
  17. debian/moat-src/usr/lib/python3/dist-packages/moat/src/__init__.py +0 -0
  18. debian/moat-src/usr/lib/python3/dist-packages/moat/src/_main.py +0 -1113
  19. debian/moat-src/usr/lib/python3/dist-packages/moat/src/_templates/moat/__init__.py +0 -3
  20. debian/moat-src/usr/lib/python3/dist-packages/moat/src/_templates/pyproject.default.yaml +0 -146
  21. debian/moat-src/usr/lib/python3/dist-packages/moat/src/_templates/pyproject.forced.yaml +0 -77
  22. debian/moat-src/usr/lib/python3/dist-packages/moat/src/inspect.py +0 -65
  23. debian/moat-src/usr/lib/python3/dist-packages/moat/src/test.py +0 -89
  24. debian/rules +0 -10
  25. moat/src/_templates/pyproject.default.yaml +0 -146
  26. moat/src/_templates/pyproject.forced.yaml +0 -77
  27. moat_src-0.8.5.dist-info/RECORD +0 -30
  28. moat_src-0.8.5.dist-info/top_level.txt +0 -4
  29. {build/lib/moat/src/_templates → moat/src/_templates/packaging}/pyproject.default.yaml +0 -0
  30. {build/lib/moat/src/_templates → moat/src/_templates/packaging}/pyproject.forced.yaml +0 -0
  31. {moat_src-0.8.5.dist-info → moat_src-0.8.10.dist-info}/licenses/LICENSE.txt +0 -0
@@ -1,3 +0,0 @@
1
- from __future__ import annotations
2
-
3
- __path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -1,65 +0,0 @@
1
- """
2
- This Trio inspector is geared towards figuring out why the *censored* a
3
- task is cancelled when no exception shows up.
4
-
5
- """
6
-
7
- from __future__ import annotations
8
-
9
- import inspect
10
- import logging
11
-
12
- from asyncscope import scope as sc
13
-
14
- logger = logging.getLogger("trio.inspect")
15
-
16
-
17
- def debug(*a):
18
- "logging helper"
19
- s = sc.get()
20
- (logger if s is None else s.logger).debug(*a)
21
-
22
-
23
- class CancelTracer:
24
- """A Trio inspect module that helps tracking cancel scopes"""
25
-
26
- # pylint: disable=missing-function-docstring,protected-access
27
- def __init__(self):
28
- pass
29
-
30
- def skip(self, scope):
31
- if scope._stack is None:
32
- return True
33
- if scope._stack[5].f_code.co_name == "connect_tcp":
34
- return True
35
- return False
36
-
37
- def scope_entered(self, scope):
38
- scope._stack = s = []
39
- f = inspect.currentframe().f_back
40
- while f:
41
- s.append(f)
42
- f = f.f_back
43
-
44
- if self.skip(scope):
45
- return
46
-
47
- debug("EnterCS %r", scope)
48
-
49
- def scope_exited(self, scope):
50
- if self.skip(scope):
51
- return
52
- debug("ExitCS %r", scope)
53
-
54
- def scope_cancelled(self, scope, reason):
55
- if self.skip(scope):
56
- return
57
- # if reason.value == 0:
58
- # breakpoint()
59
- debug("KillCS %r %s", scope, reason.name)
60
-
61
- def task_spawned(self, task):
62
- debug("EnterT %r", task)
63
-
64
- def task_exited(self, task):
65
- debug("ExitT %r", task)
@@ -1,89 +0,0 @@
1
- """
2
- MoaT test support
3
- """
4
-
5
- from __future__ import annotations
6
-
7
- import io
8
- import logging
9
- import shlex
10
- import sys
11
- from contextlib import contextmanager
12
-
13
- from asyncscope import main_scope, scope
14
- from moat.util import OptCtx, attrdict, wrap_main # pylint:disable=no-name-in-module
15
-
16
- logger = logging.getLogger(__name__)
17
-
18
-
19
- async def run(*args, expect_exit=0, do_stdout=True):
20
- """Call a MoaT command handler"""
21
- args = ("-c", "/dev/null", *args)
22
- CFG = {} # load_cfg("moat")
23
-
24
- if do_stdout:
25
- CFG["_stdout"] = out = io.StringIO()
26
- logger.debug(" moat %s", " ".join(shlex.quote(str(x)) for x in args))
27
- try:
28
- res = None
29
- async with (
30
- OptCtx(main_scope(name="run") if scope.get() is None else None),
31
- scope.using_scope(),
32
- ):
33
- res = await wrap_main(
34
- args=args,
35
- wrap=True,
36
- CFG=CFG,
37
- cfg=False,
38
- name="moat",
39
- sub_pre="moat",
40
- sub_post="_main.cli",
41
- )
42
- if res is None:
43
- res = attrdict()
44
- return res
45
- except SystemExit as exc:
46
- res = exc
47
- assert exc.code == expect_exit, exc.code
48
- return exc
49
- except Exception as exc:
50
- while isinstance(exc, ExceptionGroup) and len(exc.exceptions) == 1:
51
- exc = exc.exceptions[0]
52
- raise exc
53
- except BaseException as exc:
54
- res = exc
55
- raise
56
- else:
57
- assert expect_exit == 0
58
- return res
59
- finally:
60
- if do_stdout:
61
- if res is not None:
62
- res.stdout = out.getvalue()
63
- CFG["_stdout"] = sys.stdout
64
-
65
-
66
- class DidNotRaise(Exception):
67
- pass
68
-
69
-
70
- @contextmanager
71
- def raises(*exc):
72
- """
73
- Like pytest.raises, but handles exception groups
74
- """
75
- res = attrdict()
76
- try:
77
- yield res
78
- except exc as e:
79
- res.value = e
80
- except ExceptionGroup as e:
81
- while isinstance(e, ExceptionGroup) and len(e.exceptions) == 1:
82
- e = e.exceptions[0]
83
- res.value = e
84
- if isinstance(e, exc):
85
- return
86
- raise
87
- else:
88
- res.value = None
89
- raise DidNotRaise(exc)
debian/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /files
2
- /*.log
3
- /*.debhelper
4
- /*.debhelper-build-stamp
5
- /*.substvars
6
- /debhelper-build-stamp
7
- /moat-src
8
- /*.service
debian/changelog DELETED
@@ -1,78 +0,0 @@
1
- moat-src (0.8.5-1) unstable; urgency=medium
2
-
3
- * New release for 25.0.8
4
-
5
- -- Matthias Urlichs <matthias@urlichs.de> Sun, 23 Mar 2025 14:42:53 +0100
6
-
7
- moat-src (0.8.4-1) unstable; urgency=medium
8
-
9
- * New release for 25.0.7
10
-
11
- -- Matthias Urlichs <matthias@urlichs.de> Fri, 21 Mar 2025 21:57:15 +0100
12
-
13
- moat-src (0.8.3-1) unstable; urgency=medium
14
-
15
- * New release for 25.0.6
16
-
17
- -- Matthias Urlichs <matthias@urlichs.de> Fri, 21 Mar 2025 21:51:18 +0100
18
-
19
- moat-src (0.8.2-1) unstable; urgency=medium
20
-
21
- * New release for 25.0.3
22
-
23
- -- Matthias Urlichs <matthias@urlichs.de> Fri, 21 Mar 2025 14:54:14 +0100
24
-
25
- moat-src (0.8.1-1) unstable; urgency=medium
26
-
27
- * New release for 25.0.2
28
-
29
- -- Matthias Urlichs <matthias@urlichs.de> Fri, 21 Mar 2025 13:31:29 +0100
30
-
31
- moat-src (0.8.0-1) unstable; urgency=medium
32
-
33
- * New release for 25.0.2
34
-
35
- -- Matthias Urlichs <matthias@urlichs.de> Fri, 21 Mar 2025 13:24:30 +0100
36
-
37
- moat-src (0.7.0-1) unstable; urgency=medium
38
-
39
- * New release for 25.0.2
40
-
41
- -- Matthias Urlichs <matthias@urlichs.de> Fri, 21 Mar 2025 12:04:24 +0100
42
-
43
- moat-src (0.6.1-1) unstable; urgency=medium
44
-
45
- * Merge
46
-
47
- -- Matthias Urlichs <matthias@urlichs.de> Mon, 18 Nov 2024 10:05:25 +0100
48
-
49
- moat-src (0.6.0-1) unstable; urgency=medium
50
-
51
- * Merge
52
-
53
- -- Matthias Urlichs <matthias@urlichs.de> Wed, 06 Mar 2024 10:34:24 +0100
54
-
55
- moat-src (0.5.2-1) unstable; urgency=medium
56
-
57
- * Merge
58
-
59
- -- Matthias Urlichs <matthias@urlichs.de> Sun, 24 Dec 2023 09:30:07 +0100
60
-
61
- moat-src (0.5.1-2) unstable; urgency=medium
62
-
63
- * Fix naming and deps
64
-
65
- -- Matthias Urlichs <matthias@urlichs.de> Wed, 15 Nov 2023 14:33:46 +0100
66
-
67
- moat-src (0.5.1-1) unstable; urgency=medium
68
-
69
- * Merge
70
-
71
- -- Matthias Urlichs <matthias@urlichs.de> Wed, 15 Nov 2023 14:32:17 +0100
72
-
73
- moat-src (0.3.1-1) unstable; urgency=medium
74
-
75
- * Debianized.
76
-
77
- -- Matthias Urlichs <matthias@urlichs.de> Thu, 18 May 2023 14:52:55 +0200
78
-
debian/control DELETED
@@ -1,20 +0,0 @@
1
- Source: moat-src
2
- Maintainer: Matthias Urlichs <matthias@urlichs.de>
3
- Section: python
4
- Priority: optional
5
- Build-Depends: dh-python, python3-all, debhelper (>= 13), debhelper-compat (= 13),
6
- python3-setuptools,
7
- python3-wheel,
8
- Standards-Version: 3.9.6
9
- Homepage: https://github.com/M-o-a-T/moat-src
10
-
11
- Package: moat-src
12
- Architecture: all
13
- Depends: ${misc:Depends}, ${python3:Depends},
14
- python3-anyio (>= 2.0),
15
- moat-main,
16
- Recommends:
17
- moat-kv (>= 0.32),
18
- python3-trio (>= 0.17),
19
- Description: MoaT module for handling MoaT-related packaging
20
-