+
    yj'                      R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIH t  ^ RIH!t! ^ RIH"t" ^ RIH#t# ^ RIH$t$ ^ RIH%t% ^ RI&t&^ RI't'^ RI'H(t( ^ RI'H)t) ^ RI'H*t* ^ RI'H+t+ ^ RI'H,t, ^RI-H.t. ^RI/H0t0 ^RI/H1t1 ^RI2H3t3 ^ RI4H5t5 ^ RI6t4^ RI6H7t7 ^ RI6H8t8 ^ RI9H:t: ^ R I;H<t< ^ R!I=H>t> ^ R"I=H?t? ^ RI@t4^ RIAt4^ R#IBHCtC ^ R$IBHDtD ^ R%IEHFtF ^ R&IEHGtG ^ R'IEHHtH ^ R(IEHItI ^ R)IEHJtJ ^ R*IEHKtK ^ R+ILHMtM ^ R,INHOtO ^ R-INHPtP ]%'       d   ^ R.IQHRtR ^ R/ISHTtT ]UtV ](! R04      tW]*! R04      tX] ! R1 R2]P                  4      4       tZ ! R3 R4][4      t\R5 R6 lt]R~R7 R8 llt^R9 R: lt_ ! R; R<4      t`R= R> ltaR? R@ ltbRtc. ]cORANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZN5td]e! ]d4      tf]fP                  R[4       ]fP                  R\4       R~R] R^ llthR_ R` ltiR~Ra Rb lltjRc Rd ltkRe Rf ltl] ! Rg Rh],4      4       tmRi Rj ltn ! Rk Rl4      to]o! 4       tpRm Rn ltq] ! Ro Rp4      4       trRq Rr ltsRRs Rt llttRu Rv ltu]
! ^2Rw7      Rx Ry l4       tvRz R{ ltwR| R} ltxR# )z:Command line options, ini-file and conftest.py processing.)annotationsN)	lru_cache)dedent)FunctionType)Any)Callable)cast)Final)final)	Generator)IO)Iterable)Iterator)Sequence)TextIO)Type)TYPE_CHECKING)HookimplMarker)HookimplOpts)HookspecMarker)HookspecOpts)PluginManager)PathAwareHookProxy)	PrintHelp)
UsageError)determine_setup)__version__)ExceptionInfo)filter_traceback)TracebackStyle)TerminalWriter)ArgumentParser)fail)Skipped)absolutepath)bestrelpath)import_path)
ImportMode)resolve_package_path)safe_exists)Stash)PytestConfigWarning)warn_explicit_for)Cache)TerminalReporterpytestc                  2    ] tR t^[tRt^ t^t^t^t^t	^t
RtR# )ExitCodezEncodes the valid exit codes by pytest.

Currently users and plugins may supply other exit codes as well.

.. versionadded:: 5.0
 N)__name__
__module____qualname____firstlineno____doc__OKTESTS_FAILEDINTERRUPTEDINTERNAL_ERRORUSAGE_ERRORNO_TESTS_COLLECTED__static_attributes__r4       K/var/www/html/2rare/lib/python3.14/site-packages/_pytest/config/__init__.pyr3   r3   [   s(     
BLKNKrA   r3   c                  .    ] tR t^rtR R ltR R ltRtR# )ConftestImportFailurec               $    V ^8  d   QhRRRRRR/# )   pathpathlib.Pathcause	ExceptionreturnNoner4   )formats   "rB   __annotate__"ConftestImportFailure.__annotate__s   s(       	
 
rA   c               	    Wn         W n        R # N)rG   rI   )selfrG   rI   s   &&$rB   __init__ConftestImportFailure.__init__s   s     	
rA   c                   V ^8  d   QhRR/# )rF   rK   strr4   )rM   s   "rB   rN   rO   |   s     O O OrA   c                	z    \        V P                  4      P                   R V P                   RV P                   R2# ): z (from ))typerI   r5   rG   rR   s   &rB   __str__ConftestImportFailure.__str__|   s3    tzz"++,Btzzl'$))ANNrA   )rI   rG   N)r5   r6   r7   r8   rS   r\   r@   r4   rA   rB   rD   rD   r   s    O OrA   rD   c                    V ^8  d   QhRRRR/# )rF   entryz_pytest._code.TracebackEntryrK   boolr4   )rM   s   "rB   rN   rN      s      X X'X	XrA   c                    \        V 4      ;'       d6    R\        V P                  4      P                  \        P
                  4      9  # )zFilter tracebacks entries which point to pytest internals or importlib.

Make a special case for importlib because we use it to import test modules and conftest files
in _pytest.pathlib.import_path.
	importlib)r   rV   rG   splitossep)r_   s   &rB   ,filter_traceback_for_conftest_import_failurerf      s6     E"WW{#ejj/:O:OPRPVPV:W'WWrA   c               $    V ^8  d   QhRRRRRR/# )rF   args#list[str] | os.PathLike[str] | Noneplugins$Sequence[str | _PluggyPlugin] | NonerK   zint | ExitCoder4   )rM   s   "rB   rN   rN      s&     4> 4>
-4>14> 4>rA   c                   \         P                  P                  R4      p \        \         P                  R&    \	        W4      p VP
                  P                  VR7      p \        V4      VP                  4        Vf"   \         P                  P                  RR4       # V\         P                  R&   #   \         dN    Tu TP                  4        Tf"   \         P                  P                  RR4       # T\         P                  R&   # i ; i  TP                  4        i ; i  \         EdI   p\        P                  ! TP                  4      p\        \         P"                  4      pTP%                  RTP&                   R2RR7       TP(                  P+                  \,        4      Tn        TP(                  '       d   TP/                  RR	R
7      MTP1                  4       p\3        T4      p	T	P5                  4        F$  p
TP%                  T
P7                  4       RR7       K&  	  \        P8                  u Rp?Tf"   \         P                  P                  RR4       # T\         P                  R&   # Rp?ii ; i  \:         d   p\        \         P"                  4      pTP<                   F  pTP%                  RT R2RR7       K  	  \        P8                  u Rp?Tf"   \         P                  P                  RR4       # T\         P                  R&   # Rp?ii ; i  Tf"   \         P                  P                  RR4       i T\         P                  R&   i ; i)a4  Perform an in-process test run.

:param args:
    List of command line arguments. If `None` or not given, defaults to reading
    arguments directly from the process command line (:data:`sys.argv`).
:param plugins: List of plugin objects to be auto-registered during initialization.

:returns: An exit code.
PYTEST_VERSIONconfigNz$ImportError while loading conftest 'z'.T)redshortF)stylechainzERROR: 
)rd   environgetr   _prepareconfighookpytest_cmdline_mainr3   _ensure_unconfigurepop
ValueErrorrD   r   from_exceptionrI   r    sysstderrlinerG   	tracebackfilterrf   getreprexconlyrV   
splitlinesrstripr>   r   rh   )rh   rj   old_pytest_versionro   reteexc_infotwexc_reprformatted_tbr   msgs   &&          rB   mainr      s    (89&>'2

#$	-#D2F$-&,kk&E&EV&E&T#C= **, %JJNN+T2+=BJJ'( " J**, %JJNN+T2+=BJJ'( **,1 % 	($33AGG<H

+BGG:166("E4GP!)!3!3!:!:<"H
 %%%   we <%%' 
 x=L$//140 2'''  %JJNN+T2+=BJJ'(E	(2  $CJJ'66CGGgcU"%4G0 ###%JJNN+T2+=BJJ'($ %JJNN+T2+=BJJ'(s   I< D% D "
B5 ,I< 5DD I< DD D""I< %I91DI46I97I< 4I99I< <LALLL LL :Mc                   V ^8  d   QhRR/# )rF   rK   intr4   )rM   s   "rB   rN   rN      s      c rA   c                 H    \        4       p \        P                  P                  4        V #   \         dk    \
        P                  ! \
        P                  \
        P                  4      p\
        P                  ! T\        P                  P                  4       4        ^# i ; i)zgThe CLI entry point of pytest.

This function is not meant for programmable use; use `main()` instead.
)r   r~   stdoutflushBrokenPipeErrorrd   opendevnullO_WRONLYdup2fileno)coder   s     rB   console_mainr      sj    	v

  ''"**bkk2
**,-s   ), A1B! B!c                  &    ] tR t^t]! ]4      tRtR# )cmdliner4   N)r5   r6   r7   r8   staticmethodr   r@   r4   rA   rB   r   r      s    DrA   r   c               $    V ^8  d   QhRRRRRR/# rF   rG   rV   optnamerK   r4   )rM   s   "rB   rN   rN      s!      s S S rA   c                p    \         P                  P                  V 4      '       d   \        V RV  24      hV # )zhArgparse type validator for filename arguments.

:path: Path of filename.
:optname: Name of the option.
z must be a filename, given: rd   rG   isdirr   rG   r   s   &&rB   filename_argr      s3     
ww}}TG9$@GHHKrA   c               $    V ^8  d   QhRRRRRR/# r   r4   )rM   s   "rB   rN   rN      s!       c c rA   c                p    \         P                  P                  V 4      '       g   \        V RV  24      hV # )zjArgparse type validator for directory arguments.

:path: Path of directory.
:optname: Name of the option.
z must be a directory, given: r   r   s   &&rB   directory_argr      s3     77==G9$A$HIIKrA   pythonterminal	debuggingunittestcaptureskipping
legacypathtmpdirmonkeypatchrecwarnpastebin	assertionjunitxmldoctestcacheproviderfreeze_support	setuponly	setupplanstepwisewarningsloggingreportspython_pathunraisableexceptionthreadexceptionfaulthandlerpytesterpytester_assertionsc               $    V ^8  d   QhRRRRRR/# )rF   rh   zlist[str] | Nonerj   rk   rK   Configr4   )rM   s   "rB   rN   rN     s&      
1 rA   c           	        \        4       p\        T\        P                  T ;'       g    RV\        P                  P                  4       R 7      R7      pV e   VP                  V RR7       \         F  pVP                  V4       K  	  V# )rh   rj   dir)invocation_paramsTexclude_onlyr4   )	PytestPluginManagerr   InvocationParamspathlibPathcwdconsider_preparsedefault_pluginsimport_plugin)rh   rj   pluginmanagerro   specs   &&   rB   
get_configr     s    
 ()M 11  " 2 
F ''4'@##D)   MrA   c                   V ^8  d   QhRR/# )rF   rK   r   r4   )rM   s   "rB   rN   rN   3  s     & &/ &rA   c                 *    \        4       P                  # )zObtain a new instance of the
:py:class:`pytest.PytestPluginManager`, with default plugins
already loaded.

This function can be used by integration with other tools, like hooking
into pytest to run tests into an IDE.
)r   r   r4   rA   rB   get_plugin_managerr   3  s     <%%%rA   c               $    V ^8  d   QhRRRRRR/# )rF   rh   ri   rj   rk   rK   r   r4   )rM   s   "rB   rN   rN   >  s&      
-1 rA   c                d   V f   \         P                  R,          p Mt\        V \        P                  4      '       d   \        P
                  ! V 4      .p M<\        V \        4      '       g'   Rp\        VP                  V \        V 4      4      4      h\        W4      pVP                  p V'       dD   V F=  p\        V\        4      '       d   VP                  V4       K,  VP                  V4       K?  	  VP                  P!                  W@R7      pV#   \"         d    TP%                  4        h i ; i)N   NNzG`args` parameter expected to be a list of strings, got: {!r} (type: {}))r   rh   )r~   argv
isinstancerd   PathLikefspathlist	TypeErrorrM   rZ   r   r   rV   consider_pluginargregisterrx   pytest_cmdline_parseBaseExceptionrz   )rh   rj   r   ro   r   plugins   &&    rB   rw   rw   >  s     |xx|	D"++	&	&		$ d##U 	 

4d455&F((M!fc**!44V<!**62	 "
 ##88' 9 
  ""$s   )A(D D/c                    V ^8  d   QhRRRR/# )rF   rG   rH   rK   r4   )rM   s   "rB   rN   rN   ^  s       , rA   c                J    V P                  4       '       d   V P                  # V # )z<Get the directory of a path - itself if already a directory.)is_fileparent)rG   s   &rB   _get_directoryr   ^  s    ||~~{{rA   c               (    V ^8  d   QhRRRRRRRR/# )	rF   methodr   	hook_typerV   	opt_namestuple[str, ...]rK   zdict[str, bool]r4   )rM   s   "rB   rN   rN   f  s0        	rA   c                N   \         '       d   \        P                  ! V 4      '       g   Q h\        V R . 4       Uu0 uF  q3P                  kK  	  pp. p/ pV F]  p\        W\
        4      pV\
        Jd   VP                  V RV 24       RWg&   K9  Wt9   d   VP                  V R24       RWg&   KY  RWg&   K_  	  V'       db   RP                  V4      p	\        P                  P                  P                  VV P                  V	R7      p
\        \        \        V 4      V
4       V# u upi )
pytestmark=Tz=TrueF, )rZ   fullname	hook_opts)r   inspect	isroutinegetattrnameAttributeErrorappendjoin_pytest
deprecatedHOOK_LEGACY_MARKINGrM   r7   r.   r   r   )r   r   r   mknown_marks	must_warnoptsopt_nameopt_attrr   messages   &&&        rB   _get_legacy_hook_marksr  f  s   
 }  ((((-4V\2-NO-NVV-NKOID6^<>)z8*56!DN$z/0!DN"DN  IIi(	$$88??(( @ 

 	$|V4g>K+ Ps   D"c                  P  a  ] tR tRtRtR V 3R lltR V 3R lltR V 3R lltR2R	 V 3R
 llltR R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R  ltR!R"/R# R$ lltR% R& ltR' R( ltR) R* ltR+ R, ltR- R. ltR3R/ R0 lltR1tV ;t# )4r   i  a'  A :py:class:`pluggy.PluginManager <pluggy.PluginManager>` with
additional pytest-specific functionality:

* Loading plugins from the command line, ``PYTEST_PLUGINS`` env variable and
  ``pytest_plugins`` global variables found in plugins being loaded.
* ``conftest.py`` loading during start-up.
c                   V ^8  d   QhRR/# rF   rK   rL   r4   )rM   s   "rB   rN    PytestPluginManager.__annotate__  s     1! 1!$ 1!rA   c                	  < ^ RI p\        SV `	  R4       \        4       V n        / V n        RV n        RV n        \        R4      ! \        4      V n	        . V n
        V P                  VP                  4       V P                  V 4       \        P                  P!                  R4      '       d   \"        P$                  p\'        VRR4      p \)        \        P*                  ! VP-                  4       4      VP.                  ^VR7      pV P2                  P4                  P7                  VP8                  4       V P;                  4        VP<                  P?                  4       V n         RV n!        R#   \0         d     Lti ; i)	    Nr1   F   PYTEST_DEBUGencodingutf8)mode	bufferingr  )"_pytest.assertionsuperrS   set_conftest_plugins_dirpath2confmods_confcutdir_noconftestr   r   skipped_pluginsadd_hookspecshookspecr   rd   ru   rv   r~   r   r   r   dupr   r  rJ   traceroot	setwriterwriteenable_tracingr   DummyRewriteHookrewrite_hook_configured)rR   r  errr  	__class__s   &   rB   rS   PytestPluginManager.__init__  s-    " 9< NP04 
 (n^< 797++,d::>>.))::C#CV<HFF3::<(%	 JJOO%%cii0! $-->>@   s   	;E+ +E98E9c               $    V ^8  d   QhRRRRRR/# )rF   r   _PluggyPluginr   rV   rK   zHookimplOpts | Noner4   )rM   s   "rB   rN   r    s$     
 
#
+.
	
rA   c                   < VP                  R4      '       g   R# VR8X  d   R# \        SV `	  W4      pVe   V# \        W4      p\        P
                  ! V4      '       g   R# \        VRR4      # ):meta private:pytest_Npytest_pluginsimpl)tryfirsttrylastoptionalhookhookwrapper)
startswithr  parse_hookimpl_optsr   r   r   r  )rR   r   r   r	  r   r.  s   &&&  rB   r<  'PytestPluginManager.parse_hookimpl_opts  sp     y))##w*68K&  ((%FR
 	
rA   c                    V ^8  d   QhRRRR/# )rF   r   rV   rK   zHookspecOpts | Noner4   )rM   s   "rB   rN   r    s       AT rA   c                   < \         SV `  W4      pVf0   \        W4      pVP                  R4      '       d   \	        VRR4      pV# )r3  r4  r   )firstresulthistoric)r  parse_hookspec_optsr   r;  r  )rR   module_or_classr   r	  r   r.  s   &&&  rB   rB  'PytestPluginManager.parse_hookspec_opts  sJ    w*?A<_3Fy))-/
 rA   c               $    V ^8  d   QhRRRRRR/# )rF   r   r1  r   
str | NonerK   r4   )rM   s   "rB   rN   r    s!      } J * rA   c           
     	  < V\         P                  P                  9   dA   \        P                  ! \        R P                  VP                  RR4      4      4      4       R# \        SV `%  W4      pVed   V P                  P                  P                  \        VVV R7      R7       \        V\        P                   4      '       d   V P#                  V4       V# )zQ{} plugin has been merged into the core, please remove it from your requirements._-N)r   plugin_namemanagerkwargs)r  r  DEPRECATED_EXTERNAL_PLUGINSr   warnr-   rM   replacer  r   rx   pytest_plugin_registeredcall_historicdictr   types
ModuleTypeconsider_module)rR   r   r   rJ  r.  s   &&& rB   r   PytestPluginManager.register  s    7%%AAAMM#??EvS#.@ g&v4"II..<<! +  =  &%"2"233$$V,rA   c                   V ^8  d   QhRR/# rF   r   rV   r4   )rM   s   "rB   rN   r    s      c rA   c                	(    V P                  V4      pV# rQ   )
get_plugin)rR   r   r   s   && rB   	getpluginPytestPluginManager.getplugin  s    '+t'<rA   c                    V ^8  d   QhRRRR/# )rF   r   rV   rK   r`   r4   )rM   s   "rB   rN   r    s     + +c +d +rA   c                6    \        V P                  V4      4      # )z:Return whether a plugin with the given name is registered.)r`   r[  )rR   r   s   &&rB   	haspluginPytestPluginManager.hasplugin  s    DOOD)**rA   c                    V ^8  d   QhRRRR/# )rF   ro   r   rK   rL   r4   )rM   s   "rB   rN   r    s        v  $  rA   c                \    VP                  RR4       VP                  RR4       RV n        R# )r3  markersztryfirst: mark a hook implementation function such that the plugin machinery will try to call it first/as early as possible. DEPRECATED, use @pytest.hookimpl(tryfirst=True) instead.ztrylast: mark a hook implementation function such that the plugin machinery will try to call it last/as late as possible. DEPRECATED, use @pytest.hookimpl(trylast=True) instead.TN)addinivalue_liner,  )rR   ro   s   &&rB   pytest_configure$PytestPluginManager.pytest_configure  s>     	G	
 	F	
  rA   c               <    V ^8  d   QhRRRRRRRRRR	R
RRRRRRR/	# )rF   rh   zSequence[str | pathlib.Path]pyargsr`   
noconftestrootpathrH   
confcutdirpathlib.Path | Noneinvocation_dir
importmodezImportMode | strconsider_namespace_packagesrK   rL   r4   )rM   s   "rB   rN   r  !  sd     1 1*1 1 	1
 1 (1 %1 %1 &*1 
1rA   c               x   V'       d   \        We,          4      MRV n        W0n        W n        Rp	V Ff  p
\	        V
4      pVP                  R4      pVR8w  d   VRV p\        Wk,          4      p\        V4      '       g   KO  V P                  VVVVR7       Rp	Kh  	  V	'       g   V P                  VVVVR7       R# R# )a8  Load initial conftest files given a preparsed "namespace".

As conftest files may add their own command line options which have
arguments ('--my-opt somepath') we might get some false positives.
All builtin and 3rd party plugins will have been loaded, however, so
common options will not confuse our logic here.
NFz::rp  T)r&   r  r   _using_pyargsrV   findr+   _try_load_conftest)rR   rh   ri  rj  rk  rl  rn  ro  rp  foundanchorinitial_pathrG   ianchors   &&&&&&&&$     rB   _set_initial_conftests*PytestPluginManager._set_initial_conftests!  s    ( :DL45 	 &# L|$D		$ABwBQx!."78F 6""''0K	 (  ## !$ ##,G	 $  rA   c                    V ^8  d   QhRRRR/# )rF   rG   rH   rK   r`   r4   )rM   s   "rB   rN   r  T  s     4 4l 4t 4rA   c                R    V P                   f   R# WP                   P                  9  # )z:Whether to consider the given path to load conftests from.T)r  parents)rR   rG   s   &&rB   _is_in_confcutdir%PytestPluginManager._is_in_confcutdirT  s(    # ++3333rA   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rF   rz  rH   ro  str | ImportModerk  rp  r`   rK   rL   r4   )rM   s   "rB   rN   r  c  s<       % 	 &* 
rA   c               	    V P                  VVVVR 7       VP                  4       '       dH   VP                  R4       F0  pVP                  4       '       g   K  V P                  VVVVR 7       K2  	  R# R# )rr  ztest*N)_loadconftestmodulesis_dirglob)rR   rz  ro  rk  rp  xs   &&&&$ rB   rv  &PytestPluginManager._try_load_conftestc  sr     	!!(C	 	" 	
 ==??[[)88::--" 4O	 .  * rA   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rF   rG   rH   ro  r  rk  rp  r`   rK   rL   r4   )rM   s   "rB   rN   r  |  s<     2 22 %2 	2 &*2 
2rA   c               	   V P                   '       d   R # V P                  V4      pWPP                  9   d   R # . p\        V.VP                  O54       Fc  pV P                  V4      '       g   K  VR,          pVP                  4       '       g   K=  V P                  VVVVR7      p	VP                  V	4       Ke  	  W`P                  V&   R # )Nzconftest.pyrr  )	r   r   r  reversedr  r  r   _importconftestr  )
rR   rG   ro  rk  rp  	directoryclistr   conftestpathmods
   &&&&$     rB   r  (PytestPluginManager._loadconftestmodules|  s     ''-	 ...	>I,=,=>?F%%f--%5''))..$" 4O	 / C LL% @ -2y)rA   c                    V ^8  d   QhRRRR/# )rF   rG   rH   rK   zSequence[types.ModuleType]r4   )rM   s   "rB   rN   r    s     9 9 99S 9rA   c                	\    V P                  V4      pV P                  P                  VR4      # )Nr4   )r   r  rv   )rR   rG   r  s   && rB   _getconftestmodules'PytestPluginManager._getconftestmodules  s+    ''-	%%)))R88rA   c               $    V ^8  d   QhRRRRRR/# )rF   r   rV   rG   rH   rK   ztuple[types.ModuleType, Any]r4   )rM   s   "rB   rN   r    s(        
&	rA   c                	    V P                  V4      p\        V4       F  p V\        WA4      3u # 	  \	        V4      h  \         d     K.  i ; irQ   )r  r  r   r   KeyError)rR   r   rG   modulesr  s   &&&  rB   _rget_with_confmod&PytestPluginManager._rget_with_confmod  sX    
 **40G$CGC... %
 tn " s   =AAc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rF   r  rH   ro  r  rk  rp  r`   rK   types.ModuleTyper4   )rM   s   "rB   rN   r    s<     3 3"3 %3 	3 &*3 
3rA   c          
     	6   \        V4      pV P                  V4      pVe   \        \        P                  V4      # \        V4      pVf    \        P                  VP                    \        VVVVR7      pT P                  Y4       T P                  P!                  T4       TP"                  p
YP$                  9   ds   T P$                  P'                  4        FT  w  rYP(                  9   g	   Y8X  g   K  Y9   d!   \+        RT: RT RTP,                   R24      hTP/                  T4       KV  	  T P1                  RT: 24       T P3                  YR7       T#   \         d     ELi ; i  \         d#   p	T	P                  f   Q h\        YR7      T	hR p	?	ii ; i)	N)r  r&  rp  )rI   z#While trying to load conftest path z, found that the module z is already loaded with path zE. This is not supposed to happen. Please report this issue to pytest.zloading conftestmodule )registration_name)rV   r[  r   rT  rU  r*   r~   r  stemr  r(   rJ   __traceback__rD   _check_non_top_pytest_pluginsr  addr   r  itemsr  AssertionError__file__r  r%  consider_conftest)rR   r  ro  rk  rp  conftestpath_plugin_nameexistingpkgpathr  r   dirpathrG   modss   &&&&$        rB   r  #PytestPluginManager._importconftest  s    $'|#4 ??#;<(((33 '|4?KK 1 12		F,G	C 	**3=""3'%%,,,"44::<
ll*do{,A,AQ R558E9VWZWcWcVd ebb 
 KK$ = 	

,SG45sO
=    	F??...'>AE	Fs*   E 'E+ E('E(+F6FFc               $    V ^8  d   QhRRRRRR/# )rF   r  r  r  rH   rK   rL   r4   )rM   s   "rB   rN   r    s-     L LL #L 
	LrA   c                	    \        VR 4      '       dS   V P                  '       d?   V P                  '       g+   Rp\        VP	                  W P
                  4      RR7       R# R# R# R# )r5  af  Defining 'pytest_plugins' in a non-top-level conftest is no longer supported:
It affects the entire test suite instead of just below the conftest as expected.
  {}
Please move it to a top level conftest file at the rootdir:
  {}
For more information, visit:
  https://docs.pytest.org/en/stable/deprecations.html#pytest-plugins-in-non-top-level-conftest-filesF)pytraceN)hasattrr,  rt  r$   rM   r  )rR   r  r  r   s   &&& rB   r  1PytestPluginManager._check_non_top_pytest_plugins  s_     C)**   &&&w  L*:*:;UK ' ! +rA   r   Fc               $    V ^8  d   QhRRRRRR/# )rF   rh   Sequence[str]r   r`   rK   rL   r4   )rM   s   "rB   rN   r    s$     . .!.48.	.rA   c                  ^ p\        V4      pW48  d   W,          pV^,          p\        V\        4      '       g   K/  VR8X  d    W,          pT^,          pM#VP	                  R4      '       d   VR,          pMKl  VP                  4       pV'       d   VP	                  R4      '       g   K  V P                  V4       K  R#   \         d     R# i ; i)r3  z-pN:rF   NNno:)lenr   rV   
IndexErrorr;  stripr   )rR   rh   r   ry  noptpargs   &&$    rB   r   %PytestPluginManager.consider_preparse  s     Ie'CFA#s##$;#w FA^^D))r7Dzz|(>(>''-#  & s   C   CCc                    V ^8  d   QhRRRR/# )rF   argrV   rK   rL   r4   )rM   s   "rB   rN   r    s     @ @c @d @rA   c                   VP                  R4      '       d   VR,          pV\        9   d   \        RV R24      hVR8X  d#   V P                  R4       V P                  R4       V P                  V4       VP                  R4      '       g   V P                  RV,           4       R# R# TpV P	                  V4       VP                  R4      '       g   V P	                  RV,           4       V P                  VR	R
7       R# )r3  r  :   NNzplugin z cannot be disabledr   r   pytest_stepwiser4  T)consider_entry_pointsN)r;  essential_pluginsr   set_blockedunblockr   )rR   r  r   s   && rB   r   &PytestPluginManager.consider_pluginarg  s    >>%  r7D(( 74&0C!DEE &  ,  !23T"??9--  T!12 . DLL??9--Y-.s$?rA   c               $    V ^8  d   QhRRRRRR/# )rF   conftestmoduler  r  rV   rK   rL   r4   )rM   s   "rB   rN   r  ,  s$     > >.>CF>	>rA   c                *    V P                  WR7       R# )r3  r   N)r   )rR   r  r  s   &&&rB   r  %PytestPluginManager.consider_conftest,  s     	n=rA   c                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r  2  s     D Dd DrA   c                b    V P                  \        P                  P                  R4      4       R# )r3  PYTEST_PLUGINSN)_import_plugin_specsrd   ru   rv   r[   s   &rB   consider_env PytestPluginManager.consider_env2  s    !!"**..1A"BCrA   c                    V ^8  d   QhRRRR/# )rF   r  r  rK   rL   r4   )rM   s   "rB   rN   r  6  s     F F#3 F FrA   c                >    V P                  \        VR. 4      4       R# )r3  r5  N)r  r   )rR   r  s   &&rB   rV  #PytestPluginManager.consider_module6  s    !!'#/?"DErA   c                    V ^8  d   QhRRRR/# )rF   r   -None | types.ModuleType | str | Sequence[str]rK   rL   r4   )rM   s   "rB   rN   r  :  s     , ,A,	,rA   c                	P    \        V4      pV F  pV P                  V4       K  	  R # rQ   )_get_plugin_specs_as_listr   )rR   r   rj   import_specs   &&  rB   r  (PytestPluginManager._import_plugin_specs:  s&     ,D1"K{+ #rA   c               $    V ^8  d   QhRRRRRR/# )rF   modnamerV   r  r`   rK   rL   r4   )rM   s   "rB   rN   r  A  s"     #( #(S #( #(RV #(rA   c                   \        V\        4      '       g   Q RV: 24       hV P                  V4      '       g   V P                  V4      e   R# V\        9   d
   RV,           MTpV P
                  P                  V4       V'       d   V P                  RVR7      pV'       d   R#  \        V4       \        P                  V,          pV P                  WQ4       R#   \         dB   p\        RT RTP                  ^ ,           24      P                  TP                  4      ThRp?i\          d<   pT P"                  P%                  YP&                  ;'       g    R34        Rp?R# Rp?ii ; i)	zImport a plugin with ``modname``.

If ``consider_entry_points`` is True, entry point names are also
considered to find a plugin.
z"module name as text required, got Nz_pytest.pytest11r  zError importing plugin "z":  )r   rV   
is_blockedr[  builtin_pluginsr+  mark_rewriteload_setuptools_entrypoints
__import__r~   r  r   ImportErrorrh   with_tracebackr  r%   r!  r  r   )rR   r  r  
importspecloadedr  r   s   &&&    rB   r   !PytestPluginManager.import_pluginA  s7    S
 
 	</{;	< 
 ??7##tw'?'K-4-GZ')W
&&z2 55jw5OF	(z" ++j)CMM#'  	5*7)3qvvaykBnQ__-15  	@  ''%%++2(>??	@s*   %C E*%<D!!E*.E*/0E%%E*)	r  r,  r  r  r   r   rt  r+  r!  rQ   )F)r5   r6   r7   r8   r9   rS   r<  rB  r   r\  r`  rf  r{  r  rv  r  r  r  r  r  r   r   r  r  rV  r  r   r@   __classcell__)r.  s   @rB   r   r     s    1! 1!f
 
4  2
+ *1f422@93jL4.;@.2@.>DF,#( #(rA   r   c                    V ^8  d   QhRRRR/# )rF   specsr  rK   	list[str]r4   )rM   s   "rB   rN   rN   g  s      8rA   c                <   V f   . # \        V \        P                  4      '       d   . # \        V \        4      '       d   V '       d   V P	                  R4      # . # \        V \
        P                  P                  4      '       d   \        V 4      # \        RV : 24      h)z:Parse a plugins specification into a list of plugin names.,zWPlugins may be specified as a sequence or a ','-separated string of plugin names. Got: )
r   rT  rU  rV   rc   collectionsabcr   r   r   )r  s   &rB   r  r  g  s    
 }	%))**	%#(u{{30b0%1122E{

abgajk rA   c                      ] tR tRtR tRtR# )Notseti|  c                	    R # )z<NOTSET>r4   r[   s   &rB   __repr__Notset.__repr__}  s    rA   r4   N)r5   r6   r7   r8   r  r@   r4   rA   rB   r  r  |  s    rA   r  c                    V ^8  d   QhRRRR/# )rF   package_filesIterable[str]rK   zIterator[str]r4   )rM   s   "rB   rN   rN     s     >C >CM >Cm >CrA   c              #    "   \        V 4      p RpV  F  pRV9  ;'       d    VP                  R4      pVP                  R4      ^8H  ;'       d    VP                  R4      pV'       dL   \        P                  P                  V4      w  rVVR8w  d"   VP                  R4      '       g	   RpVx  K  K  K  V'       g   K  \        P                  P                  V4      pRpVx  K  	  V'       go   . pV  FG  pVP                  R4      p	RP                  V	R,          4      p
V
'       g   K6  VP                  V
4       KI  	  V'       d   \        V4       R	j  xL
  R	# R	# R	#  L
5i)
a  Given an iterable of file names in a source distribution, return the "names" that should
be marked for assertion rewrite.

For example the package "pytest_mock/__init__.py" should be added as "pytest_mock" in
the assertion rewrite mechanism.

This function has to deal with dist-info based distributions and egg based distributions
(which are still very much in use for "editable" installs).

Here are the file names as seen in a dist-info based distribution:

    pytest_mock/__init__.py
    pytest_mock/_version.py
    pytest_mock/plugin.py
    pytest_mock.egg-info/PKG-INFO

Here are the file names as seen in an egg based distribution:

    src/pytest_mock/__init__.py
    src/pytest_mock/_version.py
    src/pytest_mock/plugin.py
    src/pytest_mock.egg-info/PKG-INFO
    LICENSE
    setup.py

We have to take in account those two distribution flavors in order to determine which
names should be considered for assertion rewriting.

More information:
    https://github.com/pytest-dev/pytest-mock/issues/167
F/z.pyz__init__.pysetup__editable__Tr   N)r   endswithcountrd   rG   splitextr;  dirnamerc   r  r  _iter_rewritable_modules)r  	seen_somefnis_simple_module
is_packagemodule_namerH  package_namenew_package_filespartsnew_fns   &          rB   r  r    s7    @ 'MIb=??R[[-?XXc]a'FFBKK,F
WW--b1NK g%k.D.D^.T.T 	!! /U% Z77??2.LI   BHHSMEXXeBi(Fv!((0	  
 /0ABBB   Cs@   E ,E E (>E 'E =0E .5E (E E EE c                  :   ] tR tRt$ Rt]]P                  ! RR7       ! R R4      4       4       t ! R R]	P                  4      tR	]R
&   RR/R R llt]R R l4       t]R R l4       tR R ltR R ltR R ltR R ltR R ltRjR R lltR R  lt]R! R" l4       tR# R$ lt]! RR%7      R& R' l4       tR( R) ltR* R+ ltR, R- ltR. R/ lt R0 R1 lt!RkR2 R3 llt"]! RR47      R5 R6 l4       t#R7 R8 lt$R9 R: lt%R; R< lt&R= R> lt'R? R@ lt(RkRA RB llt)RC RD lt*RE RF lt+RG RH lt,RI RJ lt-RK RL lt.RM RN lt/RO RP lt0]1RQ3RR RS llt2RjRT RU llt3RjRV RW llt4RXt5RY]RZ&   R[t6RY]R\&   R]t7RY]R^&   RjR_ R` llt8]9Ra Rb l4       t:]9Rc Rd l4       t;Re Rf lt<Rg Rh lt=Rit>R# )lr   i  a  Access to configuration values, pluginmanager and plugin hooks.

:param PytestPluginManager pluginmanager:
    A pytest PluginManager.

:param InvocationParams invocation_params:
    Object containing parameters regarding the :func:`pytest.main`
    invocation.
T)frozenc                  L    ] tR tRt$ RtR]R&    R]R&    R]R&    R	 R
 ltRtR# )Config.InvocationParamsi  ab  Holds parameters passed during :func:`pytest.main`.

The object attributes are read-only.

.. versionadded:: 5.1

.. note::

    Note that the environment variable ``PYTEST_ADDOPTS`` and the ``addopts``
    ini option are handled by pytest, not being included in the ``args`` attribute.

    Plugins accessing ``InvocationParams`` must be aware of that.
r   rh   rk   rj   rH   r   c               (    V ^8  d   QhRRRRRRRR/# )	rF   rh   r  rj   rk   r   rH   rK   rL   r4   )rM   s   "rB   rN   $Config.InvocationParams.__annotate__  s4     		1 		1  		1 :			1
 		1 		1rA   c               	    \         P                  V R \        V4      4       \         P                  V RV4       \         P                  V RV4       R# )rh   rj   r   N)object__setattr__tuple)rR   rh   rj   r   s   &$$$rB   rS    Config.InvocationParams.__init__  s>     tVU4[9tY8tUC0rA   r4   N)r5   r6   r7   r8   r9   __annotations__rS   r@   r4   rA   rB   r   r    s.    	 J55-[		1 		1rA   r   c                      ] tR tRtRt]P                  ! 4       t]P                  ! 4       t]t	]P                  ! 4       t
RtR# )Config.ArgsSourcei  zCIndicates the source of the test arguments.

.. versionadded:: 7.2
r4   N)r5   r6   r7   r8   r9   enumautoARGSINVOCATION_DIRINCOVATION_DIR	TESTPATHSr@   r4   rA   rB   
ArgsSourcer    s/    	 yy{'IIK	rA   r"  r/   cacher   Nc               $    V ^8  d   QhRRRRRR/# )rF   r   r   r   zInvocationParams | NonerK   rL   r4   )rM   s   "rB   rN   Config.__annotate__  s(     ;" ;"*;" 3	;"
 
;"rA   c               	d   ^RI Hp ^RI Hp Vf1   V P                  RR\        P
                  P                  4       R7      p\        P                  ! 4       V n	         W n
         TpV! RV RV R2V P                  RR	7      V n        Wn         \        4       V n         V P                  V n        V P                  P"                  P$                  P'                  R
4      V n        \)        V P                  P*                  4      V n        / V n        RV n        / V n        . V n        V P                  P5                  V R4       RV n        V P*                  P8                  P;                  \=        V P                  V P                  R7      R7       \>        P@                  PB                  V n"        . V n#        R# )r   )FILE_OR_DIRr"   Nr   z%(prog)s [options] [z] [z] [...]T)usage
processopt	_ispytestro   pytestconfigF)parserr   rL  r4   )$
argparsingr'  r#   r   r   r   r   argparse	Namespaceoptionr   _processopt_parserr   r,   stash_storer%  r&  rv   r   rx   	_inicache_override_ini	_opt2dest_cleanupr   r,  pytest_addoptionrR  rS  r   r"  r  args_sourcerh   )rR   r   r   r'  r#   _as   &&$   rB   rS   Config.__init__  s~    	,&$ $ 5 57<<+;+;+= !6 ! ((*	
 "3	
 (Ct7;''

 +	
 W
	 jj''--2266x@
&89K9K9P9P&Q	)+,.)+24##D.9 		""00t||4;M;MN 	1 	
 ",,11!	rA   c                   V ^8  d   QhRR/# )rF   rK   rH   r4   )rM   s   "rB   rN   r%  C  s      , rA   c                    V P                   # )zVThe path to the :ref:`rootdir <rootdir>`.

:type: pathlib.Path

.. versionadded:: 6.1
)	_rootpathr[   s   &rB   rk  Config.rootpathB  s     ~~rA   c                   V ^8  d   QhRR/# )rF   rK   rm  r4   )rM   s   "rB   rN   r%  M  s      , rA   c                    V P                   # )zHThe path to the :ref:`configfile <configfiles>`.

.. versionadded:: 6.1
)_inipathr[   s   &rB   inipathConfig.inipathL  s     }}rA   c                    V ^8  d   QhRRRR/# )rF   funczCallable[[], None]rK   rL   r4   )rM   s   "rB   rN   r%  T  s     # # 2 #t #rA   c                <    V P                   P                  V4       R# )zpAdd a function to be called when the config object gets out of
use (usually coinciding with pytest_unconfigure).N)r8  r  )rR   rG  s   &&rB   add_cleanupConfig.add_cleanupT  s     	T"rA   c                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r%  Y  s     O Ot OrA   c                	<   V P                   '       d   Q hR V n         \        P                  ! 4       ;_uu_ 4        \        P                  ! R4       V P                  P
                  P                  \        V R7      R7       RRR4       R#   + '       g   i     R# ; i)Tdefaultrn   rL  N)r,  r   catch_warningssimplefilterrx   rf  rR  rS  r[   s   &rB   _do_configureConfig._do_configureY  sh    #####$$&&!!),II&&44D<M4N '&&&s   AB

B	c                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r%  `  s      T rA   c                	   V P                   '       d?   R V n         V P                  P                  V R7       . V P                  P                  n        V P
                  '       d$   V P
                  P                  4       pV! 4        K5  R# )Frn   N)r,  rx   pytest_unconfigurerf  _call_historyr8  r{   )rR   fins   & rB   rz   Config._ensure_unconfigure`  sb    $DII(((579DII&&4mmm--##%CE rA   c                   V ^8  d   QhRR/# )rF   rK   r    r4   )rM   s   "rB   rN   r%  i  s     $ $^ $rA   c                	\    V P                   P                  R 4      pVf   Q hVP                  # )terminalreporter)r   r[  _tw)rR   rZ  s   & rB   get_terminal_writerConfig.get_terminal_writeri  s6    484F4F4Q4Q5
  +++###rA   c               $    V ^8  d   QhRRRRRR/# )rF   r   r   rh   r  rK   r   r4   )rM   s   "rB   rN   r%  p  s$      08A	rA   c                	    V P                  V4       V #   \         d    \        T P                  R R4      '       g   RT9   d   ^ RIHp T! T 4       h \        T P                  RR4      '       g   RT9   g   RT9   dH   T P                  P                  4       P                  4        \        P                  P                  R4       h i ; i)versionFz	--version)showversionhelpz--helpz-hz8
NOTE: displaying only minimal help due to UsageError.

)parser   r   r0  _pytest.helpconfigra  r2  
_getparser
print_helpr~   r   r(  )rR   r   rh   ra  s   &&& rB   r   Config.pytest_cmdline_parsep  s    	JJt& %  	 t{{Iu559L:D!  VU33x47G4SW<'')446

  Q !	s
    B2Cc               $    V ^8  d   QhRRRRRR/# )rF   excinfozExceptionInfo[BaseException]r0  zargparse.Namespace | NonerK   rL   r4   )rM   s   "rB   rN   r%    s(     # #-# *# 
	#rA   c                	   V'       d   \        VR R4      '       d   RpMRpVP                  R\        VRR4      VR7      pV P                  P                  WAR7      p\	        V4      '       ge   \        V4      P                  R4       FD  p\        P                  P                  R	V R24       \        P                  P                  4        KF  	  R
# R
# )	fulltraceFlongnativeT
showlocals)funcargsrn  rr   )excreprri  rt   zINTERNALERROR> N)r   r   rx   pytest_internalerroranyrV   rc   r~   r   r(  r   )rR   ri  r0  rr   rp  resr   s   &&&    rB   notify_exceptionConfig.notify_exception  s    
 gfk599$*EE//gflE&JRW " 
 ii,,W,N3xxG**40

  ?4&!;<

  " 1 rA   c                    V ^8  d   QhRRRR/# )rF   nodeidrV   rK   r4   )rM   s   "rB   rN   r%    s      # # rA   c                	    V P                   P                  V P                  8w  d4   V P                  V,          p\        V P                   P                  V4      pV# rQ   )r   r   rk  r'   )rR   rw  fullpaths   && rB   cwd_relative_nodeidConfig.cwd_relative_nodeid  sE    !!%%6}}v-H !7!7!;!;XFFrA   c                   V ^8  d   QhRR/# )rF   rK   r   r4   )rM   s   "rB   rN   r%    s       rA   c                    \        V4      pVP                  P                  P                  V4       VP	                  VRR7       VP                  P
                   F  pVP                  P                  V4       K   	  V# )z$Constructor usable for subprocesses.Faddopts)r   r0  __dict__updaterc  rj   r   r   )clsoption_dictrh   ro   r  s   &&&  rB   fromdictargsConfig.fromdictargs  sc     D!%%k2T5)&&A  33A6 'rA   c                    V ^8  d   QhRRRR/# )rF   r  r!   rK   rL   r4   )rM   s   "rB   rN   r%    s     < <x <D <rA   c                	N   VP                   VP                  ,            F  pVP                  V P                  V&   K  	  \	        VR 4      '       dV   \	        V P
                  VP                  4      '       g.   \        V P
                  VP                  VP                  4       R# R# R# )rM  N)_short_opts
_long_optsdestr7  r  r0  setattrrM  )rR   r  r   s   && rB   r1  Config._processopt  st    OOcnn44D#&88DNN4  5 3	""4;;11SXXs{{; 2 #rA   )r8  c                    V ^8  d   QhRRRR/# )rF   early_configr   rK   rL   r4   )rM   s   "rB   rN   r%    s     
 
& 
T 
rA   c                	"   VP                  VP                  P                  VP                  P                  VP	                  R 4      VP
                  P                  VP                  RR7      w  r#V P                  P                  VVP                  P                  VP                  P                  VP                  VP                  P                  VP
                  P                  VP                  P                  VP	                  R4      R7       R# )	testpathsFrh   ri  r  rn  rk  rO  rp  )rh   ri  rj  rk  rl  rn  ro  rp  N)_decide_argsknown_args_namespacefile_or_dirri  getinir   r   rk  r   r{  rj  rl  ro  )rR   r  rh   r:  s   &&  rB   pytest_load_initial_conftests$Config.pytest_load_initial_conftests  s     )5522>>44;;"))+6'99==!** 6 
 	1144;;#88CC!**#88CC'99==#88CC(4(;(;-) 	2 	
rA   c                    V ^8  d   QhRRRR/# rF   rh   r  rK   rL   r4   )rM   s   "rB   rN   r%    s     3 3] 3t 3rA   c                	   V P                   P                  V\        P                  ! V P                  4      R 7      w  r#\	        VP
                  VP                  V,           VP                  ;'       g    RV P                  P                  R7      w  rEpW@n
        WPn        W`n        \        V P                  4      V P                   P                  R&   \        V P                   4      V P                   P                  R&   V P                   P#                  RRR4       V P                   P#                  RR	4       V P                   P#                  R
RR. R7       VP$                  ;'       g    RV n        R# )	namespaceN)inifilerh   rootdir_cmd_argrn  rootdirr  r  zExtra command line optionsrh   
minversionz!Minimally required pytest versionrequired_pluginsz.Plugins that must be present for pytest to run)rZ   rM  r4   )r2  parse_known_and_unknown_argscopyr0  r   inifilenamer  r  r   r   r?  rC  inicfgrV   rk  
extra_inforD  addinioverride_inir6  )rR   rh   nsunknown_argsrk  rD  r  s   &&     rB   _initiniConfig._initini  s#   <<DDDIIdkk2 E 
 %4NN,.JJ..$1155	%
!6 "-0-?	*-0->	*I'CVLL*MN<	 	 	
  __22rA   c                    V ^8  d   QhRRRR/# r  r4   )rM   s   "rB   rN   r%    s     1 1 14 1rA   c                   V P                   P                  V4      w  r#\        VRR4      pVR8X  d2   ^ RIp VP                  P                  V 4      pV P                  V4       V P                  V4       R#   \         d    Rp L"i ; i)zInstall the PEP 302 import hook if using assertion rewriting.

Needs to parse the --assert=<mode> option from the commandline
and find all the installed plugins to mark them for rewriting
by the importhook.

assertmodeplainrewriteN)	r2  r  r   r  r   install_importhook_mark_plugins_for_rewriteSystemError_warn_about_missing_assertion)rR   rh   r  r  r  r  rx   s   &&     rB   _consider_importhookConfig._consider_importhook  s      <<DDTJr<19$5((;;DA ..t4**40	  s   A6 6BBc                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r%    s     $ $ $rA   c                   WP                   n        \        P                  P	                  R4      '       d   R# R \
        P                  P                  4        4       p\        V4       F  pVP                  V4       K  	  R# )z{Given an importhook, mark for rewrite any top-level
modules or packages in the distribution package for
all pytest plugins.PYTEST_DISABLE_PLUGIN_AUTOLOADNc              3    "   T F}  p\         ;QJ d&    R  VP                   4       F  '       g   K   RM	  RM! R  VP                   4       4      '       g   KS  VP                  ;'       g    .  F  p\        V4      x  K  	  K  	  R# 5i)c              3  >   "   T F  qP                   R 8H  x  K  	  R# 5i)r  N)group).0eps   & rB   	<genexpr>=Config._mark_plugins_for_rewrite.<locals>.<genexpr>.<genexpr>
  s     F4Eb88z)4Es   TFN)rr  entry_pointsfilesrV   )r  distfiles   &  rB   r  3Config._mark_plugins_for_rewrite.<locals>.<genexpr>  sl      
:sFD4E4EFsssFD4E4EFF  

((b( II ) :s   BB"BB*B)
r   r+  rd   ru   rv   rb   metadatadistributionsr  r  )rR   rx   r  r   s   &&  rB   r   Config._mark_plugins_for_rewrite  sf     +/'::>>:;; 
!**88:
 -];Dd# <rA   c               $    V ^8  d   QhRRRRRR/# )rF   rh   r  viarV   rK   r4   )rM   s   "rB   rN   r%    s!     
 
9 
3 
9 
rA   c                    W P                   n         V P                   P                  V\        P                  ! V P                  4      R7       V P                   =V#   T P                   =i ; i)zValidate known args.r  )r2  _config_source_hintr  r  r0  )rR   rh   r  s   &&&rB   _validate_argsConfig._validate_args  sY    +.(	1LL55		$++ 6 6  0 0s   ;A A)c               4    V ^8  d   QhRRRRRRRRRRR	RR
R/# )rF   rh   r  ri  r`   r  rn  rH   rk  rO  rK   ztuple[list[str], ArgsSource]r4   )rM   s   "rB   rN   r%    sR     + + + 	+
 + %+ + + 
&+rA   c          
        V'       d    \         P                  P                  pTpW3# WE8X  d   \         P                  P                  pV'       d   TpMt. pV F3  p	VP	                  \        \        P                  ! V	RR7      4      4       K5  	  V'       d/   V'       g'   V'       d   Rp
V P                  \        V
4      ^R7       M. pV'       g'   \         P                  P                  p\        V4      .pVX3# )zDecide the args (initial paths/nodeids) to use given the relevant inputs.

:param warn: Whether can issue warnings.

:returns: The args and the args source. Guaranteed to be non-empty.
T)	recursivezNo files were found in testpaths; consider removing or adjusting your testpaths configuration. Searching recursively from the current directory instead.
stacklevel)r   r"  r  r!  extendsortedr  iglobissue_config_time_warningr-   r  rV   )rR   rh   ri  r  rn  rk  rO  sourceresultrG   warning_texts   &$$$$$$    rB   r  Config._decide_args  s      &&++FF2 ~/ )**44&FF )fTZZ-M&NO !* !\ )
 !:: 3L Aa ;  **99n-.v~rA   c               $    V ^8  d   QhRRRRRR/# rF   rh   r  r  r`   rK   rL   r4   )rM   s   "rB   rN   r%  J  s!     4 4i 4$ 4$ 4rA   c                	   V'       db   \         P                  P                  R R4      p\        V4      '       d1   V P	                  \
        P                  ! V4      R4      V,           VR&   V P                  V4       V'       d,   V P	                  V P                  R4      R4      V,           VR&   V P                  P                  V\        P                  ! V P                  4      R7      V n        V P                  4        V P                  V4       V P                   P#                  VRR7       \         P                  P                  R	4      '       g   V P                   P%                  R
4       V P                   P'                  4        V P                  P                  V\        P                  ! V P                  4      R7      V n        V P)                  4        V P+                  4        V P                  P,                  fT   V P.                  e!   \1        V P.                  P2                  4      pM\1        V P4                  4      pW@P                  n         V P6                  P9                  WV P                  R7       R#   \:         dn   pT P                  P<                  '       g   T P                  P>                  '       d0   T PA                  \C        RTPD                   24      ^R7        Rp?R# h Rp?ii ; i)PYTEST_ADDOPTSr  zvia PYTEST_ADDOPTS:NNNr  zvia addopts configr  Fr   r  r  N)r  rh   r,  z"could not load initial conftests: r  )#rd   ru   rv   r  r  shlexrc   r  r  r2  parse_known_argsr  r0  r  _checkversionr  r   r   r  r  _validate_plugins_warn_about_skipped_pluginsrl  rD  rV   r   rk  rx   r  rD   rb  r`  r  r-   rG   )rR   rh   r  env_addoptsrl  r   s   &&&   rB   	_preparseConfig._preparseJ  sQ   **..)92>K;''K(@BVW Q 	d##DKK	$:<PQTXX G %)LL$A$ADIIdkk2 %B %
! 	!!$',,T,Fzz~~>?? :::F'')$(LL$A$ADIId&?&?@ %B %
! 	 ((*$$//7||' !4!45
 /
3=%%0	II33!T\\ 4  % 		((---1J1J1R1R1R ..'*LQVVH(UV  /  
 		s$   'I; ;K37K.>)K.-K..K3)wrapperc                   V ^8  d   QhRR/# )rF   rK   zGenerator[None, object, object]r4   )rM   s   "rB   rN   r%    s     , ,#B ,rA   c              #  	^   "    R x V P                  4        #   T P                  4        i ; i5irQ   )_validate_config_optionsr[   s   &rB   pytest_collectionConfig.pytest_collection  s%     	,))+D))+s   - -*-c                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r%    s      t rA   c                	d   ^ RI pV P                  P                  RR4      pV'       d   ^ RIHp \        V\        4      '       g   VP                  V P                   R24      hV! V4      V! VP                  4      8  d/   VP                  V P                   RV RVP                   R24      hR# R# )r  Nr  Versionz%: 'minversion' must be a single valuez: 'minversion' requires pytest-z, actual pytest-')
r1   r  rv   packaging.versionr  r   rV   r   rD  r   )rR   r1   minverr  s   &   rB   r  Config._checkversion  s    t41fc**''||n$IJ  v););!<<''||n$CF8K[\b\n\n[oopq  = rA   c                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r%    s     L L$ LrA   c                	p    \        V P                  4       4       F  pV P                  R V R24       K  	  R# )zUnknown config option: rt   N)r  _get_unknown_ini_keys_warn_or_fail_if_strict)rR   keys   & rB   r  Config._validate_config_options  s2    $4467C((+B3%r)JK 8rA   c                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r%    s      4 rA   c                	   \        V P                  R 4      4      pV'       g   R# ^ RIHp ^ RIHp ^ RIHp V P                  P                  4       pV UUu/ uF  w  rgVP                  VP                  bK  	  ppp. p	V F|  p
 V! V
4      pTP                  T9  d   T	P                  T
4       K0  TP                  P                  T! YP                  ,          4      RR7      '       d   Kk  T	P                  T
4       K~  	  V	'       d*   \        RP!                  RP#                  V	4      4      4      hR# u uppi   T d    T	P                  T
4        K  i ; i)	r  N)InvalidRequirement)Requirementr  T)prereleaseszMissing required plugins: {}r   )r  r  packaging.requirementsr  r   r  r  r   list_plugin_distinfoproject_namer`  r  r   	specifiercontainsr   rM   r  )rR   r  r  r   r  plugin_inforH  r  plugin_dist_infomissing_pluginsrequired_pluginreqs   &           rB   r  Config._validate_plugins  s1   !$++.@"AB 	>6-((==?KVW;D--t||;;W/O!/2
 xx//&&7]]++(23 ,    &&7  0 .55dii6PQ  # X & &&7s   "D2D88EEc                    V ^8  d   QhRRRR/# )rF   r  rV   rK   rL   r4   )rM   s   "rB   rN   r%    s     S Ss St SrA   c                	    V P                   P                  '       d   \        V4      hV P                  \	        V4      ^R7       R# )r  r  N)r  strict_configr   r  r-   )rR   r  s   &&rB   r  Config._warn_or_fail_if_strict  s9    $$222W%%&&':7'CPQ&RrA   c                   V ^8  d   QhRR/# )rF   rK   r  r4   )rM   s   "rB   rN   r%    s     K Ky KrA   c                	    V P                   P                  pV P                   Uu. uF  q"V9  g   K  VNK  	  up# u upi rQ   )r2  _inidictr  )rR   parser_inicfgr   s   &  rB   r  Config._get_unknown_ini_keys  s4    --!%JM0IJJJs   ;;c               $    V ^8  d   QhRRRRRR/# r  r4   )rM   s   "rB   rN   r%    s!      ) d d rA   c           	     	B   V P                   . 8X  g   Q R 4       hV P                  P                  P                  \	        V P
                  R7      R7       V P                  WR7       RV P                  n         V P                  P                  WP                  V P                  R7      pV P                  VV P                  P                  V P                  R4      V P                  P                   V P"                  RR7      w  V n         V n        R#   \&         d     R# i ; i)	z:can only parse cmdline args at most once per Config object)r   rL  r~  Tr  r  r  N)rh   rx   pytest_addhooksrR  rS  r   r  r2  after_preparseparse_setoptionr0  r  r  ri  r  r   r   rk  r:  r   )rR   rh   r  s   &&&rB   rc  Config.parse  s     IIO	HG	H		!!//d&8&89 	0 	
 	t-&*#	<<//kkT[[ 0 D +/*;*;0077++k2#5599 +< +'DIt'  		s   7BD DDc               $    V ^8  d   QhRRRRRR/# )rF   warningWarningr  r   rK   rL   r4   )rM   s   "rB   rN   r%    s!     ! ! !c !d !rA   c           	        V P                   P                  R4      '       d   R# V P                  P                  ;'       g    . pV P	                  R4      p\
        P                  ! RR7      ;_uu_ 4       p\
        P                  ! R\        V4      4       \        WC4       \
        P                  ! WR7       RRR4       X'       d   \        P                  ! V^,
          4      pVP                  P                  VP                  VP                  P                   3pV P"                  P$                  P'                  \)        V^ ,          RR	VR
7      R7       R# R#   + '       g   i     L; i)a  Issue and handle a warning during the "configure" stage.

During ``pytest_configure`` we can't capture warnings using the ``catch_warnings_for_item``
function because it is not possible to have hook wrappers around ``pytest_configure``.

This function is mainly intended for plugins that need to issue warnings during
``pytest_configure`` (or similar stages).

:param warning: The warning instance.
:param stacklevel: stacklevel forwarded to warnings.warn.
r   NfilterwarningsT)recordalwaysr  ro   r  )warning_messagewhenrw  locationrL  )r   r  r  pythonwarningsr  r   rN  rO  rZ   apply_warning_filtersrO  r~   	_getframef_codeco_filenamef_linenoco_namerx   pytest_warning_recordedrR  rS  )rR   r  r  cmdline_filtersconfig_filtersrecordsframer%  s   &&&     rB   r   Config.issue_config_time_warning  s    ((4433BBHHb%56$$D11W!!(DM:!.BMM'9 2
 MM*q.1E||//AUAUUHII--;;$+AJ!%	 <   21s   4AEE)	c               $    V ^8  d   QhRRRRRR/# )rF   r   rV   r   rK   rL   r4   )rM   s   "rB   rN   r%    s!      S   rA   c                z    V P                  V4      p\        V\        4      '       g   Q hVP                  V4       R# )zAdd a line to an ini-file option. The option must have been
declared but might not yet be set in which case the line becomes
the first line in its value.N)r  r   r   r  )rR   r   r   r  s   &&& rB   re  Config.addinivalue_line  s0     KK!T""""	rA   c                   V ^8  d   QhRR/# rY  r4   )rM   s   "rB   rN   r%    s        3  rA   c                     V P                   V,          #   \         d&    T P                  T4      ;T P                   T&   pTu # i ; i)a  Return configuration value from an :ref:`ini file <configfiles>`.

If a configuration value is not defined in an
:ref:`ini file <configfiles>`, then the ``default`` value provided while
registering the configuration through
:func:`parser.addini <pytest.Parser.addini>` will be returned.
Please note that you can even provide ``None`` as a valid
default value.

If ``default`` is not provided while registering using
:func:`parser.addini <pytest.Parser.addini>`, then a default value
based on the ``type`` parameter passed to
:func:`parser.addini <pytest.Parser.addini>` will be returned.
The default values based on ``type`` are:
``paths``, ``pathlist``, ``args`` and ``linelist`` : empty list ``[]``
``bool`` : ``False``
``string`` : empty string ``""``

If neither the ``default`` nor the ``type`` parameter is passed
while registering the configuration through
:func:`parser.addini <pytest.Parser.addini>`, then the configuration
is treated as a string and a default empty string '' is returned.

If the specified name hasn't been registered through a prior
:func:`parser.addini <pytest.Parser.addini>` call (usually from a
plugin), a ValueError is raised.
)r5  r  _getini)rR   r   vals   && rB   r  Config.getini  sF    8	>>$'' 	)-d);;DNN4 3J	s    -AAc               $    V ^8  d   QhRRRRRR/# )rF   r   rV   rZ   valuezstr | list[str]r4   )rM   s   "rB   rN   r%  2  s!     % % %C % %rA   c                	"    R V 2p\        WC4      h)zunknown configuration type: )r|   )rR   r   rZ   r<  r   s   &&&& rB   _getini_unknown_typeConfig._getini_unknown_type2  s    ,TF3$$rA   c                   V ^8  d   QhRR/# rY  r4   )rM   s   "rB   rN   r%  6  s     2@ 2@C 2@rA   c                	    V P                   P                  V,          w  r#pT P	                  T4      pTf    T P
                  T,          pMTpTR8X  d   T P                  e   T P                  P                  MT P                  P                  p\        T\        4      '       d   \        P                  ! T4      MTp	T	 U
u. uF  qT
,          NK  	  up
# TR8X  d/   \        T\        4      '       d   \        P                  ! T4      # T# TR8X  dN   \        T\        4      '       d6   \        R TP                  R4      4       Uu. uF  q'       g   K  TNK  	  up# T# TR8X  d#   \        \        T4      P!                  4       4      # TR8X  d   T# Tf   T# T P#                  YT4      #   \         d   p\        R T: 24      ThRp?ii ; i  \         d    Tu # i ; iu up
i u upi )	zunknown configuration value: Npathsrh   linelistc                "    V P                  4       # rQ   r  )r  s   &rB   <lambda> Config._getini.<locals>.<lambda>^  s
    rA   rt   r`   string)r2  r  r  r|   _get_override_ini_valuer  rD  r   r   r   r   rV   r  rc   map
_strtoboolr  r>  )rR   r   descriptionrZ   rM  r   override_valuer<  dpinput_valuesr  ts   &&          rB   r8  Config._getini6  s   	N)-)>)>t)D&Kw 55d;!D) #E  7? <<+ ##++// 
 2<E31G1G5;;u-UL$01LqFFL11V^)3E3)?)?5;;u%JUJZ%%%#&':EKK<M#NT#NaRS#NTTV^c%j..011XL\L,,T??_  	N<THEFAM	N  4 2
 Us:    F( G G	G#G#(G3GGGGc               $    V ^8  d   QhRRRRRR/# )rF   r   rV   rG   rH   rK   zlist[pathlib.Path] | Noner4   )rM   s   "rB   rN   r%  j  s$      +	"rA   c                	    V P                   P                  W4      w  r4TP                  f   Q h\        P
                  ! TP                  4      P                  p. pT F|  p\        T\        P                  4      '       d   \        P
                  ! T4      pM1TP                  R\        P                  4      p\        YW,          4      pTP                  T4       K~  	  T#   \         d     R # i ; i)Nr  )r   r  r  r  r   r   r   r   rd   r   rP  re   r&   r  )rR   r   rG   r  relrootsmodpathvaluesrelroots   &&&     rB   _getconftest_pathlistConfig._getconftest_pathlistj  s    	 ..AA$MMC ||''',,s||,33%'G'2;;//!,,w/!//#rvv6&w'89MM'"     		s   C C.-C.c                    V ^8  d   QhRRRR/# )rF   r   rV   rK   rF  r4   )rM   s   "rB   rN   r%  }  s      C J rA   c                	    R pV P                    F"  p VP                  R^4      w  rEWA8X  d   TpK"  K$  	  V#   \         d   p\        RT: R24      ThR p?ii ; i)Nr   z3-o/--override-ini expects option=value style (got: z).)r6  rc   r|   r   )rR   r   r<  
ini_configr  user_ini_valuer   s   &&     rB   rI  Config._get_override_ini_value}  sz     ,,J+&0&6&6sA&># ;*E  -    I*WYZs   7AAAFc                    V ^8  d   QhRRRR/# )rF   r   rV   skipr`   r4   )rM   s   "rB   rN   r%    s     A Ac A ArA   c                D   V P                   P                  W4      p \        V P                  V4      pVf   V'       d   \	        V4      hV#   \         dI   pT\
        Jd   Tu Rp?# T'       d   ^ RIpTP                  RT: R24       \        RT: 24      ThRp?ii ; i)a9  Return command line option value.

:param name: Name of the option.  You may also specify
    the literal ``--OPT`` option instead of the "dest" option name.
:param default: Default value if no option of that name exists.
:param skip: If True, raise pytest.skip if option does not exists
    or has a None value.
Nzno z option foundzno option named )	r7  rv   r   r0  r   notsetr1   r`  r|   )rR   r   rM  r`  r9  r   r1   s   &&&&   rB   	getoptionConfig.getoption  s     ~~!!$-	A$++t,C{t$T**J 	Af$c$78/x89q@	As.   !A A BB"B(B0*BBc                   V ^8  d   QhRR/# rY  r4   )rM   s   "rB   rN   r%    s     $ $S $rA   c                $    V P                  V4      # )z$Deprecated, use getoption() instead.rc  rR   r   rG   s   &&&rB   getvalueConfig.getvalue  s    ~~d##rA   c                   V ^8  d   QhRR/# rY  r4   )rM   s   "rB   rN   r%    s     / /3 /rA   c                (    V P                  VRR7      # )z-Deprecated, use getoption(skip=True) instead.T)r`  rg  rh  s   &&&rB   getvalueorskipConfig.getvalueorskip  s    ~~d~..rA   
assertionsr	   VERBOSITY_ASSERTIONS
test_casesVERBOSITY_TEST_CASESr  _VERBOSITY_INI_DEFAULTc                    V ^8  d   QhRRRR/# )rF   verbosity_typerF  rK   r   r4   )rM   s   "rB   rN   r%    s     , ,J ,# ,rA   c                2   V P                   P                  p\        V\        4      '       g   Q hVf   V# \        P                  V4      pW0P                  P                  9  d   V# V P                  V4      pV\        P                  8X  d   V# \        V4      # )a  Retrieve the verbosity level for a fine-grained verbosity type.

:param verbosity_type: Verbosity type to get level for. If a level is
    configured for the given type, that value will be returned. If the
    given type is not a known verbosity type, the global verbosity
    level will be returned. If the given type is None (default), the
    global verbosity level will be returned.

To configure a level for a fine-grained verbosity type, the
configuration file should have a setting for the configuration name
and a numeric value for the verbosity level. A special value of "auto"
can be used to explicitly use the global verbosity level.

Example:

.. code-block:: ini

    # content of pytest.ini
    [pytest]
    verbosity_assertions = 2

.. code-block:: console

    pytest -v

.. code-block:: python

    print(config.get_verbosity())  # 1
    print(config.get_verbosity(Config.VERBOSITY_ASSERTIONS))  # 2
)
r0  verboser   r   r   _verbosity_ini_namer2  r  r  rs  )rR   ru  global_levelini_namelevels   &&   rB   get_verbosityConfig.get_verbosity  s    > {{**,,,,,!--n=<<000H%F1115zrA   c                    V ^8  d   QhRRRR/# )rF   ru  rV   rK   r4   )rM   s   "rB   rN   r%    s     - -C -C -rA   c                	    R V  2# )
verbosity_r4   )ru  s   &rB   rx  Config._verbosity_ini_name  s    N+,,rA   c               (    V ^8  d   QhRRRRRRRR/# )rF   r,  r#   ru  rV   rb  rK   rL   r4   )rM   s   "rB   rN   r%    s(     
 
6 
3 
c 
d 
rA   c                r    V P                  \        P                  V4      VR\        P                  R7       R# )as  Add a output verbosity configuration option for the given output type.

:param parser: Parser for command line arguments and ini-file values.
:param verbosity_type: Fine-grained verbosity category.
:param help: Description of the output this type controls.

The value should be retrieved via a call to
:py:func:`config.get_verbosity(type) <pytest.Config.get_verbosity>`.
rH  )rb  rZ   rM  N)r  r   rx  rs  )r,  ru  rb  s   &&&rB   _add_verbosity_iniConfig._add_verbosity_ini  s2     	&&~611	 	 	
rA   c                    V ^8  d   QhRRRR/# )rF   r  rV   rK   rL   r4   )rM   s   "rB   rN   r%    s      # $ rA   c                	z    \        4       '       g+   VR 8X  d   RpMRpV P                  \        V4      ^R7       R# R# )r  zRASSERTIONS ARE NOT EXECUTED and FAILING TESTS WILL PASS.  Are you using python -O?zassertions not in test modules or plugins will be ignored because assert statements are not executed by the underlying Python interpreter (are you using python -O?)
r  N)_assertion_supportedr  r-   )rR   r  r  s   && rB   r  $Config._warn_about_missing_assertion  sK    #%%w( 3  **#L1 +  &rA   c                   V ^8  d   QhRR/# r  r4   )rM   s   "rB   rN   r%    s      T rA   c           	     	    V P                   P                   F(  w  rV P                  \        R V: RV 24      ^R7       K*  	  R# )zskipped plugin rX   r  N)r   r!  r  r-   )rR   r	  r   s   &  rB   r  "Config._warn_about_skipped_plugins  sG     $ 2 2 B BK**#ok_Bse$LM +  !CrA   )r8  r,  r5  rC  r7  r6  r2  r?  r4  rh   r:  rx   r  r   r  r0  r   r3  r%  rQ   )T)?r5   r6   r7   r8   r9   r
   dataclasses	dataclassr   r  Enumr"  r  rS   propertyrk  rD  rI  rP  rz   r\  r   rt  rz  classmethodr  r1  hookimplr  r  r  r  r  r  r  r  r  r  r  r  r  rc  r  re  r  r>  r8  rX  rI  rb  rc  ri  rm  rp  rr  rs  r|  r   rx  r  r  r  r@   r4   rA   rB   r   r     s    $'1 1 ( 1B TYY   L;" 6:	;"z    #
O$2#$  < d
 
4321($*
+Z4l d, ,$LBSK2!F H%2@h&" ,2 A0$/
 #/%.".%.$*E*,\ - - 
 
"* rA   r   c                   V ^8  d   QhRR/# )rF   rK   r`   r4   )rM   s   "rB   rN   rN     s      d rA   c                 ,     Q h  \          d     R# i ; i)FT)r  r4   rA   rB   r  r    s    u s    c               $    V ^8  d   QhRRRRRR/# )rF   ro   r   r  zTextIO | NonerK   r    r4   )rM   s   "rB   rN   rN     s$      'rA   c                4   \        VR7      pV P                  P                  R8X  d	   RVn        M"V P                  P                  R8X  d   RVn        V P                  P                  R8X  d
   RVn        V# V P                  P                  R8X  d   RVn        V# )zCreate a TerminalWriter instance configured according to the options
in the config object.

Every code which requires a TerminalWriter object and has access to a
config object should use this function.
)r  yesTnoF)r    r0  color	hasmarkupcode_highlight)ro   r  r   s   && rB   create_terminal_writerr    s     
T	"B}}e#				$}}##u,  I 
	%	%	-!IrA   c                    V ^8  d   QhRRRR/# )rF   r9  rV   rK   r`   r4   )rM   s   "rB   rN   rN   6  s     9 9C 9D 9rA   c                d    V P                  4       p V R9   d   R# V R9   d   R# \        RV : 24      h)a  Convert a string representation of truth to True or False.

True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
'val' is anything else.

.. note:: Copied from distutils.util.
TFzinvalid truth value )yr  rP  trueon1)r  r  ffalseoff0)lowerr|   )r9  s   &rB   rK  rK  6  s:     ))+C
22	5	5/w788rA   )maxsizec               $    V ^8  d   QhRRRRRR/# )rF   r  rV   escaper`   rK   z9tuple[warnings._ActionKind, str, type[Warning], str, int]r4   )rM   s   "rB   rN   rN   I  s)     D5 D5	D5D5>D5rA   c          	        Rp\        RV  R24      pV P                  R4      p\        V4      ^8  d9   Rp\        R\        V4       RV R24      p\        VP	                  VR	7      4      h\        V4      ^8  d   VP                  R
4       K#  R V 4       w  rxrp \        P                  ! V4      p \        T	4      pT'       d   T'       d   \        P                   ! T4      pT
'       d&   T'       d   \        P                   ! T
4      R,           p
T'       d     \#        T4      pT^ 8  d   \%        R4      hM^ pYYT3#   \        P                   d+   p\        TP	                  \        T4      R	7      4      RhRp?ii ; i  \         dE    \        P                  ! 4       pTP                  RR7      p\        TP	                  TR	7      4      Rhi ; i  \$         d)   p\        TP	                  RT: RT 2R	7      4      RhRp?ii ; i)zParse a warnings filter string.

This is copied from warnings._setoption with the following changes:

* Does not apply the filter.
* Escaping is optional.
* Raises UsageError so we get nice error messages on failure.
TzF        while parsing the following warning configuration:

          z8

        This error occurred:

        {error}
        :zJhttps://docs.python.org/3/library/warnings.html#describing-warning-filtersz            Too many fields (z), expected at most 5 separated by colons:

              action:message:category:module:line

            For more information please consult: z
            )errorr  c              3  @   "   T F  qP                  4       x  K  	  R # 5irQ   rE  )r  ss   & rB   r  'parse_warning_filter.<locals>.<genexpr>s  s     3Mu!GGIIus   Nrm  )rr   z\Zznumber is negativezinvalid lineno rX   )r   rc   r  r   rM   r  r   
_getaction_OptionErrorrV   _resolve_warning_categoryrJ   r   from_currentr   rer  r   r|   )r  r  __tracebackhide__error_templater  doc_urlr  action_r  	category_modulelineno_actionr   categoryr   exception_textlinenos   &$                rB   parse_warning_filterr  H  s     % 		
N IIcNE
5zA~X 	 !%j\ *2 3: ;
 ..U.;<<
e*q.R3Mu3M0GiH'/':':7'CP";I"F
 6))G$&6"U*	\Fz !566  Hf44/    H..SV.<=4GH  P --/!)))9..^.DE4OP  	%%og[1#,N%O	s=   D? 3F G ?E>%E99E>AGH#HHc                    V ^8  d   QhRRRR/# )rF   r  rV   rK   ztype[Warning]r4   )rM   s   "rB   rN   rN     s     $ $ $ $rA   c                   RpV '       g   \         # RV 9  d   ^ RIpT pM#V P                  R4      w  rEp\        VRRV.4      p\	        W#4      p\        V\         4      '       g   \        V R24      h\        \        \         ,          V4      # )z
Copied from warnings._getcategory, but changed so it lets exceptions (specially ImportErrors)
propagate so we can get access to their tracebacks (#9218).
T.Nz is not a Warning subclass)	r  builtins
rpartitionr  r   
issubclassr   r   r   )r  r  r  klassr  rH  cats   &      rB   r  r    s    
 
(#..s35vtTE73
!
Cc7##C5 :;<<Ws##rA   c               $    V ^8  d   QhRRRRRR/# )rF   r/  r  r.  rK   rL   r4   )rM   s   "rB   rN   rN     s)     
I 
I!
I4A
I	
IrA   c                    V  F"  p\         P                  ! \        VRR7      !   K$  	  V F"  p\         P                  ! \        VRR7      !   K$  	  R# )z8Applies pytest-configured filters to the warnings moduleF)r  TN)r   r   r  )r/  r.  r  s   && rB   r'  r'    sF     !5c%!HI  !5c$!GH rA   )NN)markr   runnerfixtures
helpconfigrQ   )yr9   
__future__r   r.  collections.abcr  r  r  r  	functoolsr   r  importlib.metadatarb   r   rd   r   r  r  r~   textwrapr   rT  r   typingr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   pluggyr   r   r   r   r   compatr   
exceptionsr   r   	findpathsr   r  r   _pytest._coder   r   _pytest._code.coder   _pytest._ior    _pytest.config.argparsingr!   r#   _pytest.deprecated_pytest.hookspec_pytest.outcomesr$   r%   _pytest.pathlibr&   r'   r(   r)   r*   r+   _pytest.stashr,   _pytest.warning_typesr-   r.   _pytest.cacheproviderr/   _pytest.terminalr0   r  r1  r  r#  IntEnumr3   rJ   rD   rf   r   r   r   r   r   r  r   r  r  r  r   r   rw   r   r  r   r  r  rb  r  r   r  r  rK  r  r  r'  r4   rA   rB   <module>r     s2   @ "          	  	  
                    !  !    & . 0 &   ' * - & . ,   ! $ ( ' ' & 0 '  5 3 +1  (#(# t||  ,OI OX4>n$    	
             !" #$ %& '( )* +, -. /0 12 34 56 7< o&   J    ) *2&@@ ](- ]( ](@* 
 
>CB L L L^09$ 2D5 D5N$,
IrA   