
    f                         d Z dZddlmZ ddlZddlZ G d de          Zej        ZdZ	dZ
d	Zd
ZeZe	Ze
ZeZeZ G d de          Zd Zd ZdS )zProtobuf Runtime versions and validators.

It should only be accessed by Protobuf gencodes and tests. DO NOT USE it
elsewhere.
zshaod@google.com (Dennis Shao)    )EnumNc                       e Zd ZdZdZdS )Domain      N)__name__
__module____qualname__GOOGLE_INTERNALPUBLIC     Y/var/www/html/Alfredo/env/lib/python3.11/site-packages/google/protobuf/runtime_version.pyr   r      s        /&&&r   r         r    c                       e Zd ZdZdS )VersionErrorz&Exception class for version violation.N)r   r	   r
   __doc__r   r   r   r   r   *   s        ....r   r   c                      t          |           )N)r   )msgs    r   _ReportVersionErrorr   .   s    Sr   c           
      H   t          j        d          }||                                dk    rdS t           dt           dt
           t           }| d| d| | }|dk     s|dk     s|dk     rt          d|           d}	| t          k    r(t          d| d	| j
         d
t          j
         d           |t          k    rH|t          dz
  k    rt          j        d|d|d|d           nt          d| d	| d
| d|	            t          |k     st          |k    r't
          |k     rt          d| d	| d
| d|	            n4t          |k    st
          |k    rt          j        d|d|d|d           |t          k    rt          d| d	| d
| d|	            dS dS )a  Function to validate versions.

  Args:
    gen_domain: The domain where the code was generated from.
    gen_major: The major version number of the gencode.
    gen_minor: The minor version number of the gencode.
    gen_patch: The patch version number of the gencode.
    gen_suffix: The version suffix e.g. '-dev', '-rc1' of the gencode.
    location: The proto location that causes the version violation.

  Raises:
    VersionError: if gencode version is invalid or incompatible with the
    runtime.
  )TEMORARILY_DISABLE_PROTOBUF_VERSION_CHECKNtrue.r   zInvalid gencode version: z`See Protobuf version guarantees at https://protobuf.dev/support/cross-version-runtime-guarantee.zBDetected mismatched Protobuf Gencode/Runtime domains when loading z
: gencode z	 runtime z2. Cross-domain usage of Protobuf is not supported.r   zProtobuf gencode version z= is exactly one major version older than the runtime version z at zZ. Please update the gencode to avoid compatibility violations in the next runtime release.zIDetected mismatched Protobuf Gencode/Runtime major versions when loading z". Same major version is required. zEDetected incompatible Protobuf Gencode/Runtime versions when loading zC. Runtime version cannot be older than the linked gencode version. z# is older than the runtime version z@. Please avoid checked-in Protobuf gencode that can be obsolete.zKDetected mismatched Protobuf Gencode/Runtime version suffixes when loading z%. Version suffixes must be the same. )osgetenvlowerMAJORMINORPATCHSUFFIXr   DOMAINr   namewarningswarn)

gen_domain	gen_major	gen_minor	gen_patch
gen_suffixlocationdisable_flagversiongen_versionerror_prompts
             r   ValidateProtobufRuntimeVersionr2   2   s   $ FGG,,"4"4"6"6&"@"@
F..u..u.f..'BByBB9BjBB+]]i!mmy1}}
@;@@
A
AAG 
 6	<	< 	< *	< 	<:@+	< 	< 	<   %EAImm [['''888-    == =*5= =@G= =.:= =   Y5I--%)2C2C	L	L 	L +	L 	L6=	L 	L=I	L 	L   
 yEI--MM ;;	+   6	>	> 	>(3	> 	>>E	> 	>/;	> 	>     r   )r   
__author__enumr   r   r&   r   r   
OSS_DOMAIN	OSS_MAJOR	OSS_MINOR	OSS_PATCH
OSS_SUFFIXr$   r    r!   r"   r#   	Exceptionr   r   r2   r   r   r   <module>r;      s     .
       				     T    ]
			
		/ / / / /9 / / /  I I I I Ir   