Python 3.10: launch_testing has a warning of "There is no current event loop"

未关闭
#613 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

使用提供的 joint_state_publisher checkout 和 colcon test 命令重现该警告。检查 launch、launch_ros 和 osrf_pycommon 中的事件循环处理,然后验证受影响的测试在没有“There is no current event loop”警告的情况下仍能成功。

由索引模型根据 Issue 内容生成。

描述

help wanted

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04 arm64
  • Installation type:
    • source
  • Version or commit hash:
    • d2935d6fd85636ace62699eec106cd56f5e9c6a4
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclpy
Steps to reproduce issue
$ . /opt/ros/humble/setup.bash
$ mkdir -p jsp_ws/src
$ cd jsp_ws
$ git clone https://github.com/ros/joint_state_publisher -b ros2 src/joint_state_publisher
$ colcon build
$ colcon test
Expected behavior

Tests run and succeed without warning

Actual behavior

Tests run, and succeed, but have warnings like:

=============================== warnings summary ===============================
test/test_64_joint_robot.py: 2 warnings
test/test_mimic_chain.py: 2 warnings
test/test_mimic_cycle.py: 2 warnings
test/test_multi_joints.py: 2 warnings
test/test_zero_joints.py: 2 warnings
  Warning: There is no current event loop
Additional information

This seems to be a change in Python 3.10. In particular, I think that calling get_event_loop without a loop running is now an error. See https://github.com/pytest-dev/pytest-asyncio/issues/212 for some explanation of this. We probably need fixes in launch, launch_ros, and osrf_pycommon (at least).

主要语言
Python
星标
156
派生
200
平均合并
2 天 11 小时
30 天内合并 PR
11

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ros2/launch 的其他 Issue

查看 ros2/launch 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。