Skip to content

chore(deps,pytest): update pytest to v8 #1433

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
May 20, 2025
Merged

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Apr 10, 2025

🗒️ Description

Updates to pytest 8.3.5 (from pytest 7.4.4).

TODO

Sanity checks:

  • fill
  • static fill
  • full fixture diff until Prague
  • consume direct
  • consume rlp
  • consume engine
  • execute hive
  • execute remote
  • fix pytest session warning for consume hive: src/pytest_plugins/consume/hive_simulators/conftest.py:152: PytestRemovedIn9Warning: Marks applied to fixtures have no effect

🔗 Related Issues

None

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.

@danceratopz danceratopz added scope:pytest Scope: Changes EEST's pytest plugins type:chore Type: Chore scope:deps Scope: Updates package dependencies labels Apr 10, 2025
@danceratopz danceratopz force-pushed the chore/update-to-pytest-v8 branch from 357be6a to a5469d7 Compare April 10, 2025 14:31
@marioevz
Copy link
Member

marioevz commented May 7, 2025

I tried to patch the failing function with no success, but I did not spend much time on it.

I think we can gauge how good of an improvement the new pytest version is, and the benefits, and based on that decide to spend enough time and fix the failing static test filling.

@marioevz
Copy link
Member

Pushed a fix to static test filling!

It should work up until the latest 8.x.x version :)

@danceratopz danceratopz force-pushed the chore/update-to-pytest-v8 branch from 0e9eec5 to c9cdcb0 Compare May 20, 2025 11:43
@danceratopz
Copy link
Member Author

Verified the fixtures with hasher: All fixtures (including those from static fillers) until Prague match!

Only some test IDs differ, due to a change in how pytest handles duplicate manually specified test IDs. For example, given:

    pytest.param(
        Bytes(b"0x0102030405060708090A0B0C0D0E0F101112131415161718191a1b1c1d1e1f20"),
        id="data_set_1",
    ),
    pytest.param(
        Bytes(b"0x00010203040506000708090A0B0C0D0E0F10111200131415161718191a1b1c1d1e1f"),
        id="data_set_1",
    ),
  • pytest 7 produces the IDs:
    test_something[data_set_11]
    test_something[data_set_12]
  • pytest 8 produces the IDs:
    test_something[data_set_1_1]
    test_something[data_set_1_2]

This was the case for one of our tests:

tests/berlin/eip2930_access_list/test_tx_intrinsic_gas.py::test_tx_intrinsic_gas

Fixed in dd3ab7f.

@danceratopz danceratopz force-pushed the chore/update-to-pytest-v8 branch from 5117ab3 to d0c4fd0 Compare May 20, 2025 17:51
@danceratopz danceratopz marked this pull request as ready for review May 20, 2025 17:51
@danceratopz danceratopz requested a review from marioevz May 20, 2025 17:52
@danceratopz
Copy link
Member Author

@marioevz I didn't check execute in "live" mode, otherwise, this LGTM!

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Amazing, thanks for taking care of this!

I think we are closer to updating the minimum python version past the 3.11 ? But that can be a follow up PR.

@marioevz marioevz merged commit e13c592 into main May 20, 2025
26 checks passed
@marioevz marioevz deleted the chore/update-to-pytest-v8 branch May 20, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:deps Scope: Updates package dependencies scope:pytest Scope: Changes EEST's pytest plugins type:chore Type: Chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants