Ë
    Úqj…8  ã                  óL  — d dl mZ d dlmZ d dlZd dlZd dlZd dlmZ d dl	Z	d dl
Z
d dl
mZ d dlZd dlZd dlmZ ddlmZ dd	lmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dl m!Z! d
dl m"Z" d
dl m#Z# d
dl m$Z$ e#sd„ Z%e%xZ&Z'nejP                  Z&d„ Z'd„ Z)d5d„Z*d„ Z+ G d„ de,«      Z-d „ Z.d!„ Z/d"„ Z0d#„ Z1d$„ Z2d%„ Z3e!d&„ «       Z4d'„ Z5d(„ Z6d)„ Z7d6d*„Z8d+„ Z9 G d,„ d-e:«      Z;d.„ Z<	 	 	 d7d0„Z=d1„ Z>d2„ Z?d3„ Z@ej‚                  d/d8d4„«       ZBy)9é    )Úannotations)ÚdequeN)Úchain)Ú	getsizeof)ÚAnyé   )Úconfig)Úmocké   )Úinspect)Ú
Connection)ÚColumn)ÚDropConstraint)Ú	DropTable)ÚForeignKeyConstraint)ÚMetaData)ÚTable©Úschema)ÚInteger©Ú	decorator)Údefaultdict)Úhas_refcount_gc)Úinspect_getfullargspecc                 óT   — t        j                  «        t        j                  «        y ©N)ÚgcÚcollect)Úargss    úX/var/www/html/kelly-backend/venv/lib/python3.12/site-packages/sqlalchemy/testing/util.pyÚnon_refcount_gc_collectr"   ,   s   € Ü
�
‰
ŒÜ
�
‰
�ó    c                  ó   — y r   © r%   r#   r!   Úlazy_gcr&   5   s   € Ør#   c               #  óÀ   ‡‡K  — t        «       } dd l}| j                  |«       | D ]4  Št        d|j                  dz   «      D ]  Š‰j
                  ˆˆfd„f–— Œ Œ6 y ­w)Nr   éþÿÿÿr   c                ó(   •— ‰j                  | ‰«      S r   )Údumps)ÚdÚpickle_Úprotocols    €€r!   Ú<lambda>zpicklers.<locals>.<lambda>B   s   ø€ ¨7¯=©=¸¸HÔ+Er#   )ÚsetÚpickleÚaddÚrangeÚHIGHEST_PROTOCOLÚloads)Úpicklersr0   r,   r-   s     @@r!   r5   r5   9   sU   ùè ø€ Ü‹u€HÛà‡L�L�Ôó ˆÜ˜b &×"9Ñ"9¸AÑ"=Ö>ˆHØ—-‘-Ô!EÐEÓEñ ?ñ ùs   „AAc                ó0   — t        j                  | |¬«      S )N)Úk)ÚrandomÚchoices)Ú
populationr7   s     r!   Úrandom_choicesr;   E   s   € Ü�>‰>˜*¨Ô*Ð*r#   c                óÊ   — t        | t        «      rt        | |«      S | t        j                  dd|z  z   «      z  j                  t        j                  «      t        d|«      z  S )NÚ1Ú0é
   )Ú
isinstanceÚfloatÚroundÚdecimalÚDecimalÚto_integralÚROUND_FLOORÚpow)ÚvalueÚprecs     r!   Úround_decimalrJ   I   s\   € Ü�%œÔÜ�U˜DÓ!Ð!ð ”G—O‘O C¨#°©*Ñ$4Ó5Ñ5×BÑBÜ×ÑóäˆB�‹ñð r#   c                  ó0   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)Ú	RandomSetc                ó~   — t        t        j                  | «      «      }t        j                  |«       t        |«      S r   )Úlistr/   Ú__iter__r8   ÚshuffleÚiter)ÚselfÚls     r!   rO   zRandomSet.__iter__T   s*   € Ü”—‘˜dÓ#Ó$ˆÜ�‰�qÔÜ�A‹wˆr#   c                ó®   — t        j                  dt        | «      dz
  «      }t        t        j                  | «      «      |   }| j                  |«       |S )Nr   r   )r8   ÚrandintÚlenrN   r/   rO   Úremove)rR   ÚindexÚitems      r!   ÚpopzRandomSet.popY   sC   € Ü—‘˜q¤# d£)¨a¡-Ó0ˆÜ”C—L‘L Ó&Ó'¨Ñ.ˆØ�‰�DÔØˆr#   c                ó@   — t        t        j                  | |«      «      S r   )rL   r/   Úunion©rR   Úothers     r!   r\   zRandomSet.union_   s   € ÜœŸ™ 4¨Ó/Ó0Ð0r#   c                ó@   — t        t        j                  | |«      «      S r   )rL   r/   Ú
differencer]   s     r!   r`   zRandomSet.differenceb   s   € ÜœŸ™¨¨eÓ4Ó5Ð5r#   c                ó@   — t        t        j                  | |«      «      S r   )rL   r/   Úintersectionr]   s     r!   rb   zRandomSet.intersectione   s   € Üœ×)Ñ)¨$°Ó6Ó7Ð7r#   c                ó   — t        | «      S r   )rL   )rR   s    r!   ÚcopyzRandomSet.copyh   s   € Ü˜‹Ðr#   N)	Ú__name__Ú
__module__Ú__qualname__rO   rZ   r\   r`   rb   rd   r%   r#   r!   rL   rL   S   s    „ òò
ò1ò6ò8ór#   rL   c                ó¬   — t        t        «      }| D ]  \  }}||   j                  |«       Œ t        |«      D ]  \  }}||d D ]  }|||   v sŒ  y Œ y)zATrue if the given sorting conforms to the given partial ordering.NFT)r   r/   r1   Ú	enumerate)ÚtuplesÚsorted_elementsÚdepsÚparentÚchildÚiÚnodeÚns           r!   Úconforms_partial_orderingrr   l   se   € ô ”sÓ€DÛ‰ˆ�ØˆV‰×Ñ˜Õð  ä˜_Ö-‰ˆˆ4Ø   Ó$ˆAØ�t˜A‘wŠÚñ %ð .ð
 r#   c                óŽ   ‡‡— t        t        «      Š| D ]  \  }}‰|   j                  |«       Œ ˆˆfd„Št         ‰|«      «      S )Nc              3  óÞ   •K  — t        | «      dk(  rt        | «      –— y | D ]G  }t        | «      j                  |g«      }|j	                  ‰|   «      rŒ3 ‰|«      D ]
  }|g|z   –— Œ ŒI y ­w)Nr   )rV   rN   r/   r`   rb   )ÚelementsÚelemÚsubsetÚsub_orderingÚ_all_orderingsÚedgess       €€r!   ry   z-all_partial_orderings.<locals>._all_orderings   sk   øè ø€ Üˆx‹=˜AÒÜ�x“.Ó ã �Ü˜X›×1Ñ1°4°&Ó9�Ø×*Ñ*¨5°©;Õ7Ù(6°vÖ(>˜Ø#˜f |Ñ3Ó3ñ )?ñ !ùs   ƒAA-ÁA-)r   r/   r1   rQ   )rj   ru   rm   rn   ry   rz   s       @@r!   Úall_partial_orderingsr{   z   sD   ù€ ÜœÓ€EÛ‰ˆ�Øˆe‰×Ñ˜Õ ð  õ4ô ‘˜xÓ(Ó)Ð)r#   c                ó¸   — 	 || _         | S # t        $ rE t        j                  | j                  | j
                  || j                  | j                  «      } Y | S w xY w)ac  Return a function with a given __name__.

    Will assign to __name__ and return the original function if possible on
    the Python implementation, otherwise a new function will be constructed.

    This function should be phased out as much as possible
    in favor of @decorator.   Tests that "generate" many named tests
    should be modernized.

    )re   Ú	TypeErrorÚtypesÚFunctionTypeÚ__code__Ú__globals__Ú__defaults__Ú__closure__)ÚfnÚnames     r!   Úfunction_namedr†   Œ   sX   € ð
ØˆŒð
 €Iøô	 ò 
Ü×ÑØ�K‰K˜Ÿ™¨¨r¯©ÀÇÁó
‰ð €Ið	
ús   ‚ ‹A
AÁAc                óÄ   — | j                  «       }	  ||g|¢­i |¤Ž}| j                  ddd«       |S #  t        j                  «       } | j                  |Ž }|s‚ |cY S xY w)a  Run the given function under the given contextmanager,
    simulating the behavior of 'with' to support older
    Python versions.

    This is not necessary anymore as we have placed 2.6
    as minimum Python version, however some tests are still using
    this structure.

    N)Ú	__enter__Ú__exit__ÚsysÚexc_info)Úctxr„   ÚargÚkwÚobjÚresultr‹   Úraise_s           r!   Úrun_as_contextmanagerr’       sj   € ð �-‰-‹/€Cð
Ù�CÐ$˜#Ò$ Ñ$ˆØ�‰�T˜4 Ô&ØˆøðÜ—<‘<“>ˆØ�—‘˜xÐ(ˆÙØàŠMús	   ’ 3 ³*Ac                ó>   — | D �ch c]  }t        |«      ’Œ c}S c c}w )zŠConverts the results of sql execution into a plain set of column tuples.

    Useful for asserting the results of an unordered query.
    ©Útuple)ÚresultsÚrows     r!   Úrowsetr˜   ¹   s    € ñ #*Ó*¡'˜3ŒE�#�J 'Ñ*Ð*ùÒ*s   …c                ó   — J | «       ‚r   r%   )Úmsgs    r!   Úfailr›   Â   s   € Ø�#Óˆ5r#   c                óp  — ddl m} t        j                  «       }|d   }t	        |dd«      }||_        	  | |i |¤Ž|j                  «        |j                  j                  }|r2t        ||«       |j                  «       j                  «        ||_        S t        |t        j                  «       ||_        S # |j                  «        |j                  j                  }|r2t        ||«       |j                  «       j                  «        ||_        w t        |t        j                  «       ||_        w xY w)ztProvide bound MetaData for a single test, dropping afterwards.

    Legacy; use the "metadata" pytest fixture.

    r   )Úfixturesr   ÚmetadataN)Ú r�   r   r   Úgetattrrž   Úclose_all_sessionsÚbaseÚ_connection_fixture_connectionÚdrop_all_tables_from_metadataÚget_transactionÚcommitr	   Údb)r„   r    rŽ   r�   rž   rR   Ú	prev_metaÚcfcs           r!   Úprovide_metadatarª   Æ   s  € õ ä�‰Ó €HØ�‰7€DÜ˜˜j¨$Ó/€IØ€D„Mð"Ù�4ˆ˜2‰ð 	×#Ñ#Ô%ð �m‰m×:Ñ:ˆÙô *¨(°CÔ8ð
 ×ÑÓ!×(Ñ(Ô*ð "ˆ�ô *¨(´F·I±IÔ>Ø!ˆ�øð# 	×#Ñ#Ô%ð �m‰m×:Ñ:ˆÙô *¨(°CÔ8ð
 ×ÑÓ!×(Ñ(Ô*ð "ˆ�ô *¨(´F·I±IÔ>Ø!ˆ�ús   µB8 Â8A=D5c            
     óJ  ‡— t        «       }| D ]  Š|j                  ‰«       Œ t        |«      }t        j                  | D �‡cg c]2  Šdj                  ˆfd„|D «       «      ft        ˆfd„|D «       «      z   ‘Œ4 c}ddt        |«      z  z   dj                  |«      dœŽS c c}w )a  A facade around @testing.combinations() oriented towards boolean
    keyword-based arguments.

    Basically generates a nice looking identifier based on the keywords
    and also sets up the argument names.

    E.g.::

        @testing.flag_combinations(
            dict(lazy=False, passive=False),
            dict(lazy=True, passive=False),
            dict(lazy=False, passive=True),
            dict(lazy=False, passive=True, raiseload=True),
        )


    would result in::

        @testing.combinations(
            ('', False, False, False),
            ('lazy', True, False, False),
            ('lazy_passive', True, True, False),
            ('lazy_passive', True, True, True),
            id_='iaaa',
            argnames='lazy,passive,raiseload'
        )

    Ú_c              3  óH   •K  — | ]  }‰j                  |d «      sŒ|–— Œ y­w©FN©Úget©Ú.0r7   r+   s     €r!   Ú	<genexpr>z$flag_combinations.<locals>.<genexpr>  s   øè ø€ Ð9¡˜A¨¯©¨q°%­”a¡ùs   ƒ"›"c              3  óB   •K  — | ]  }‰j                  |d «      –— Œ y­wr®   r¯   r±   s     €r!   r³   z$flag_combinations.<locals>.<genexpr>  s   øè ø€ Ð2©T¨�A—E‘E˜!˜U—O©Tùs   ƒro   ÚaÚ,)Úid_Úargnames)r/   ÚupdateÚsortedr	   ÚcombinationsÚjoinr•   rV   )r»   Úkeysr+   s     `r!   Úflag_combinationsr¾   ò   s¥   ø€ ô< ‹5€DãˆØ�‰�A�ð ô �$‹<€Dä×Ññ "ô

ñ "�ð �X‰XÓ9¡Ó9Ó9Ð;ÜÓ2©TÓ2Ó2ó3à!ñ

ð
 �3œ˜T›‘?Ñ#Ø—‘˜$“òð ùò

s   Á7B c                ó   ‡ — t        ‰ «      } ‰ |d   D �cg c]  }t        j                  «       ‘Œ c}Ž }ˆ fd„}t        j                  t        t        |«      «      D �cg c]  } ||«      f‘Œ c}i |¤ŽS c c}w c c}w )Nr   c                ó*   •‡ — ˆˆ fd„}d‰ z  |_         |S )Nc                 ó   •—  ‰di | ¤Ž‰   S )Nr%   r%   )rŽ   Úlambda_arg_setsÚposs    €€r!   Úfixturez<lambda_combinations.<locals>.create_fixture.<locals>.fixture(  s   ø€ Ù"Ñ( RÑ(¨Ñ-Ð-r#   zfixture_%3.3d)re   )rÃ   rÄ   rÂ   s   ` €r!   Úcreate_fixturez+lambda_combinations.<locals>.create_fixture'  s   ù€ õ	.ð +¨SÑ0ˆÔØˆr#   )r   r
   ÚMockr	   r»   r2   rV   )rÂ   rŽ   r    r�   Úarg_setsrÅ   ro   s   `      r!   Úlambda_combinationsrÈ   "  s‚   ø€ Ü! /Ó2€Dá¸¸QºÓ @¹°¤§¡¥¸Ñ @ÐA€Hôô ×ÑÜ(-¬c°(«mÔ(<Ó	=Ñ(< 1‰>˜!ÓÒ
Ð(<Ñ	=ðØACñð ùò !Aùò 
>s   –A6ÁA;c                ó  — t        | «      d   }|D �ci c]  }||j                  |«      “Œ }}t        | j                  «      }|j	                  |«       t        j                  | j                  |«      } |di |¤ŽS c c}w )zÝGiven a no-arg lambda and a namespace, return a new lambda that
    has all the values filled in.

    This is used so that we can have module-level fixtures that
    refer to instance-level variables using lambdas.

    r   r%   )r   rZ   Údictr�   r¹   r~   r   r€   )Ú__fnrŽ   Úpos_argsr�   Úpass_pos_argsÚglbÚnew_fns          r!   Úresolve_lambdarÐ   3  sx   € ô & dÓ+¨AÑ.€HÙ19Ó:±¨#�S˜"Ÿ&™& ›+Ñ%°€MÐ:Ü
ˆt×ÑÓ
 €CØ‡J�Jˆr„NÜ×Ñ §¡¨sÓ3€FÙÑ"�MÑ"Ð"ùò	 ;s   “A<c                ó   ‡ — ˆ fd„}|S )z&Provide MetaData for a pytest fixture.c                óH   •‡ — ˆ fd„} t        j                  ‰¬«      |«      S )Nc              3  ó$  •K  — t        j                  «       x}| _        	  ‰| |«      }|j                  t        j
                  «       |–— |j                  t        j
                  «       y # |j                  t        j
                  «       w xY w­wr   )r   r   rž   Ú
create_allr	   r§   Údrop_all)rR   rž   r�   r„   s      €r!   Úrun_ddlz3metadata_fixture.<locals>.decorate.<locals>.run_ddlH  sh   øè ø€ Ü'-§¡Ó'8Ð8ˆH�t”}ð-Ù˜D (Ó+�Ø×#Ñ#¤F§I¡IÔ.ð ’à×!Ñ!¤&§)¡)Õ,ø�×!Ñ!¤&§)¡)Õ,üs   ƒB ,A, Á BÁ,!BÂB)Úscope)r	   rÄ   )r„   rÖ   Úddls   ` €r!   Údecoratez"metadata_fixture.<locals>.decorateG  s    ù€ ô		-ð )Œv�~‰~ CÔ(¨Ó1Ð1r#   r%   )rØ   rÙ   s   ` r!   Úmetadata_fixturerÚ   D  s   ø€ ô2ð €Or#   c                 ó$   ‡ — t         ˆ fd„«       }|S )ziForce the given table names to be dropped after test complete,
    isolating for foreign key cycles

    c                óì   •— 	  | |i |¤Žt        t        j                  t        t        j                  «      ‰¬«       S # t        t        j                  t        t        j                  «      ‰¬«       w xY w)N)Úinclude_names)Údrop_all_tablesr	   r§   r   )r„   r    rŽ   Únamess      €r!   Úgozforce_drop_names.<locals>.go^  sG   ø€ ð	PÙ�t�?˜r‘?äœFŸI™I¤w¬v¯y©yÓ'9ÈÖOøŒOœFŸI™I¤w¬v¯y©yÓ'9ÈÖOús	   ƒ> ¾5A3r   )rß   rà   s   ` r!   Úforce_drop_namesrá   X  s    ø€ ô óPó ðPð €Ir#   c                  ó    — e Zd ZdZd„ Zd„ ZeZy)Úadictz,Dict keys available as attributes.  Shadows.c                óX   — 	 | |   S # t         $ r t        j                  | |«      cY S w xY wr   )ÚKeyErrorrÊ   Ú__getattribute__)rR   Úkeys     r!   ræ   zadict.__getattribute__k  s3   € ð	4Ø˜‘9ÐøÜò 	4Ü×(Ñ(¨¨sÓ3Ò3ð	4ús   ‚ ‡)¨)c                óD   — t        |D �cg c]  }| |   ‘Œ	 c}«      S c c}w r   r”   )rR   r½   rç   s      r!   Ú__call__zadict.__call__q  s#   € Ü©4Ó0©4 C�d˜3“i¨4Ñ0Ó1Ð1ùÒ0s   ŠN)re   rf   rg   Ú__doc__ræ   ré   Úget_allr%   r#   r!   rã   rã   h  s   „ Ù6ò4ò2ð �Gr#   rã   c                ó¬   ‡ ‡— ddl mŠ ˆˆ fd„}t        |t        «      s"|j	                  «       5 } ||«       d d d «       y  ||«       y # 1 sw Y   y xY w)Nr   )Úenginesc                ó
  •— ‰j                   j                  | «       | j                  j                  s4ddlm} |j                  dd¬«      5  ‰j                  | «       d d d «       y ‰j                  | «       y # 1 sw Y   y xY w)Nr   )Ú
assertionszCan't sort tablesF)Úassert_)Útesting_reaperÚprepare_for_drop_tablesÚdialectÚsupports_alterrŸ   rï   Úexpect_warningsrÕ   )Ú
connectionrï   rí   rž   s     €€r!   rà   z)drop_all_tables_from_metadata.<locals>.goz  sv   ø€ Ø×Ñ×6Ñ6°zÔBà×!Ñ!×0Ò0Ý$à×+Ñ+Ø#¨Uð ,õ ð ×!Ñ! *Ô-÷ð ð
 ×Ñ˜jÕ)÷ð ús   ÁA9Á9B)rŸ   rí   r@   r   Úbegin)rž   Úengine_or_connectionrà   rö   rí   s   `   @r!   r¤   r¤   w  sI   ù€ Ýõ*ô Ð*¬JÔ7Ø!×'Ñ'Ô)¨ZÙˆzŒN÷ *Ð)ñ 	ÐÕ ÷ *Ð)ús   ¯	A
Á
Ar   c                óÆ  — |�t        |«      }|�|dk(  sJ d«       ‚|f}| j                  «       5 }t        |j                  |¬«      «      D ]ÿ  \  }}|r?|�|d   |vrŒ|j	                  t        t        |d   t        «       |d   ¬«      «      «       ŒG|sŒJ| j                  j                  sŒa|D ]™  \  }}	|�|d   |vrŒt        |d   t        «       t        dt        «      t        dt        «      |d   ¬«      }
|j	                  t        t        |
j                  j                  g|
j                  j                   g|	¬	«      «      «       Œ› �Œ 	 d d d «       y # 1 sw Y   y xY w)
Nr   z2consider_schemas and schema are mutually exclusive)Úconsider_schemasr   r   r   ÚxÚy)r…   )r/   r÷   ÚreversedÚ%sort_tables_on_foreign_key_dependencyÚexecuter   r   r   ró   rô   r   r   r   r   Úcrû   rü   )ÚengineÚ	inspectorr   rú   rÝ   ÚconnÚ	table_keyÚfkcsÚt_keyÚfkcÚtbs              r!   rÞ   rÞ   Ž  sf  € ð Ð Ü˜MÓ*ˆàÐØð $
ò 
ð 	@à?ó	@ð 
ð #˜9Ðà	�‰Œ˜4Ü'Ø×;Ñ;Ø!1ð <ó ö 
‰OˆI�tñ
 à!Ð-Ø! !™¨MÑ9àØ—‘ÜÜ˜i¨™l¬H«J¸yÈ¹|ÔLóõò
 Ø—~‘~×4Ò4ØÛ"&‘J�E˜3à%Ð1Ø! !™H¨MÑ9à ÜØ˜a™Ü ›
Ü˜s¤GÓ,Ü˜s¤GÓ,Ø$ Q™xô�Bð —L‘LÜ&Ü0°"·$±$·&±&°¸B¿D¹D¿F¹F¸8È#ÔNóõò #'ñ' 
÷ 
�‰ús   ¯A%EÂB8EÅE c                ó$   ‡ — t         ˆ fd„«       }|S )Nc                ó`   •— 	  | |i |¤Ž‰j                  «        S # ‰j                  «        w xY wr   )Ú_clear)r„   r�   rŽ   Ú	event_clss      €r!   rÙ   z!teardown_events.<locals>.decorateÇ  s,   ø€ ð	Ù�s�>˜b‘>à×ÑÕøˆI×ÑÕús   ƒ ›-r   )r  rÙ   s   ` r!   Úteardown_eventsr  Æ  s   ø€ Üóó ðð €Or#   c                óÎ   ‡‡‡‡— d„ }t         t        t        t        t        t        t        |t
        t        t        t        iŠt        «       Št        d«      Šˆˆˆˆfd„Š ‰| «      S )z�Returns the approximate memory footprint an object and all of its
    contents.

    source: https://code.activestate.com/recipes/577504/


    c                óH   — t        j                  | j                  «       «      S r   )r   Úfrom_iterableÚitems)r+   s    r!   Údict_handlerz total_size.<locals>.dict_handlerÚ  s   € Ü×"Ñ" 1§7¡7£9Ó-Ð-r#   r   c           
     óú   •— t        | «      ‰v ry‰j                  t        | «      «       t        | ‰«      }‰j                  «       D ]2  \  }}t	        | |«      sŒ|t        t        ‰ || «      «      «      z  } |S  |S )Nr   )Úidr1   r   r  r@   ÚsumÚmap)ÚoÚsÚtypÚhandlerÚall_handlersÚdefault_sizeÚseenÚsizeofs       €€€€r!   r  ztotal_size.<locals>.sizeofè  sv   ø€ Üˆa‹5�D‰=ØØ�‰”�A“ŒÜ�a˜Ó&ˆà(×.Ñ.Ö0‰LˆC�Ü˜!˜SÕ!Ø”Sœ˜V¡W¨Q£ZÓ0Ó1Ñ1�ØØˆð	 1ð ˆr#   )r•   rQ   rN   r   rÊ   r/   Ú	frozensetr   )r  r  r  r  r  r  s     @@@@r!   Ú
total_sizer   Ñ  sR   û€ ò.ô 	ŒtÜŒdÜŒtÜˆlÜŒTÜ”4ð€Lô ‹5€DÜ˜Q“<€L÷
ñ �!‹9Ðr#   c                ó¬   — | g}t        «       }d}|rB|j                  d«      }||u r|dz  }n$t        |t        «      r|rt	        |«      |gz   |z   }|rŒB|S )z�given a cache key tuple, counts how many instances of actual
    tuples are found.

    used to alert large jumps in cache key complexity.

    r   r   )ÚobjectrZ   r@   r•   rN   )ÚtupÚstackÚsentinelÚnum_elementsrv   s        r!   Úcount_cache_key_tuplesr'  ÷  sh   € ð ˆE€Eä‹x€HØ€Lá
Ø�y‰y˜‹|ˆØ�8ÑØ˜AÑ‰LÜ˜œeÔ$ÙÜ˜T›
 h ZÑ/°%Ñ7�ò ð Ðr#   c           	   #  ó  K  — t        j                   «       }d –— t        j                   «       |z
  }|| kD  r&	  |«        t        j                  d|d›d| › d�«       y y # t        j                  d|d›d| › d�«       w xY w­w)Nztest took too long (z.4fz seconds > Ú))Útimer	   Ú	skip_test)ÚsecondsÚcleanupÚnowÚsecs       r!   Úskip_if_timeoutr0    sƒ   è ø€ ô �)‰)‹+€CÛ	Ü
�)‰)‹+˜Ñ
€CØ
ˆW‚}ð	ÙŒIä×ÑØ& s¨3 i¨{¸7¸)À1ÐEõð	 øô ×ÑØ& s¨3 i¨{¸7¸)À1ÐEõüs   ‚5B ¸A ¿B ÁA=Á=B )r   )Úfunction)Nr   N)r,  rA   r-  r   )CÚ
__future__r   Úcollectionsr   Ú
contextlibrC   r   Ú	itertoolsr   r8   rŠ   r   r*  r~   Útypingr   rŸ   r	   r
   r   r  r   r   r   r   r   r   r   r   ÚsqlÚsql.sqltypesr   Úutilr   r   r   r   r"   Ú
gc_collectr&   r   r5   r;   rJ   r/   rL   rr   r{   r†   r’   r˜   r›   rª   r¾   rÈ   rÐ   rÚ   rá   rÊ   rã   r¤   rÞ   r  r   r'  Úcontextmanagerr0  r%   r#   r!   Ú<module>r<     s6  ðõ #å Û Û Û 	Ý Û Û 
Ý Û Û Ý å Ý Ý Ý Ý Ý #Ý Ý )Ý Ý Ý Ý "Ý Ý Ý "Ý )ñ òð 3Ð2€J‘ð —‘€Jòò	Fó+òô�ô ò2ò*ò$ò(ò2+òð ñ("ó ð("òV-ò`ò"#ó"ò(ô ˆDô ò!ð4 ØØó5òpò#òLð, ×Ñóó ñr#   