Skip to content

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

Closed

Description

@vstinner
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']

Activity

  1. vstinner commented on Jul 19, 2013

    @vstinner
    MemberAuthor

    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().

  2. BreamoreBoy commented on Jun 15, 2014

    BreamoreBoymannequin
    Mannequin

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

  3. vstinner commented on Mar 18, 2015

    @vstinner
    MemberAuthor

    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.

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions