René's URL Explorer Experiment


Title: Argument Clinic: split out global stateless helpers and constants from clinic.py · Issue #113317 · python/cpython · GitHub

Open Graph Title: Argument Clinic: split out global stateless helpers and constants from clinic.py · Issue #113317 · python/cpython

X Title: Argument Clinic: split out global stateless helpers and constants from clinic.py · Issue #113317 · python/cpython

Description: Feature or enhancement clinic.py has a lot of globals in various forms. Getting rid of the globals will make it possible to split out clinic.py in multiple files (#113299). Combined, this will impact readability and maintainability of Ar...

Open Graph Description: Feature or enhancement clinic.py has a lot of globals in various forms. Getting rid of the globals will make it possible to split out clinic.py in multiple files (#113299). Combined, this will impa...

X Description: Feature or enhancement clinic.py has a lot of globals in various forms. Getting rid of the globals will make it possible to split out clinic.py in multiple files (#113299). Combined, this will impa...

Opengraph URL: https://github.com/python/cpython/issues/113317

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Argument Clinic: split out global stateless helpers and constants from clinic.py","articleBody":"# Feature or enhancement\n\n`clinic.py` has a lot of globals in various forms. Getting rid of the globals will make it possible to split out `clinic.py` in multiple files (https://github.com/python/cpython/issues/113299). Combined, this will impact readability and maintainability of Argument Clinic in a positive way.\n\nMost globals can be easily dealt with. We can structure them into two groups:\n- global constants that are not mutated\n- stateless helper functions and classes\n\nIt can make sense split out some of these in separate files (for example a libclinic package, as suggested in #113309). For some globals, it makes more sense to embed them into one of the existing classes (for example the global `version` variable clearly belongs in `DSLParser`).\n\nSuggesting to start with the following:\n\n- move stateless text accumulator helpers into a `Tools/clinic/libclinic/accumulators.py` file\n- move stateless text formatting helpers into a `Tools/clinic/libclinic/formatters.py` file\n- move `version` into `DSLParser` and version helper into a `Tools/clinic/libclinic/version.py` file\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-113402\n* gh-113413\n* gh-113414\n* gh-113438\n* gh-113525\n* gh-113986\n* gh-114066\n* gh-114319\n* gh-114324\n* gh-114330\n* gh-114752\n* gh-115369\n* gh-115370\n* gh-115371\n* gh-115510\n* gh-115513\n* gh-115517\n* gh-115518\n* gh-115520\n* gh-115522\n* gh-116770\n* gh-116807\n* gh-116819\n* gh-116821\n* gh-116836\n* gh-116853\n* gh-117315\n* gh-117451\n* gh-117455\n* gh-117513\n* gh-117533\n* gh-117624\n* gh-117626\n* gh-117707\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/erlend-aasland","@type":"Person","name":"erlend-aasland"},"datePublished":"2023-12-20T12:45:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/113317/cpython/issues/113317"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fd755cad-b742-810e-0747-ca84405bd834
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAE7C:1940BA:1022049:1588EDF:69699267
html-safe-noncee33441ecf9890e4ec99458fe0fadccc52ef84c1678c22f54ee138bd097f71c36
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTdDOjE5NDBCQToxMDIyMDQ5OjE1ODhFREY6Njk2OTkyNjciLCJ2aXNpdG9yX2lkIjoiMTI4MTcyNTg4MzM2NTI5ODc5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac48e00f2ce8217ba8e52380ae68684b748226339061be9aae63dbcc18270403b1
hovercard-subject-tagissue:2050482755
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/113317/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d3ae4f37c32925c3738ba4e6ace826dcb4f72cc8daf195a4b2c246a7d3c7be65/python/cpython/issues/113317
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d3ae4f37c32925c3738ba4e6ace826dcb4f72cc8daf195a4b2c246a7d3c7be65/python/cpython/issues/113317
og:image:altFeature or enhancement clinic.py has a lot of globals in various forms. Getting rid of the globals will make it possible to split out clinic.py in multiple files (#113299). Combined, this will impa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameerlend-aasland
hostnamegithub.com
expected-hostnamegithub.com
None3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751
turbo-cache-controlno-preview
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
releaseaf80af7cc9e3de9c336f18b208a600950a3c187c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/113317#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F113317
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%2Fissues%2F113317
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/113317
Reloadhttps://github.com/python/cpython/issues/113317
Reloadhttps://github.com/python/cpython/issues/113317
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/113317
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/issues/113317
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/113317
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/113317
#117513https://github.com/python/cpython/pull/117513
Argument Clinic: split out global stateless helpers and constants from clinic.pyhttps://github.com/python/cpython/issues/113317#top
#117513https://github.com/python/cpython/pull/117513
topic-argument-clinichttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-argument-clinic%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/erlend-aasland
https://github.com/erlend-aasland
erlend-aaslandhttps://github.com/erlend-aasland
on Dec 20, 2023https://github.com/python/cpython/issues/113317#issue-2050482755
#113299https://github.com/python/cpython/issues/113299
#113309https://github.com/python/cpython/pull/113309
gh-113317: Argument Clinic: tear out internal text accumulator APIs #113402https://github.com/python/cpython/pull/113402
gh-113317: Remove TextAccumulator type alias from clinic.py #113413https://github.com/python/cpython/pull/113413
gh-113317: Clean up Argument Clinic global namespace #113414https://github.com/python/cpython/pull/113414
gh-113317: Move more formatting helpers into libclinic #113438https://github.com/python/cpython/pull/113438
gh-113317: Rework Argument Clinic cpp.py error handling #113525https://github.com/python/cpython/pull/113525
gh-113317: Move global utility functions into libclinic #113986https://github.com/python/cpython/pull/113986
gh-113317: Move FormatCounterFormatter into libclinic #114066https://github.com/python/cpython/pull/114066
gh-113317: Pass clinic to AC parse_arg() methods #114319https://github.com/python/cpython/pull/114319
gh-113317: AC converter: Use add_include() in bad_argument() #114324https://github.com/python/cpython/pull/114324
gh-113317: Don't use global clinic instance in bad_argument() #114330https://github.com/python/cpython/pull/114330
gh-113317: Remove Argument Clinic global variable 'clinic' #114752https://github.com/python/cpython/pull/114752
gh-113317, Argument Clinic: Add BlockParser.fail() method #115369https://github.com/python/cpython/pull/115369
gh-113317, Argument Clinic: Add DSLParser.fail() method #115370https://github.com/python/cpython/pull/115370
gh-113317, Argument Clinic: Add Clinic.fail() method #115371https://github.com/python/cpython/pull/115371
gh-113317: Argument Clinic: don't use global state in warn() and fail() #115510https://github.com/python/cpython/pull/115510
gh-113317: Argument Clinic: don't use fail() in CLI #115513https://github.com/python/cpython/pull/115513
gh-113317: Argument Clinic: remove global clinic instance #115517https://github.com/python/cpython/pull/115517
gh-113317: Argument Clinic: move linear_format into libclinic #115518https://github.com/python/cpython/pull/115518
gh-113317: Argument Clinic: move C/Py identifier helpers into libclinic #115520https://github.com/python/cpython/pull/115520
gh-113317: Argument Clinic: inline required_type_for_self_for_parser() in self converter #115522https://github.com/python/cpython/pull/115522
gh-113317: Move warn() and fail() to libclinic.utils #116770https://github.com/python/cpython/pull/116770
gh-113317: Argument Clinic: Add libclinic.function #116807https://github.com/python/cpython/pull/116807
gh-113317: Add libclinic.block_parser and libclinic.language modules #116819https://github.com/python/cpython/pull/116819
gh-113317: Add libclinic.converter and libclinic.crenderdata modules #116821https://github.com/python/cpython/pull/116821
gh-113317: Move Argument Clinic converters to sub-modules #116836https://github.com/python/cpython/pull/116836
gh-113317: Change how Argument Clinic lists converters #116853https://github.com/python/cpython/pull/116853
gh-113317: Argument Clinic: Add libclinic.converters module #117315https://github.com/python/cpython/pull/117315
gh-113317: Argument Clinic: Add libclinic.return_converters #117451https://github.com/python/cpython/pull/117451
gh-113317: Argument Clinic: Add libclinic.clanguage #117455https://github.com/python/cpython/pull/117455
gh-113317: Finish splitting Argument Clinic into sub-files #117513https://github.com/python/cpython/pull/117513
gh-113317: Rename libclinic to argclinic #117533https://github.com/python/cpython/pull/117533
gh-113317: Remove unused INVALID constant in Argument Clinic #117624https://github.com/python/cpython/pull/117624
gh-113317: Add Codegen class to Argument Clinic #117626https://github.com/python/cpython/pull/117626
gh-113317: Add ParseArgsCodeGen class #117707https://github.com/python/cpython/pull/117707
topic-argument-clinichttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-argument-clinic%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
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.