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

Update stdlib to use ModuleNotFoundError #62400

Closed
brettcannon opened this issue Jun 12, 2013 · 8 comments
Closed

Update stdlib to use ModuleNotFoundError #62400

brettcannon opened this issue Jun 12, 2013 · 8 comments
Assignees
Labels
easy stdlib Python modules in the Lib dir

Comments

@brettcannon
Copy link
Member

BPO 18200
Nosy @brettcannon, @jcea
Files
  • use_ModuleNotFoundError.diff
  • 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 = 'https://github.com/brettcannon'
    closed_at = <Date 2013-07-04.22:16:59.328>
    created_at = <Date 2013-06-12.21:01:48.649>
    labels = ['easy', 'library']
    title = 'Update stdlib to use ModuleNotFoundError'
    updated_at = <Date 2013-07-05.13:20:15.794>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2013-07-05.13:20:15.794>
    actor = 'brett.cannon'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2013-07-04.22:16:59.328>
    closer = 'brett.cannon'
    components = ['Library (Lib)']
    creation = <Date 2013-06-12.21:01:48.649>
    creator = 'brett.cannon'
    dependencies = []
    files = ['30568']
    hgrepos = []
    issue_num = 18200
    keywords = ['patch', 'easy']
    message_count = 8.0
    messages = ['191047', '191053', '191056', '191100', '192308', '192319', '192326', '192332']
    nosy_count = 3.0
    nosy_names = ['brett.cannon', 'jcea', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue18200'
    versions = ['Python 3.4']

    @brettcannon
    Copy link
    Member Author

    The common idiom::

    try:
    import something
    except ImportError:
    pass

    should be updated to use ModuleNotFoundError instead to not accidentally swallow ImportError exceptions which signal actual errors.

    @brettcannon brettcannon added stdlib Python modules in the Lib dir easy labels Jun 12, 2013
    @brettcannon
    Copy link
    Member Author

    Changeset 84105:281857369a78 and 84106:c4d7228421df have some updates to use ModuleNotFoundError.

    @brettcannon
    Copy link
    Member Author

    Here is a patch that uses ModuleNotFoundError in the stdlib sans test modules.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 14, 2013

    New changeset 8d28d44f3a9a by Brett Cannon in branch 'default':
    Issue bpo-18200: Update the stdlib (except tests) to use
    http://hg.python.org/cpython/rev/8d28d44f3a9a

    @brettcannon brettcannon self-assigned this Jun 14, 2013
    @brettcannon
    Copy link
    Member Author

    As ModuleNotFoundError is going to be reverted so should the changesets for this issue.

    @brettcannon brettcannon reopened this Jul 4, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 4, 2013

    New changeset 7769c4d72806 by Brett Cannon in branch 'default':
    Issue bpo-18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
    http://hg.python.org/cpython/rev/7769c4d72806

    @jcea
    Copy link
    Member

    jcea commented Jul 5, 2013

    As ModuleNotFoundError is going to be reverted so should the changesets for this issue.

    Could you possibly clarify this?. Pointers?

    @brettcannon
    Copy link
    Member Author

    Discussion occurred on http://bugs.python.org/issue15767

    @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
    easy stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants