mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.11] gh-115198: Fix support of Docutils >= 0.19 in distutils (GH-115220)
This commit is contained in:
parent
07fff60fb2
commit
5f938c1104
2 changed files with 8 additions and 1 deletions
|
|
@ -125,7 +125,13 @@ def _check_rst_data(self, data):
|
|||
# the include and csv_table directives need this to be a path
|
||||
source_path = self.distribution.script_name or 'setup.py'
|
||||
parser = Parser()
|
||||
settings = frontend.OptionParser(components=(Parser,)).get_default_values()
|
||||
try:
|
||||
get_default_settings = frontend.get_default_settings
|
||||
except AttributeError:
|
||||
# Deprecated in Docutils 0.19, may be broken in Docutils 0.21.
|
||||
settings = frontend.OptionParser(components=(Parser,)).get_default_values()
|
||||
else:
|
||||
settings = get_default_settings(Parser)
|
||||
settings.tab_width = 4
|
||||
settings.pep_references = None
|
||||
settings.rfc_references = None
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Fix support of Docutils >= 0.19 in :mod:`distutils`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue