https://github.com/python/cpython/commit/5f938c1104a0482d9043e60b388eeac7f2b47026
commit: 5f938c1104a0482d9043e60b388eeac7f2b47026
branch: 3.11
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-02-12T13:45:22+02:00
summary:
[3.11] gh-115198: Fix support of Docutils >= 0.19 in distutils (GH-115220)
files:
A Misc/NEWS.d/next/Library/2024-02-09-17-56-06.gh-issue-115198.QKrxUQ.rst
M Lib/distutils/command/check.py
diff --git a/Lib/distutils/command/check.py b/Lib/distutils/command/check.py
index 73a30f3afd84a3..0a5976676a817d 100644
--- a/Lib/distutils/command/check.py
+++ b/Lib/distutils/command/check.py
@@ -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
diff --git
a/Misc/NEWS.d/next/Library/2024-02-09-17-56-06.gh-issue-115198.QKrxUQ.rst
b/Misc/NEWS.d/next/Library/2024-02-09-17-56-06.gh-issue-115198.QKrxUQ.rst
new file mode 100644
index 00000000000000..78c10aeb4f9e77
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-02-09-17-56-06.gh-issue-115198.QKrxUQ.rst
@@ -0,0 +1 @@
+Fix support of Docutils >= 0.19 in :mod:`distutils`.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]