7i+UdZddlZddlZddlmZmZmZmZmZddl m Z ddl m Z dZGddeZdaeed < dd eeefd eed ed edeedeeddfdZddZddddedeedeedeedeeddf dZy)zN A module that implements tooling to enable easy warnings about deprecations. N)AnyOptionalTextIOTypeUnion)parse) __version__z DEPRECATION: c eZdZy)PipDeprecationWarningN)__name__ __module__ __qualname__h/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/pip/_internal/utils/deprecation.pyr r srr _original_showwarningmessagecategoryfilenamelinenofilelinereturnc|tt||||||yyt|tr'tjd}|j |yt||||||y)Nzpip._internal.deprecations)r issubclassr logging getLoggerwarning)rrrrrrloggers r _showwarningr sc  , !'8XvtT R - H3 4""#?@wgx64Nrctjdtdt tjat t_yy)NdefaultT)append)warnings simplefilterr r showwarningr rrrinstall_warning_loggerr',s6 )%:4H$ ( 4 4+%r) feature_flagissuereason replacementgone_inr(r)c|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..ns2 E:  !e&7 % s"$)r stacklevel)rcurrent_versionDEPRECATION_MSG_PREFIXjoinr r$warn)r*r+r,r(r)is_gone message_partsrs r deprecatedr=7s:T!NeO&<g&NG *+401  9=    +  T    N %M0hh!.G#G,, MM'$9aHr)NN)rN)__doc__rr$typingrrrrrpip._vendor.packaging.versionrpipr r7r8Warningr r__annotations__strintr r'r=rrrrFs55/.( G "s!" O 7C< O7mOO  O 6  O 3- O O(, #' AI AI#AIc] AI 3- AI C= AI AIr