Skip to content
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

Bump required pytest version to 4.6 #2865

Merged
merged 1 commit into from
Feb 20, 2021

Conversation

Zalathar
Copy link
Contributor

Motivated by #2863, but also a fine idea in general since 4.6 is the earliest version semi-supported by the pytest maintainers.

@Zalathar Zalathar added the tests/build/CI about testing or deployment *of* Hypothesis label Feb 20, 2021
@Zalathar
Copy link
Contributor Author

I'm having some trouble with test_prints_statistics_given_option_under_xdist_with_junitxml (test_statistics.py) under 4.6, so I figured I'd post this as-is to get a second opinion.

deps =
-r../requirements/test.txt
commands=
pip install pytest==4.3 pytest-xdist==1.25 pytest-forked==0.2
pip install pytest==4.6 pytest-xdist==1.34
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I bumped pytest-xdist to the latest version that supports pytest 4.x.

Not sure if pytest-forked still needs to be pinned; pytest-xdist 1.34 seems to work fine with the latest release.

Comment on lines +55 to +57
You are using pytest version %s. Hypothesis tests work with any test
runner, but our pytest plugin requires pytest 4.6 or newer.
Note that the pytest developers no longer support your version either!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since I was already updating this message, I took the liberty of making some small editorial tweaks.

@Zalathar
Copy link
Contributor Author

I assume the test failure has some relation to #2743, since that's when the test was added.

@Zalathar
Copy link
Contributor Author

OK, after some investigation it looks like #2743 never actually worked on non-recent versions of pytest.

I'm going to bisect to find a reasonable minimum version for the offending test, and not worry too much about it being broken on earlier versions than that, since we already accepted it being broken for <4.6.

@Zalathar
Copy link
Contributor Author

The new cutoff for that test is pytest <5.4.0, since that's when it seems to magically start working.

Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

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

Looks good to me, with a few tweaks to the release notes:

  • behaviour change = minor release, not patch
  • mention that 4.6 is the oldest version of pytest still accepting bugfixes
  • I'd use command-line arguments such as --hypothesis-show-statistics rather than the database thing, as a user-visible feature. Current text is fine too.

Happy for you to merge this when ready 😁

@Zalathar
Copy link
Contributor Author

I don't think I can merge this myself, since it's waiting for “check-pytest43” which will never report completion (as it's been renamed by this change).

@Zac-HD
Copy link
Member

Zac-HD commented Feb 20, 2021

Ah, of course - I've updated the required statuses now 😁

@Zac-HD Zac-HD merged commit 1411b1c into HypothesisWorks:master Feb 20, 2021
@Zalathar Zalathar deleted the pytest-46 branch February 20, 2021 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests/build/CI about testing or deployment *of* Hypothesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants