diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86b20aedc..1eefc7a19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,12 +13,15 @@ jobs: # needs to run only on pull_request lint: runs-on: ubuntu-20.04 + strategy: + matrix: + python: ['3.8', '3.10'] steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: ${{ matrix.python }} - name: Lint if: github.event_name == 'pull_request' env: @@ -42,13 +45,14 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: + python: ['3.8', '3.10'] type: ["ethereum_truffle", "ethereum_bench", "examples", "ethereum", "ethereum_vm", "native", "wasm", "wasm_sym", "other"] steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: ${{ matrix.python }} - name: Install NPM uses: actions/setup-node@v3 with: @@ -118,12 +122,15 @@ jobs: manticore-server: runs-on: ubuntu-20.04 + strategy: + matrix: + python: ['3.8', '3.10'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: ${{ matrix.python }} - name: 'Install tools' run: | @@ -159,12 +166,15 @@ jobs: runs-on: ubuntu-20.04 if: github.event_name == 'schedule' needs: tests + strategy: + matrix: + python: ['3.8', '3.10'] steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: ${{ matrix.python }} - name: Build Dist run: | python3 -m pip install wheel diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d112f2533..f38e3cd81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,10 @@ jobs: type: ["ethereum_truffle", "ethereum_bench", "examples", "ethereum", "ethereum_vm", "native", "wasm", "wasm_sym", "other"] steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Install NPM uses: actions/setup-node@v3 with: @@ -64,10 +64,10 @@ jobs: needs: tests steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Build Dist run: | python3 -m pip install wheel diff --git a/manticore/wasm/structure.py b/manticore/wasm/structure.py index c0a882b88..675a8b0f1 100644 --- a/manticore/wasm/structure.py +++ b/manticore/wasm/structure.py @@ -49,8 +49,8 @@ from ..utils.event import Eventful from ..utils import config -from wasm import decode_module, Section -from wasm.wasmtypes import ( +from wasm_tob import decode_module, Section +from wasm_tob.wasmtypes import ( SEC_TYPE, SEC_IMPORT, SEC_FUNCTION, diff --git a/manticore/wasm/types.py b/manticore/wasm/types.py index d916c1700..ec4368628 100644 --- a/manticore/wasm/types.py +++ b/manticore/wasm/types.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from ..core.smtlib import issymbolic, BitVec from ctypes import * -import wasm +import wasm_tob as wasm import struct from ..core.state import Concretize diff --git a/setup.py b/setup.py index 01812e6f6..e00b3f64c 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ def rtd_dependent_deps(): author="Trail of Bits", version=version, packages=find_packages(exclude=["tests", "tests.*"]), - python_requires=">=3.7", + python_requires="<3.11,>=3.7", install_requires=[ "pyyaml", "protobuf~=3.20", @@ -75,8 +75,8 @@ def rtd_dependent_deps(): "ply", "rlp", "intervaltree", - "crytic-compile>=0.2.2", - "wasm", + "crytic-compile<0.3,>=0.2.2", + "wasm-tob~=1.0", "dataclasses; python_version < '3.7'", "pyevmasm>=0.2.3", ] diff --git a/tests/other/test_smtlibv2.py b/tests/other/test_smtlibv2.py index 92048ec2a..fd1a9148b 100644 --- a/tests/other/test_smtlibv2.py +++ b/tests/other/test_smtlibv2.py @@ -127,10 +127,10 @@ def check(ty: Type, pickle_size=None, sizeof=None, **kwargs): not hasattr(x, "__dict__"), ) """ - self.assertEqual(len(pickle_dumps(x)), pickle_size) if sys.version_info[1] == 6: # Python 3.6 self.assertEqual(sys.getsizeof(x), sizeof) elif sys.version_info[1] == 7: # Python 3.7 + self.assertEqual(len(pickle_dumps(x)), pickle_size) self.assertEqual(sys.getsizeof(x), sizeof + 8) elif sys.version_info[1] >= 8: # Python 3.8+ self.assertEqual(sys.getsizeof(x), sizeof - 8)