[Python-ideas] Re: pathlib.Path(...).json() (again)

2021-07-10 Thread Steven D'Aprano
On Sat, Jul 10, 2021 at 09:21:14AM -, Thomas Grainger wrote: > It's a utility method, so its usefulness derives from being available > everywhere without having to patch it in. Don't mistake *convenience* with *usefulness*. It is convenient to have the functionality in the std lib,

[Python-ideas] Re: pathlib.Path(...).json() (again)

2021-07-10 Thread Thomas Grainger
> It opens the file in the main thread, and not asynchronously, but doesn't the file itself get read in the other thead, asynchronously? And is there any extra RAM used? The file could be on an external network drive and so opening it may block the main thread for seconds: ``` with

[Python-ideas] Re: pathlib.Path(...).json() (again)

2021-07-10 Thread Thomas Grainger
It's a utility method, so its usefulness derives from being available everywhere without having to patch it in. For me what's changed is the introduction of `asyncio.to_thread` and PEP 597 making `pathlib.Path.open` slightly less ergonomic, ___

[Python-ideas] Re: pathlib.Path(...).json() (again)

2021-07-09 Thread Christopher Barker
On Fri, Jul 9, 2021 at 6:21 PM Steven D'Aprano wrote: > Has anything changed since the last time it was discussed? If nothing > has changed, and there are no new arguments in favour of the change, why > do you think the result will be any different? > Note: one thing that has not been rejected,

[Python-ideas] Re: pathlib.Path(...).json() (again)

2021-07-09 Thread Steven D'Aprano
Hi Thomas, On Fri, Jul 09, 2021 at 05:54:27PM -, Thomas Grainger wrote: > It's been brought up a few times eg: > https://github.com/python/cpython/pull/12465 > > but I really think it's time to be re-considered. Has anything changed since the last time it was discussed? If nothing has