Skip to content

chore(deps): pin build-system deps, remove setuptools from deps #1345

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

Merged
merged 5 commits into from
Mar 25, 2025

Conversation

spencer-tb
Copy link
Contributor

@spencer-tb spencer-tb commented Mar 24, 2025

🗒️ Description

setuptools 78.0.0 introduced a bug which triggered CI fails as we didn't pin setuptools in our [build-system] requires section, see this comment, the OP has the symptoms.

Whilst this has been fixed in setuptools 78.0.1, we should pin the packages in our [build-system] section.

This PR:

  1. Pins setuptools to 78.0.2 and wheel to 0.45.1 in [build-system] requires section.
  2. Removes setuptools and types-setuptools from our package dependencies; this required bumping trie>=3.1,<4`.
  3. Reverts "pycryptodome>=3.4.6,<3.10" from chore(ci): explicity define version range for pycryptodome. #1343.

🔗 Related Issues

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.

@spencer-tb spencer-tb added scope:ci Scope: Continuous Integration type:chore Type: Chore labels Mar 24, 2025
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug that #1343 addressed, wasn't a uv problem, it was due to a bug in setuptools v78.0.0 (see this comment in the linked uv issue). It was fixed in setuptools v78.0.1.

As we originally didn't pin setuptools in [build-system] before your initial PR, #1343, eest was exposed to this bug. #1343 did pin it though, which is a good idea, so I suggest instead of simply reverting #1343 in this PR, we pin it to the latest patch release, v78.0.2 to make we don't run into this type of problem again.

Then the question is: Should we pin the setuptools included in our package dependencies?
Which then begs the question: Why is setuptools in our package dependencies? 😆

AFAICT, it's only there for trie < 3, as trie seemingly doesn't have it as a dependency, but imported pkg_resources from it's __init__.py:

src/ethereum_test_types/types.py:25: in <module>
    from trie import HexaryTrie
.venv/lib/python3.12/site-packages/trie/__init__.py:1: in <module>
    import pkg_resources
E   ModuleNotFoundError: No module named 'pkg_resources'
============================================================================================================================================================== short test summary info ===============================================================================================================================================================
ERROR  - ModuleNotFoundError: No module named 'pkg_resources'

Trie < 3 also gave us a setuptools related warning:

.venv/lib/python3.12/site-packages/trie/__init__.py:1
  /home/dtopz/code/github/new/execution-spec-tests/.venv/lib/python3.12/site-packages/trie/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

Luckily, updating to trie==3.1.0 solves all these problems 🥳

So to summarize:

  1. We should pin setuptools to 78.0.2 in the [build-system] requires section.
  2. We should update trie's dep constraints to trie>=3.1.0,<4 in eest package dependencies.
  3. We should remove setuptools and setuptools-types from our package dependencies.

This is getting a bit out of hand, but it seems worth addressing these issues 😄


@spencer-tb spencer-tb changed the title chore(ci): revert pycryptodome change chore(ci): revert pycryptodome change and update dependencies Mar 25, 2025
@danceratopz danceratopz changed the title chore(ci): revert pycryptodome change and update dependencies chore(deps): pin build-system deps, remove setuptools from deps Mar 25, 2025
@danceratopz danceratopz added the scope:deps Scope: Updates package dependencies label Mar 25, 2025
@danceratopz
Copy link
Member

1. We should pin `setuptools` to 78.0.2 in the `[build-system]` `requires` section.

Done by hand, doesn't effect uv.lock.

2. We should update `trie`'s dep constraints to `trie>=3.1.0,<4` in eest package `dependencies`.
uv add "trie>=3.1.0,<4"
3. We should remove `setuptools` and `setuptools-types` from our package `dependencies`.
uv remove setuptools types-setuptools

Copy link
Contributor Author

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @danceratopz :)

Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@danceratopz danceratopz merged commit 8713172 into ethereum:main Mar 25, 2025
11 checks passed
felix314159 pushed a commit to felix314159/execution-spec-tests that referenced this pull request May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:ci Scope: Continuous Integration scope:deps Scope: Updates package dependencies type:chore Type: Chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants