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 — gzip.GzipFile has no name attribute · Issue #44518 · python/cpython

gzip.GzipFile has no name attribute #44518

New issue
Copy link
New issue
Copy link
Closed
Closed
gzip.GzipFile has no name attribute#44518
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory

Description

gustaebel
mannequin
opened on Jan 29, 2007
Issue body actions
BPO 1647484
Nosy @loewis, @gustaebel
Files
  • gzip-name-attr.diff: patch to Lib/gzip.py
  • 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 2007-02-13.16:36:56.000>
    created_at = <Date 2007-01-29.22:25:21.000>
    labels = ['library']
    title = 'gzip.GzipFile has no name attribute'
    updated_at = <Date 2007-02-13.16:36:56.000>
    user = 'https://github.com/gustaebel'

    bugs.python.org fields:

    activity = <Date 2007-02-13.16:36:56.000>
    actor = 'lars.gustaebel'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2007-01-29.22:25:21.000>
    creator = 'lars.gustaebel'
    dependencies = []
    files = ['7743']
    hgrepos = []
    issue_num = 1647484
    keywords = ['patch']
    message_count = 4.0
    messages = ['51811', '51812', '51813', '51814']
    nosy_count = 2.0
    nosy_names = ['loewis', 'lars.gustaebel']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1647484'
    versions = ['Python 2.6']

    Activity

    1. gustaebel commented on Jan 29, 2007

      @gustaebel
      gustaebelmannequin
      on Jan 29, 2007
      MannequinAuthor
      More actions

      The gzip.GzipFile object uses a filename instead of a name attribute. This deviates from the standard practice and the interface described in "3.9 File Objects" and seems unnecessary.
      Attached patch changes this but still leaves the filename attribute as a property that emits a DeprecationWarning.

    2. gustaebel
      closed this as completedon Jan 29, 2007
    3. gustaebel
      added
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      on Jan 29, 2007
    4. gustaebel commented on Feb 12, 2007

      @gustaebel
      gustaebelmannequin
      on Feb 12, 2007
      MannequinAuthor
      More actions

      Seems that nobody is interested. I will check this in in a few days if nobody objects.

    5. loewis commented on Feb 13, 2007

      @loewis
      loewismannequin
      on Feb 13, 2007
      Mannequin
      More actions

      I think the patch is fine. It is debatable whether this should be backported to 2.5; I think it is better to not backport it.

      Please also add a test case testing for the presence of the name attribute (feel free to name it test_1647484)

    6. gustaebel commented on Feb 13, 2007

      @gustaebel
      gustaebelmannequin
      on Feb 13, 2007
      MannequinAuthor
      More actions

      When I wrote the test I saw that in write mode a '.gz' extension is automatically added to the filename if it has none. However this is stripped again when the name is written to the gzip header. I removed this so that the name attribute always reflects the real filesystem name. The filename property imitates the old behaviour.

      I don't think that this should necessarily be backported, at least I don't need it ;-)

      Applied in rev. 53772.

    7. ezio-melotti
      transferred this issue fromon Apr 10, 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

      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory

      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.