Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 26b3e8e

Browse files
committed
[client] add deprecation warning
1 parent f39d8af commit 26b3e8e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_deprecated.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# dommage c'est du python 3.13, sinon deprecation lib
2-
# from warnings import deprecated
1+
import deprecation
32

43

54
class StixCyberObservableDeprecatedMixin:
@@ -11,6 +10,11 @@ class StixCyberObservableDeprecatedMixin:
1110
:return the observable
1211
"""
1312

13+
@deprecation.deprecated(
14+
deprecated_in="6.2",
15+
removed_in="6.5",
16+
details="Use promote_to_indicator_v2 instead.",
17+
)
1418
def promote_to_indicator(self, **kwargs):
1519
id = kwargs.get("id", None)
1620
custom_attributes = kwargs.get("customAttributes", None)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ cachetools~=5.3.0
1111
prometheus-client~=0.20.0
1212
opentelemetry-api~=1.22.0
1313
opentelemetry-sdk~=1.22.0
14+
deprecation~=2.1.0
1415
# OpenCTI
1516
filigran-sseclient~=1.0.0
1617
stix2~=3.0.1

0 commit comments

Comments
 (0)