gh-124653: relax (again) detection of queue API for logging handlers #124897
gh-124653: relax (again) detection of queue API for logging handlers #124897vsajip merged 8 commits intopython:mainfrom
Conversation
|
This entire issue makes me wonder whether |
If it is necessary to use a Updated: perharps adding this case would be nice ? |
I didn't add it because I think it's a bit straightforward. If we add such method in the future to the base class, the test will detect that the class is no longer deemed invalid and if we do not, then the case is already covered by the minimal interface (I think this should be enough). |
|
So we only have a single build bot failure which we already know the reason for. I think this issue will not haunt me again :D (just waiting for @vsajip's green light). |
|
@vsajip friendly ping in case you forgot to merge after approving the PR :') |
…dlers (pythonGH-124897) (cherry picked from commit 7ffe94f) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…dlers (pythonGH-124897) (cherry picked from commit 7ffe94f) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-125059 is a backport of this pull request to the 3.13 branch. |
|
GH-125060 is a backport of this pull request to the 3.12 branch. |
|
Huh... I think I forgot to update the JIT ignored files... I hope the test won't make the JIT fail. |
|
Seems the JIT is fine. |
NOw we really have a minmal inteface, namely
put_nowaitandget. More than that is not needed for the default handlers and listeners.I think, we had a misunderstanding between what the docs told (namely a queue API) and what we expected at runtime.
SimpleQueueis not the compatible with "queue.Queue" since it lacks some methods and neither ismultiprocessing.SimpleQueuewould never work since it does not even have theput_nowaitmethod (so even before my PRs, this would just break at runtime due to a missing interface).So it is correct to raise if the queue interface is
multiprocessing.SimpleQueue.📚 Documentation preview 📚: https://cpython-previews--124897.org.readthedocs.build/