Changes by Gregory P. Smith g...@krypto.org:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13229
___
___
Charles-François Natali added the comment:
Nick, I think this would be a great addition (I have often seen people trying
to implement this in their own code, and I certainly did it myself).
What's the status of walkdir, do you think it's mature enough to be merged?
--
STINNER Victor added the comment:
pathlib and walkdir are two nice piece of code, but do we need two modules? It
would be nice to merge them into one unique module :-) (Or is it a stupid idea?)
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan added the comment:
The problem with the current walkdir implementation is that without a rich path
object you end up making a lot of redundant system calls. Combined with the
inherent overhead of nested generators, it just *feels* bad (even in situations
where worrying about the
Antoine Pitrou pit...@free.fr added the comment:
Not sure this is the right place to mention this, but I'm realizing handling
symlink loops will be interesting. It is interesting because, when e.g. you
are globbing, your glob's results may not include the symlinks' target path; so
there are
Antoine Pitrou pit...@free.fr added the comment:
Oh, forgot to mention, the term symlink loop itself is ambiguous.
There are direct symlink loops: an example is a some_dir/linky link pointing
to ../some_dir/linky. These will fail when resolving them.
There are indirect symlink loops:
Nick Coghlan ncogh...@gmail.com added the comment:
WalkDir attempts to handle symlink loops, but the test suite doesn't currently
ensure that that handling works as expected (I did some initial manual tests
and haven't updated it since, though).
It's... not trivial:
Nick Coghlan ncogh...@gmail.com added the comment:
With the release of 0.3, I'm pretty happy with the WalkDir design (previous
versions coerced the output values to ordinary 3-tuples, now it will pass along
whatever the underlying iterable produces with changing the type at all).
--
Antoine Pitrou pit...@free.fr added the comment:
(speaking of which, I'd just mention I've published pathlib as a standalone
package: http://pypi.python.org/pypi/pathlib/ )
--
___
Python tracker rep...@bugs.python.org
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13229
___
___
Nick Coghlan ncogh...@gmail.com added the comment:
And walkdir is now a published package: http://walkdir.readthedocs.org
My plan for this issue now is to maintain walkdir as a standalone package for
2.7 and 3.2, but still add the functionality to shutil for 3.3+.
However, I'll gather
Nick Coghlan ncogh...@gmail.com added the comment:
I changed the package name to walkdir:
https://bitbucket.org/ncoghlan/walkdir/overview
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13229
Nick Coghlan ncogh...@gmail.com added the comment:
A related idea is updating os.walk tuples to be a custom object offering a
namedtuple style API (similar to sys.float_info).
I created a separate issue for that: #13375
I've also updated the title of this issue to describe the problem it aims
13 matches
Mail list logo