Skip to content

Commit 3e03a5d

Browse files
fix: use normal properties for fingerprint fields
Replace computed_field with regular properties to ensure proper copy behavior. New fingerprints are generated during copy operations while maintaining auto-generated field exclusion from __init__.
1 parent fa212ff commit 3e03a5d

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/crewai/security/fingerprint.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Annotated, Any
99
from uuid import UUID, uuid4, uuid5
1010

11-
from pydantic import BaseModel, BeforeValidator, Field, PrivateAttr, computed_field
11+
from pydantic import BaseModel, BeforeValidator, Field, PrivateAttr
1212
from typing_extensions import Self
1313

1414
from crewai.security.constants import CREW_AI_NAMESPACE
@@ -61,24 +61,14 @@ class Fingerprint(BaseModel):
6161
default_factory=dict
6262
)
6363

64-
@computed_field # type: ignore[misc]
6564
@property
6665
def uuid_str(self) -> str:
67-
"""Get the string representation of the UUID for this fingerprint.
68-
69-
Notes:
70-
Mimics frozen field behavior using computed_field.
71-
"""
66+
"""Get the string representation of the UUID for this fingerprint."""
7267
return self._uuid_str
7368

74-
@computed_field # type: ignore[misc]
7569
@property
7670
def created_at(self) -> datetime:
77-
"""Get the creation timestamp for this fingerprint.
78-
79-
Notes:
80-
Mimics frozen field behavior using computed_field.
81-
"""
71+
"""Get the creation timestamp for this fingerprint."""
8272
return self._created_at
8373

8474
@property

0 commit comments

Comments
 (0)