Skip to content

Update Static Type Checking Changelog for Kilted rclpy (backport #5368) #5369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions source/Releases/Release-Kilted-Kaiju.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,59 @@ Support action generic client, this is used to support actions in rosbag2.

See https://github.com/ros2/rclcpp/pull/2759 for more details.

<<<<<<< HEAD
=======
``rclpy``
^^^^^^^^^

Static Type Checking
""""""""""""""""""""

Added static type hints to ``ActionClient`` and ``ActionServer``.

See https://github.com/ros2/rclpy/pull/1349 for more details.

Add support for `generics <https://typing.python.org/en/latest/reference/generics.html>`_ in ``pub/sub/client/server/actions``, ``Future/Task``, and ``Parameter``.

``Publisher``, ``Subscription``, ``Server``, ``Task``, and ``Parameter`` should need no updates to add support for generics.

``Client`` will need to be updated to resemble the following to get the improved type checking.

.. code-block:: python

self._get_parameter_client: Client[GetParameters.Request,
GetParameters.Response] = self.node.create_client(
GetParameters, '/get_parameters',
qos_profile=qos_profile, callback_group=callback_group)

``ActionClient`` will need to be updated to resemble the following to get the improved type checking.

.. code-block:: python

ac: ActionClient[Fibonacci.Goal,
Fibonacci.Result,
Fibonacci.Feedback] = ActionClient(self.node, Fibonacci, 'fibonacci')

``Future`` will need to be updated to resemble the following to get the improved type checking.

.. code-block:: python

log_msgs_future: Future[bool] = Future()

See https://github.com/ros2/rclpy/pull/1239, https://github.com/ros2/rclpy/pull/1275, https://github.com/ros2/rclpy/pull/1246, and https://github.com/ros2/rclpy/pull/1254/files for more details.

Various other small improvements and corrections have also been made throughout all of ``rclpy``.

Python types can be statically checked using `ament_mypy <https://github.com/ament/ament_lint/tree/kilted/ament_mypy>`_ which wraps `mypy <https://www.mypy-lang.org/>`_.

EventsExecutor
""""""""""""""

Support an experimental events executor for ``rclpy``, which is a port of the original ``rclcpp`` events executor concept.

See https://github.com/ros2/rclpy/pull/1391 for more details.

>>>>>>> 24d245c (Update Static Type Checking Changelog for Kilted `rclpy` (#5368))
``Rosbag2``
^^^^^^^^^^^

Expand Down
Loading