mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Replace all six.BytesIO with io.BytesIO
This commit is contained in:
parent
ff8df59ac1
commit
4f4e225775
@ -15,9 +15,10 @@ import sys
|
|||||||
import warnings
|
import warnings
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from copy import copy
|
from copy import copy
|
||||||
|
from io import BytesIO
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from six import BytesIO, next
|
from six import next
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.deprecation import RemovedInSphinx30Warning, RemovedInSphinx40Warning
|
from sphinx.deprecation import RemovedInSphinx30Warning, RemovedInSphinx40Warning
|
||||||
@ -747,7 +748,7 @@ class BuildEnvironment:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def loads(cls, string, app=None):
|
def loads(cls, string, app=None):
|
||||||
# type: (unicode, Sphinx) -> BuildEnvironment
|
# type: (bytes, Sphinx) -> BuildEnvironment
|
||||||
warnings.warn('BuildEnvironment.loads() is deprecated. '
|
warnings.warn('BuildEnvironment.loads() is deprecated. '
|
||||||
'Please use pickle.loads() instead.',
|
'Please use pickle.loads() instead.',
|
||||||
RemovedInSphinx30Warning)
|
RemovedInSphinx30Warning)
|
||||||
|
@ -11,9 +11,10 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
from io import BytesIO
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
from six import BytesIO, StringIO
|
from six import StringIO
|
||||||
|
|
||||||
from sphinx.errors import PycodeError
|
from sphinx.errors import PycodeError
|
||||||
from sphinx.pycode.parser import Parser
|
from sphinx.pycode.parser import Parser
|
||||||
|
@ -14,11 +14,12 @@ import base64
|
|||||||
import imghdr
|
import imghdr
|
||||||
import warnings
|
import warnings
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from io import BytesIO
|
||||||
from os import path
|
from os import path
|
||||||
from typing import NamedTuple
|
from typing import NamedTuple
|
||||||
|
|
||||||
import imagesize
|
import imagesize
|
||||||
from six import BytesIO, text_type
|
from six import text_type
|
||||||
|
|
||||||
from sphinx.deprecation import RemovedInSphinx30Warning
|
from sphinx.deprecation import RemovedInSphinx30Warning
|
||||||
|
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from io import BytesIO
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from docutils import frontend, utils
|
from docutils import frontend, utils
|
||||||
from docutils.parsers import rst
|
from docutils.parsers import rst
|
||||||
from six import BytesIO
|
|
||||||
|
|
||||||
from sphinx.search import IndexBuilder
|
from sphinx.search import IndexBuilder
|
||||||
from sphinx.util import jsdump
|
from sphinx.util import jsdump
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
import posixpath
|
import posixpath
|
||||||
import zlib
|
import zlib
|
||||||
|
from io import BytesIO
|
||||||
from six import BytesIO
|
|
||||||
|
|
||||||
from sphinx.ext.intersphinx import InventoryFile
|
from sphinx.ext.intersphinx import InventoryFile
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user