[Bf-blender-cvs] [11efc9087b2] master: Cleanup: remove workaround for Python 3.7x crashing with libedit

Campbell Barton noreply at git.blender.org
Sat Mar 6 09:33:29 CET 2021


Commit: 11efc9087b27099b9d3f31ae45e622ede831a965
Author: Campbell Barton
Date:   Sat Mar 6 19:29:03 2021 +1100
Branches: master
https://developer.blender.org/rB11efc9087b27099b9d3f31ae45e622ede831a965

Cleanup: remove workaround for Python 3.7x crashing with libedit

This removes workaround for T43491. It's no longer needed as
Python 3.9x supports libedit as an alternative to readline
on all platforms.

===================================================================

M	release/scripts/modules/console_python.py

===================================================================

diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py
index 5106010b555..9e1b921774d 100644
--- a/release/scripts/modules/console_python.py
+++ b/release/scripts/modules/console_python.py
@@ -229,8 +229,6 @@ execute.hooks = []
 
 
 def autocomplete(context):
-    _readline_bypass()
-
     from console import intellisense
 
     sc = context.space_data
@@ -358,14 +356,3 @@ def banner(context):
     sc.prompt = PROMPT
 
     return {'FINISHED'}
-
-
-# workaround for readline crashing, see: T43491
-def _readline_bypass():
-    if "rlcompleter" in sys.modules or "readline" in sys.modules:
-        return
-
-    # prevent 'rlcompleter' from loading the real 'readline' module.
-    sys.modules["readline"] = None
-    import rlcompleter
-    del sys.modules["readline"]



More information about the Bf-blender-cvs mailing list