Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_tarfile writes in Lib/test directory #38425

Closed
jackjansen opened this issue May 2, 2003 · 2 comments
Closed

test_tarfile writes in Lib/test directory #38425

jackjansen opened this issue May 2, 2003 · 2 comments
Assignees

Comments

@jackjansen
Copy link
Member

BPO 731403
Nosy @brettcannon, @jackjansen

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/brettcannon'
closed_at = <Date 2003-06-12.08:03:19.000>
created_at = <Date 2003-05-02.15:20:24.000>
labels = []
title = 'test_tarfile writes in Lib/test directory'
updated_at = <Date 2003-06-12.08:03:19.000>
user = 'https://github.com/jackjansen'

bugs.python.org fields:

activity = <Date 2003-06-12.08:03:19.000>
actor = 'brett.cannon'
assignee = 'brett.cannon'
closed = True
closed_date = None
closer = None
components = ['None']
creation = <Date 2003-05-02.15:20:24.000>
creator = 'jackjansen'
dependencies = []
files = []
hgrepos = []
issue_num = 731403
keywords = []
message_count = 2.0
messages = ['15821', '15822']
nosy_count = 2.0
nosy_names = ['brett.cannon', 'jackjansen']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue731403'
versions = []

@jackjansen
Copy link
Member Author

Test_tarfile writes a file in the Lib/test directory, which fails if Python
has been installed read-only. It would be better if it used
test_support.TESTFN as the basis for a filename to write to.

Here's the message for a binary install on MacOSX (framework
Python):

test test_tarfile crashed -- exceptions.IOError: [Errno 13] Permission
denied: '/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/test/testtar.tar.gz'

@brettcannon
Copy link
Member

Logged In: YES
user_id=357491

Fixed the temp file name to use test_support.TESTFN and the
temp directory to use tempfile.gettempdir . Also fixed the
fetching of path names to use the functions used in the file
instead of getting it from the global variables.

Changed filename to be absolute for testar.tar instead of using
os.extsep since name is locked in since it is in CVS.

All checked in as revision 1.10 .

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants