diff --git a/Dockerfile b/Dockerfile index 8335bbcd3..2ac356b42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}" RUN pyenv install 3.11.4 && \ pyenv global 3.11.4 && \ pyenv rehash && \ - pip3 install --no-cache-dir pyyaml Cython scons pycapnp==1.1.0 pre-commit pylint parameterized coverage numpy + pip3 install --no-cache-dir pyyaml Cython scons pycapnp pre-commit pylint parameterized coverage numpy WORKDIR /project/ RUN cd /tmp/ && \ diff --git a/messaging/__init__.py b/messaging/__init__.py index d92a2a171..5a863f130 100644 --- a/messaging/__init__.py +++ b/messaging/__init__.py @@ -43,7 +43,8 @@ def fake_event_handle(endpoint: str, identifier: Optional[str] = None, override: def log_from_bytes(dat: bytes) -> capnp.lib.capnp._DynamicStructReader: - return log.Event.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) + with log.Event.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) as msg: + return msg def new_message(service: Optional[str] = None, size: Optional[int] = None) -> capnp.lib.capnp._DynamicStructBuilder: