> We should mimic os.stat() and os.stat_result: os.stat_result symbol
> exists in the os namespace, but the type constructor is not
> documented. No need for extra protection like not adding the type in
> the os module, or adding a "_" prefix to the name.
Yeah, that works for me.
> By the way, it
> I asked privately Guido van Rossum if I can be the BDFL-delegate for
> the PEP 471 and he agreed. I accept the latest version of the PEP:
>
> http://legacy.python.org/dev/peps/pep-0471/
Thank you!
> The PEP also explicitly mentions that os.walk() will be modified to
> benefit of the new os.
2014-07-21 18:48 GMT+02:00 Ben Hoyt :
>> By the way, DirEntry constructor is not documented in the PEP. Should
>> we document it? It might be a way to "invalidate the cache":
>
> I would prefer not to, just to keep things simple. Similar to creating
> os.stat_result() objects ... you can kind of do
Hi,
I asked privately Guido van Rossum if I can be the BDFL-delegate for
the PEP 471 and he agreed. I accept the latest version of the PEP:
http://legacy.python.org/dev/peps/pep-0471/
I consider that the PEP 471 "scandir" was discussed enough to collect
all possible options (variations of th
On 22 Jul 2014 02:46, "Steve Dower" wrote:
>
> Personally I'd make it a string subclass and put one-shot properties on
it (i.e. call/cache stat() on first access where we don't already know the
answer), which I think is close enough to where it's landed that I'm happy.
(As far as bikeshedding goes
Hi,
2014-07-21 21:26 GMT+02:00 matsjoyce :
> Sorry about being a bit late on this front (just 5 years...), but I've
> extended tav's jail to module level, and added the niceties. It's goal is
> similar to that of rexec, stopping IO, but not crashes. It is currently at
> https://github.com/matsjoyc
Sorry about being a bit late on this front (just 5 years...), but I've
extended tav's jail to module level, and added the niceties. It's goal is
similar to that of rexec, stopping IO, but not crashes. It is currently at
https://github.com/matsjoyce/sandypython, and it has instructions as to its
Thanks for an initial look into this, Victor.
> IMO the current os.scandir() API does not fit importlib requirements.
> importlib usually wants fresh data, whereas DirEntry cache cannot be
> invalidated. It's probably possible to cache some os.stat() result in
> importlib, but it looks like it req
Victor Stinner wrote:
> 2014-07-20 18:50 GMT+02:00 Antoine Pitrou :
>> Have you tried modifying importlib's _bootstrap.py to use scandir()
>> instead of listdir() + stat()?
>
> IMO the current os.scandir() API does not fit importlib requirements.
> importlib usually wants fresh data, whereas DirEn
Hi,
2014-07-20 18:50 GMT+02:00 Antoine Pitrou :
> Have you tried modifying importlib's _bootstrap.py to use scandir() instead
> of listdir() + stat()?
IMO the current os.scandir() API does not fit importlib requirements.
importlib usually wants fresh data, whereas DirEntry cache cannot be
invalid
> Even though there is tangible performance improvement from scandir(), it
> would be useful to find out if the API fits well.
Got it -- I see where you're coming from now. I'll take a quick look
(hopefully later this week).
-Ben
___
Python-Dev mailing
11 matches
Mail list logo