René's URL Explorer Experiment


Title: Remove the 2to3 program and the lib2to3 module · Issue #104780 · python/cpython · GitHub

Open Graph Title: Remove the 2to3 program and the lib2to3 module · Issue #104780 · python/cpython

X Title: Remove the 2to3 program and the lib2to3 module · Issue #104780 · python/cpython

Description: The 2to3 program is implemented with the lib2to3 module which implements a parser of the Python language. Problem: this parser is unable to parse Python 3.10 grammar :-( This issue was already known in Python 3.9 when PEP 617 – New PEG p...

Open Graph Description: The 2to3 program is implemented with the lib2to3 module which implements a parser of the Python language. Problem: this parser is unable to parse Python 3.10 grammar :-( This issue was already know...

X Description: The 2to3 program is implemented with the lib2to3 module which implements a parser of the Python language. Problem: this parser is unable to parse Python 3.10 grammar :-( This issue was already know...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove the 2to3 program and the lib2to3 module","articleBody":"The 2to3 program is implemented with the lib2to3 module which implements a parser of the Python language. Problem: this parser is unable to parse Python 3.10 grammar :-( This issue was already known in Python 3.9 when [PEP 617 – New PEG parser for CPython](https://peps.python.org/pep-0617/) was approved.\r\n\r\nThe 2to3 program and the lib2to3 were marked as \"pending\" deprecated since Python 3.9, and then officially deprecated in Python 3.11 (``import lib2to3`` emits a ``DeprecationWarning``).\r\n\r\nOne of a famous user of lib2to3 was the [black project](https://github.com/psf/black) but they decided to fork lib2to3 and their fork was made compatible with Python 3.10 grammar (maybe also Python 3.11).\r\n\r\nI propose to remove 2to3 and lib2to3 at the beginning of the Python 3.13 development cycle to give users more time to be prepared for this incompatible change before Python 3.13 final release (scheduled in October 2024).\r\n\r\ncc @isidentical @lysnikolaou @pablogsal @ambv \r\n\r\n---\r\n\r\nExample of valid Python script (``script.py``:\r\n\r\n```py\r\nwith (open(__file__) as fp): data=fp.read()\r\nprint(len(data))\r\n```\r\n\r\nIt works well on Python 3.11:\r\n\r\n```\r\n$ python3.11 script.py \r\n61\r\n```\r\n\r\nBut lib2to3 is unable to parse it:\r\n\r\n```\r\n$ python3.11 -m lib2to3 script.py \r\n(...)\r\nRefactoringTool: No files need to be modified.\r\nRefactoringTool: There was 1 error:\r\nRefactoringTool: Can't parse script.py: ParseError: bad input: type=1, value='as', context=(' ', (1, 21))\r\n```\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-104781\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-05-23T01:36:02Z","url":"https://github.com/python/cpython/issues/104780"}

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/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bbf94ac2-9564-9348-68a3-948bf969cf15
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCF6A:16E4ED:19110C4:1F530B3:6B0269A0
html-safe-nonce40c30b9f860b844103ebe3d4b8f2eed56950f282d5bb7e6904df35a1ac99ec5f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjZBOjE2RTRFRDoxOTExMEM0OjFGNTMwQjM6NkIwMjY5QTAiLCJ2aXNpdG9yX2lkIjoiNzM5Njg4ODk1NDk1MzQyNzM2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac688a59c2393911d8fc464b46bc4a17cc3da3cca9d20f114569bdb8869ac44066
hovercard-subject-tagissue:1720983177
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/104780/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a916f908b8f3e546c07aa24f63a064354c728dc102f6c8451d6ed6e722dc7b06/python/cpython/issues/104780
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a916f908b8f3e546c07aa24f63a064354c728dc102f6c8451d6ed6e722dc7b06/python/cpython/issues/104780
og:image:altThe 2to3 program is implemented with the lib2to3 module which implements a parser of the Python language. Problem: this parser is unable to parse Python 3.10 grammar :-( This issue was already know...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/104780#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F104780
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%2Fissues%2F104780
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/104780
Reloadhttps://github.com/python/cpython/issues/104780
Reloadhttps://github.com/python/cpython/issues/104780
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/104780
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/104780
Remove the 2to3 program and the lib2to3 modulehttps://github.com/python/cpython/issues/104780#top
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on May 23, 2023https://github.com/python/cpython/issues/104780#issue-1720983177
PEP 617 – New PEG parser for CPythonhttps://peps.python.org/pep-0617/
black projecthttps://github.com/psf/black
@isidenticalhttps://github.com/isidentical
@lysnikolaouhttps://github.com/lysnikolaou
@pablogsalhttps://github.com/pablogsal
@ambvhttps://github.com/ambv
gh-104780: Remove 2to3 program and lib2to3 module #104781https://github.com/python/cpython/pull/104781
vstinnerhttps://github.com/vstinner
on May 23, 2023https://github.com/python/cpython/issues/104780#event-9309699123
pythongh-104780: Remove 2to3 program and lib2to3 modulehttps://github.com/vstinner/cpython/commit/e1ffa37e6e7030c44e200c34cc6ea2550f43a15c
pythongh-104780https://github.com/python/cpython/issues/104780
e1ffa37https://github.com/vstinner/cpython/commit/e1ffa37e6e7030c44e200c34cc6ea2550f43a15c
gh-104780: Remove 2to3 program and lib2to3 module (#104781)https://github.com/python/cpython/commit/ae00b810d1d3ad7f1f7e226b02ece37c986330e7
gh-104780https://github.com/python/cpython/issues/104780
#104781https://github.com/python/cpython/pull/104781
ae00b81https://github.com/python/cpython/commit/ae00b810d1d3ad7f1f7e226b02ece37c986330e7
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on May 23, 2023https://github.com/python/cpython/issues/104780#issuecomment-1559881512
ae00b81https://github.com/python/cpython/commit/ae00b810d1d3ad7f1f7e226b02ece37c986330e7
https://github.com/hugovk
hugovkhttps://github.com/hugovk
on May 23, 2023https://github.com/python/cpython/issues/104780#issuecomment-1560076291
https://private-user-images.githubusercontent.com/1324225/240410532-4c383498-7d8c-436e-9d6b-538eec208e87.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTUzMjA1MjQsIm5iZiI6MTc5NTMyMDIyNCwicGF0aCI6Ii8xMzI0MjI1LzI0MDQxMDUzMi00YzM4MzQ5OC03ZDhjLTQzNmUtOWQ2Yi01MzhlZWMyMDhlODcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEyMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMjJUMDQwMzQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjgxNDJjZDY5ZGQ5NmIzNDI4MzE0YWI2NzNkMDQ3MDM1NDI3MTc2NzUyNjIxZGFmOWI4N2NiZDJmOWM5OGNlZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.O-eUI2u_MipqkQLPriDWmJ-oAR50ghB46Vof1i4uayo
hugovkhttps://github.com/hugovk
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 23, 2023https://github.com/python/cpython/issues/104780#event-9320436788
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on May 24, 2023https://github.com/python/cpython/issues/104780#issuecomment-1560858682
#84540https://github.com/python/cpython/issues/84540
DenisDupeyronhttps://github.com/DenisDupeyron
on Aug 30, 2024https://github.com/python/cpython/issues/104780#event-14072687916
2to3 was removed from Python 3.13 (python/cpython#104780)https://github.com/AnacondaRecipes/python-feedstock/commit/c14463e5d2f8cc75690d53580ead92c1455bf6ab
python/cpython#104780https://github.com/python/cpython/issues/104780
c14463ehttps://github.com/AnacondaRecipes/python-feedstock/commit/c14463e5d2f8cc75690d53580ead92c1455bf6ab
2to3 was removed from Python 3.13 (python/cpython#104780)https://github.com/anaconda-graveyard/py313t-recipes/commit/35568a6bef83956b5d39a0486900931b99ba191d
python/cpython#104780https://github.com/python/cpython/issues/104780
35568a6https://github.com/anaconda-graveyard/py313t-recipes/commit/35568a6bef83956b5d39a0486900931b99ba191d
Merge pull request #22 from anaconda/2to3_was_removedhttps://github.com/anaconda-graveyard/py313t-recipes/commit/5a7e76ef00287b215ce44d64846e5eff00a83e56
#22https://github.com/anaconda-graveyard/py313t-recipes/pull/22
5a7e76ehttps://github.com/anaconda-graveyard/py313t-recipes/commit/5a7e76ef00287b215ce44d64846e5eff00a83e56
cbousshttps://github.com/cbouss
on Sep 19, 2024https://github.com/python/cpython/issues/104780#event-14330257637
2to3 was removed from Python 3.13 (python/cpython#104780)https://github.com/AnacondaRecipes/python-feedstock/commit/888057992c3c15c9e734d763fc3aedc3d390f07b
python/cpython#104780https://github.com/python/cpython/issues/104780
8880579https://github.com/AnacondaRecipes/python-feedstock/commit/888057992c3c15c9e734d763fc3aedc3d390f07b
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/104780
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/104780
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.