diff --git a/pyproject.toml b/pyproject.toml index fdf9980506..36bfe1f054 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ "marko==2.1.2", "ruamel.yaml==0.18.10", - "setuptools==78.0.2", + "setuptools==78.1.0", "wheel==0.45.1", ] @@ -25,7 +25,7 @@ dependencies = [ "pycryptodome==3.22.0", "remerkleable==0.1.28", "ruamel.yaml==0.18.10", - "setuptools==78.0.2", + "setuptools==78.1.0", "trie==3.1.0", ] @@ -37,7 +37,7 @@ test = [ ] lint = [ "codespell==2.4.1", - "flake8==7.1.2", + "flake8==7.2.0", "mypy==1.15.0", "pylint==3.3.6", ] @@ -50,6 +50,6 @@ generator = [ docs = [ "mdx-truly-sane-lists==1.3", "mkdocs-awesome-pages-plugin==2.10.1", - "mkdocs-material==9.6.9", + "mkdocs-material==9.6.10", "mkdocs==1.6.1", ] diff --git a/pysetup/spec_builders/phase0.py b/pysetup/spec_builders/phase0.py index abfc8a802a..2cc44562d3 100644 --- a/pysetup/spec_builders/phase0.py +++ b/pysetup/spec_builders/phase0.py @@ -49,7 +49,6 @@ def cache_this(key_fn, value_fn, lru_size): # type: ignore def wrapper(*args, **kw): # type: ignore key = key_fn(*args, **kw) - nonlocal cache_dict if key not in cache_dict: cache_dict[key] = value_fn(*args, **kw) return cache_dict[key] diff --git a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py index 934c94c484..3000bc4564 100644 --- a/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/bellatrix/block_processing/test_process_execution_payload.py @@ -64,7 +64,7 @@ def run_execution_payload_processing(spec, state, execution_payload, valid=True, class TestEngine(spec.NoopExecutionEngine): def verify_and_notify_new_payload(self, new_payload_request) -> bool: - nonlocal called_new_block, execution_valid + nonlocal called_new_block called_new_block = True assert new_payload_request.execution_payload == execution_payload return execution_valid diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index d80966381f..f9f195f39d 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -67,7 +67,6 @@ def deco(fn): def entry(*args, spec: Spec, phases: SpecForks, **kw): # make a key for the state, unique to the fork + config (incl preset choice) and balances/activations key = (spec.fork, spec.config.__hash__(), spec.__file__, balances_fn, threshold_fn) - global _custom_state_cache_dict if key not in _custom_state_cache_dict: state = _prepare_state(balances_fn, threshold_fn, spec, phases) _custom_state_cache_dict[key] = state.get_backing() diff --git a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py index 7266de8ae4..e2b34157bd 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/deneb/block_processing/test_process_execution_payload.py @@ -72,7 +72,7 @@ def run_execution_payload_processing(spec, state, execution_payload, blob_kzg_co class TestEngine(spec.NoopExecutionEngine): def verify_and_notify_new_payload(self, new_payload_request) -> bool: - nonlocal called_new_block, execution_valid + nonlocal called_new_block called_new_block = True assert new_payload_request.execution_payload == execution_payload return execution_valid diff --git a/tests/core/pyspec/eth2spec/test/helpers/attestations.py b/tests/core/pyspec/eth2spec/test/helpers/attestations.py index b31fd36a3e..094cc803b8 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/attestations.py +++ b/tests/core/pyspec/eth2spec/test/helpers/attestations.py @@ -422,7 +422,6 @@ def cached_prepare_state_with_attestations(spec, state): # prepare it with attestations, and put it in the LRU. # The input state is likely already cached, so the hash-tree-root does not affect speed. key = (spec.fork, state.hash_tree_root()) - global _prep_state_cache_dict if key not in _prep_state_cache_dict: prepare_state_with_attestations(spec, state) _prep_state_cache_dict[key] = state.get_backing() # cache the tree structure, not the view wrapping it. diff --git a/tests/core/pyspec/eth2spec/test/helpers/rewards.py b/tests/core/pyspec/eth2spec/test/helpers/rewards.py index 7e08a4ad9e..31c669bc4e 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/rewards.py +++ b/tests/core/pyspec/eth2spec/test/helpers/rewards.py @@ -300,7 +300,6 @@ def entry(*args, spec, state, **kw): # transition it to leak, and put it in the LRU. # The input state is likely already cached, so the hash-tree-root does not affect speed. key = (state.hash_tree_root(), spec.MIN_EPOCHS_TO_INACTIVITY_PENALTY, spec.SLOTS_PER_EPOCH, epochs) - global _cache_dict if key not in _cache_dict: transition_state_to_leak(spec, state, epochs=epochs) _cache_dict[key] = state.get_backing() # cache the tree structure, not the view wrapping it.