Title: Unexpected urllib parse result · Issue #98022 · python/cpython · GitHub
Open Graph Title: Unexpected urllib parse result · Issue #98022 · python/cpython
X Title: Unexpected urllib parse result · Issue #98022 · python/cpython
Description: Subject I parse an IP address with port to get a url, but ParseResult does not look right. Environment Describe your environment. At least, paste here the output of: OS Linux-5.10.0-17-amd64-x86_64-with-glibc2.31 >>> print("Python", plat...
Open Graph Description: Subject I parse an IP address with port to get a url, but ParseResult does not look right. Environment Describe your environment. At least, paste here the output of: OS Linux-5.10.0-17-amd64-x86_64...
X Description: Subject I parse an IP address with port to get a url, but ParseResult does not look right. Environment Describe your environment. At least, paste here the output of: OS Linux-5.10.0-17-amd64-x86_64...
Opengraph URL: https://github.com/python/cpython/issues/98022
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected urllib parse result","articleBody":"### Subject\r\n\r\nI parse an IP address with port to get a url, but `ParseResult` does not look right.\r\n\r\n### Environment\r\n\r\nDescribe your environment.\r\nAt least, paste here the output of:\r\n\r\n```python\r\nOS Linux-5.10.0-17-amd64-x86_64-with-glibc2.31\r\n\u003e\u003e\u003e print(\"Python\", platform.python_version())\r\nPython 3.9.2\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\n```python\r\nfrom urllib.parse import urlparse\r\nurlparse('192.168.1.132:16992')\r\n```\r\n\r\n### Expected Behavior\r\n\r\n```\r\nParseResult(scheme='', netloc='192.168.1.132:16992', path='', params='', query='', fragment='')\r\n```\r\n\r\n### Actual Behavior\r\n\r\n```\r\nParseResult(scheme='192.168.1.132', netloc='', path='16992', params='', query='', fragment='')\r\n```\r\n\r\nI guess scheme should not be an IP address\r\n\r\n\r\nThis issue seems to be related: https://github.com/python/cpython/issues/38644","author":{"url":"https://github.com/planetA","@type":"Person","name":"planetA"},"datePublished":"2022-10-07T08:44:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/98022/cpython/issues/98022"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c72ac758-b328-c0b1-640d-ff48fa8a2ec1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8748:359CC2:514CC:7120B:696A3CB0 |
| html-safe-nonce | 7c1c69800559ff7f4be523a86ce9d1fb18e2a987b4cbc52951702618109243d5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzQ4OjM1OUNDMjo1MTRDQzo3MTIwQjo2OTZBM0NCMCIsInZpc2l0b3JfaWQiOiI0NTMzMDA0MTA0ODIzODgwODgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 70c9ea7fbac6d95ade88133d0b6e4e38f9be3e39174913bf32ce03cd68f79b4e |
| hovercard-subject-tag | issue:1400832035 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/98022/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8531be58e8b13202d9bfa9dc43a16a65f2bc019e01e1f259378fc930ccb151d/python/cpython/issues/98022 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8531be58e8b13202d9bfa9dc43a16a65f2bc019e01e1f259378fc930ccb151d/python/cpython/issues/98022 |
| og:image:alt | Subject I parse an IP address with port to get a url, but ParseResult does not look right. Environment Describe your environment. At least, paste here the output of: OS Linux-5.10.0-17-amd64-x86_64... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | planetA |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 13581a31d51edf4a3aca179e10890a4d4f9b6d76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width