Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Nov 11, 2025

Closes #805
Closes robograph-project/planning#12
Replaces #790
Related to #868

Allow passing pathlib.Path objects directly into contexts expecting a Substitution, for more natural modern pythonic usage. For example IncludeLaunchDescription(Path(__file__).parent / 'file_in_this_dir_launch.yaml'))

As part of this change, stop doing str(Path) casts everywhere it's done for this reason.


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

Signed-off-by: Emerson Knapp <[email protected]>
(cherry picked from commit 49bcf2d)

# Conflicts:
#	launch/launch/substitutions/python_expression.py
#	launch_xml/test/launch_xml/test_executable.py
@mergify
Copy link
Author

mergify bot commented Nov 11, 2025

Cherry-pick of 49bcf2d has failed:

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

You are currently cherry-picking commit 49bcf2d.
  (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)

Changes to be committed:
	modified:   launch/launch/launch_description_sources/python_launch_file_utilities.py
	modified:   launch/launch/some_substitutions_type.py
	modified:   launch/launch/substitutions/path_join_substitution.py
	modified:   launch/launch/utilities/normalize_to_list_of_substitutions_impl.py
	modified:   launch/launch/utilities/typing_file_path.py
	modified:   launch/test/launch/actions/test_include_launch_description.py
	modified:   launch/test/launch/launch_description_source/test_python_launch_description_source.py
	modified:   launch/test/launch/launch_description_source/test_python_launch_file_utilities.py
	modified:   launch/test/launch/substitutions/test_command.py
	modified:   launch/test/launch/substitutions/test_file_content.py
	modified:   launch/test/launch/substitutions/test_path_join_substitution.py
	modified:   launch_pytest/test/launch_pytest/examples/check_node_msgs.py
	modified:   launch_pytest/test/launch_pytest/test_plugin.py
	modified:   test_launch_testing/test/test_launch_testing/actions/test_gtest.py
	modified:   test_launch_testing/test/test_launch_testing/actions/test_pytest.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   launch/launch/substitutions/python_expression.py
	both modified:   launch_xml/test/launch_xml/test_executable.py

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 added the conflicts label Nov 11, 2025
@emersonknapp emersonknapp self-assigned this Nov 12, 2025
@emersonknapp emersonknapp changed the title Allow Path in substitutions, instead of requiring cast to str (backport #873) [backport humble] Allow Path in substitutions, instead of requiring cast to str (backport #873) Nov 14, 2025
@emersonknapp emersonknapp changed the title [backport humble] Allow Path in substitutions, instead of requiring cast to str (backport #873) [humble] Allow Path in substitutions, instead of requiring cast to str (backport #873) Nov 14, 2025
@emersonknapp emersonknapp moved this to In review in Robograph Planning Nov 14, 2025
@emersonknapp emersonknapp moved this from In review to Needs backport in Robograph Planning Nov 14, 2025
Signed-off-by: Emerson Knapp <[email protected]>
@emersonknapp
Copy link
Contributor

Pulls: #926
Gist: https://gist.githubusercontent.com/emersonknapp/ce6db14a1b6a5425ec4eb7b9d3f152d0/raw/d03b316805237d76c99584fed96a2b04ace355ab/ros2.repos
BUILD args: --packages-above-and-dependencies launch launch_pytest launch_xml test_launch_testing
TEST args: --packages-above launch launch_pytest launch_xml test_launch_testing
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17486

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

@ahcorde
Copy link
Contributor

ahcorde commented Nov 28, 2025

Pulls: #926
Gist: https://gist.githubusercontent.com/ahcorde/b3ba73d6b6bb3e50b1bfd337595a7041/raw/d03b316805237d76c99584fed96a2b04ace355ab/ros2.repos
BUILD args: --packages-above-and-dependencies launch launch_pytest launch_xml test_launch_testing
TEST args: --packages-above launch launch_pytest launch_xml test_launch_testing
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17644

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

@ahcorde ahcorde merged commit d5723d5 into humble Dec 1, 2025
2 of 3 checks passed
@github-project-automation github-project-automation bot moved this from Needs backport to Done in ROSGraph Planning Dec 1, 2025
@ahcorde ahcorde deleted the mergify/bp/humble/pr-873 branch December 1, 2025 12:29
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