-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-124653: relax (again) detection of queue API for logging handlers #124897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-124653: relax (again) detection of queue API for logging handlers #124897
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR!
@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_nowait
andget
. 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.
SimpleQueue
is not the compatible with "queue.Queue" since it lacks some methods and neither ismultiprocessing.SimpleQueue
would never work since it does not even have theput_nowait
method (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/