René's URL Explorer Experiment


Title: gh-125553: Fix backslash continuation in `untokenize` by tomasr8 · Pull Request #126010 · python/cpython · GitHub

Open Graph Title: gh-125553: Fix backslash continuation in `untokenize` by tomasr8 · Pull Request #126010 · python/cpython

X Title: gh-125553: Fix backslash continuation in `untokenize` by tomasr8 · Pull Request #126010 · python/cpython

Description: This change correctly inserts whitespace before backslash + newline in most cases. The exception is cases where the backslash is on its own line which makes the untokenization ambiguous. For example: a b c \ c However, these should be pretty rare. In fact, I ran the tokenize -> untokenize round-trip check on the whole repo (excluding files which fail to tokenize in the first place) and all of the files produce the same output. Issue: gh-125553

Open Graph Description: This change correctly inserts whitespace before backslash + newline in most cases. The exception is cases where the backslash is on its own line which makes the untokenization ambiguous. For exampl...

X Description: This change correctly inserts whitespace before backslash + newline in most cases. The exception is cases where the backslash is on its own line which makes the untokenization ambiguous. For exampl...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1360d339-869d-a778-7d3d-5c794e069b17
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCA2E:137B3:2672996:330E69C:6B005FC8
html-safe-nonce8daeef051862e0bfd2cec6f8c12b3dd44a65dec975f5db42cc023aadf06d2d38
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTJFOjEzN0IzOjI2NzI5OTY6MzMwRTY5Qzo2QjAwNUZDOCIsInZpc2l0b3JfaWQiOiI3Mzc3NDI4NzY3MzcyNzYzMDgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacad2a5a233568539e9bc2e784efd479b51695d9e44e80fcafbc884a30fbb6add9
hovercard-subject-tagpull_request:2147320583
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/126010/files
twitter:imagehttps://avatars.githubusercontent.com/u/8739637?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/8739637?s=400&v=4
og:image:altThis change correctly inserts whitespace before backslash + newline in most cases. The exception is cases where the backslash is on its own line which makes the untokenization ambiguous. For exampl...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73
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
releaseeacd927ba6112e3b01ba99c762bd699a4a4f5df7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/126010/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F126010%2Ffiles
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%2Fpython%2Fcpython%2Fpull%2F126010%2Ffiles
Sign uphttps://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/126010/files
Reloadhttps://github.com/python/cpython/pull/126010/files
Reloadhttps://github.com/python/cpython/pull/126010/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
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
pablogsalhttps://github.com/pablogsal
python:mainhttps://github.com/python/cpython/tree/main
tomasr8:tokenize-backslashhttps://github.com/tomasr8/cpython/tree/tokenize-backslash
Conversation 28 https://github.com/python/cpython/pull/126010
Commits 8 https://github.com/python/cpython/pull/126010/commits
Checks 0 https://github.com/python/cpython/pull/126010/checks
Files changed https://github.com/python/cpython/pull/126010/files
Please reload this pagehttps://github.com/python/cpython/pull/126010/files
gh-125553: Fix backslash continuation in untokenize https://github.com/python/cpython/pull/126010/files#top
Show all changes 8 commits https://github.com/python/cpython/pull/126010/files
3bc07b8 Fix backslash continuation in untokenize tomasr8 Oct 26, 2024 https://github.com/python/cpython/pull/126010/commits/3bc07b8e05ee2ac534e59cfa9841aedd5ec6408f
cc2fb5e Add news entry tomasr8 Oct 26, 2024 https://github.com/python/cpython/pull/126010/commits/cc2fb5edb094deb38667ac013ffd5027722a84ed
ca62935 Fix Windows tomasr8 Oct 26, 2024 https://github.com/python/cpython/pull/126010/commits/ca6293543ca99d0c335ac9d55f98f31bba239e50
a595dde Be more lenient with test_traceback tomasr8 Oct 28, 2024 https://github.com/python/cpython/pull/126010/commits/a595dde6dbdfbca955e4238f58af2c52148d81dc
6f6a688 Check if a file can be compared exactly tomasr8 Oct 29, 2024 https://github.com/python/cpython/pull/126010/commits/6f6a6881b660e28b809e59f875684805c92e3cbc
497067a Simplify regex tomasr8 Oct 29, 2024 https://github.com/python/cpython/pull/126010/commits/497067ac29402ae7a2a78e862913711bbcbe2810
4b32c8e Use a list for ambiguous files tomasr8 Oct 29, 2024 https://github.com/python/cpython/pull/126010/commits/4b32c8e9efdf674291c0f501da48dd0009b0b39f
e2c9bb7 Revert "Use a list for ambiguous files" tomasr8 Oct 30, 2024 https://github.com/python/cpython/pull/126010/commits/e2c9bb7af911250be40eda6e8e5bec1931bf508a
Clear filters https://github.com/python/cpython/pull/126010/files
Please reload this pagehttps://github.com/python/cpython/pull/126010/files
Please reload this pagehttps://github.com/python/cpython/pull/126010/files
test_tokenize.py https://github.com/python/cpython/pull/126010/files#diff-b07c4f10c75a22e102f114227a0a9b7b763ddda7a330109994e69b29540ea9bb
tokenize.py https://github.com/python/cpython/pull/126010/files#diff-35c916ae2b7e488053d1c28da2a853790f2c0474e909c03950e49aa4203ea976
2024-10-26-16-59-02.gh-issue-125553.4pDLzt.rst https://github.com/python/cpython/pull/126010/files#diff-6c3cef010b5ae8089b933f413b20a6f85708b2aff07835428b19b527f9e952b9
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L311
Lib/test/test_tokenize.pyhttps://github.com/python/cpython/pull/126010/files#diff-b07c4f10c75a22e102f114227a0a9b7b763ddda7a330109994e69b29540ea9bb
View file https://github.com/tomasr8/cpython/blob/e2c9bb7af911250be40eda6e8e5bec1931bf508a/Lib/test/test_tokenize.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/126010/{{ revealButtonHref }}
https://github.com/python/cpython/pull/126010/files#diff-b07c4f10c75a22e102f114227a0a9b7b763ddda7a330109994e69b29540ea9bb
https://github.com/python/cpython/pull/126010/files#diff-b07c4f10c75a22e102f114227a0a9b7b763ddda7a330109994e69b29540ea9bb
https://github.com/python/cpython/pull/126010/files#diff-b07c4f10c75a22e102f114227a0a9b7b763ddda7a330109994e69b29540ea9bb
Please reload this pagehttps://github.com/python/cpython/pull/126010/files
https://github.com/python/cpython/pull/126010/files#diff-b07c4f10c75a22e102f114227a0a9b7b763ddda7a330109994e69b29540ea9bb
https://github.com/python/cpython/pull/126010/files#diff-b07c4f10c75a22e102f114227a0a9b7b763ddda7a330109994e69b29540ea9bb
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L312
Lib/tokenize.pyhttps://github.com/python/cpython/pull/126010/files#diff-35c916ae2b7e488053d1c28da2a853790f2c0474e909c03950e49aa4203ea976
View file https://github.com/tomasr8/cpython/blob/e2c9bb7af911250be40eda6e8e5bec1931bf508a/Lib/tokenize.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/126010/{{ revealButtonHref }}
https://github.com/python/cpython/pull/126010/files#diff-35c916ae2b7e488053d1c28da2a853790f2c0474e909c03950e49aa4203ea976
https://github.com/python/cpython/pull/126010/files#diff-35c916ae2b7e488053d1c28da2a853790f2c0474e909c03950e49aa4203ea976
https://github.com/python/cpython/pull/126010/files#diff-35c916ae2b7e488053d1c28da2a853790f2c0474e909c03950e49aa4203ea976
Please reload this pagehttps://github.com/python/cpython/pull/126010/files
https://github.com/python/cpython/pull/126010/files#diff-35c916ae2b7e488053d1c28da2a853790f2c0474e909c03950e49aa4203ea976
https://github.com/python/cpython/pull/126010/files#diff-35c916ae2b7e488053d1c28da2a853790f2c0474e909c03950e49aa4203ea976
Misc/NEWS.d/next/Library/2024-10-26-16-59-02.gh-issue-125553.4pDLzt.rsthttps://github.com/python/cpython/pull/126010/files#diff-6c3cef010b5ae8089b933f413b20a6f85708b2aff07835428b19b527f9e952b9
View file https://github.com/tomasr8/cpython/blob/e2c9bb7af911250be40eda6e8e5bec1931bf508a/Misc/NEWS.d/next/Library/2024-10-26-16-59-02.gh-issue-125553.4pDLzt.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/126010/{{ revealButtonHref }}
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.