diff --git a/setup.cfg b/setup.cfg index 1f5bbd1cd..e4d577f93 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,6 +40,7 @@ paths = . [mypy] +python_version = 3.5 show_column_numbers = True show_error_context = True ignore_missing_imports = True diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 1c8338643..690e0d71f 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -56,8 +56,8 @@ if __version__.endswith('+'): __version__ = __version__[:-1] # remove '+' for PEP-440 version spec. try: ret = subprocess.run(['git', 'show', '-s', '--pretty=format:%h'], - stdout=PIPE, stderr=PIPE, encoding='ascii') + stdout=PIPE, stderr=PIPE) if ret.stdout: - __display_version__ += '/' + ret.stdout.strip() + __display_version__ += '/' + ret.stdout.decode('ascii').strip() except Exception: pass