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 — gh-146292: Add colour to `http.server` logs by hugovk · Pull Request #146293 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented Mar 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Taking inspiration from the make dev logs for the new blog (https://github.com/python/python-insider-blog):

Image

Let's add colour to the http.server log output:

image

As usual, this respects the environment variables to control colour and the output stream's capabilities.

  • Issue: Add colour to http.server logs #146292

📚 Documentation preview 📚: https://cpython-previews--146293.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

maurycy reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@hugovk
Add colour to http.server output
ff048ec
@hugovk
hugovk requested review from AA-Turner and AlexWaygood as code owners March 22, 2026 14:55
@bedevere-app bedevere-app Bot mentioned this pull request Mar 22, 2026
Add colour to http.server logs #146292
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Mar 22, 2026
brianschubert
brianschubert reviewed Mar 22, 2026
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

brianschubert
brianschubert reviewed Mar 22, 2026
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hugovk @brianschubert
Improve what's new
f938f01
Co-authored-by: Brian Schubert <[email protected]>
picnixz
picnixz reviewed Mar 22, 2026
View reviewed changes
Comment thread Lib/test/test_httpservers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/http/server.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/_colorize.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

hugovk added 5 commits March 22, 2026 20:36
@hugovk
Eager import
6a35306
@hugovk
status_error -> status_client_error
4c6add7
@hugovk
Update 2xx colour and add for 1xx and 3xx
3057608
@hugovk
Update test
296ef8e
@hugovk
Merge branch 'main' into 3.15-colour-http.server
401b1f5
hugovk
hugovk commented Apr 6, 2026
View reviewed changes
Comment thread Lib/_colorize.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Fix bad conflict resolution
bca663c
@hugovk

hugovk commented Apr 6, 2026

Copy link
Copy Markdown
Member Author

@picnixz @brianschubert Thanks for the reviews! Any further comments?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood
AlexWaygood removed their request for review April 6, 2026 21:43
@ambv
ambv merged commit 2c8f26c into python:main Apr 8, 2026
60 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Apr 8, 2026
@hugovk
hugovk deleted the 3.15-colour-http.server branch April 8, 2026 12:25
@edgarrmondragon edgarrmondragon mentioned this pull request Apr 16, 2026
Fix tests for Python 3.15.0a5+ sphinx-doc/sphinx#14399
Closed
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@hugovk @brianschubert @ljfp
pythongh-146292: Add colour to http.server logs (pythonGH-146293)
6d3ce86
Co-authored-by: Brian Schubert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@brianschubert brianschubert brianschubert left review comments
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@hugovk @picnixz @brianschubert @ambv
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — 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.