:py:mod:`cyclonedx.schema.deprecation`
======================================

.. py:module:: cyclonedx.schema.deprecation

.. autoapi-nested-parse::

   CycloneDX Schema Deprecation Warnings
   =====================================

   This module provides warning classes for deprecated features in CycloneDX schemas.
   Each warning class corresponds to a specific schema version, enabling downstream
   code to catch, filter, or otherwise handle schema-specific deprecation warnings.

   Intended Usage
   --------------

   Downstream consumers can manage warnings using Python's ``warnings`` module.
   Common scenarios include:

   - Filtering by schema version
   - Suppressing warnings in tests or batch processing
   - Logging or reporting deprecation warnings without raising exceptions

   Example
   -------

   .. code-block:: python

       import warnings
       from cyclonedx.schema.deprecation import (
           BaseSchemaDeprecationWarning,
           SchemaDeprecationWarning1Dot7,
       )

       # Suppress all CycloneDX schema deprecation warnings
       warnings.filterwarnings("ignore", category=BaseSchemaDeprecationWarning)

       # Suppress only warnings specific to schema version 1.7
       warnings.filterwarnings("ignore", category=SchemaDeprecationWarning1Dot7)

   Notes
   -----

   - All deprecation warnings inherit from :class:`BaseSchemaDeprecationWarning`.
   - The ``SCHEMA_VERSION`` class variable indicates the CycloneDX schema version
     where the feature became deprecated.
   - These warning classes are designed for downstream **filtering and logging**,
     not for raising exceptions.



Module Contents
---------------

.. py:exception:: BaseSchemaDeprecationWarning

   Bases: :py:obj:`DeprecationWarning`, :py:obj:`abc.ABC`

   Base class for warnings about deprecated schema features.

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[cyclonedx.schema.SchemaVersion]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SchemaDeprecationWarning1Dot7

   Bases: :py:obj:`BaseSchemaDeprecationWarning`

   Class for warnings about deprecated schema features in CycloneDX 1.7

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[Literal[cyclonedx.schema.SchemaVersion.V1_7]]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SchemaDeprecationWarning1Dot6

   Bases: :py:obj:`BaseSchemaDeprecationWarning`

   Class for warnings about deprecated schema features in CycloneDX 1.6

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[Literal[cyclonedx.schema.SchemaVersion.V1_6]]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SchemaDeprecationWarning1Dot5

   Bases: :py:obj:`BaseSchemaDeprecationWarning`

   Class for warnings about deprecated schema features in CycloneDX 1.5

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[Literal[cyclonedx.schema.SchemaVersion.V1_5]]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SchemaDeprecationWarning1Dot4

   Bases: :py:obj:`BaseSchemaDeprecationWarning`

   Class for warnings about deprecated schema features in CycloneDX 1.4

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[Literal[cyclonedx.schema.SchemaVersion.V1_4]]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SchemaDeprecationWarning1Dot3

   Bases: :py:obj:`BaseSchemaDeprecationWarning`

   Class for warnings about deprecated schema features in CycloneDX 1.3

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[Literal[cyclonedx.schema.SchemaVersion.V1_3]]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SchemaDeprecationWarning1Dot2

   Bases: :py:obj:`BaseSchemaDeprecationWarning`

   Class for warnings about deprecated schema features in CycloneDX 1.2

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[Literal[cyclonedx.schema.SchemaVersion.V1_2]]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SchemaDeprecationWarning1Dot1

   Bases: :py:obj:`BaseSchemaDeprecationWarning`

   Class for warnings about deprecated schema features in CycloneDX 1.1

   .. py:class:: args


   .. py:attribute:: SCHEMA_VERSION
      :annotation: :ClassVar[Literal[cyclonedx.schema.SchemaVersion.V1_1]]

      

   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



