[PATCH 1/3] Documentation: fix warnings during config build

Ahmad Fatoum a.fatoum at barebox.org
Thu Oct 9 23:57:43 PDT 2025


js_splitter_code contains backslashes that are meant for Javascript and
not for Python triggering a warning:

  conf.py:275: SyntaxWarning: invalid escape sequence '\p'
    .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}\-\.]+/gu)

Setting soruce_suffix to a string also seems deprecated:

  Converting `source_suffix = '.rst'` to
    `source_suffix = {'.rst': 'restructuredtext'}`.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 Documentation/conf.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index dfd416f7e0b2..9244bffe9e9b 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -35,7 +35,7 @@ extensions = []
 templates_path = ['_templates']
 
 # The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = {'.rst': 'restructuredtext'}
 
 # The encoding of source files.
 #source_encoding = 'utf-8-sig'
@@ -269,7 +269,7 @@ class DashFriendlySearchEnglish(SearchEnglish):
     # Accept words that can include 'inner' hyphens or dots
     _word_re = re.compile(r'[\w]+(?:[\.\-][\w]+)*')
 
-    js_splitter_code = """
+    js_splitter_code = r"""
 function splitQuery(query) {
     return query
         .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}\-\.]+/gu)
-- 
2.47.3




More information about the barebox mailing list