Known py3 difficulties:
-
https://bugs.python.org/issue22233
py3 apparently can't speak HTTP.
-
https://github.com/openstack/swift/blob/2.9.0/swift/common/wsgi.py#L145
Need to change the default content-type to not be text/plain. Note that mimetools no longer exists under py3.
-
https://www.python.org/dev/peps/pep-3333/#unicode-issues
On Python platforms where the
str
orStringType
type is in fact Unicode-based (e.g. Jython, IronPython, Python 3, etc.), all "strings" referred to in this specification must contain only code points representable in ISO-8859-1 encoding (\u0000
through\u00FF
, inclusive). It is a fatal error for an application to supply strings containing any other Unicode character or code point.... but swift requires UTF-8 headers for accounts/containers. So we'll need to intentionally mangle a whole lot of strings. And we'll need to worry about whether third-party middlewares are using utf-8 or utf-8-masquerading-as-latin-1 strings.
-
https://github.com/openstack/swift/blob/2.9.0/swift/proxy/server.py#L220
socket._fileobject isn't a thing under py3. Maybe it'd work to set eventlet.wsgi.HttpProtocol.rbufsize / eventlet.wsgi.HttpProtocol.wbufsize instead?
-
https://github.com/openstack/swift/blob/2.9.0/swift/common/bufferedhttp.py#L51-L54
socket._socketobject isn't a thing under py3.
This comment has been minimized.
https://bugs.python.org/issue22233 just landed (2 weeks ago) on October 7