René's URL Explorer Experiment


Title: gh-126599: Refactor the `_PyOptimizer` APIs by xuantengh · Pull Request #126853 · python/cpython · GitHub

Open Graph Title: gh-126599: Refactor the `_PyOptimizer` APIs by xuantengh · Pull Request #126853 · python/cpython

X Title: gh-126599: Refactor the `_PyOptimizer` APIs by xuantengh · Pull Request #126853 · python/cpython

Description: Hi this is my draft to remove the _PyOptimizer_NewCounter and _PyOptimizer_NewUOpOptimizer APIs, where the related tests are removed or skipped. For the most challenging _PyOptimizer_Optimize, I'm still trying to figure out how to achieve its functionality in generated interpreter. To remove the "artificial boundaries", should we just remove this API call and replace its code in the JUMP_BACKWARD, _EXIT_TRACE and _DYNAMIC_EXIT instruction cases? Issue: gh-126599

Open Graph Description: Hi this is my draft to remove the _PyOptimizer_NewCounter and _PyOptimizer_NewUOpOptimizer APIs, where the related tests are removed or skipped. For the most challenging _PyOptimizer_Optimize, I...

X Description: Hi this is my draft to remove the _PyOptimizer_NewCounter and _PyOptimizer_NewUOpOptimizer APIs, where the related tests are removed or skipped. For the most challenging _PyOptimizer_Optimize, I&am...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d6c14306-8c7d-51cb-debb-5d8c2bfbdef5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE7D8:C9EB4:C67BA1:101DC37:696AFF17
html-safe-nonce3981098e5f8ffa81af9d4e7eedf2cea93bc5de3be93a2ad6c347125563bb6f96
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0Q4OkM5RUI0OkM2N0JBMToxMDFEQzM3OjY5NkFGRjE3IiwidmlzaXRvcl9pZCI6IjQxMzg0OTQ5MzQ3MzEzOTA3NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacde256fd1fd5041b27a7a9869e43754d4013a6a25f8ec52a5a4d12634d414a46a
hovercard-subject-tagpull_request:2180962614
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/126853/files
twitter:imagehttps://avatars.githubusercontent.com/u/44627253?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/44627253?s=400&v=4
og:image:altHi this is my draft to remove the _PyOptimizer_NewCounter and _PyOptimizer_NewUOpOptimizer APIs, where the related tests are removed or skipped. For the most challenging _PyOptimizer_Optimize, I...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
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
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/126853/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F126853%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%2F126853%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/126853/files
Reloadhttps://github.com/python/cpython/pull/126853/files
Reloadhttps://github.com/python/cpython/pull/126853/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/126853/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/126853/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
brandtbucherhttps://github.com/brandtbucher
python:mainhttps://github.com/python/cpython/tree/main
xuantengh:remove-pyopt-apihttps://github.com/xuantengh/cpython/tree/remove-pyopt-api
Conversation 38 https://github.com/python/cpython/pull/126853
Commits 18 https://github.com/python/cpython/pull/126853/commits
Checks 55 https://github.com/python/cpython/pull/126853/checks
Files changed https://github.com/python/cpython/pull/126853/files
Please reload this pagehttps://github.com/python/cpython/pull/126853/files
gh-126599: Refactor the _PyOptimizer APIs https://github.com/python/cpython/pull/126853/files#top
Show all changes 18 commits https://github.com/python/cpython/pull/126853/files
a5bd3f1 remove `_PyOptimizer_NewCounter` xuantengh Nov 11, 2024 https://github.com/python/cpython/pull/126853/commits/a5bd3f1fa3a58431b66a2bb9514675e7e5f10e8b
a77915c remove uop optimize tests xuantengh Nov 15, 2024 https://github.com/python/cpython/pull/126853/commits/a77915c59ea5ec5971e8e244b6af8e5f32cca283
089f2b9 remove `_PyOptimizer_NewUOpOptimizer` xuantengh Nov 15, 2024 https://github.com/python/cpython/pull/126853/commits/089f2b91e8711dc66ebe6e6541dd6dce85782748
16681b0 revert commits xuantengh Nov 15, 2024 https://github.com/python/cpython/pull/126853/commits/16681b0758e3aae5e9c77b18f3a823062099535a
68dd2b1 add export explanation xuantengh Nov 15, 2024 https://github.com/python/cpython/pull/126853/commits/68dd2b1722275115f6aed147324c478b5ed711f5
f3542b6 remove `_PyCounterOptimizer_Type` and `_PyOptimizer_NewCounter` xuantengh Nov 23, 2024 https://github.com/python/cpython/pull/126853/commits/f3542b6a3542ace3b9915b0161af84e29d87b51b
d763008 📜🤖 Added by blurb_it. blurb-it[bot] Jan 1, 2025 https://github.com/python/cpython/pull/126853/commits/d763008466dc8938e0798658113338bc8006d15c
a7f9df3 remove `_INTERNAL_INCREMENT_OPT_COUNTER` xuantengh Jan 12, 2025 https://github.com/python/cpython/pull/126853/commits/a7f9df3129e06117ddc74969493307f959c7740d
44aa7ab remove `_PyCounterOptimizerObject` xuantengh Jan 12, 2025 https://github.com/python/cpython/pull/126853/commits/44aa7abee8211dc77a3e0f6826514c2495fd53af
0e96ecb remove misc. stuff xuantengh Jan 12, 2025 https://github.com/python/cpython/pull/126853/commits/0e96ecbddc3d4b0ea1479d05ddf40df654c3417b
ce188a4 Update Misc/NEWS.d/next/C_API/2025-01-01-03-25-38.gh-issue-126599.MRC… xuantengh Jan 12, 2025 https://github.com/python/cpython/pull/126853/commits/ce188a45498e600d05818a219af8abf87951d12d
949352e remove unnecessary comments xuantengh Jan 14, 2025 https://github.com/python/cpython/pull/126853/commits/949352ec46c801e9f9ce776dfaa7ccdd887e6054
46f0fa6 re-gen cases xuantengh Jan 14, 2025 https://github.com/python/cpython/pull/126853/commits/46f0fa62f85a6844d5020007055dd05647991c03
f0ffafd fix capi test failures xuantengh Jan 14, 2025 https://github.com/python/cpython/pull/126853/commits/f0ffafd95048bff0d1a920169c0ef546a90a1134
85580ca add decorator for required API xuantengh Jan 14, 2025 https://github.com/python/cpython/pull/126853/commits/85580ca8ed00d4099b112b8e719c795436c0a032
c3f4c6b Clean up the diff brandtbucher Jan 16, 2025 https://github.com/python/cpython/pull/126853/commits/c3f4c6bf5b6f5ddab8eae5e17b8b8058129795f7
fcb9d07 Fix some unused code warnings brandtbucher Jan 16, 2025 https://github.com/python/cpython/pull/126853/commits/fcb9d07234a4fbdc2095d1cf9f2a7db9b61dbd47
f67555f Catch up with main brandtbucher Jan 16, 2025 https://github.com/python/cpython/pull/126853/commits/f67555f7a52964e85c734d0fdc60390ecd5dd9cf
Clear filters https://github.com/python/cpython/pull/126853/files
Please reload this pagehttps://github.com/python/cpython/pull/126853/files
Please reload this pagehttps://github.com/python/cpython/pull/126853/files
pycore_optimizer.h https://github.com/python/cpython/pull/126853/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
pycore_uop_ids.h https://github.com/python/cpython/pull/126853/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
pycore_uop_metadata.h https://github.com/python/cpython/pull/126853/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
test_opt.py https://github.com/python/cpython/pull/126853/files#diff-67b5bd915e37f77df79907865982648172c27d3b96fbb072b30a73c6a2735439
test_monitoring.py https://github.com/python/cpython/pull/126853/files#diff-15fb0cb29709c04c449bacd69e4ab2208372424d8390c26258eb83b2363c3cf1
2025-01-01-03-25-38.gh-issue-126599.MRCYlH.rst https://github.com/python/cpython/pull/126853/files#diff-288176c4751fe8b838591388d4fea1a30854af42538a2c144547a3a1d035cffe
_testinternalcapi.c https://github.com/python/cpython/pull/126853/files#diff-687f4a736f1f6ad4b6cd4ff65c8e0113408304e8d65530dbd41b3f59a081a126
object.c https://github.com/python/cpython/pull/126853/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
bytecodes.c https://github.com/python/cpython/pull/126853/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
executor_cases.c.h https://github.com/python/cpython/pull/126853/files#diff-a1c3430c42a66c16e6d2e154491a6da993b187b27c628545a12a02c7b2a06b81
optimizer.c https://github.com/python/cpython/pull/126853/files#diff-de09f74c4306be5ef0284d665091976873569094d645a35b48467ea2a11d67f7
optimizer_cases.c.h https://github.com/python/cpython/pull/126853/files#diff-ed4567b3e67709ec57bf4df91ef058cfcbe00d7da11cd2a75e38241fa1ca99d2
ignored.tsv https://github.com/python/cpython/pull/126853/files#diff-fa2373a9a002e491408e623369773045f4b7de90114b9f5ba6933bfbf2d8c45c
Include/internal/pycore_optimizer.hhttps://github.com/python/cpython/pull/126853/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
View file https://github.com/xuantengh/cpython/blob/f67555f7a52964e85c734d0fdc60390ecd5dd9cf/Include/internal/pycore_optimizer.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/126853/{{ revealButtonHref }}
https://github.com/python/cpython/pull/126853/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/126853/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/126853/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/126853/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/126853/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
Include/internal/pycore_uop_ids.hhttps://github.com/python/cpython/pull/126853/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
View file https://github.com/xuantengh/cpython/blob/f67555f7a52964e85c734d0fdc60390ecd5dd9cf/Include/internal/pycore_uop_ids.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/126853/files
Include/internal/pycore_uop_metadata.hhttps://github.com/python/cpython/pull/126853/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
View file https://github.com/xuantengh/cpython/blob/f67555f7a52964e85c734d0fdc60390ecd5dd9cf/Include/internal/pycore_uop_metadata.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/126853/files
Please reload this pagehttps://github.com/python/cpython/pull/126853/files
Please reload this pagehttps://github.com/python/cpython/pull/126853/files
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.