[issue22536] subprocess should include filename in FileNotFoundError exception

2017-09-06 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-09-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 1dba3789e335f06e3b01cdc84070f2e828c9b861 by Gregory P. Smith in branch '3.6': bpo-22536 [3.6] Set filename in FileNotFoundError (#3305) https://github.com/python/cpython/commit/1dba3789e335f06e3b01cdc84070f2e828c9b861 --

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-09-04 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3335 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3241 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: right, the test needs to be excluded there. fixing... (bummer windows wasn't in the CI) -- ___ Python tracker ___ __

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread STINNER Victor
STINNER Victor added the comment: Your change makes test_subprocess f1iling on Windows. Example: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/891/steps/test/logs/stdio -- ___ Python tracker

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 8621bb5d93239316f97281826461b85072ff6db7 by Gregory P. Smith in branch 'master': bpo-22536: Set the filename in FileNotFoundError. (#3194) https://github.com/python/cpython/commit/8621bb5d93239316f97281826461b85072ff6db7 -- __

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3233 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-23 Thread Christian H
Christian H added the comment: I was also bitten by this bug, and would like to see it merged. The patch 22536-subprocess-exception-filename-2.patch looks fine to me. -- nosy: +Christian H ___ Python tracker _

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-29 Thread Travis Thieman
Travis Thieman added the comment: Thank you all for the helpful comments. A revised attempt is attached as -2.patch, with improved behavior around using cwd if the child is never called and orig_executable if it is. I opted not to fix the issue with the redundancy in the error message as I agr

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-19 Thread STINNER Victor
STINNER Victor added the comment: I wnated to say that args[0] is not the right filename if exec() was not called. Yes, there is also cwd for example. The logic to choose the filename should be done in the child. -- ___ Python tracker

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-19 Thread Akira Li
Akira Li added the comment: It would be inconsitent to provide filename only if exec is called e.g.: >>> import subprocess subprocess.call("not used", cwd="nonexistent") FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent' The error message shows the filename (cwd) des

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-19 Thread STINNER Victor
STINNER Victor added the comment: You should only add the filename if the error if a FileNotFound exception, not for any OSError, and only if exec() was called. It looks like the variable child_exec_never_called indicates if exec() was called. -- nosy: +haypo _

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-17 Thread Akira Li
Akira Li added the comment: If the_oserror.filename is not None then str(the_oserror) appends the filename twice: [Errno 2] No such file or directory: 'nonexistent': 'nonexistent' You could remove `err_msg += ':' ...` statements to avoid the repeatition. It may break the code that uses strerr

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-17 Thread Akira Li
Akira Li added the comment: I can confirm that without the patch the filename attribute is None despite being mentioned in strerror. Travis, you should use `orig_executable` instead of `args[0]` to cover: subprocess.call("exit 0", shell=True, executable='/nonexistent bash') case. And use `

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-15 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review versions: +Python 3.4 ___ Python tracker ___ ___ Python-bug

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-15 Thread Travis Thieman
Travis Thieman added the comment: The attached patch includes the first element in args in _execute_child to the OSError exception subclass. This correctly populates the 'filename' field on the resulting exception. A test is also included that fails without the patch. -- keywords: +pat

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-10-03 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-10-01 Thread Ned Deily
Changes by Ned Deily : -- assignee: ronaldoussoren -> components: +Library (Lib) -Interpreter Core, Macintosh nosy: +gregory.p.smith title: Missing filename in FileNotFoundError -> subprocess should include filename in FileNotFoundError exception versions: +Python 3.5 -Python 3.4