python / python/devguide

Devguide recommends a very slow testing configuration

未關閉
#1,895 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

type-feature
主要語言
Python
星號
2.1k
分支
1k
平均合併
2 天 12 小時
30 天內合併 PR
12

描述

Describe the enhancement or feature you would like

At the PyCon AU sprints, I found that running the test suite in parallel with make test under --with-pydebug on my machine took ~3.5 minutes, while running with the default configuration took ~1 minute.

Running the test suite sequentially with python -m test took ~18 minutes on a default build, while --with-pydebug took ~27 minutes.

One of the sprint attendees (with a much slower system in general) had their sequential test run take ~45 minutes under --with-pydebug, dropping to around ~25 minutes when using the default build configuration, and then down to ~5 minutes by running with make test rather than python -m test.

https://github.com/python/devguide/issues/1171 covered updating https://devguide.python.org/getting-started/quick-reference/#quick-reference to recommend parallel test execution, but https://devguide.python.org/testing/run-write-tests/#running buries the parallel execution command well down the page.

There are multiple intersecting issues here:

  • between the intro, the table of section references, and the video embed, the "Quick reference" link has dropped "below the fold" on the landing page (at least on my laptop screen)
  • some of the instructions were originally written for C-focused development and then never revisited for pure Python contributors
  • we're inconsistent in our recommendations for how to run the test suite (and we don't emphasise how slow it is to run them sequentially, so you almost never want to actually do that if you can avoid it)

One change I think would be worth making is to recommend an unqualified make as the default build configuration (especially when working pure Python changes without touching any of the C code), and mention make --with-pydebug as an option that is slower in execution, but provides a much better debugging experience when working on C level changes (with reference to https://docs.python.org/3/using/configure.html#python-debug-build)

Another would be to move the quick reference section heading and linking paragraph up above the section link table.

Describe alternatives you have considered

No response

Additional context

No response

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 devguide.python.org/testing/run-write-tests/#running 的執行測試部分開始,並將其與 Getting Started 快速參考及其在登陸頁面上的位置進行比較。查看關於設定偵錯組建的連結文件。完成的標準是:指南始終建議平行測試和預設組建,說明何時 --with-pydebug 有用,並將快速參考置於各部分連結之上。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
documentation
Issue 類型
文件
難度
3/5
預估耗時
1-2 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。