using six package for py2/3 compatibility without 2to3. refs #1350

#238 Merged at 1463240
Repository
Deleted repository
Branch
default (efe728aafe3b)
Repository
sphinx
Branch
default
Author
  1. Takayuki Shimizukawa
Reviewers
Description

This PR make introduce the six module and change some six-related-code. 2to3 is still needed.

  • introduce the six module
  • reduce sphinx.util.pycompat implementation by using six.
  • use six privided functions/classes that are renamed between py2 and py3.
  • use six privided iteritems(), itervalues() instead of dict.iteritems()/.itervalues().
  • wrap iterator with list() to avoid 'dictionary changed size during iteration' on py3 with non-2to3-source.
  • add __next__() method for some classes and use native next() instead of iter.next()
  • use six privided text_type() to replace with unicode()
  • use UnicodeMixin for __str__, __unicode__
  • Issues #1350: Drop 2to3 mechanism closed

Comments (7)