Skip to content

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

Open
mergify[bot] wants to merge 2 commits intolyricalfrom
mergify/bp/lyrical/pr-972
Open

Fix Pytest 8/9 compatibility in hooks (backport #972)#973
mergify[bot] wants to merge 2 commits intolyricalfrom
mergify/bp/lyrical/pr-972

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented May 5, 2026

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)
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented May 6, 2026

Pulls: #973, ros2/launch_ros#541
Gist: https://gist.githubusercontent.com/ahcorde/4d3ffee57c7342ceb8b6d6f9b3298cb2/raw/d8bb2a360c2644f720e9d36a1e6d847a6a7715a3/ros2.repos
BUILD args: --packages-above-and-dependencies launch_testing_ros launch launch_pytest launch_testing
TEST args: --packages-above launch_testing_ros launch launch_pytest launch_testing
ROS Distro: lyrical
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19164

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@clalancette
Copy link
Copy Markdown
Contributor

New CI for this is in ros2/launch_ros#541 (comment)

…974)

* Robust Pytest 7/8/9 compatibility and collection fixes

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>

* Robust Pytest 7/8/9 compatibility and collection fixes

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>

* More fixes (hopefully working this time).

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

---------

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Copy Markdown
Contributor

New CI for this is in ros2/launch_ros#541 (comment)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants