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.
(cherry picked from commit 0efe3a1636)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2022-06-21 10:50:47 -07:00 committed by GitHub
parent 1347607db1
commit cc42716275
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