summaryrefslogtreecommitdiff
path: root/Documentation/sphinx/kfigure.py
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2021-02-02 03:17:14 +0300
committerJonathan Corbet <corbet@lwn.net>2021-02-02 03:17:14 +0300
commit4217e5074f33d855873370378d427e329b60a7b4 (patch)
tree3186d771136f53250502d43a2301aeef1a90f76b /Documentation/sphinx/kfigure.py
parentf546ff0c0c07969f2892db10f1fe029f841ddf10 (diff)
downloadlinux-4217e5074f33d855873370378d427e329b60a7b4.tar.xz
Docs: drop Python 2 support
The kernel build system as a whole is dropping support for Python 2, so we should do the same. The effects are rather small, especially considering that much of the deleted code was not doing anything under any version of Python anyway. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/sphinx/kfigure.py')
-rw-r--r--Documentation/sphinx/kfigure.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/Documentation/sphinx/kfigure.py b/Documentation/sphinx/kfigure.py
index 788704886eec..3c78828330be 100644
--- a/Documentation/sphinx/kfigure.py
+++ b/Documentation/sphinx/kfigure.py
@@ -49,26 +49,14 @@ import os
from os import path
import subprocess
from hashlib import sha1
-import sys
-
from docutils import nodes
from docutils.statemachine import ViewList
from docutils.parsers.rst import directives
from docutils.parsers.rst.directives import images
import sphinx
-
from sphinx.util.nodes import clean_astext
-from six import iteritems
-
import kernellog
-PY3 = sys.version_info[0] == 3
-
-if PY3:
- _unicode = str
-else:
- _unicode = unicode
-
# Get Sphinx version
major, minor, patch = sphinx.version_info[:3]
if major == 1 and minor > 3:
@@ -540,7 +528,7 @@ def add_kernel_figure_to_std_domain(app, doctree):
docname = app.env.docname
labels = std.data["labels"]
- for name, explicit in iteritems(doctree.nametypes):
+ for name, explicit in doctree.nametypes.items():
if not explicit:
continue
labelid = doctree.nameids[name]