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

Finish deprecating load_module() #69988

Closed
brettcannon opened this issue Dec 5, 2015 · 7 comments
Closed

Finish deprecating load_module() #69988

brettcannon opened this issue Dec 5, 2015 · 7 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@brettcannon
Copy link
Member

BPO 25802
Nosy @brettcannon, @ncoghlan, @ericsnowcurrently, @berkerpeksag
Files
  • issue25802.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 2016-01-08.22:33:48.336>
    created_at = <Date 2015-12-05.00:07:43.904>
    labels = ['library']
    title = 'Finish deprecating load_module()'
    updated_at = <Date 2016-01-08.22:33:48.335>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2016-01-08.22:33:48.335>
    actor = 'brett.cannon'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2016-01-08.22:33:48.336>
    closer = 'brett.cannon'
    components = ['Library (Lib)']
    creation = <Date 2015-12-05.00:07:43.904>
    creator = 'brett.cannon'
    dependencies = []
    files = ['41453']
    hgrepos = []
    issue_num = 25802
    keywords = ['patch']
    message_count = 7.0
    messages = ['255905', '257159', '257160', '257239', '257568', '257780', '257781']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'python-dev', 'eric.snow', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue25802'
    versions = ['Python 3.6']

    @brettcannon
    Copy link
    Member Author

    There are a couple concrete implementations of load_module() in importlib that have not been explicitly deprecated that probably should be. As part of this I will finally add an Examples section to the importlib docs to show how to do common tasks such as load a source file.

    @brettcannon brettcannon self-assigned this Dec 5, 2015
    @brettcannon brettcannon added the stdlib Python modules in the Lib dir label Dec 5, 2015
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 29, 2015

    New changeset ab0e60a36368 by Brett Cannon in branch 'default':
    Issue bpo-25802: Deprecate load_module() on importlib.machinery.SourceFileLoader and SourcelessFileLoader.
    https://hg.python.org/cpython/rev/ab0e60a36368

    @brettcannon
    Copy link
    Member Author

    I'm leaving this issue open until I add an Examples section to the importlib docs. I will use the imp module as a guide of what to document.

    @brettcannon
    Copy link
    Member Author

    Here is my attempt at adding an Examples section to the importlib docs. I cover importlib.util.find_spec(), importlib.import_module(), how to import a module by file path, and give an approximate import implementation for illustrative purposes.

    @berkerpeksag
    Copy link
    Member

    bpo-25802.diff looks good to me (just added a minor comment on Rietveld)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 8, 2016

    New changeset d733b6275e17 by Brett Cannon in branch 'default':
    Issue bpo-25802: Add an examples section to importlib.
    https://hg.python.org/cpython/rev/d733b6275e17

    @brettcannon
    Copy link
    Member Author

    Thanks for the review, Berker! I managed to figure out how to get the Examples links to work so that made it into the final version.

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

    No branches or pull requests

    2 participants