We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b6e34e commit 925bbc2Copy full SHA for 925bbc2
Tools/clinic/clinic.py
@@ -5461,6 +5461,11 @@ def state_parameter_docstring_start(self, line: str) -> None:
5461
5462
def docstring_append(self, obj: Function | Parameter, line: str) -> None:
5463
"""Add a rstripped line to the current docstring."""
5464
+ # gh-80282: We filter out non-ASCII characters from the docstring,
5465
+ # since historically, some compilers may balk on non-ASCII input.
5466
+ # If you're using Argument Clinic in an external project,
5467
+ # you may not need to support the same array of platforms as CPython,
5468
+ # so you may be able to remove this restriction.
5469
matches = re.finditer(r'[^\x00-\x7F]', line)
5470
if offending := ", ".join([repr(m[0]) for m in matches]):
5471
warn("Non-ascii characters are not allowed in docstrings:",
0 commit comments