René's URL Explorer Experiment


Title: 0.5.0 a couple issues on first attempt to use · Issue #78 · python-trio/unasync · GitHub

Open Graph Title: 0.5.0 a couple issues on first attempt to use · Issue #78 · python-trio/unasync

X Title: 0.5.0 a couple issues on first attempt to use · Issue #78 · python-trio/unasync

Description: The async transformation code. Contribute to python-trio/unasync development by creating an account on GitHub.

Open Graph Description: The async transformation code. Contribute to python-trio/unasync development by creating an account on GitHub.

X Description: The async transformation code. Contribute to python-trio/unasync development by creating an account on GitHub.

Opengraph URL: https://github.com/python-trio/unasync

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"0.5.0 a couple issues on first attempt to use","articleBody":"1) trying to use this on Windows is producing bad EOL in output file. This is because the file is opened binary on read and pulls in '\\r\\n' but then the file is opened as text on output so ends up writing '\\r\\r\\n' to the output file\r\n\r\n2) need to support older versions of python but the following code:\r\n`from typing_extensions import AsyncIterator`\r\ngets transformed to the invalid:\r\n`from typing_extensions import Iterator`\r\n\r\n3) unasync output files are invalid if they use tabbed indentation. Source tabs are getting replaced with a single space on some but not all lines. Actual error trying to run a converted file:\r\n\r\n```\r\n  File \"C:\\cvs\\gravitas_v1\\incpy\\esl_sync.py\", line 48\r\n    if value is None:\r\n                     ^\r\nIndentationError: unindent does not match any outer indentation level\r\n```\r\n\r\n4) a simple way to run this by hand (setup.py is overkill for my needs) to convert a file to another file in the same directory. In my case I want to convert 'esl_async.py' to 'esl_sync.py' in the same folder. This is what I did in order to get this far:\r\n\r\n```\r\n# stdlib imports:\r\nimport os\r\nfrom pathlib import Path\r\nimport sys\r\n\r\n# 3rd-party imports:\r\nimport unasync # pip install unasync\r\nfrom unasync import std_tokenize, _tokenize, _makedirs_existok\r\n\r\ndef _untokenize(tokens):\r\n\treturn \"\".join(\r\n\t\tspace + '\\n' if tokval == '\\r\\n' else space + tokval\r\n\t\tfor space, tokval in tokens\r\n\t)\r\n\r\nclass Rule( unasync.Rule ):\r\n\tdef __init__( self, fromdir, todir, suffix ) -> None:\r\n\t\tself.suffix = suffix\r\n\t\tsuper().__init__( fromdir, todir )\r\n\t\r\n\tdef _outfilepath( self, filepath ):\r\n\t\tpath = Path( self.todir ).absolute() / f'{Path(filepath).stem}{self.suffix}.py'\r\n\t\t#assert False, f'{filepath=} {path=} {os.path.dirname(str(path))=}'\r\n\t\treturn str( path )\r\n\t\r\n\tdef _unasync_file( self, filepath ):\r\n\t\twith open(filepath, \"rb\") as f:\r\n\t\t\twrite_kwargs = {}\r\n\t\t\tif sys.version_info[0] >= 3:\r\n\t\t\t\tencoding, _ = std_tokenize.detect_encoding(f.readline)\r\n\t\t\t\twrite_kwargs[\"encoding\"] = encoding\r\n\t\t\t\tf.seek(0)\r\n\t\t\ttokens = _tokenize(f)\r\n\t\t\ttokens = self._unasync_tokens(tokens)\r\n\t\t\tresult = _untokenize(tokens)\r\n\t\t\toutfilepath = self._outfilepath( filepath )\r\n\t\t\t_makedirs_existok(os.path.dirname(outfilepath))\r\n\t\t\twith open(outfilepath, \"w\", **write_kwargs) as f:\r\n\t\t\t\tprint(result, file=f, end=\"\")\r\n\r\nrule = Rule( '.', '.', '_sync' )\r\nrule._unasync_file( 'esl.py' )\r\n```\r\n","author":{"url":"https://github.com/remdragon","@type":"Person","name":"remdragon"},"datePublished":"2022-12-17T00:42:51Z","url":"https://github.com/python-trio/unasync/issues/78"}

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/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:1c56fd9f-16ef-9a68-3d20-8b77dd6b63e4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB3B2:81334:311D16:44AE96:6B047700
html-safe-noncebcdbb972ab0caa6d1e4549a53b372cf13bd89bb149fe5aeb65d64a40779843ec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0IyOjgxMzM0OjMxMUQxNjo0NEFFOTY6NkIwNDc3MDAiLCJ2aXNpdG9yX2lkIjoiNTc5MDAwNzgwMjUwNDQ0MzY0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac66effbe1d2421be4078aef52c6880978064be2e41f7a017b4ed3b865fe11f3d1
hovercard-subject-tagrepository:154537846
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-trio/unasync/issues/78
twitter:imagehttps://opengraph.githubassets.com/8570c3e566624e0755e1d3c811d13a6c449736589f13d3f372157de3a04c18b9/python-trio/unasync
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8570c3e566624e0755e1d3c811d13a6c449736589f13d3f372157de3a04c18b9/python-trio/unasync
og:image:altThe async transformation code. Contribute to python-trio/unasync development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b
turbo-cache-controlno-cache
go-importgithub.com/python-trio/unasync git https://github.com/python-trio/unasync.git
octolytics-dimension-user_id26335827
octolytics-dimension-user_loginpython-trio
octolytics-dimension-repository_id154537846
octolytics-dimension-repository_nwopython-trio/unasync
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id154537846
octolytics-dimension-repository_network_root_nwopython-trio/unasync
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
releasecf73f57448d52b3a7b619195e182b33d3b3454ca
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-trio/unasync/issues/78#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-trio%2Funasync%2Fissues%2F78
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-trio%2Funasync%2Fissues%2F78
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=python-trio%2Funasync
Reloadhttps://github.com/python-trio/unasync/issues/78
Reloadhttps://github.com/python-trio/unasync/issues/78
Reloadhttps://github.com/python-trio/unasync/issues/78
https://github.com/python-trio/unasync
New issuehttps://github.com/login?return_to=https://github.com/python-trio/unasync/issues/78
New issuehttps://github.com/login?return_to=https://github.com/python-trio/unasync/issues/78
0.5.0 a couple issues on first attempt to usehttps://github.com/python-trio/unasync/issues/78#top
https://github.com/remdragon
remdragonhttps://github.com/remdragon
on Dec 17, 2022https://github.com/python-trio/unasync/issues/78#issue-1501054225
https://github.com/pquentin
pquentinhttps://github.com/pquentin
on Dec 17, 2022https://github.com/python-trio/unasync/issues/78#issuecomment-1356234272
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-trio/unasync/issues/78
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-trio/unasync/issues/78
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.