Skip to content
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

fix: rosidl_cmake python module is deprecated #16

Merged

Conversation

russkel
Copy link
Contributor

@russkel russkel commented Aug 14, 2023

Solves the following warning:

ros/iron/install/rosidl_cmake/lib/python3.11/site-packages/rosidl_cmake/__init__.py:19: UserWarning: The 'rosidl_cmake' Python module is deprecated. Use 'rosidl_pycommon' instead.

@russkel russkel force-pushed the feature/fix-deprecation branch from 2fe7536 to 3534a7e Compare August 14, 2023 09:11
@russkel russkel changed the title fix: rosidl_cmake python calls is deprecated fix: rosidl_cmake python module is deprecated Aug 14, 2023
@bonprosoft
Copy link
Member

@russkel I'm so sorry for my late response! Thank you so much for your contribution, again. I'm really appreciated!

It seems rosidl_pycommon is not available in humble, but I would like to continue supportting that if possible.

How about the following approach?

  • Wrapping with try: ... except ImportError: ... in Python code
  • Pass rosidl_module_name to templates, and use the variable @(rosidl_module_name) at templates

@russkel russkel force-pushed the feature/fix-deprecation branch from 3534a7e to 958bbd9 Compare April 23, 2024 06:52
@russkel
Copy link
Contributor Author

russkel commented Apr 23, 2024

Noble/rolling breaks now due to

#15 2.965 CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
#15 2.965   Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at
#15 2.965   least version "3.6")
#15 2.965 Call Stack (most recent call first):
#15 2.965   /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
#15 2.965   /usr/share/cmake-3.28/Modules/FindPythonInterp.cmake:183 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
#15 2.965   /opt/ros/rolling-ext/share/rosidl_generator_mypy/cmake/rosidl_generator_mypy_generate_interfaces.cmake:3 (find_package)
#15 2.965   /opt/ros/rolling/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
#15 2.965   /opt/ros/rolling/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:280 (ament_execute_extensions)
#15 2.965   CMakeLists.txt:29 (rosidl_generate_interfaces)

https://cmake.org/cmake/help/latest/policy/CMP0148.html

I have removed the call because the cmake does not make use of any of the CMake vars.

@russkel
Copy link
Contributor Author

russkel commented Apr 23, 2024

@russkel I'm so sorry for my late response! Thank you so much for your contribution, again. I'm really appreciated!

It seems rosidl_pycommon is not available in humble, but I would like to continue supportting that if possible.

How about the following approach?

* Wrapping with `try: ... except ImportError: ...` in Python code

* Pass `rosidl_module_name` to templates, and use the variable `@(rosidl_module_name)` at templates

Sorry forgot to reply to this. I say branch off for rolling which will be the new LTS soon enough.

@bonprosoft
Copy link
Member

I'm terribly sorry for my late response, again.

Sorry forgot to reply to this. I say branch off for rolling which will be the new LTS soon enough.

OK, I've created rolling branch and imported your changes.

OK, I've just created rolling branch, so let me merge this PR into the branch for now.
Thank you so much, as always!

@bonprosoft bonprosoft changed the base branch from master to rolling June 16, 2024 14:40
Copy link
Member

@bonprosoft bonprosoft left a comment

Choose a reason for hiding this comment

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

LGTM!!!

@bonprosoft bonprosoft merged commit aedbe27 into rospypi:rolling Jun 16, 2024
1 check passed
@bonprosoft
Copy link
Member

bonprosoft commented Jun 16, 2024

@russkel Please let me know if I did something wrong or unexpected to you 🙇‍♂️

@russkel
Copy link
Contributor Author

russkel commented Nov 4, 2024

@russkel Please let me know if I did something wrong or unexpected to you 🙇‍♂️

Hi @bonprosoft , sorry I wasn't very clear.

What I suggested was your master branch should work with ros2 rolling release (or the current LTS), and older versions like iron etc get their own branch, should you wish to support them. This is what the other ros2 repositories do.

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