René's URL Explorer Experiment


Title: Only plain literals should be parsed · Issue #97 · google/python-fire · GitHub

Open Graph Title: Only plain literals should be parsed · Issue #97 · google/python-fire

X Title: Only plain literals should be parsed · Issue #97 · google/python-fire

Description: @dbieber correctly pointed out in #95 that there is a more general problem with the parsing code. This is a follow up issue to that issue which only dealt with the most common case of a single argument. Here are some cases demonstrating ...

Open Graph Description: @dbieber correctly pointed out in #95 that there is a more general problem with the parsing code. This is a follow up issue to that issue which only dealt with the most common case of a single argu...

X Description: @dbieber correctly pointed out in #95 that there is a more general problem with the parsing code. This is a follow up issue to that issue which only dealt with the most common case of a single argu...

Opengraph URL: https://github.com/google/python-fire/issues/97

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Only plain literals should be parsed","articleBody":"@dbieber correctly pointed out in #95 that there is a more general problem with the parsing code. This is a follow up issue to that issue which only dealt with the most common case of a single argument.\r\n\r\nHere are some cases demonstrating\r\n```bash\r\n$ python3 -c \"import fire.parser as p; v = p.DefaultParseValue('[1+1]'); print(type(v), v)\"\r\n\u003cclass 'list'> [2]\r\n$ python3 -c \"import fire.parser as p; v = p.DefaultParseValue('{key: 1+1}'); print(type(v), v)\"\r\n\u003cclass 'dict'> {'key': 2} \r\n```\r\n\r\nSome options are:\r\n1. Accept the existing behaviour.\r\n2. Always parse the whole argument as a string by doing `raise ValueError` in ``fire.parser._LiteralEval`\r\n3. Parse only the sub expressions as strings\r\n\r\nFor 2. and 3. I think these would be the valid types from the `ast` module. \r\n\r\n - `Str`\r\n - `Name` (converted to `Str`)\r\n - `Num`\r\n - `List`\r\n - `Tuple`\r\n - `Dict`\r\n - `Set`\r\n - `UnaryOp`","author":{"url":"https://github.com/mbarkhau","@type":"Person","name":"mbarkhau"},"datePublished":"2017-10-12T06:00:27Z","url":"https://github.com/google/python-fire/issues/97"}

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:3804e681-93aa-42ee-7f90-3f8266af5b6d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC218:184B81:2E81A93:3D838A0:6B0027C1
html-safe-nonce2fbca255fea270779fb0f56faa9c59953a6a41882f430333c433f4a893196d0b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjE4OjE4NEI4MToyRTgxQTkzOjNEODM4QTA6NkIwMDI3QzEiLCJ2aXNpdG9yX2lkIjoiNjYxNjU3ODIwOTk4OTI3MzUzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1f785fcbaea0e6eb0cf5ae2b20c896fda5e778522814c60f2c79f457cae5d55f
hovercard-subject-tagissue:264822730
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/google/python-fire/97/issue_layout
twitter:imagehttps://opengraph.githubassets.com/09e5117d9363b29461d8f26fc5eae043d6313b60ef67fcc102d305604fc8c368/google/python-fire/issues/97
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/09e5117d9363b29461d8f26fc5eae043d6313b60ef67fcc102d305604fc8c368/google/python-fire/issues/97
og:image:alt@dbieber correctly pointed out in #95 that there is a more general problem with the parsing code. This is a follow up issue to that issue which only dealt with the most common case of a single argu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamembarkhau
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
go-importgithub.com/google/python-fire git https://github.com/google/python-fire.git
octolytics-dimension-user_id1342004
octolytics-dimension-user_logingoogle
octolytics-dimension-repository_id82729529
octolytics-dimension-repository_nwogoogle/python-fire
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id82729529
octolytics-dimension-repository_network_root_nwogoogle/python-fire
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
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/google/python-fire/issues/97#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogle%2Fpython-fire%2Fissues%2F97
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%2Fgoogle%2Fpython-fire%2Fissues%2F97
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=google%2Fpython-fire
Reloadhttps://github.com/google/python-fire/issues/97
Reloadhttps://github.com/google/python-fire/issues/97
Reloadhttps://github.com/google/python-fire/issues/97
googlehttps://github.com/google
python-firehttps://github.com/google/python-fire
Codehttps://github.com/google/python-fire
Issues146 (146)https://github.com/google/python-fire/issues
Pull requests85 (85)https://github.com/google/python-fire/pulls
Actionshttps://github.com/google/python-fire/actions
Projectshttps://github.com/google/python-fire/projects
Security and qualityhttps://github.com/google/python-fire/security
Insightshttps://github.com/google/python-fire/insights
https://github.com/google/python-fire
New issuehttps://github.com/login?return_to=https://github.com/google/python-fire/issues/97
New issuehttps://github.com/login?return_to=https://github.com/google/python-fire/issues/97
#715https://github.com/google/python-fire/pull/715
Only plain literals should be parsedhttps://github.com/google/python-fire/issues/97#top
#715https://github.com/google/python-fire/pull/715
bughttps://github.com/google/python-fire/issues?q=state%3Aopen%20label%3A%22bug%22
help wantedhttps://github.com/google/python-fire/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
https://github.com/mbarkhau
mbarkhauhttps://github.com/mbarkhau
on Oct 12, 2017https://github.com/google/python-fire/issues/97#issue-264822730
@dbieberhttps://github.com/dbieber
#95https://github.com/google/python-fire/issues/95
https://github.com/dbieber
dbieberhttps://github.com/dbieber
on Oct 12, 2017https://github.com/google/python-fire/issues/97#issuecomment-336217507
literal_eval documentationhttps://docs.python.org/2/library/ast.html#ast.literal_eval
https://github.com/dbieber
dbieberhttps://github.com/dbieber
on Oct 12, 2017https://github.com/google/python-fire/issues/97#issuecomment-336249575
https://bugs.python.org/issue22525https://bugs.python.org/issue22525
https://github.com/dbieber
dbieberhttps://github.com/dbieber
on Oct 12, 2017https://github.com/google/python-fire/issues/97#issuecomment-336301766
https://bugs.python.org/issue31778https://bugs.python.org/issue31778
https://github.com/dbieber
dbieberhttps://github.com/dbieber
on Oct 17, 2017https://github.com/google/python-fire/issues/97#issuecomment-337365008
Python 2.7.3https://github.com/enthought/Python-2.7.3/blob/69fe0ffd2d85b4002cacae1f28ef2eb0f25e16ae/Lib/ast.py#L67
Python 3https://github.com/python/cpython/blob/ef611c96eab0ab667ebb43fdf429b319f6d99890/Lib/ast.py#L76
dbieberhttps://github.com/dbieber
help wantedhttps://github.com/google/python-fire/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
on Dec 5, 2017https://github.com/google/python-fire/issues/97#event-1371664871
https://github.com/dbieber
dbieberhttps://github.com/dbieber
on Dec 5, 2017https://github.com/google/python-fire/issues/97#issuecomment-349153815
python-fire/fire/parser.pyhttps://github.com/google/python-fire/blob/72604f40314008e562ba47936dcc183b51166b72/fire/parser.py#L97-L98
72604f4https://github.com/google/python-fire/commit/72604f40314008e562ba47936dcc183b51166b72
Python 2.7.3 implementation of literal_evalhttps://github.com/enthought/Python-2.7.3/blob/69fe0ffd2d85b4002cacae1f28ef2eb0f25e16ae/Lib/ast.py#L67
dbieberhttps://github.com/dbieber
bughttps://github.com/google/python-fire/issues?q=state%3Aopen%20label%3A%22bug%22
on Oct 5, 2018https://github.com/google/python-fire/issues/97#event-1888287767
https://github.com/alexshadley
alexshadleyhttps://github.com/alexshadley
on Oct 9, 2018https://github.com/google/python-fire/issues/97#issuecomment-428180702
https://github.com/dbieber
dbieberhttps://github.com/dbieber
on Oct 29, 2018https://github.com/google/python-fire/issues/97#issuecomment-434005486
https://github.com/bcluyse
bcluysehttps://github.com/bcluyse
on Jan 15, 2020https://github.com/google/python-fire/issues/97#issuecomment-574654473
https://github.com/alexshadley
alexshadleyhttps://github.com/alexshadley
on Jan 21, 2020https://github.com/google/python-fire/issues/97#issuecomment-576729304
https://github.com/Alex0AI
Alex0AIhttps://github.com/Alex0AI
on Oct 9, 2026https://github.com/google/python-fire/issues/97#issuecomment-6073543319
Sign up for freehttps://github.com/signup?return_to=https://github.com/google/python-fire/issues/97
Sign in to commenthttps://github.com/login?return_to=https://github.com/google/python-fire/issues/97
bughttps://github.com/google/python-fire/issues?q=state%3Aopen%20label%3A%22bug%22
help wantedhttps://github.com/google/python-fire/issues?q=state%3Aopen%20label%3A%22help%20wanted%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.