From bd852710bea814d04d83402134b5bcc8ff31927b Mon Sep 17 00:00:00 2001 From: Rich Chiodo false Date: Wed, 1 May 2024 11:38:12 -0700 Subject: [PATCH] Use new_dap_id in the IDMap --- src/debugpy/common/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/debugpy/common/util.py b/src/debugpy/common/util.py index 603918e8..3b63e4a0 100644 --- a/src/debugpy/common/util.py +++ b/src/debugpy/common/util.py @@ -2,13 +2,13 @@ # Licensed under the MIT License. See LICENSE in the project root # for license information. -from functools import partial import inspect -import itertools import os import sys from types import CodeType +from debugpy.server import new_dap_id + def evaluate(code, path=__file__, mode="eval"): # Setting file path here to avoid breaking here if users have set @@ -173,7 +173,7 @@ class IDMap(object): def __init__(self): self._value_to_key = {} self._key_to_value = {} - self._next_id = partial(next, itertools.count(0)) + self._next_id = new_dap_id def obtain_value(self, key): return self._key_to_value[key]