maintainer-feedback requested: [Bug 257770] textproc/py-sphinx: Add upstream patch to fix runtime error with Python 3.10

From: <>
Date: Wed, 11 Aug 2021 15:58:17 +0000
Bugzilla Automation <> has asked freebsd-python (Nobody)
<> for maintainer-feedback:
Bug 257770: textproc/py-sphinx: Add upstream patch to fix runtime error with
Python 3.10

--- Description ---
While testing lang/python310, I found runtime error such as following
happens with textproc/py-sphinx if 3.10 is default version of Python.

Traceback (most recent call last):
  File "/usr/local/bin/sphinx-build", line 33, in <module>
    sys.exit(load_entry_point('Sphinx==3.5.2', 'console_scripts',
  File "/usr/local/bin/sphinx-build", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/lib/python3.10/importlib/metadata/", line 162, in
    module = import_module('module'))
  File "/usr/local/lib/python3.10/importlib/", line 126, in
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/site-packages/sphinx/cmd/", line 25,
in <module>
    from sphinx.application import Sphinx
  File "/usr/local/lib/python3.10/site-packages/sphinx/", line
32, in <module>
    from sphinx.config import Config
  File "/usr/local/lib/python3.10/site-packages/sphinx/", line 23, in
    from sphinx.util import logging
  File "/usr/local/lib/python3.10/site-packages/sphinx/util/", line
35, in <module>
    from sphinx.util import smartypants  # noqa
  File "/usr/local/lib/python3.10/site-packages/sphinx/util/",
line 33, in <module>
    from sphinx.util.docutils import __version_info__ as docutils_version
  File "/usr/local/lib/python3.10/site-packages/sphinx/util/", line
31, in <module>
    from sphinx.util.typing import RoleFunction
  File "/usr/local/lib/python3.10/site-packages/sphinx/util/", line
34, in <module>
    from types import Union as types_Union
ImportError: cannot import name 'Union' from 'types'

So add upstream patch to fix the problem.

Received on Wed Aug 11 2021 - 15:58:17 UTC

Original text of this message