doc: inspect.getargspec has been removed in Python 3.11 stable
authorMads Kiilerich <mads@kiilerich.com>
Mon, 07 Feb 2022 15:45:53 +0100
branchstable
changeset 48720 db952cb40f18
parent 48680 01fde63b4ede
child 48725 4344fd2687dc
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 .
doc/hgmanpage.py
--- 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 = []