File tree Expand file tree Collapse file tree 7 files changed +45
-13
lines changed Expand file tree Collapse file tree 7 files changed +45
-13
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ jobs:
113
113
include :
114
114
- os : macos-latest
115
115
python : " 3.11"
116
+ - os : macos-latest
117
+ python : " pypy3.11"
116
118
- os : ubuntu-latest
117
119
python : " 3.12"
118
120
steps :
@@ -155,6 +157,9 @@ jobs:
155
157
- os : [self-hosted-ghr, size-xl-x64]
156
158
name : self-hosted-ghr-xl-x64
157
159
python : " 3.11"
160
+ - os : [self-hosted-ghr, size-xl-x64]
161
+ name : self-hosted-ghr-xl-x64-pypy
162
+ python : " pypy3.11"
158
163
- os : macos-latest
159
164
name : macos-latest
160
165
python : " 3.12"
@@ -175,6 +180,9 @@ jobs:
175
180
cache-dependency-glob : " uv.lock"
176
181
version : ${{ vars.UV_VERSION }}
177
182
python-version : ${{ matrix.python }}
183
+ - name : Install linux dependencies
184
+ if : matrix.python == 'pypy3.11' && contains(matrix.os, 'self-hosted-ghr')
185
+ run : sudo apt-get install -y pkg-config libsecp256k1-dev
178
186
- name : Update eels_resolutions.json
179
187
run : |
180
188
sed -i -e "s|\$GITHUB_WORKSPACE|${GITHUB_WORKSPACE}|g" .github/configs/eels_resolutions.json
@@ -190,6 +198,8 @@ jobs:
190
198
include :
191
199
- os : ubuntu-latest
192
200
python : " 3.11"
201
+ - os : ubuntu-latest
202
+ python : " pypy3.11"
193
203
- os : macos-latest
194
204
python : " 3.12"
195
205
steps :
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ Users can select any of the artifacts depending on their testing needs for their
88
88
89
89
### 📋 Misc
90
90
91
+ - ✨ Add pypy3.11 support ([ #1854 ] ( https://github.com/ethereum/execution-spec-tests/pull/1854 ) ).
91
92
- 🔀 Use only relative imports in ` tests/ ` directory ([ #1848 ] ( https://github.com/ethereum/execution-spec-tests/pull/1848 ) ).
92
93
- 🔀 Misc. doc updates, including a navigation footer ([ #1846 ] ( https://github.com/ethereum/execution-spec-tests/pull/1846 ) ).
93
94
- 🔀 Remove Python 3.10 support ([ #1808 ] ( https://github.com/ethereum/execution-spec-tests/pull/1808 ) ).
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ dependencies = [
36
36
" coincurve>=20.0.0,<21" ,
37
37
" trie>=3.1.0,<4" ,
38
38
" semver>=3.0.1,<4" ,
39
- " pydantic>=2.10 .0,<3" ,
39
+ " pydantic>=2.11 .0,<3" ,
40
40
" rich>=13.7.0,<14" ,
41
41
" filelock>=3.15.1,<4" ,
42
42
" ethereum-types>=0.2.1,<0.3" ,
@@ -79,6 +79,7 @@ docs = [
79
79
" mkdocstrings-python>=1.0.0,<2" ,
80
80
" pillow>=10.0.1,<11" ,
81
81
" pyspelling>=2.8.2,<3" ,
82
+ " lxml>=6.0.0,<7" , # needs to be >= 6.0 for pypy
82
83
" setuptools==78.0.2" ,
83
84
]
84
85
Original file line number Diff line number Diff line change 15
15
16
16
from requests import Response
17
17
from requests .exceptions import ConnectionError as RequestsConnectionError
18
+ from requests .exceptions import ReadTimeout
18
19
from requests_unixsocket import Session # type: ignore
19
20
20
21
from ethereum_test_base_types import BlobSchedule
@@ -297,6 +298,18 @@ def _evaluate_filesystem(
297
298
298
299
return output
299
300
301
+ def _check_server_health (self , session : Session ):
302
+ """Check if the server is still responsive and restart if needed."""
303
+ try :
304
+ session .post (self .server_url , json = {}, timeout = 2 )
305
+ return True
306
+ except Exception :
307
+ self .shutdown ()
308
+ time .sleep (0.1 )
309
+ self .start_server ()
310
+ time .sleep (0.5 )
311
+ return False
312
+
300
313
def _server_post (
301
314
self ,
302
315
data : Dict [str , Any ],
@@ -308,15 +321,20 @@ def _server_post(
308
321
if url_args is None :
309
322
url_args = {}
310
323
post_delay = 0.1
324
+
311
325
while True :
312
326
try :
313
- response = Session ().post (
327
+ session = Session ()
328
+ response = session .post (
314
329
f"{ self .server_url } ?{ urlencode (url_args , doseq = True )} " ,
315
330
json = data ,
316
331
timeout = timeout ,
317
332
)
318
333
break
319
- except RequestsConnectionError as e :
334
+ except (RequestsConnectionError , ReadTimeout ) as e :
335
+ if not self ._check_server_health (session ):
336
+ # Server was restarted, try again
337
+ continue
320
338
retries -= 1
321
339
if retries == 0 :
322
340
raise e
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ def model_post_init(self, __context):
179
179
# if so, check if the field is required for the given fork.
180
180
annotated_hints = get_type_hints (self , include_extras = True )
181
181
182
- for field in self .model_fields :
182
+ for field in self .__class__ . model_fields :
183
183
if field == "fork" :
184
184
continue
185
185
@@ -197,7 +197,7 @@ def model_post_init(self, __context):
197
197
def rlp_encode_list (self ) -> List :
198
198
"""Compute the RLP of the header."""
199
199
header_list = []
200
- for field in self .model_fields :
200
+ for field in self .__class__ . model_fields :
201
201
if field == "fork" :
202
202
continue
203
203
value = getattr (self , field )
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ setenv =
56
56
# Required for `cairosvg` so tox can find `libcairo-2`.
57
57
# https://squidfunk.github.io/mkdocs-material/plugins/requirements/image-processing/?h=cairo#cairo-library-was-not-found
58
58
DYLD_FALLBACK_LIBRARY_PATH = /opt/homebrew/lib
59
- commands =
59
+ commands =
60
60
ruff check --no-fix --show-fixes docs/scripts
61
61
ruff format --check docs/scripts
62
62
mkdocs build --strict
@@ -67,7 +67,7 @@ setenv =
67
67
# Use custom EELS_RESOLUTIONS_FILE if it is set via the environment (eg, in CI)
68
68
EELS_RESOLUTIONS_FILE = {env:EELS_RESOLUTIONS_FILE:}
69
69
CI = {env:CI:}
70
- extras =
70
+ extras =
71
71
test
72
72
lint # Required `gentest` for formatting tests
73
73
commands =
@@ -113,9 +113,9 @@ extras =
113
113
{[testenv:typecheck]extras}
114
114
{[testenv:spellcheck]extras}
115
115
{[testenv:pytest]extras}
116
- setenv =
116
+ setenv =
117
117
{[testenv:pytest]setenv}
118
- commands_pre =
118
+ commands_pre =
119
119
{[testenv:pytest]:commands_pre}
120
120
commands =
121
121
{[testenv:lint]commands}
@@ -133,10 +133,10 @@ extras =
133
133
{[testenv:spellcheck]extras}
134
134
{[testenv:tests-deployed]extras}
135
135
{[testenv:tests-deployed-benchmark]extras}
136
- setenv =
136
+ setenv =
137
137
{[testenv:pytest]setenv}
138
- commands_pre =
139
- {[testenv:tests-deployed]:commands_pre}
138
+ commands_pre =
139
+ {[testenv:tests-deployed]:commands_pre}
140
140
{[testenv:tests-deployed-benchmark]:commands_pre}
141
141
commands =
142
142
{[testenv:lint]commands}
You can’t perform that action at this time.
0 commit comments