[Python-Dev] test_gzip/test_tarfile failure om AMD64

Bob Ippolito bob at redivi.com
Tue May 30 02:17:58 CEST 2006


On May 29, 2006, at 4:35 PM, Delaney, Timothy (Tim) wrote:

> Thomas Wouters wrote:
>
>> If 2.5 warns and does the old thing, the upgrade path is easy and
>> defendable. This is also why there are future statements -- I
>> distinctly recall making the same argument back then :-) The cost of
>> continuing the misfeatures in struct for one release does not weigh
>> up to the cost of breaking compatibility unwarned.
>
> This really sounds to me like a __future__ import would be useful  
> to get
> the fixed behaviour.

That would be potentially useful but is definitely not implementable.  
__future__ statements only really affect the compiler, and the struct  
module doesn't have anything to do with the compiler.

The only alternative is to have an entirely separate API (or another  
module altogether) and then try to convince people to use that.  
Warnings on incorrect input is a pretty good compromise.

The pre-2.5 behavior is totally confusing and totally undefined by  
the docs. The trunk behavior is (should be) completely consistent and  
backwards compatible. It actually allows even more broken code to  
work than the 2.4.x struct module, since it provides consistent  
behavior across 32-bit and 64-bit platforms and does the same thing  
whether you give it long or int. The only real downside is that it  
rather harmlessly tells you when some code is taking advantage of  
struct misfeatures.

-bob



More information about the Python-Dev mailing list