René's URL Explorer Experiment


Title: Python 3.12+ breaks backwards compatibility for logging QueueHandler with some Queue classes · Issue #119819 · python/cpython · GitHub

Open Graph Title: Python 3.12+ breaks backwards compatibility for logging QueueHandler with some Queue classes · Issue #119819 · python/cpython

X Title: Python 3.12+ breaks backwards compatibility for logging QueueHandler with some Queue classes · Issue #119819 · python/cpython

Description: Bug report Bug description: Related bug: #111615 Related pull: #111638 Related codes: cpython/Lib/logging/config.py Lines 789 to 804 in bd0d97c if 'queue' in config: from multiprocessing.queues import Queue as MPQueue qspec = config['que...

Open Graph Description: Bug report Bug description: Related bug: #111615 Related pull: #111638 Related codes: cpython/Lib/logging/config.py Lines 789 to 804 in bd0d97c if 'queue' in config: from multiprocessing.queues imp...

X Description: Bug report Bug description: Related bug: #111615 Related pull: #111638 Related codes: cpython/Lib/logging/config.py Lines 789 to 804 in bd0d97c if 'queue' in config: from multiprocessing.qu...

Opengraph URL: https://github.com/python/cpython/issues/119819

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python 3.12+ breaks backwards compatibility for logging QueueHandler with some Queue classes","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\nRelated bug: https://github.com/python/cpython/issues/111615\r\nRelated pull: https://github.com/python/cpython/pull/111638\r\nRelated [codes](https://github.com/python/cpython/blob/3.12/Lib/logging/config.py#L789-L804):\r\nhttps://github.com/python/cpython/blob/bd0d97ce3497da35d17daa329c294f4cb87196ee/Lib/logging/config.py#L789-L804\r\n\r\n#### reproducible example using Python 3.12.3\r\n\r\n```python\r\nimport logging.config\r\n\r\n\r\ndef main(q):\r\n    config = {\r\n        'version': 1,\r\n        'handlers': {\r\n            'sink': {\r\n                'class': 'logging.handlers.QueueHandler',\r\n                'queue': q,\r\n            },\r\n        },\r\n        'root': {\r\n            'handlers': ['sink'],\r\n        },\r\n    }\r\n    logging.config.dictConfig(config)\r\n\r\n\r\nif __name__ == '__main__':\r\n    import multiprocessing as mp\r\n    main(mp.Manager().Queue())\r\n    #import asyncio\r\n    #main(asyncio.Queue())  # broken too\r\n```\r\n\r\nerror:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.12/logging/config.py\", line 581, in configure\r\n    handler = self.configure_handler(handlers[name])\r\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/usr/lib/python3.12/logging/config.py\", line 801, in configure_handler\r\n    raise TypeError('Invalid queue specifier %r' % qspec)\r\nTypeError: Invalid queue specifier \u003cAutoProxy[Queue] object, typeid 'Queue' at 0x7f8b07189d90\u003e\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/xxx/logging-queue-handler-bug.py\", line 33, in \u003cmodule\u003e\r\n    main(mp.Manager().Queue())\r\n  File \"/home/xxx/logging-queue-handler-bug.py\", line 29, in main\r\n    logging.config.dictConfig(config)\r\n  File \"/usr/lib/python3.12/logging/config.py\", line 914, in dictConfig\r\n    dictConfigClass(config).configure()\r\n  File \"/usr/lib/python3.12/logging/config.py\", line 588, in configure\r\n    raise ValueError('Unable to configure handler '\r\nValueError: Unable to configure handler 'sink'\r\n```\r\n\r\n#### Queue classes to check for logging QueueHandler\r\n\r\n* queue.Queue(), `\u003cqueue.Queue at 0x7fb86eeef170\u003e`, **works**.\r\n* multiprocessing\r\n    - multiprocessing.Queue(), `\u003cmultiprocessing.queues.Queue at 0x7fb871790500\u003e`, **works**.\r\n    - multiprocessing.Manager().Queue()  `\u003cAutoProxy[Queue] object, typeid 'Queue' at 0x7fb86ef4a840\u003e`, **broken**.\r\n       Its class is `multiprocessing.managers.AutoProxy[Queue]`, a subclass of `multiprocessing.managers.BaseProxy`.\r\n* asyncio.queues.Queue() `\u003cQueue at 0x7fb86f0be4e0 maxsize=0\u003e`, **broken**.\r\n* any other Queue?\r\n\r\n#### discuss: how to fix\r\n\r\nCheck all Queue classes mentioned above in\r\nhttps://github.com/python/cpython/blob/bd0d97ce3497da35d17daa329c294f4cb87196ee/Lib/logging/config.py#L792\r\n\r\nor just focus on handling special cases: str and dict, while leaving other cases un-checked (e.g., queue.Queue, multiprocessing.queues.Queue).\r\n\r\n\r\n### CPython versions tested on:\r\n\r\n3.12\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-120030\n* gh-120034\n* gh-120035\n* gh-120067\n* gh-120071\n* gh-120072\n* gh-120090\n* gh-120092\n* gh-120093\n* gh-120476\n* gh-120531\n* gh-120532\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/shmilee","@type":"Person","name":"shmilee"},"datePublished":"2024-05-31T05:02:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":20},"url":"https://github.com/119819/cpython/issues/119819"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bdbbb802-a09c-9549-724a-fd3449d9624e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDD54:AA16D:EFBD34:14F3076:696A33D5
html-safe-nonce136ae87db678ac55d9bbcc37b2c35c717861badad1a33a6c889a42e652a969e8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDU0OkFBMTZEOkVGQkQzNDoxNEYzMDc2OjY5NkEzM0Q1IiwidmlzaXRvcl9pZCI6IjM4NzgxOTU1MTI1ODk1NjI4MzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6dbeee49042b4899fcac58b2589b60441aa01dcd0d5a6f4eb667ee8125992226
hovercard-subject-tagissue:2326968325
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/119819/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a721900b5b4e728964799f71a186f881e8b8fd96ad4a7916ee49cc23bb13626a/python/cpython/issues/119819
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a721900b5b4e728964799f71a186f881e8b8fd96ad4a7916ee49cc23bb13626a/python/cpython/issues/119819
og:image:altBug report Bug description: Related bug: #111615 Related pull: #111638 Related codes: cpython/Lib/logging/config.py Lines 789 to 804 in bd0d97c if 'queue' in config: from multiprocessing.queues imp...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshmilee
hostnamegithub.com
expected-hostnamegithub.com
None321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7a9163cefd1ea4bd06f8eb7c082f43e4e53f626f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/119819#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F119819
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F119819
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/119819
Reloadhttps://github.com/python/cpython/issues/119819
Reloadhttps://github.com/python/cpython/issues/119819
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/119819
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/119819
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/119819
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/119819
Python 3.12+ breaks backwards compatibility for logging QueueHandler with some Queue classeshttps://github.com/python/cpython/issues/119819#top
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/shmilee
https://github.com/shmilee
shmileehttps://github.com/shmilee
on May 31, 2024https://github.com/python/cpython/issues/119819#issue-2326968325
#111615https://github.com/python/cpython/issues/111615
#111638https://github.com/python/cpython/pull/111638
codeshttps://github.com/python/cpython/blob/3.12/Lib/logging/config.py#L789-L804
cpython/Lib/logging/config.pyhttps://github.com/python/cpython/blob/bd0d97ce3497da35d17daa329c294f4cb87196ee/Lib/logging/config.py#L789-L804
bd0d97chttps://github.com/python/cpython/commit/bd0d97ce3497da35d17daa329c294f4cb87196ee
cpython/Lib/logging/config.pyhttps://github.com/python/cpython/blob/bd0d97ce3497da35d17daa329c294f4cb87196ee/Lib/logging/config.py#L792
bd0d97chttps://github.com/python/cpython/commit/bd0d97ce3497da35d17daa329c294f4cb87196ee
gh-119819: Fix regression to allow logging configuration with multipr… #120030https://github.com/python/cpython/pull/120030
[3.12] gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030) #120034https://github.com/python/cpython/pull/120034
[3.13] gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030) #120035https://github.com/python/cpython/pull/120035
gh-119819: Update test to skip if _multiprocessing is unavailable. #120067https://github.com/python/cpython/pull/120067
[3.12] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067) #120071https://github.com/python/cpython/pull/120071
[3.13] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067) #120072https://github.com/python/cpython/pull/120072
gh-119819: Update logging configuration to support joinable multiproc… #120090https://github.com/python/cpython/pull/120090
[3.12] gh-119819: Update logging configuration to support joinable multiproc… (GH-120090) #120092https://github.com/python/cpython/pull/120092
[3.13] gh-119819: Update logging configuration to support joinable multiproc… (GH-120090) #120093https://github.com/python/cpython/pull/120093
gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support #120476https://github.com/python/cpython/pull/120476
[3.13] gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476) #120531https://github.com/python/cpython/pull/120531
[3.12] gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476) #120532https://github.com/python/cpython/pull/120532
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
Logging issues 🪵https://github.com/orgs/python/projects/15
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.