-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Python 3.12+ breaks backwards compatibility for logging QueueHandler with queue.SimpleQueue #124653
Comments
Except if I miss something, |
As I've written this has been working on 3.8 - 3.11. I'm not sure exactly when it broke. I skimmed over the file you linked and it seems the only required interface methods are |
My apologies for my mistaken: I was thinking you talked about And then, I agree with you the Perhars it will be nice to ask for a python core dev advice. |
Urgh, this issue will haunt me all my life :') According to the docs, it required a "Queue API", but I didn't consider that SimpleQueue was... too simple enough and did not entirely conform to what Queue did. Ok, So I think we should only care about two methods that are those given in SimpleQueue. |
What do you think about adding
|
It's correct (and that's what I also did), but since we really don't know whether people could use objects or not I just relaxed the interface (and I think it's fine like this). |
@spacemanspiff2007 good catch !! |
I should be the one thanking you since this was my code :') sorry for the inconvenience! |
…dlers (pythonGH-124897) (cherry picked from commit 7ffe94f) Co-authored-by: Bénédikt Tran <[email protected]>
…dlers (pythonGH-124897) (cherry picked from commit 7ffe94f) Co-authored-by: Bénédikt Tran <[email protected]>
Bug report
Bug description:
I think this is related to #119819
SimpleQueue does not implement the full Queue interfaces thus both
isinstance(obj, queue.Queue)
and the queue interface check fails.Since this has been working on 3.8 - <3.12 I think the queue interface check is checking for methods that are not used at all and should be adjusted accordingly.
cpython/Lib/logging/config.py
Lines 500 to 525 in 2518918
Tested with 3.12.6
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: