Skip to content

mtime is None for writable GzipFile instances #160860

Open

Description

@jepler

Bug report

>>> g = gzip.open(io.BytesIO(), mtime=1234567)
>>> print(g.mtime)
None

Instead of being None, I believe it should reflect the value passed to the constructor.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Oct 29, 2026
  2. added a commit that references this issue on Oct 29, 2026
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 29, 2026
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

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions