Skip to content

Commit

Permalink
ci: enable Python 3.12 tests + Mypy fixes + pin dev deps (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG authored Jul 9, 2024
1 parent dac5910 commit c27a5f1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ jobs:
runs-on: "3.10"
- name: CPython 3.11
runs-on: "3.11"
# Following are disabled because of https://github.com/ethereum/eth-tester/issues/276
# - name: CPython 3.12
# runs-on: "3.12"
# Waaaay to soon for 3.13
# - name: CPython 3.13-dev
- name: CPython 3.12
runs-on: "3.12"
# Not yet working, lets revisit later
# - name: CPython 3.13
# runs-on: "3.13-dev"
steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
# "Programming Language :: Python :: 3.13",
]
keywords = [
"ethereum",
Expand All @@ -48,18 +49,19 @@ Tracker = "https://github.com/BoboTiG/py-eip712-structs-ng/issues"
[project.optional-dependencies]
tests = [
"eth-tester==0.12.0b1",
"mypy",
"mypy==1.10.1",
"py-evm==0.10.1b1",
"py-solc-x==2.0.3",
"pytest",
"pytest-cov",
"requests",
"ruff",
"pytest==8.2.2",
"pytest-cov==5.0.0",
"requests==2.32.3",
"ruff==0.5.1",
"setuptools==70.2.0",
"web3>=6.3.0,<7",
]
dev = [
"build",
"twine",
"build==1.2.1",
"twine==5.1.1",
]

[tool.hatch.version]
Expand Down
4 changes: 2 additions & 2 deletions src/eip712_structs/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import operator
import re
from collections import OrderedDict, defaultdict
from collections.abc import Mapping
from collections.abc import MutableMapping
from typing import Any, NamedTuple

from eth_utils.crypto import keccak
Expand All @@ -18,7 +18,7 @@ class OrderedAttributesMeta(type):
"""Metaclass to ensure struct attribute order is preserved."""

@classmethod
def __prepare__(cls, name: str, bases: tuple[type, ...], /, **kwargs: Any) -> Mapping[str, object]:
def __prepare__(cls, name: str, bases: tuple[type, ...], /, **kwargs: Any) -> MutableMapping[str, object]:
return OrderedDict()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copied from web3.py/web3/_utils/contract_sources
+ custom changes (like optimizations to bypass contract code size over limit)
"""

import argparse
import contextlib
import os
Expand Down

0 comments on commit c27a5f1

Please sign in to comment.