[openstack-dev] [swift] Plan to add Python 3 support to Swift
sigmavirus24 at gmail.com
Fri Feb 12 19:36:34 UTC 2016
From: Victor Stinner <vstinner at redhat.com>
Reply: OpenStack Development Mailing List (not for usage questions) <openstack-dev at lists.openstack.org>
Date: February 12, 2016 at 10:43:42
To: OpenStack Development Mailing List (not for usage questions) <openstack-dev at lists.openstack.org>
Subject: Re: [openstack-dev] [swift] Plan to add Python 3 support to Swift
> Le 12/02/2016 15:12, Ian Cordasco a écrit :
> > Just to interject here, RFC 2616 is the one you're talking about. That
> > encoding requirement was dropped when HTTP/1.1 was updated in the
> > 7230-7235 RFCs. (...)
> > Where VCHAR is any visible US ASCII character. So while UTF-8 is still
> > a bad idea for the header value (and in fact, http.client on Python 3
> > will auto-encode headers to Latin 1) Latin 1 is no longer the
> > requirement.
> > For those interested, you can read up on headers in HTTP/1.1 here:
> > https://tools.ietf.org/html/rfc7230#section-3.2
> Oh thanks, it looks like my HTTP skills are rusty :-)
> For Swift, it's maybe better to always try to use UTF-8, but fallback to
> Latin1 if an HTTP cannot be decoded from UTF-8. Swift has many clients
> implemented in various programming languages, I'm not sure that all
> clients use UTF-8.
I also don't meant to imply that people actually follow the RFCs. ;-)
> By the way, https://review.openstack.org/#/c/237027/ was merged, cool.
> I fixed the third patch mentioned in my previous email to support
> arbitrary byte strings for hash prefix and suffix in the configuration file:
> I also updated my HTTP parser patch for Python 3. With these two
> patches, test_utils now pass on Python 3.
> For me, it's a nice milestone to have test_utils working on Python 3. It
> allows to port more interesting stuff and start the real portage work ;-)
I've said it before, but allow me to say it again - Thank you, Victor, for your tireless efforts to get OpenStack onto Python 3.
More information about the OpenStack-dev