Generator `yield`s counted as primitive calls by cProfile

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

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

評価

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

調査の方向性

まず、yield を含むジェネレーターに対する cProfile の動作を再現し、その primitive-call 数を期待される結果と比較します。issue には実装ファイルもテストも記載されていないため、cProfile と C API の profiling パスを調査し、ジェネレーターの yield が primitive call としてカウントされないことを示すカバレッジを追加します。

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

説明

3.10 3.11 3.12 topic-profiling type-bug
BPO 42551
Nosy @msuozzo

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-12-03.04:29:39.676>
labels = ['type-bug', '3.8', '3.9', '3.10', 'expert-C-API', '3.7']
title = 'Generator `yield`s counted as primitive calls by cProfile'
updated_at = <Date 2020-12-14.21:52:21.585>
user = 'https://github.com/msuozzo'

bugs.python.org fields:

activity = <Date 2020-12-14.21:52:21.585>
actor = 'matthew.suozzo'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['C API']
creation = <Date 2020-12-03.04:29:39.676>
creator = 'matthew.suozzo'
dependencies = []
files = []
hgrepos = []
issue_num = 42551
keywords = []
message_count = 2.0
messages = ['382373', '383007']
nosy_count = 1.0
nosy_names = ['matthew.suozzo']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue42551'
versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']

主要言語
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 を短くまとめたダイジェスト。