In `test._test_multiprocessing` file, `HAVE_GETVALUE` constant is always `False`
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
In the test._test_multprocessing, the HAVE_GETVALUE constant is always False because the HAVE_BROKEN_SEM_GETVALUE value does not exist in _multiprocessingmodule.
On macOS, this value exists only in the flagsdict of _multiprocessing.
>>> import _mulitpocessing
>>> vars(_multiprocessing)
{'__name__': '_multiprocessing', '__doc__': None, '__package__': '',
'__loader__': ............ ,
.......
'SemLock': <class '_multiprocessing.SemLock'>,
'flags': {'HAVE_SEM_OPEN': 1, 'HAVE_BROKEN_SEM_GETVALUE': 1}}
Fix is easy and will permit to reactivate the second part of test_bounded_semaphore test.
https://github.com/python/cpython/blob/6f7fb6c95ba9e4d5c1b86d0d4ad83d0cd495976b/Lib/test/_test_multiprocessing.py#L1755-L1757
A new PR will be submitted soon.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS, Linux
Linked PRs
- gh-155540
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Lib/test/_test_multiprocessing.py 中 HAVE_GETVALUE 的定义和 test_bounded_semaphore 开始。检查 _multiprocessing 在 macOS 上如何公开其 flags,然后运行相关的 multiprocessing 测试。完成的标准是 HAVE_GETVALUE 反映平台值,并且 test_bounded_semaphore 的第二部分处于启用状态且通过测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- testing-qa
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100