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

"internal" zipimport.zipimporter feature untested #45667

Closed
exarkun mannequin opened this issue Oct 25, 2007 · 8 comments
Closed

"internal" zipimport.zipimporter feature untested #45667

exarkun mannequin opened this issue Oct 25, 2007 · 8 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@exarkun
Copy link
Mannequin

exarkun mannequin commented Oct 25, 2007

BPO 1326
Nosy @gvanrossum, @brettcannon, @birkenfeld
Files
  • 1326.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/birkenfeld'
    closed_at = <Date 2008-05-11.15:08:35.706>
    created_at = <Date 2007-10-25.13:08:00.813>
    labels = ['type-feature', 'library']
    title = '"internal" zipimport.zipimporter feature untested'
    updated_at = <Date 2008-05-11.15:08:35.705>
    user = 'https://bugs.python.org/exarkun'

    bugs.python.org fields:

    activity = <Date 2008-05-11.15:08:35.705>
    actor = 'georg.brandl'
    assignee = 'georg.brandl'
    closed = True
    closed_date = <Date 2008-05-11.15:08:35.706>
    closer = 'georg.brandl'
    components = ['Library (Lib)']
    creation = <Date 2007-10-25.13:08:00.813>
    creator = 'exarkun'
    dependencies = []
    files = ['8877']
    hgrepos = []
    issue_num = 1326
    keywords = ['patch']
    message_count = 8.0
    messages = ['56742', '56800', '58211', '58219', '58228', '59960', '61627', '66638']
    nosy_count = 6.0
    nosy_names = ['gvanrossum', 'brett.cannon', 'georg.brandl', 'exarkun', 'therve', 'fijal']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1326'
    versions = []

    @exarkun
    Copy link
    Mannequin Author

    exarkun mannequin commented Oct 25, 2007

    It's possible to construct a zipimporter with a "path" which points
    first to a zip file and then continues to refer to a file within that
    zip file. For example,

    /foo/bar.zip/baz
    

    where /foo/bar.zip is not a directory, but a zip file, and baz is a file
    or directory in the contents of the zip file.

    There is no test coverage for this functionality, though.

    @exarkun exarkun mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 25, 2007
    @gvanrossum
    Copy link
    Member

    Please submit a patch for docs and a unittest...

    @therve
    Copy link
    Mannequin

    therve mannequin commented Dec 5, 2007

    I attach a patch adding a test and some documentation. This tries to
    solve bpo-1325 too.

    exarkun, does that fulfill your original request?

    @gvanrossum
    Copy link
    Member

    Which Python version is this for?

    @therve
    Copy link
    Mannequin

    therve mannequin commented Dec 5, 2007

    The patch is against trunk.

    @birkenfeld birkenfeld self-assigned this Jan 15, 2008
    @brettcannon
    Copy link
    Member

    And if you want more ideas for tests, I implemented my own tests for my
    pure Python implementation of zipimport. They can be found in the
    sandbox at import_in_py/zipimport_/tests.py .

    @fijal
    Copy link

    fijal commented Jan 24, 2008

    There is another untested and undocumented attribute called prefix on
    zipimporter objects.

    @birkenfeld
    Copy link
    Member

    Committed the test and added new docs in r63067. Thanks!

    @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 type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants