2626
2727import py_serializable as serializable
2828from sortedcontainers import SortedSet
29+ from typing_extensions import deprecated
2930
3031from .._internal .compare import ComparableTuple as _ComparableTuple
3132from .._internal .time import get_now_utc as _get_now_utc
@@ -706,6 +707,8 @@ def get_component_by_purl(self, purl: Optional['PackageURL']) -> Optional[Compon
706707
707708 Returns:
708709 `Component` or `None`
710+
711+ .. deprecated:: next
709712 """
710713 if purl :
711714 found = [x for x in self .components if x .purl == purl ]
@@ -720,6 +723,8 @@ def get_urn_uuid(self) -> str:
720723
721724 Returns:
722725 URN formatted UUID that uniquely identified this Bom instance.
726+
727+ .. deprecated:: next
723728 """
724729 return self .serial_number .urn
725730
@@ -733,6 +738,8 @@ def has_component(self, component: Component) -> bool:
733738
734739 Returns:
735740 `bool` - `True` if the supplied Component is part of this Bom, `False` otherwise.
741+
742+ .. deprecated:: next
736743 """
737744 return component in self .components
738745
@@ -751,6 +758,8 @@ def get_vulnerabilities_for_bom_ref(self, bom_ref: BomRef) -> 'SortedSet[Vulnera
751758
752759 Returns:
753760 `SortedSet` of `Vulnerability`
761+
762+ .. deprecated:: next
754763 """
755764
756765 vulnerabilities : SortedSet [Vulnerability ] = SortedSet ()
@@ -766,6 +775,8 @@ def has_vulnerabilities(self) -> bool:
766775
767776 Returns:
768777 `bool` - `True` if this Bom has at least one Vulnerability, `False` otherwise.
778+
779+ .. deprecated:: next
769780 """
770781 return bool (self .vulnerabilities )
771782
@@ -788,6 +799,10 @@ def register_dependency(self, target: Dependable, depends_on: Optional[Iterable[
788799 self .register_dependency (target = _d2 , depends_on = None )
789800
790801 def urn (self ) -> str :
802+ """
803+ .. deprecated:: next
804+ """
805+ # idea: have 'serial_number' be a string, and use it instead of this method
791806 return f'{ _BOM_LINK_PREFIX } { self .serial_number } /{ self .version } '
792807
793808 def validate (self ) -> bool :
@@ -797,7 +812,10 @@ def validate(self) -> bool:
797812
798813 Returns:
799814 `bool`
815+
816+ .. deprecated:: next
800817 """
818+ # !! deprecated function. have this as an part of the normlization process, like the BomRefDiscrimator
801819 # 0. Make sure all Dependable have a Dependency entry
802820 if self .metadata .component :
803821 self .register_dependency (target = self .metadata .component )
0 commit comments