【发布时间】:2021-11-26 16:21:25
【问题描述】:
我在 Python v2.7.18 上打包 Sphinx v4.2 时遇到问题:
========== 1733 passed, 3 skipped, 3477 warnings in 663.79s (0:11:03) ==========
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
File "setup.py", line 8, in <module>
import sphinx
File "/home/user/Projects/aur/python2-sphinx/src/Sphinx-4.2.0/sphinx/__init__.py", line 20, in <module>
from .deprecation import RemovedInNextVersionWarning
File "/home/user/Projects/aur/python2-sphinx/src/Sphinx-4.2.0/sphinx/deprecation.py", line 28
def deprecated_alias(modname: str, objects: Dict[str, object],
^
SyntaxError: invalid syntax
由于上述错误与 Python 3.x 类型提示和安装 python2-typing 没有任何区别,我猜 python 2 支持一定已被弃用,所以
支持 Python 2.x 的最新 sphinx 版本是什么?
【问题讨论】:
-
Sphinx 2.0.0 中删除了对 Python 2.7 的支持:sphinx-doc.org/en/master/changes.html#id111。
-
我最终打包了
1.8.5
标签: python-sphinx python-2.x deprecated packaging type-hinting