From d76951ed4f5ea05d2df868baeb6ec22622a4f070 Mon Sep 17 00:00:00 2001 From: Aleskei Chetaev Date: Fri, 10 Feb 2023 09:29:31 +0100 Subject: [PATCH] Change mamba version, fix imports and support python 3.10 Signed-off-by: Aleskei Chetaev --- .gitignore | 1 + requirements.txt | 15 +++------------ .../lib/python_keywords/data_formatters.py | 2 +- .../lib/python_keywords/payment_neogo.py | 5 +++-- robot/resources/lib/python_keywords/tombstone.py | 2 +- venv/local-pytest/environment.sh | 8 -------- 6 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 venv/local-pytest/environment.sh diff --git a/.gitignore b/.gitignore index e18a05ac..acd6b6a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # ignore IDE files .vscode +.idea # ignore test results **/log.html diff --git a/requirements.txt b/requirements.txt index fb58f395..ce000f98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,6 @@ async-timeout==3.0.1 asynctest==0.13.0 attrs==21.4.0 base58==2.1.0 -bitarray==2.3.4 black==22.8.0 boto3==1.16.33 botocore==1.19.33 @@ -26,19 +25,14 @@ iniconfig==1.1.1 isort==5.12.0 jmespath==0.10.0 jsonschema==4.5.1 -lz4==3.1.3 mccabe==0.6.1 mmh3==3.0.0 multidict==6.0.2 mypy==0.950 mypy-extensions==0.4.3 -neo-mamba==0.10.0 -neo3crypto==0.2.1 -neo3vm==0.9.0 -neo3vm-stubs==0.9.0 -neofs-testlib==0.9.0 +neo-mamba==1.0.0 +neofs-testlib==1.1.1 netaddr==0.8.0 -orjson==3.6.8 packaging==21.3 paramiko==2.10.3 pexpect==4.8.0 @@ -46,12 +40,9 @@ pluggy==1.0.0 pre-commit==2.20.0 ptyprocess==0.7.0 py==1.11.0 -pybiginteger==1.2.6 -pybiginteger-stubs==1.2.6 pycares==4.1.2 pycodestyle==2.8.0 pycparser==2.21 -pycryptodome==3.11.0 pyflakes==2.4.0 pyparsing==3.0.9 pyrsistent==0.18.1 @@ -68,4 +59,4 @@ tomli==2.0.1 typing-extensions==4.2.0 urllib3==1.26.9 websocket-client==1.3.2 -yarl==1.7.2 +yarl==1.7.2 \ No newline at end of file diff --git a/robot/resources/lib/python_keywords/data_formatters.py b/robot/resources/lib/python_keywords/data_formatters.py index 58df289c..f3366c9b 100644 --- a/robot/resources/lib/python_keywords/data_formatters.py +++ b/robot/resources/lib/python_keywords/data_formatters.py @@ -2,7 +2,7 @@ import base64 import json import base58 -from neo3 import wallet +from neo3.wallet import wallet def dict_to_attrs(attrs: dict) -> str: diff --git a/robot/resources/lib/python_keywords/payment_neogo.py b/robot/resources/lib/python_keywords/payment_neogo.py index 06f1fd0d..e80893d5 100644 --- a/robot/resources/lib/python_keywords/payment_neogo.py +++ b/robot/resources/lib/python_keywords/payment_neogo.py @@ -8,7 +8,8 @@ from typing import Optional import allure from cluster import MainChain, MorphChain from common import GAS_HASH, MAINNET_BLOCK_TIME, NEOFS_CONTRACT, NEOGO_EXECUTABLE -from neo3 import wallet as neo3_wallet +from neo3.wallet import wallet as neo3_wallet +from neo3.wallet import utils as neo3_utils from neofs_testlib.cli import NeoGo from neofs_testlib.shell import Shell from neofs_testlib.utils.converters import contract_hash_to_address @@ -43,7 +44,7 @@ def get_contract_hash(morph_chain: MorphChain, resolve_name: str, shell: Shell) @allure.step("Withdraw Mainnet Gas") def withdraw_mainnet_gas(shell: Shell, main_chain: MainChain, wlt: str, amount: int): address = get_last_address_from_wallet(wlt, EMPTY_PASSWORD) - scripthash = neo3_wallet.Account.address_to_script_hash(address) + scripthash = neo3_utils.address_to_script_hash(address) neogo = NeoGo(shell=shell, neo_go_exec_path=NEOGO_EXECUTABLE) out = neogo.contract.invokefunction( diff --git a/robot/resources/lib/python_keywords/tombstone.py b/robot/resources/lib/python_keywords/tombstone.py index 22617e9b..096356eb 100644 --- a/robot/resources/lib/python_keywords/tombstone.py +++ b/robot/resources/lib/python_keywords/tombstone.py @@ -2,7 +2,7 @@ import json import logging import allure -from neo3 import wallet +from neo3.wallet import wallet from neofs_testlib.shell import Shell from neofs_verbs import head_object diff --git a/venv/local-pytest/environment.sh b/venv/local-pytest/environment.sh deleted file mode 100644 index ff17637b..00000000 --- a/venv/local-pytest/environment.sh +++ /dev/null @@ -1,8 +0,0 @@ -# DevEnv variables -export NEOFS_MORPH_DISABLE_CACHE=true -export DEVENV_PATH="${DEVENV_PATH:-${VIRTUAL_ENV}/../../neofs-dev-env}" -pushd $DEVENV_PATH > /dev/null -export `make env` -popd > /dev/null - -export PYTHONPATH=${PYTHONPATH}:${VIRTUAL_ENV}/../robot/resources/lib/:${VIRTUAL_ENV}/../robot/resources/lib/python_keywords:${VIRTUAL_ENV}/../robot/resources/lib/robot:${VIRTUAL_ENV}/../robot/variables:${VIRTUAL_ENV}/../pytest_tests/helpers:${VIRTUAL_ENV}/../pytest_tests/steps:${VIRTUAL_ENV}/../pytest_tests/resources