Skip to content

Fix Pytest 8/9 compatibility in hooks#972

Merged
ahcorde merged 1 commit intoros2:rollingfrom
mjcarroll:fix/pytest-compatibility
May 5, 2026
Merged

Fix Pytest 8/9 compatibility in hooks#972
ahcorde merged 1 commit intoros2:rollingfrom
mjcarroll:fix/pytest-compatibility

Conversation

@mjcarroll
Copy link
Copy Markdown
Member

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

@mjcarroll
Copy link
Copy Markdown
Member Author

Pulls: #972
Gist: https://gist.githubusercontent.com/mjcarroll/ab068d35285c578a5071a28913f757a7/raw/e25c37ab94f65b7fda1ad47dc6248cb1d0431e10/ros2.repos
BUILD args: --packages-above-and-dependencies launch_pytest
TEST args: --packages-above launch_pytest
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19134

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

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>
@mjcarroll mjcarroll force-pushed the fix/pytest-compatibility branch from d86b699 to 6d7358b Compare May 5, 2026 01:16
@mjcarroll
Copy link
Copy Markdown
Member Author

Pulls: #972, ros2/launch_ros#540
Gist: https://gist.githubusercontent.com/mjcarroll/a83f4accadea98cbb9fae33c730cee5e/raw/69cbe18f7e422c86ee1438f9fdfb58463534f592/ros2.repos
BUILD args: --packages-above-and-dependencies launch_pytest
TEST args: --packages-above launch_pytest
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19137

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

@ahcorde ahcorde merged commit 0630831 into ros2:rolling May 5, 2026
3 checks passed
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented May 5, 2026

https://github.com/Mergifyio backport lyrical

@mergify
Copy link
Copy Markdown

mergify Bot commented May 5, 2026

backport lyrical

✅ Backports have been created

Details

@mjcarroll mjcarroll deleted the fix/pytest-compatibility branch May 5, 2026 11:43
mjcarroll added a commit to mjcarroll/launch that referenced this pull request May 7, 2026
…s2#972)

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>
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.

2 participants