omlish 0.0.0.dev0__tar.gz → 0.0.0.dev1__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.
Potentially problematic release.
This version of omlish might be problematic. Click here for more details.
- omlish-0.0.0.dev1/MANIFEST.in +1 -0
- {omlish-0.0.0.dev0/omlish.egg-info → omlish-0.0.0.dev1}/PKG-INFO +3 -3
- omlish-0.0.0.dev1/omlish/__about__.py +7 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/asyncs/__init__.py +10 -5
- omlish-0.0.0.dev1/omlish/asyncs/anyio.py +23 -0
- omlish-0.0.0.dev1/omlish/asyncs/asyncs.py +76 -0
- omlish-0.0.0.dev0/omlish/asyncs/asyncs.py → omlish-0.0.0.dev1/omlish/asyncs/futures.py +50 -96
- omlish-0.0.0.dev1/omlish/asyncs/trio.py +11 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/main.py +1 -1
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/replace.py +8 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/simple.py +0 -6
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/http/consts.py +6 -5
- omlish-0.0.0.dev1/omlish/http/wsgi.py +34 -0
- omlish-0.0.0.dev1/omlish/libc.py +532 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/replserver/server.py +9 -1
- omlish-0.0.0.dev1/omlish/stats.py +342 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pydevd.py +39 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1/omlish.egg-info}/PKG-INFO +3 -3
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish.egg-info/SOURCES.txt +5 -5
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/pyproject.toml +32 -9
- omlish-0.0.0.dev0/MANIFEST.in +0 -3
- omlish-0.0.0.dev0/omlish/__about__.py +0 -23
- omlish-0.0.0.dev0/omlish/asyncs/anyio.py +0 -13
- omlish-0.0.0.dev0/omlish/conftest.py +0 -6
- omlish-0.0.0.dev0/omlish/dataclasses/LICENSE +0 -279
- omlish-0.0.0.dev0/omlish/http/types.py +0 -42
- omlish-0.0.0.dev0/omlish/inject/.DS_Store +0 -0
- omlish-0.0.0.dev0/setup.py +0 -49
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/LICENSE +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/README.md +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/argparse.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/asyncs/asyncio.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/c3.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/cached.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/check.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/_abc.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/_io_abc.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/cache/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/cache/descriptor.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/cache/impl.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/cache/types.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/coerce.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/frozen.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/identity.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/indexed.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/mappings.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/ordered.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/persistent.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/skiplist.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/sorted.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/treap.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/treapmap.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/unmodifiable.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/collections/utils.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/configs/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/configs/flattening.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/configs/props.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/api.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/as_.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/exceptions.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/fields.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/frozen.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/hashing.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/init.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/internals.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/metaclass.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/metadata.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/order.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/params.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/processing.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/reflect.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/repr.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/slots.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dataclasses/impl/utils.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/defs.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dispatch/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dispatch/dispatch.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dispatch/functions.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dispatch/methods.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/docker.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/dynamic.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/graphs/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/graphs/dot/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/graphs/dot/items.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/graphs/dot/rendering.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/graphs/dot/utils.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/graphs/trees.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/http/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/binder.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/bindings.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/eagers.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/elements.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/exceptions.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/bindings.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/elements.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/injector.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/inspect.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/private.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/providers.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/impl/scopes.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/injector.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/inspect.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/keys.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/managed.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/overrides.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/private.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/providers.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/proxy.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/scopes.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/inject/types.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/iterators.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/json.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/cached.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/abstract.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/restrict.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/simple.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/test/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/test/test_abstract.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/test/test_restrict.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/test/test_simple.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/test/test_virtual.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/classes/virtual.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/clsdct.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/cmp.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/contextmanagers.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/datetimes.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/descriptors.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/functions.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/imports.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/iterables.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/maybes.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/objects.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/resolving.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/strings.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/lang/typing.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/logs/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/logs/_abc.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/logs/configs.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/logs/filters.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/logs/formatters.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/logs/utils.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/any.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/base.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/base64.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/dataclasses.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/datetimes.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/enums.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/exceptions.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/factories.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/global_.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/iterables.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/mappings.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/naming.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/objects.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/optionals.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/polymorphism.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/primitives.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/registries.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/standard.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/utils.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/uuids.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/marshal/values.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/math.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/os.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/reflect.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/replserver/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/replserver/__main__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/replserver/console.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/runmodule.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/term.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/helpers.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/inject/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/inject/harness.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/_registry.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/logging.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/pycharm.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/repeat.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/skips.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/spacing.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/pytest/plugins/switches.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/testing/testing.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/text/__init__.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/text/delimit.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/text/indent.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish/text/parts.py +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish.egg-info/dependency_links.txt +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/omlish.egg-info/top_level.txt +0 -0
- {omlish-0.0.0.dev0 → omlish-0.0.0.dev1}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
global-exclude **/conftest.py
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omlish
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev1
|
|
4
4
|
Summary: omlish
|
|
5
|
-
Home-page: https://github.com/wrmsr/omlish
|
|
6
5
|
Author: wrmsr
|
|
7
|
-
License: BSD
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
Project-URL: source, https://github.com/wrmsr/omlish
|
|
8
8
|
Classifier: License :: OSI Approved :: BSD License
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
from .asyncs import ( # noqa
|
|
2
|
-
AsyncTimeoutException,
|
|
3
|
-
FutureException,
|
|
4
|
-
ImmediateExecutor,
|
|
5
2
|
SyncableIterable,
|
|
6
3
|
async_list,
|
|
7
|
-
await_dependent_futures,
|
|
8
|
-
await_futures,
|
|
9
4
|
sync_await,
|
|
10
5
|
sync_list,
|
|
11
6
|
syncable_iterable,
|
|
12
7
|
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .futures import ( # noqa
|
|
11
|
+
FutureException,
|
|
12
|
+
FutureTimeoutException,
|
|
13
|
+
ImmediateExecutor,
|
|
14
|
+
new_thread_or_immediate_executor,
|
|
15
|
+
wait_dependent_futures,
|
|
16
|
+
wait_futures,
|
|
17
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
lookit:
|
|
3
|
+
- https://github.com/davidbrochart/sqlite-anyio/blob/a3ba4c6ef0535b14a5a60071fcd6ed565a514963/sqlite_anyio/sqlite.py
|
|
4
|
+
- https://github.com/rafalkrupinski/ratelimit-anyio/blob/2910a8a3d6fa54ed17ee6ba457686c9f7a4c4beb/src/ratelimit_anyio/__init__.py
|
|
5
|
+
- https://github.com/nekitdev/async-extensions/tree/main/async_extensions
|
|
6
|
+
- https://github.com/kinnay/anynet/tree/master/anynet
|
|
7
|
+
- https://github.com/M-o-a-T/asyncscope
|
|
8
|
+
- https://github.com/M-o-a-T/aevent
|
|
9
|
+
- https://github.com/florimondmanca/aiometer
|
|
10
|
+
""" # noqa
|
|
11
|
+
import typing as ta
|
|
12
|
+
|
|
13
|
+
import anyio
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = ta.TypeVar('T')
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
async def anyio_eof_to_empty(fn: ta.Callable[..., ta.Awaitable[T]], *args: ta.Any, **kwargs: ta.Any) -> T | bytes:
|
|
20
|
+
try:
|
|
21
|
+
return await fn(*args, **kwargs)
|
|
22
|
+
except anyio.EndOfStream:
|
|
23
|
+
return b''
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
TODO:
|
|
3
|
+
- async<->sync greeenlet bridge
|
|
4
|
+
In [5]: %timeit greenlet.greenlet(f).switch()
|
|
5
|
+
517 ns ± 13.2 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
|
|
6
|
+
- injected io provider - sync vs greenlet aio trampolined
|
|
7
|
+
- push/pull bridge?
|
|
8
|
+
|
|
9
|
+
https://github.com/sqlalchemy/sqlalchemy/blob/1e75c189da721395bc8c2d899c722a5b9a170404/lib/sqlalchemy/util/_concurrency_py3k.py#L83
|
|
10
|
+
"""
|
|
11
|
+
import contextlib
|
|
12
|
+
import functools
|
|
13
|
+
import typing as ta
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = ta.TypeVar('T')
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def sync_await(fn: ta.Callable[..., T], *args, **kwargs) -> T:
|
|
20
|
+
ret: ta.Any
|
|
21
|
+
ret = missing = object()
|
|
22
|
+
|
|
23
|
+
async def gate():
|
|
24
|
+
nonlocal ret
|
|
25
|
+
ret = await fn(*args, **kwargs) # type: ignore
|
|
26
|
+
|
|
27
|
+
cr = gate()
|
|
28
|
+
with contextlib.closing(cr):
|
|
29
|
+
try:
|
|
30
|
+
cr.send(None)
|
|
31
|
+
except StopIteration:
|
|
32
|
+
pass
|
|
33
|
+
if ret is missing or cr.cr_await is not None or cr.cr_running:
|
|
34
|
+
raise TypeError('Not terminated')
|
|
35
|
+
|
|
36
|
+
return ta.cast(T, ret)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def sync_list(fn: ta.Callable[..., ta.AsyncIterator[T]], *args, **kwargs) -> list[T]:
|
|
40
|
+
lst = None
|
|
41
|
+
|
|
42
|
+
async def inner():
|
|
43
|
+
nonlocal lst
|
|
44
|
+
lst = [v async for v in fn(*args, **kwargs)]
|
|
45
|
+
|
|
46
|
+
sync_await(inner)
|
|
47
|
+
if not isinstance(lst, list):
|
|
48
|
+
raise TypeError(lst)
|
|
49
|
+
return lst
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
async def async_list(fn: ta.Callable[..., ta.AsyncIterator[T]], *args, **kwargs) -> list[T]:
|
|
53
|
+
return [v async for v in fn(*args, **kwargs)]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class SyncableIterable(ta.Generic[T]):
|
|
57
|
+
|
|
58
|
+
def __init__(self, obj) -> None:
|
|
59
|
+
super().__init__()
|
|
60
|
+
self._obj = obj
|
|
61
|
+
|
|
62
|
+
def __iter__(self) -> ta.Iterator[T]:
|
|
63
|
+
async def inner():
|
|
64
|
+
async for i in self._obj:
|
|
65
|
+
yield i
|
|
66
|
+
return iter(sync_list(inner))
|
|
67
|
+
|
|
68
|
+
def __aiter__(self) -> ta.AsyncIterator[T]:
|
|
69
|
+
return self._obj.__aiter__()
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def syncable_iterable(fn: ta.Callable[..., ta.AsyncIterator[T]]) -> ta.Callable[..., SyncableIterable[T]]:
|
|
73
|
+
@functools.wraps(fn)
|
|
74
|
+
def inner(*args, **kwargs):
|
|
75
|
+
return SyncableIterable(fn(*args, **kwargs))
|
|
76
|
+
return inner
|
|
@@ -1,104 +1,13 @@
|
|
|
1
|
-
"""
|
|
2
|
-
TODO:
|
|
3
|
-
- async<->sync greeenlet bridge
|
|
4
|
-
In [5]: %timeit greenlet.greenlet(f).switch()
|
|
5
|
-
517 ns ± 13.2 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
|
|
6
|
-
- injected io provider - sync vs greenlet aio trampolined
|
|
7
|
-
- push/pull bridge?
|
|
8
|
-
|
|
9
|
-
https://github.com/sqlalchemy/sqlalchemy/blob/1e75c189da721395bc8c2d899c722a5b9a170404/lib/sqlalchemy/util/_concurrency_py3k.py#L83
|
|
10
|
-
"""
|
|
11
1
|
import concurrent.futures as cf
|
|
12
2
|
import contextlib
|
|
13
|
-
import functools
|
|
14
3
|
import time
|
|
15
4
|
import typing as ta
|
|
16
5
|
|
|
17
6
|
|
|
18
7
|
T = ta.TypeVar('T')
|
|
19
|
-
CallableT = ta.TypeVar('CallableT', bound=ta.Callable)
|
|
20
8
|
|
|
21
9
|
|
|
22
|
-
|
|
23
|
-
ret: ta.Any
|
|
24
|
-
ret = missing = object()
|
|
25
|
-
|
|
26
|
-
async def gate():
|
|
27
|
-
nonlocal ret
|
|
28
|
-
ret = await fn(*args, **kwargs) # type: ignore
|
|
29
|
-
|
|
30
|
-
cr = gate()
|
|
31
|
-
with contextlib.closing(cr):
|
|
32
|
-
try:
|
|
33
|
-
cr.send(None)
|
|
34
|
-
except StopIteration:
|
|
35
|
-
pass
|
|
36
|
-
if ret is missing or cr.cr_await is not None or cr.cr_running:
|
|
37
|
-
raise TypeError('Not terminated')
|
|
38
|
-
|
|
39
|
-
return ta.cast(T, ret)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def sync_list(fn: ta.Callable[..., ta.AsyncIterator[T]], *args, **kwargs) -> list[T]:
|
|
43
|
-
lst = None
|
|
44
|
-
|
|
45
|
-
async def inner():
|
|
46
|
-
nonlocal lst
|
|
47
|
-
lst = [v async for v in fn(*args, **kwargs)]
|
|
48
|
-
|
|
49
|
-
sync_await(inner)
|
|
50
|
-
if not isinstance(lst, list):
|
|
51
|
-
raise TypeError(lst)
|
|
52
|
-
return lst
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
async def async_list(fn: ta.Callable[..., ta.AsyncIterator[T]], *args, **kwargs) -> list[T]:
|
|
56
|
-
return [v async for v in fn(*args, **kwargs)]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class SyncableIterable(ta.Generic[T]):
|
|
60
|
-
|
|
61
|
-
def __init__(self, obj) -> None:
|
|
62
|
-
super().__init__()
|
|
63
|
-
self._obj = obj
|
|
64
|
-
|
|
65
|
-
def __iter__(self) -> ta.Iterator[T]:
|
|
66
|
-
async def inner():
|
|
67
|
-
async for i in self._obj:
|
|
68
|
-
yield i
|
|
69
|
-
return iter(sync_list(inner))
|
|
70
|
-
|
|
71
|
-
def __aiter__(self) -> ta.AsyncIterator[T]:
|
|
72
|
-
return self._obj.__aiter__()
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def syncable_iterable(fn: ta.Callable[..., ta.AsyncIterator[T]]) -> ta.Callable[..., SyncableIterable[T]]:
|
|
76
|
-
@functools.wraps(fn)
|
|
77
|
-
def inner(*args, **kwargs):
|
|
78
|
-
return SyncableIterable(fn(*args, **kwargs))
|
|
79
|
-
return inner
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
class ImmediateExecutor(cf.Executor):
|
|
83
|
-
|
|
84
|
-
def __init__(self, *, immediate_exceptions: bool = False) -> None:
|
|
85
|
-
super().__init__()
|
|
86
|
-
self._immediate_exceptions = immediate_exceptions
|
|
87
|
-
|
|
88
|
-
def submit(self, fn, *args, **kwargs):
|
|
89
|
-
future: ta.Any = cf.Future()
|
|
90
|
-
try:
|
|
91
|
-
result = fn(*args, **kwargs)
|
|
92
|
-
future.set_result(result)
|
|
93
|
-
except Exception as e:
|
|
94
|
-
if self._immediate_exceptions:
|
|
95
|
-
raise
|
|
96
|
-
future.set_exception(e)
|
|
97
|
-
return future
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
class AsyncTimeoutException(Exception):
|
|
101
|
-
pass
|
|
10
|
+
##
|
|
102
11
|
|
|
103
12
|
|
|
104
13
|
class FutureException(Exception, ta.Generic[T]):
|
|
@@ -128,7 +37,11 @@ class FutureException(Exception, ta.Generic[T]):
|
|
|
128
37
|
__str__ = __repr__
|
|
129
38
|
|
|
130
39
|
|
|
131
|
-
|
|
40
|
+
class FutureTimeoutException(Exception):
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def wait_futures(
|
|
132
45
|
futures: ta.Sequence[cf.Future],
|
|
133
46
|
*,
|
|
134
47
|
timeout_s: ta.Union[int, float] = 60,
|
|
@@ -155,13 +68,13 @@ def await_futures(
|
|
|
155
68
|
return True
|
|
156
69
|
|
|
157
70
|
if time.time() >= (start + timeout_s):
|
|
158
|
-
raise
|
|
71
|
+
raise FutureTimeoutException
|
|
159
72
|
time.sleep(tick_interval_s)
|
|
160
73
|
|
|
161
74
|
return False
|
|
162
75
|
|
|
163
76
|
|
|
164
|
-
def
|
|
77
|
+
def wait_dependent_futures(
|
|
165
78
|
executor: cf.Executor,
|
|
166
79
|
dependency_sets_by_fn: ta.Mapping[ta.Callable, ta.AbstractSet[ta.Callable]],
|
|
167
80
|
*,
|
|
@@ -215,7 +128,7 @@ def await_dependent_futures(
|
|
|
215
128
|
|
|
216
129
|
if time.time() >= (start + timeout_s):
|
|
217
130
|
cancel()
|
|
218
|
-
raise
|
|
131
|
+
raise FutureTimeoutException
|
|
219
132
|
|
|
220
133
|
remaining_fns = {fn: deps for fn, deps in remaining_dep_sets_by_fn.items() if deps}
|
|
221
134
|
if remaining_fns:
|
|
@@ -223,3 +136,44 @@ def await_dependent_futures(
|
|
|
223
136
|
|
|
224
137
|
futs_by_fn = {fn: fut for fut, fn in fns_by_fut.items()}
|
|
225
138
|
return futs_by_fn
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
##
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class ImmediateExecutor(cf.Executor):
|
|
145
|
+
|
|
146
|
+
def __init__(self, *, immediate_exceptions: bool = False) -> None:
|
|
147
|
+
super().__init__()
|
|
148
|
+
self._immediate_exceptions = immediate_exceptions
|
|
149
|
+
|
|
150
|
+
def submit(self, fn, *args, **kwargs):
|
|
151
|
+
future: ta.Any = cf.Future()
|
|
152
|
+
try:
|
|
153
|
+
result = fn(*args, **kwargs)
|
|
154
|
+
future.set_result(result)
|
|
155
|
+
except Exception as e:
|
|
156
|
+
if self._immediate_exceptions:
|
|
157
|
+
raise
|
|
158
|
+
future.set_exception(e)
|
|
159
|
+
return future
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
@contextlib.contextmanager
|
|
163
|
+
def new_thread_or_immediate_executor(
|
|
164
|
+
max_workers: int | None = None,
|
|
165
|
+
*,
|
|
166
|
+
immediate_exceptions: bool = False,
|
|
167
|
+
thread_name_prefix: str = '',
|
|
168
|
+
**kwargs: ta.Any,
|
|
169
|
+
) -> ta.Generator[cf.Executor, None, None]:
|
|
170
|
+
if max_workers == 0:
|
|
171
|
+
yield ImmediateExecutor(
|
|
172
|
+
immediate_exceptions=immediate_exceptions,
|
|
173
|
+
)
|
|
174
|
+
else:
|
|
175
|
+
with cf.ThreadPoolExecutor(
|
|
176
|
+
thread_name_prefix=thread_name_prefix,
|
|
177
|
+
**kwargs,
|
|
178
|
+
) as exe:
|
|
179
|
+
yield exe
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
lookit:
|
|
3
|
+
- https://github.com/oremanj/trio-monitor
|
|
4
|
+
- https://github.com/python-trio/trio-monitor/tree/master
|
|
5
|
+
- https://github.com/python-trio/triopg
|
|
6
|
+
- https://github.com/python-trio/trio-mysql
|
|
7
|
+
- https://github.com/goodboy/tractor
|
|
8
|
+
- https://github.com/groove-x/trio-util
|
|
9
|
+
- https://github.com/oremanj/tricycle/tree/master
|
|
10
|
+
- https://github.com/linkdd/triotp
|
|
11
|
+
"""
|
|
@@ -16,12 +16,12 @@ from .order import OrderProcessor
|
|
|
16
16
|
from .params import ParamsExtras
|
|
17
17
|
from .processing import Processor
|
|
18
18
|
from .reflect import ClassInfo
|
|
19
|
+
from .replace import ReplaceProcessor
|
|
19
20
|
from .repr import ReprProcessor
|
|
20
21
|
from .simple import DocProcessor
|
|
21
22
|
from .simple import EqProcessor
|
|
22
23
|
from .simple import MatchArgsProcessor
|
|
23
24
|
from .simple import OverridesProcessor
|
|
24
|
-
from .simple import ReplaceProcessor
|
|
25
25
|
from .slots import add_slots
|
|
26
26
|
|
|
27
27
|
if ta.TYPE_CHECKING:
|
|
@@ -4,6 +4,9 @@ from .fields import field_type
|
|
|
4
4
|
from .internals import FIELDS_ATTR
|
|
5
5
|
from .internals import FieldType
|
|
6
6
|
from .internals import is_dataclass_instance
|
|
7
|
+
from .processing import Processor
|
|
8
|
+
from .utils import set_new_attribute
|
|
9
|
+
|
|
7
10
|
|
|
8
11
|
MISSING = dc.MISSING
|
|
9
12
|
|
|
@@ -30,3 +33,8 @@ def _replace(obj, /, **changes):
|
|
|
30
33
|
changes[f.name] = getattr(obj, f.name)
|
|
31
34
|
|
|
32
35
|
return obj.__class__(**changes)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ReplaceProcessor(Processor):
|
|
39
|
+
def _process(self) -> None:
|
|
40
|
+
set_new_attribute(self._cls, '__replace__', _replace)
|
|
@@ -5,7 +5,6 @@ from .fields import field_assign
|
|
|
5
5
|
from .init import get_init_fields
|
|
6
6
|
from .params import get_field_extras
|
|
7
7
|
from .processing import Processor
|
|
8
|
-
from .replace import _replace
|
|
9
8
|
from .utils import create_fn
|
|
10
9
|
from .utils import set_new_attribute
|
|
11
10
|
|
|
@@ -91,8 +90,3 @@ class MatchArgsProcessor(Processor):
|
|
|
91
90
|
|
|
92
91
|
ifs = get_init_fields(self._info.fields.values())
|
|
93
92
|
set_new_attribute(self._cls, '__match_args__', tuple(f.name for f in ifs.std))
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
class ReplaceProcessor(Processor):
|
|
97
|
-
def _process(self) -> None:
|
|
98
|
-
set_new_attribute(self._cls, '__replace__', _replace)
|
|
@@ -12,8 +12,9 @@ STATUS_NOT_FOUND = format_status(http.HTTPStatus.NOT_FOUND)
|
|
|
12
12
|
STATUS_METHOD_NOT_ALLOWED = format_status(http.HTTPStatus.METHOD_NOT_ALLOWED)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
HEADER_CONTENT_TYPE = b'Content-Type'
|
|
16
|
+
CONTENT_TYPE_TEXT = b'text/plain'
|
|
17
|
+
CONTENT_TYPE_TEXT_UTF8 = CONTENT_TYPE_TEXT + b'; charset=utf-8'
|
|
18
|
+
CONTENT_TYPE_JSON = b'application/json'
|
|
19
|
+
CONTENT_TYPE_ICON = b'image/x-icon'
|
|
20
|
+
CONTENT_TYPE_BYTES = b'application/octet-stream'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import typing as ta
|
|
2
|
+
|
|
3
|
+
from .. import lang
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Environ = ta.Mapping[str, ta.Any]
|
|
7
|
+
StartResponse = ta.Callable[[str, ta.Iterable[tuple[str | bytes, str | bytes]]], ta.Callable[[lang.BytesLike], None]]
|
|
8
|
+
App = ta.Callable[[Environ, StartResponse], ta.Iterable[lang.BytesLike]]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# class App(lang.Abstract):
|
|
12
|
+
#
|
|
13
|
+
# def __enter__(self: AppT) -> AppT:
|
|
14
|
+
# return self
|
|
15
|
+
#
|
|
16
|
+
# def __exit__(self, exc_type, exc_val, exc_tb) -> None:
|
|
17
|
+
# return None
|
|
18
|
+
#
|
|
19
|
+
# @abc.abstractmethod
|
|
20
|
+
# def __call__(self, environ: Environ, start_response: StartResponse) -> ta.Iterable[bytes]:
|
|
21
|
+
# raise NotImplementedError
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# class AsyncApp(lang.Abstract):
|
|
25
|
+
#
|
|
26
|
+
# async def __aenter__(self: AppT) -> AppT:
|
|
27
|
+
# return self
|
|
28
|
+
#
|
|
29
|
+
# async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
|
|
30
|
+
# return None
|
|
31
|
+
#
|
|
32
|
+
# @abc.abstractmethod
|
|
33
|
+
# async def __call__(self, scope, receive, send) -> ta.Iterable[bytes]:
|
|
34
|
+
# raise NotImplementedError
|