gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)

* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014.
This commit is contained in:
Adam Turner 2022-06-21 16:04:46 +01:00 committed by GitHub
parent 6f8875eba3
commit 0efe3a1636
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 18 additions and 52 deletions

View file

@ -418,12 +418,7 @@ class DeprecatedRemoved(Directive):
translatable=False)
node.append(para)
env = self.state.document.settings.env
# deprecated pre-Sphinx-2 method
if hasattr(env, 'note_versionchange'):
env.note_versionchange('deprecated', version[0], node, self.lineno)
# new method
else:
env.get_domain('changeset').note_changeset(node)
env.get_domain('changeset').note_changeset(node)
return [node] + messages