-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-121723: Relax constraints on queue objects for logging.handlers.QueueHandler
.
#122154
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
Conversation
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.
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.
Looks good, but I have two thoughts:
- Should the actual test for a queue protocol be factored out into an
is_queue
function? I know 8000 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 multiprocessing.Pool in spawn mode breaks logging.handlers.QueueHandler configuration #121723 (
multiprocessing.set_start_method('spawn')
)?
|
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.
@vsajip Before merging, I'll need to fix some typos so don't enable the automerge (I'm waiting for the build bots to finish).
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/