concurrent/futures/process.py: mp.util.debug is called, but mp.util is never imported

オープン
#99,368 コメント 4 件 リアクション 2 件 担当者 0 名 GitHub で見る

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python

調査の方向性

Lib/concurrent/futures/process.py から始め、報告された mp.util.debug 呼び出し周辺の weakref callback を調査します。すでに進行中の作業を理解するために PR gh-99369 を確認し、その後、関連する concurrent.futures テストを実行します。callback が報告された AttributeError を発生させなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

stdlib type-bug

Bug report

In Lib/concurrent/futures/process.py, mp.util.debug is called, but mp.util is never imported.

This leads to the following:

Exception ignored in: <function _ExecutorManagerThread.__init__.<locals>.weakref_cb at 0x----------->
Traceback (most recent call last):
File "python3.10/concurrent/futures/process.py", line 288, in weakref_cb
AttributeError: 'NoneType' object has no attribute 'util'

My environment is Python 3.10, but this bug exists in the latest cpython.

My impression is that this is relic debug code (but if it is not, non-working code is not helpful). I am about to make a PR removing this debug code.

  • PR: gh-99369
主要言語
Python
スター
77.2k
フォーク
36k
平均マージ
1日 9時間
マージ済み PR(30日)
558

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

python/cpython のほかの issue

python/cpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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