Replace all six.BytesIO with io.BytesIO

This commit is contained in:
Jon Dufresne 2018-09-23 18:36:42 -07:00
parent ff8df59ac1
commit 4f4e225775
5 changed files with 9 additions and 7 deletions

View File

@ -15,9 +15,10 @@ import sys
import warnings
from collections import defaultdict
from copy import copy
from io import BytesIO
from os import path
from six import BytesIO, next
from six import next
from sphinx import addnodes
from sphinx.deprecation import RemovedInSphinx30Warning, RemovedInSphinx40Warning
@ -747,7 +748,7 @@ class BuildEnvironment:
@classmethod
def loads(cls, string, app=None):
# type: (unicode, Sphinx) -> BuildEnvironment
# type: (bytes, Sphinx) -> BuildEnvironment
warnings.warn('BuildEnvironment.loads() is deprecated. '
'Please use pickle.loads() instead.',
RemovedInSphinx30Warning)

View File

@ -11,9 +11,10 @@
from __future__ import print_function
import re
from io import BytesIO
from zipfile import ZipFile
from six import BytesIO, StringIO
from six import StringIO
from sphinx.errors import PycodeError
from sphinx.pycode.parser import Parser

View File

@ -14,11 +14,12 @@ import base64
import imghdr
import warnings
from collections import OrderedDict
from io import BytesIO
from os import path
from typing import NamedTuple
import imagesize
from six import BytesIO, text_type
from six import text_type
from sphinx.deprecation import RemovedInSphinx30Warning

View File

@ -9,12 +9,12 @@
:license: BSD, see LICENSE for details.
"""
from io import BytesIO
from collections import namedtuple
import pytest
from docutils import frontend, utils
from docutils.parsers import rst
from six import BytesIO
from sphinx.search import IndexBuilder
from sphinx.util import jsdump

View File

@ -11,8 +11,7 @@
import posixpath
import zlib
from six import BytesIO
from io import BytesIO
from sphinx.ext.intersphinx import InventoryFile