Skip to content

Commit c34ef03

Browse files
authored
Update dependencies (#480)
* Update deps * Change default ci python version * Update black
1 parent b1788b0 commit c34ef03

11 files changed

Lines changed: 1092 additions & 1026 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
run: |
3333
poetry run pytest --doctest-modules --ignore=examples --cov=pycardano --cov-config=.coveragerc --cov-report=xml
3434
- name: "Upload coverage to Codecov"
35-
if: ${{ matrix.python-version == '3.11' }}
35+
if: ${{ matrix.python-version == '3.13' }}
3636
uses: codecov/codecov-action@v4
3737
with:
3838
fail_ci_if_error: false
3939
token: ${{ secrets.CODECOV_TOKEN || '' }}
4040
- name: Run static analyses
41-
if: ${{ matrix.python-version == '3.11' }}
41+
if: ${{ matrix.python-version == '3.13' }}
4242
run: |
4343
make qa
4444
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
matrix:
4949
os: [ubuntu-latest]
50-
python-version: ['3.11']
50+
python-version: ['3.13']
5151

5252
steps:
5353
- uses: actions/checkout@v4
@@ -69,7 +69,7 @@ jobs:
6969
cd integration-test && ./run_tests.sh
7070
7171
- name: "Upload coverage to Codecov"
72-
if: ${{ matrix.python-version == '3.11' }}
72+
if: ${{ matrix.python-version == '3.13' }}
7373
uses: codecov/codecov-action@v4
7474
with:
7575
fail_ci_if_error: false

examples/raw_multi_asset_transaction.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@
4242
tx_body = TransactionBody(inputs=[tx_in], outputs=[output1, output2], fee=165897)
4343

4444
# Create signing key from a secret json file
45-
sk = PaymentSigningKey.from_json(
46-
"""{
45+
sk = PaymentSigningKey.from_json("""{
4746
"type": "GenesisUTxOSigningKey_ed25519",
4847
"description": "Genesis Initial UTxO Signing Key",
4948
"cborHex": "5820093be5cd3987d0c9fd8854ef908f7746b69e2d73320db6dc0f780d81585b84c2"
50-
}"""
51-
)
49+
}""")
5250

5351
# Derive a verification key from the signing key
5452
vk = PaymentVerificationKey.from_signing_key(sk)

examples/raw_transaction.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@
2626
tx_body = TransactionBody(inputs=[tx_in], outputs=[output1, output2], fee=165897)
2727

2828
# Create signing key from a secret json file
29-
sk = PaymentSigningKey.from_json(
30-
"""{
29+
sk = PaymentSigningKey.from_json("""{
3130
"type": "GenesisUTxOSigningKey_ed25519",
3231
"description": "Genesis Initial UTxO Signing Key",
3332
"cborHex": "5820093be5cd3987d0c9fd8854ef908f7746b69e2d73320db6dc0f780d81585b84c2"
34-
}"""
35-
)
33+
}""")
3634

3735
# Derive a verification key from the signing key
3836
vk = PaymentVerificationKey.from_signing_key(sk)

poetry.lock

Lines changed: 1053 additions & 954 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pycardano/crypto/bech32.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
"""Reference implementation for Bech32/Bech32m and segwit addresses."""
2323

24-
2524
from enum import Enum
2625

2726

pycardano/crypto/bip32.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def _derive_private_child_key_by_index(
395395
396396
"""
397397
# unpack argument
398-
(kLP, kRP, AP, cP, path) = private_pnode
398+
kLP, kRP, AP, cP, path = private_pnode
399399
assert 0 <= index < 2**32
400400

401401
i_bytes = index.to_bytes(4, "little")
@@ -457,7 +457,7 @@ def _derive_public_child_key_by_index(
457457
HDWallet with child node derived.
458458
"""
459459
# unpack argument
460-
(AP, cP, path) = public_pnode
460+
AP, cP, path = public_pnode
461461
assert 0 <= index < 2**32
462462

463463
i_bytes = index.to_bytes(4, "little")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pytest = ">=8.2.0"
4747
pytest-cov = ">=5.0.0"
4848
flake8 = ">=7.0.0"
4949
isort = ">=5.11.4"
50-
black = ">=24.4.2"
50+
black = {version = ">=26.1.0", python = ">=3.10"}
5151
sphinx-copybutton = ">=0.5.0"
5252
retry = ">=0.9.2"
5353
Flask = ">=2.0.3"

test/pycardano/test_address.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020

2121

2222
def test_payment_addr():
23-
vk = PaymentVerificationKey.from_json(
24-
"""{
23+
vk = PaymentVerificationKey.from_json("""{
2524
"type": "GenesisUTxOVerificationKey_ed25519",
2625
"description": "Genesis Initial UTxO Verification Key",
2726
"cborHex": "58208be8339e9f3addfa6810d59e2f072f85e64d4c024c087e0d24f8317c6544f62f"
28-
}"""
29-
)
27+
}""")
3028
assert (
3129
Address(vk.hash(), network=Network.TESTNET).encode()
3230
== "addr_test1vr2p8st5t5cxqglyjky7vk98k7jtfhdpvhl4e97cezuhn0cqcexl7"

test/pycardano/test_cip8.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,54 +10,42 @@
1010
)
1111
from pycardano.network import Network
1212

13-
EXTENDED_SK = ExtendedSigningKey.from_json(
14-
"""{
13+
EXTENDED_SK = ExtendedSigningKey.from_json("""{
1514
"type": "PaymentExtendedSigningKeyShelley_ed25519_bip32",
1615
"description": "Payment Signing Key",
1716
"cborHex": "5880e8428867ab9cc9304379a3ce0c238a592bd6d2349d2ebaf8a6ed2c6d2974a15ad59c74b6d8fa3edd032c6261a73998b7deafe983b6eeaff8b6fb3fab06bdf8019b693a62bce7a3cad1b9c02d22125767201c65db27484bb67d3cee7df7288d62c099ac0ce4a215355b149fd3114a2a7ef0438f01f8872c4487a61b469e26aae4"
18-
}"""
19-
)
17+
}""")
2018

21-
EXTENDED_VK = ExtendedVerificationKey.from_json(
22-
"""{
19+
EXTENDED_VK = ExtendedVerificationKey.from_json("""{
2320
"type": "PaymentExtendedVerificationKeyShelley_ed25519_bip32",
2421
"description": "Payment Verification Key",
2522
"cborHex": "58409b693a62bce7a3cad1b9c02d22125767201c65db27484bb67d3cee7df7288d62c099ac0ce4a215355b149fd3114a2a7ef0438f01f8872c4487a61b469e26aae4"
26-
}"""
27-
)
23+
}""")
2824

2925

30-
SK = PaymentSigningKey.from_json(
31-
"""{
26+
SK = PaymentSigningKey.from_json("""{
3227
"type": "GenesisUTxOSigningKey_ed25519",
3328
"description": "Genesis Initial UTxO Signing Key",
3429
"cborHex": "5820093be5cd3987d0c9fd8854ef908f7746b69e2d73320db6dc0f780d81585b84c2"
35-
}"""
36-
)
30+
}""")
3731

38-
VK = PaymentVerificationKey.from_json(
39-
"""{
32+
VK = PaymentVerificationKey.from_json("""{
4033
"type": "GenesisUTxOVerificationKey_ed25519",
4134
"description": "Genesis Initial UTxO Verification Key",
4235
"cborHex": "58208be8339e9f3addfa6810d59e2f072f85e64d4c024c087e0d24f8317c6544f62f"
43-
}"""
44-
)
36+
}""")
4537

46-
STAKE_SK = StakeSigningKey.from_json(
47-
"""{
38+
STAKE_SK = StakeSigningKey.from_json("""{
4839
"type": "StakeSigningKeyShelley_ed25519",
4940
"description": "Stake Signing Key",
5041
"cborHex": "5820ff3a330df8859e4e5f42a97fcaee73f6a00d0cf864f4bca902bd106d423f02c0"
51-
}"""
52-
)
42+
}""")
5343

54-
STAKE_VK = StakeVerificationKey.from_json(
55-
"""{
44+
STAKE_VK = StakeVerificationKey.from_json("""{
5645
"type": "StakeVerificationKeyShelley_ed25519",
5746
"description": "Stake Verification Key",
5847
"cborHex": "58205edaa384c658c2bd8945ae389edac0a5bd452d0cfd5d1245e3ecd540030d1e3c"
59-
}"""
60-
)
48+
}""")
6149

6250

6351
def test_verify_message():

test/pycardano/test_key.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,41 @@
2222
StakePoolVerificationKey,
2323
)
2424

25-
SK = PaymentSigningKey.from_json(
26-
"""{
25+
SK = PaymentSigningKey.from_json("""{
2726
"type": "GenesisUTxOSigningKey_ed25519",
2827
"description": "Genesis Initial UTxO Signing Key",
2928
"cborHex": "5820093be5cd3987d0c9fd8854ef908f7746b69e2d73320db6dc0f780d81585b84c2"
30-
}"""
31-
)
29+
}""")
3230

33-
VK = PaymentVerificationKey.from_json(
34-
"""{
31+
VK = PaymentVerificationKey.from_json("""{
3532
"type": "GenesisUTxOVerificationKey_ed25519",
3633
"description": "Genesis Initial UTxO Verification Key",
3734
"cborHex": "58208be8339e9f3addfa6810d59e2f072f85e64d4c024c087e0d24f8317c6544f62f"
38-
}"""
39-
)
35+
}""")
4036

41-
SPSK = StakePoolSigningKey.from_json(
42-
"""{
37+
SPSK = StakePoolSigningKey.from_json("""{
4338
"type": "StakePoolSigningKey_ed25519",
4439
"description": "StakePoolSigningKey_ed25519",
4540
"cborHex": "582044181bd0e6be21cea5b0751b8c6d4f88a5cb2d5dfec31a271add617f7ce559a9"
46-
}"""
47-
)
41+
}""")
4842

49-
SPVK = StakePoolVerificationKey.from_json(
50-
"""{
43+
SPVK = StakePoolVerificationKey.from_json("""{
5144
"type": "StakePoolVerificationKey_ed25519",
5245
"description": "StakePoolVerificationKey_ed25519",
5346
"cborHex": "5820354ce32da92e7116f6c70e9be99a3a601d33137d0685ab5b7e2ff5b656989299"
54-
}"""
55-
)
47+
}""")
5648

57-
EXTENDED_SK = ExtendedSigningKey.from_json(
58-
"""{
49+
EXTENDED_SK = ExtendedSigningKey.from_json("""{
5950
"type": "PaymentExtendedSigningKeyShelley_ed25519_bip32",
6051
"description": "Payment Signing Key",
6152
"cborHex": "5880e8428867ab9cc9304379a3ce0c238a592bd6d2349d2ebaf8a6ed2c6d2974a15ad59c74b6d8fa3edd032c6261a73998b7deafe983b6eeaff8b6fb3fab06bdf8019b693a62bce7a3cad1b9c02d22125767201c65db27484bb67d3cee7df7288d62c099ac0ce4a215355b149fd3114a2a7ef0438f01f8872c4487a61b469e26aae4"
62-
}"""
63-
)
53+
}""")
6454

65-
EXTENDED_VK = ExtendedVerificationKey.from_json(
66-
"""{
55+
EXTENDED_VK = ExtendedVerificationKey.from_json("""{
6756
"type": "PaymentExtendedVerificationKeyShelley_ed25519_bip32",
6857
"description": "Payment Verification Key",
6958
"cborHex": "58409b693a62bce7a3cad1b9c02d22125767201c65db27484bb67d3cee7df7288d62c099ac0ce4a215355b149fd3114a2a7ef0438f01f8872c4487a61b469e26aae4"
70-
}"""
71-
)
59+
}""")
7260

7361

7462
def test_invalid_key_type():

0 commit comments

Comments
 (0)