summaryrefslogtreecommitdiffstats
path: root/Doc/conf.py
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2022-10-06 18:56:52 (GMT)
committerGitHub <noreply@github.com>2022-10-06 18:56:52 (GMT)
commit537c93ea3b822b4dc039c35ea1375046a9e95c7a (patch)
tree81dd9d809f701bdb53aa81a427e800abd2bd6819 /Doc/conf.py
parente2591e4f5eb717922b2b33e201daefe4f99463dc (diff)
downloadcpython-537c93ea3b822b4dc039c35ea1375046a9e95c7a.zip
cpython-537c93ea3b822b4dc039c35ea1375046a9e95c7a.tar.gz
cpython-537c93ea3b822b4dc039c35ea1375046a9e95c7a.tar.bz2
[3.10] gh-93738: Disallow pre-v3 syntax in the C domain (GH-97962) (#97977)
Also, disable using invalid sphinx-lint 0.6.2. (cherry picked from commit f612565bd32d4ab0945798da775eea070f08b6fe) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Diffstat (limited to 'Doc/conf.py')
-rw-r--r--Doc/conf.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index aff26f9..178e520 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -234,28 +234,3 @@ linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+',
# Relative filename of the data files
refcount_file = 'data/refcounts.dat'
stable_abi_file = 'data/stable_abi.dat'
-
-# Sphinx 2 and Sphinx 3 compatibility
-# -----------------------------------
-
-# bpo-40204: Allow Sphinx 2 syntax in the C domain
-c_allow_pre_v3 = True
-
-# bpo-40204: Disable warnings on Sphinx 2 syntax of the C domain since the
-# documentation is built with -W (warnings treated as errors).
-c_warn_on_allowed_pre_v3 = False
-
-# Fix '!' not working with C domain when pre_v3 is enabled
-import sphinx
-
-if sphinx.version_info[:2] < (5, 3):
- from sphinx.domains.c import CXRefRole
-
- original_run = CXRefRole.run
-
- def new_run(self):
- if self.disabled:
- return super(CXRefRole, self).run()
- return original_run(self)
-
- CXRefRole.run = new_run