GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Modernize the importlib loaders · Issue #89710 · python/cpython

Modernize the importlib loaders #89710

New issue
Copy link
New issue
Copy link
Open
Open
Modernize the importlib loaders#89710
Copy link
Labels
topic-importlibtype-featureA feature request or enhancementA feature request or enhancement

Description

@FFY00
FFY00
opened on Oct 20, 2021
Issue body actions
BPO 45547
Nosy @warsaw, @brettcannon, @jaraco, @ncoghlan, @ericsnowcurrently, @FFY00

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 = None
created_at = <Date 2021-10-20.23:15:10.249>
labels = []
title = 'Modernize the importlib loaders'
updated_at = <Date 2021-10-21.21:24:44.368>
user = 'https://github.com/FFY00'

bugs.python.org fields:

activity = <Date 2021-10-21.21:24:44.368>
actor = 'brett.cannon'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2021-10-20.23:15:10.249>
creator = 'FFY00'
dependencies = []
files = []
hgrepos = []
issue_num = 45547
keywords = []
message_count = 2.0
messages = ['404540', '404666']
nosy_count = 6.0
nosy_names = ['barry', 'brett.cannon', 'jaraco', 'ncoghlan', 'eric.snow', 'FFY00']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue45547'
versions = []

Activity

  1. FFY00 commented on Oct 20, 2021

    @FFY00
    FFY00
    on Oct 20, 2021
    MemberAuthor
    More actions

    ResourceLoader[1] is deprecated in favor of ResourceReader, which itself is surpassed by TraversableResources.

    Would it make sense to replace ResourceLoader usages with ResourceReader in the importlib loaders?
    And perhaps, would it make sense to replace them with the files()/Traversable protocol instead?

    IMO this could simplify the code a bit, but that's subjective I guess, and better re-use the bytecode caching mechanism in SourceLoader, by providing an equivalent based on files()/Traversable instead.

    This could also help push to add support for non filesystem based loaders in other parts of the code, like py_compile, which currently only supports operations on the filesystem.

    Is this something we are interested in -- modernizing the importlib loaders with, arguably, better abstractions -- or do we want to keep the old protocols around?

    [1] https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceLoader

  2. FFY00
    changed the title [-]Modenize the importlib loaders[/-] [+]Modernize the importlib loaders[/+] on Oct 20, 2021
  3. FFY00
    changed the title [-]Modenize the importlib loaders[/-] [+]Modernize the importlib loaders[/+] on Oct 20, 2021
  4. brettcannon commented on Oct 21, 2021

    @brettcannon
    brettcannon
    on Oct 21, 2021
    Member
    More actions

    It's an interesting question. Probably should add the new APIs. As for dropping the old ones, we would have to check if we have been raising deprecation warnings as appropriate or if it's just a documentation thing.

    Reacted by Filipe Laíns
  5. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  6. AlexWaygood
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Apr 10, 2022
  7. hauntsaninja
    added
    topic-importlib
    on May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-importlibtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.