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

_imp_create_dynamic_impl() does not clear error. #79657

Closed
ericsnowcurrently opened this issue Dec 12, 2018 · 6 comments
Closed

_imp_create_dynamic_impl() does not clear error. #79657

ericsnowcurrently opened this issue Dec 12, 2018 · 6 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@ericsnowcurrently
Copy link
Member

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

    @ericsnowcurrently
    Copy link
    Member Author

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

    @ericsnowcurrently ericsnowcurrently added 3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Dec 12, 2018
    @isidentical
    Copy link
    Sponsor Member

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

    @brettcannon
    Copy link
    Member

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

    @ncoghlan
    Copy link
    Contributor

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

    @ericsnowcurrently
    Copy link
    Member Author

    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.

    @ericsnowcurrently
    Copy link
    Member Author

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

    @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
    3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants