Title: bpo-39899: Make pathlib use `os.path.expanduser()` to expand home directories by barneygale · Pull Request #18841 · python/cpython · GitHub
Open Graph Title: bpo-39899: Make pathlib use `os.path.expanduser()` to expand home directories by barneygale · Pull Request #18841 · python/cpython
X Title: bpo-39899: Make pathlib use `os.path.expanduser()` to expand home directories by barneygale · Pull Request #18841 · python/cpython
Description: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. This makes ntpath.expanduser() match pathlib.Path.expanduser() in this regard, and is more in line with posixpath.expanduser()'s cautious approach. Also remove the near-duplicate implementation of expanduser() in pathlib, and by doing so fix a bug where KeyError could be raised when expanding another user's home directory on Windows. https://bugs.python.org/issue39899
Open Graph Description: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. This makes ntpath.expandus...
X Description: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. This makes...
Opengraph URL: https://github.com/python/cpython/pull/18841
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:e9910a00-9a0b-34f5-64be-5be8f1470a67 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CB4C:D209A:903BA9:B9C14C:696B1BEF |
| html-safe-nonce | 986841786f78a76bbcd2f8200e496e6f972adc299eff91fa4add67a8542fedf0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjRDOkQyMDlBOjkwM0JBOTpCOUMxNEM6Njk2QjFCRUYiLCJ2aXNpdG9yX2lkIjoiNzE5NTk3MjY3ODMzMjM5MDM4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3ed4c146a2ddd21d409ddba55f0a5767a98d985dd9bf822bddf2a7e325b5f681 |
| hovercard-subject-tag | pull_request:385230749 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python/cpython/pull/18841/checks |
| twitter:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| og:image:alt | os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. This makes ntpath.expandus... |
| og:site_name | GitHub |
| og:type | object |
| 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 full-width full-width-p-0 |
| 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