Skip to content

Commit 39de6d1

Browse files
committed
revert warning on models.service.Service.data
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 223ebf7 commit 39de6d1

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

cyclonedx/model/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ 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+
7679
.. note::
7780
See the CycloneDX Schema for dataClassificationType:
7881
https://cyclonedx.org/docs/1.6/xml/#type_dataClassificationType

cyclonedx/model/service.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
from collections.abc import Iterable
2828
from typing import Any, Optional, Union
29-
from warnings import warn
3029

3130
import py_serializable as serializable
3231
from sortedcontainers import SortedSet
@@ -62,7 +61,6 @@ def __init__(
6261
endpoints: Optional[Iterable[XsUri]] = None,
6362
authenticated: Optional[bool] = None,
6463
x_trust_boundary: Optional[bool] = None,
65-
# Deprecated since v1.5
6664
data: Optional[Iterable[DataClassification]] = None,
6765
licenses: Optional[Iterable[License]] = None,
6866
external_references: Optional[Iterable[ExternalReference]] = None,
@@ -261,10 +259,6 @@ def data(self) -> 'SortedSet[DataClassification]':
261259

262260
@data.setter
263261
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)
268262
self._data = SortedSet(data)
269263

270264
@property

0 commit comments

Comments
 (0)