gh-121723: Relax constraints on queue objects for logging.handlers.QueueHandler.#122154
gh-121723: Relax constraints on queue objects for logging.handlers.QueueHandler.#122154vsajip merged 15 commits intopython:mainfrom
logging.handlers.QueueHandler.#122154Conversation
Any object implementing the Queue public API can be used for configuring a QueueHandler. Only the presence of the methods is checked, but not their signature.
vsajip
left a comment
There was a problem hiding this comment.
Looks good, but I have two thoughts:
- Should the actual test for a queue protocol be factored out into an
is_queuefunction? I know it'll only be used once, but it might make the overall flow slightly more readable. - Is it worth adding a test for the specific failure condition of #121723 (
multiprocessing.set_start_method('spawn'))?
|
Good thing I didn't wait in front of my screen, thinking it would finish FAST! I'll update my branch tomorrow. |
|
Do you want to try increasing the timeout? |
For the sake of the test, I'll try but I'm not sure whether it's really a timeout issue or not. I'll put it at 60s (if it fails, then it's probably something else but it's probably something related to multiprocessing then). |
|
Can you run a single build bot actually? namely AMD64 Windows Server 2022 NoGIL PR/224? it appears that there are also other issues with multiprocessing for it but I'm not sure if they are related... |
|
I've asked that bot to rerun. I assume it'll pick up your latest changes - https://buildbot.python.org/#/builders/1295/builds/226 |
|
It appears that the only failure is not related to this PR: |
…lers.QueueHandler`. (pythonGH-122154) (cherry picked from commit fb864c7) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-122603 is a backport of this pull request to the 3.13 branch. |
…lers.QueueHandler`. (pythonGH-122154) (cherry picked from commit fb864c7) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-122604 is a backport of this pull request to the 3.12 branch. |
…lers.QueueHandler`. (pythonGH-122154)
…lers.QueueHandler`. (pythonGH-122154)
Not sure if I need to explain what the Queue public API is. I think people are smart enough to understand that we expect a Queue-like object but tell me if you want me to put more details here.
📚 Documentation preview 📚: https://cpython-previews--122154.org.readthedocs.build/