Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Update bundled test `setuptools.whl` file

未關閉 適合新手
#160,824 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
66/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python
領域
build-system

研究方向

從Lib/test/wheeldata/setuptools-79.0.1-py3-none-any.whl和所引用的setuptools變更著手,找出更新後的隨附wheel版本,該版本不會匯入已棄用的typing.AnyStr。檢查issue中連結的CPython測試失敗,以及PR #150190中的討論;當隨附wheel不再在受影響的測試中觸發此棄用警告時,任務即告完成。

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

描述

dependencies infra topic-ensurepip

File: https://github.com/python/cpython/blob/main/Lib/test/wheeldata/setuptools-79.0.1-py3-none-any.whl

Why the update is needed?

======================================================================
ERROR: test_syntax_error_for_string (test.test_peg_generator.test_c_parser.TestCParser.test_syntax_error_for_string)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_peg_generator/test_c_parser.py", line 121, in setUp
    cmd = support.missing_compiler_executable()
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/support/__init__.py", line 2218, in missing_compiler_executable
    from setuptools._distutils import ccompiler, sysconfig
  File "/home/runner/work/cpython/cpython-builddir/build/test_python_61704æ/tempcwd/venv/lib/python3.16/site-packages/setuptools/_distutils/ccompiler.py", line 1, in <module>
    from .compat.numpy import (  # noqa: F401
    ...<2 lines>...
    )
  File "/home/runner/work/cpython/cpython-builddir/build/test_python_61704æ/tempcwd/venv/lib/python3.16/site-packages/setuptools/_distutils/compat/numpy.py", line 2, in <module>
    from ..compilers.C.base import _default_compilers, compiler_class  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython-builddir/build/test_python_61704æ/tempcwd/venv/lib/python3.16/site-packages/setuptools/_distutils/compilers/C/base.py", line 34, in <module>
    from ...util import execute, is_mingw, split_quoted
  File "/home/runner/work/cpython/cpython-builddir/build/test_python_61704æ/tempcwd/venv/lib/python3.16/site-packages/setuptools/_distutils/util.py", line 20, in <module>
    from typing import TYPE_CHECKING, AnyStr
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/typing.py", line 3950, in __getattr__
    warnings._deprecated(
    ~~~~~~~~~~~~~~~~~~~~^
        "typing.AnyStr",
        ^^^^^^^^^^^^^^^^
    ...<5 lines>...
        remove=(3, 21),
        ^^^^^^^^^^^^^^^
    )
    ^
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/_py_warnings.py", line 893, in _deprecated
    _wm.warn(msg, DeprecationWarning, stacklevel=stacklevel)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DeprecationWarning: 'typing.AnyStr' is deprecated and slated for removal in Python 3.21. Use PEP 695 type parameters with constraints instead

The other option is to ignore this warning in all places where we import setuptools.

Refs https://github.com/python/cpython/pull/150190#discussion_r4400346235
Refs https://github.com/python/cpython/issues/132415

CC @jaraco

主要語言
Python
星號
77.8k
分支
37.7k
平均合併
12 小時 27 分鐘
30 天內合併 PR
710

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

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

python/cpython 的其他 Issue

查看 python/cpython 的全部 Issue

相似的 Issue

更多 Python Issue

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

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