[issue13304] test_site assumes that site.ENABLE_USER_SITE is True

2011-10-31 Thread Ned Deily

Ned Deily  added the comment:

LGTM. Thanks for the patch!  Committed to 27 (for release in 2.7.3), 32 
(3.2.3), and default (3.3).

--
assignee:  -> ned.deily
nosy: +ned.deily
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13304] test_site assumes that site.ENABLE_USER_SITE is True

2011-10-31 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1689b9cf6b1c by Ned Deily in branch '2.7':
Issue #13304: Skip test case if user site-packages disabled (-s or
http://hg.python.org/cpython/rev/1689b9cf6b1c

New changeset c497011a4769 by Ned Deily in branch '3.2':
Issue #13304: Skip test case if user site-packages disabled (-s or
http://hg.python.org/cpython/rev/c497011a4769

New changeset c343c095d08b by Ned Deily in branch 'default':
Issue #13304: Skip test case if user site-packages disabled (-s or
http://hg.python.org/cpython/rev/c343c095d08b

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13304] test_site assumes that site.ENABLE_USER_SITE is True

2011-10-31 Thread Carl Meyer

Changes by Carl Meyer :


Added file: http://bugs.python.org/file23576/d851c64c745a.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13304] test_site assumes that site.ENABLE_USER_SITE is True

2011-10-31 Thread Carl Meyer

Changes by Carl Meyer :


Removed file: http://bugs.python.org/file23575/cea40c2d7323.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13304] test_site assumes that site.ENABLE_USER_SITE is True

2011-10-31 Thread Carl Meyer

Changes by Carl Meyer :


--
keywords: +patch
Added file: http://bugs.python.org/file23575/cea40c2d7323.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13304] test_site assumes that site.ENABLE_USER_SITE is True

2011-10-31 Thread Carl Meyer

Carl Meyer  added the comment:

Added a patch implementing my proposed fix.

--
hgrepos: +87

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13304] test_site assumes that site.ENABLE_USER_SITE is True

2011-10-31 Thread Carl Meyer

New submission from Carl Meyer :

If the test suite is run with PYTHONNOUSERSITE=true, the test_s_option test in 
test_site fails, because it implicitly assumes that site.ENABLE_USER_SITE is 
True and that site.USER_SITE should unconditionally be in sys.path.

This is a practical problem in the reference implementation for PEP 404, as the 
tests should pass when run from within a virtual environment, but a 
system-isolated virtual environment disables user-site (i.e. has the same 
effect as PYTHONNOUSERSITE).

I think the correct fix here is to conditionally skip that test if 
site.ENABLE_USER_SITE is not True.

I also think the module-level conditional check at the top of the file, which, 
if site.USER_SITE does not exist, creates site.USER_SITE and calls 
site.addsitedir() on it, should only run if site.ENABLE_USER_SITE is True.

--
components: Tests
messages: 146722
nosy: carljm
priority: normal
severity: normal
status: open
title: test_site assumes that site.ENABLE_USER_SITE is True

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com