diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-23 08:04:57 -0700 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-10-05 12:39:50 -0700 |
commit | 05ac246effc71bbab55eb850f37211dd83245c21 (patch) | |
tree | 88f0748b6ba7738af3ba97829058ad573253e162 /sphinx/ext/apidoc.py | |
parent | c206c02a57e70429f39c38953f56df05c47718f8 (diff) | |
download | sphinx-git-05ac246effc71bbab55eb850f37211dd83245c21.tar.gz |
Deprecate Python2 compat shim sphinx.util.osutil.walk()
Code should use os.walk() instead, which works with either str or bytes.
All internal calls use str.
Diffstat (limited to 'sphinx/ext/apidoc.py')
-rw-r--r-- | sphinx/ext/apidoc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/apidoc.py b/sphinx/ext/apidoc.py index a154f6449..31cdb5855 100644 --- a/sphinx/ext/apidoc.py +++ b/sphinx/ext/apidoc.py @@ -32,7 +32,7 @@ from sphinx import __display_version__, package_dir from sphinx.cmd.quickstart import EXTENSIONS from sphinx.locale import __ from sphinx.util import rst -from sphinx.util.osutil import FileAvoidWrite, ensuredir, walk +from sphinx.util.osutil import FileAvoidWrite, ensuredir if False: # For type annotation @@ -235,7 +235,7 @@ def recurse_tree(rootpath, excludes, opts): root_package = None toplevels = [] - for root, subs, files in walk(rootpath, followlinks=followlinks): + for root, subs, files in os.walk(rootpath, followlinks=followlinks): # document only Python module files (that aren't excluded) py_files = sorted(f for f in files if path.splitext(f)[1] in PY_SUFFIXES and |