Skip to content

_imp_create_dynamic_impl() does not clear error. #79657

Closed

Description

@ericsnowcurrently
BPO 35476
Nosy @brettcannon, @ncoghlan, @ericsnowcurrently, @serhiy-storchaka, @isidentical
PRs
  • bpo-35476: clear error in _imp_create_dynamic_impl #14738
  • 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 2019-07-26.15:36:56.298>
    created_at = <Date 2018-12-12.19:21:19.747>
    labels = ['interpreter-core', '3.8', 'type-bug', '3.7']
    title = '_imp_create_dynamic_impl() does not clear error.'
    updated_at = <Date 2019-07-26.15:39:35.142>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2019-07-26.15:39:35.142>
    actor = 'eric.snow'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-07-26.15:36:56.298>
    closer = 'eric.snow'
    components = ['Interpreter Core']
    creation = <Date 2018-12-12.19:21:19.747>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35476
    keywords = ['patch']
    message_count = 6.0
    messages = ['331717', '347809', '348200', '348212', '348493', '348494']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'eric.snow', 'serhiy.storchaka', 'BTaskaya']
    pr_nums = ['14738']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35476'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    Activity

    1. ericsnowcurrently commented on Dec 12, 2018

      @ericsnowcurrently
      MemberAuthor

      In _imp_create_dynamic_impl() [1] the case where _PyImport_FindExtensionObject() returns NULL may leave an error set. Either the error should be raised (like _imp_create_builtin() does) or it should be cleared (via PyErr_Clear()).

    2. isidentical commented on Jul 13, 2019

      @isidentical
      SponsorMember

      Can you give me the case so i can reproduce this and test it.

    3. brettcannon commented on Jul 19, 2019

      @brettcannon
      Member

      Why would was want to swallow an exception? I think it would be better to let the exception propagate.

    4. ncoghlan commented on Jul 20, 2019

      @ncoghlan
      Contributor

      Agreed, raising the exception properly would be the way to go.

    5. ericsnowcurrently commented on Jul 26, 2019

      @ericsnowcurrently
      MemberAuthor

      Hmm, looks like this was already fixed by Serhiy (for bpo-35454) the day before I opened this issue. :)

      3.8/master: #55286 8905fcc
      3.7: #55314 62674f3
      3.6: #55315 8855d93

      That's what I get for not keeping my local clone up-to-date.

    6. ericsnowcurrently commented on Jul 26, 2019

      @ericsnowcurrently
      MemberAuthor

      Sorry, @batuhan. We appreciate your effort and would be glad to see more contributions from you. I hope you at least learned something positive while working on this. :)

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

      3.7 (EOL)end of life3.8 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions