Title: Default to stdout isatty for colour detection instead of stderr · Issue #128595 · python/cpython · GitHub
Open Graph Title: Default to stdout isatty for colour detection instead of stderr · Issue #128595 · python/cpython
X Title: Default to stdout isatty for colour detection instead of stderr · Issue #128595 · python/cpython
Description: Bug report Bug description: The terminal colour detection defaults to checking stderr's isatty, rather than stdout. As suggested at #128317 (comment), let's default to checking stdout's isatty rather than stderr's. Here some example outp...
Open Graph Description: Bug report Bug description: The terminal colour detection defaults to checking stderr's isatty, rather than stdout. As suggested at #128317 (comment), let's default to checking stdout's isatty rath...
X Description: Bug report Bug description: The terminal colour detection defaults to checking stderr's isatty, rather than stdout. As suggested at #128317 (comment), let's default to checking stdout's...
Opengraph URL: https://github.com/python/cpython/issues/128595
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Default to stdout isatty for colour detection instead of stderr","articleBody":"# Bug report\n\n### Bug description:\n\nThe terminal colour detection defaults to checking `stderr`'s `isatty`, rather than `stdout`.\n\nAs suggested at https://github.com/python/cpython/issues/128317#issuecomment-2569566697, let's default to checking `stdout`'s `isatty` rather than `stderr`'s.\n\nHere some example output, plus when piping it:\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth width=50%\u003eNow\u003c/th\u003e\u003cth width=50%\u003eProposal\u003c/th\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cimg width=\"522\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2133c94f-58b2-43fe-ba37-c70643aa8b16\" /\u003e\n\u003ctd\u003e\n\u003cimg width=\"519\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bbbc954f-73a4-41a5-b087-aff24c2488a5\" /\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cimg width=\"656\" alt=\"image\" src=\"https://github.com/user-attachments/assets/00282bc7-ac09-4696-ab54-271ad6bb4555\" /\u003e\n\u003ctd\u003e\n\u003cimg width=\"513\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5e873085-b162-46d1-8bff-d1c761659c30\" /\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cimg width=\"289\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5d710bd6-0398-4c82-b6ae-f4c3877f2af4\" /\u003e\n\u003ctd\u003e\n\u003cimg width=\"289\" alt=\"image\" src=\"https://github.com/user-attachments/assets/636828a0-59cf-4145-8076-8e85ee840f2d\" /\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cimg width=\"317\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9f80b722-4050-49df-8683-24d3a0cb6804\" /\u003e\n\u003ctd\u003e\n\u003cimg width=\"316\" alt=\"image\" src=\"https://github.com/user-attachments/assets/58d836f3-b9b9-4716-bedf-66f9c9d1c515\" /\u003e\n\u003c/table\u003e\n\n\n### CPython versions tested on:\n\n3.13, CPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-128498\n* gh-128687\n* gh-128778\n* gh-129057\n* gh-129070\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/hugovk","@type":"Person","name":"hugovk"},"datePublished":"2025-01-07T19:47:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/128595/cpython/issues/128595"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:269236da-8bfc-2ca3-a94d-796618b6fc71 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B90E:28B9FB:68446B:8FC888:6A50766E |
| html-safe-nonce | 6ff7a703cab3a87f5d3dc1dee756d31971ff93584e94bd262bce89971c95bf95 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTBFOjI4QjlGQjo2ODQ0NkI6OEZDODg4OjZBNTA3NjZFIiwidmlzaXRvcl9pZCI6Ijk0MDgzNDk2OTA0NzAzNzU1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1223216f056fd073ef08ba3bcd2cc466425d6929bf6fb9af8dd7d9015cf9f5b1 |
| hovercard-subject-tag | issue:2773610984 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/128595/issue_layout |
| twitter:image | https://opengraph.githubassets.com/86e00d1d7d7b6004775ea340e1f184d0e1f30553c1d3baa854d57053de147824/python/cpython/issues/128595 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/86e00d1d7d7b6004775ea340e1f184d0e1f30553c1d3baa854d57053de147824/python/cpython/issues/128595 |
| og:image:alt | Bug report Bug description: The terminal colour detection defaults to checking stderr's isatty, rather than stdout. As suggested at #128317 (comment), let's default to checking stdout's isatty rath... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hugovk |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width