+
    niA.                        R t ^ RIt^ RIt^ RIHtHtHtHt ^ RIt	^ RI
t	^ RIt	^ RIt	^ RIt	^ RIt	^ RIt	^ RIt	 ! R R]	P"                  P$                  4      t]	P(                  P*                  t]	P(                  P.                  t]	P(                  P2                  t]	P(                  P4                  t]	P(                  P6                  t]	P(                  P8                  t ! R R]	P(                  P:                  4      tR# )zDNS Versioned Zones.N)CallableDequeSetcastc                       ] tR t^tRtRtR# )UseTransactionz-To alter a versioned zone, use a transaction. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       gC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO\maestro-backend\venv\Lib\site-packages\dns/versioned.pyr   r      s    7r   r   c                     a a ] tR t^ t o. R%Ot]t]P                  P                  RR3V3R lV 3R lllt
R&V3R lR lltR'V3R lR	 lltR
 tR tR tV3R lR ltV3R lR ltR tR tR tR tR tR tR'V3R lV 3R llltV3R lR lt]P4                  P6                  R3V3R lV 3R lllt]P4                  P6                  R3V3R lV 3R lllt]P4                  P6                  3V3R lR  lltV3R! lR" ltV3R# lt R$t!Vt"V ;t## )(ZoneTNc                   < V ^8  d   QhRS[ P                  P                  S[,          R,          RS[ P                  P
                  RS[RS[RS[.S[R,          3,          R,          /# )   originNrdclass
relativizepruning_policyr   )	dnsnameNamestr
rdataclass
RdataClassboolr   Version)format__classdict__s   "r   __annotate__Zone.__annotate__-   sg     #
 #
#d*#
 **#
 	#

 !&'!2D4K!?@4G#
r   c                r  < \         SV `  WV4       \        P                  ! 4       V n        \
        P                  ! 4       V n        Vf   V P                  V n	        MW@n	        RV n
        RV n        \        P                  ! 4       V n        \        4       V n        V P                  R\!        V RR7      V4       R# )ar  Initialize a versioned zone object.

*origin* is the origin of the zone.  It may be a ``dns.name.Name``,
a ``str``, or ``None``.  If ``None``, then the zone's origin will
be set by the first ``$ORIGIN`` line in a zone file.

*rdclass*, an ``int``, the zone's rdata class; the default is class IN.

*relativize*, a ``bool``, determine's whether domain names are
relativized to the zone's origin.  The default is ``True``.

*pruning policy*, a function taking a ``Zone`` and a ``Version`` and returning
a ``bool``, or ``None``.  Should the version be pruned?  If ``None``,
the default policy, which retains one version is used.
NT)replacement)super__init__collectionsdeque	_versions	threadingLock_version_lock_default_pruning_policy_pruning_policy
_write_txn_write_event_write_waitersset_readers_commit_version_unlockedWritableVersion)selfr   r   r   r   	__class__s   &&&&&r   r(   Zone.__init__-   s    , 	*5)4):):)<&^^-!#'#?#?D #1 .2486A6G6G6I*-%%%/$D96	
r   c                H   < V ^8  d   QhRS[ R,          RS[ R,          RS[/# )r   idNserialreturn)intTransaction)r!   r"   s   "r   r#   r$   R   s-     % %*%-04Z%	%r   c                
   Ve   Ve   \        R4      hV P                  ;_uu_ 4        VeE   R p\        V P                  4       F  pVP                  V8X  g   K  Tp M	  Vf   \        R4      hEMLVEe5   V P                  '       d   \        P                  P                  pMV P                  f   Q hV P                  pR p\        V P                  4       F  pVP                  P                  V4      pV'       g   K(  VP                  V P                  \        P                  P                   4      pVf   Kb  \#        \        P$                  P&                  P                   P                   V^ ,          4      pV'       g   K  VP(                  V8X  g   K  Tp M	  Vf   \        R4      hMV P                  R,          p\+        V RV4      p	V P,                  P/                  V	4       V	uuR R R 4       #   + '       g   i     R # ; i)Nz!cannot specify both id and serialzversion not foundzserial not foundF)
ValueErrorr.   reversedr+   r<   KeyErrorr   r   r   emptyr   nodesgetget_rdatasetr   	rdatatypeSOAr   rdtypesANYr=   r@   r5   add)
r8   r<   r=   versionvonamenrdssoatxns
   &&&       r   readerZone.readerR   s    >f0@AA~!$..1Attrz"# 2 ?"#677 ##???HHNNE;;222 KKE!$..1AE*AqnnT\\3==;L;LM;$"3;;??#6#6#:#:CFC33::#7&'G! 2 ?"#566 # ..,dE73CMMc"A  s,   -G1-G1A1G1>A>G1G1AG11H	Fc                &   < V ^8  d   QhRS[ RS[/# )r   r&   r>   )r   r@   )r!   r"   s   "r   r#   r$   y   s     / /$ /; /r   c                   R p V P                   ;_uu_ 4        V P                  f4   W P                  8X  d$   \        WRR7      V n        R V n         R R R 4       MJ\        P
                  ! 4       pV P                  P                  V4       R R R 4       VP                  4        K  V P                  P                  4        V P                  #   + '       g   i     LH; i)NT)make_immutable)
r.   r1   r2   r@   r,   Eventr3   appendwait_setup_version)r8   r&   events   && r   writerZone.writery   s    ###
 ??*u8I8I/I '2$'DO )-D%! $#( ")##**51+ $R JJL&&(Y $#s   9C
0C

C	c                    \        V P                  4      ^ 8  d<   V P                  P                  4       V n        V P                  P	                  4        R# R# )    N)lenr3   popleftr2   r4   )r8   s   &r   !_maybe_wakeup_one_waiter_unlocked&Zone._maybe_wakeup_one_waiter_unlocked   sC    t""#a' $ 3 3 ; ; =D!!# (r   c                    R # )Tr   )r8   zonerO   s   &&&r   r/   Zone._default_pruning_policy   s    r   c                   \        V P                  4      ^ 8  g   Q h\        V P                  4      ^ 8  d   \        R V P                   4       4      pMV P                  R,          P                  pV P                  ^ ,          P                  V8  dG   V P                  W P                  ^ ,          4      '       d   V P                  P                  4        Kf  R# R# )rc   c              3   L   "   T F  qP                   P                  x  K  	  R # 5iN)rO   r<   ).0rU   s   & r   	<genexpr>0Zone._prune_versions_unlocked.<locals>.<genexpr>   s     E}[[^^}s   "$NrB   )rd   r+   r5   minr<   r0   re   )r8   
least_kepts   & r   _prune_versions_unlockedZone._prune_versions_unlocked   s    4>>"Q&&& t}}!Et}}EEJ+..JnnQ""Z/D4H4H..#5
 5
 NN""$5
/r   c                2   < V ^8  d   QhRS[ R,          RR/# )r   max_versionsNr>   )r?   )r!   r"   s   "r   r#   r$      s     ( (S4Z (D (r   c                r   a Se   S^8  d   \        R4      hSf   R pMV3R lpV P                  V4       R# )zISet a pruning policy that retains up to the specified number
of versions
Nzmax versions must be at least 1c                     R # Fr   )ri   _s   &&r   policy%Zone.set_max_versions.<locals>.policy   s    r   c                 4   < \        V P                  4      S8  # rm   )rd   r+   )ri   rz   rv   s   &&r   r{   r|      s    4>>*\99r   )rC   set_pruning_policy)r8   rv   r{   s   &f r   set_max_versionsZone.set_max_versions   s>     #q(8>??
: 	'r   c                Z   < V ^8  d   QhRS[ RS[.S[R,          3,          R,          RR/# )r   r{   r   Nr>   )r   r    r   )r!   r"   s   "r   r#   r$      s5     , ,0$+=>E,	,r   c                    Vf   V P                   pV P                  ;_uu_ 4        Wn        V P                  4        RRR4       R#   + '       g   i     R# ; i)a  Set the pruning policy for the zone.

The *policy* function takes a `Version` and returns `True` if
the version should be pruned, and `False` otherwise.  `None`
may also be specified for policy, in which case the default policy
is used.

Pruning checking proceeds from the least version and the first
time the function returns `False`, the checking stops.  I.e. the
retained versions are always a consecutive sequence.
N)r/   r.   r0   rs   )r8   r{   s   &&r   r~   Zone.set_pruning_policy   sA     >11F#) ))+  s   AA	c                    V P                   ;_uu_ 4        V P                  P                  V4       V P                  4        R R R 4       R #   + '       g   i     R # ; irm   )r.   r5   removers   r8   rU   s   &&r   	_end_readZone._end_read   s;    MM  %))+  s   ,AA	c                Z    V P                   V8X  g   Q hR V n         V P                  4        R # rm   )r1   rf   r   s   &&r   _end_write_unlockedZone._end_write_unlocked   s'    #%%%..0r   c                    V P                   ;_uu_ 4        V P                  V4       R R R 4       R #   + '       g   i     R # ; irm   )r.   r   r   s   &&r   
_end_writeZone._end_write   s+    $$S)  s	   1A	c                    V P                   P                  V4       V P                  4        VP                  V n        V P                  f   W0n        Ve   V P                  V4       R # R # rm   )r+   r\   rs   rG   r   r   r8   rU   rO   r   s   &&&&r   r6   Zone._commit_version_unlocked   sR    g&%%']]
;; K?$$S) r   c                    V P                   ;_uu_ 4        V P                  WV4       R R R 4       R #   + '       g   i     R # ; irm   )r.   r6   r   s   &&&&r   _commit_versionZone._commit_version  s-    ))#?  s	   2A	c                    \        V P                  4      ^ 8  d'   V P                  R,          P                  ^,           pV# ^pV# )rc   rB   )rd   r+   r<   )r8   r<   s   & r   _get_next_version_idZone._get_next_version_id	  s?    t~~"#&&*B 	 B	r   c                   < V ^8  d   QhRS[ P                  P                  S[,          RS[RS[ P
                  P                  /# )r   r   creater>   )r   r   r   r   r   nodeNode)r!   r"   s   "r   r#   r$     s:     ' 'HHMMC''15'	'r   c                >   < V'       d   \         h\        SV `	  V4      # rm   )r   r'   	find_node)r8   r   r   r9   s   &&&r   r   Zone.find_node  s       w &&r   c                \   < V ^8  d   QhRS[ P                  P                  S[,          RR/# )r   r   r>   N)r   r   r   r   )r!   r"   s   "r   r#   r$     s(       3  r   c                    \         hrm   r   )r8   r   s   &&r   delete_nodeZone.delete_node  s    r   c          
        < V ^8  d   QhRS[ P                  P                  S[,          RS[ P                  P
                  S[,          RS[ P                  P
                  S[,          RS[RS[ P                  P                  /# )r   r   rdtypecoversr   r>   	r   r   r   r   rJ   	RdataTyper   rdatasetRdataset)r!   r"   s   "r   r#   r$     sr     
8 
8hhmmc!
8 ''#-
8 ''#-	
8
 
8 
		
8r   c                ~   < V'       d   \         h\        SV `	  WV4      p\        P                  P                  V4      # rm   )r   r'   find_rdatasetr   r   ImmutableRdatasetr8   r   r   r   r   r   r9   s   &&&&& r   r   Zone.find_rdataset  s4       7(v>||--h77r   c                  < V ^8  d   QhRS[ P                  P                  S[,          RS[ P                  P
                  S[,          RS[ P                  P
                  S[,          RS[RS[ P                  P                  R,          /# )r   r   r   r   r   r>   Nr   )r!   r"   s   "r   r#   r$   &  sw      hhmmc! ''#- ''#-	
  
			%r   c                   < V'       d   \         h\        SV `	  WV4      pVe    \        P                  P                  V4      # R # rm   )r   r'   rI   r   r   r   r   s   &&&&& r   rI   Zone.get_rdataset&  s=       7'f=<<11(;;r   c                   < V ^8  d   QhRS[ P                  P                  S[,          RS[ P                  P
                  S[,          RS[ P                  P
                  S[,          RR/# )r   r   r   r   r>   N)r   r   r   r   rJ   r   )r!   r"   s   "r   r#   r$   5  s^      hhmmc! ''#- ''#-	
 
r   c                    \         hrm   r   )r8   r   r   r   s   &&&&r   delete_rdatasetZone.delete_rdataset5  s
     r   c                   < V ^8  d   QhRS[ P                  P                  S[,          RS[ P                  P
                  RR/# )r   r   r&   r>   N)r   r   r   r   r   r   )r!   r"   s   "r   r#   r$   =  s<      HHMMC'69ll6K6K	r   c                    \         hrm   r   )r8   r   r&   s   &&&r   replace_rdatasetZone.replace_rdataset=  s
     r   c                b   < V ^8  d   Qh/ S[ . S[P                  P                  3,          ;R&   # )r   node_factory)r   r   r   r   )r!   r"   s   "r   r#   r$       s$      2sxx}},-4 r   )	r0   r5   r.   r+   r2   r1   r3   rG   r   )r+   _versions_lockr1   r3   r2   r0   r5   )NNry   )$r	   r
   r   r   	__slots__r   r   r   r   INr(   rV   r`   rf   r/   rs   r   r~   r   r   r   r6   r   r   r   r   rJ   NONEr   rI   r   r   __annotate_func__r   __classdictcell____classcell__)r9   r"   s   @@r   r   r       s    I 15L
 .1^^->->JN#
 #
J% %N/ /b$
%$( ($, ,(,
1
**@' '  140B0B
8 
8  140B0B & 140B0B	  {  r   r   )r   r)   r,   typingr   r   r   r   dns.exceptionr   dns.namedns.nodedns.rdataclassdns.rdatasetdns.rdatatypedns.rdtypes.ANY.SOAdns.zone	exceptionDNSExceptionr   ri   VersionedNoder   ImmutableVersionedNodeImmutableNoder    r7   ImmutableVersionr@   r   r   r   r   <module>r      s       - -        8S]]// 8
 xx//
((

((**88,, hh""`388== `r   