René's URL Explorer Experiment


Title: reserved characters are treated inconsistently and not sensibly preserved · Issue #16 · python-hyper/hyperlink · GitHub

Open Graph Title: reserved characters are treated inconsistently and not sensibly preserved · Issue #16 · python-hyper/hyperlink

X Title: reserved characters are treated inconsistently and not sensibly preserved · Issue #16 · python-hyper/hyperlink

Description: This has been a design flaw since the inception of the library, so, mea culpa on that. Fundamentally, preserving, escaping, and encoding "reserved" characters is entirely the URL object's job, and it's failing at that. Possibly the most ...

Open Graph Description: This has been a design flaw since the inception of the library, so, mea culpa on that. Fundamentally, preserving, escaping, and encoding "reserved" characters is entirely the URL object's job, and ...

X Description: This has been a design flaw since the inception of the library, so, mea culpa on that. Fundamentally, preserving, escaping, and encoding "reserved" characters is entirely the URL object&#...

Opengraph URL: https://github.com/python-hyper/hyperlink/issues/16

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"reserved characters are treated inconsistently and not sensibly preserved","articleBody":"This has been a design flaw since the inception of the library, so, mea culpa on that.\r\n\r\nFundamentally, preserving, escaping, and encoding \"reserved\" characters is entirely the URL object's job, and it's failing at that.  Possibly the most succinct demonstration of the problem is this:\r\n\r\n```python\r\n>>> u = URL()\r\n>>> u = u.child(u'/')\r\n>>> u = u.asIRI()\r\nTraceback (most recent call last):\r\n  File \"\u003cinput>\", line 1, in \u003cmodule>\r\n    u = u.asIRI()\r\n  File\r\n\"/Users/glyph/Library/Python/2.7/lib/python/site-packages/hyperlink/_url.py\",\r\nline 1116, in to_iri\r\n    fragment=_percent_decode(self.fragment))\r\n  File\r\n\"/Users/glyph/Library/Python/2.7/lib/python/site-packages/hyperlink/_url.py\",\r\nline 861, in replace\r\n    userinfo=_optional(userinfo, self.userinfo),\r\n  File\r\n\"/Users/glyph/Library/Python/2.7/lib/python/site-packages/hyperlink/_url.py\",\r\nline 606, in __init__\r\n    for segment in path))\r\n  File\r\n\"/Users/glyph/Library/Python/2.7/lib/python/site-packages/hyperlink/_url.py\",\r\nline 606, in \u003cgenexpr>\r\n    for segment in path))\r\n  File\r\n\"/Users/glyph/Library/Python/2.7/lib/python/site-packages/hyperlink/_url.py\",\r\nline 410, in _textcheck\r\n    % (''.join(delims), name, value))\r\nValueError: one or more reserved delimiters /?# present in path segment: u'/'\r\n>>>\r\n```\r\n\r\nThis is - obviously I hope - the wrong place to be failing with an error like this.\r\n\r\nThere was previously *some* attempt to preserve these characters in the data model and escape them only upon stringification, but d26814c074c6f9787e62af907df17fbd68fde615 wrecked these semantics.  (In fairness: the attempt to do this was broken, and there are some places, like the scheme, where certain characters indeed *cannot* be represented, so this direction isn't entirely wrong.)\r\n\r\nFundamentally if a user wants to encode slashes, question marks, hash signs or whatever else that a human might, for example, type into a text field, then it should be possible to do that.\r\n\r\nWe could fix this obvious manifestation of the problem by just putting back the escape-only-on-`asText` logic, but that still leaves an even more pernicious problem:\r\n\r\n```python\r\n>>> u = URL(path=tuple([u'%2525']))\r\n>>> u.asText()\r\nu'%2525'\r\n>>> u.asIRI().asText()\r\nu'%25'\r\n>>> u.asIRI().asIRI().asText()\r\nu'%'\r\n>>> \r\n```\r\n\r\nClearly, multiple trips through `asIRI` should not be un-escaping the escape character - the idea is that `.asIRI()` is a normalization step, that should be idempotent upon subsequent calls.\r\n\r\nFor the moment, I'm not sure exactly what the correct fix is here, but the property I'd really like to preserve is that for any `x`,\r\n\r\n`URL.fromText(URL().child(x).\u003cas many asIRI()s or asURI()s as you want>.asText()).\u003cas many .asIRI()s as you want, although possibly not .asURI()s>.segments[0] == x`\r\n","author":{"url":"https://github.com/glyph","@type":"Person","name":"glyph"},"datePublished":"2017-06-25T08:00:36Z","url":"https://github.com/python-hyper/hyperlink/issues/16"}

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:1feb126f-b3c9-6aff-198b-22be9ff05e8a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8B2C:37300:E1DF4E:13D1AF5:6B06F0A8
html-safe-nonce4032811f3bcba483b08b1647b69db31ea95af203f6c8a0eba655dbbc6118b98b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjJDOjM3MzAwOkUxREY0RToxM0QxQUY1OjZCMDZGMEE4IiwidmlzaXRvcl9pZCI6IjgzMzkzMjQyMzk5MTY0OTUwMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb583659b06bcd87d022b797d1ad0706c72c4d4cc70160e29c08a724e31ccc603
hovercard-subject-tagissue:238366753
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-hyper/hyperlink/16/issue_layout
twitter:imagehttps://opengraph.githubassets.com/120ea7c62b8ae4819ebe3b3bcd0fecd63f23b2391f4819a425a7b98384e03eb0/python-hyper/hyperlink/issues/16
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/120ea7c62b8ae4819ebe3b3bcd0fecd63f23b2391f4819a425a7b98384e03eb0/python-hyper/hyperlink/issues/16
og:image:altThis has been a design flaw since the inception of the library, so, mea culpa on that. Fundamentally, preserving, escaping, and encoding "reserved" characters is entirely the URL object's job, and ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameglyph
hostnamegithub.com
expected-hostnamegithub.com
None351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b
turbo-cache-controlno-preview
go-importgithub.com/python-hyper/hyperlink git https://github.com/python-hyper/hyperlink.git
octolytics-dimension-user_id13035907
octolytics-dimension-user_loginpython-hyper
octolytics-dimension-repository_id82321340
octolytics-dimension-repository_nwopython-hyper/hyperlink
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id82321340
octolytics-dimension-repository_network_root_nwopython-hyper/hyperlink
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
release891bde3f438884e9c6c7ccd826f33805910a978b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-hyper/hyperlink/issues/16#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-hyper%2Fhyperlink%2Fissues%2F16
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-hyper%2Fhyperlink%2Fissues%2F16
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-hyper%2Fhyperlink
Reloadhttps://github.com/python-hyper/hyperlink/issues/16
Reloadhttps://github.com/python-hyper/hyperlink/issues/16
Reloadhttps://github.com/python-hyper/hyperlink/issues/16
python-hyperhttps://github.com/python-hyper
hyperlinkhttps://github.com/python-hyper/hyperlink
Codehttps://github.com/python-hyper/hyperlink
Issues37 (37)https://github.com/python-hyper/hyperlink/issues
Pull requests21 (21)https://github.com/python-hyper/hyperlink/pulls
Actionshttps://github.com/python-hyper/hyperlink/actions
Projectshttps://github.com/python-hyper/hyperlink/projects
Security and qualityhttps://github.com/python-hyper/hyperlink/security
Insightshttps://github.com/python-hyper/hyperlink/insights
https://github.com/python-hyper/hyperlink
New issuehttps://github.com/login?return_to=https://github.com/python-hyper/hyperlink/issues/16
New issuehttps://github.com/login?return_to=https://github.com/python-hyper/hyperlink/issues/16
reserved characters are treated inconsistently and not sensibly preservedhttps://github.com/python-hyper/hyperlink/issues/16#top
https://github.com/glyph
glyphhttps://github.com/glyph
on Jun 25, 2017https://github.com/python-hyper/hyperlink/issues/16#issue-238366753
d26814chttps://github.com/python-hyper/hyperlink/commit/d26814c074c6f9787e62af907df17fbd68fde615
glyphhttps://github.com/glyph
on Jun 25, 2017https://github.com/python-hyper/hyperlink/issues/16#event-1137672284
workaround for overzealous reserved-character checking in hyperlinkhttps://github.com/twisted/txacme/commit/08d6d7acd577bb8430eee569a746d8ec7cee7ae2
08d6d7ahttps://github.com/twisted/txacme/commit/08d6d7acd577bb8430eee569a746d8ec7cee7ae2
https://github.com/mahmoud
mahmoudhttps://github.com/mahmoud
on Jun 25, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-310892995
https://github.com/nigelmegitt
nigelmegitthttps://github.com/nigelmegitt
on Jun 26, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-311103292
d26814chttps://github.com/python-hyper/hyperlink/commit/d26814c074c6f9787e62af907df17fbd68fde615
https://github.com/mahmoud
mahmoudhttps://github.com/mahmoud
on Jun 26, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-311123987
@nigelmegitthttps://github.com/nigelmegitt
_create_client methodhttps://github.com/ebu/ebu-tt-live-toolkit/blob/master/ebu_tt_live/twisted/test/test_twisted_websocket.py#L203
herehttps://github.com/python-hyper/hyperlink/commit/d26814c074c6f9787e62af907df17fbd68fde615#commitcomment-22765690
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 1, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312410018
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 1, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312410476
mahmoudhttps://github.com/mahmoud
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#event-1147421742
add many failing tests for double-iri roundtripping (per #16)https://github.com/python-hyper/hyperlink/commit/027c8c6c28b7ec0530256267df7f406de384a241
#16https://github.com/python-hyper/hyperlink/issues/16
027c8c6https://github.com/python-hyper/hyperlink/commit/027c8c6c28b7ec0530256267df7f406de384a241
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312562857
#23https://github.com/python-hyper/hyperlink/pull/23
https://github.com/mahmoud
mahmoudhttps://github.com/mahmoud
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312573732
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312575643
https://github.com/mahmoud
mahmoudhttps://github.com/mahmoud
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312577974
a dedicated objecthttp://boltons.readthedocs.io/en/latest/urlutils.html#boltons.urlutils.QueryParamDict
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312580430
escapehttps://thoughtstreams.io/glyph/string-trepanation/
https://github.com/nigelmegitt
nigelmegitthttps://github.com/nigelmegitt
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312607134
@glyphhttps://github.com/glyph
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312607412
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312607675
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312607866
https://github.com/mahmoud
mahmoudhttps://github.com/mahmoud
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312610599
.sibling() and .child()http://hyperlink.readthedocs.io/en/latest/api.html#hyperlink.URL.sibling
https://github.com/nigelmegitt
nigelmegitthttps://github.com/nigelmegitt
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312613776
https://github.com/nigelmegitt
nigelmegitthttps://github.com/nigelmegitt
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312614724
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312621004
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312621705
#23https://github.com/python-hyper/hyperlink/pull/23
https://github.com/nigelmegitt
nigelmegitthttps://github.com/nigelmegitt
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312700051
#23https://github.com/python-hyper/hyperlink/pull/23
https://github.com/mahmoud
mahmoudhttps://github.com/mahmoud
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312700592
https://github.com/glyph
glyphhttps://github.com/glyph
on Jul 3, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312723598
@mahmoudhttps://github.com/mahmoud
#23https://github.com/python-hyper/hyperlink/pull/23
https://github.com/nigelmegitt
nigelmegitthttps://github.com/nigelmegitt
on Jul 4, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-312842268
https://github.com/mahmoud
mahmoudhttps://github.com/mahmoud
on Jul 19, 2017https://github.com/python-hyper/hyperlink/issues/16#issuecomment-316527876
mahmoudhttps://github.com/mahmoud
completedhttps://github.com/python-hyper/hyperlink/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 19, 2017https://github.com/python-hyper/hyperlink/issues/16#event-1171088374
nigelmegitthttps://github.com/nigelmegitt
on Nov 29, 2021https://github.com/python-hyper/hyperlink/issues/16#event-5684287169
Remove restriction on hyperlinkhttps://github.com/bbc/ebu-tt-live-toolkit/commit/dc0746a79ccb5e20cca9c8f857ac1669fcf342ec
dc0746ahttps://github.com/bbc/ebu-tt-live-toolkit/commit/dc0746a79ccb5e20cca9c8f857ac1669fcf342ec
nigelmegitthttps://github.com/nigelmegitt
on Dec 7, 2021https://github.com/python-hyper/hyperlink/issues/16#event-5727096561
Mspa 1576 br children of untimed p (#61)https://github.com/bbc/ebu-tt-live-toolkit/commit/2d0d6e655f83c29453220abf59c213b4c2a9fc02
#61https://github.com/bbc/ebu-tt-live-toolkit/pull/61
2d0d6e6https://github.com/bbc/ebu-tt-live-toolkit/commit/2d0d6e655f83c29453220abf59c213b4c2a9fc02
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-hyper/hyperlink/issues/16
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-hyper/hyperlink/issues/16
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.