Title: bpo-30374: Fixed several bugs in win_add2path.py by XDcsy · Pull Request #1645 · python/cpython · GitHub
Open Graph Title: bpo-30374: Fixed several bugs in win_add2path.py by XDcsy · Pull Request #1645 · python/cpython
X Title: bpo-30374: Fixed several bugs in win_add2path.py by XDcsy · Pull Request #1645 · python/cpython
Description: Discard DEFAULT = "%PATH%". The system PATH is effective to all users[1] so adding "%PATH%" in user PATH is unnecessary. os.path.isdir() always return False because the input path includes "%APPDATA%" and also because the USER_SITE directory does not yet exist when Python is just installed. It is now deleted to make paths be added correctly. The script compulsively sets the type of PATH var to REG_EXPAND_SZ to make the reference "%APPDATA%" effective[2] . However this is not a good practice (brought forward by Eryk Sun in the issue). Now the script does not change the type of PATH. If it's REG_SZ, the absolute path of %APPDATA% will be added instead. The script needs users to log off and then log back on to take effect. Now it takes effect immediately by broadcasting a WM_SETTINGCHANG message[3] after the change of env vars. Now displays error massages when fails to load PATH values or fails to refresh env vars. https://bugs.python.org/issue30374
Open Graph Description: Discard DEFAULT = "%PATH%". The system PATH is effective to all users[1] so adding "%PATH%" in user PATH is unnecessary. os.path.isdir() always return False because the input pa...
X Description: Discard DEFAULT = "%PATH%". The system PATH is effective to all users[1] so adding "%PATH%" in user PATH is unnecessary. os.path.isdir() always return False beca...
Opengraph URL: https://github.com/python/cpython/pull/1645
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:2da4371a-a60e-80df-6276-dac253d91b3d |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | B0D6:154180:1FD6242:29CCD17:696B47F6 |
| html-safe-nonce | a0bc699315ecd465537aaa1803c8b1ee99424c796583ca06bd5f8cf2431dd91c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEQ2OjE1NDE4MDoxRkQ2MjQyOjI5Q0NEMTc6Njk2QjQ3RjYiLCJ2aXNpdG9yX2lkIjoiNjY4ODYxMTQ3NzMwNTkwMzA5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 826c75086051a2ce34260602c87cfef80abf8199bb2096d9e22c1c0efc4290c0 |
| hovercard-subject-tag | pull_request:121227174 |
| 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/1645/checks |
| twitter:image | https://avatars.githubusercontent.com/u/25985772?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/25985772?s=400&v=4 |
| og:image:alt | Discard DEFAULT = "%PATH%". The system PATH is effective to all users[1] so adding "%PATH%" in user PATH is unnecessary. os.path.isdir() always return False because the input pa... |
| 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