U b`r3@sddlTddlTddlTddlTddlTddlTdZzddlTdZWne k r\dZYnXddl Z ddiZ dDdd Z Gd dde Zd d Zefd dZefddZefddZefddZdEddZdFddZddZddZddZdd Zd!d"Zd#d$Zdedddddfd%d&Zdeddddddddddf d'd(Zdefd)d*Z dedddddddddddddfd+d,Z!defd-d.Z"dGd/d0Z#dHd1d2Z$ddefd3d4Z%ddefd5d6Z&dId7d8Z'dJd9d:Z(efd;d<Z)efd=d>Z*Gd?d@d@e+Z,GdAdBdBe,dCZ-dS)K)*z5.4.1TFNYAMLLoadWarningcCs:|dkr tSt|tkr6|D]}|tkr||t|<qdS)N)_warnings_enabledtypedict)Zsettingskeyr @/opt/alt/python38/lib64/python3.8/site-packages/yaml/__init__.pywarningss  r c@s eZdZdS)rN)__name__ __module__ __qualname__r r r r r(scCs4tddkrdSddl}d|}|j|tdddS)NrFrzcalling yaml.%s() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.) stacklevel)rr warnr)methodr messager r r load_warning+s rccs0||}z|r|Vq W5|XdS)z9 Scan a YAML stream and produce scanning tokens. N)disposeZ check_tokenZ get_tokenstreamLoaderloaderr r r scan:s rccs0||}z|r|Vq W5|XdS)z9 Parse a YAML stream and produce parsing events. N)rZ check_eventZ get_eventrr r r parseEs rcCs$||}z |WS|XdS)zj Parse the first YAML document in a stream and produce the corresponding representation tree. N)rZget_single_noderr r r composePs rccs0||}z|r|Vq W5|XdS)zb Parse all YAML documents in a stream and produce corresponding representation trees. N)rZ check_nodeZget_noderr r r compose_all[s rcCs8|dkrtdt}||}z |WS|XdS)zd Parse the first YAML document in a stream and produce the corresponding Python object. Nload)r FullLoaderrZget_single_datarr r r rgs rccsD|dkrtdt}||}z|r2|VqW5|XdS)z\ Parse all YAML documents in a stream and produce corresponding Python objects. Nload_all)rrrZ check_dataget_datarr r r r vsr cCs t|tS)z Parse the first YAML document in a stream and produce the corresponding Python object. Resolve all tags except those known to be unsafe on untrusted input. )rrrr r r full_loadsr#cCs t|tS)z Parse all YAML documents in a stream and produce corresponding Python objects. Resolve all tags except those known to be unsafe on untrusted input. )r rr"r r r full_load_allsr$cCs t|tS)z Parse the first YAML document in a stream and produce the corresponding Python object. Resolve only basic YAML tags. This is known to be safe for untrusted input. )r SafeLoaderr"r r r safe_loadsr&cCs t|tS)z Parse all YAML documents in a stream and produce corresponding Python objects. Resolve only basic YAML tags. This is known to be safe for untrusted input. )r r%r"r r r safe_load_allsr'cCs t|tS)z Parse the first YAML document in a stream and produce the corresponding Python object. Resolve all tags, even those known to be unsafe on untrusted input. )r UnsafeLoaderr"r r r unsafe_loadsr)cCs t|tS)z Parse all YAML documents in a stream and produce corresponding Python objects. Resolve all tags, even those known to be unsafe on untrusted input. )r r(r"r r r unsafe_load_allsr*c Cs`d}|dkrt}|j}|||||||d} z|D]} | | q4W5| X|r\|SdS)zl Emit YAML parsing events into a stream. If stream is None, return the produced string instead. N) canonicalindentwidth allow_unicode line_break)ioStringIOgetvalueremit) eventsrDumperr+r,r-r.r/r2dumperZeventr r r r3s  r3c  Csd} |dkr,|dkrt}nt}|j} ||||||||| | | | d }z(||D]}||qX|W5|X| r| SdS)z Serialize a sequence of representation trees into a YAML stream. If stream is None, return the produced string instead. N) r+r,r-r.r/encodingversiontagsexplicit_start explicit_end)r0r1BytesIOr2ropen serializeclose)nodesrr5r+r,r-r.r/r7r:r;r8r9r2r6noder r r serialize_alls.      rBcKst|g|fd|i|S)zx Serialize a representation tree into a YAML stream. If stream is None, return the produced string instead. r5)rB)rArr5kwdsr r r r>sr>cCsd}|dkr,| dkrt}nt}|j}||||||||| | | || | |d}z(||D]}||q^|W5|X|r|SdS)z Serialize a sequence of Python objects into a YAML stream. If stream is None, return the produced string instead. N) default_styledefault_flow_styler+r,r-r.r/r7r8r9r:r; sort_keys)r0r1r<r2rr=Z representr?) documentsrr5rDrEr+r,r-r.r/r7r:r;r8r9rFr2r6datar r r dump_alls8     rIcKst|g|fd|i|S)zr Serialize a Python object into a YAML stream. If stream is None, return the produced string instead. r5)rI)rHrr5rCr r r dumpsrJcKst||fdti|S)z Serialize a sequence of Python objects into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead. r5rIZ SafeDumper)rGrrCr r r safe_dump_all$srLcKst|g|fdti|S)z Serialize a Python object into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead. r5rK)rHrrCr r r safe_dump,srMcCsZ|dkr:tj|||tj|||tj|||n||||||||dS)z Add an implicit scalar detector. If an implicit scalar value matches the given regexp, the corresponding tag is assigned to the scalar. first is a sequence of possible initial characters or None. N)rradd_implicit_resolverrr()tagZregexpfirstrr5r r r rN4s rNcCsZ|dkr:tj|||tj|||tj|||n||||||||dS)z Add a path based resolver for the given tag. A path is a list of keys that forms a path to a node in the representation tree. Keys can be string values, integers, or None. N)rradd_path_resolverrr()rOpathZkindrr5r r r rQDs rQcCsD|dkr4tj||tj||tj||n |||dS)z Add a constructor for the given tag. Constructor is a function that accepts a Loader instance and a node object and produces the corresponding Python object. N)rradd_constructorrr()rO constructorrr r r rSSs rScCsD|dkr4tj||tj||tj||n |||dS)a  Add a multi-constructor for the given tag prefix. Multi-constructor is called for a node if its tag starts with tag_prefix. Multi-constructor accepts a Loader instance, a tag suffix, and a node object and produces the corresponding Python object. N)rradd_multi_constructorrr()Z tag_prefixZmulti_constructorrr r r rU`s rUcCs|||dS)z Add a representer for the given type. Representer is a function accepting a Dumper instance and an instance of the given data type and producing the corresponding representation node. N)add_representer) data_typeZ representerr5r r r rVnsrVcCs|||dS)z Add a representer for the given type. Multi-representer is a function accepting a Dumper instance and an instance of the given data type or subtype and producing the corresponding representation node. N)add_multi_representer)rWZmulti_representerr5r r r rXwsrXcs eZdZdZfddZZS)YAMLObjectMetaclassz' The metaclass for YAMLObject. csxtt||||d|krt|ddk rtt|jtrR|jD]}||j|jq:n|j|j|j|j ||j dS)Nyaml_tag) superrY__init__ isinstance yaml_loaderlistrSrZ from_yaml yaml_dumperrVto_yaml)clsnamebasesrCr __class__r r r\s  zYAMLObjectMetaclass.__init__)r r r__doc__r\ __classcell__r r rfr rYsrYc@sBeZdZdZdZeeegZe Z dZ dZ e ddZe ddZdS) YAMLObjectza An object that can dump itself to a YAML stream and load itself from a YAML stream. r NcCs |||S)zC Convert a representation node to a Python object. )Zconstruct_yaml_object)rcrrAr r r r`szYAMLObject.from_yamlcCs|j|j|||jdS)zC Convert a Python object to a representation node. )Z flow_style)Zrepresent_yaml_objectrZyaml_flow_style)rcr6rHr r r rbs zYAMLObject.to_yaml)r r rrh __slots__rrr(r^r5rarZrk classmethodr`rbr r r r rjs  rj) metaclass)N)N)N)N)N)N)N).errortokensr4r@rr6 __version__ZcyamlZ__with_libyaml__ ImportErrorr0rr RuntimeWarningrrrrrrrrr r#r$r&r'r)r*r5r3rBr>rIrJrLrMrNrQrSrUrVrXrrYrjr r r r s             !