Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7248] test_importlib uses a fixed name in /tmp

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Nov 1, 2009, 2:41 PM

Post #1 of 5 (69 views)
Permalink
[issue7248] test_importlib uses a fixed name in /tmp

New submission from Antoine Pitrou <pitrou[at]free.fr>:

test_importlib uses fixed names in /tmp (e.g. /tmp/pkg), which will make
the tests fail is such files/dirs already exist and aren't writable by
the current user (which can happen if several users run the python test
suite...).

----------
assignee: brett.cannon
components: Library (Lib), Tests
messages: 94810
nosy: brett.cannon, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: test_importlib uses a fixed name in /tmp
type: behavior
versions: Python 3.1, Python 3.2

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7248>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 1, 2009, 3:10 PM

Post #2 of 5 (66 views)
Permalink
[issue7248] test_importlib uses a fixed name in /tmp [In reply to]

Brett Cannon <brett[at]python.org> added the comment:

Yeah, I should have used tempfile.mkdtemp().

----------

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7248>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 2, 2009, 12:16 PM

Post #3 of 5 (60 views)
Permalink
[issue7248] test_importlib uses a fixed name in /tmp [In reply to]

Antoine Pitrou <pitrou[at]free.fr> added the comment:

It sometimes seems to trigger another error:

======================================================================
ERROR: test_package (importlib.test.source.test_file_loader.SimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/importlib/test/source/util.py",
line 78, in create_modules
with open(file_path, 'w') as file:
IOError: [Errno 13] Permission denied: '/tmp/_pkg/__init__.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File
"/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/importlib/test/source/test_file_loader.py",
line 33, in test_package
with source_util.create_modules('_pkg.__init__') as mapping:
File
"/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/contextlib.py",
line 17, in __enter__
return next(self.gen)
File
"/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/importlib/test/source/util.py",
line 88, in create_modules
state_manager.__exit__(None, None, None)
UnboundLocalError: local variable 'state_manager' referenced before
assignment

----------

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7248>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 4, 2009, 5:17 PM

Post #4 of 5 (48 views)
Permalink
[issue7248] test_importlib uses a fixed name in /tmp [In reply to]

Brett Cannon <brett[at]python.org> added the comment:

r76113 fixes the name problem in py3k. After I fix the other issue I will
backport to 3.1.

----------

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7248>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 4, 2009, 5:34 PM

Post #5 of 5 (48 views)
Permalink
[issue7248] test_importlib uses a fixed name in /tmp [In reply to]

Brett Cannon <brett[at]python.org> added the comment:

r76114 has the temp directory fix. r76115 has the backport to 3.1.

----------
resolution: -> fixed
status: open -> closed

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7248>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.