Issue 5717: os.defpath includes unix /bin on windows (original) (raw)

Created on 2009-04-07 15:03 by techtonik, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue5717.py25.patch techtonik,2009-04-08 10:18
issue5717.py26.patch techtonik,2009-04-08 10:49
Messages (10)
msg85708 - (view) Author: anatoly techtonik (techtonik) Date: 2009-04-07 15:03
>>> import os >>> os.defpath '.;C:\\bin' >>> os.path.defpath '.;C:\\bin' >>> These are invalid paths on windows.
msg85728 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2009-04-07 16:22
Can you suggest a fix?
msg85766 - (view) Author: anatoly techtonik (techtonik) Date: 2009-04-08 10:49
On the second try it was much easier. For py3k I saw a post about removing defpath and some of its friends, with which I partially agree. http://groups.google.com/group/comp.lang.python/browse_thread/thread/e8072370bfbef398/a0215b5820f76c0e
msg112663 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-08-03 20:10
3.1.2 still has defpath and gives same erroneous result Patch is a trivial revision of one line in os.py.
msg121396 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-18 00:42
Adding our esteemed Windows experts for review.
msg185556 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2013-03-30 13:17
The code is still the same in 3.3.1rc1. Is this an opportunity to get this committed as it's a one line patch?
msg185572 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-03-30 16:17
Release candidates are separate from the main branch and only get critical patches selected by release manager. Changes usually reuire a new .rc. This seems to have fallen thru the crack between Brian and Tim. I suspect that the next line about (win) 'ce' is obsolete if still present.
msg201230 - (view) Author: Tim Golden (tim.golden) * (Python committer) Date: 2013-10-25 11:03
This is, in principle, a backwards-incompatible change as any code will stop working which relies on exec* running useful tools in c:\bin. (I have a c:\tools which is basically the same thing). Frankly, I'm -0 on changing it; it does no real harm that I can see. If we do decide to ditch it, I'd only do it for the current release and not backport.
msg218006 - (view) Author: Tim Golden (tim.golden) * (Python committer) Date: 2014-05-06 19:15
Closing, as no-one's come back after my -0 for 6 months.
msg230712 - (view) Author: Matt Frank (WanderingLogic) * Date: 2014-11-05 20:06
os.defpath also seems wrong on Mac (':') and Linux (':/bin:/bin/sh'. The extra ':' at the beginning means the same thing as '.:/bin:/bin/sh' which is probably a security problem. I just started up discussion on http://bugs.python.org/issue16353 (which may require a correct os.defpath).
History
Date User Action Args
2022-04-11 14:56:47 admin set github: 49967
2014-11-05 20:06:17 WanderingLogic set messages: +
2014-11-05 18:45:09 gvanrossum set nosy: - gvanrossum
2014-11-05 18:41:30 WanderingLogic set nosy: + WanderingLogic
2014-05-06 19:15:01 tim.golden set status: open -> closedresolution: wont fixmessages: + stage: commit review -> resolved
2014-02-03 15:50:03 BreamoreBoy set nosy: - BreamoreBoy
2013-10-25 11:03:10 tim.golden set messages: + versions: - Python 2.7, Python 3.3
2013-03-30 16:17:53 terry.reedy set messages: + versions: + Python 3.3, Python 3.4, - Python 3.1, Python 3.2
2013-03-30 13:17:00 BreamoreBoy set nosy: + BreamoreBoymessages: +
2010-11-18 00:42:02 eric.araujo set nosy: + tim.golden, brian.curtin, eric.araujomessages: + components: + Windows
2010-08-03 20:10:56 terry.reedy set versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5nosy: + terry.reedymessages: + keywords: + easy, - patchstage: commit review
2009-04-08 10:49:46 techtonik set files: + issue5717.py26.patchmessages: +
2009-04-08 10🔞05 techtonik set files: + issue5717.py25.patchkeywords: + patch
2009-04-07 16:22:38 gvanrossum set nosy: + gvanrossummessages: +
2009-04-07 15:03:49 techtonik create