[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Ethan Furman
On 11/03/2019 02:31 AM, Anders Hovmöller wrote: Side note! When switching subjects mid-thread, please re-title the subject. This side-note sub-thread is now nearly as long as the original thread. -- ~Ethan~ ___ Python-ideas mailing list -- python-

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Chris Angelico
On Mon, Nov 4, 2019 at 3:49 AM Anders Hovmöller wrote: > It's not a proposal though. It's way too late to change this now. I'm just > saying the situation for the switch wasn't ideal. I think we all agree on > that but for different reasons ;) > No, I don't think we do agree :) Some of us quit

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread MRAB
On 2019-11-03 08:24, Steven D'Aprano wrote: On Sat, Nov 02, 2019 at 07:31:55PM -0400, Eric V. Smith wrote: On 11/2/2019 7:24 PM, Steven D'Aprano wrote: >I see no reason why this shouldn't be allowed. It seems like a >straight-forward feature request, and one that is compatible with the >basic id

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Brendan Barnwell
On 2019-11-03 01:21, Steven D'Aprano wrote: On Sun, Nov 03, 2019 at 12:23:02AM -0700, Brendan Barnwell wrote: For the record, I have always thought that str.join should call str on all its arguments. The fact that it doesn't is really annoying. Given: values = ["Hello",

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Anders Hovmöller
> On 3 Nov 2019, at 16:50, Andrew Barnert wrote: > >  >> >>> On Nov 3, 2019, at 16:07, Anders Hovmöller wrote: >>> On 3 Nov 2019, at 13:31, Andrew Barnert wrote: >>> >>> On Nov 3, 2019, at 13:01, Anders Hovmöller wrote: Well, the last part requires that print can coerce

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Andrew Barnert via Python-ideas
> On Nov 3, 2019, at 16:07, Anders Hovmöller wrote: > >> On 3 Nov 2019, at 13:31, Andrew Barnert wrote: >> >> On Nov 3, 2019, at 13:01, Anders Hovmöller wrote: >>> >>> Well, the last part requires that print can coerce bytes to str, not >>> strictly that it must do so via str(). repr() shou

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Anders Hovmöller
> On 3 Nov 2019, at 13:31, Andrew Barnert wrote: > > On Nov 3, 2019, at 13:01, Anders Hovmöller wrote: >> >> Well, the last part requires that print can coerce bytes to str, not >> strictly that it must do so via str(). repr() should return b'foo' but str() >> could have returned . > > T

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread brunoais
Sorry about that. For some reason, the line got trimmed and I didn't notice when I sent the response. `Popen((PathLike))` is what I meant as you mention there ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to py

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Andrew Barnert via Python-ideas
On Nov 3, 2019, at 13:01, Anders Hovmöller wrote: > > Well, the last part requires that print can coerce bytes to str, not strictly > that it must do so via str(). repr() should return b'foo' but str() could > have returned . That would be very confusing. When they differ, it’s always repr th

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Serhiy Storchaka
03.11.19 12:31, Anders Hovmöller пише: On 3 Nov 2019, at 10:28, Steven D'Aprano wrote: Given: values = ["Hello", b"World"] would you expect ' '.join(values) to return "Hello b'World'" because that's what you'll get calling str automatically. Side note! That misfeature of python 3

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Anders Hovmöller
> On 3 Nov 2019, at 11:39, Chris Angelico wrote: > > On Sun, Nov 3, 2019 at 9:34 PM Anders Hovmöller wrote: >> >> >> On 3 Nov 2019, at 10:28, Steven D'Aprano wrote: >>> >>> On Sun, Nov 03, 2019 at 12:23:02AM -0700, Brendan Barnwell wrote: >>> For the record, I have always t

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Anders Hovmöller
> On 3 Nov 2019, at 12:17, Steven D'Aprano wrote: > > On Sun, Nov 03, 2019 at 11:31:22AM +0100, Anders Hovmöller wrote: > >>> Given: >>> values = ["Hello", b"World"] >>> would you expect ' '.join(values) to return >>> "Hello b'World'" >>> because that's what you'll get calling str automatic

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Steven D'Aprano
On Sun, Nov 03, 2019 at 11:31:22AM +0100, Anders Hovmöller wrote: > > Given: > > > >values = ["Hello", b"World"] > > > > would you expect ' '.join(values) to return > > > >"Hello b'World'" > > > > because that's what you'll get calling str automatically. > > Side note! > > That misf

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Chris Angelico
On Sun, Nov 3, 2019 at 9:34 PM Anders Hovmöller wrote: > > > > > On 3 Nov 2019, at 10:28, Steven D'Aprano wrote: > > > > On Sun, Nov 03, 2019 at 12:23:02AM -0700, Brendan Barnwell wrote: > > > >>For the record, I have always thought that str.join should call str > >>on all its arguments.

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Anders Hovmöller
> On 3 Nov 2019, at 10:28, Steven D'Aprano wrote: > > On Sun, Nov 03, 2019 at 12:23:02AM -0700, Brendan Barnwell wrote: > >>For the record, I have always thought that str.join should call str >>on all its arguments. The fact that it doesn't is really annoying. > > Given: > >va

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Steven D'Aprano
On Sun, Nov 03, 2019 at 12:23:02AM -0700, Brendan Barnwell wrote: > For the record, I have always thought that str.join should call str > on all its arguments. The fact that it doesn't is really annoying. Given: values = ["Hello", b"World"] would you expect ' '.join(values) to

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Steven D'Aprano
On Sat, Nov 02, 2019 at 07:31:55PM -0400, Eric V. Smith wrote: > On 11/2/2019 7:24 PM, Steven D'Aprano wrote: > >I see no reason why this shouldn't be allowed. It seems like a > >straight-forward feature request, and one that is compatible with the > >basic idea that Path objects should be usable a

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Gregory P. Smith
On Sun, Nov 3, 2019 at 12:33 AM Brendan Barnwell wrote: > On 2019-11-03 00:02, Eric V. Smith wrote: > > On 11/2/2019 10:02 PM, Jonathan Goble wrote: > >> So there's no reason in that regard to not allow it, and I'm +1 on the > idea. > > > > I disagree. I don't think there's precedent in Python fo

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Brendan Barnwell
On 2019-11-03 00:02, Eric V. Smith wrote: On 11/2/2019 10:02 PM, Jonathan Goble wrote: So there's no reason in that regard to not allow it, and I'm +1 on the idea. I disagree. I don't think there's precedent in Python for stringifying parameters. By your logic, shouldn't we also call str() on

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-03 Thread Eric V. Smith
On 11/2/2019 10:02 PM, Jonathan Goble wrote: On Sat, Nov 2, 2019 at 9:52 PM MRAB wrote: On 2019-11-03 00:38, Chris Angelico wrote: On Sun, Nov 3, 2019 at 11:34 AM Eric V. Smith wrote: On 11/2/2019 7:24 PM, Steven D'Aprano wrote: I see no reason why this shouldn't be allowed. It seems like

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Jonathan Goble
On Sat, Nov 2, 2019 at 9:52 PM MRAB wrote: > > On 2019-11-03 00:38, Chris Angelico wrote: > > On Sun, Nov 3, 2019 at 11:34 AM Eric V. Smith wrote: > >> > >> On 11/2/2019 7:24 PM, Steven D'Aprano wrote: > >> > I see no reason why this shouldn't be allowed. It seems like a > >> > straight-forward f

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread MRAB
On 2019-11-03 00:38, Chris Angelico wrote: On Sun, Nov 3, 2019 at 11:34 AM Eric V. Smith wrote: On 11/2/2019 7:24 PM, Steven D'Aprano wrote: > I see no reason why this shouldn't be allowed. It seems like a > straight-forward feature request, and one that is compatible with the > basic idea tha

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Chris Angelico
On Sun, Nov 3, 2019 at 11:34 AM Eric V. Smith wrote: > > On 11/2/2019 7:24 PM, Steven D'Aprano wrote: > > I see no reason why this shouldn't be allowed. It seems like a > > straight-forward feature request, and one that is compatible with the > > basic idea that Path objects should be usable anywh

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Eric V. Smith
On 11/2/2019 7:24 PM, Steven D'Aprano wrote: I see no reason why this shouldn't be allowed. It seems like a straight-forward feature request, and one that is compatible with the basic idea that Path objects should be usable anywhere you need a file name. The problem is that in the given example

[Python-ideas] Re: Allow Path object instances in subprocess.Popen

2019-11-02 Thread Steven D'Aprano
I see no reason why this shouldn't be allowed. It seems like a straight-forward feature request, and one that is compatible with the basic idea that Path objects should be usable anywhere you need a file name. You should just add an enhancement request on the bug tracker (but check to see if t