File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-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 2626
2727from collections .abc import Iterable
2828from typing import Any , Optional , Union
29+ from warnings import warn
2930
3031import py_serializable as serializable
3132from sortedcontainers import SortedSet
@@ -61,6 +62,7 @@ def __init__(
6162 endpoints : Optional [Iterable [XsUri ]] = None ,
6263 authenticated : Optional [bool ] = None ,
6364 x_trust_boundary : Optional [bool ] = None ,
65+ # Deprecated since v1.5
6466 data : Optional [Iterable [DataClassification ]] = None ,
6567 licenses : Optional [Iterable [License ]] = None ,
6668 external_references : Optional [Iterable [ExternalReference ]] = None ,
@@ -259,6 +261,10 @@ def data(self) -> 'SortedSet[DataClassification]':
259261
260262 @data .setter
261263 def data (self , data : Iterable [DataClassification ]) -> None :
264+ if data :
265+ warn ('`@.data` is deprecated from CycloneDX v1.5 onwards. '
266+ 'Alternative implementation is planned for future versions.' ,
267+ DeprecationWarning )
262268 self ._data = SortedSet (data )
263269
264270 @property
You can’t perform that action at this time.
0 commit comments