Skip to content

Commit cddb844

Browse files
authored
Bump python and neo-mamba versions (#1251)
2 parents 06d3269 + e93d1a8 commit cddb844

File tree

11 files changed

+14
-22
lines changed

11 files changed

+14
-22
lines changed

.github/workflows/run-unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ["3.12"]
26+
python-version: ["3.13"]
2727

2828
steps:
2929
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v4
30+
uses: actions/setup-python@v6.1.0
3131
with:
3232
python-version: ${{ matrix.python-version }}
3333

.github/workflows/system-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ jobs:
123123
- run: go version
124124

125125
- name: Set up Python
126-
uses: actions/setup-python@v5
126+
uses: actions/setup-python@v6.1.0
127127
with:
128-
python-version: '3.12'
128+
python-version: '3.13'
129129
- run: python --version
130130

131131
- name: Checkout neofs-testcases repository

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/make -f
22

33
VENV_DIR := venv.pytest
4-
PYTHON := python3.12
5-
PIP := pip3.12
4+
PYTHON := python3.13
5+
PIP := pip3.13
66
ENV_FILE := .env
77
BINARIES := neo-go neofs-adm neofs-cli neofs-ir neofs-lens neofs-node neofs-rest-gw neofs-s3-authmate neofs-s3-gw
88

neofs-testlib/neofs_testlib/utils/wallet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def init_wallet(wallet_path: str, wallet_password: str) -> str:
2020
account = neo3_account.Account.create_new(wallet_password)
2121
wallet.account_add(account)
2222
with open(wallet_path, "w") as out:
23-
json.dump(wallet.to_json(), out)
23+
json.dump(wallet.to_json(wallet_password), out)
2424
logger.info(f"Init new wallet: {wallet_path}, address: {account.address}")
2525
return account.address
2626

neofs-testlib/neofs_testlib_tests/unit/test_wallet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_get_last_address_from_wallet_with_multiple_accounts(self):
4747
wallet.account_add(account2)
4848

4949
with open(wallet_file_path, "w") as out:
50-
json.dump(wallet.to_json(), out)
50+
json.dump(wallet.to_json(self.DEFAULT_PASSWORD), out)
5151

5252
with open(wallet_file_path, "r") as wallet_file:
5353
wallet = Wallet.from_json(json.load(wallet_file), passwords=[self.DEFAULT_PASSWORD, self.DEFAULT_PASSWORD])

pytest_tests/lib/helpers/grpc_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ def get_wallet_keys(default_wallet: NodeWallet):
3333
neo3_wallet: Wallet = load_wallet(default_wallet.path, default_wallet.password)
3434
acc = neo3_wallet.accounts[0]
3535
public_key = acc.public_key.encode_point(True)
36-
private_key = acc.private_key_from_nep2(
37-
acc.encrypted_key.decode("utf-8"), default_wallet.password, _scrypt_parameters=acc.scrypt_parameters
38-
)
36+
private_key = acc.private_key
3937
return public_key, private_key
4038

4139

pytest_tests/lib/helpers/wallet_helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ def create_wallet_with_money(neofs_env_with_mainchain: NeoFSEnv) -> NodeWallet:
150150
def get_private_key(wallet: NodeWallet) -> bytes:
151151
neo3_wallet: Wallet = load_wallet(wallet.path, passwords=[wallet.password] * 3)
152152
acc = neo3_wallet.accounts[0]
153-
return acc.private_key_from_nep2(
154-
acc.encrypted_key.decode("utf-8"), wallet.password, _scrypt_parameters=acc.scrypt_parameters
155-
)
153+
return acc.private_key
156154

157155

158156
def sign_string(str_to_sign: str, private_key: bytes) -> str:

pytest_tests/lib/rest_gw/rest_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ def generate_credentials(
2020
neo3_wallet: Wallet = load_wallet(wallet.path, wallet.password)
2121
acc = neo3_wallet.accounts[0]
2222
token = get_container_token(gw_endpoint, acc.address, verb=verb, bearer_for_all_users=bearer_for_all_users)
23-
private_key = acc.private_key_from_nep2(
24-
acc.encrypted_key.decode("utf-8"), wallet.password, _scrypt_parameters=acc.scrypt_parameters
25-
)
23+
private_key = acc.private_key
2624

2725
if wallet_connect:
2826
prefix = b"\x01\x00\x01\xf0"

pytest_tests/tests/container/test_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _create_multi_account_wallet(self, accounts: list[neo3_account.Account], pre
4646
for account in accounts:
4747
wallet.account_add(account)
4848
with open(wallet_path, "w") as out:
49-
json.dump(wallet.to_json(), out)
49+
json.dump(wallet.to_json(self.DEFAULT_PASSWORD), out)
5050
return wallet_path
5151

5252
def _refill_gas(self, wallet_path: str, address: str, amount: str = "200.0"):

pytest_tests/tests/contract/test_n3.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ def calculate_invocation_script(datadir: str, container: bytes) -> str:
104104

105105
neo3_wallet: Wallet = load_wallet(os.path.join(datadir, "user_wallet.json"), "user")
106106
acc = neo3_wallet.accounts[0]
107-
private_key = acc.private_key_from_nep2(
108-
acc.encrypted_key.decode("utf-8"), "user", _scrypt_parameters=acc.scrypt_parameters
109-
)
107+
private_key = acc.private_key
110108
signing_key = SigningKey.from_string(private_key, curve=NIST256p)
111109
r, s = sign_ecdsa(signing_key, hashlib.sha256(signed_data).digest(), hashlib.sha256)
112110
signature = get_signature_slice(NIST256p, r, s)

0 commit comments

Comments
 (0)