Skip to content

Commit 75d1ce7

Browse files
authored
Fix: support for Python 3.11 (#7)
Fix: support for Python 3.11 Problem: some dependencies only support Python 3.11 in the latest releases. We do not want to restrict the version range for users of older Python versions. Solution: specify loose versions for Python<3.11 and the correct ones for Python 3.11. * fix nuls2 * fix nuls2 dependency * fix deps: use latest aleph-pytezos * fix deps: parsimonious bug * fix deps: ci eth-account
1 parent bedffbb commit 75d1ce7

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/pytest-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
image: [ "python-3.9", "python-3.10", "ubuntu-20.04", "ubuntu-22.04" ]
12+
image: [ "python-3.9", "python-3.10", "python-3.11", "ubuntu-20.04", "ubuntu-22.04" ]
1313
runs-on: ubuntu-22.04
1414

1515
steps:

docker/python-3.11.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN pip install --upgrade pip wheel twine
2020

2121
# Preinstall dependencies for faster steps
2222
RUN pip install --upgrade secp256k1 coincurve aiohttp eciespy python-magic typer
23-
RUN pip install --upgrade 'aleph-message~=0.3.1' eth_account pynacl base58
23+
RUN pip install --upgrade 'aleph-message~=0.3.1' pynacl base58
2424
RUN pip install --upgrade pytest pytest-cov pytest-asyncio mypy types-setuptools pytest-asyncio fastapi httpx requests
2525

2626
WORKDIR /opt/aleph-sdk-python/

setup.cfg

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ package_dir =
3131
setup_requires = pyscaffold>=3.2a0,<3.3a0
3232
# Add here dependencies of your project (semicolon/line-separated), e.g.
3333
install_requires =
34-
coincurve
34+
coincurve; python_version<"3.11"
35+
coincurve>=17.0.0; python_version>="3.11" # Technically, this should be >=18.0.0 but there is a conflict with eciespy
3536
aiohttp>=3.8.3
36-
eciespy
37+
eciespy; python_version<"3.11"
38+
eciespy>=0.3.13; python_version>="3.11"
3739
typing_extensions
3840
typer
3941
aleph-message~=0.3.1
4042
eth_account>=0.4.0
43+
# Required to fix a dependency issue with parsimonious and Python3.11
44+
eth_abi==4.0.0b2; python_version>="3.11"
4145
python-magic
4246
# The usage of test_requires is discouraged, see `Dependency Management` docs
4347
# tests_require = pytest; pytest-cov
@@ -69,7 +73,7 @@ testing =
6973
# httpx is required in tests by fastapi.testclient
7074
httpx
7175
requests
72-
aleph-pytezos==0.1.0
76+
aleph-pytezos==0.1.1
7377
types-certifi
7478
types-setuptools
7579
black
@@ -80,9 +84,12 @@ mqtt =
8084
certifi
8185
Click
8286
nuls2 =
83-
nuls2-python
87+
# use the branch with support for Python 3.11
88+
nuls2-python@git+https://github.com/odesenfans/nuls2-python.git@fda2ba4a5f9397f4f84cfee738942c4a15f88840
8489
ethereum =
8590
eth_account>=0.4.0
91+
# Required to fix a dependency issue with parsimonious and Python3.11
92+
eth_abi==4.0.0b2; python_version>="3.11"
8693
polkadot =
8794
substrate-interface==1.3.4
8895
cosmos =
@@ -92,7 +99,7 @@ solana =
9299
base58
93100
tezos =
94101
pynacl
95-
aleph-pytezos==0.1.0
102+
aleph-pytezos==0.1.1
96103
docs =
97104
sphinxcontrib-plantuml
98105

0 commit comments

Comments
 (0)