From ab1336017c62546b363044378e77c6d580ceb2c5 Mon Sep 17 00:00:00 2001 From: Schamper <1254028+Schamper@users.noreply.github.com> Date: Fri, 24 May 2024 10:51:02 +0200 Subject: [PATCH] Compatibility with cstruct v4 --- dissect/esedb/c_esedb.py | 5 ++--- pyproject.toml | 4 ++-- tox.ini | 7 +++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dissect/esedb/c_esedb.py b/dissect/esedb/c_esedb.py index 8bc95bb..1296d7d 100644 --- a/dissect/esedb/c_esedb.py +++ b/dissect/esedb/c_esedb.py @@ -4,7 +4,7 @@ from collections import namedtuple from typing import Union -from dissect import cstruct +from dissect.cstruct import cstruct # https://github.com/microsoft/Extensible-Storage-Engine c_esedb_def = """ @@ -427,8 +427,7 @@ }; """ # noqa E501 -c_esedb = cstruct.cstruct() -c_esedb.load(c_esedb_def) +c_esedb = cstruct().load(c_esedb_def) ulDAEMagic = 0x89ABCDEF pgnoFDPMSO = 4 diff --git a/pyproject.toml b/pyproject.toml index 9b535ea..98267a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Topic :: Utilities", ] dependencies = [ - "dissect.cstruct>=3.4.dev,<4.0.dev", - "dissect.util>=3.5.dev,<4.0.dev", + "dissect.cstruct>3,<5", + "dissect.util>3.4,<4", ] dynamic = ["version"] diff --git a/tox.ini b/tox.ini index 67e8e8a..badc32c 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,13 @@ deps = pytest pytest-cov coverage +# Unfortunately, tox does not allow separate installation flags for the project +# dependencies and the test dependencies. When running tox, we want to install the +# project dependencies with the --pre flag, so that we get the latest version of all +# dependencies. We do the installation step ourselves for this reason. +skip_install = true +commands_pre = + pip install --pre -e . commands = pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests} coverage report