René's URL Explorer Experiment


Title: Restore PrettyFormat streams after reentrant calls by masonjian · Pull Request #169 · samuelcolvin/python-devtools · GitHub

Open Graph Title: Restore PrettyFormat streams after reentrant calls by masonjian · Pull Request #169 · samuelcolvin/python-devtools

X Title: Restore PrettyFormat streams after reentrant calls by masonjian · Pull Request #169 · samuelcolvin/python-devtools

Description: Dev tools for python. Contribute to samuelcolvin/python-devtools development by creating an account on GitHub.

Open Graph Description: Closes #162. Calling pformat inside an object's __repr__ currently replaces the outer formatter's stream and duplicates output. Save and restore the previous stream in finally so nested for...

X Description: Closes #162. Calling pformat inside an object's __repr__ currently replaces the outer formatter's stream and duplicates output. Save and restore the previous stream in finally so ne...

Opengraph URL: https://github.com/samuelcolvin/python-devtools/pull/169

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:35e5b27f-aa45-f070-3c62-2838503759de
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9EAA:3BCA39:1024BB:166B02:6AEC69DC
html-safe-nonce0f2799d2ec3e0ec2b362909c9865a70a9454dec091a74067b63ce7aff9c9e056
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUFBOjNCQ0EzOToxMDI0QkI6MTY2QjAyOjZBRUM2OURDIiwidmlzaXRvcl9pZCI6IjMxMTYyMTIzOTgxMjUyNDY5NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb152cf7b1d09540157f1a00f11af4a55c1b40460ef2c2ec8dff3c1cb16334d37
hovercard-subject-tagpull_request:4815797570
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/samuelcolvin/python-devtools/169/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/cddea3def622e1865b31c299cadd587821943151debafcaacbe82691ab645996/samuelcolvin/python-devtools/pull/169
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cddea3def622e1865b31c299cadd587821943151debafcaacbe82691ab645996/samuelcolvin/python-devtools/pull/169
og:image:altCloses #162. Calling pformat inside an object's __repr__ currently replaces the outer formatter's stream and duplicates output. Save and restore the previous stream in finally so nested for...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemasonjian
hostnamegithub.com
expected-hostnamegithub.com
None81a8a223b8411e760195a15942ff045b37d56328f5bf02c4ca5f903e3dcb475e
turbo-cache-controlno-cache
go-importgithub.com/samuelcolvin/python-devtools git https://github.com/samuelcolvin/python-devtools.git
octolytics-dimension-user_id4039449
octolytics-dimension-user_loginsamuelcolvin
octolytics-dimension-repository_id100870674
octolytics-dimension-repository_nwosamuelcolvin/python-devtools
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id100870674
octolytics-dimension-repository_network_root_nwosamuelcolvin/python-devtools
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
releasea2c6dc5933515805b39ac7c5b9ab4e947c2f5a42
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/samuelcolvin/python-devtools/pull/169#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsamuelcolvin%2Fpython-devtools%2Fpull%2F169
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsamuelcolvin%2Fpython-devtools%2Fpull%2F169
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=samuelcolvin%2Fpython-devtools
Reloadhttps://github.com/samuelcolvin/python-devtools/pull/169
Reloadhttps://github.com/samuelcolvin/python-devtools/pull/169
Reloadhttps://github.com/samuelcolvin/python-devtools/pull/169
samuelcolvinhttps://github.com/samuelcolvin
python-devtoolshttps://github.com/samuelcolvin/python-devtools
Codehttps://github.com/samuelcolvin/python-devtools
Issues21 (21)https://github.com/samuelcolvin/python-devtools/issues
Pull requests8 (8)https://github.com/samuelcolvin/python-devtools/pulls
Actionshttps://github.com/samuelcolvin/python-devtools/actions
Security and qualityhttps://github.com/samuelcolvin/python-devtools/security
Insightshttps://github.com/samuelcolvin/python-devtools/pulse
https://github.com/samuelcolvin/python-devtools
samuelcolvinhttps://github.com/samuelcolvin
samuelcolvin:mainhttps://github.com/samuelcolvin/python-devtools/tree/main
masonjian:fix/issue-162-reentrant-pformathttps://github.com/masonjian/python-devtools/tree/fix/issue-162-reentrant-pformat
Conversationhttps://github.com/samuelcolvin/python-devtools/pull/169
Commits2 (2)https://github.com/samuelcolvin/python-devtools/pull/169/commits
Checkshttps://github.com/samuelcolvin/python-devtools/pull/169/checks
Files changedhttps://github.com/samuelcolvin/python-devtools/pull/169/files
Restore PrettyFormat streams after reentrant callshttps://github.com/samuelcolvin/python-devtools/pull/169#top
samuelcolvinhttps://github.com/samuelcolvin
samuelcolvin:mainhttps://github.com/samuelcolvin/python-devtools/tree/main
masonjian:fix/issue-162-reentrant-pformathttps://github.com/masonjian/python-devtools/tree/fix/issue-162-reentrant-pformat
https://github.com/masonjian
masonjianhttps://github.com/masonjian
Oct 11, 2026https://github.com/samuelcolvin/python-devtools/pull/169#issue-5796992788
#162https://github.com/samuelcolvin/python-devtools/issues/162
Please reload this pagehttps://github.com/samuelcolvin/python-devtools/pull/169
https://github.com/masonjian
Fix PrettyFormat stream restoration for reentrant callshttps://github.com/samuelcolvin/python-devtools/pull/169/commits/74616c30a367a0f1cac172738095e32d5c5e496c
74616c3https://github.com/samuelcolvin/python-devtools/pull/169/commits/74616c30a367a0f1cac172738095e32d5c5e496c
https://github.com/apps/codecov
codecovhttps://github.com/apps/codecov
Oct 11, 2026https://github.com/samuelcolvin/python-devtools/pull/169#issuecomment-6104250106
Codecovhttps://app.codecov.io/gh/samuelcolvin/python-devtools/pull/169?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
2aea99dhttps://app.codecov.io/gh/samuelcolvin/python-devtools/commit/2aea99d95f4766fbca86139f72a1e4985d10a30e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
74616c3https://app.codecov.io/gh/samuelcolvin/python-devtools/commit/74616c30a367a0f1cac172738095e32d5c5e496c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
Files with missing lineshttps://app.codecov.io/gh/samuelcolvin/python-devtools/pull/169?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
devtools/prettier.pyhttps://app.codecov.io/gh/samuelcolvin/python-devtools/pull/169?src=pr&el=tree&filepath=devtools%2Fprettier.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin#diff-ZGV2dG9vbHMvcHJldHRpZXIucHk=
1 file with indirect coverage changeshttps://app.codecov.io/gh/samuelcolvin/python-devtools/pull/169/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
Continue to review full report in Codecov by Harnesshttps://app.codecov.io/gh/samuelcolvin/python-devtools/pull/169?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
Click here to learn morehttps://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
Codecovhttps://app.codecov.io/gh/samuelcolvin/python-devtools/pull/169?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
5022f1f...74616c3https://app.codecov.io/gh/samuelcolvin/python-devtools/pull/169?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
comment docshttps://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Samuel+Colvin
Test Analyticshttps://docs.codecov.com/docs/test-analytics
Please reload this pagehttps://github.com/samuelcolvin/python-devtools/pull/169
https://github.com/masonjian
masonjianhttps://github.com/masonjian
October 11, 2026 01:52https://github.com/samuelcolvin/python-devtools/pull/169#event-32966804560
https://github.com/masonjian
masonjianhttps://github.com/masonjian
Oct 11, 2026https://github.com/samuelcolvin/python-devtools/pull/169#issuecomment-6106033812
current runhttps://github.com/samuelcolvin/python-devtools/actions/runs/38102337285
base workflowhttps://github.com/samuelcolvin/python-devtools/blob/5022f1f6f1c55d871b1db208c9c1b2ab0df488fe/.github/workflows/ci.yml
Codecov reporthttps://github.com/samuelcolvin/python-devtools/pull/169#issuecomment-6104250106
Python 3.8 Ubuntu jobhttps://github.com/samuelcolvin/python-devtools/actions/runs/38102337285/job/114360668002
Please reload this pagehttps://github.com/samuelcolvin/python-devtools/pull/169
https://github.com/samuelcolvin
https://github.com/claude
Merge main into fix/issue-162-reentrant-pformathttps://github.com/samuelcolvin/python-devtools/pull/169/commits/d950fc5225ab175aa295f736671f845feddd963e
d950fc5https://github.com/samuelcolvin/python-devtools/pull/169/commits/d950fc5225ab175aa295f736671f845feddd963e
https://claude.ai/code/session_0125Pi5iurTnuhZ5cZ58xcNnhttps://claude.ai/code/session_0125Pi5iurTnuhZ5cZ58xcNn
https://github.com/samuelcolvin
samuelcolvinhttps://github.com/samuelcolvin
Oct 11, 2026https://github.com/samuelcolvin/python-devtools/pull/169#issuecomment-6111722363
Please reload this pagehttps://github.com/samuelcolvin/python-devtools/pull/169
https://github.com/samuelcolvin
samuelcolvinhttps://github.com/samuelcolvin
c0d009chttps://github.com/samuelcolvin/python-devtools/commit/c0d009c5d8a00886cd90e78042a7c10a93a1ca04
Oct 11, 2026https://github.com/samuelcolvin/python-devtools/pull/169#event-32995896605
Please reload this pagehttps://github.com/samuelcolvin/python-devtools/pull/169
https://github.com/samuelcolvin
samuelcolvinhttps://github.com/samuelcolvin
Oct 11, 2026 https://github.com/samuelcolvin/python-devtools/pull/169#ref-pullrequest-5803531686
Bump version to 0.13.0 #175 https://github.com/samuelcolvin/python-devtools/pull/175
https://github.co/hiddenchars
https://github.com/samuelcolvin/python-devtools/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsamuelcolvin%2Fpython-devtools%2Fpull%2F169
Please reload this pagehttps://github.com/samuelcolvin/python-devtools/pull/169
(🐞) when using devtools.pformat within a __repr__, the output becomes duplicated https://github.com/samuelcolvin/python-devtools/issues/162
Please reload this pagehttps://github.com/samuelcolvin/python-devtools/pull/169
https://github.com/masonjian
https://github.com/samuelcolvin
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.