omdev 0.0.0.dev175__tar.gz → 0.0.0.dev176__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.
- {omdev-0.0.0.dev175/omdev.egg-info → omdev-0.0.0.dev176}/PKG-INFO +2 -2
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/pyproject.py +38 -4
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176/omdev.egg-info}/PKG-INFO +2 -2
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev.egg-info/requires.txt +1 -1
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/pyproject.toml +2 -2
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/LICENSE +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/MANIFEST.in +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/README.rst +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/.manifests.json +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/__about__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/gen.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/imports.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/main.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/manifests.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/resources.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/srcfiles.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/strip.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/types.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/amalg/typing.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/antlr/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/antlr/consts.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/antlr/gen.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/bracepy.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/cache.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/contexts.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/currents.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/fns.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/resolvers.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/storage.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/compute/types.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/data/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/data/actions.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/data/cache.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/data/consts.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/data/defaults.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/data/manifests.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cache/data/specs.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_boilerplate.cc +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/LICENSE +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/build_ext.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/compilers/options.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/dir_util.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/errors.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/extension.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/file_util.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/modified.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/spawn.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/sysconfig.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/util.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/_distutils/version.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/build.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/cmake.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/importhook.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/magic.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cexts/scan.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/classdot.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/_pathhack.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/clicli.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/install.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/main.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/managers.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cli/types.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/clipboard/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/clipboard/clipboard.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/clipboard/darwin_cf.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/clipboard/linux_x11.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/cmake.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/findimports.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/git/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/git/revisions.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/git/status.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/git/subtrees.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/imgur.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/cli.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/inspect.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/providers.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/pyenv.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/resolvers.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/standalone.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/system.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/interp/types.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/magic/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/magic/find.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/magic/magic.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/magic/prepare.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/magic/styles.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/manifests/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/manifests/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/manifests/build.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/manifests/main.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/mypy/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/mypy/debug.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/packaging/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/packaging/marshal.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/packaging/names.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/packaging/requires.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/packaging/specifiers.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/packaging/versions.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pip.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/base.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/git.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/lite.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/main.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/manifests.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/precheck/scripts.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/ptk/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/ptk/apps/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/ptk/apps/ncdu.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pycharm/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pycharm/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pycharm/cli.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/cexts.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/cli.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/configs.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/pkg.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/reqs.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/pyproject/venvs.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/revisions.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/bumpversion.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/execrss.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/exectime.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/importtrace.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/interp.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/slowcat.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/scripts/tmpexec.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/secrets.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tokens.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/toml/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/toml/parser.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/toml/writer.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/cloc.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/doc.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/docker.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/git.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/importscan.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/cli.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/formats.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/io.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/parsing.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/processing.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/json/rendering.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/mkrelimp.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/notebook.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/pawk/__init__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/pawk/__main__.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/pawk/pawk.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/pip.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/prof.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/qr.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/tools/sqlrepl.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev/wheelfile.py +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev.egg-info/SOURCES.txt +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev.egg-info/dependency_links.txt +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev.egg-info/entry_points.txt +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/omdev.egg-info/top_level.txt +0 -0
- {omdev-0.0.0.dev175 → omdev-0.0.0.dev176}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: omdev
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev176
|
4
4
|
Summary: omdev
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omlish==0.0.0.dev176
|
16
16
|
Provides-Extra: all
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
@@ -3916,6 +3916,18 @@ class FieldsObjMarshaler(ObjMarshaler):
|
|
3916
3916
|
})
|
3917
3917
|
|
3918
3918
|
|
3919
|
+
@dc.dataclass(frozen=True)
|
3920
|
+
class SingleFieldObjMarshaler(ObjMarshaler):
|
3921
|
+
ty: type
|
3922
|
+
fld: str
|
3923
|
+
|
3924
|
+
def marshal(self, o: ta.Any, ctx: 'ObjMarshalContext') -> ta.Any:
|
3925
|
+
return getattr(o, self.fld)
|
3926
|
+
|
3927
|
+
def unmarshal(self, o: ta.Any, ctx: 'ObjMarshalContext') -> ta.Any:
|
3928
|
+
return self.ty(**{self.fld: o})
|
3929
|
+
|
3930
|
+
|
3919
3931
|
@dc.dataclass(frozen=True)
|
3920
3932
|
class PolymorphicObjMarshaler(ObjMarshaler):
|
3921
3933
|
class Impl(ta.NamedTuple):
|
@@ -3990,7 +4002,7 @@ _DEFAULT_OBJ_MARSHALERS: ta.Dict[ta.Any, ObjMarshaler] = {
|
|
3990
4002
|
**{t: IterableObjMarshaler(t, DynamicObjMarshaler()) for t in (list, tuple, set, frozenset)},
|
3991
4003
|
**{t: MappingObjMarshaler(t, DynamicObjMarshaler(), DynamicObjMarshaler()) for t in (dict,)},
|
3992
4004
|
|
3993
|
-
|
4005
|
+
**{t: DynamicObjMarshaler() for t in (ta.Any, object)},
|
3994
4006
|
|
3995
4007
|
**{t: DatetimeObjMarshaler(t) for t in (datetime.date, datetime.time, datetime.datetime)},
|
3996
4008
|
decimal.Decimal: DecimalObjMarshaler(),
|
@@ -4015,6 +4027,16 @@ _OBJ_MARSHALER_GENERIC_ITERABLE_TYPES: ta.Dict[ta.Any, type] = {
|
|
4015
4027
|
##
|
4016
4028
|
|
4017
4029
|
|
4030
|
+
_REGISTERED_OBJ_MARSHALERS_BY_TYPE: ta.MutableMapping[type, ObjMarshaler] = weakref.WeakKeyDictionary()
|
4031
|
+
|
4032
|
+
|
4033
|
+
def register_type_obj_marshaler(ty: type, om: ObjMarshaler) -> None:
|
4034
|
+
_REGISTERED_OBJ_MARSHALERS_BY_TYPE[ty] = om
|
4035
|
+
|
4036
|
+
|
4037
|
+
##
|
4038
|
+
|
4039
|
+
|
4018
4040
|
class ObjMarshalerManager:
|
4019
4041
|
def __init__(
|
4020
4042
|
self,
|
@@ -4024,6 +4046,8 @@ class ObjMarshalerManager:
|
|
4024
4046
|
default_obj_marshalers: ta.Dict[ta.Any, ObjMarshaler] = _DEFAULT_OBJ_MARSHALERS, # noqa
|
4025
4047
|
generic_mapping_types: ta.Dict[ta.Any, type] = _OBJ_MARSHALER_GENERIC_MAPPING_TYPES, # noqa
|
4026
4048
|
generic_iterable_types: ta.Dict[ta.Any, type] = _OBJ_MARSHALER_GENERIC_ITERABLE_TYPES, # noqa
|
4049
|
+
|
4050
|
+
registered_obj_marshalers: ta.Mapping[type, ObjMarshaler] = _REGISTERED_OBJ_MARSHALERS_BY_TYPE,
|
4027
4051
|
) -> None:
|
4028
4052
|
super().__init__()
|
4029
4053
|
|
@@ -4032,6 +4056,7 @@ class ObjMarshalerManager:
|
|
4032
4056
|
self._obj_marshalers = dict(default_obj_marshalers)
|
4033
4057
|
self._generic_mapping_types = generic_mapping_types
|
4034
4058
|
self._generic_iterable_types = generic_iterable_types
|
4059
|
+
self._registered_obj_marshalers = registered_obj_marshalers
|
4035
4060
|
|
4036
4061
|
self._lock = threading.RLock()
|
4037
4062
|
self._marshalers: ta.Dict[ta.Any, ObjMarshaler] = dict(_DEFAULT_OBJ_MARSHALERS)
|
@@ -4047,6 +4072,9 @@ class ObjMarshalerManager:
|
|
4047
4072
|
non_strict_fields: bool = False,
|
4048
4073
|
) -> ObjMarshaler:
|
4049
4074
|
if isinstance(ty, type):
|
4075
|
+
if (reg := self._registered_obj_marshalers.get(ty)) is not None:
|
4076
|
+
return reg
|
4077
|
+
|
4050
4078
|
if abc.ABC in ty.__bases__:
|
4051
4079
|
impls = [ity for ity in deep_subclasses(ty) if abc.ABC not in ity.__bases__] # type: ignore
|
4052
4080
|
if all(ity.__qualname__.endswith(ty.__name__) for ity in impls):
|
@@ -4111,9 +4139,15 @@ class ObjMarshalerManager:
|
|
4111
4139
|
|
4112
4140
|
#
|
4113
4141
|
|
4114
|
-
def
|
4142
|
+
def set_obj_marshaler(
|
4143
|
+
self,
|
4144
|
+
ty: ta.Any,
|
4145
|
+
m: ObjMarshaler,
|
4146
|
+
*,
|
4147
|
+
override: bool = False,
|
4148
|
+
) -> None:
|
4115
4149
|
with self._lock:
|
4116
|
-
if ty in self._obj_marshalers:
|
4150
|
+
if not override and ty in self._obj_marshalers:
|
4117
4151
|
raise KeyError(ty)
|
4118
4152
|
self._obj_marshalers[ty] = m
|
4119
4153
|
|
@@ -4204,7 +4238,7 @@ class ObjMarshalContext:
|
|
4204
4238
|
|
4205
4239
|
OBJ_MARSHALER_MANAGER = ObjMarshalerManager()
|
4206
4240
|
|
4207
|
-
|
4241
|
+
set_obj_marshaler = OBJ_MARSHALER_MANAGER.set_obj_marshaler
|
4208
4242
|
get_obj_marshaler = OBJ_MARSHALER_MANAGER.get_obj_marshaler
|
4209
4243
|
|
4210
4244
|
marshal_obj = OBJ_MARSHALER_MANAGER.marshal_obj
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: omdev
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev176
|
4
4
|
Summary: omdev
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omlish==0.0.0.dev176
|
16
16
|
Provides-Extra: all
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
@@ -12,7 +12,7 @@ authors = [
|
|
12
12
|
urls = {source = 'https://github.com/wrmsr/omlish'}
|
13
13
|
license = {text = 'BSD-3-Clause'}
|
14
14
|
requires-python = '>=3.12'
|
15
|
-
version = '0.0.0.
|
15
|
+
version = '0.0.0.dev176'
|
16
16
|
classifiers = [
|
17
17
|
'License :: OSI Approved :: BSD License',
|
18
18
|
'Development Status :: 2 - Pre-Alpha',
|
@@ -22,7 +22,7 @@ classifiers = [
|
|
22
22
|
]
|
23
23
|
description = 'omdev'
|
24
24
|
dependencies = [
|
25
|
-
'omlish == 0.0.0.
|
25
|
+
'omlish == 0.0.0.dev176',
|
26
26
|
]
|
27
27
|
|
28
28
|
[project.optional-dependencies]
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|