Skip to content

Fix Pytest 8/9 compatibility in hooks (backport #972) - #994

Open
mergify[bot] wants to merge 1 commit into
lyricalfrom
mergify/bp/lyrical/pr-972
Open

Fix Pytest 8/9 compatibility in hooks (backport #972)#994
mergify[bot] wants to merge 1 commit into
lyricalfrom
mergify/bp/lyrical/pr-972

Conversation

@mergify

@mergify mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown

This PR fixes deprecated hook signatures in launch and launch_testing that cause failures in newer pytest versions (e.g. Pytest 9.0).


This is an automatic backport of pull request #972 done by Mergify.

This commit addresses two issues:
1. Renames deprecated path argument to module_path/collection_path in pytest hooks to support Pytest 8/9.
2. Ensures LaunchService run_async task is always awaited by registering the finalizer earlier and passing the task explicitly.

Assisted-by: Gemini CLI:2.0-Flash [run_shell_command, replace, git, gh]

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
(cherry picked from commit 0630831)

# Conflicts:
#	launch/conftest.py
#	launch_testing/launch_testing/pytest/hooks.py
#	launch_testing/launch_testing/pytest/hookspecs.py
@mergify

mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Author

Cherry-pick of 0630831 has failed:

On branch mergify/bp/lyrical/pr-972
Your branch is up to date with 'origin/lyrical'.

You are currently cherry-picking commit 0630831.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   launch/conftest.py
	both modified:   launch_testing/launch_testing/pytest/hooks.py
	both modified:   launch_testing/launch_testing/pytest/hookspecs.py

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify

mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Comment thread launch/conftest.py
import pytest


<<<<<<< HEAD

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nope

Comment thread launch/conftest.py
import pytest


<<<<<<< HEAD

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants