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

Move ensurepip off of pkgutil and to importlib.resources #81630

Closed
brettcannon opened this issue Jun 30, 2019 · 4 comments
Closed

Move ensurepip off of pkgutil and to importlib.resources #81630

brettcannon opened this issue Jun 30, 2019 · 4 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@brettcannon
Copy link
Member

BPO 37449
Nosy @warsaw, @brettcannon, @jaraco, @wimglenn, @miss-islington, @nanjekyejoannah
PRs
  • bpo-37449: Move ensurepip off of pkgutil and to importlib.resources #15109
  • bpo-37449: ensurepip uses importlib.resources.files() traversable APIs #22659
  • 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-09-17.18:21:07.724>
    created_at = <Date 2019-06-30.02:12:52.217>
    labels = ['type-feature', 'library', '3.9']
    title = 'Move ensurepip off of pkgutil and to importlib.resources'
    updated_at = <Date 2021-06-07.02:14:53.896>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2021-06-07.02:14:53.896>
    actor = 'jaraco'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-09-17.18:21:07.724>
    closer = 'brett.cannon'
    components = ['Library (Lib)']
    creation = <Date 2019-06-30.02:12:52.217>
    creator = 'brett.cannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37449
    keywords = ['patch']
    message_count = 4.0
    messages = ['346907', '348993', '352353', '395242']
    nosy_count = 6.0
    nosy_names = ['barry', 'brett.cannon', 'jaraco', 'wim.glenn', 'miss-islington', 'nanjekyejoannah']
    pr_nums = ['15109', '22659']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue37449'
    versions = ['Python 3.9']

    @brettcannon
    Copy link
    Member Author

    ensurepip is using pkgutil.get_data() which isn't as clean as importlib.resources for reading data from within a package.

    @brettcannon brettcannon added 3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jun 30, 2019
    @nanjekyejoannah
    Copy link
    Member

    To be exact, the change should use importlib.resources.read_binary which reads bytes like pkgutil.get_data().

    @miss-islington
    Copy link
    Contributor

    New changeset 2ccb50c by Miss Islington (bot) (Joannah Nanjekye) in branch 'master':
    bpo-37449: Move ensurepip off of pkgutil and to importlib.resources (GH-15109)
    2ccb50c

    @jaraco
    Copy link
    Member

    jaraco commented Jun 7, 2021

    New changeset afb2eed by wim glenn in branch 'main':
    bpo-37449: ensurepip uses importlib.resources.files() traversable APIs (bpo-22659)
    afb2eed

    @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.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants