René's URL Explorer Experiment


Title: String annotations [PEP 563] by gvanrossum · Pull Request #4390 · python/cpython · GitHub

Open Graph Title: String annotations [PEP 563] by gvanrossum · Pull Request #4390 · python/cpython

X Title: String annotations [PEP 563] by gvanrossum · Pull Request #4390 · python/cpython

Description: This is unfinished work by @ambv. UPDATE: this is ready for review now. I'm adding it here because patching and reviewing are easier (for me anyway) when it's in PR form. Also, @serhiy-storchaka your eye would be appreciated, esp. for the hairy AST unparsing code in C. (Also, if you had to do this from scratch, would it be easier to unparse the CST instead?)

Open Graph Description: This is unfinished work by @ambv. UPDATE: this is ready for review now. I'm adding it here because patching and reviewing are easier (for me anyway) when it's in PR form. Also, @serhiy-stor...

X Description: This is unfinished work by @ambv. UPDATE: this is ready for review now. I'm adding it here because patching and reviewing are easier (for me anyway) when it's in PR form. Also, @ser...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0465353a-cc44-db2e-b36a-e733b5de849a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA37C:24C6EB:BD95DF:107DC6D:6A4CA515
html-safe-nonce7d375a0a0b281792e52289a2f43573d92c5caead38ca853f9751f22444d5750f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzdDOjI0QzZFQjpCRDk1REY6MTA3REM2RDo2QTRDQTUxNSIsInZpc2l0b3JfaWQiOiI4MTAyMTg2MjU3ODM0ODc4MjMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3cfff897ccf130e776b70361c58d4074f5665804a9041b0d860ebd0a0af652a6
hovercard-subject-tagpull_request:152386418
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/4390/files
twitter:imagehttps://avatars.githubusercontent.com/u/2894642?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/2894642?s=400&v=4
og:image:altThis is unfinished work by @ambv. UPDATE: this is ready for review now. I'm adding it here because patching and reviewing are easier (for me anyway) when it's in PR form. Also, @serhiy-stor...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
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
releaseae90d426644ca15e89bacceb72e51f4e9dbf85f7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/4390/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F4390%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
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%2F4390%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/4390/files
Reloadhttps://github.com/python/cpython/pull/4390/files
Reloadhttps://github.com/python/cpython/pull/4390/files
Please reload this pagehttps://github.com/python/cpython/pull/4390/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/4390/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality 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
ambvhttps://github.com/ambv
python:masterhttps://github.com/python/cpython/tree/master
ambv:string_annotationshttps://github.com/ambv/cpython/tree/string_annotations
Conversation 99 https://github.com/python/cpython/pull/4390
Commits 7 https://github.com/python/cpython/pull/4390/commits
Checks 0 https://github.com/python/cpython/pull/4390/checks
Files changed https://github.com/python/cpython/pull/4390/files
Please reload this pagehttps://github.com/python/cpython/pull/4390/files
String annotations [PEP 563] https://github.com/python/cpython/pull/4390/files#top
Show all changes 7 commits https://github.com/python/cpython/pull/4390/files
1a87ea0 Document `from __future__ import annotations` (PEP 563) ambv Nov 10, 2017 https://github.com/python/cpython/pull/4390/commits/1a87ea015adf9fb93a836d85e710f9512eff1fcb
863d3e9 Plumbing for `from __future__ import annotations` (PEP 563) ambv Nov 10, 2017 https://github.com/python/cpython/pull/4390/commits/863d3e986fd0beec767383c302b06dd59436938f
bc3ad37 Implement unparsing the AST back to string form ambv Nov 10, 2017 https://github.com/python/cpython/pull/4390/commits/bc3ad37b1ca035752f567f978bf7933cf708fe2e
7f88115 Response to Serhiy's review Dec 5, 2017 https://github.com/python/cpython/pull/4390/commits/7f88115354474dafa8f613bca31e988e8e129926
08f8600 Strings are no longer treated special Dec 31, 2017 https://github.com/python/cpython/pull/4390/commits/08f86007bae1f0df2b4cbf5e76ec46f3c73746ac
de9e5b0 f-string support ambv Jan 15, 2018 https://github.com/python/cpython/pull/4390/commits/de9e5b0f1bde23db138c8d1dcf0dcec31b321b7b
26c028c compatibility typo ambv Jan 25, 2018 https://github.com/python/cpython/pull/4390/commits/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9
Clear filters https://github.com/python/cpython/pull/4390/files
Please reload this pagehttps://github.com/python/cpython/pull/4390/files
Please reload this pagehttps://github.com/python/cpython/pull/4390/files
glossary.rst https://github.com/python/cpython/pull/4390/files#diff-dfb52ee6e68075f904da6e69ed1799c5cbf1185c279968a807787d69ae2e8cf5
__future__.rst https://github.com/python/cpython/pull/4390/files#diff-bb3db12ff0f8bef295cbe2b35e380f26a0bf786c620a4c1878acb1358803748e
compound_stmts.rst https://github.com/python/cpython/pull/4390/files#diff-69b471d7b4c517d310ecacad8e8e432ad39b3942cb1563978b1c275f597c20e1
simple_stmts.rst https://github.com/python/cpython/pull/4390/files#diff-300d3fafb76c1066e44118597e6707da9b20127b7b3a1fe35668f5c41c69e0a5
3.7.rst https://github.com/python/cpython/pull/4390/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
ast.h https://github.com/python/cpython/pull/4390/files#diff-7c3c568e9794cb71a223e769e66651a6937755cc11c2358f1b12833d8c830ac2
code.h https://github.com/python/cpython/pull/4390/files#diff-ab1c1da70125ebbd506d8894d03af0deb9c479a4a96c52fbaf05780756930692
compile.h https://github.com/python/cpython/pull/4390/files#diff-64790e61aa74dc187bc9da9e0c83e3753e1384adc1e4824dc79e67c13163dc96
__future__.py https://github.com/python/cpython/pull/4390/files#diff-eb46a68cfb368cc943fe36ad91dba3692682ab4454221fefd6abab8757682ab0
test_future.py https://github.com/python/cpython/pull/4390/files#diff-1c66f879de5afb6dc7a9febdd7e51b8676b7d4536ae70149fc6616bd1392c7e8
Makefile.pre.in https://github.com/python/cpython/pull/4390/files#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
pythoncore.vcxproj https://github.com/python/cpython/pull/4390/files#diff-4295039788386c2986b811f2a6b59cf088be59822b24b4f1243c9e9b184f65fb
pythoncore.vcxproj.filters https://github.com/python/cpython/pull/4390/files#diff-9e715828befc9c50c8b483b06d4923cda0db44f57d0c20e6a6d428ba60bfa0c5
ast_unparse.c https://github.com/python/cpython/pull/4390/files#diff-d205bb48a85c9457b46a402a19e66c18860590b7ea8b55ae4da704444f433dba
compile.c https://github.com/python/cpython/pull/4390/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
future.c https://github.com/python/cpython/pull/4390/files#diff-dd2b2c4b437189e677979328b2325d2c184b26d1e0c903be6d14458f5c02ee17
Doc/glossary.rsthttps://github.com/python/cpython/pull/4390/files#diff-dfb52ee6e68075f904da6e69ed1799c5cbf1185c279968a807787d69ae2e8cf5
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Doc/glossary.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-dfb52ee6e68075f904da6e69ed1799c5cbf1185c279968a807787d69ae2e8cf5
https://github.com/python/cpython/pull/4390/files#diff-dfb52ee6e68075f904da6e69ed1799c5cbf1185c279968a807787d69ae2e8cf5
https://github.com/python/cpython/pull/4390/files#diff-dfb52ee6e68075f904da6e69ed1799c5cbf1185c279968a807787d69ae2e8cf5
https://github.com/python/cpython/pull/4390/files#diff-dfb52ee6e68075f904da6e69ed1799c5cbf1185c279968a807787d69ae2e8cf5
Doc/library/__future__.rsthttps://github.com/python/cpython/pull/4390/files#diff-bb3db12ff0f8bef295cbe2b35e380f26a0bf786c620a4c1878acb1358803748e
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Doc/library/__future__.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-bb3db12ff0f8bef295cbe2b35e380f26a0bf786c620a4c1878acb1358803748e
https://github.com/python/cpython/pull/4390/files#diff-bb3db12ff0f8bef295cbe2b35e380f26a0bf786c620a4c1878acb1358803748e
Doc/reference/compound_stmts.rsthttps://github.com/python/cpython/pull/4390/files#diff-69b471d7b4c517d310ecacad8e8e432ad39b3942cb1563978b1c275f597c20e1
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Doc/reference/compound_stmts.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-69b471d7b4c517d310ecacad8e8e432ad39b3942cb1563978b1c275f597c20e1
https://github.com/python/cpython/pull/4390/files#diff-69b471d7b4c517d310ecacad8e8e432ad39b3942cb1563978b1c275f597c20e1
https://github.com/python/cpython/pull/4390/files#diff-69b471d7b4c517d310ecacad8e8e432ad39b3942cb1563978b1c275f597c20e1
Doc/reference/simple_stmts.rsthttps://github.com/python/cpython/pull/4390/files#diff-300d3fafb76c1066e44118597e6707da9b20127b7b3a1fe35668f5c41c69e0a5
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Doc/reference/simple_stmts.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-300d3fafb76c1066e44118597e6707da9b20127b7b3a1fe35668f5c41c69e0a5
https://github.com/python/cpython/pull/4390/files#diff-300d3fafb76c1066e44118597e6707da9b20127b7b3a1fe35668f5c41c69e0a5
Doc/whatsnew/3.7.rsthttps://github.com/python/cpython/pull/4390/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Doc/whatsnew/3.7.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
https://github.com/python/cpython/pull/4390/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
Include/ast.hhttps://github.com/python/cpython/pull/4390/files#diff-7c3c568e9794cb71a223e769e66651a6937755cc11c2358f1b12833d8c830ac2
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Include/ast.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-7c3c568e9794cb71a223e769e66651a6937755cc11c2358f1b12833d8c830ac2
https://github.com/python/cpython/pull/4390/files#diff-7c3c568e9794cb71a223e769e66651a6937755cc11c2358f1b12833d8c830ac2
Include/code.hhttps://github.com/python/cpython/pull/4390/files#diff-ab1c1da70125ebbd506d8894d03af0deb9c479a4a96c52fbaf05780756930692
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Include/code.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-ab1c1da70125ebbd506d8894d03af0deb9c479a4a96c52fbaf05780756930692
https://github.com/python/cpython/pull/4390/files#diff-ab1c1da70125ebbd506d8894d03af0deb9c479a4a96c52fbaf05780756930692
Include/compile.hhttps://github.com/python/cpython/pull/4390/files#diff-64790e61aa74dc187bc9da9e0c83e3753e1384adc1e4824dc79e67c13163dc96
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Include/compile.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-64790e61aa74dc187bc9da9e0c83e3753e1384adc1e4824dc79e67c13163dc96
https://github.com/python/cpython/pull/4390/files#diff-64790e61aa74dc187bc9da9e0c83e3753e1384adc1e4824dc79e67c13163dc96
https://github.com/python/cpython/pull/4390/files#diff-64790e61aa74dc187bc9da9e0c83e3753e1384adc1e4824dc79e67c13163dc96
https://github.com/python/cpython/pull/4390/files#diff-64790e61aa74dc187bc9da9e0c83e3753e1384adc1e4824dc79e67c13163dc96
Lib/__future__.pyhttps://github.com/python/cpython/pull/4390/files#diff-eb46a68cfb368cc943fe36ad91dba3692682ab4454221fefd6abab8757682ab0
View file https://github.com/ambv/cpython/blob/26c028c3356eea73b3c7b8c7bf02ee272beb1ef9/Lib/__future__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4390/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4390/files#diff-eb46a68cfb368cc943fe36ad91dba3692682ab4454221fefd6abab8757682ab0
https://github.com/python/cpython/pull/4390/files#diff-eb46a68cfb368cc943fe36ad91dba3692682ab4454221fefd6abab8757682ab0
https://github.com/python/cpython/pull/4390/files#diff-eb46a68cfb368cc943fe36ad91dba3692682ab4454221fefd6abab8757682ab0
https://github.com/python/cpython/pull/4390/files#diff-eb46a68cfb368cc943fe36ad91dba3692682ab4454221fefd6abab8757682ab0
Please reload this pagehttps://github.com/python/cpython/pull/4390/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.