Opened 15 years ago

Closed 14 years ago

#328 closed defect (fixed)

Python bindings tests fail on Windows due to permissions error

Reported by: Charlie Hull Owned by: Olly Betts
Priority: normal Milestone: 1.1.0
Component: Xapian-bindings Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Microsoft Windows

Description

pythontest2.py:943:exceptions.OSError: [Errno 13] Permission denied: 'db_test_postingsource
flintlock'

941 942 del db

-> 943 shutil.rmtree(dbpath)

944 945 def test_postingsource2():

Traceback (most recent call last):

File "C:\work\xapian\xapian-SVN\xapian-core\win32\Release\Python\testsuite2.py", line 201, in runtest

test_fn()

File "C:\work\xapian\xapian-SVN\xapian-core\win32\Release\Python\pythontest2.py", line 943, in test_postingsource

shutil.rmtree(dbpath)

File "c:\Python24\lib\shutil.py", line 168, in rmtree

onerror(os.remove, fullname, sys.exc_info())

File "c:\Python24\lib\shutil.py", line 166, in rmtree

os.remove(fullname)

also :

pythontest2.py:968:exceptions.OSError: [Errno 13] Permission denied: 'db_test_postingsource2
flintlock'

966 967 del db

-> 968 shutil.rmtree(dbpath)

969 970 def test_value_stats():

Traceback (most recent call last):

File "C:\work\xapian\xapian-SVN\xapian-core\win32\Release\Python\testsuite2.py", line 201, in runtest

test_fn()

File "C:\work\xapian\xapian-SVN\xapian-core\win32\Release\Python\pythontest2.py", line 968, in test_postingsource2

shutil.rmtree(dbpath)

File "c:\Python24\lib\shutil.py", line 168, in rmtree

onerror(os.remove, fullname, sys.exc_info())

File "c:\Python24\lib\shutil.py", line 166, in rmtree

os.remove(fullname)

Change History (3)

comment:1 by Olly Betts, 15 years ago

It seems likely this was fixed months ago, by this change:

Wed Mar 25 17:31:28 GMT 2009  Richard Boulton <richard@lemurconsulting.com>

	* python/pythontest2.py: Change deletion of database objects to
	  Database.close() calls, which should be more robust across
	  different python implementations, and should also avoid problems
	  on windows when the temporary database directories are deleted if
	  other objects which aren't deleted have lingering references to
	  the database.

Charlie: can you confirm/deny if this is still a live issue?

comment:2 by Charlie Hull, 14 years ago

Fixed now, please close it.

comment:3 by Olly Betts, 14 years ago

Milestone: 1.1.0
Resolution: fixed
Status: newclosed

OK, from the date of the above entry, it would have been in 1.1.0.

Note: See TracTickets for help on using tickets.