René's URL Explorer Experiment


Title: bpo-28002: Roundtrip f-strings with ast.unparse better by hauntsaninja · Pull Request #19612 · python/cpython · GitHub

Open Graph Title: bpo-28002: Roundtrip f-strings with ast.unparse better by hauntsaninja · Pull Request #19612 · python/cpython

X Title: bpo-28002: Roundtrip f-strings with ast.unparse better by hauntsaninja · Pull Request #19612 · python/cpython

Description: By attempting to avoid backslashes in f-string expressions. We also now proactively raise errors for some backslashes we can't avoid while unparsing FormattedValues https://bugs.python.org/issue28002 Automerge-Triggered-By: GH:isidentical

Open Graph Description: By attempting to avoid backslashes in f-string expressions. We also now proactively raise errors for some backslashes we can't avoid while unparsing FormattedValues https://bugs.python.org/is...

X Description: By attempting to avoid backslashes in f-string expressions. We also now proactively raise errors for some backslashes we can't avoid while unparsing FormattedValues https://bugs.python.or...

Opengraph URL: https://github.com/python/cpython/pull/19612

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e7a69f45-64bc-e060-eed7-5d18b7699f50
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9A62:29B8E2:241A608:3137F4E:696AD49D
html-safe-noncebac4508ff56e17c79647552541b029674abbddac534c11a821d687a6cd86266f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTYyOjI5QjhFMjoyNDFBNjA4OjMxMzdGNEU6Njk2QUQ0OUQiLCJ2aXNpdG9yX2lkIjoiNTA0MTk3MzcxOTU2MzE2Mjc4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccf76df020c45bbf8c709a782bbe8a07003bb208c69be6824e6c1d71c71fcfca7
hovercard-subject-tagpull_request:405771811
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/19612/files
twitter:imagehttps://avatars.githubusercontent.com/u/12621235?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/12621235?s=400&v=4
og:image:altBy attempting to avoid backslashes in f-string expressions. We also now proactively raise errors for some backslashes we can't avoid while unparsing FormattedValues https://bugs.python.org/is...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec718a376fcf780eb22089171adb84a543f660bf7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/19612/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F19612%2Ffiles
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%2Fpull%2F19612%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/19612/files
Reloadhttps://github.com/python/cpython/pull/19612/files
Reloadhttps://github.com/python/cpython/pull/19612/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/19612/files
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/pull/19612/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
isidenticalhttps://github.com/isidentical
python:masterhttps://github.com/python/cpython/tree/master
hauntsaninja:astunparsehttps://github.com/hauntsaninja/cpython/tree/astunparse
Conversation 73 https://github.com/python/cpython/pull/19612
Commits 32 https://github.com/python/cpython/pull/19612/commits
Checks 0 https://github.com/python/cpython/pull/19612/checks
Files changed https://github.com/python/cpython/pull/19612/files
Please reload this pagehttps://github.com/python/cpython/pull/19612/files
bpo-28002: Roundtrip f-strings with ast.unparse better https://github.com/python/cpython/pull/19612/files#top
Show all changes 32 commits https://github.com/python/cpython/pull/19612/files
cc318ee bpo-28002: Roundtrip f-strings with ast.unparse better Apr 19, 2020 https://github.com/python/cpython/pull/19612/commits/cc318ee7a9481b99e461107e673225011ba12457
4743d8d Update Lib/ast.py hauntsaninja May 21, 2020 https://github.com/python/cpython/pull/19612/commits/4743d8df71704cf735ed91d13a2c5d2897f1a2cb
98878ba _Unparser: make avoid_backslashes keyword only May 22, 2020 https://github.com/python/cpython/pull/19612/commits/98878ba2dcba96717030657daab966634970916d
a0a7b26 test_unparse: add test_fstring to run_always_files May 22, 2020 https://github.com/python/cpython/pull/19612/commits/a0a7b260bb33787ca77bd9fab20372c98d4b357e
0c95e56 unparse fstrings: improve cosmetics by escaping whitespace Jun 3, 2020 https://github.com/python/cpython/pull/19612/commits/0c95e56657cd27579328fd2c370f0ad7a76c7fd0
ac49be1 unparse: add another test case Jun 3, 2020 https://github.com/python/cpython/pull/19612/commits/ac49be13d85b435a5ab2c022d971fdccfbcc4f5e
714a269 unparse: fix final quote escaping issues Jun 3, 2020 https://github.com/python/cpython/pull/19612/commits/714a2697588228b608843216cd945a93c5534808
85521c0 unparse: simplify, share code with docstring writing Jun 3, 2020 https://github.com/python/cpython/pull/19612/commits/85521c0a27e3305bdc2f2efe880be90e7341d2b5
106cdd2 Merge remote-tracking branch 'upstream/master' into astunparse Jun 3, 2020 https://github.com/python/cpython/pull/19612/commits/106cdd25d3300ba2904966620c03ce2e3a7f87d7
4e4a4b4 remove comment Jun 3, 2020 https://github.com/python/cpython/pull/19612/commits/4e4a4b49d1c11fbb1857bb4bb55078509750eee7
91430f5 reduce assignments to qts Jun 4, 2020 https://github.com/python/cpython/pull/19612/commits/91430f5f2fcdf331ff38bf0279cb0b9f44e06115
81ff3cb use join instead of multiple replace Jun 4, 2020 https://github.com/python/cpython/pull/19612/commits/81ff3cbbba73e57969131989127e6cce198ca7fe
bd05428 use write_str_avoiding_backslashes for docstrings Jun 4, 2020 https://github.com/python/cpython/pull/19612/commits/bd054287a70c04c13f5a483837647fe919d2d9ef
cd2c107 don't use replace for backslashes Jun 4, 2020 https://github.com/python/cpython/pull/19612/commits/cd2c1074571178188a9fc3c569b5d66615411d86
4a7037a use isprintable Jun 4, 2020 https://github.com/python/cpython/pull/19612/commits/4a7037aa86c3d7a03b9c1e1c0ff0c6cb84b6ba9f
228f0b3 fix comment Jun 4, 2020 https://github.com/python/cpython/pull/19612/commits/228f0b32257a64ac9f1c1b6b5cbeb5bb1402c7c2
debc3dd Use American English Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/debc3dda6fb65c3faba043f2aa00911f7bee7c17
32d34e6 s/qts/possible_quotes/g Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/32d34e61bc84b02c9671ceb78811667884fb5377
1fdb075 Prefix undesrscore to avoid_backslashes Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/1fdb0752d14619ba531a3daaac17f06f810693d4
c3fd073 Rename value and val Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/c3fd073ce21ab5227d2e7a0f8f0da85e5859060b
a3b48a0 Reformat string escaping Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/a3b48a03a2623dd73dd56e420f4ecacbe096ac80
84485ab Add a comment to visit_JoinedStr Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/84485abd9cd703ab381a45cc10731fe789971710
4f32cf0 Fix line lengths Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/4f32cf0f9eb3aa380654f690d754779f7e8e6932
d31b376 Update comment for variable name change Jun 7, 2020 https://github.com/python/cpython/pull/19612/commits/d31b376bc85dded9d059259737b204e544707d07
428fab7 move variable from start of __init__ to end Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/428fab735b5c8c0131363fc193fd4235d9d9e4ad
ec38952 use global constants for quote types Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/ec3895270e76b02af833460218bac17cf774eeea
b903dcf make docstring explicit about returning a tuple Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/b903dcf4bcb9661ddae92ac4e3e5ad6a49f3756d
007bb4a use kw only args Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/007bb4aabf002e71d6024ae7480aae7e2b6b603c
4c09b96 add escape_special_whitespace boolean argument Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/4c09b961d9b937029a84f4b846958b9c1e7e0a9a
7735da5 use an inner function instead of a comprehension Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/7735da54bcd80a8e6b06c4a6c57306b47c986382
593b0d2 add to comment when falling back to repr Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/593b0d2af6f435e613909bcbd2bd2a3ffb26cd34
fc6166f swap the order of the iterations to save a little effort Oct 18, 2020 https://github.com/python/cpython/pull/19612/commits/fc6166f79be4029dbe66f81c6fbfd11026027830
Clear filters https://github.com/python/cpython/pull/19612/files
Please reload this pagehttps://github.com/python/cpython/pull/19612/files
Please reload this pagehttps://github.com/python/cpython/pull/19612/files
ast.py https://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
test_unparse.py https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
Lib/ast.pyhttps://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
View file https://github.com/hauntsaninja/cpython/blob/fc6166f79be4029dbe66f81c6fbfd11026027830/Lib/ast.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/19612/{{ revealButtonHref }}
https://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
https://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
https://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
https://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
https://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
https://github.com/python/cpython/pull/19612/files#diff-abeeed217a24ce3c21e15c2e32e2f0886cea69986c2641455c1eefc983c1f977
Lib/test/test_unparse.pyhttps://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
View file https://github.com/hauntsaninja/cpython/blob/fc6166f79be4029dbe66f81c6fbfd11026027830/Lib/test/test_unparse.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/19612/{{ revealButtonHref }}
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
Please reload this pagehttps://github.com/python/cpython/pull/19612/files
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
https://github.com/python/cpython/pull/19612/files#diff-1393034a674edcc67802941e0e8cfa4966c9927ba9bde2cace103593140e3f89
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.