AttributeError on Debug Run with PyTest
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- devtools, testing-qa
調査の方向性
まず debugpy 1.8.16 で pytest の実行を再現し、1.8.15 と比較します。報告された _ClassVar の検索箇所周辺にある debugpy/adapter/main.py、debugpy/public_api.py、バンドルされた dataclasses.py を読みます。完了条件は、報告された環境で collection が完了し、wait_for_client() がタイムアウトしなくなることです。
索引モデルが issue の本文から書いたものです。
説明
Environment data
- debugpy version: 1.8.16
- OS and version: Ubuntu 20.04.6 LTS
- Python version: 3.12.3
- Using VS Code or Visual Studio: VS Code
Actual behavior
collecting ... Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/jp/.pyenv/versions/3.12.3/envs/dev/lib/python3.12/site-packages/debugpy/adapter/__main__.py", line 229, in <module>
__import__("debugpy")
File "/home/jp/.pyenv/versions/3.12.3/envs/dev/lib/python3.12/site-packages/debugpy/adapter/../../debugpy/__init__.py", line 36, in <module>
from debugpy.public_api import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jp/.pyenv/versions/3.12.3/envs/dev/lib/python3.12/site-packages/debugpy/adapter/../../debugpy/public_api.py", line 25, in <module>
@dataclasses.dataclass(frozen=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jp/.pyenv/versions/3.12.3/envs/dev/lib/python3.12/site-packages/debugpy/adapter/../../dataclasses.py", line 950, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jp/.pyenv/versions/3.12.3/envs/dev/lib/python3.12/site-packages/debugpy/adapter/../../dataclasses.py", line 800, in _process_class
cls_fields = [_get_field(cls, name, type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jp/.pyenv/versions/3.12.3/envs/dev/lib/python3.12/site-packages/debugpy/adapter/../../dataclasses.py", line 659, in _get_field
if (_is_classvar(a_type, typing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jp/.pyenv/versions/3.12.3/envs/dev/lib/python3.12/site-packages/debugpy/adapter/../../dataclasses.py", line 550, in _is_classvar
return type(a_type) is typing._ClassVar
^^^^^^^^^^^^^^^^
AttributeError: module 'typing' has no attribute '_ClassVar'. Did you mean: 'ClassVar'?
Expected behavior
PyTest collects test(s), macro in code waits for connection from VS Code, debugging proceeds.
Steps to reproduce:
Use debugpy version 1.8.16 (downgrading to 1.8.15 fixed the problem), run a pytest for code that contains the debugpy code macro as I have below and wait a few seconds. The traceback will be reported and the wait_for_client() call will time out.
import debugpy
debugpy.listen(5679)
debugpy.wait_for_client()
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 205
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/debugpy のほかの issue
-
pydevd_comm.py start_client() does not set TCP_NODELAY on the connections it opens対応中かも @nightcityblade が 54 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Document "rules"-option対応中かも @nightcityblade が 42 日前に担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
wx.EventLoop() deprecation warning対応中かも @nightcityblade が 41 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
debugpy.configure(python=) is not properly documented対応中かも @nightcityblade が 52 日前に担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
microsoft/debugpy の issue をすべて見る
似ている issue
-
HTML: <template> content is extracted as document text対応中かも @ryanmeowy が今日担当しました。 オープンbug html
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
docling-project/docling#4714 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Qdrant RAG client applies score_threshold to raw cosine similarity, not the 0-1 score it returns対応中かも @roydonsequeira が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ashhart/TensorFold#536 ·
メンテナーはふだん 1 日以内に返信
-
area/install-update comp/cli duplicate P2 python:uv sweeper:risk-compatibility type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
NousResearch/hermes-agent#135440 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Deepak3699/Ai_Mentor#244 ·
メンテナーはふだん 1 日以内に返信