issue 3797 created with trivial patches for the remaining bytearray returning abusers. review needed.
I don't have a build environment for windows to test the PC/winreg one on but its too simple to be wrong. On Fri, Sep 5, 2008 at 10:37 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > This needs to be fixed. It is surely a relic from the alpha1 situation > where the bytes type was mutable. No read APIs should return mutable > bytes. Write APIs should accept mutable and immutable bytes though. > > On Fri, Sep 5, 2008 at 12:17 AM, Gregory P. Smith <[EMAIL PROTECTED]> wrote: >> Anyone have an opinion on http://bugs.python.org/issue3492 in regards >> to it being a release blocker? >> >> The gist of it: zlib returns bytearrays where other modules return >> bytes. zipimport, because it uses zlib, required bytearrays instead >> of bytes as input. A few other modules also appear to return >> bytearrays when they're likely better off returning bytes for >> consistency. >> >> IMHO, it seems like bytearrays should rarely be returned by the >> existing standard library apis. Since they are mutable they are >> ideally suited for new APIs where they're passed in and modified. >> >> Whats the big deal if this is not fixed before release? Users are >> likely to get frustrated at inputs not being hashable without explicit >> (data copy) conversion to an immutable type. And any code that gets >> written depending on these returning bytearrays instead of bytes would >> need fixing if we waited until 3.1 to fix it. >> >> -gps >> >> On Wed, Sep 3, 2008 at 10:42 PM, Anand Balachandran Pillai >> <[EMAIL PROTECTED]> wrote: >>> On Thu, Sep 4, 2008 at 10:47 AM, Gregory P. Smith <[EMAIL PROTECTED]> wrote: >>>> I agree that this should go in. zlib should return bytes. other read >>>> functions and similar modules like bz2module already return bytes. >>>> unless i hear objections, i'll commit this in about 12 hours. >>> >>> +1 :) >>> >>>> >>> >>> Regards >>> >>> -- >>> -Anand >>> >> _______________________________________________ >> Python-3000 mailing list >> Python-3000@python.org >> http://mail.python.org/mailman/listinfo/python-3000 >> Unsubscribe: >> http://mail.python.org/mailman/options/python-3000/guido%40python.org >> > > > > -- > --Guido van Rossum (home page: http://www.python.org/~guido/) > _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com