Skip to content

WIP: Support python 3.11 #2738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,102 @@ jobs:
- image: cimg/python:3.10
environment:
TOXENV: py310-wheel-cli
#
# Python 3.11
#
py311-core:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-core

py311-ens:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-ens

py311-ethpm:
<<: *ethpm_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-ethpm
# Please don't use this key for any shenanigans
WEB3_INFURA_PROJECT_ID: 7707850c2fb7465ebe6f150d67182e22

py311-integration-goethereum-ipc:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ipc
GETH_VERSION: v1.10.25

py311-integration-goethereum-ipc_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ipc_flaky
GETH_VERSION: v1.10.25

py311-integration-goethereum-http:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-http
GETH_VERSION: v1.10.25

py311-integration-goethereum-http_async:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-http_async
GETH_VERSION: v1.10.25

py311-integration-goethereum-http_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-http_flaky
GETH_VERSION: v1.10.25

py311-integration-goethereum-ws:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ws
GETH_VERSION: v1.10.25

py311-integration-goethereum-ws_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ws_flaky
GETH_VERSION: v1.10.25

py311-integration-ethtester-pyevm:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-ethtester
ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend

py311-wheel-cli:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-wheel-cli
benchmark:
<<: *geth_steps
docker:
Expand Down Expand Up @@ -680,3 +775,14 @@ workflows:
- py310-integration-goethereum-ws_flaky
- py310-integration-ethtester-pyevm
- py310-wheel-cli
- py311-ens
- py311-ethpm
- py311-integration-goethereum-ipc
- py311-integration-goethereum-ipc_flaky
- py311-integration-goethereum-http
- py311-integration-goethereum-http_async
- py311-integration-goethereum-http_flaky
- py311-integration-goethereum-ws
- py311-integration-goethereum-ws_flaky
- py311-integration-ethtester-pyevm
- py311-wheel-cli
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.11

# Set up code directory
WORKDIR /usr/src/app
Expand Down
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ disallow_any_generics = True
warn_redundant_casts = True
warn_unused_configs = True
strict_equality = True

[mypy-ethpm._utils.protobuf.*]
ignore_errors = True
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
],
)
21 changes: 14 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tox]
envlist=
py{37,38,39,310}-ens
py{37,38,39,310}-ethpm
py{37,38,39,310}-core
py{37,38,39,310}-integration-{goethereum,ethtester}
py{37,38,39,310,311}-ens
py{37,38,39,310,311}-ethpm
py{37,38,39,310,311}-core
py{37,38,39,310,311}-integration-{goethereum,ethtester}
lint
docs
benchmark
py{37,38,39,310}-wheel-cli
py{37,38,39,310,311}-wheel-cli

[isort]
combine_as_imports=True
Expand All @@ -28,7 +28,7 @@ extend-ignore=E203,W503

[testenv]
whitelist_externals=/usr/bin/make
install_command=python -m pip install --no-use-pep517 {opts} {packages}
install_command=python -m pip install {opts} {packages}
usedevelop=True
commands=
core: pytest {posargs:tests/core}
Expand Down Expand Up @@ -58,6 +58,7 @@ basepython =
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11

[testenv:lint]
basepython=python
Expand All @@ -66,7 +67,7 @@ commands=
flake8 {toxinidir}/web3 {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/tests --exclude {toxinidir}/ethpm/ethpm-spec,{toxinidir}/**/*_pb2.py
black {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/web3 {toxinidir}/tests {toxinidir}/setup.py --exclude /ethpm/ethpm-spec/|/ethpm/_utils/protobuf/ipfs_file_pb2\.py --check
isort --recursive --skip {toxinidir}/ethpm/_utils/protobuf/ipfs_file_pb2.py --skip {toxinidir}/ethpm/ethpm-spec --check-only --diff {toxinidir}/web3/ {toxinidir}/ens/ {toxinidir}/ethpm/ {toxinidir}/tests/
mypy -p web3 -p ethpm -p ens --exclude ethpm/_utils/protobuf/ipfs_file_pb2\.py --config-file {toxinidir}/mypy.ini
mypy -p web3 -p ethpm -p ens --config-file {toxinidir}/mypy.ini

[testenv:benchmark]
basepython=python
Expand Down Expand Up @@ -110,6 +111,12 @@ whitelist_externals={[common-wheel-cli]whitelist_externals}
commands={[common-wheel-cli]commands}
skip_install=true

[testenv:py311-wheel-cli]
deps={[common-wheel-cli]deps}
whitelist_externals={[common-wheel-cli]whitelist_externals}
commands={[common-wheel-cli]commands}
skip_install=true

[common-wheel-cli-windows]
deps=wheel
whitelist_externals=
Expand Down