Description of problem: Package python-sphinx fails to build from source in Fedora rawhide after we upgraded to Python 3.10.0b4+. =================================== FAILURES =================================== _______________________________ test_enum_class ________________________________ app = <SphinxTestApp buildername='html'> @pytest.mark.sphinx('html', testroot='ext-autodoc') def test_enum_class(app): options = {"members": None} actual = do_autodoc(app, 'class', 'target.enums.EnumCls', options) if sys.version_info < (3, 10): sig = '(value)' else: sig = ('(value, names=None, *, module=None, qualname=None, type=None, start=1, ' 'boundary=None)') > assert list(actual) == [ '', '.. py:class:: EnumCls%s' % sig, ' :module: target.enums', '', ' this is enum class', '', '', ' .. py:method:: EnumCls.say_goodbye()', ' :module: target.enums', ' :classmethod:', '', ' a classmethod says good-bye to you.', '', '', ' .. py:method:: EnumCls.say_hello()', ' :module: target.enums', '', ' a method says hello to you.', '', '', ' .. py:attribute:: EnumCls.val1', ' :module: target.enums', ' :value: 12', '', ' doc for val1', '', '', ' .. py:attribute:: EnumCls.val2', ' :module: target.enums', ' :value: 23', '', ' doc for val2', '', '', ' .. py:attribute:: EnumCls.val3', ' :module: target.enums', ' :value: 34', '', ' doc for val3', '', ] E AssertionError: assert ['', '.. py:c...ass', '', ...] == ['', '.. py:c...ass', '', ...] E At index 1 diff: '.. py:class:: EnumCls(value)' != '.. py:class:: EnumCls(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)' E Use -v to get the full diff tests/test_ext_autodoc.py:1380: AssertionError Version-Release number of selected component (if applicable): 4.0.2-3.fc35 Steps to Reproduce: fedpkg build Additional info: This package is tracked by Koschei. See: https://koschei.fedoraproject.org/package/python-sphinx This is caused by a revert of enum changes in Python 3.10.0b4. The code seems to have a if sys.version_info < (3, 10) conditional and we just need to adapt that. Context: https://mail.python.org/archives/list/python-dev@python.org/message/LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF/
The proposed solution solves FTBFS (https://copr.fedorainfracloud.org/coprs/ksurma/sphinx-4.1.0/build/2326945/), so I've opened an issue and sent PR upstream.
The fix will be included in Sphinx 4.1.2.