bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)

diff --git a/Lib/functools.py b/Lib/functools.py
index 1f1874d..28d9f6f 100644
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -388,6 +388,7 @@
             self.func = func
             self.args = args
             self.keywords = keywords
+    __init__.__text_signature__ = '($self, func, /, *args, **keywords)'
 
     def __repr__(self):
         args = ", ".join(map(repr, self.args))