Title: Fix error message for `ntpath.commonpath` · Issue #117381 · python/cpython · GitHub
Open Graph Title: Fix error message for `ntpath.commonpath` · Issue #117381 · python/cpython
X Title: Fix error message for `ntpath.commonpath` · Issue #117381 · python/cpython
Description: Bug report Bug description: >>> import ntpath >>> ntpath.commonpath(["/foo", "foo"]) Traceback (most recent call last): File "
Open Graph Description: Bug report Bug description: >>> import ntpath >>> ntpath.commonpath(["/foo", "foo"]) Traceback (most recent call last): File "
X Description: Bug report Bug description: >>> import ntpath >>> ntpath.commonpath(["/foo", "foo"]) Traceback (most recent call last): File "<stdin>", line 1,...
Opengraph URL: https://github.com/python/cpython/issues/117381
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix error message for `ntpath.commonpath`","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\n```python\r\n\u003e\u003e\u003e import ntpath\r\n\u003e\u003e\u003e ntpath.commonpath([\"/foo\", \"foo\"])\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\n File \"\u003cfrozen ntpath\u003e\", line 808, in commonpath\r\nValueError: Can't mix absolute and relative paths\r\n```\r\n\r\n`/foo` is not an absolute path, but a rooted path, which can't be mixed with not-rooted paths.\r\n\r\n### CPython versions tested on:\r\n\r\nCPython main branch\r\n\r\n### Operating systems tested on:\r\n\r\nWindows\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-117382\r\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/nineteendo","@type":"Person","name":"nineteendo"},"datePublished":"2024-03-29T21:16:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/117381/cpython/issues/117381"}
| 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:47045834-d1a8-5a9b-a9d8-99a0b3eed9f9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C300:1A2C82:113A2C:166CA3:696B2FD7 |
| html-safe-nonce | 49e2bf272fe0da11cd0747657737340e3653f1e1f72efa33c485f43940bfedce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzAwOjFBMkM4MjoxMTNBMkM6MTY2Q0EzOjY5NkIyRkQ3IiwidmlzaXRvcl9pZCI6Ijg5NTY4ODMwMDE2NzI0MTMxNDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4d826ac4bc231db09669ca6deca4d8abd04d698596b1e08200012886b6dfaa0e |
| hovercard-subject-tag | issue:2216007010 |
| 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/117381/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1dd80c599d2208bf1ff5d70f9f082cc0531848a0d65e359c7de4694f6b3d58a3/python/cpython/issues/117381 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1dd80c599d2208bf1ff5d70f9f082cc0531848a0d65e359c7de4694f6b3d58a3/python/cpython/issues/117381 |
| og:image:alt | Bug report Bug description: >>> import ntpath >>> ntpath.commonpath(["/foo", "foo"]) Traceback (most recent call last): File " |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nineteendo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width