Skip to content

Incompatibility of humble with python3.6: signals.valid_signals() #879

Closed

Description

@christophfroehlich

Bug report

#639 introduced an incompatibility with python 3.6, which is the minimum requirement for humble and default on rhel 8.

I'm not proficient enough with python, maybe there is a workaround for this to make it compatible with python 3.6

Required Info:

  • Operating System:
    • RHEL8
  • Installation type:
    • binaries
  • Version or commit hash:
    • 0.18.7

Steps to reproduce issue

Run tests for ros2_control

Expected behavior

no error

Actual behavior

8: Traceback (most recent call last):
8:   File "/opt/ros/humble/bin/ros2", line 11, in <module>
8:     load_entry_point('ros2cli==0.18.7', 'console_scripts', 'ros2')()
8:   File "/opt/ros/humble/lib/python3.6/site-packages/ros2cli/cli.py", line 89, in main
8:     rc = extension.main(parser=parser, args=args)
8:   File "/opt/ros/humble/lib/python3.6/site-packages/ros2run/command/run.py", line 70, in main
8:     return run_executable(path=path, argv=args.argv, prefix=prefix)
8:   File "/opt/ros/humble/lib/python3.6/site-packages/ros2run/api/__init__.py", line 73, in run_executable
8:     if -process.returncode in signal.valid_signals() and os.name == 'posix':
8: AttributeError: module 'signal' has no attribute 'valid_signals'

Additional information

valid_signals() was introduced with python 3.8: https://docs.python.org/3/library/signal.html#signal.valid_signals

Activity

  1. clalancette commented on Feb 2, 2024

    @clalancette
    Contributor

    In all honesty, that code is just for printing out nicer error messages. We could go ahead and just make it conditional on valid_signals existing, only for Humble (we don't have this problem on Iron and later since we updated to RHEL-9). I'll open a PR to humble to do that.

  2. christophfroehlich commented on Feb 2, 2024

    @christophfroehlich
    Author

    Thanks for the immediate response!

  3. linked a pull request that will close this issueConditionally use valid_signals. #880on Feb 16, 2024
  4. cottsay commented on Feb 16, 2024

    @cottsay
    Member

    Fix was released with 0.18.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions