[issue38724] Implement subprocess.Popen.__repr__

2019-11-17 Thread Tal Einat


Tal Einat  added the comment:

Thanks for the suggestion Ram, and thanks for PR Andrey!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-17 Thread Tal Einat


Tal Einat  added the comment:


New changeset 645005e947c13c4a0706310a2a46112bf63cadc0 by Tal Einat (Andrey 
Doroschenko) in branch 'master':
bpo-38724: Implement subprocess.Popen.__repr__ (GH-17151)
https://github.com/python/cpython/commit/645005e947c13c4a0706310a2a46112bf63cadc0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-14 Thread Tal Einat


Tal Einat  added the comment:

I agree with Raymond, the repr should include the args and return code.

IMO it should *not* include the pid, for two reasons:
1. The pid is stale information if the process has finished.
2. Popen nicely abstracts away the pid, so it is normally not as useful a 
detail.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-14 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +16660
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/17151

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-13 Thread Debi Mishra


Debi Mishra  added the comment:

Hi @Jason.Killen. I am new to cpython and would like to try this one out. Thank 
you.

--
nosy: +mdebi

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 for a more informative repr (like we did with regex match objects).

There are a lot of parameters to subprocess.Popen().  RR is on the right track 
suggesting that only a small, useful subset of those be included:  args and the 
return code.  

We could add the *pid* argument as well, but may be no more useful or 
attractive than the current repr's object id.

The repr should be enclosed in angle brackets because it can't recreate the 
object.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-13 Thread Jason Killen


Jason Killen  added the comment:

I think this sounds great and I'll take a crack at it over the next few days.  
If anybody wants to jump ahead of me I don't mind.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-13 Thread Tal Einat


Change by Tal Einat :


--
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-13 Thread Tal Einat


Tal Einat  added the comment:

I agree that this could be nice. A PR (with tests!) would be welcome!

--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-13 Thread Jason Killen


Change by Jason Killen :


--
nosy: +Jason.Killen

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-06 Thread Ammar Askar


Change by Ammar Askar :


--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-06 Thread Ram Rachum


Change by Ram Rachum :


--
nosy: +taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38724] Implement subprocess.Popen.__repr__

2019-11-06 Thread Ram Rachum


New submission from Ram Rachum :

I was working with a Popen object recently in the shell and it was annoying to 
see the `` display. It would be nice to get some 
kind of minimal detail about the Popen, for example its args and return code, 
if finished.

--
components: Library (Lib)
messages: 356149
nosy: cool-RR, pitrou
priority: normal
severity: normal
status: open
title: Implement subprocess.Popen.__repr__
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com