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 mkocher
Recipients WildCard65, gregory.p.smith, mkocher, rhettinger
Date 2021-04-24.04:37:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619239080.61.0.902216297165.issue43776@roundup.psfhosted.org>
In-reply-to
Content
There also appears to be an issue when args are provided as a `pathlib.Path` instance.


Python 3.9.2 | packaged by conda-forge | (default, Feb 21 2021, 05:02:20) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from subprocess import Popen

In [2]: from pathlib import Path

In [3]: p = Path('/usr/local/bin/gtrue')

In [4]: x = Popen(p)

In [5]: repr(x)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-5091dd558c19> in <module>
----> 1 repr(x)

~/opt/miniconda3/envs/core/lib/python3.9/subprocess.py in __repr__(self)
    990         obj_repr = (
    991             f"<{self.__class__.__name__}: "
--> 992             f"returncode: {self.returncode} args: {list(self.args)!r}>"
    993         )
    994         if len(obj_repr) > 80:

TypeError: 'PosixPath' object is not iterable
History
Date User Action Args
2021-04-24 04:38:00mkochersetrecipients: + mkocher, rhettinger, gregory.p.smith, WildCard65
2021-04-24 04:38:00mkochersetmessageid: <1619239080.61.0.902216297165.issue43776@roundup.psfhosted.org>
2021-04-24 04:38:00mkocherlinkissue43776 messages
2021-04-24 04:37:59mkochercreate