René's URL Explorer Experiment


Title: Modernise code in `Tools/clinic/` · Issue #104683 · python/cpython · GitHub

Open Graph Title: Modernise code in `Tools/clinic/` · Issue #104683 · python/cpython

X Title: Modernise code in `Tools/clinic/` · Issue #104683 · python/cpython

Description: Feature or enhancement Modernise some Python anachronisms in Tools/clinic/, to make the code more readable and maintainable. Some things that can be easily done: Use dict instead of OrderedDict (#104647) Simplify code like this by using ...

Open Graph Description: Feature or enhancement Modernise some Python anachronisms in Tools/clinic/, to make the code more readable and maintainable. Some things that can be easily done: Use dict instead of OrderedDict (#1...

X Description: Feature or enhancement Modernise some Python anachronisms in Tools/clinic/, to make the code more readable and maintainable. Some things that can be easily done: Use dict instead of OrderedDict (#1...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Modernise code in `Tools/clinic/`","articleBody":"# Feature or enhancement\r\n\r\nModernise some Python anachronisms in `Tools/clinic/`, to make the code more readable and maintainable. Some things that can be easily done:\r\n\r\n- [x] Use `dict` instead of `OrderedDict` (#104647)\r\n- [x] Simplify code like this by using the `str.removesuffix` and `str.removeprefix` methods, both new in Python 3.9:\r\n  https://github.com/python/cpython/blob/06eeee97e36aa6bb3d21d7cbc288763ae3a7b21e/Tools/clinic/clinic.py#L2572-L2575\r\n\r\n  (#104685)\r\n- [x] [Pyupgrade](https://github.com/asottile/pyupgrade) (run using the `--py310-plus` setting) also finds various things that can be modernised (#104684)\r\n\r\n- [ ] Refactor CLanguage.output_templates (see https://github.com/python/cpython/issues/104683#issuecomment-1633266536)\r\n- [ ] Put templating in a separate .py file, kind of like Tools/clinic/cpp.py\r\n- [x] #107468\r\n- [x] #107467\r\n\r\nCc. @erlend-aasland\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-104647\r\n* gh-104684\r\n* gh-104685\r\n* gh-104696\r\n* gh-104729\r\n* gh-104730\r\n* gh-106362\r\n* gh-106443\r\n* gh-106444\r\n* gh-106445\r\n* gh-106476\r\n* gh-106477\r\n* gh-106478\r\n* gh-106652\r\n* gh-106698\r\n* gh-106721\r\n* gh-106837\r\n* gh-107289\r\n* gh-107340\r\n* gh-107435\r\n* gh-107439\r\n* gh-107541\n* gh-107543\n* gh-107550\n* gh-107551\n* gh-107556\n* gh-107623\n* gh-107635\n* gh-107638\n* gh-107667\n* gh-107770\n* gh-107771\n* gh-107790\n* gh-107840\n* gh-107964\n* gh-108092\n* gh-108552\n\u003c!-- /gh-linked-prs --\u003e","author":{"url":"https://github.com/AlexWaygood","@type":"Person","name":"AlexWaygood"},"datePublished":"2023-05-20T10:22:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/104683/cpython/issues/104683"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b2fbf597-29e9-7fe0-4474-e20477e0b49c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9726:2DB2A9:9A702B:D4BDB0:6969ED3B
html-safe-noncee8543b1ef2d46d5892db39e6eb78602a74245cd00990bb60c24dcf4efaeecd79
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzI2OjJEQjJBOTo5QTcwMkI6RDRCREIwOjY5NjlFRDNCIiwidmlzaXRvcl9pZCI6IjYyNzY3MzM4NzYwODAwNzgxMzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca40d148207a59429c937c638c73d780494d82430ba18acfd910b17837d60f962
hovercard-subject-tagissue:1718127348
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/104683/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3dc558a20a6eb6857df4b9e12f3c1ac088617c6916714348104f190299ff5beb/python/cpython/issues/104683
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3dc558a20a6eb6857df4b9e12f3c1ac088617c6916714348104f190299ff5beb/python/cpython/issues/104683
og:image:altFeature or enhancement Modernise some Python anachronisms in Tools/clinic/, to make the code more readable and maintainable. Some things that can be easily done: Use dict instead of OrderedDict (#1...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAlexWaygood
hostnamegithub.com
expected-hostnamegithub.com
None7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8
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
releasebdde15ad1b403e23b08bbd89b53fbe6bdf688cad
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/104683#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F104683
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%2F104683
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/104683
Reloadhttps://github.com/python/cpython/issues/104683
Reloadhttps://github.com/python/cpython/issues/104683
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/104683
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/104683
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/104683
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/104683
Modernise code in Tools/clinic/https://github.com/python/cpython/issues/104683#top
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/AlexWaygood
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on May 20, 2023https://github.com/python/cpython/issues/104683#issue-1718127348
gh-104683: Argument clinic: use dict over OrderedDict #104647https://github.com/python/cpython/pull/104647
cpython/Tools/clinic/clinic.pyhttps://github.com/python/cpython/blob/06eeee97e36aa6bb3d21d7cbc288763ae3a7b21e/Tools/clinic/clinic.py#L2572-L2575
06eeee9https://github.com/python/cpython/commit/06eeee97e36aa6bb3d21d7cbc288763ae3a7b21e
gh-104683: Modernise clinic.py using str.removeprefix and str.removesuffix #104685https://github.com/python/cpython/pull/104685
Pyupgradehttps://github.com/asottile/pyupgrade
gh-104683: Modernise Tools/clinic/ using pyupgrade #104684https://github.com/python/cpython/pull/104684
Modernise code in Tools/clinic/ #104683 (comment)https://github.com/python/cpython/issues/104683#issuecomment-1633266536
Rework Argument Clinic error handling #107468https://github.com/python/cpython/issues/107468
Restructure Argument Clinic CLI #107467https://github.com/python/cpython/issues/107467
@erlend-aaslandhttps://github.com/erlend-aasland
gh-104683: Argument clinic: use dict over OrderedDict #104647https://github.com/python/cpython/pull/104647
gh-104683: Modernise Tools/clinic/ using pyupgrade #104684https://github.com/python/cpython/pull/104684
gh-104683: Modernise clinic.py using str.removeprefix and str.removesuffix #104685https://github.com/python/cpython/pull/104685
gh-104683: clinic.py: Modernise parse_converter() using pattern-matching #104696https://github.com/python/cpython/pull/104696
gh-104683: clinic.py: Improve coverage for the parse_converter method #104729https://github.com/python/cpython/pull/104729
[3.11] gh-104683: clinic.py: Improve coverage for the parse_converter method (#104729) #104730https://github.com/python/cpython/pull/104730
gh-104683: Modernise Argument Clinic parameter state machine #106362https://github.com/python/cpython/pull/106362
gh-104683: Rename clinic.test => clinic.test.c #106443https://github.com/python/cpython/pull/106443
[3.12] gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443) #106444https://github.com/python/cpython/pull/106444
[3.11] gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443) #106445https://github.com/python/cpython/pull/106445
gh-104683: clinic.py: refactor four simple classes as dataclasses #106476https://github.com/python/cpython/pull/106476
gh-104683: clinic.py: refactor Parameter and Function as dataclasses #106477https://github.com/python/cpython/pull/106477
gh-104683: clinic.py: Don't needlessly reimplement contextlib.redirect_stdout #106478https://github.com/python/cpython/pull/106478
gh-104683: Argument clinic: Minor readability improvements for Destination.__init__ #106652https://github.com/python/cpython/pull/106652
gh-104683: Argument clinic: modernise cpp.Monitor #106698https://github.com/python/cpython/pull/106698
gh-104683: Argument clinic: use an enum to describe the different kinds of functions #106721https://github.com/python/cpython/pull/106721
gh-104683: Argument Clinic: Modernise parse_special_symbol() #106837https://github.com/python/cpython/pull/106837
gh-104683: Argument Clinic: Make most arguments to Class and Function required #107289https://github.com/python/cpython/pull/107289
gh-104683: Argument clinic: cleanup state_modulename_name() #107340https://github.com/python/cpython/pull/107340
gh-104683: Argument clinic: pass clinic as a parameter where possible #107435https://github.com/python/cpython/pull/107435
gh-104683: Argument clinic: Make the filename parameter to Clinic required #107439https://github.com/python/cpython/pull/107439
gh-104683: Argument clinic: remove the LandMine class #107541https://github.com/python/cpython/pull/107541
gh-104683: Argument clinic: cleanup DLSParser state_foo methods #107543https://github.com/python/cpython/pull/107543
gh-104683: Argument Clinic: Refactor and simplify 'add docstring' states #107550https://github.com/python/cpython/pull/107550
gh-104683: Rework Argument Clinic error handling #107551https://github.com/python/cpython/pull/107551
gh-104683: Make Argument Clinic template strings class level members #107556https://github.com/python/cpython/pull/107556
gh-104683: Argument Clinic: refactor format_docstring() #107623https://github.com/python/cpython/pull/107623
gh-104683: Argument clinic: remove some unnecessary uses of self.next() in the DSLParser #107635https://github.com/python/cpython/pull/107635
gh-104683: Argument Clinic: Use CConverter.length_name where possible #107638https://github.com/python/cpython/pull/107638
gh-104683: Improve consistency and test coverage of argument-clinic __repr__ functions #107667https://github.com/python/cpython/pull/107667
gh-104683: Add --exclude option to Argument Clinic CLI #107770https://github.com/python/cpython/pull/107770
gh-104683: Remove unused variables from Tools/clinic and tests for Tools/clinic #107771https://github.com/python/cpython/pull/107771
gh-104683: Argument Clinic: Params now render their own docstrings #107790https://github.com/python/cpython/pull/107790
gh-104683: Argument clinic: make format_docstring() a method on Function objects #107840https://github.com/python/cpython/pull/107840
gh-104683: Argument Clinic: Extract parse_function_names() helper #107964https://github.com/python/cpython/pull/107964
gh-104683: Argument Clinic: Remove unreachable code from _module_and_class() #108092https://github.com/python/cpython/pull/108092
gh-104683: Argument Clinic: Refactor the module and class resolver #108552https://github.com/python/cpython/pull/108552
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.