In `test._test_multiprocessing` file, `HAVE_GETVALUE` constant is always `False`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Lib/test/_test_multiprocessing.py at the HAVE_GETVALUE definition and test_bounded_semaphore. Check how _multiprocessing exposes its flags on macOS, then run the relevant multiprocessing tests. Done means HAVE_GETVALUE reflects the platform value and the second part of test_bounded_semaphore is active and passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100