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

Switch applicable importlib tests to use PEP 451 API #65298

Closed
ericsnowcurrently opened this issue Mar 29, 2014 · 11 comments
Closed

Switch applicable importlib tests to use PEP 451 API #65298

ericsnowcurrently opened this issue Mar 29, 2014 · 11 comments
Assignees
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@ericsnowcurrently
Copy link
Member

BPO 21099
Nosy @brettcannon, @ncoghlan, @ericsnowcurrently
Files
  • issue21099-better-use-of-451-api.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/ericsnowcurrently'
    closed_at = <Date 2016-05-12.14:35:19.787>
    created_at = <Date 2014-03-29.21:34:35.100>
    labels = ['type-feature', 'tests']
    title = 'Switch applicable importlib tests to use PEP 451 API'
    updated_at = <Date 2016-05-12.14:35:19.785>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2016-05-12.14:35:19.785>
    actor = 'eric.snow'
    assignee = 'eric.snow'
    closed = True
    closed_date = <Date 2016-05-12.14:35:19.787>
    closer = 'eric.snow'
    components = ['Tests']
    creation = <Date 2014-03-29.21:34:35.100>
    creator = 'eric.snow'
    dependencies = []
    files = ['34663']
    hgrepos = []
    issue_num = 21099
    keywords = ['patch']
    message_count = 11.0
    messages = ['215147', '215150', '215151', '215161', '222288', '232567', '236536', '265282', '265283', '265347', '265407']
    nosy_count = 4.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'python-dev', 'eric.snow']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21099'
    versions = ['Python 3.6']

    @ericsnowcurrently
    Copy link
    Member Author

    (from msg202657 in bpo-18864)

    A bunch of importlib (and other?) tests make direct calls to find_module(), find_loader(), or load_module(). These are still working, as expected. However, we should probably either replace them or supplement them with equivalent tests that make use of specs directly.

    @ericsnowcurrently ericsnowcurrently self-assigned this Mar 29, 2014
    @ericsnowcurrently ericsnowcurrently added tests Tests in the Lib/test dir type-feature A feature request or enhancement labels Mar 29, 2014
    @ncoghlan
    Copy link
    Contributor

    New tests please - we want to make sure these keep working unless/until we reach agreement to actually remove them, and I'd prefer not to raise any new barriers to migration from Python 2.6/7 until 3.6 at the earliest :)

    @ericsnowcurrently
    Copy link
    Member Author

    Agreed. :)

    @ericsnowcurrently
    Copy link
    Member Author

    Here's a patch. In most spots I'm left things alone.

    There is a comment in the docstring for test_abc.SourceOnlyLoaderTests about reload-related tests and module_for_loader (which is deprecated now). I'm not going to worry about that for now.

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 4, 2014

    Can we have a patch review please as bpo-18864 is dependent on this.

    @brettcannon
    Copy link
    Member

    Should this be closed, Eric?

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Feb 24, 2015

    To echo Brett's question, should this be closed, Eric?

    @ericsnowcurrently
    Copy link
    Member Author

    Could I get a quick review on this. There shouldn't be anything surprising or controversial here. I'm pretty confident about the patch and it's pretty low-impact so if I don't hear back in the next day or two I'll merge it.

    Note: the posted patch does not apply cleanly but the difference is cosmetic.

    @brettcannon
    Copy link
    Member

    I'll try to get to it today or tomorrow.

    @brettcannon
    Copy link
    Member

    Patch LGTM

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 12, 2016

    New changeset fceaa0dc715e by Eric Snow in branch 'default':
    Issue bpo-21099: Switch applicable importlib tests to use PEP-451 API.
    https://hg.python.org/cpython/rev/fceaa0dc715e

    @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
    tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants