
    q	hG                         S r SrSSKJr  SSKrSSKr " S S\5      r\R                  rSr	Sr
S	rS
r\r\	r\
r\r\rSrSq " S S\5      rS rS rg)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                       \ rS rSrSrSrSrg)Domain          N)__name__
__module____qualname____firstlineno__GOOGLE_INTERNALPUBLIC__static_attributes__r	       Q/var/www/html/env/lib/python3.13/site-packages/google/protobuf/runtime_version.pyr   r      s    /&r   r         r       c                       \ rS rSrSrSrg)VersionError-   z&Exception class for version violation.r	   N)r
   r   r   r   __doc__r   r	   r   r   r   r   -   s    .r   r   c                     [        U 5      e)N)r   )msgs    r   _ReportVersionErrorr   1   s    Sr   c           
         [         R                  " S5      nUb  UR                  5       S:X  a  g[         S[         S[
         [         3nU SU SU U 3nUS:  d  US:  d  US:  a  [        SU 35      eSn	U [        :w  a-  [        SU S	U R                   S
[        R                   S35        U[        :w  a_  U[        S-
  :X  a;  [        [        :  a,  [        R                  " SU< SU< SU< S35        [        S-  qO[        SU S	U S
U SU	 35        [        U:  d  [        U:X  a!  [
        U:  a  [        SU S	U S
U SU	 35        U[        :w  a  [        SU S	U S
U SU	 35        gg)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.
*TEMPORARILY_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. 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_warning_count_MAX_WARNING_COUNTwarningswarn)

gen_domain	gen_major	gen_minor	gen_patch
gen_suffixlocationdisable_flagversiongen_versionerror_prompts
             r   ValidateProtobufRuntimeVersionr9   5   s   $ GH,,"4"4"6&"@
 gQugQugfX.'+Qyk9+j\B+]i!my1}
2;-@
AAG 
 6	:Z
0	&++ G<	< %EAI	,	, GX/	
 	!Zz+iy I..:^= Y5I-%)2C	:Z}IgY ?==IN	L 6	:Z}IgY G//;n	> r   )r   
__author__enumr   r"   r-   r   r   
OSS_DOMAIN	OSS_MAJOR	OSS_MINOR	OSS_PATCH
OSS_SUFFIXr)   r%   r&   r'   r(   r,   r+   	Exceptionr   r   r9   r	   r   r   <module>rB      s    .
  	 T  ]]
			
		  /9 /Gr   