This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: gzip._PaddedFile calls getattr with arguments in reversed order
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder: gzip module calls getattr incorrectly
View: 10465
Assigned To: Nosy List: charris44, eric.araujo
Priority: normal Keywords: patch

Created on 2010-12-03 03:09 by charris44, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
gzip.patch charris44, 2010-12-03 03:09 Patch
Messages (6)
msg123171 - (view) Author: Charles Harris (charris44) Date: 2010-12-03 03:09
The attached patch fixes the problem.
msg123172 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-03 03:12
Thanks for the report and patch.  Can you add a test, to prevent a regression?
msg123180 - (view) Author: Charles Harris (charris44) Date: 2010-12-03 04:57
Hi Eric,

On Thu, Dec 2, 2010 at 8:12 PM, Éric Araujo <> wrote:

Where are the guidelines for writing python tests?

msg123181 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-03 05:06
The best way is to learn by imitation.  If you prefer to read, there is some guidance on and .

Concretely, you need to open a file, wrap it in a _PaddedFile and check that attributes like name and closed are good (using assertEqual).

You’ll also want to follow patch guidelines at
msg123184 - (view) Author: Charles Harris (charris44) Date: 2010-12-03 05:23
Looks like this was fixed by r86555 and a test added. I think you can close the ticket.
msg123185 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-03 05:25
Good catch.  I’m tired, I should have noticed that :)
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54822
2010-12-03 05:25:44eric.araujosetstatus: open -> closed
resolution: duplicate
messages: + msg123185

superseder: gzip module calls getattr incorrectly
stage: test needed -> resolved
2010-12-03 05:23:27charris44setmessages: + msg123184
2010-12-03 05:06:03eric.araujosetmessages: + msg123181
2010-12-03 04:59:23charris44setfiles: - unnamed
2010-12-03 04:57:04charris44setfiles: + unnamed

messages: + msg123180
2010-12-03 03:12:16eric.araujosetversions: + Python 3.1, Python 2.7
nosy: + eric.araujo

messages: + msg123172

type: behavior
stage: test needed
2010-12-03 03:09:10charris44create