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 pytest from 7.4.0 to 8.0.2 #1994

Merged
merged 21 commits into from
Apr 16, 2024
Merged

Bump pytest from 7.4.0 to 8.0.2 #1994

merged 21 commits into from
Apr 16, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 26, 2024

Bumps pytest from 7.4.0 to 8.0.2.

Release notes

Sourced from pytest's releases.

8.0.2

pytest 8.0.2 (2024-02-24)

Bug Fixes

  • #11895: Fix collection on Windows where initial paths contain the short version of a path (for example c:\PROGRA~1\tests).
  • #11953: Fix an IndexError crash raising from getstatementrange_ast.
  • #12021: Reverted a fix to [--maxfail]{.title-ref} handling in pytest 8.0.0 because it caused a regression in pytest-xdist whereby session fixture teardowns may get executed multiple times when the max-fails is reached.

8.0.1

pytest 8.0.1 (2024-02-16)

Bug Fixes

  • #11875: Correctly handle errors from getpass.getuser{.interpreted-text role="func"} in Python 3.13.
  • #11879: Fix an edge case where ExceptionInfo._stringify_exception could crash pytest.raises{.interpreted-text role="func"}.
  • #11906: Fix regression with pytest.warns{.interpreted-text role="func"} using custom warning subclasses which have more than one parameter in their [__init__]{.title-ref}.
  • #11907: Fix a regression in pytest 8.0.0 whereby calling pytest.skip{.interpreted-text role="func"} and similar control-flow exceptions within a pytest.warns(){.interpreted-text role="func"} block would get suppressed instead of propagating.
  • #11929: Fix a regression in pytest 8.0.0 whereby autouse fixtures defined in a module get ignored by the doctests in the module.
  • #11937: Fix a regression in pytest 8.0.0 whereby items would be collected in reverse order in some circumstances.

pytest 8.0.0 (2024-01-27)

See 8.0.0rc1 and 8.0.0rc2 for the full changes since pytest 7.4!

Bug Fixes

  • #11842: Properly escape the reason of a skip <pytest.mark.skip ref>{.interpreted-text role="ref"} mark when writing JUnit XML files.
  • #11861: Avoid microsecond exceeds 1_000_000 when using log-date-format with %f specifier, which might cause the test suite to crash.

8.0.0rc2

pytest 8.0.0rc2 (2024-01-17)

Improvements

  • #11233: Improvements to -r for xfailures and xpasses:
    • Report tracebacks for xfailures when -rx is set.
    • Report captured output for xpasses when -rX is set.
    • For xpasses, add - in summary between test name and reason, to match how xfail is displayed.
  • #11825: The pytest_plugin_registered{.interpreted-text role="hook"} hook has a new plugin_name parameter containing the name by which plugin is registered.

Bug Fixes

  • #11706: Fix reporting of teardown errors in higher-scoped fixtures when using [--maxfail]{.title-ref} or [--stepwise]{.title-ref}.

... (truncated)

Commits
  • 31afeeb Prepare release version 8.0.2
  • 1b00a2f Merge pull request #12025 from pytest-dev/backport-12022-to-8.0.x
  • ff2f66d [8.0.x] Revert "Fix teardown error reporting when --maxfail=1 (#11721)"
  • 8a8eed6 [8.0.x] Fix collection of short paths on Windows (#12024)
  • 74346f0 [8.0.x] Allow Sphinx 7.x (#12005)
  • b7657b4 [8.0.x] Disallow Sphinx 6 and 7 (#12001)
  • feb7c5e Merge pull request #11999 from pytest-dev/backport-11996-to-8.0.x
  • 0909655 [8.0.x] code: fix IndexError crash in getstatementrange_ast
  • 68524d4 Merge pull request #11993 from pytest-dev/release-8.0.1
  • d7d320a Prepare release version 8.0.1
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to 8.0.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@7.4.0...8.0.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added external dependency python Pull requests that update Python code labels Feb 26, 2024
@Kami
Copy link
Member

Kami commented Apr 14, 2024

Will be able to upgrade once this PR is merged - #1941

@Kami Kami self-assigned this Apr 14, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 15, 2024

A newer version of pytest exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@Kami
Copy link
Member

Kami commented Apr 15, 2024

#1941 has been merged, but it looks like something else is going on with pytest-xdist plugin and a race condition is bubbling up on each run. I need to dig in more to see why that is the case.

Kami added 7 commits April 15, 2024 21:53
version (>= 8.0).

In theory with mocking in place, those tests should be safe to run in
parallel, but because of some reason, they are prone to race condition,
but only with pytest >= 8.0.0.

To avoid this race condition, we now run tests which are not thread safe
separately at the end in non parallel fashion.

Tests which are not safe to run in parallel are marked with "serial"
pytest marker.
@asfgit asfgit force-pushed the dependabot/pip/pytest-8.0.2 branch 2 times, most recently from 034f180 to b83ffc8 Compare April 16, 2024 16:50
@Kami
Copy link
Member

Kami commented Apr 16, 2024

It looks like collection loading mechanism changes in pytest 8.0 (https://docs.pytest.org/en/stable/changelog.html#collection-changes) identified all kinds of cross test pollution and race conditions which only manifest itself when running tests in parallel in specific order.

I'm trying to fix it, but it's somewhat problematic since it relies on test ordering and distribution across workers so I can't reliably reproduce it locally.

@asfgit asfgit force-pushed the dependabot/pip/pytest-8.0.2 branch from b83ffc8 to 4593aa3 Compare April 16, 2024 16:55
Kami added 2 commits April 16, 2024 18:56
we incorrectly used class attribute value instead of the value passed to
the method.

This could result in all kinds of weird edge cases and test failures in
case the environment wasn't correctly reset before / after each test.
@asfgit asfgit force-pushed the dependabot/pip/pytest-8.0.2 branch 3 times, most recently from b78b55b to bb23d9f Compare April 16, 2024 17:16
pollution and related failures when running tests in parallel.

Also remove other changes which were added which are not actually
needed.
@asfgit asfgit force-pushed the dependabot/pip/pytest-8.0.2 branch from bb23d9f to 7267fc4 Compare April 16, 2024 17:20
@asfgit asfgit force-pushed the dependabot/pip/pytest-8.0.2 branch from 0562748 to f4fe2fb Compare April 16, 2024 19:42
@Kami
Copy link
Member

Kami commented Apr 16, 2024

I believe I addressed all the cross test pollution related issue which were causing test failures. I will merge this PR into trunk.

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.20%. Comparing base (4a01372) to head (532bb18).
Report is 134 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #1994   +/-   ##
=======================================
  Coverage   83.20%   83.20%           
=======================================
  Files         353      353           
  Lines       81453    81471   +18     
  Branches     8594     8594           
=======================================
+ Hits        67769    67787   +18     
  Misses      10874    10874           
  Partials     2810     2810           
Files Coverage Δ
libcloud/test/__init__.py 87.50% <100.00%> (ø)
libcloud/test/common/test_digitalocean_v2.py 100.00% <100.00%> (ø)
libcloud/test/compute/test_digitalocean_v2.py 99.48% <100.00%> (+0.01%) ⬆️
libcloud/test/dns/test_digitalocean.py 91.18% <100.00%> (+0.45%) ⬆️
libcloud/test/test_init.py 87.93% <100.00%> (+0.66%) ⬆️

@Kami Kami merged commit 6d4a6b2 into trunk Apr 16, 2024
17 checks passed
@Kami Kami deleted the dependabot/pip/pytest-8.0.2 branch April 16, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependency python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants