|
48 | 48 | from typing import TYPE_CHECKING |
49 | 49 |
|
50 | 50 | if TYPE_CHECKING: |
51 | | - from collections.abc import Mapping, MutableMapping |
| 51 | + from collections.abc import Mapping |
52 | 52 |
|
53 | 53 | from typing import Any |
54 | 54 | from typing import Callable |
@@ -238,24 +238,24 @@ def __copy__(self): |
238 | 238 | rv._name = self._name |
239 | 239 | rv._fingerprint = self._fingerprint |
240 | 240 | rv._transaction = self._transaction |
241 | | - rv._transaction_info = dict(self._transaction_info) |
| 241 | + rv._transaction_info = self._transaction_info.copy() |
242 | 242 | rv._user = self._user |
243 | 243 |
|
244 | | - rv._tags = dict(self._tags) |
245 | | - rv._contexts = dict(self._contexts) |
246 | | - rv._extras = dict(self._extras) |
| 244 | + rv._tags = self._tags.copy() |
| 245 | + rv._contexts = self._contexts.copy() |
| 246 | + rv._extras = self._extras.copy() |
247 | 247 |
|
248 | 248 | rv._breadcrumbs = copy(self._breadcrumbs) |
249 | | - rv._n_breadcrumbs_truncated = copy(self._n_breadcrumbs_truncated) |
250 | | - rv._event_processors = list(self._event_processors) |
251 | | - rv._error_processors = list(self._error_processors) |
| 249 | + rv._n_breadcrumbs_truncated = self._n_breadcrumbs_truncated |
| 250 | + rv._event_processors = self._event_processors.copy() |
| 251 | + rv._error_processors = self._error_processors.copy() |
252 | 252 | rv._propagation_context = self._propagation_context |
253 | 253 |
|
254 | 254 | rv._should_capture = self._should_capture |
255 | 255 | rv._span = self._span |
256 | 256 | rv._session = self._session |
257 | 257 | rv._force_auto_session_tracking = self._force_auto_session_tracking |
258 | | - rv._attachments = list(self._attachments) |
| 258 | + rv._attachments = self._attachments.copy() |
259 | 259 |
|
260 | 260 | rv._profile = self._profile |
261 | 261 |
|
@@ -683,12 +683,12 @@ def clear(self): |
683 | 683 | self._level = None # type: Optional[LogLevelStr] |
684 | 684 | self._fingerprint = None # type: Optional[List[str]] |
685 | 685 | self._transaction = None # type: Optional[str] |
686 | | - self._transaction_info = {} # type: MutableMapping[str, str] |
| 686 | + self._transaction_info = {} # type: dict[str, str] |
687 | 687 | self._user = None # type: Optional[Dict[str, Any]] |
688 | 688 |
|
689 | 689 | self._tags = {} # type: Dict[str, Any] |
690 | 690 | self._contexts = {} # type: Dict[str, Dict[str, Any]] |
691 | | - self._extras = {} # type: MutableMapping[str, Any] |
| 691 | + self._extras = {} # type: dict[str, Any] |
692 | 692 | self._attachments = [] # type: List[Attachment] |
693 | 693 |
|
694 | 694 | self.clear_breadcrumbs() |
|
0 commit comments