/usr/lib/python3.9/site-packages/dns/__pycache__
NameSizeModeActions
asyncbackend.cpython-39.opt-1.pyc26160644editdlrm
asyncbackend.cpython-39.pyc26160644editdlrm
asyncquery.cpython-39.opt-1.pyc178050644editdlrm
asyncquery.cpython-39.pyc178170644editdlrm
asyncresolver.cpython-39.opt-1.pyc129580644editdlrm
asyncresolver.cpython-39.pyc130020644editdlrm
dnssec.cpython-39.opt-1.pyc321600644editdlrm
dnssec.cpython-39.pyc321880644editdlrm
dnssectypes.cpython-39.opt-1.pyc16160644editdlrm
dnssectypes.cpython-39.pyc16160644editdlrm
e164.cpython-39.opt-1.pyc34520644editdlrm
e164.cpython-39.pyc34520644editdlrm
edns.cpython-39.opt-1.pyc147200644editdlrm
edns.cpython-39.pyc147340644editdlrm
entropy.cpython-39.opt-1.pyc33480644editdlrm
entropy.cpython-39.pyc33480644editdlrm
enum.cpython-39.opt-1.pyc32490644editdlrm
enum.cpython-39.pyc32490644editdlrm
exception.cpython-39.opt-1.pyc55180644editdlrm
exception.cpython-39.pyc57140644editdlrm
flags.cpython-39.opt-1.pyc22080644editdlrm
flags.cpython-39.pyc22080644editdlrm
grange.cpython-39.opt-1.pyc10890644editdlrm
grange.cpython-39.pyc11330644editdlrm
immutable.cpython-39.opt-1.pyc24280644editdlrm
immutable.cpython-39.pyc24280644editdlrm
inet.cpython-39.opt-1.pyc46030644editdlrm
inet.cpython-39.pyc46030644editdlrm
ipv4.cpython-39.opt-1.pyc18440644editdlrm
ipv4.cpython-39.pyc18440644editdlrm
ipv6.cpython-39.opt-1.pyc39380644editdlrm
ipv6.cpython-39.pyc39380644editdlrm
message.cpython-39.opt-1.pyc506310644editdlrm
message.cpython-39.pyc506720644editdlrm
name.cpython-39.opt-1.pyc350740644editdlrm
name.cpython-39.pyc350890644editdlrm
namedict.cpython-39.opt-1.pyc29860644editdlrm
namedict.cpython-39.pyc29860644editdlrm
nameserver.cpython-39.opt-1.pyc89080644editdlrm
nameserver.cpython-39.pyc89080644editdlrm
node.cpython-39.opt-1.pyc116050644editdlrm
node.cpython-39.pyc116050644editdlrm
opcode.cpython-39.opt-1.pyc24750644editdlrm
opcode.cpython-39.pyc24750644editdlrm
query.cpython-39.opt-1.pyc402980644editdlrm
query.cpython-39.pyc403430644editdlrm
rcode.cpython-39.opt-1.pyc32530644editdlrm
rcode.cpython-39.pyc32530644editdlrm
rdata.cpython-39.opt-1.pyc236090644editdlrm
rdata.cpython-39.pyc236090644editdlrm
rdataclass.cpython-39.opt-1.pyc27920644editdlrm
rdataclass.cpython-39.pyc27920644editdlrm
rdataset.cpython-39.opt-1.pyc154370644editdlrm
rdataset.cpython-39.pyc154510644editdlrm
rdatatype.cpython-39.opt-1.pyc66730644editdlrm
rdatatype.cpython-39.pyc66730644editdlrm
renderer.cpython-39.opt-1.pyc98220644editdlrm
renderer.cpython-39.pyc98410644editdlrm
resolver.cpython-39.opt-1.pyc524720644editdlrm
resolver.cpython-39.pyc526250644editdlrm
reversename.cpython-39.opt-1.pyc30550644editdlrm
reversename.cpython-39.pyc30550644editdlrm
rrset.cpython-39.opt-1.pyc78850644editdlrm
rrset.cpython-39.pyc78990644editdlrm
serial.cpython-39.opt-1.pyc29330644editdlrm
serial.cpython-39.pyc29330644editdlrm
set.cpython-39.opt-1.pyc87990644editdlrm
set.cpython-39.pyc87990644editdlrm
tokenizer.cpython-39.opt-1.pyc172420644editdlrm
tokenizer.cpython-39.pyc172560644editdlrm
transaction.cpython-39.opt-1.pyc202610644editdlrm
transaction.cpython-39.pyc202610644editdlrm
tsig.cpython-39.opt-1.pyc103810644editdlrm
tsig.cpython-39.pyc103810644editdlrm
tsigkeyring.cpython-39.opt-1.pyc18350644editdlrm
tsigkeyring.cpython-39.pyc18350644editdlrm
ttl.cpython-39.opt-1.pyc16800644editdlrm
ttl.cpython-39.pyc16800644editdlrm
update.cpython-39.opt-1.pyc88860644editdlrm
update.cpython-39.pyc88860644editdlrm
version.cpython-39.opt-1.pyc5630644editdlrm
version.cpython-39.pyc5630644editdlrm
versioned.cpython-39.opt-1.pyc87230644editdlrm
versioned.cpython-39.pyc87750644editdlrm
win32util.cpython-39.opt-1.pyc56530644editdlrm
win32util.cpython-39.pyc56530644editdlrm
wire.cpython-39.opt-1.pyc33270644editdlrm
wire.cpython-39.pyc33550644editdlrm
xfr.cpython-39.opt-1.pyc77710644editdlrm
xfr.cpython-39.pyc77890644editdlrm
zone.cpython-39.opt-1.pyc452680644editdlrm
zone.cpython-39.pyc454120644editdlrm
zonefile.cpython-39.opt-1.pyc176630644editdlrm
zonefile.cpython-39.pyc176870644editdlrm
zonetypes.cpython-39.opt-1.pyc10230644editdlrm
zonetypes.cpython-39.pyc10230644editdlrm
_asyncbackend.cpython-39.opt-1.pyc42080644editdlrm
_asyncbackend.cpython-39.pyc42080644editdlrm
_asyncio_backend.cpython-39.opt-1.pyc89840644editdlrm
_asyncio_backend.cpython-39.pyc90020644editdlrm
_ddr.cpython-39.opt-1.pyc40710644editdlrm
_ddr.cpython-39.pyc40710644editdlrm
_features.cpython-39.opt-1.pyc23670644editdlrm
_features.cpython-39.pyc23670644editdlrm
_immutable_ctx.cpython-39.opt-1.pyc21590644editdlrm
_immutable_ctx.cpython-39.pyc21590644editdlrm
__init__.cpython-39.opt-1.pyc6670644editdlrm
__init__.cpython-39.pyc6670644editdlrm
Edit: /usr/lib/python3.9/site-packages/dns/__pycache__/transaction.cpython-39.pyc (20261B)
a MelX@s.ddlZddlmZmZmZmZmZmZmZddl Z ddl Z ddl Z ddl Z ddlZ ddlZ ddlZ ddlZ ddlZ GdddZGddde jjZGddde jjZGd d d e jjZd d Zd dZede jje jjgdfZede jje j j!e j j!gdfZ"ede jjgdfZ#GdddZ$dS)N)AnyCallableIteratorListOptionalTupleUnionc@s|eZdZddddZdeddddZeeej j eeej j fdd d Z ej j dd d Zeej j dd dZdS)TransactionManager TransactionreturncCstdS)zBegin a read-only transaction.NNotImplementedErrorselfr3/usr/lib/python3.9/site-packages/dns/transaction.pyreaderszTransactionManager.readerF) replacementr cCstdS)aBegin a writable transaction. *replacement*, a ``bool``. If `True`, the content of the transaction completely replaces any prior content. If False, the default, then the content of the transaction updates the existing content. Nr )rrrrrwriterszTransactionManager.writercCstdS)aqReturns a tuple (absolute_origin, relativize, effective_origin) giving the absolute name of the default origin for any relative domain names, the "effective origin", and whether names should be relativized. The "effective origin" is the absolute origin if relativize is False, and the empty name if relativize is true. (The effective origin is provided even though it can be computed from the absolute_origin and relativize setting because it avoids a lot of code duplication.) If the returned names are `None`, then no origin information is available. This information is used by code working with transactions to allow it to coordinate relativization. The transaction code itself takes what it gets (i.e. does not change name relativity). Nr rrrrorigin_information sz%TransactionManager.origin_informationcCstdS)z%The class of the transaction manager.Nr rrrr get_class;szTransactionManager.get_classcCs|\}}}|r|SdSdS)z#Origin to use in from_wire() calls.N)r)rZabsolute_originZ relativize_rrrfrom_wire_origin?sz#TransactionManager.from_wire_originN)F)__name__ __module__ __qualname__rboolrrrdnsnameNamerZ rdataclassZ RdataClassrrrrrrr s   r c@seZdZdZdS)DeleteNotExactz>Existing data did not match data specified by an exact delete.Nrrr__doc__rrrrr!Hsr!c@seZdZdZdS)ReadOnlyz*Tried to write to a read-only transaction.Nr"rrrrr$Lsr$c@seZdZdZdS) AlreadyEndedz*Tried to use an already-ended transaction.Nr"rrrrr%Psr%cCs&|dust|tjjr|Stj|SN) isinstancerrdatasetImmutableRdataset)r(rrr_ensure_immutable_rdatasetTsr*cCs |dus|r|Stj|Sr&)Z is_immutablernodeZ ImmutableNode)r+rrr_ensure_immutable_nodeZsr,r c@sdeZdZd`eeedddZejjfe e ej j e fe ejje fe ejje fejjdddZej j e ejjdd d Zd d d dZed dddZed dddZed dddZed dddZe ej j e fedddZddej jfeeej j d dddZdd Zed d!d"Z d d d#d$Z!d d d%d&Z"e#d d'd(d)Z$e%d d'd*d+Z&e'd d'd,d-Z(e)e*ej j ejjfd d.d/Z+e)ej j d d0d1Z,d2d3Z-d4d5Z.d6d7Z/d8d9Z0d:d;Z1dd?Z3d@dAZ4dBdCZ5dDdEZ6dFdGZ7dHdIZ8dJdKZ9dLdMZ:dNdOZ;dPdQZdVdWZ?dXdYZ@dZd[ZAd\d]ZBd^d_ZCd S)ar F)managerr read_onlycCs.||_||_||_d|_g|_g|_g|_dSNF)r-rr._ended_check_put_rdataset_check_delete_rdataset_check_delete_name)rr-rr.rrr__init__kszTransaction.__init__)rrdtypecoversr cCsR|t|tr tj|d}tjj|}tjj|}| |||}t |S)zReturn the rdataset associated with *name*, *rdtype*, and *covers*, or `None` if not found. Note that the returned rdataset is immutable. N) _check_endedr'strrr from_text rdatatype RdataTypemake _get_rdatasetr*)rrr5r6r(rrrgets  zTransaction.get)rr cCst||S)z[Return the node at *name*, if any. Returns an immutable node or ``None``. )r, _get_noderrrrrget_nodeszTransaction.get_nodeNr cCs|jr tdSr&)r.r$rrrr_check_read_onlyszTransaction._check_read_only)argsr cGs |||d|dS)zAdd records. The arguments may be: - rrset - name, rdataset... - name, ttl, rdata... FNr7rB_addrrCrrradds zTransaction.addcGs |||d|dS)aReplace the existing rdataset at the name with the specified rdataset, or add the specified rdataset if there was no existing rdataset. The arguments may be: - rrset - name, rdataset... - name, ttl, rdata... Note that if you want to replace the entire node, you should do a delete of the name followed by one or more calls to add() or replace(). TNrDrFrrrreplaceszTransaction.replacecGs |||d|dS)a Delete records. It is not an error if some of the records are not in the existing set. The arguments may be: - rrset - name - name, rdatatype, [covers] - name, rdataset... - name, rdata... FNr7rB_deleterFrrrdeleteszTransaction.deletecGs |||d|dS)a4Delete records. The arguments may be: - rrset - name - name, rdatatype, [covers] - name, rdataset... - name, rdata... Raises dns.transaction.DeleteNotExact if some of the records are not in the existing set. TNrIrFrrr delete_exactszTransaction.delete_exactcCs*|t|tr tj|d}||S)zDoes the specified name exist?N)r7r'r8rrr9 _name_existsr@rrr name_existss zTransaction.name_existsT)valuerelativerr cCs||dkrtdt|tr0tj|d}||tjj tjj }|dusZt |dkr^t |rztj |dj |}n tj |}|j}|dkrd}|dj|d}tj|j|}|||dS)aUpdate the serial number. *value*, an `int`, is an increment if *relative* is `True`, or the actual value to set if *relative* is `False`. Raises `KeyError` if there is no SOA rdataset at *name*. Raises `ValueError` if *value* is negative or if the increment is so large that it would cause the new serial to be less than the prior value. rznegative update_serial() valueNrO)serial)r7 ValueErrorr'r8rrr9r=r:SOANONElenKeyErrorrRZSerialrPrHr( from_rdatattl)rrPrQrr(rRrdataZ new_rdatasetrrr update_serials"  zTransaction.update_serialcCs||Sr&r7_iterate_rdatasetsrrrr__iter__szTransaction.__iter__cCs||S)aHas this transaction changed anything? For read-only transactions, the result is always `False`. For writable transactions, the result is `True` if at some time during the life of the transaction, the content was changed. )r7_changedrrrrchangedszTransaction.changedcCs|ddS)aCommit the transaction. Normally transactions are used as context managers and commit or rollback automatically, but it may be done explicitly if needed. A ``dns.transaction.Ended`` exception will be raised if you try to use a transaction after it has been committed or rolled back. Raises an exception if the commit fails (in which case the transaction is also rolled back. TN_endrrrrcommit)s zTransaction.commitcCs|ddS)avRollback the transaction. Normally transactions are used as context managers and commit or rollback automatically, but it may be done explicitly if needed. A ``dns.transaction.AlreadyEnded`` exception will be raised if you try to use a transaction after it has been committed or rolled back. Rollback cannot otherwise fail. FNrarrrrrollback6s zTransaction.rollback)checkr cCs|j|dS)aCall *check* before putting (storing) an rdataset. The function is called with the transaction, the name, and the rdataset. The check function may safely make non-mutating transaction method calls, but behavior is undefined if mutating transaction methods are called. The check function should raise an exception if it objects to the put, and otherwise should return ``None``. N)r1appendrrerrrcheck_put_rdatasetBs zTransaction.check_put_rdatasetcCs|j|dS)aCall *check* before deleting an rdataset. The function is called with the transaction, the name, the rdatatype, and the covered rdatatype. The check function may safely make non-mutating transaction method calls, but behavior is undefined if mutating transaction methods are called. The check function should raise an exception if it objects to the put, and otherwise should return ``None``. N)r2rfrgrrrcheck_delete_rdatasetNs z!Transaction.check_delete_rdatasetcCs|j|dS)aCall *check* before putting (storing) an rdataset. The function is called with the transaction and the name. The check function may safely make non-mutating transaction method calls, but behavior is undefined if mutating transaction methods are called. The check function should raise an exception if it objects to the put, and otherwise should return ``None``. N)r3rfrgrrrcheck_delete_name[s zTransaction.check_delete_namecCs||S)a@Iterate all the rdatasets in the transaction, returning (`dns.name.Name`, `dns.rdataset.Rdataset`) tuples. Note that as is usual with python iterators, adding or removing items while iterating will invalidate the iterator and may raise `RuntimeError` or fail to iterate over all entries.r\rrrriterate_rdatasetsgs zTransaction.iterate_rdatasetscCs||S)zIterate all the names in the transaction. Note that as is usual with python iterators, adding or removing names while iterating will invalidate the iterator and may raise `RuntimeError` or fail to iterate over all entries.)r7_iterate_namesrrrr iterate_namessszTransaction.iterate_namescCst|dkrtd|dS)Nrzextra parameters to )rV TypeError)rmethodrCrrr_raise_if_not_emptys zTransaction._raise_if_not_emptycCsz|}t|tjjr"|}nt|tjjr6|}nv|r@d}n@t|trj|}|tj j krxt |dnt |d|}t|tj jrtj||}nt |d|WSty|rYdSt |dYn0dS)Nrz: TTL value too bigz: expected a TTLz: expected an Rdataz: expected more arguments)popleftr'rrrsetRRset to_rdatasetr(RdatasetintrYZMAX_TTLrSrnrZZRdatarX IndexError)rroZdeletingrCargr(rYrrr_rdataset_from_argss,    zTransaction._rdataset_from_argsc CszVt|}|rd}nd}|}t|trszTransaction._get_rdatasetcCstdS)zStore the rdataset.Nr )rrr(rrrrDszTransaction._put_rdatasetcCstdS)zhDelete all data associated with *name*. It is not an error if the name does not exist. Nr r@rrrrHszTransaction._delete_namecCstdS)zDelete all data associated with *name*, *rdtype*, and *covers*. It is not an error if the rdataset does not exist. Nr rrrrrOszTransaction._delete_rdatasetcCstdS)z2Does name exist? Returns a bool. Nr r@rrrrMVszTransaction._name_existscCstdS)z&Has this transaction changed anything?Nr rrrrr_]szTransaction._changedcCstdS)zEnd the transaction. *commit*, a bool. If ``True``, commit the transaction, otherwise roll it back. If committing and the commit fails, then roll back and raise an exception. Nr rrrrras zTransaction._end_transactioncCstdS)zSet the origin. This method is called when reading a possibly relativized source, and an origin setting operation occurs (e.g. $ORIGIN in a zone file). Nr )rrrrr _set_originlszTransaction._set_origincCstdS)z7Return an iterator that yields (name, rdataset) tuples.Nr rrrrr]uszTransaction._iterate_rdatasetscCstdS)z&Return an iterator that yields a name.Nr rrrrrlyszTransaction._iterate_namescCstdS)zPReturn the node at *name*, if any. Returns a node or ``None``. Nr r@rrrr?}szTransaction._get_nodecCs |jSr&)r-rrrrrrszTransaction._origin_information)FF)Drrrr rr4rr:rUrrrr r8r;r(rur>r+ZNoderArBrrGrHrKrLrNemptyrvr[r^r`rcrdCheckPutRdatasetTyperhCheckDeleteRdatasetTyperiCheckDeleteNameTyperjrrrkrmrpryrErJr7rbrrrrrr=rrrrMr_rrr]rlr?rrrrrr js~    $       ,@      )%r}typingrrrrrrrZ dns.exceptionrZdns.nameZdns.nodeZdns.rdataclassZ dns.rdatasetZ dns.rdatatypeZ dns.rrsetZ dns.serialZdns.ttlr exceptionZ DNSExceptionr!r$r%r*r,rr r(rurr:r;rrr rrrrs4$7