This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barneygale
Recipients barneygale, pitrou
Date 2022-02-23.21:27:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
^ 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.
History
Date User Action Args
2022-02-23 21:27:45barneygalesetrecipients: + barneygale, pitrou
2022-02-23 21:27:45barneygalesetmessageid: <[email protected]>
2022-02-23 21:27:45barneygalelinkissue44136 messages
2022-02-23 21:27:45barneygalecreate