GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow logging.handlers.QueueListener to be used as a context manager · Issue #132106 · python/cpython

Allow logging.handlers.QueueListener to be used as a context manager #132106

New issue
Copy link
New issue
Copy link
Closed
Closed
Allow logging.handlers.QueueListener to be used as a context manager#132106
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@csm10495
csm10495
opened on Apr 5, 2025
Issue body actions

Feature or enhancement

Proposal:

This is a simple change that would allow:

         with QueueListener(queue, handler1) as listener:
             # the listener has started
             ...
         # the listener has stopped

It's a welcomed alternative to needing to call start/stop manually.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/allow-logging-handlers-queuelistener-to-be-used-as-a-context-manager/87124

Linked PRs

  • gh-132106: Allow logging.handlers.QueueListener to be used as a context manager #132107
  • gh-132106: Ensure that running logging.handlers.QueueListener cannot be started again #132444
  • [3.13] gh-132106: Ensure that running `logging.handlers.QueueListener… #132471

Activity

  1. csm10495
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Apr 5, 2025
  2. picnixz
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Apr 5, 2025
  3. picnixz
    added this to Logging issues 🪵on Apr 5, 2025
  4. picnixz
    added a commit that references this issue on Apr 12, 2025

    gh-132106: Allow `logging.handlers.QueueListener` to be used as a con…

    517e96b
  5. csm10495
    added 2 commits that reference this issue on Apr 12, 2025

    pythongh-132106 - Make it so start can't be called again while running

    1f5163e

    pythongh-132106 - Make it so start can't be called again while running

    4a907d8
  6. vsajip
    added 3 commits that reference this issue on Apr 13, 2025

    gh-132106: Ensure that running `logging.handlers.QueueListener` canno…

    5863cd7

    [3.13] pythongh-132106: Ensure that running `logging.handlers.QueueLi…

    582b593

    [3.13] gh-132106: Ensure that running `logging.handlers.QueueListener… (

    1dcdac6
  7. vsajip
    closed this as completedon Apr 13, 2025
  8. github-project-automation
    moved this to Done in Logging issues 🪵on Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

    Projects

    • Logging issues 🪵
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.