Navigation Menu

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

small ZipFile.writestr() enhancement #37599

Closed
jvr mannequin opened this issue Dec 10, 2002 · 3 comments
Closed

small ZipFile.writestr() enhancement #37599

jvr mannequin opened this issue Dec 10, 2002 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@jvr
Copy link
Mannequin

jvr mannequin commented Dec 10, 2002

BPO 651621
Nosy @loewis
Files
  • zipfile.patch: ZipFile.writestr() enhancement
  • 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 2002-12-12.12:25:09.000>
    created_at = <Date 2002-12-10.20:31:25.000>
    labels = ['library']
    title = 'small ZipFile.writestr() enhancement'
    updated_at = <Date 2002-12-12.12:25:09.000>
    user = 'https://bugs.python.org/jvr'

    bugs.python.org fields:

    activity = <Date 2002-12-12.12:25:09.000>
    actor = 'jvr'
    assignee = 'jvr'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2002-12-10.20:31:25.000>
    creator = 'jvr'
    dependencies = []
    files = ['4788']
    hgrepos = []
    issue_num = 651621
    keywords = ['patch']
    message_count = 3.0
    messages = ['41945', '41946', '41947']
    nosy_count = 2.0
    nosy_names = ['loewis', 'jvr']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue651621'
    versions = ['Python 2.3']

    @jvr
    Copy link
    Mannequin Author

    jvr mannequin commented Dec 10, 2002

    This patch allows ZipFile.writestr() to be called with
    an archive file name instead of a ZipInfo instance:

        z = ZipFile("myarchive.zip", "w")
        z.writestr("foo/baz/file.ext", data)
        z.close()

    I find the current writestr() method very inconvenient
    for simple (but common) things.

    If called with a file name instead of a ZipInfo
    instance, the date_time is set to now, which makes most
    sense for anonymous data.

    The patch also patches Doc/Lib/libzipfile.tex.

    Just

    @jvr jvr mannequin closed this as completed Dec 10, 2002
    @jvr jvr mannequin self-assigned this Dec 10, 2002
    @jvr jvr mannequin added the stdlib Python modules in the Lib dir label Dec 10, 2002
    @jvr jvr mannequin closed this as completed Dec 10, 2002
    @jvr jvr mannequin self-assigned this Dec 10, 2002
    @jvr jvr mannequin added the stdlib Python modules in the Lib dir label Dec 10, 2002
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Dec 12, 2002

    Logged In: YES
    user_id=21627

    Looks fine, please apply.

    @jvr
    Copy link
    Mannequin Author

    jvr mannequin commented Dec 12, 2002

    Logged In: YES
    user_id=92689

    Thanks Martin, for the speedy review!

    Checked in as
    Doc/lib/libzipfile.tex revision 1.15
    Lib/zipfile.py revision 1.27

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 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

    0 participants