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 — Add .open() to the Traversable API · Issue #81 · python/importlib_resources

Add .open() to the Traversable API #81

New issue
Copy link
New issue
Copy link
Closed
Closed
Add .open() to the Traversable API#81
Copy link
Milestone
1.2

Description

@jaraco
jaraco
opened on Oct 21, 2020
Issue body actions

In GitLab by @jaraco on Feb 29, 2020, 19:13

As is implied by the migration guide, Traversable objects require a .open() method.

The interface needs to be a limited subset of the usual open() operation, but it's basically this:

def open(self, mode='r', *args, **kwargs):
    """
    mode may be 'r' or 'rb' to open as text or binary. Return a handle
    suitable for reading (same as pathlib.Path.open).

    When opening as text, accepts encoding parameters such as those
    accepted by io.TextIOWrapper.
    """

Note, only with zipp 3.0 (and the Python 2 compatible zipp 1.2.0) does the zipp.Path object have a compatible interface, so importlib_resources should depend on these versions.

Activity

  1. jaraco
    added this to the 1.2 milestone on Oct 21, 2020
  2. jaraco commented on Oct 21, 2020

    @jaraco
    jaraco
    on Oct 21, 2020
    MemberAuthor
    More actions

    In GitLab by @jaraco on Feb 29, 2020, 19:27

    changed the description

  3. jaraco commented on Oct 21, 2020

    @jaraco
    jaraco
    on Oct 21, 2020
    MemberAuthor
    More actions

    In GitLab by @benthayer on Feb 29, 2020, 23:51

    mentioned in merge request !88

  4. jaraco commented on Oct 21, 2020

    @jaraco
    jaraco
    on Oct 21, 2020
    MemberAuthor
    More actions

    In GitLab by @jaraco on Mar 2, 2020, 17:57

    Fixed in !88. Thanks Ben.

  5. jaraco commented on Oct 21, 2020

    @jaraco
    jaraco
    on Oct 21, 2020
    MemberAuthor
    More actions

    In GitLab by @jaraco on Mar 2, 2020, 17:57

    closed

  6. jaraco
    closed this as completedon Oct 21, 2020
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      • 1.2

      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.