File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,6 @@ class DataClassification:
7373 """
7474 This is our internal representation of the `dataClassificationType` complex type within the CycloneDX standard.
7575
76- DataClassification might be deprecated since CycloneDX 1.5, but it is not deprecated in this library.
77- In fact, this library will try to provide a compatibility layer if needed.
78-
7976 .. note::
8077 See the CycloneDX Schema for dataClassificationType:
8178 https://cyclonedx.org/docs/1.6/xml/#type_dataClassificationType
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def __init__(
6161 endpoints : Optional [Iterable [XsUri ]] = None ,
6262 authenticated : Optional [bool ] = None ,
6363 x_trust_boundary : Optional [bool ] = None ,
64+ # Deprecated since v1.5
6465 data : Optional [Iterable [DataClassification ]] = None ,
6566 licenses : Optional [Iterable [License ]] = None ,
6667 external_references : Optional [Iterable [ExternalReference ]] = None ,
@@ -259,6 +260,10 @@ def data(self) -> 'SortedSet[DataClassification]':
259260
260261 @data .setter
261262 def data (self , data : Iterable [DataClassification ]) -> None :
263+ if data :
264+ warn ('`@.data` is deprecated from CycloneDX v1.5 onwards. '
265+ 'Alternative implementation is planned for future versions.' ,
266+ DeprecationWarning )
262267 self ._data = SortedSet (data )
263268
264269 @property
You can’t perform that action at this time.
0 commit comments