From 13f489f6bd5f1441c9e8823f949477812b5a7de9 Mon Sep 17 00:00:00 2001 From: bschnurr Date: Tue, 12 Aug 2025 17:09:10 -0700 Subject: [PATCH 1/3] Fix repl hange is python 3.12 and above. the module 'imp' was removed. --- Python/Product/PythonTools/ptvsd/repl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/Product/PythonTools/ptvsd/repl/__init__.py b/Python/Product/PythonTools/ptvsd/repl/__init__.py index ed650a2e4e..67f3357add 100644 --- a/Python/Product/PythonTools/ptvsd/repl/__init__.py +++ b/Python/Product/PythonTools/ptvsd/repl/__init__.py @@ -74,7 +74,7 @@ # BaseException not defined until Python 2.5 BaseException = Exception -DEBUG = os.environ.get('DEBUG_REPL') or os.environ.get('_PTVS_DEBUG_REPL') +DEBUG = True # os.environ.get('DEBUG_REPL') or os.environ.get('_PTVS_DEBUG_REPL') __all__ = ['ReplBackend', 'BasicReplBackend', 'BACKEND'] From 534c7dfbc0e3930db44ffcbda478d083d803eb1e Mon Sep 17 00:00:00 2001 From: bschnurr Date: Wed, 13 Aug 2025 17:30:08 -0700 Subject: [PATCH 2/3] remove hardcoded DEBUG flag --- Python/Product/PythonTools/ptvsd/repl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/Product/PythonTools/ptvsd/repl/__init__.py b/Python/Product/PythonTools/ptvsd/repl/__init__.py index 67f3357add..ed650a2e4e 100644 --- a/Python/Product/PythonTools/ptvsd/repl/__init__.py +++ b/Python/Product/PythonTools/ptvsd/repl/__init__.py @@ -74,7 +74,7 @@ # BaseException not defined until Python 2.5 BaseException = Exception -DEBUG = True # os.environ.get('DEBUG_REPL') or os.environ.get('_PTVS_DEBUG_REPL') +DEBUG = os.environ.get('DEBUG_REPL') or os.environ.get('_PTVS_DEBUG_REPL') __all__ = ['ReplBackend', 'BasicReplBackend', 'BACKEND'] From 40a5aa5e0ace810a084a0b3da8bfe235e5a76fb7 Mon Sep 17 00:00:00 2001 From: bschnurr Date: Thu, 14 Aug 2025 10:00:17 -0700 Subject: [PATCH 3/3] fix for invalid escape sequence. now using raw string example. c:\users\bschnurr\appdata\local\microsoft\visualstudio\17.0_0f44cb13exp\extensions\microsoft corporation\python\17.0.0\ptvsd\util.py:519: SyntaxWarning: invalid escape sequence '.' re_test(d1, "{'a+...a+': 'a+...a+'}") c:\users\bschnurr\appdata\local\microsoft\visualstudio\17.0_0f44cb13exp\extensions\microsoft corporation\python\17.0.0\ptvsd\util.py:521: SyntaxWarning: invalid escape sequence '.' re_test(d2, "{'a+...a+': {'a+...a+': 'a+...a+'}}") c:\users\bschnurr\appdata\local\microsoft\visualstudio\17.0_0f44cb13exp\extensions\microsoft corporation\python\17.0.0\ptvsd\util.py:524: SyntaxWarning: invalid escape sequence '.' re_test(d3, "{'a+...a+': {'a+...a+': {...}}}") c:\users\bschnurr\appdata\local\microsoft\visualstudio\17.0_0f44cb13exp\extensions\microsoft corporation\python\17.0.0\ptvsd\util.py:526: SyntaxWarning: invalid escape sequence '.' re_test(d3, "{'a+...a+': {'a+...a+': {'a+...a+': 'a+...a+'}}}") --- Python/Product/PythonTools/ptvsd/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Python/Product/PythonTools/ptvsd/util.py b/Python/Product/PythonTools/ptvsd/util.py index 40640a496f..93e4f8979c 100644 --- a/Python/Product/PythonTools/ptvsd/util.py +++ b/Python/Product/PythonTools/ptvsd/util.py @@ -516,14 +516,14 @@ def re_test(source, pattern): d1 = {} d1_key = 'a' * self.maxstring_inner * 2 d1[d1_key] = d1_key - re_test(d1, "{'a+\.\.\.a+': 'a+\.\.\.a+'}") + re_test(d1, r"{'a+\.\.\.a+': 'a+\.\.\.a+'}") d2 = {d1_key : d1} - re_test(d2, "{'a+\.\.\.a+': {'a+\.\.\.a+': 'a+\.\.\.a+'}}") + re_test(d2, r"{'a+\.\.\.a+': {'a+\.\.\.a+': 'a+\.\.\.a+'}}") d3 = {d1_key : d2} if len(self.maxcollection) == 2: - re_test(d3, "{'a+\.\.\.a+': {'a+\.\.\.a+': {\.\.\.}}}") + re_test(d3, r"{'a+\.\.\.a+': {'a+\.\.\.a+': {\.\.\.}}}") else: - re_test(d3, "{'a+\.\.\.a+': {'a+\.\.\.a+': {'a+\.\.\.a+': 'a+\.\.\.a+'}}}") + re_test(d3, r"{'a+\.\.\.a+': {'a+\.\.\.a+': {'a+\.\.\.a+': 'a+\.\.\.a+'}}}") # Ensure empty dicts work test({}, '{}')