> On 21 Sep 2022, at 14:58, Jean-Paul Calderone <exar...@twistedmatrix.com> 
> wrote:
> 
> 
> Hello,
> 
> I was reviewing some third-party code today and noticed many bugs in it that 
> arise from FilePath's caching behavior.
> 
> I found https://github.com/twisted/twisted/issues/3161 (only after I wrote up 
> https://github.com/twisted/twisted/issues/11676 though).
> 
> The cache behavior is long-standing but I think it needs to go.  It 
> represents a dangerous and subtle trap for anyone who tries to use FilePath, 
> which I would like to be everyone - but that would be an easier sell without 
> traps like this one.

There is talk I the ticket about os.listdir being a problem. Isn’t one option
to use os.scandir that includes some of the stat info for free?

Barry
> 
> Jean-Paul
> 
> _______________________________________________
> Twisted mailing list -- twisted@python.org
> To unsubscribe send an email to twisted-le...@python.org
> https://mail.python.org/mailman3/lists/twisted.python.org/
> Message archived at 
> https://mail.python.org/archives/list/twisted@python.org/message/36FC363TOBHKLFCEBT5KMBDLM2A5TBZ7/
> Code of Conduct: https://twisted.org/conduct
_______________________________________________
Twisted mailing list -- twisted@python.org
To unsubscribe send an email to twisted-le...@python.org
https://mail.python.org/mailman3/lists/twisted.python.org/
Message archived at 
https://mail.python.org/archives/list/twisted@python.org/message/ESZYFWJNJQJJRT6LBJFZBNNCMA56K75Y/
Code of Conduct: https://twisted.org/conduct

Reply via email to