On 24 October 2013 18:17, Antoine Pitrou wrote:
Le Thu, 24 Oct 2013 00:38:02 +0200,
Christian Heimes <email@example.com
> a ?crit :
Am 23.10.2013 23:37, schrieb Charles-Fran?ois Natali:
What's the current status of pathlib? Is it targeted for 3.4?
It would be a really nice addition, and AFAICT it has already been
maturing a while on pypi, and discussed several times here.
If I remember correctly, the only remaining issue was stat()'s
I'd like to see pathlib in 3.4 as well. Last week at PyCon.DE in
Cologne several people have asked me about pathlib. We even had a
BarCamp session about path libraries for Python. A couple of German
Python users have promised to contribute doc improvements soonish.
AFAIK stat caching and a os.listdir() generator with stat `recycling`
(dirent->d_type) are open issues. I suggest Python 3.4 should ignore
these features for now but prepare the API and documentation for
Thanks for the push. I have to cleanup / remove stat caching from the
PEP (not sure yet which one, Nick expressed interest during the last
discussion) and then polish it for pronouncement.
A clean stat caching mechanism would potentially help resolve an
architectural problem with walkdir
(https://pypi.python.org/pypi/walkdir), where offering stat-based
filtering as a pipeline of independent iterators would significantly
increase the number of stat calls compared to doing such filtering
directly outside the iterator.
However, since walkdir doesn't currently offer such stat-based
filters, and it's unlikely I'll be adding it any time soon, deferring
a stat caching design sounds like a reasonable idea to me.
Still, I need to find someone to pronounce on it.
I'd offer, but I already have a scary number of things I need to get
done by beta 1 :P
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia