René's URL Explorer Experiment


Title: gh-153569: hide tokenizer state behind token and source operations by pablogsal · Pull Request #156654 · python/cpython · GitHub

Open Graph Title: gh-153569: hide tokenizer state behind token and source operations by pablogsal · Pull Request #156654 · python/cpython

X Title: gh-153569: hide tokenizer state behind token and source operations by pablogsal · Pull Request #156654 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Make pegen and _tokenize consume tokenizer operations instead of accessing the tokenizer layout. Return token kind, span, location, and raw-string context together, so parser actions use the contex...

X Description: Make pegen and _tokenize consume tokenizer operations instead of accessing the tokenizer layout. Return token kind, span, location, and raw-string context together, so parser actions use the contex...

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

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/_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:e80a72f8-a1bb-7b2a-be43-9faa8df66ac6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA312:269AD9:333377A:445ABF9:6B01F743
html-safe-nonce905fbc7f6358d4377f5601e52d17a444d63eab88f8b8df2526c95004a497f627
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzEyOjI2OUFEOTozMzMzNzdBOjQ0NUFCRjk6NkIwMUY3NDMiLCJ2aXNpdG9yX2lkIjoiMjcxNTY5MjAxMzI4MTQ3NDM3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacce805c89e91a75c163f2c8ca156ce9ee2ba5a48553e025370013a92be8013550
hovercard-subject-tagpull_request:4395536475
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/python/cpython/156654/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/fe1a556359da107dd0714b168896e8800ec5abd4888419b75f29cd745edafd5a/python/cpython/pull/156654
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fe1a556359da107dd0714b168896e8800ec5abd4888419b75f29cd745edafd5a/python/cpython/pull/156654
og:image:altMake pegen and _tokenize consume tokenizer operations instead of accessing the tokenizer layout. Return token kind, span, location, and raw-string context together, so parser actions use the contex...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepablogsal
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-cache
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/156654#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F156654
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%2F156654
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=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/156654
Reloadhttps://github.com/python/cpython/pull/156654
Reloadhttps://github.com/python/cpython/pull/156654
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
https://github.com/python/cpython
pablogsalhttps://github.com/pablogsal
python:mainhttps://github.com/python/cpython/tree/main
pablogsal:gh-153569-tokenizer-source-ftstring-cleanhttps://github.com/pablogsal/cpython/tree/gh-153569-tokenizer-source-ftstring-clean
Conversationhttps://github.com/python/cpython/pull/156654
Commits4 (4)https://github.com/python/cpython/pull/156654/commits
Checkshttps://github.com/python/cpython/pull/156654/checks
Files changedhttps://github.com/python/cpython/pull/156654/files
gh-153569: hide tokenizer state behind token and source operationshttps://github.com/python/cpython/pull/156654#top
pablogsalhttps://github.com/pablogsal
python:mainhttps://github.com/python/cpython/tree/main
pablogsal:gh-153569-tokenizer-source-ftstring-cleanhttps://github.com/pablogsal/cpython/tree/gh-153569-tokenizer-source-ftstring-clean
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Aug 30, 2026https://github.com/python/cpython/pull/156654#issue-5291740776
Please reload this pagehttps://github.com/python/cpython/pull/156654
gh-153569https://github.com/python/cpython/issues/153569
#156484https://github.com/python/cpython/pull/156484
#157055https://github.com/python/cpython/pull/157055
Please reload this pagehttps://github.com/python/cpython/pull/156654
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Aug 30, 2026 https://github.com/python/cpython/pull/156654#ref-issue-4862561196
Base the tokenizer API on source offsets #153569 https://github.com/python/cpython/issues/153569
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/b2bc8d123da070a3728925ec161ab63a920d9185..d9b2b16ab9c734643909d75911d4dc1235652e5a
b2bc8d1https://github.com/python/cpython/commit/b2bc8d123da070a3728925ec161ab63a920d9185
d9b2b16https://github.com/python/cpython/commit/d9b2b16ab9c734643909d75911d4dc1235652e5a
Compare https://github.com/python/cpython/compare/b2bc8d123da070a3728925ec161ab63a920d9185..d9b2b16ab9c734643909d75911d4dc1235652e5a
August 30, 2026 13:16https://github.com/python/cpython/pull/156654#event-30236768921
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Aug 30, 2026https://github.com/python/cpython/pull/156654#event-30236795755
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/9ce1fd9d9c5a01c43a24d6168835574264e3a939..afd9d72be5073db8db08e75471e43f7a1ce94945
9ce1fd9https://github.com/python/cpython/commit/9ce1fd9d9c5a01c43a24d6168835574264e3a939
afd9d72https://github.com/python/cpython/commit/afd9d72be5073db8db08e75471e43f7a1ce94945
Compare https://github.com/python/cpython/compare/9ce1fd9d9c5a01c43a24d6168835574264e3a939..afd9d72be5073db8db08e75471e43f7a1ce94945
September 5, 2026 17:46https://github.com/python/cpython/pull/156654#event-30615323818
gh-153569: return token spans and unify decoded source storage #156482 https://github.com/python/cpython/pull/156482
gh-153569: centralize formatted-string state and source spans #156484 https://github.com/python/cpython/pull/156484
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/afd9d72be5073db8db08e75471e43f7a1ce94945..f72cb2b2757fc6b1ac4209d0b222103279b72468
afd9d72https://github.com/python/cpython/commit/afd9d72be5073db8db08e75471e43f7a1ce94945
f72cb2bhttps://github.com/python/cpython/commit/f72cb2b2757fc6b1ac4209d0b222103279b72468
Compare https://github.com/python/cpython/compare/afd9d72be5073db8db08e75471e43f7a1ce94945..f72cb2b2757fc6b1ac4209d0b222103279b72468
September 5, 2026 19:17https://github.com/python/cpython/pull/156654#event-30617937252
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Sep 5, 2026https://github.com/python/cpython/pull/156654#event-30617949594
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/7e5d82cb08a40c769b58f3effe170156d66c94cc..924080632afd8fe23c32fdd262eb39b6f074c899
7e5d82chttps://github.com/python/cpython/commit/7e5d82cb08a40c769b58f3effe170156d66c94cc
9240806https://github.com/python/cpython/commit/924080632afd8fe23c32fdd262eb39b6f074c899
Compare https://github.com/python/cpython/compare/7e5d82cb08a40c769b58f3effe170156d66c94cc..924080632afd8fe23c32fdd262eb39b6f074c899
September 6, 2026 20:57https://github.com/python/cpython/pull/156654#event-30653125738
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Sep 6, 2026https://github.com/python/cpython/pull/156654#event-30653135308
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/0eb2ce01076272a4ef588a57c672f530ee0b15a6..6f220e47077282617d9c5f50c5cf6dfb8de9931b
0eb2ce0https://github.com/python/cpython/commit/0eb2ce01076272a4ef588a57c672f530ee0b15a6
6f220e4https://github.com/python/cpython/commit/6f220e47077282617d9c5f50c5cf6dfb8de9931b
Compare https://github.com/python/cpython/compare/0eb2ce01076272a4ef588a57c672f530ee0b15a6..6f220e47077282617d9c5f50c5cf6dfb8de9931b
September 6, 2026 23:35https://github.com/python/cpython/pull/156654#event-30656669212
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Sep 6, 2026https://github.com/python/cpython/pull/156654#event-30656795769
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Sep 6, 2026https://github.com/python/cpython/pull/156654#event-30656949582
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/6f220e47077282617d9c5f50c5cf6dfb8de9931b..bbc061f801b5671f93bf0f434c4729b0ed9ba2e7
6f220e4https://github.com/python/cpython/commit/6f220e47077282617d9c5f50c5cf6dfb8de9931b
bbc061fhttps://github.com/python/cpython/commit/bbc061f801b5671f93bf0f434c4729b0ed9ba2e7
Compare https://github.com/python/cpython/compare/6f220e47077282617d9c5f50c5cf6dfb8de9931b..bbc061f801b5671f93bf0f434c4729b0ed9ba2e7
September 7, 2026 00:03https://github.com/python/cpython/pull/156654#event-30657270547
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Sep 7, 2026https://github.com/python/cpython/pull/156654#event-30657277502
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/bbc061f801b5671f93bf0f434c4729b0ed9ba2e7..b6193855ac55f208c430b23ebf9f23e8136c6c42
bbc061fhttps://github.com/python/cpython/commit/bbc061f801b5671f93bf0f434c4729b0ed9ba2e7
b619385https://github.com/python/cpython/commit/b6193855ac55f208c430b23ebf9f23e8136c6c42
Compare https://github.com/python/cpython/compare/bbc061f801b5671f93bf0f434c4729b0ed9ba2e7..b6193855ac55f208c430b23ebf9f23e8136c6c42
September 7, 2026 00:05https://github.com/python/cpython/pull/156654#event-30657338780
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Sep 7, 2026 https://github.com/python/cpython/pull/156654#ref-pullrequest-5368502160
gh-153569: consolidate tokenizer input, layout, and diagnostics #157055 https://github.com/python/cpython/pull/157055
pablogsalhttps://github.com/pablogsal
September 9, 2026 00:26https://github.com/python/cpython/pull/156654#commits-pushed-5caac0f
https://github.com/pablogsal
pythongh-153569https://github.com/python/cpython/issues/153569
: hide tokenizer state behind token and source operationshttps://github.com/python/cpython/pull/156654/commits/5caac0f563b7aae83eafb43a42f589ccb348f789
5caac0fhttps://github.com/python/cpython/pull/156654/commits/5caac0f563b7aae83eafb43a42f589ccb348f789
https://github.com/pablogsal
pythongh-153569https://github.com/python/cpython/issues/153569
: keep persistent scanner positions as source offsetshttps://github.com/python/cpython/pull/156654/commits/97b6803a3c6156eb23c93e789ff9339010d1de6c
97b6803https://github.com/python/cpython/pull/156654/commits/97b6803a3c6156eb23c93e789ff9339010d1de6c
pablogsalhttps://github.com/pablogsal
September 9, 2026 00:26https://github.com/python/cpython/pull/156654#commits-pushed-1d56ef5
https://github.com/pablogsal
pythongh-153569https://github.com/python/cpython/issues/153569
: include token types and owned metadata in tokenizer …https://github.com/python/cpython/pull/156654/commits/1d56ef543627191e5726e69c73089976dc35daa5
1d56ef5https://github.com/python/cpython/pull/156654/commits/1d56ef543627191e5726e69c73089976dc35daa5
https://github.com/pablogsal
pythongh-153569https://github.com/python/cpython/issues/153569
: keep character scanning inline with source offsetshttps://github.com/python/cpython/pull/156654/commits/aef6c9ee7b3d616acdac77ffd8fd2b8a62448953
aef6c9ehttps://github.com/python/cpython/pull/156654/commits/aef6c9ee7b3d616acdac77ffd8fd2b8a62448953
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
force-pushedhttps://github.com/python/cpython/compare/0b4783624b2e9da03636703510af5d8e24e8f97c..aef6c9ee7b3d616acdac77ffd8fd2b8a62448953
0b47836https://github.com/python/cpython/commit/0b4783624b2e9da03636703510af5d8e24e8f97c
aef6c9ehttps://github.com/python/cpython/commit/aef6c9ee7b3d616acdac77ffd8fd2b8a62448953
Compare https://github.com/python/cpython/compare/0b4783624b2e9da03636703510af5d8e24e8f97c..aef6c9ee7b3d616acdac77ffd8fd2b8a62448953
September 8, 2026 23:27https://github.com/python/cpython/pull/156654#event-30791043438
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
September 8, 2026 23:28https://github.com/python/cpython/pull/156654#event-30791067140
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
AA-Turnerhttps://github.com/AA-Turner
emmatypinghttps://github.com/emmatyping
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
erlend-aaslandhttps://github.com/erlend-aasland
itamarohttps://github.com/itamaro
lysnikolaouhttps://github.com/lysnikolaou
code ownershttps://github.com/python/cpython/blob/2ddc218b20625ef4a6293aee3696e605c6bac5b9/.github/CODEOWNERS#L186
September 8, 2026 23:28https://github.com/python/cpython/pull/156654#event-30791067680
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Sep 8, 2026https://github.com/python/cpython/pull/156654#event-30791069135
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
7bfa97fhttps://github.com/python/cpython/commit/7bfa97f4dca58ab45def2ca0a1e8088997a4fa0b
Sep 12, 2026https://github.com/python/cpython/pull/156654#event-31021944821
Please reload this pagehttps://github.com/python/cpython/pull/156654
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
September 12, 2026 13:30https://github.com/python/cpython/pull/156654#event-31021945557
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Sep 12, 2026https://github.com/python/cpython/pull/156654#event-31021946198
clin1234https://github.com/clin1234
Sep 12, 2026 https://github.com/python/cpython/pull/156654#ref-commit-4c60f27
https://github.com/pablogsal
https://github.com/clin1234
pythongh-153569https://github.com/python/cpython/issues/153569
: hide tokenizer state behind token and source operati…https://github.com/clin1234/cpython/commit/4c60f2787749cdf601b9be7aff9f7996f1c94327
4c60f27https://github.com/clin1234/cpython/commit/4c60f2787749cdf601b9be7aff9f7996f1c94327
python#156654https://github.com/python/cpython/pull/156654
johnslavikhttps://github.com/johnslavik
Sep 14, 2026 https://github.com/python/cpython/pull/156654#ref-commit-5b5bd38
https://github.com/pablogsal
https://github.com/johnslavik
pythongh-153569https://github.com/python/cpython/issues/153569
: hide tokenizer state behind token and source operati…https://github.com/johnslavik/cpython/commit/5b5bd38ea8ffd9314be8078b59c88c9c5bfa91ab
5b5bd38https://github.com/johnslavik/cpython/commit/5b5bd38ea8ffd9314be8078b59c88c9c5bfa91ab
python#156654https://github.com/python/cpython/pull/156654
https://github.co/hiddenchars
https://github.com/python/cpython/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%2Fpython%2Fcpython%2Fpull%2F156654
https://github.com/lysnikolaou
lysnikolaou https://github.com/lysnikolaou
https://github.com/ericsnowcurrently
ericsnowcurrently https://github.com/ericsnowcurrently
https://github.com/erlend-aasland
erlend-aasland https://github.com/erlend-aasland
https://github.com/AA-Turner
AA-Turner https://github.com/AA-Turner
https://github.com/emmatyping
emmatyping https://github.com/emmatyping
https://github.com/itamaro
itamaro https://github.com/itamaro
Please reload this pagehttps://github.com/python/cpython/pull/156654
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Please reload this pagehttps://github.com/python/cpython/pull/156654
https://github.com/pablogsal
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.