Message413857
^ just to bring my previous comment up-to-date:
I'm no longer pursuing adding `os.path.isreserved()` and `os.path.fileuri()` functions, or modifying `normpath()`. At least, not for now!
Instead, my plan is to move flavour functionality as follows (as classmethods with underscore prefixes):
_Flavour --> PurePath
_PosixFlavour --> PurePath
_WindowsFlavour --> PureWindowsPath
As a result, PurePath will use POSIX syntax by default. This is fully backwards-compatible, as users can't create PurePath objects! PurePath.__new__() instantiates PurePosixPath or PureWindowsPath. But it will matter for future user subclasses of PurePath/Path, where we usually want POSIX syntax.
I think there will be three PRs involved. PR 30320 and PR 30321 move _Flavour.make_uri() and _Flavour.is_reserved() respectively; these are reasonably standalone. If/when they land, I'll make a larger PR that moves the remaining methods into PurePath and PureWindowsPath. |
|
| Date |
User |
Action |
Args |
| 2022-02-23 21:27:45 | barneygale | set | recipients:
+ barneygale, pitrou |
| 2022-02-23 21:27:45 | barneygale | set | messageid: <[email protected]> |
| 2022-02-23 21:27:45 | barneygale | link | issue44136 messages |
| 2022-02-23 21:27:45 | barneygale | create | |
|