Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Sep 17, 2025

Part of #1399.

  • Expose set_on_new_message_callback and clear_on_new_message_callback for subscription.
  • Expose set_on_new_request_callback and clear_on_new_request_callback for service.
  • Expose set_on_new_response_callback and clear_on_new_response_callback for client.
  • Expose set_on_reset_callback and clear_on_reset_callback for timer.
    This is an automatic backport of pull request Feature: expose event callback setter in subscription, service, client and timer #1496 done by Mergify.

…t and timer (#1496)

* Added set_on_new_response_callback

Signed-off-by: Nadav Elkabets <[email protected]>

* Added set_on_new_request_callback

Signed-off-by: Nadav Elkabets <[email protected]>

* Added set_on_new_message_callback

Signed-off-by: Nadav Elkabets <[email protected]>

* Added set_on_reset_callback

Signed-off-by: Nadav Elkabets <[email protected]>

* Added type hints to pyi

Signed-off-by: Nadav Elkabets <[email protected]>

* Added test for subscription

Signed-off-by: Nadav Elkabets <[email protected]>

* Added test for timer

Signed-off-by: Nadav Elkabets <[email protected]>

* Added test for client

Signed-off-by: Nadav Elkabets <[email protected]>

* Added test for service

Signed-off-by: Nadav Elkabets <[email protected]>

* Fixed lint

Signed-off-by: Nadav Elkabets <[email protected]>

* Avoid throwing into c code

Signed-off-by: Nadav Elkabets <[email protected]>

* Print newline after logging exception

Co-authored-by: William Woodall <[email protected]>
Signed-off-by: Nadav Elkabets <[email protected]>

* Improve logging and cleanup

Signed-off-by: Nadav Elkabets <[email protected]>

---------

Signed-off-by: Nadav Elkabets <[email protected]>
Signed-off-by: Nadav Elkabets <[email protected]>
Co-authored-by: William Woodall <[email protected]>
(cherry picked from commit c834c24)

# Conflicts:
#	rclpy/rclpy/impl/_rclpy_pybind11.pyi
#	rclpy/test/test_service.py
#	rclpy/test/test_subscription.py
#	rclpy/test/test_timer.py
@mergify mergify bot added the conflicts label Sep 17, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Sep 17, 2025

Cherry-pick of c834c24 has failed:

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

You are currently cherry-picking commit c834c24.
  (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:   rclpy/src/rclpy/client.cpp
	modified:   rclpy/src/rclpy/client.hpp
	modified:   rclpy/src/rclpy/events_executor/rcl_support.cpp
	modified:   rclpy/src/rclpy/service.cpp
	modified:   rclpy/src/rclpy/service.hpp
	modified:   rclpy/src/rclpy/subscription.cpp
	modified:   rclpy/src/rclpy/subscription.hpp
	modified:   rclpy/src/rclpy/timer.cpp
	modified:   rclpy/src/rclpy/timer.hpp
	modified:   rclpy/test/test_client.py

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   rclpy/rclpy/impl/_rclpy_pybind11.pyi
	both modified:   rclpy/test/test_service.py
	both modified:   rclpy/test/test_subscription.py
	both modified:   rclpy/test/test_timer.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

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

@nadavelkabets jazzy's code base is already really different, that makes the backport complicated. due to the concern of degression, i will go ahead to close this PR for now.

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.

3 participants