Add compatibility with Python 3.x.
Review Request #9741 — Created March 5, 2018 and submitted
This adds compatibility for building docs on both Python 2.7 and 3.x
releases. For the most part, we were in good shape to support both, but
we had a few things we were doing wrong.
The primary issue was that we were explicitly using bytestrings for
configuration items and signal connections for Sphinx. This used to be a
requirement, but it isn't anymore (except for
which needs native strings). We now use Unicode strings everywhere.
In a few places, we were calling legacy
iter*functions on dictionaries.
Those have been updated to use
The GitHub support was working with byte data coming from a process's
output, which needed to be decoded to a Unicode string.
There was also a legacy import (
sphinx.util.compat.Directive), which we
needed to update.
Sphinx 1.7.1 and six are now requirements for the package, ensuring
we have what we need to build, and classifiers were added advertising
the Python version support.
Built a few doc packages using Python 2.7, 3.4, 3.5, and 3.6.
There may still be some lines of code that weren't tested thoroughly,
but the main use cases worked. Also verified that Python 3.x could
import all the modules without errors.
- Fixed the version specifiers to list 3.6 and not 3.3.
sixto the correct import group.
Revision 2 (+30 -18)
Checks run (2 succeeded)