zopefoundation / zope.publisher

Map requests from HTTP/WebDAV clients, web browsers, XML-RPC and FTP clients onto Python objects
Other
3 stars 13 forks source link

zope.publisher.tests.httprequest does not support Python 3 #4

Closed mgedmin closed 7 years ago

mgedmin commented 10 years ago

Because it tries to from StringIO import StringIO.

icemac commented 7 years ago

Drop support for Python 3.3?

mgedmin commented 7 years ago

But does Python 3.4 have a StringIO.StringIO? I suspect Python 3.3 was the only Python 3.x version that was being tested back in January 2014 (3.4 was released in March 2014). I may've entered a too-specific issue title.

(I'm angry at past me for not providing more context. How did I discover this? What does this bug affect?)

icemac commented 7 years ago

The module zope.publisher.tests.httprequest seems to be unused inside this package. The tests in Travis are fine even for Python 3. Searching for the module name throughout whole Github shows only some usages outside Zopefoundation packages.

So drop the module or write a test using it? (It seems to be broken to use StringIO at all as the real code uses BytesIO all over the place.)

mgedmin commented 7 years ago

Oh hey, I've a (non-open-source sadly) web app that uses zope.publisher.tests.httprequest.TestRequest in its test suite. I don't think this app is ever going to be ported to Python 3, so I suppose it doesn't matter.

+0.5 for dropping the module. We can always restore it (with tests this time) if people complain. It seems strange to export an API from a tests subpackage anyway.