Message390452
Thanks for taking a look, Steve.
A couple things maybe worth noting:
Firstly, `os.path.expanduser()` is already documented to return the path unchanged if the home directory can't be resolved:
> If the expansion fails or if the path does not begin with a tilde, the path is returned unchanged.
Secondly, `ntpath.expanduser()` already returns the path unchanged if neither USERPROFILE nor HOMEPATH are in the environment.
An alternative would be to leave `ntpath.expanduser()` method alone, and forgo the slightly-improved error checking in `WindowsPath.expanduser()` in the name of conformity. Or perhaps we could add a `stict` parameter to `expanduser()`?
I can understand why this could be seen as change for change's sake. In fact this code removal greatly aids my work towards addressing bpo-24132.
Thanks again |
|
Date |
User |
Action |
Args |
2021-04-07 17:21:14 | barneygale | set | recipients:
+ barneygale, serhiy.storchaka, steve.dower |
2021-04-07 17:21:14 | barneygale | set | messageid: <1617816074.1.0.189054233714.issue39899@roundup.psfhosted.org> |
2021-04-07 17:21:14 | barneygale | link | issue39899 messages |
2021-04-07 17:21:14 | barneygale | create | |
|