confusion with 2.6's module

Issue #62 invalid
Former user created an issue

It seems that 2.6 introduced the module, backported from 3.0. The code in imports StringIO from there, even on 2.6, but then everything fails because this StringIO only accepts to write() unicodes, not strs. Fix: if sys.version_info < (3, 0), always import StringIO from the module StringIO.

-- Armin

Comments (4)

  1. Holger Krekel repo owner
    • changed status to open

    Hum, using 2.6's IO was somewhat intentional. But maybe it's a bad idea. Could you post a concrete case where it fails?

  2. Former user Account Deleted

    in PyPy: put any random NameError in pypy/objspace/std/test/, then run py.test More generally, I doubt that py.test will succeed in writing *any* error message in Python 2.6.

  3. Former user Account Deleted

    Sorry, nonsense. This was caused by interaction with my own I solved it by hacking more in my

  4. Log in to comment