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

オープン
#613 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

提供された joint_state_publisher のチェックアウトと 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時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ros2/launch のほかの issue

ros2/launch の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。