I ipUdZddlmZddlZddlZddlmZmZddlm Z ddl m Z dZ Gdd eZdad ed < d dd Zdd Zddd ddZy)zN A module that implements tooling to enable easy warnings about deprecations. ) annotationsN)AnyTextIO)parse) __version__z DEPRECATION: c eZdZy)PipDeprecationWarningN)__name__ __module__ __qualname__e/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pip/_internal/utils/deprecation.pyr r srr r_original_showwarningc|tt||||||yyt|tr'tjd}|j |yt||||||y)Nzpip._internal.deprecations)r issubclassr logging getLoggerwarning)messagecategoryfilenamelinenofilelineloggers r _showwarningrsc  , !'8XvtT R - H3 4""#?@wgx64Nrctjdtdt tjat t_yy)NdefaultT)append)warnings simplefilterr r showwarningrr rrinstall_warning_loggerr$.s6 )%:4H$ ( 4 4+%r) feature_flagissuec|duxrttt|k\}|tdf||sdndf|df||sdndf|dfg}djd |D}|r t |t j |td y) 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/{} c3LK|]\}}|||j|yw)N)format).0value format_strs r zdeprecated..ts2 E:  !e&7 % s"$)r stacklevel)rcurrent_versionDEPRECATION_MSG_PREFIXjoinr r!warn)reason replacementgone_inr%r&is_gone message_partsrs r deprecatedr:9s:T!NeO&<g&NG *+401 =A    + X    N -M8hh!.G#G,, MM'$9aHr)NN)rz Warning | strrz type[Warning]rstrrintrz TextIO | Noner str | NonereturnNone)r>r?) r5r;r6r=r7r=r%r=r&z int | Noner>r?)__doc__ __future__rrr!typingrrpip._vendor.packaging.versionrpiprr1r2Warningr r__annotations__rr$r:r rrrGs#/.( G "s! O OOO  O  O  O O(, $ EI EIEI EI  EI  EI EIr