Skip to content

Commit c656d4b

Browse files
committed
update CHANGELOG.md and add comment to BoundedAttributes __deepcopy__ implementation
1 parent 20c2434 commit c656d4b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
([#4935](https://github.com/open-telemetry/opentelemetry-python/pull/4935))
2323
- `opentelemetry-sdk`: upgrade vendored OTel configuration schema from v1.0.0-rc.3 to v1.0.0
2424
([#4965](https://github.com/open-telemetry/opentelemetry-python/pull/4965))
25-
- `opentelemetry-api`, `opentelemetry-sdk`: Add deepcopy support for `BoundedAttributes`
25+
- `opentelemetry-api`, `opentelemetry-sdk`: Add deepcopy support for `BoundedAttributes` and `BoundedList`
2626
([#4934](https://github.com/open-telemetry/opentelemetry-python/pull/4934))
2727

2828
## Version 1.40.0/0.61b0 (2026-03-04)

opentelemetry-api/src/opentelemetry/attributes/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ def __deepcopy__(self, memo: dict) -> "BoundedAttributes":
328328
)
329329
memo[id(self)] = copy_
330330
with self._lock:
331+
# Assign _dict directly to avoid re-cleaning already clean values
332+
# and to bypass the immutability guard in __setitem__
331333
copy_._dict = copy.deepcopy(self._dict, memo)
332334
copy_.dropped = self.dropped
333335
return copy_

0 commit comments

Comments
 (0)