#89 Investigation of port to Python 3000

closed
nobody
None
5
2007-09-07
2007-08-23
No

During a Python 3000 sprint I have spend some time investigating what it would take to port docutils to Python 3000. The ideal way to handle things is to make changes to the current release and then use the converter that is being created to make a Python-3000 compatible version, so that one can continue to support the 2.x line as well.

The good news is that the converter works on the docutils sources. This doesn't mean the resulting code will work; in fact it won't, but it does a lot of things right already. One thing I found is being fixed in the converter. Another is the following issue, which will require more thought by someone knowledgeable.

The io module appears to attempt to convert things to Unicode and uses such things as types.UnicodeType. In py3k there will only be Unicode strings and their type is 'str'. types.UnicodeType won't exist.

It isn't clear to me if one can fix this using the 'fix the 2.x' line; probably a branch of at least this one file is needed.

Discussion

  • Felix Wiemann

    Felix Wiemann - 2007-08-23

    Logged In: YES
    user_id=1374215
    Originator: NO

    I'm not sure if I understand the issue here:

    Apart from string literals (which are str because of pure laziness), whenever Docutils uses str's internally, this is intentional, and they are indeed meant to be byte sequences, not character sequences.

    Isn't the fact that py3k calls Unicode strings "str" and byte strings "bytes" (or so) just a renaming? In that case, it can either be handled manually or by the converter. What kind of change is it that you would like to see in Docutils to facilitate this?

     
  • Lea Wiemann

    Lea Wiemann - 2007-08-23
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks