Ë
    sPêjj  ã                   óú   — d Z ddlmZ ddlmZmZmZ ddlmZ ddl	m
Z
 g d¢Z G d„ d	ee«      Z G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)av  
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.
é    )ÚABC)ÚClassVarÚLiteralÚOptional)Úwarné   )ÚSchemaVersion)ÚBaseSchemaDeprecationWarningÚSchemaDeprecationWarning1Dot1ÚSchemaDeprecationWarning1Dot2ÚSchemaDeprecationWarning1Dot3ÚSchemaDeprecationWarning1Dot4ÚSchemaDeprecationWarning1Dot5ÚSchemaDeprecationWarning1Dot6ÚSchemaDeprecationWarning1Dot7c                   óR   — e Zd ZU dZee   ed<   edddœdede	e   de
d	dfd
„«       Zy)r
   z9Base class for warnings about deprecated schema features.ÚSCHEMA_VERSIONNr   )Ú
stacklevelÚ
deprecatedÚinsteadr   Úreturnc                ó~   — d|› d| j                   j                  «       › d�}|r	|d|› d�z  }t        || |dz   ¬«       y)	z/Internal API. Not part of the public interface.ú`z ` is deprecated from CycloneDX vz	 onwards.z Please use `z
` instead.r   )Úcategoryr   N)r   Ú
to_versionr   )Úclsr   r   r   Úmsgs        úa/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/cyclonedx/schema/deprecation.pyÚ_warnz"BaseSchemaDeprecationWarning._warnX   sP   € ð �*�Ð=¸c×>PÑ>P×>[Ñ>[Ó>]Ð=^Ð^gÐhˆÙØ�] 7 )¨:Ð6Ñ6ˆCÜˆS˜3¨:¸©>Ö:ó    )N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r	   Ú__annotations__ÚclassmethodÚstrr   Úintr   © r    r   r
   r
   S   sL   … ÙCà˜]Ñ+Ó+àð;ÐXYò ;˜sð ;¨X°c©]ð ;ÐRUð ;Ð^bò ;ó ñ;r    r
   c                   óT   — e Zd ZU dZej
                  Zeeej
                        e	d<   y)r   zDClass for warnings about deprecated schema features in CycloneDX 1.7r   N)
r!   r"   r#   r$   r	   ÚV1_7r   r   r   r%   r)   r    r   r   r   a   ó%   … ÙNØ<I×<NÑ<N€N�H˜W ]×%7Ñ%7Ñ8Ñ9ÔNr    r   c                   óT   — e Zd ZU dZej
                  Zeeej
                        e	d<   y)r   zDClass for warnings about deprecated schema features in CycloneDX 1.6r   N)
r!   r"   r#   r$   r	   ÚV1_6r   r   r   r%   r)   r    r   r   r   f   r,   r    r   c                   óT   — e Zd ZU dZej
                  Zeeej
                        e	d<   y)r   zDClass for warnings about deprecated schema features in CycloneDX 1.5r   N)
r!   r"   r#   r$   r	   ÚV1_5r   r   r   r%   r)   r    r   r   r   k   r,   r    r   c                   óT   — e Zd ZU dZej
                  Zeeej
                        e	d<   y)r   zDClass for warnings about deprecated schema features in CycloneDX 1.4r   N)
r!   r"   r#   r$   r	   ÚV1_4r   r   r   r%   r)   r    r   r   r   p   r,   r    r   c                   óT   — e Zd ZU dZej
                  Zeeej
                        e	d<   y)r   zDClass for warnings about deprecated schema features in CycloneDX 1.3r   N)
r!   r"   r#   r$   r	   ÚV1_3r   r   r   r%   r)   r    r   r   r   u   r,   r    r   c                   óT   — e Zd ZU dZej
                  Zeeej
                        e	d<   y)r   zDClass for warnings about deprecated schema features in CycloneDX 1.2r   N)
r!   r"   r#   r$   r	   ÚV1_2r   r   r   r%   r)   r    r   r   r   z   r,   r    r   c                   óT   — e Zd ZU dZej
                  Zeeej
                        e	d<   y)r   zDClass for warnings about deprecated schema features in CycloneDX 1.1r   N)
r!   r"   r#   r$   r	   ÚV1_1r   r   r   r%   r)   r    r   r   r      r,   r    r   N)r$   Úabcr   Útypingr   r   r   Úwarningsr   Ú r	   Ú__all__ÚDeprecationWarningr
   r   r   r   r   r   r   r   r)   r    r   ú<module>r?      s›   ðñ&+õ\ ß .Ñ .Ý å ò	€ô;Ð#5°sô ;ôOÐ$@ô Oô
OÐ$@ô Oô
OÐ$@ô Oô
OÐ$@ô Oô
OÐ$@ô Oô
OÐ$@ô Oô
OÐ$@õ Or    