On Wed, 9 Feb 2022 at 15:46, Ethan Furman <et...@stoneleaf.us> wrote:

> On 2/9/22 6:59 AM, Barney Gale wrote:
>
>  > I've now submitted a PR that adds an initial underscore-prefixed
> implementation of this class:
>
> Why the iniitial underscore?  What could change between now and the future?
>

A few things:

Firstly, I'd like to give PyPI package maintainers the opportunity to play
with the underscore-prefixed API and submit feedback, prior to us freezing
the interface. They're already doing naughty things subclassing the
(internal, recently removed) pathlib._Accessor class. I think this feedback
might identify the need for new OSError subclass representing EINVAL for
readlink() implementations, or a new user-friendly os.stat_result
constructor for use in stat(). Or perhaps not :-)

Secondly, there's still a couple of rough edges in the PurePath
implementation, particularly around certain operations being delegated to a
mix-in class (the "flavour"). I'd like to bring those into PurePath before
we unleash this on the world, but it can be worked around for the time
being.

Thirdly, I've yet to address the problem of how we supply things like
sockets or zipfile.ZipFile objects, and persist them to child objects
generated by iterdir() etc. It can be done already by creating a further
subclass with the state assigned as a class attribute, but that's a bit
weird I think!
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/QOIDZYXZXQE27NG3J7UFHB6HQQKYIF4V/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to