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.

classification
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
process
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.

Files
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 <report@bugs.python.org> wrote:

Where are the guidelines for writing python tests?

Chuck
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 http://www.python.org/dev/workflow/ and http://www.python.org/dev/faq/#how-to-test-a-patch .

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 http://www.python.org/dev/patches/
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 :)
History
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