Use new_dap_id in the IDMap

This commit is contained in:
Rich Chiodo false 2024-05-01 11:38:12 -07:00
parent a7d9ad0345
commit bd852710be

View file

@ -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]