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

import_init() should not use Py_FatalError() but return an error #62707

Closed
vstinner opened this issue Jul 19, 2013 · 3 comments
Closed

import_init() should not use Py_FatalError() but return an error #62707

vstinner opened this issue Jul 19, 2013 · 3 comments
Labels
type-feature A feature request or enhancement

Comments

@vstinner
Copy link
Member

BPO 18507
Nosy @brettcannon, @ncoghlan, @vstinner

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 = <Date 2015-03-18.11:07:14.555>
created_at = <Date 2013-07-19.21:39:11.794>
labels = ['type-feature']
title = 'import_init() should not use Py_FatalError() but return an error'
updated_at = <Date 2015-03-18.11:07:14.553>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2015-03-18.11:07:14.553>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2015-03-18.11:07:14.555>
closer = 'vstinner'
components = []
creation = <Date 2013-07-19.21:39:11.794>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 18507
keywords = []
message_count = 3.0
messages = ['193377', '220627', '238418']
nosy_count = 4.0
nosy_names = ['brett.cannon', 'ncoghlan', 'vstinner', 'BreamoreBoy']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue18507'
versions = ['Python 3.5']

@vstinner
Copy link
Member Author

The import_init() function calls Py_FatalError() at any error. This is not kind for Py_NewInterpreter() which calls import_init(): Py_NewInterpreter() exits Python with a fatal error, instead of returning NULL, on import_init() failure. The pyfailmalloc tool can be used to easily inject faults (memory allocation failure) to test this issue: see issue bpo-18408.

import_init() should return an error instead of using Py_FatalError().

@vstinner vstinner added the type-feature A feature request or enhancement label Jul 19, 2013
@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Jun 15, 2014

Just making sure this hasn't slipped under the radar.

@vstinner
Copy link
Member Author

This issue was more a reminder for myself (TODO list). I'm no more interested to work on the issue, so I just close it.

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

No branches or pull requests

1 participant