diff --git a/api-guide/source/conf.py b/api-guide/source/conf.py index 5ced3d297365..7373c3c00ed1 100644 --- a/api-guide/source/conf.py +++ b/api-guide/source/conf.py @@ -88,7 +88,7 @@ gitsha = subprocess.Popen( # source tree pwd = subprocess.Popen( - "pwd", stdout=subprocess.PIPE).communicate()[0].strip('\n') + "pwd", stdout=subprocess.PIPE).communicate()[0].decode().strip('\n') # html_context allows us to pass arbitrary values into the html template html_context = {"pwd": pwd, diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index c5960b86dbe5..aa3d96725330 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -148,7 +148,7 @@ git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", "-n1"] try: html_last_updated_fmt = subprocess.Popen( - git_cmd, stdout=subprocess.PIPE).communicate()[0] + git_cmd, stdout=subprocess.PIPE).communicate()[0].decode() except Exception: warnings.warn('Cannot get last updated time from git repository. ' 'Not setting "html_last_updated_fmt".') diff --git a/doc/ext/support_matrix.py b/doc/ext/support_matrix.py index 67e9b44dfb2a..afcfe87941c3 100644 --- a/doc/ext/support_matrix.py +++ b/doc/ext/support_matrix.py @@ -317,7 +317,7 @@ class SupportMatrixDirective(rst.Directive): summaryhead.append(header) # then one column for each hypervisor driver - impls = matrix.targets.keys() + impls = list(matrix.targets.keys()) impls.sort() for key in impls: target = matrix.targets[key] @@ -350,7 +350,7 @@ class SupportMatrixDirective(rst.Directive): classes=["sp_feature_" + feature.status])) # and then one column for each hypervisor driver - impls = matrix.targets.keys() + impls = list(matrix.targets.keys()) impls.sort() for key in impls: target = matrix.targets[key] diff --git a/doc/source/conf.py b/doc/source/conf.py index dce5004ad976..e3cd90d4da8b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -197,7 +197,7 @@ git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", "-n1"] try: html_last_updated_fmt = subprocess.Popen( - git_cmd, stdout=subprocess.PIPE).communicate()[0] + git_cmd, stdout=subprocess.PIPE).communicate()[0].decode() except Exception: warnings.warn('Cannot get last updated time from git repository. ' 'Not setting "html_last_updated_fmt".')