IDE: connect local runtime with '127.0.0.1' instead of 'localhost'
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Thu, 28 Sep 2023 18:28:07 +0200
changeset 3847 832c257d5618
parent 3846 cf027bfe2653
child 3848 91da73c3df61
IDE: connect local runtime with '127.0.0.1' instead of 'localhost'
Workaround localhost possibly resolving as ::1. leading to problems.
LocalRuntimeMixin.py
connectors/__init__.py
--- a/LocalRuntimeMixin.py	Thu Sep 28 18:14:57 2023 +0200
+++ b/LocalRuntimeMixin.py	Thu Sep 28 18:28:07 2023 +0200
@@ -13,7 +13,7 @@
 _exec = sys.executable if "darwin" not in sys.platform else sys.executable + 'w'
 LocalRuntimeInterpreterPath = os.environ.get("BEREMIZPYTHONPATH", _exec)
 
-LocalHost = os.environ.get("BEREMIZ_LOCAL_HOST", "localhost")
+LocalHost = os.environ.get("BEREMIZ_LOCAL_HOST", "127.0.0.1")
 
 class LocalRuntimeMixin():
 
--- a/connectors/__init__.py	Thu Sep 28 18:14:57 2023 +0200
+++ b/connectors/__init__.py	Thu Sep 28 18:28:07 2023 +0200
@@ -62,7 +62,7 @@
                 schemes += [scheme]
 
 
-LocalHost = os.environ.get("BEREMIZ_LOCAL_HOST", "localhost")
+LocalHost = os.environ.get("BEREMIZ_LOCAL_HOST", "127.0.0.1")
 
 def ConnectorFactory(uri, confnodesroot):
     """