Title: os.defpath includes unix /bin on windows
Type: Stage: resolved
Components: Library (Lib), Windows Versions: Python 3.4
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: WanderingLogic, brian.curtin, eric.araujo, techtonik, terry.reedy, tim.golden
Priority: normal Keywords: easy

Created on 2009-04-07 15:03 by techtonik, last changed 2014-11-05 20:06 by WanderingLogic. This issue is now closed.

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
>>> os.path.defpath

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.
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
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 (which may require a correct os.defpath).
Date User Action Args
2014-11-05 20:06:17WanderingLogicsetmessages: + msg230712
2014-11-05 18:45:09gvanrossumsetnosy: - gvanrossum
2014-11-05 18:41:30WanderingLogicsetnosy: + WanderingLogic
2014-05-06 19:15:01tim.goldensetstatus: open -> closed
resolution: wont fix
messages: + msg218006

stage: commit review -> resolved
2014-02-03 15:50:03BreamoreBoysetnosy: - BreamoreBoy
2013-10-25 11:03:10tim.goldensetmessages: + msg201230
versions: - Python 2.7, Python 3.3
2013-03-30 16:17:53terry.reedysetmessages: + msg185572
versions: + Python 3.3, Python 3.4, - Python 3.1, Python 3.2
2013-03-30 13:17:00BreamoreBoysetnosy: + BreamoreBoy
messages: + msg185556
2010-11-18 00:42:02eric.araujosetnosy: + tim.golden, brian.curtin, eric.araujo
messages: + msg121396
components: + Windows
2010-08-03 20:10:56terry.reedysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5
nosy: + terry.reedy

messages: + msg112663

keywords: + easy, - patch
stage: commit review
2009-04-08 10:49:46techtoniksetfiles: + issue5717.py26.patch

messages: + msg85766
2009-04-08 10:18:05techtoniksetfiles: + issue5717.py25.patch
keywords: + patch
2009-04-07 16:22:38gvanrossumsetnosy: + gvanrossum
messages: + msg85728
2009-04-07 15:03:49techtonikcreate