Skip to content

Commit 80fccd6

Browse files
committed
Remove copy dunder method
1 parent 08796fa commit 80fccd6

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

sentry_sdk/_lru_cache.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@
6262
6363
"""
6464

65-
from copy import deepcopy
66-
6765
SENTINEL = object()
6866

6967

@@ -91,13 +89,6 @@ def __init__(self, max_size):
9189

9290
self.hits = self.misses = 0
9391

94-
def __copy__(self):
95-
cache = LRUCache(self.max_size)
96-
cache.full = self.full
97-
cache.cache = deepcopy(self.cache)
98-
cache.root = deepcopy(self.root)
99-
return cache
100-
10192
def set(self, key, value):
10293
link = self.cache.get(key, SENTINEL)
10394

sentry_sdk/flag_utils.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from copy import copy
21
from typing import TYPE_CHECKING
32

43
import sentry_sdk
@@ -25,12 +24,6 @@ def clear(self):
2524
# type: () -> None
2625
self.buffer = LRUCache(self.capacity)
2726

28-
def __copy__(self):
29-
# type: () -> FlagBuffer
30-
buffer = FlagBuffer(capacity=self.capacity)
31-
buffer.buffer = copy(self.buffer)
32-
return buffer
33-
3427
def get(self):
3528
# type: () -> list[FlagData]
3629
return [{"flag": key, "result": value} for key, value in self.buffer.get_all()]

0 commit comments

Comments
 (0)