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.

classification
Title: os._execvpe raises assignment error in python 3000 svn
Type: Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: nifan, nnorwitz
Priority: low Keywords:

Created on 2007-06-04 01:17 by nifan, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
os-execvpe.patch nnorwitz, 2007-06-04 05:59 v1
Messages (3)
msg32204 - (view) Author: nifan (nifan) Date: 2007-06-04 01:17
While converting/playing with our project and Python 3000 we hit upon this what we think is a small error in the os.py source.

We communicate with mercurial (hg command) and hit the following error:

http://qna.nu/paste/cnxx/

Thought it seems that the correct way to call subprocess.Popen is with a list not a string, the error it raises is still an variable referenced before assignment error.

Child Exception: http://qna.nu/paste/e5el/

Seems that with Python3000 and _execvpe, the raise statement ending the function uses 'e' before assignment.

Python 2.4 and Python 2.5 seems to do the correct thing and raise an OSError: [Errno 2] No such file or directory.
msg32205 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-06-04 05:59
Thanks for the report.  Can you test the attached patch?  The semantics for try/except have changed and this code doesn't look like it was updated.
File Added: os-execvpe.patch
msg32206 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-06-04 06:24
Nevermind.  I see in the link you have a test and can reproduce the problem.

Committed revision 55754.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 45033
2008-01-06 22:29:46adminsetkeywords: - py3k
versions: + Python 3.0
2007-06-04 01:17:03nifancreate