]> git.phdru.name Git - dotfiles.git/commitdiff
init.py: Ignore 'readline.read_init_file() not implemented' master
authorOleg Broytman <phd@phdru.name>
Sun, 28 Dec 2025 20:08:46 +0000 (23:08 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 28 Dec 2025 20:08:46 +0000 (23:08 +0300)
PyPy doesn't implement the function and issues the warning.

lib/python/init.py

index da4808038b7597187c6a04dcad63f11fba1584ae..6343cfda775b392670524649094d8620d2f3da52 100644 (file)
@@ -15,6 +15,7 @@ def init():
         import builtins
     import os
     import sys
+    import warnings
 
     # readline/pyreadline
 
@@ -26,6 +27,9 @@ def init():
         import readline
         initfile = os.environ.get('INPUTRC') \
             or os.path.expanduser('~/.inputrc')
+        warnings.filterwarnings(
+            'ignore', 'readline.read_init_file() not implemented',
+            category=warnings.UserWarning)
         readline.read_init_file(initfile)
 
         # if 'libedit' in readline.__doc__: