simbiot-harness/venv/lib/python3.12/site-packages/wrapt/__wrapt__.py
Simbiot Harness b60439152b Simbiot Harness v0.1: тактовая лестница на Strands + CQRS/ES-спина
- harness/es.py: append-only event store + проекции (образец — кооп-портал)
- harness/levels.py: уровни 1с/1м/1ч/1д, контекст ∝ масштабу
- harness/scheduler.py: уровневые потоки, идемпотентные тики, absorbed-стабы
- harness/isolated_runner.py + _llm_worker.py: LLM-тик в сабпроцессе
  (глобальный asyncio-рантайм Strands не переживает 2+ create_harness)
- cli.py: init/task/tasks/status/events + requeue (написан самим минутным агентом)
- 9router: отдельный ключ sk-simbiot, модель auto (glm-5.3 первым)
2026-09-29 15:28:50 +00:00

42 lines
1.4 KiB
Python

"""This module is used to switch between C and Python implementations of the
wrappers.
"""
import os
from .wrappers import BoundFunctionWrapper, CallableObjectProxy, FunctionWrapper
from .wrappers import ObjectProxy as BaseObjectProxy
from .wrappers import PartialCallableObjectProxy, _FunctionWrapperBase
# Try to use C extensions if not disabled.
_using_c_extension = False
_use_extensions = not os.environ.get("WRAPT_DISABLE_EXTENSIONS")
if _use_extensions:
try:
from ._wrappers import ( # type: ignore[no-redef,import-not-found,import-untyped]
BoundFunctionWrapper,
CallableObjectProxy,
FunctionWrapper,
)
from ._wrappers import ObjectProxy as BaseObjectProxy # type: ignore[no-redef,import-untyped]
from ._wrappers import ( # type: ignore[no-redef,import-not-found,import-untyped]
PartialCallableObjectProxy,
_FunctionWrapperBase,
)
_using_c_extension = True
except ImportError:
# C extensions not available, using Python implementations
pass
def partial(*args, **kwargs):
"""Create a callable object proxy with partial application of the given
arguments and keywords. This behaves the same as `functools.partial`, but
implemented using the `ObjectProxy` class to provide better support for
introspection.
"""
return PartialCallableObjectProxy(*args, **kwargs)