This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author remi.lapeyre
Recipients Antony.Lee, brett.cannon, pitrou, remi.lapeyre, rhettinger
Date 2020-02-28.21:41:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582926112.94.0.890494554536.issue39783@roundup.psfhosted.org>
In-reply-to
Content
> Decorating __new__ with lru_cache would likely run into memory leakage problems?

I think the LRU cache would be for returning the same instance when called with the same string. I don't think it would be needed to return the same instance when called with a Path instance.

> From a quick look it appears to only be settable by using the path (not the actual file) as a context manager, and only serves to block further filesystem methods, but I'm not even sure why?

This came up in bpo-39682 recently, I'm not sure what this flag is supposed to mean and I could not find it in the documentation.

Since it's uncorrelated to the file object and the physical file, I think it may actually be dangerous to rely on this flag. I don't know why is the purpose of using Path as a context manager.
History
Date User Action Args
2020-02-28 21:41:52remi.lapeyresetrecipients: + remi.lapeyre, brett.cannon, rhettinger, pitrou, Antony.Lee
2020-02-28 21:41:52remi.lapeyresetmessageid: <1582926112.94.0.890494554536.issue39783@roundup.psfhosted.org>
2020-02-28 21:41:52remi.lapeyrelinkissue39783 messages
2020-02-28 21:41:52remi.lapeyrecreate