doc: inspect.getargspec has been removed in Python 3.11
Fixed by dropping the inspection introduced in
cdda48c93676. The 2nd "reporter"
parameter to docutils.languages.get_language has been available since 0.8 more
than 10 years ago.
Reported for Fedora on https://bugzilla.redhat.com/show_bug.cgi?id=2022252#c2 .
--- a/doc/hgmanpage.py Wed Feb 02 17:02:34 2022 +0100
+++ b/doc/hgmanpage.py Mon Feb 07 15:45:53 2022 +0100
@@ -45,7 +45,6 @@
__docformat__ = 'reStructuredText'
-import inspect
import re
from docutils import (
@@ -177,13 +176,7 @@
nodes.NodeVisitor.__init__(self, document)
self.settings = settings = document.settings
lcode = settings.language_code
- arglen = len(inspect.getargspec(languages.get_language)[0])
- if arglen == 2:
- self.language = languages.get_language(
- lcode, self.document.reporter
- )
- else:
- self.language = languages.get_language(lcode)
+ self.language = languages.get_language(lcode, self.document.reporter)
self.head = []
self.body = []
self.foot = []