Title: test_cmd_line_script and test_embed, test_compileall, test_urllib fail if TMPDIR path is non-ASCII · Issue #93855 · python/cpython · GitHub
Open Graph Title: test_cmd_line_script and test_embed, test_compileall, test_urllib fail if TMPDIR path is non-ASCII · Issue #93855 · python/cpython
X Title: test_cmd_line_script and test_embed, test_compileall, test_urllib fail if TMPDIR path is non-ASCII · Issue #93855 · python/cpython
Description: $ mkdir nonasciié $ TMPDIR=$PWD/nonasciié/ TEMP=$PWD/nonasciié/ ./python -m test test_urllib -v -m test_file_notexists (...) ERROR: test_file_notexists (test.test_urllib.urlopen_HttpTests.test_file_notexists) ----------------------------...
Open Graph Description: $ mkdir nonasciié $ TMPDIR=$PWD/nonasciié/ TEMP=$PWD/nonasciié/ ./python -m test test_urllib -v -m test_file_notexists (...) ERROR: test_file_notexists (test.test_urllib.urlopen_HttpTests.test_file...
X Description: $ mkdir nonasciié $ TMPDIR=$PWD/nonasciié/ TEMP=$PWD/nonasciié/ ./python -m test test_urllib -v -m test_file_notexists (...) ERROR: test_file_notexists (test.test_urllib.urlopen_HttpTests.test_file...
Opengraph URL: https://github.com/python/cpython/issues/93855
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_cmd_line_script and test_embed, test_compileall, test_urllib fail if TMPDIR path is non-ASCII","articleBody":"```\r\n$ mkdir nonasciié\r\n$ TMPDIR=$PWD/nonasciié/ TEMP=$PWD/nonasciié/ ./python -m test test_urllib -v -m test_file_notexists \r\n(...)\r\nERROR: test_file_notexists (test.test_urllib.urlopen_HttpTests.test_file_notexists)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n File \"/home/vstinner/python/main/Lib/urllib/parse.py\", line 1004, in _to_bytes\r\n url = url.encode(\"ASCII\").decode()\r\n ^^^^^^^^^^^^^^^^^^^\r\nUnicodeEncodeError: 'ascii' codec can't encode character '\\xe9' in position 52: ordinal not in range(128)\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/vstinner/python/main/Lib/test/test_urllib.py\", line 535, in test_file_notexists\r\n with urlopen(tmp_fileurl) as fobj:\r\n ^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/vstinner/python/main/Lib/test/test_urllib.py\", line 54, in urlopen\r\n return opener.open(url)\r\n ^^^^^^^^^^^^^^^^\r\n File \"/home/vstinner/python/main/Lib/urllib/request.py\", line 1760, in open\r\n fullurl = unwrap(_to_bytes(fullurl))\r\n ^^^^^^^^^^^^^^^^^^\r\n File \"/home/vstinner/python/main/Lib/urllib/parse.py\", line 1006, in _to_bytes\r\n raise UnicodeError(\"URL \" + repr(url) +\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nUnicodeError: URL 'file://localhost//home/vstinner/python/main/nonasciié/tmp3e6una03' contains non-ASCII characters\r\n```\r\n\r\ncc @serhiy-storchaka ","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2022-06-15T11:40:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/93855/cpython/issues/93855"}
| 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:b8dbf423-bfe2-e471-f723-19fcd970cbd9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0FE:17FD9C:3A4C53:4E169A:6969AD38 |
| html-safe-nonce | 476b67eb3484c933f18f2ff50d83323e838d39c639d1ec97525e9bf8ddfad732 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEZFOjE3RkQ5QzozQTRDNTM6NEUxNjlBOjY5NjlBRDM4IiwidmlzaXRvcl9pZCI6Ijc1NDk0MDgyMDg1ODk3OTQ2MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b6a50a1f4b83be163e0692313f95cf6e2680020424a377dfb7cf3c753510774a |
| hovercard-subject-tag | issue:1272106434 |
| 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/93855/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d2d35077f41dc28522f68e492228e43c87ee1f4f72a813a7c91caed0d517e92/python/cpython/issues/93855 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d2d35077f41dc28522f68e492228e43c87ee1f4f72a813a7c91caed0d517e92/python/cpython/issues/93855 |
| og:image:alt | $ mkdir nonasciié $ TMPDIR=$PWD/nonasciié/ TEMP=$PWD/nonasciié/ ./python -m test test_urllib -v -m test_file_notexists (...) ERROR: test_file_notexists (test.test_urllib.urlopen_HttpTests.test_file... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7 |
| 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 | 124667f43168afb6c9c03b7c02eb5b1d2e1be3d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width