File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,13 +87,7 @@ def __init__(
8787 self .properties = properties or []
8888 self .manufacturer = manufacturer
8989 self .lifecycles = lifecycles or []
90-
9190 self .manufacture = manufacture
92- if manufacture :
93- warn (
94- '`bom.metadata.manufacture` is deprecated from CycloneDX v1.6 onwards. '
95- 'Please use `bom.metadata.component.manufacturer` instead.' ,
96- DeprecationWarning )
9791
9892 @property
9993 @serializable .type_mapping (serializable .helpers .XsdDateTime )
@@ -214,6 +208,11 @@ def manufacture(self, manufacture: Optional[OrganizationalEntity]) -> None:
214208 @todo Based on https://github.com/CycloneDX/specification/issues/346,
215209 we should set this data on `.component.manufacturer`.
216210 """
211+ if manufacture :
212+ warn (
213+ '`bom.metadata.manufacture` is deprecated from CycloneDX v1.6 onwards. '
214+ 'Please use `bom.metadata.component.manufacturer` instead.' ,
215+ DeprecationWarning )
217216 self ._manufacture = manufacture
218217
219218 @property
Original file line number Diff line number Diff line change @@ -1035,12 +1035,6 @@ def __init__(
10351035 self .crypto_properties = crypto_properties
10361036 self .tags = tags or []
10371037
1038- if modified :
1039- warn ('`.component.modified` is deprecated from CycloneDX v1.3 onwards. '
1040- 'Please use `@.pedigree` instead.' , DeprecationWarning )
1041- if author :
1042- warn ('`.component.author` is deprecated from CycloneDX v1.6 onwards. '
1043- 'Please use `@.authors` or `@.manufacturer` instead.' , DeprecationWarning )
10441038
10451039 @property
10461040 @serializable .type_mapping (_ComponentTypeSerializationHelper )
@@ -1175,6 +1169,9 @@ def author(self) -> Optional[str]:
11751169
11761170 @author .setter
11771171 def author (self , author : Optional [str ]) -> None :
1172+ if author :
1173+ warn ('`.component.author` is deprecated from CycloneDX v1.6 onwards. '
1174+ 'Please use `@.authors` or `@.manufacturer` instead.' , DeprecationWarning )
11781175 self ._author = author
11791176
11801177 @property
@@ -1450,6 +1447,9 @@ def modified(self) -> bool:
14501447
14511448 @modified .setter
14521449 def modified (self , modified : bool ) -> None :
1450+ if modified :
1451+ warn ('`.component.modified` is deprecated from CycloneDX v1.3 onwards. '
1452+ 'Please use `@.pedigree` instead.' , DeprecationWarning )
14531453 self ._modified = modified
14541454
14551455 @property
You can’t perform that action at this time.
0 commit comments