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.support.open_urlresource should work from an installed Python #72188

Open
zware opened this issue Sep 7, 2016 · 2 comments
Open

test.support.open_urlresource should work from an installed Python #72188

zware opened this issue Sep 7, 2016 · 2 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@zware
Copy link
Member

zware commented Sep 7, 2016

BPO 28001
Nosy @tiran, @bitdancer, @zware

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 = None
closed_at = None
created_at = <Date 2016-09-07.16:59:06.272>
labels = ['type-bug']
title = 'test.support.open_urlresource should work from an installed Python'
updated_at = <Date 2016-09-07.16:59:06.272>
user = 'https://github.com/zware'

bugs.python.org fields:

activity = <Date 2016-09-07.16:59:06.272>
actor = 'zach.ware'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2016-09-07.16:59:06.272>
creator = 'zach.ware'
dependencies = []
files = []
hgrepos = []
issue_num = 28001
keywords = []
message_count = None
messages = []
nosy_count = 3.0
nosy_names = ['christian.heimes', 'r.david.murray', 'zach.ware']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue28001'
versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

@zware zware added the type-bug An unexpected behavior, bug, or error label Sep 7, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@erlend-aasland erlend-aasland added the tests Tests in the Lib/test dir label May 16, 2022
@kumaraditya303
Copy link
Contributor

@zware Can you verify if this still doesn't work on main? Can you provide the error traceback?

@zware
Copy link
Member Author

zware commented Sep 6, 2022

I didn't leave enough breadcrumbs on this one; I have no idea what the issue was originally. From a quick look at the code, maybe the issue is that it expects the install location (particularly <prefix>/lib/python/3.xx/test/data) to be writable? This doesn't seem to be a problem in practice; each use of open_urlresource seems to catch the OSError that would happen in the case of being unable to write the downloaded data. However, it does mean that when run from an installed, unwritable location the tests that use this function just get skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants