.u|дUdZddlmZddlZddlZddlmZmZddlm Z ddl m Z dZ Gdd eZdad ed < d$d%dZd&dZdddd'd#ZdS)(zN A module that implements tooling to enable easy warnings about deprecations. ) annotationsN)AnyTextIO)parse) __version__z DEPRECATION: ceZdZdS)PipDeprecationWarningN)__name__ __module__ __qualname__q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/utils/deprecation.pyr r sDrr r_original_showwarningmessage Warning | strcategory type[Warning]filenamestrlinenointfile TextIO | Noneline str | NonereturnNonec|tt||||||dSdSt|tr+tjd}||dSt||||||dS)Nzpip._internal.deprecations)r issubclassr logging getLoggerwarning)rrrrrrloggers r _showwarningr%s  , !'8XvtT R R R R R - , H3 4 4O"#?@@wgx64NNNNNrctjdtdttjat t_dSdS)NdefaultT)append)warnings simplefilterr r showwarningr%r rrinstall_warning_loggerr,.sB )%:4HHHH$ ( 4+%$r) feature_flagissuereason replacementgone_inr-r. int | Nonec2|duo$ttt|k}|tdf||sdndf|df||sdndf|dfg}dd |D}|rt |t j|td dS) aHelper to deprecate existing functionality. reason: Textual reason shown to the user about why this functionality has been deprecated. Should be a complete sentence. replacement: Textual suggestion shown to the user about what alternative functionality they can use. gone_in: The version of pip does this functionality should get removed in. Raises an error if pip's current version is greater than or equal to this. feature_flag: Command-line flag of the form --use-feature={feature_flag} for testing upcoming functionality. issue: Issue number on the tracker that would serve as a useful place for users to find related discussion and provide feedback. Nz{}z*pip {} will enforce this behaviour change.z*Since pip {}, this is no longer supported.zA possible replacement is {}.zEYou can use the flag --use-feature={} to test the upcoming behaviour.z@Discussion can be found at https://github.com/pypa/pip/issues/{} c3NK|] \}}|| ||V!dS)N)format).0value format_strs r zdeprecated..tsK E:  !e&7 %  &7&7&7&7r)r stacklevel)rcurrent_versionDEPRECATION_MSG_PREFIXjoinr r)warn)r/r0r1r-r.is_gone message_partsrs r deprecatedrC9s:T!NeO&<&<g&NG *0001 B<<A    + WW    N -M8hh!.G-#G,,, M'$9aHHHHHHr)NN)rrrrrrrrrrrrrr)rr) r/rr0rr1rr-rr.r2rr)__doc__ __future__rr!r)typingrrpip._vendor.packaging.versionrpiprr=r>Warningr r__annotations__r%r,rCr rrrKs4#"""""//////......(     G   "!!!! OOOOO(,,,, $ EIEIEIEIEIEIEIEIr