[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

It seems like the original bug report was fixed, so I close it.

@Berker Peksag: Please open a new bug report if you see again the 
PermissionError error on Windows. I didn't see it recently.


> Well, I'm not sure the symlink is actually the problem. Apparently the 
> ".local" directory hadn't been created when the first test run.

I'm unable to reproduce this bug anymore. I named ~/.local to ~/.local.xxx: 
test_site pass (it starts by creating ~/.local/lib/python3.7/site-packages).

> I can't reproduce this locally. If remove ~/.local/lib/pythonX.Y and run 
> test_site, it creates the directory and modifies sys.path (this is a bug).

I fixed this bug: commit b85c136903c6d2368162f7c4a58f258c9c69ead0, issue #30108.

> I just saw a similar failure on AppVeyor: FAIL: test_s_option 
> (test.test_site.HelperFunctionsTests)

test_site failed twice. First run:

==
ERROR: test_underpth_file (test.test_site.StartupImportTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 577, in 
test_underpth_file
self._cleanup_underpth_exe(exe_file)
  File "C:\projects\cpython\lib\test\test_site.py", line 512, in 
_cleanup_underpth_exe
test.support.unlink(exe_file)
  File "C:\projects\cpython\lib\test\support\__init__.py", line 398, in unlink
_unlink(filename)
  File "C:\projects\cpython\lib\test\support\__init__.py", line 348, in _unlink
_waitfor(os.unlink, filename)
  File "C:\projects\cpython\lib\test\support\__init__.py", line 316, in _waitfor
func(pathname)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 
'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\python.exe'
==
ERROR: test_underpth_nosite_file (test.test_site.StartupImportTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 534, in 
test_underpth_nosite_file
exe_file = self._create_underpth_exe(pth_lines)
  File "C:\projects\cpython\lib\test\test_site.py", line 495, in 
_create_underpth_exe
shutil.copy(sys.executable, exe_file)
  File "C:\projects\cpython\lib\shutil.py", line 241, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\projects\cpython\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 
'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\python.exe'


Second run:

==
FAIL: test_s_option (test.test_site.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 173, in test_s_option
self.assertIn(usersite, sys.path)
AssertionError: 
'C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python36\\site-packages' not 
found in ['', 'C:\\projects\\cpython\\PCbuild\\win32\\python36.zip', 
'C:\\projects\\cpython\\DLLs', 'C:\\projects\\cpython\\lib', 
'C:\\projects\\cpython\\PCbuild\\win32', 'C:\\projects\\cpython', 
'C:\\projects\\cpython\\lib\\site-packages']


The first failures are unrelated to this bug report. The first failure 
(PermissionError: [WinError 32] The process cannot access the file because it 
is being used by another process) seems like an antivirus holding the file 
open. Please open a different bug report if you see it again.

--
nosy: +haypo
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2017-03-17 Thread Berker Peksag

Berker Peksag added the comment:

I just saw a similar failure on AppVeyor:

==
FAIL: test_s_option (test.test_site.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 173, in test_s_option
self.assertIn(usersite, sys.path)
AssertionError: 
'C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python36\\site-packages' not 
found in ['', 'C:\\projects\\cpython\\PCbuild\\win32\\python36.zip', 
'C:\\projects\\cpython\\DLLs', 'C:\\projects\\cpython\\lib', 
'C:\\projects\\cpython\\PCbuild\\win32', 'C:\\projects\\cpython', 
'C:\\projects\\cpython\\lib\\site-packages']

https://ci.appveyor.com/project/python/cpython/build/3.6.1rc1+.474#L3230

--
nosy: +berker.peksag

___
Python tracker 

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2015-12-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This problem still occurs.

http://buildbot.python.org/all/builders/x86-64%20Ubuntu%2014.04%20ICC%20Debug%203.5/builds/275/steps/test/logs/stdio

==
FAIL: test_s_option (test.test_site.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "/buildarea/3.5.intel-ubuntu-icc/build/Lib/test/test_site.py", line 169, 
in test_s_option
self.assertIn(usersite, sys.path)
AssertionError: '/var/lib/buildbot/.local/lib/python3.5/site-packages' not 
found in ['', '/usr/local/lib/python35.zip', 
'/buildarea/3.5.intel-ubuntu-icc/build/Lib', 
'/buildarea/3.5.intel-ubuntu-icc/build/Lib/plat-linux', 
'/buildarea/3.5.intel-ubuntu-icc/build/build/lib.linux-x86_64-3.5-pydebug']

--

On 3.5 the test is failed randomly, on 3.4 it is failed all time.

I can't reproduce this locally. If remove ~/.local/lib/pythonX.Y and run 
test_site, it creates the directory and modifies sys.path (this is a bug).

$ rm -rf ~/.local/lib/python3.4
$ ./python -m test.regrtest -uall -vv test_site
...
Ran 21 tests in 0.277s

OK (skipped=2)
Warning -- sys.path was modified by test_site
  Before: (3071378764, ['', '/usr/local/lib/python34.zip', 
'/home/serhiy/py/cpython3.4/Lib', '/home/serhiy/py/cpython3.4/Lib/plat-linux', 
'/home/serhiy/py/cpython3.4/build/lib.linux-i686-3.4'], ['', 
'/usr/local/lib/python34.zip', '/home/serhiy/py/cpython3.4/Lib', 
'/home/serhiy/py/cpython3.4/Lib/plat-linux', 
'/home/serhiy/py/cpython3.4/build/lib.linux-i686-3.4'])
  After:  (3071378764, ['', '/usr/local/lib/python34.zip', 
'/home/serhiy/py/cpython3.4/Lib', '/home/serhiy/py/cpython3.4/Lib/plat-linux', 
'/home/serhiy/py/cpython3.4/build/lib.linux-i686-3.4'], ['', 
'/usr/local/lib/python34.zip', '/home/serhiy/py/cpython3.4/Lib', 
'/home/serhiy/py/cpython3.4/Lib/plat-linux', 
'/home/serhiy/py/cpython3.4/build/lib.linux-i686-3.4', 
'/home/serhiy/.local/lib/python3.4/site-packages']) 
1 test altered the execution environment:
test_site

--
nosy: +serhiy.storchaka
resolution: out of date -> 
stage: resolved -> 
status: closed -> open
versions: +Python 3.6

___
Python tracker 

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2015-12-12 Thread Martin Panter

Martin Panter added the comment:

I can’t imagine why the buildbot is failing either.

The directory is created and added to sys.path when test_site is imported:

if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
# need to add user site directory for tests
os.makedirs(site.USER_SITE)
site.addsitedir(site.USER_SITE)

Maybe it should be changed to skip test_s_option() if the directory is missing; 
I dunno. Another option might be to create it just for the test, and then 
remove it, but that risks interfering with concurrent tests.

--
nosy: +martin.panter

___
Python tracker 

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2014-08-19 Thread Ned Deily

Ned Deily added the comment:

Closing, since this problem apparently no longer occurs

--
resolution:  - out of date
stage: needs patch - resolved
status: open - closed

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2014-06-22 Thread YJ Chen

YJ Chen added the comment:

Works for 3.4 and 3.5 but could not successfully run test on 2.7.

Error:
==
FAIL: test_getsitepackages (test.test_site.HelperFunctionsTests)
--
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/test/test_site.py,
 line 247, in test_getsitepackages
self.assertEqual(len(dirs), 4)
AssertionError: 2 != 4

==
FAIL: test_getuserbase (test.test_site.HelperFunctionsTests)
--
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/test/test_site.py,
 line 210, in test_getuserbase
site.getuserbase())
AssertionError: /Users/yjchen/Library/Python/2.7

==
FAIL: test_s_option (test.test_site.HelperFunctionsTests)
--
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/test/test_site.py,
 line 193, in test_s_option
self.assertEqual(rc, 1)
AssertionError: 0 != 1

--

--
nosy: +yjchen

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2014-06-22 Thread Ned Deily

Ned Deily added the comment:

YJ, the test_site failures you are seeing should have been fixed by the changes 
for Issue10881 (82c4f094f811) that were released with Python 2.7.3.  Please 
update your Python 2.7 to the latest release (currently 2.7.7).

Otherwise, unless somebody is able to reproduce the original failure (I can't 
so far), I think we should close this issue.

--
nosy: +ned.deily

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2014-06-20 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
assignee: tarek - 
versions: +Python 3.4, Python 3.5 -Python 3.2

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2011-06-09 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Related: I found that test_site tries to create the user site-packages dir if 
it does not exist, but it does not remove it after the test run.

--

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2010-11-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Is this still relevant?

--
nosy: +eric.araujo

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2009-11-07 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
title: test_site failure when Python gets installed along a symbolic link - 
test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created 
yet

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