[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread STINNER Victor
STINNER Victor added the comment: > This patch fixes the issue but needs review. > It is my first patch ever so be nice :) Python should not decide what is the default home directory. The issue is in the site module: I proposed nonexistent_user.patch in the issue #10496 to fix the issue in th

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: Indeed. -- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> "import site failed" when Python can't find home directory (sysconfig._getuserbase) ___ Python tracke

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread Ali Ikinci
Ali Ikinci added the comment: I would suggest that this issue is the same as http://bugs.python.org/issue10496 like Victor pointed out and would say close it because it is a duplicate. -- ___ Python tracker

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #10496. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread Arkadiusz Miskiewicz Arkadiusz Miskiewicz
Arkadiusz MiskiewiczArkadiusz Miskiewicz added the comment: $ LC_ALL=C sudo -u '#' -g '#' /bin/sh -c 'unset HOME ; python -c ""' Traceback (most recent call last): File "/usr/share/python2.7/site.py", line 567, in main() File "/usr/share/python2.7/s

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread Éric Araujo
Éric Araujo added the comment: Thanks you for your contribution! I hope you’ll find fun bugs to make patches for. Your patch looks too simplistic; in the discussion, we agreed that if the lookup fails, the site module should not add user site directories (see http://docs.python.org/library/

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread Ali Ikinci
Ali Ikinci added the comment: This patch fixes the issue but needs review. It is my first patch ever so be nice :) -- keywords: +patch Added file: http://bugs.python.org/file24800/issue14238.patch ___ Python tracker

[issue14238] python shouldn't need username in passwd database

2012-03-12 Thread Ali Ikinci
Ali Ikinci added the comment: I have started to work on this. -- nosy: +aikinci ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14238] python shouldn't need username in passwd database

2012-03-09 Thread Éric Araujo
Éric Araujo added the comment: > there should be a guard here that just doesn't add user site directories if > the lookup fails. Agreed too. site is easy to fix (I can do it or review a patch), but we also need to fix sysconfig; I think the right thing to do would be not to have a config var

[issue14238] python shouldn't need username in passwd database

2012-03-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +easy nosy: +eric.araujo versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list ma

[issue14238] python shouldn't need username in passwd database

2012-03-09 Thread Georg Brandl
Georg Brandl added the comment: I agree -- there should be a guard here that just doesn't add user site directories if the lookup fails. -- nosy: +georg.brandl ___ Python tracker _

[issue14238] python shouldn't need username in passwd database

2012-03-09 Thread Nadeem Vawda
Nadeem Vawda added the comment: This looks similar to a sporadic failure on the debian bigmem buildbot: http://www.python.org/dev/buildbot/all/builders/AMD64%20debian%20bigmem%203.x/builds/168/steps/test/logs/stdio ERROR: test_expanduser (test.test_posixpath.PosixPathTest)

[issue14238] python shouldn't need username in passwd database

2012-03-09 Thread Arkadiusz Miskiewicz Arkadiusz Miskiewicz
New submission from Arkadiusz Miskiewicz Arkadiusz Miskiewicz : I'm trying to run python from UID which doesn't have entry in passwd database. This fails with: Traceback (most recent call last): File "/usr/share/python2.7/site.py", line 567, in File "/usr/share