+
    üÐjé£  ã                   ól  € R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtHt  ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHtHtHtHtHtHtHtHtHtHtHtHt ^ RIHt ^ R	I H!t! ^ R
I"H#t# ^ RI$H%t% ^ RI&H't'  ! R R4      t( ! R R]'4      t) ! R R]'4      t* ! R R]%]'4      t+ ! R R]'4      t,R t-R t. ! R R]'4      t/]! ]! R^^^4      4       ! R R4      4       t0 ! R R4      t1]! ]! R^^^ 4      R 4      R*R! l4       t2 ! R" R#]'4      t3 ! R$ R%]'4      t4 ! R& R']'4      t5 ! R( R)]'4      t6R#   ] d    Rt
 EL
i ; i)+zI
Tests for Twisted's deprecation framework, L{twisted.python.deprecate}.
N)Únormcase)Úcatch_warningsÚsimplefilter)Úinvalidate_caches)ÚVersion)Ú	deprecate)ÚDEPRECATION_WARNING_FORMATÚ_appendToDocstringÚ_fullyQualifiedNameÚ_getDeprecationDocstringÚ_getDeprecationWarningStringÚ_mutuallyExclusiveArgumentsÚ_passedArgSpecÚ_passedSignatureÚ
deprecatedÚdeprecatedKeywordParameterÚdeprecatedPropertyÚgetDeprecationWarningString)ÚFilePath)Úplatform)Údeprecatedattributes)ÚTwistedModulesMixin)ÚSynchronousTestCasec                   ó0   a € ] tR t^1t o RtR tR tRtV tR# )Ú_MockDeprecatedAttributeze
Mock of L{twisted.python.deprecate._DeprecatedAttribute}.

@ivar value: The value of the attribute.
c                ó   € Wn         R # ©N©Úvalue©Úselfr   s   &&ÚD/usr/lib/python3/dist-packages/twisted/python/test/test_deprecate.pyÚ__init__Ú!_MockDeprecatedAttribute.__init__8   s   € ØŽ
ó    c                ó   € V P                   # )z
Get a known value.
r   ©r    s   &r!   ÚgetÚ_MockDeprecatedAttribute.get;   s   € ð �z‰zÐr$   r   N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r"   r'   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r!   r   r   1   s   ø‡ € ñò÷ð r$   r   c                   óH   a € ] tR t^Bt o RtR tR tR tR tR t	R t
RtV tR	# )
ÚModuleProxyTestszÄ
Tests for L{twisted.python.deprecate._ModuleProxy}, which proxies
access to module-level attributes, intercepting access to deprecated
attributes and passing through access to normal attributes.
c                ó¤   € \         P                  ! R4      pVP                  4        F  w  r4\        W#V4       K  	  \        P
                  ! V4      # )z 
Create a temporary module proxy object.

@param **kw: Attributes to initialise on the temporary module object

@rtype: L{twistd.python.deprecate._ModuleProxy}
Úfoo)ÚtypesÚ
ModuleTypeÚitemsÚsetattrr   Ú_ModuleProxy)r    ÚattrsÚmodÚkeyr   s   &,   r!   Ú
_makeProxyÚModuleProxyTests._makeProxyI   sA   € ô ×Ò˜uÓ%ˆØŸ+™+ž-‰JˆCÜ�C˜eÖ$ñ (ä×%Ò% cÓ*Ð*r$   c                óš   € V P                  RR7      pV P                  VP                  R4       V P                  \        \
        VR4       R# )z¼
Getting a normal attribute on a L{twisted.python.deprecate._ModuleProxy}
retrieves the underlying attribute's value, and raises C{AttributeError}
if a non-existent attribute is accessed.
Úhello)ÚSOME_ATTRIBUTEÚDOES_NOT_EXISTN)r>   ÚassertIsrB   ÚassertRaisesÚAttributeErrorÚgetattr©r    Úproxys   & r!   Útest_getattrPassthroughÚ(ModuleProxyTests.test_getattrPassthroughV   s=   € ð —‘¨w�Ó7ˆØ�‰�e×*Ñ*¨GÔ4Ø×Ñœ.¬'°5Ð:JÖKr$   c                ó¦   € V P                  4       p\        P                  VR4      p\        ^*4      VR&   V P	                  VP
                  ^*4       R# )z˜
Getting an attribute marked as being deprecated on
L{twisted.python.deprecate._ModuleProxy} results in calling the
deprecated wrapper's C{get} method.
Ú_deprecatedAttributesr5   N)r>   ÚobjectÚ__getattribute__r   ÚassertEqualr5   )r    rI   rM   s   &  r!   Útest_getattrInterceptÚ&ModuleProxyTests.test_getattrIntercept`   sH   € ð —‘Ó!ˆÜ &× 7Ñ 7¸Ð?VÓ WÐÜ'?ÀÓ'CÐ˜eÑ$Ø×Ñ˜Ÿ™ BÖ'r$   c                ó–   € V P                  4       pV P                  \        \        VR4       V P                  \        \        VR4       R# )zx
Private attributes of L{twisted.python.deprecate._ModuleProxy} are
inaccessible when regular attribute access is used.
Ú_modulerM   N)r>   rE   rF   rG   rH   s   & r!   Útest_privateAttributesÚ'ModuleProxyTests.test_privateAttributesk   s9   € ð
 —‘Ó!ˆØ×Ñœ.¬'°5¸)ÔDØ×Ñœ.¬'°5Ð:QÖRr$   c                ó¸   € V P                  4       p^Vn        V P                  \        P	                  VR4      ^4       V P                  VP                  ^4       R# )zl
Setting attributes on L{twisted.python.deprecate._ModuleProxy} proxies
them through to the wrapped module.
rT   N)r>   rT   ÚassertNotEqualrN   rO   rP   rH   s   & r!   Útest_setattrÚModuleProxyTests.test_setattrt   sH   € ð
 —‘Ó!ˆØˆŒØ×ÑœF×3Ñ3°E¸9ÓEÀqÔIØ×Ñ˜Ÿ™¨Ö*r$   c                ó¾   € V P                  4       p\        P                  VR4      pV P                  \	        V4      R\        V4      P                   RV: R24       R# )z“
L{twisted.python.deprecated._ModuleProxy.__repr__} produces a string
containing the proxy type and a representation of the wrapped module
object.
rT   Ú<z module=Ú>N)r>   rN   rO   rP   ÚreprÚtyper)   )r    rI   Ú
realModules   &  r!   Ú	test_reprÚModuleProxyTests.test_repr~   sQ   € ð —‘Ó!ˆÜ×,Ñ,¨U°IÓ>ˆ
Ø×Ñœ˜e›¨¬$¨u«+×*>Ñ*>Ð)?¸xÈ
Á~ÐUVÐ&WÖXr$   © N)r)   r*   r+   r,   r-   r>   rJ   rQ   rU   rY   ra   r.   r/   r0   s   @r!   r3   r3   B   s1   ø‡ € ñò+òLò	(òSò+÷Yð Yr$   r3   c                   óB   a € ] tR t^‰t o RtR tR tR tR tR t	Rt
V tR# )	ÚDeprecatedAttributeTestsz´
Tests for L{twisted.python.deprecate._DeprecatedAttribute} and
L{twisted.python.deprecate.deprecatedModuleAttribute}, which issue
warnings for deprecated module-level attributes.
c                ó~   € \         P                  V n        \         P                  V n        \        R ,           V n        R# )z.fooN)r   ÚversionÚmessager)   Ú_testModuleNamer&   s   &r!   ÚsetUpÚDeprecatedAttributeTests.setUp�   s)   € Ü+×3Ñ3ˆŒÜ+×3Ñ3ˆŒÜ'¨&Õ0ˆÖr$   c                ó°   € \        \        P                  R,           V,           \        P                  \        R,           \        P
                  ,           4      # )z:
Create the warning string used by deprecated attributes.
Ú.z: )r   r   r)   rg   r   rh   )r    Úattrs   &&r!   Ú_getWarningStringÚ*DeprecatedAttributeTests._getWarningString•   sA   € ô ,Ü ×)Ñ)¨CÕ/°$Õ6Ü ×(Ñ(Ü&¨Õ-Ô0D×0LÑ0LÕLó
ð 	
r$   c                óô  a€ Rp\        \        V^*4       \        P                  ! \        WP                  V P
                  4      oV P                  SP                  V4       V3R lpV! 4        V P                  V P                  .4      pV P                  V^ ,          R,          \        4       V P                  V^ ,          R,          V P                  V4      4       V P                  \        V4      ^4       R# )z»
L{twisted.python.deprecate._DeprecatedAttribute} correctly sets its
__name__ to match that of the deprecated attribute and emits a warning
when the original attribute value is accessed.
ÚANOTHER_DEPRECATED_ATTRIBUTEc                  ó(   <€ S P                  4        R # r   )r'   )rn   s   €r!   ÚaddStackLevelÚNDeprecatedAttributeTests.test_deprecatedAttributeHelper.<locals>.addStackLevel¯   s   ø€ Ø�H‰HŽJr$   Úcategoryrh   N)r9   r   r   Ú_DeprecatedAttributerg   rh   rP   r)   ÚflushWarningsÚtest_deprecatedAttributeHelperrD   ÚDeprecationWarningro   Úlen)r    Únamert   ÚwarningsShownrn   s   &   @r!   ry   Ú7DeprecatedAttributeTests.test_deprecatedAttributeHelperŸ   sÄ   ø€ ð .ˆÜÔ$ d¨BÔ/Ü×-Ò-Ü  $¯©°d·l±ló
ˆð 	×Ñ˜Ÿ™¨Ô-õ	ñ 	ŒØ×*Ñ*¨D×,OÑ,OÐ+PÓQˆØ�‰�m AÕ& zÕ2Ô4FÔGØ×Ñ˜ qÕ)¨)Õ4°d×6LÑ6LÈTÓ6RÔSØ×Ñœ˜]Ó+¨QÖ/r$   c                óÌ  € \         P                   V P                  V P                  .4      pV P	                  \        V4      ^ 4       Rp\        \         V4       V P                  V P                  .4      pV P	                  \        V4      ^4       V P                  V^ ,          R,          \        4       V P	                  V^ ,          R,          V P                  V4      4       R# )zÝ
L{twisted.python.deprecate.deprecatedModuleAttribute} wraps a
module-level attribute in an object that emits a deprecation warning
when it is accessed the first time only, while leaving other unrelated
attributes alone.
ÚDEPRECATED_ATTRIBUTErv   rh   N)
r   ÚANOTHER_ATTRIBUTErx   Útest_deprecatedAttributerP   r{   rG   rD   rz   ro   )r    r}   r|   s   &  r!   r‚   Ú1DeprecatedAttributeTests.test_deprecatedAttribute¹   s¹   € ô 	×.Ò.Ø×*Ñ*¨D×,IÑ,IÐ+JÓKˆØ×Ñœ˜]Ó+¨QÔ/à%ˆô 	Ô$ dÔ+à×*Ñ*¨D×,IÑ,IÐ+JÓKˆØ×Ñœ˜]Ó+¨QÔ/Ø�‰�m AÕ& zÕ2Ô4FÔGØ×Ñ˜ qÕ)¨)Õ4°d×6LÑ6LÈTÓ6RÖSr$   c                óŠ  € \         P                  ! R4      ;\        P                  V P                  &   pV P                  \        P                  P                  V P                  4       \        VR^4       \        VR^4       \        P                  ! \        R^^ ^ 4      RV P                  R4       \        P                  V P                  ,          pV P                  W!4       \        P                  ! \        R^^ ^ 4      RV P                  R4       V P                  V\        P                  V P                  ,          4       R# )zÇ
Deprecating an attribute in a module replaces and wraps that module
instance, in C{sys.modules}, with a
L{twisted.python.deprecate._ModuleProxy} instance but only if it hasn't
already been wrapped.
r5   ÚfirstÚsecondÚTwistedrh   N)r6   r7   ÚsysÚmodulesri   Ú
addCleanupÚpopr9   r   ÚdeprecatedModuleAttributer   rX   rD   )r    r<   rI   s   &  r!   Útest_wrappedModuleÚ+DeprecatedAttributeTests.test_wrappedModuleÐ   sï   € ô 38×2BÒ2BÀ5Ó2IÐIŒ�‰�D×(Ñ(Ñ)¨CØ�‰œŸ™Ÿ™¨×)=Ñ)=Ô>ä��W˜aÔ Ü��X˜qÔ!ä×+Ò+Ü�I˜q ! QÓ'¨°D×4HÑ4HÈ'ô	
ô —‘˜D×0Ñ0Õ1ˆØ×Ñ˜EÔ'ä×+Ò+Ü�I˜q ! QÓ'¨°D×4HÑ4HÈ(ô	
ð 	�‰�eœSŸ[™[¨×)=Ñ)=Õ>Ö?r$   )ri   rh   rg   N)r)   r*   r+   r,   r-   rj   ro   ry   r‚   r�   r.   r/   r0   s   @r!   re   re   ‰   s+   ø‡ € ñò1ò

ò0ò4T÷.@ð @r$   re   c                   óF   a € ] tR t^ët o RtRtR tR tR tR t	R t
RtV tR	# )
ÚImportedModuleAttributeTestszU
Tests for L{deprecatedModuleAttribute} which involve loading a module via
'import'.
z»from twisted.python.deprecate import deprecatedModuleAttribute
from incremental import Version

deprecatedModuleAttribute(
    Version('Package', 1, 2, 3), 'message', __name__, 'module')
c                ón  a€ V3R lo\        V P                  4       P                  R4      4      pVP                  4        S! W!4      pV P	                  VP
                  P                  R4      .\        P
                  ,           4       V P                  \        P                  P                  4       4       V# )a  
Create some files in a hierarchy, based on a dictionary describing those
files.  The resulting hierarchy will be placed onto sys.path for the
duration of the test.

@param tree: A dictionary representing a directory structure.  Keys are
    strings, representing filenames, dictionary values represent
    directories, string values represent file contents.

@return: another dictionary similar to the input, with file content
    strings replaced with L{FilePath} objects pointing at where those
    contents are now stored.
c                 ó0  <€ / pVP                  4        F~  w  r4V P                  V4      p\        V\        4      '       d   WRV&   VP	                  V4       KC  \        V\
        4      '       d   VP                  4        S! WT4      W#&   Ku  \        R 4      h	  V# )z(only strings and dicts allowed as values)r8   ÚchildÚ
isinstanceÚbytesÚ
setContentÚdictÚcreateDirectoryÚ
ValueError)ÚpathobjÚdirdictÚpathdictr=   r   r“   ÚmakeSomeFiless   &&    €r!   r�   ÚAImportedModuleAttributeTests.pathEntryTree.<locals>.makeSomeFiles  s‚   ø€ ØˆHØ%Ÿm™mžo‘
�ØŸ™ cÓ*�Ü˜e¤U×+Ò+Ø$)˜S‘MØ×$Ñ$ UÖ+Ü ¤t×,Ò,Ø×)Ñ)Ô+Ù$1°%Ó$?�H“Mä$Ð%OÓPÐPñ .ð ˆOr$   úutf-8)r   ÚmktempÚencodeÚmakedirsÚreplaceSysPathÚpathÚdecoderˆ   ÚreplaceSysModulesr‰   Úcopy)r    ÚtreeÚbaseÚresultr�   s   &&  @r!   ÚpathEntryTreeÚ*ImportedModuleAttributeTests.pathEntryTreeù   s�   ø€ õ	ô ˜Ÿ™›×,Ñ,¨WÓ5Ó6ˆØ�‰Œá˜tÓ*ˆà×Ñ˜TŸY™Y×-Ñ-¨gÓ6Ð7¼#¿(¹(ÕBÔCØ×ÑœsŸ{™{×/Ñ/Ó1Ô2Øˆr$   c                ó‚   € V P                  RRV P                  P                  R4      RR//4      pVR,          R,          # )zŠ
Add a sample module and package to the path, returning a L{FilePath}
pointing at the module which will be loadable as C{package.module}.
s   packages   __init__.pyrŸ   ó	   module.pyr$   )r«   Ú_packageInitr¡   )r    Úpathss   & r!   ÚsimpleModuleEntryÚ.ImportedModuleAttributeTests.simpleModuleEntry  sN   € ð
 ×"Ñ"àØ" D×$5Ñ$5×$<Ñ$<¸WÓ$EØ  #ððó
ˆð �ZÕ  Õ.Ð.r$   c                óp  € ^ RI Hp V P                  \        VP                  P                  R4      4      V4       V P                  V P                  .4      pV P                  \        V4      ^4       V P                  V^ ,          R,          R4       V P                  V^ ,          R,          \        4       R# )z2
Verification logic for L{test_deprecatedModule}.
©ÚmodulerŸ   rh   z7package.module was deprecated in Package 1.2.3: messagerv   N)
Úpackagerµ   rP   r   Ú__file__r¡   rx   ÚcheckOneWarningr{   rz   )r    Ú
modulePathrµ   Úemitteds   &&  r!   r¸   Ú,ImportedModuleAttributeTests.checkOneWarning.  s‘   € õ 	#à×Ñœ &§/¡/×"8Ñ"8¸Ó"AÓBÀJÔOØ×$Ñ$ d×&:Ñ&:Ð%;Ó<ˆØ×Ñœ˜W› qÔ)Ø×ÑØ�A�J�yÕ!ØHô	
ð 	×Ñ˜ � JÕ/Ô1CÖDr$   c                óD   € V P                  V P                  4       4       R# )z§
If L{deprecatedModuleAttribute} is used to deprecate a module attribute
of a package, only one deprecation warning is emitted when the
deprecated module is imported.
N)r¸   r±   r&   s   &r!   Útest_deprecatedModuleÚ2ImportedModuleAttributeTests.test_deprecatedModule=  s   € ð 	×Ñ˜T×3Ñ3Ó5Ö6r$   c                ó°   € V P                  4       pV P                  V4       V P                  V4       \        ^4       F  pV P                  V4       K  	  R# )z´
If L{deprecatedModuleAttribute} is used to deprecate a module attribute
of a package, only one deprecation warning is emitted when the
deprecated module is subsequently imported.
N)r±   r¸   Úrange)r    ÚmpÚxs   &  r!   Ú"test_deprecatedModuleMultipleTimesÚ?ImportedModuleAttributeTests.test_deprecatedModuleMultipleTimesE  sN   € ð ×#Ñ#Ó%ˆà×Ñ˜RÔ ð 	×Ñ˜RÔ ô �q–ˆAØ× Ñ  Ö$ó r$   rc   N)r)   r*   r+   r,   r-   r¯   r«   r±   r¸   r½   rÃ   r.   r/   r0   s   @r!   r�   r�   ë   s1   ø‡ € ñð
€Lò$òL/òEò7÷%ð %r$   r�   c                   óT   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tRtV tR# )ÚWarnAboutFunctionTestsiZ  z–
Tests for L{twisted.python.deprecate.warnAboutFunction} which allows the
callers of a function to issue a C{DeprecationWarning} about that function.
c                ó.  a€ \        V P                  4       4      P                  R4      V n        V P                  P	                  4        V P                  P                  R4      P                  R4       V P                  P                  R4      P                  R4       V P                  P                  R4      P                  R4       V P                  P                  4       P                  p\        P                  P                  ^ V4       V P                  \        P                  P                  V4       \        P                  P                  4       oV P                  V3R l4       \        P                  ! 4       '       d   V P!                  4        R	# R	# )
zI
Create a file that will have known line numbers when emitting warnings.
Útwisted_private_helperz__init__.pyr$   z	module.pys  
"A module string"

from twisted.python import deprecate

def testFunction():
    "A doc string"
    a = 1 + 2
    return a

def callTestFunction():
    b = testFunction()
    if b == 3:
        deprecate.warnAboutFunction(testFunction, "A Warning String")
z	pep626.pysQ  
"A module string"

from twisted.python import deprecate

def noop():
    pass

def testFunction(a=1, b=1):
    "A doc string"
    if a:
        if b:
            noop()
        else:
            pass

def callTestFunction():
    b = testFunction()
    if b is None:
        deprecate.warnAboutFunction(testFunction, "A Warning String")
c                  ó~   <€ \         P                  P                  4       \         P                  P                  S 4      3# r   )rˆ   r‰   ÚclearÚupdate)r‰   s   €r!   Ú<lambda>Ú.WarnAboutFunctionTests.setUp.<locals>.<lambda>•  s&   ø€ ¤§¡×!2Ñ!2Ó!4´c·k±k×6HÑ6HÈÓ6QÑ Rr$   N)r   r    r“   r¶   r¢   r–   Úparentr¤   rˆ   ÚinsertrŠ   Úremover‰   r§   r   Ú	isWindowsrx   )r    ÚpackagePathr‰   s   & @r!   rj   ÚWarnAboutFunctionTests.setUp`  s  ø€ ô   §¡£Ó.×4Ñ4Ð5MÓNˆŒØ�‰×ÑÔØ�‰×Ñ˜=Ó)×4Ñ4°SÔ9Ø�‰×Ñ˜;Ó'×2Ñ2ðô	
ð" 	�‰×Ñ˜;Ó'×2Ñ2ðô	
ð0 —l‘l×)Ñ)Ó+×0Ñ0ˆÜ�‰�‰˜˜;Ô'Ø�‰œŸ™Ÿ™¨Ô5ä—+‘+×"Ñ"Ó$ˆØ�‰ÔRÔSô
 ×Ò×ÒØ×ÑÖ ñ  r$   c                ó^  € R p\         P                  ! VR4       V P                  4       p\        pVP	                  4       P                  R4      '       d   VRR pV P                  \        V^ ,          R,          4      \        V4      4       V P                  V^ ,          R,          R4       R# )z�
L{deprecate.warnAboutFunction} emits a warning the file and line number
of which point to the beginning of the implementation of the function
passed to it.
c                  ó   € R # r   rc   rc   r$   r!   ÚaFuncÚ2WarnAboutFunctionTests.test_warning.<locals>.aFunc¤  ó   € Ùr$   zA Warning Messagez.pycNÚfilenamerh   éÿÿÿÿ)	r   ÚwarnAboutFunctionrx   r·   ÚlowerÚendswithÚassertSamePathr   rP   )r    rÖ   r}   rÙ   s   &   r!   Útest_warningÚ#WarnAboutFunctionTests.test_warning�  s�   € ò	ô 	×#Ò# EÐ+>Ô?Ø×*Ñ*Ó,ˆÜˆØ�>‰>Ó×$Ñ$ V×,Ò,Ø  �}ˆHØ×ÑœH ]°1Õ%5°jÕ%AÓBÄHÈXÓDVÔWØ×Ñ˜ qÕ)¨)Õ4Ð6IÖJr$   c                óÈ  € ^ RI Hp VP                  4        V P                  4       pV P	                  \        V^ ,          R,          P                  R4      4      V P                  P                  R4      P                  R4      4       V P                  V^ ,          R,          ^	4       V P                  V^ ,          R,          R4       V P                  \        V4      ^4       R	# )
z�
L{deprecate.warnAboutFunction} emits a C{DeprecationWarning} with the
number of a line within the implementation of the function passed to it.
r´   rÙ   rŸ   ó   twisted_private_helperr®   Úlinenorh   úA Warning StringN)rÈ   rµ   ÚcallTestFunctionrx   rÞ   r   r¡   r¶   Úsiblingr“   rP   r{   ©r    rµ   r}   s   &  r!   Útest_warningLineNumberÚ-WarnAboutFunctionTests.test_warningLineNumber¯  s¶   € õ
 	2à×ÑÔ!Ø×*Ñ*Ó,ˆØ×ÑÜ�] 1Õ% jÕ1×8Ñ8¸ÓAÓBØ�L‰L× Ñ Ð!:Ó;×AÑAÀ,ÓOô	
ð 	×Ñ˜ qÕ)¨(Õ3°QÔ7Ø×Ñ˜ qÕ)¨)Õ4Ð6HÔIØ×Ñœ˜]Ó+¨QÖ/r$   c                óÈ  € ^ RI Hp VP                  4        V P                  4       pV P	                  \        V^ ,          R,          P                  R4      4      V P                  P                  R4      P                  R4      4       V P                  V^ ,          R,          ^4       V P                  V^ ,          R,          R4       V P                  \        V4      ^4       R	# )
zÃ
L{deprecate.warnAboutFunction} emits a C{DeprecationWarning} with the
number of a line within the implementation handling the case in which
dis.findlinestarts returns the lines in random order.
)Úpep626rÙ   rŸ   râ   s	   pep626.pyrã   rh   rä   N)rÈ   rë   rå   rx   rÞ   r   r¡   r¶   ræ   r“   rP   r{   )r    rë   r}   s   &  r!   Ú'test_warningLineNumberDisFindlinestartsÚ>WarnAboutFunctionTests.test_warningLineNumberDisFindlinestartsÂ  s¶   € õ 	2à×ÑÔ!Ø×*Ñ*Ó,ˆØ×ÑÜ�] 1Õ% jÕ1×8Ñ8¸ÓAÓBØ�L‰L× Ñ Ð!:Ó;×AÑAÀ,ÓOô	
ð 	×Ñ˜ qÕ)¨(Õ3°RÔ8Ø×Ñ˜ qÕ)¨)Õ4Ð6HÔIØ×Ñœ˜]Ó+¨QÖ/r$   c                óŠ   € V P                  \        VP                  4      \        VP                  4      8H  V: RV: 24       R# )zÞ
Assert that the two paths are the same, considering case normalization
appropriate for the current platform.

@type first: L{FilePath}
@type second: L{FilePath}

@raise C{self.failureType}: If the paths are not the same.
z != N)Ú
assertTruer   r¤   )r    r…   r†   s   &&&r!   rÞ   Ú%WarnAboutFunctionTests.assertSamePathÖ  s8   € ð 	�‰Ü�U—Z‘ZÓ ¤H¨V¯[©[Ó$9Ñ9Ø‰i�t˜F™:Ð&ö	
r$   c                óš  € ^ RI Hp \        P                  R \        P                  VP                   V P
                  P                  V P
                  P                  R4      4       \        '       d   \        4        ^ RI	Hp V P                  \        P                  P                  R4       V P                  \        P                  P                  VP                  4       VP                  4        V P                  VP                  .4      p\        V^ ,          R,          P!                  R4      4      pV P
                  P                  R4      P#                  R4      pV P%                  W44       V P'                  V^ ,          R,          ^	4       V P'                  V^ ,          R	,          R
4       V P'                  \)        V4      ^4       R# )zä
Even if the implementation of a deprecated function is moved around on
the filesystem, the line number in the warning emitted by
L{deprecate.warnAboutFunction} points to a line in the implementation of
the deprecated function.
r´   rÈ   s   twisted_renamed_helperÚtwisted_renamed_helperrÙ   rŸ   r®   rã   rh   rä   N)rÈ   rµ   rˆ   r‰   r)   r¶   ÚmoveToræ   r   rò   rŠ   r‹   rå   rx   ÚtestFunctionr   r¡   r“   rÞ   rP   r{   )r    rµ   r}   Ú
warnedPathÚexpectedPaths   &    r!   Útest_renamedFileÚ'WarnAboutFunctionTests.test_renamedFileå  sO  € õ 	2ô �K‰KÐ0Ð1Ü�K‰K˜Ÿ™Ð(ð 	�‰×Ñ˜DŸL™L×0Ñ0Ð1JÓKÔL÷ ÓÜÔõ 	2à�‰œŸ™Ÿ™Ð)AÔBØ�‰œŸ™Ÿ™¨¯©Ô9à×ÑÔ!Ø×*Ñ*¨F×,?Ñ,?Ð+@ÓAˆÜ˜m¨AÕ.¨zÕ:×AÑAÀ'ÓJÓKˆ
Ø—|‘|×+Ñ+Ð,EÓF×LÑLØó
ˆð 	×Ñ˜JÔ5Ø×Ñ˜ qÕ)¨(Õ3°QÔ7Ø×Ñ˜ qÕ)¨)Õ4Ð6HÔIØ×Ñœ˜]Ó+¨QÖ/r$   c                óÚ   € \         P                  R \         P                  ! RRR7       ^ RIHp VP                  4        V P                  4       pV P                  \        V4      ^ 4       R# )zž
L{deprecate.warnAboutFunction} emits a warning that will be filtered if
L{warnings.filterwarning} is called with the module name of the
deprecated function.
ºNNNÚignorerÈ   ©Úactionrµ   r´   N)	ÚwarningsÚfiltersÚfilterwarningsrÈ   rµ   rå   rx   rP   r{   rç   s   &  r!   Útest_filteredWarningÚ+WarnAboutFunctionTests.test_filteredWarning  sU   € ô ×Ñ˜QÐä×Ò xÐ8PÕQå1à×ÑÔ!à×*Ñ*Ó,ˆØ×Ñœ˜]Ó+¨QÖ/r$   c                óò  € \         P                  R \         P                  ! RRR7       ^ RIHp VP                  4        VP                  4        V P                  4       pV P                  \        V4      ^4       V^ ,          R,          pV^ ,          R,          pV^ ,          R,          pV^ ,          R	,          p\         P                  ! W4WV4      pV P                  VP                  R
4      RV: 24       R# )z¹
L{deprecate.warnAboutFunction} emits a warning that will be filtered
once if L{warnings.filterwarning} is called with the module name of the
deprecated function and an action of once.
rú   rµ   rÈ   rü   r´   rh   rv   rÙ   rã   z=module.py:9: DeprecationWarning: A Warning String
  return a
zUnexpected warning string: N)rþ   rÿ   r   rÈ   rµ   rå   rx   rP   r{   Úformatwarningrï   rÝ   )r    rµ   r}   rh   rv   rÙ   rã   Úmsgs   &       r!   Útest_filteredOnceWarningÚ/WarnAboutFunctionTests.test_filteredOnceWarning  sÖ   € ô ×Ñ˜QÐä×Ò xÐ8PÕQå1à×ÑÔ!Ø×ÑÔ!à×*Ñ*Ó,ˆØ×Ñœ˜]Ó+¨QÔ/Ø Õ" 9Õ-ˆØ  Õ# JÕ/ˆØ  Õ# JÕ/ˆØ˜qÕ! (Õ+ˆÜ×$Ò$ W¸ÓIˆØ�‰Ø�L‰LØTóð *¨#©Ð1ö		
r$   )r¶   N)r)   r*   r+   r,   r-   rj   rß   rè   rì   rÞ   r÷   r  r  r.   r/   r0   s   @r!   rÆ   rÆ   Z  s:   ø‡ € ñò
;!òzKò$0ò&0ò(
ò$0òL0÷(
ð 
r$   rÆ   c                 ó   € R# ©z?
Do nothing.

This is used to test the deprecation decorators.
Nrc   rc   r$   r!   ÚdummyCallabler
  @  ó   ‚ r$   c                 ó   € R# )zO
Do nothing.

This is used to test the replacement parameter to L{deprecated}.
Nrc   rc   r$   r!   ÚdummyReplacementMethodr  H  r  r$   c                   óV   a € ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tRtV tR# )ÚDeprecationWarningsTestsiP  c                ó~   € \        R^^ ^ 4      pV P                  \        V P                  V4      \        : R24       R# )zˆ
L{getDeprecationWarningString} returns a string that tells us that a
callable was deprecated at a certain released version of Twisted.
r‡   zZ.DeprecationWarningsTests.test_getDeprecationWarningString was deprecated in Twisted 8.0.0N)r   rP   r   Ú test_getDeprecationWarningStringr)   ©r    rg   s   & r!   r  Ú9DeprecationWarningsTests.test_getDeprecationWarningStringQ  s:   € ô
 ˜) Q¨¨1Ó-ˆØ×ÑÜ'¨×(MÑ(MÈwÓWç19ð<ö	
r$   c                ó˜   € \        R^^ ^ 4      p\        R,           pV P                  \        V P                  W4      \
        : R24       R# )zÐ
L{getDeprecationWarningString} returns a string that tells us that a
callable was deprecated at a certain released version of Twisted, with
a message containing additional information about the deprecation.
r‡   z: This is a messagezm.DeprecationWarningsTests.test_getDeprecationWarningString was deprecated in Twisted 8.0.0: This is a messageN)r   r   rP   r   r  r)   )r    rg   Úformats   &  r!   Ú*test_getDeprecationWarningStringWithFormatÚCDeprecationWarningsTests.test_getDeprecationWarningStringWithFormat]  sM   € ô ˜) Q¨¨1Ó-ˆÜ+Ð.CÕCˆØ×ÑÜ'Ø×5Ñ5°wó÷ AIðKö		
r$   c           	     ó,  a€ \        R^^ ^ 4      p\        V4      ! \        4      oV3R lp\        RR7      ;_uu_ 4       p\	        R4       V! 4        V P                  V^ ,          P                  \        4       V P                  \        V^ ,          P                  4      \        \        V4      4       V P                  V^ ,          P                  P                  R4      \        P                  R4      4       RRR4       R#   + '       g   i     R# ; i)z;
Decorating a callable with L{deprecated} emits a warning.
r‡   c                  ó   <€ S ! 4        R # r   rc   )Údummys   €r!   rt   ÚJDeprecationWarningsTests.test_deprecateEmitsWarning.<locals>.addStackLevelt  s   ø€ ÙŽGr$   T©ÚrecordÚalwaysÚcoN)r   r   r
  r   r   rP   rv   rz   Ústrrh   r   rÙ   Úrstripr·   )r    rg   rt   Úcaughtr  s   &   @r!   Útest_deprecateEmitsWarningÚ3DeprecationWarningsTests.test_deprecateEmitsWarningm  sÉ   ø€ ô ˜) Q¨¨1Ó-ˆÜ˜7Ô#¤MÓ2ˆõ	ô  4×(Õ(¨FÜ˜Ô"ÙŒOØ×Ñ˜V A�Y×/Ñ/Ô1CÔDØ×ÑÜ�F˜1•I×%Ñ%Ó&Ü+¬M¸7ÓCôð
 ×Ñ˜V A�Y×/Ñ/×6Ñ6°tÓ<¼h¿o¹oÈdÓ>SÔT÷ )×(×(Ò(ús   ¿B9DÄD	c                óð   € \        R^^ ^ 4      p\        V4      ! \        4      pV P                  \        P                  VP                  4       V P                  \        \        4      \        V4      4       R# )z;
The decorated function has the same name as the original.
r‡   N)r   r   r
  rP   r)   ÚfullyQualifiedName©r    rg   r  s   &  r!   Útest_deprecatedPreservesNameÚ5DeprecationWarningsTests.test_deprecatedPreservesName‚  sY   € ô ˜) Q¨¨1Ó-ˆÜ˜7Ô#¤MÓ2ˆØ×Ñœ×/Ñ/°·±Ô@Ø×ÑÔ+¬MÓ:Ô<NÈuÓ<UÖVr$   c                óZ   € \        R^^ ^ 4      pV P                  R\        VR4      4       R# )zZ
L{_getDeprecationDocstring} returns a note about the deprecation to go
into a docstring.
r‡   zDeprecated in Twisted 8.0.0.Ú N)r   rP   r   r  s   & r!   Útest_getDeprecationDocstringÚ5DeprecationWarningsTests.test_getDeprecationDocstring‹  s/   € ô
 ˜) Q¨¨1Ó-ˆØ×ÑØ*Ô,DÀWÈbÓ,Qö	
r$   c                óÂ   € R p\        R^^ ^ 4      p\        V4      ! V4      p\        V\        VR4      4       V P	                  VP
                  VP
                  4       R# )z^
The docstring of the deprecated function is appended with information
about the deprecation.
c                 ó   € R# r	  rc   rc   r$   r!   ÚlocalDummyCallableÚTDeprecationWarningsTests.test_deprecatedUpdatesDocstring.<locals>.localDummyCallable›  r  r$   r‡   r+  N)r   r   r	   r   rP   r-   )r    r0  rg   r  s   &   r!   Útest_deprecatedUpdatesDocstringÚ8DeprecationWarningsTests.test_deprecatedUpdatesDocstring•  sX   € ò	ô ˜) Q¨¨1Ó-ˆÜ˜7Ô#Ð$6Ó7ˆäÐ-Ô/GÈÐQSÓ/TÔUà×ÑÐ+×3Ñ3°U·]±]ÖCr$   c                ó‚   € \        R^^ ^ 4      p\        V4      ! \        4      pV P                  WP                  4       R# )z\
Deprecating a function adds version information to the decorated
version of that function.
r‡   N)r   r   r
  rP   ÚdeprecatedVersionr'  s   &  r!   Útest_versionMetadataÚ-DeprecationWarningsTests.test_versionMetadata©  s7   € ô
 ˜) Q¨¨1Ó-ˆÜ˜7Ô#¤MÓ2ˆØ×Ñ˜×"9Ñ"9Ö:r$   c                ó¤   € \        R^^ ^ 4      p\        V P                  VRR7      pV P                  V\	        V P                  4      : R24       R# )zß
L{getDeprecationWarningString} takes an additional replacement parameter
that can be used to add information to the deprecation.  If the
replacement parameter is a string, it will be interpolated directly into
the result.
r‡   úsomething.foobar©ÚreplacementzE was deprecated in Twisted 8.0.0; please use something.foobar insteadN)r   r   r  rP   r&  ©r    rg   ÚwarningStrings   &  r!   Ú+test_getDeprecationWarningStringReplacementÚDDeprecationWarningsTests.test_getDeprecationWarningStringReplacement²  sT   € ô ˜) Q¨¨1Ó-ˆÜ3Ø×1Ñ1ØØ*ô
ˆð
 	×ÑØä+¨D×,QÑ,QÖRðUö	
r$   c                ó¼   € \        R^^ ^ 4      p\        V P                  V\        R7      pV P	                  V\        V P                  4      : R\        : R24       R# )zí
L{getDeprecationWarningString} takes an additional replacement parameter
that can be used to add information to the deprecation. If the
replacement parameter is a callable, its fully qualified name will be
interpolated into the result.
r‡   r:  z- was deprecated in Twisted 8.0.0; please use z.dummyReplacementMethod insteadN)r   r   r  r  rP   r&  r)   r<  s   &  r!   Ú7test_getDeprecationWarningStringReplacementWithCallableÚPDeprecationWarningsTests.test_getDeprecationWarningStringReplacementWithCallableÅ  sX   € ô ˜) Q¨¨1Ó-ˆÜ3Ø×1Ñ1ØÜ.ô
ˆð
 	×ÑØô " $×"GÑ"GÖHÏ(ðTö	
r$   rc   N)r)   r*   r+   r,   r  r  r#  r(  r,  r2  r6  r>  rA  r.   r/   r0   s   @r!   r  r  P  s:   ø‡ € ò

ò
ò Uò*Wò
òDò(;ò
÷&
ð 
r$   r  r‡   c                   ó   € ] tR tRtRtRtR# )ÚDeprecatedClassiÚ  zB
Class which is entirely deprecated without having a replacement.
rc   N)r)   r*   r+   r,   r-   r.   rc   r$   r!   rD  rD  Ú  s   † õr$   rD  c                   óz   a € ] tR tRt o RtRt]! ]! R^^^4      4      R 4       t]P                  R 4       tRt
V tR# )ÚClassWithDeprecatedPropertyiá  z*
Class with a single deprecated property.
Nr‡   c                ó   € V P                   # )z+
Getter docstring.

@return: The property.
©Ú_someProtectedValuer&   s   &r!   ÚsomePropertyÚ(ClassWithDeprecatedProperty.somePropertyè  s   € ð ×'Ñ'Ð'r$   c                ó   € Wn         R# )z
Setter docstring.
NrH  r   s   &&r!   rJ  rK  ñ  s
   € ð
 $)Ö r$   rH  )r)   r*   r+   r,   r-   rI  r   r   rJ  Úsetterr.   r/   r0   s   @r!   rF  rF  á  sN   ø‡ € ñð Ðá™ 	¨1¨a°Ó3Ó4ñ(ó 5ð(ð ×Ññ)ó ö)r$   rF  r5   c                ó   € R# )z/
Function with a deprecated keyword parameter.
Nrc   )ÚaÚbÚcr5   Úbars   &&&&&r!   ÚfunctionWithDeprecatedParameterrS  ù  r  r$   c                   óN   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )ÚDeprecatedDecoratorTestsi   z"
Tests for deprecated decorators.
c                óÌ   € T P                  Y!P                  P                  4        Uu. uF*  q3P                  4       '       g   K  VP                  4       NK,  	  up4       R# u upi )a   
Check that C{target} object has the C{expected} docstring lines.

@param target: Object which is checked.
@type target: C{anything}

@param expected: List of lines, ignoring empty lines or leading or
    trailing spaces.
@type expected: L{list} or L{str}
N)rP   r-   Ú
splitlinesÚstrip)r    ÚtargetÚexpectedrÂ   s   &&& r!   ÚassertDocstringÚ(DeprecatedDecoratorTests.assertDocstring  sD   € ð 	×ÑØ¯.©.×*CÑ*CÔ*EÓSÑ*E QÏÉÏ”y�q—w‘w–yÑ*EÑSö	
ùÚSs   ¨A!
ÁA!
c                ó°  € \        4       pVP                   V P                  \         P                  . RO4       \        R^^^4      \         P                  n        RpV P                  V P                  .4      pV P                  ^\        V4      4       V P                  \        V^ ,          R,          4       V P                  W#^ ,          R,          4       R# )zý
When L{deprecatedProperty} is used on a C{property}, accesses raise a
L{DeprecationWarning} and getter docstring is updated to inform the
version in which it was deprecated. C{deprecatedVersion} attribute is
also set to inform the deprecation version.
r‡   úktwisted.python.test.test_deprecate.ClassWithDeprecatedProperty.someProperty was deprecated in Twisted 1.2.3rv   rh   N)zGetter docstring.z@return: The property.úDeprecated in Twisted 1.2.3.)
rF  rJ  r[  r   r5  rx   Útest_propertyGetterrP   r{   rz   )r    Úobjrh   rþ   s   &   r!   r`  Ú,DeprecatedDecoratorTests.test_propertyGetter  s½   € ô *Ó+ˆà×Òà×ÑÜ'×4Ñ4òô	
ô FMØ�q˜!˜QóF
Ô#×0Ñ0ÔBð
;ð 	ð ×%Ñ% t×'?Ñ'?Ð&@ÓAˆØ×Ñ˜œC ›MÔ*Ø×ÑÔ+¨X°a­[¸Õ-DÔEØ×Ñ˜¨1¥+¨iÕ"8Ö9r$   c                óh  € \        4       p\        4       pWn        V P                  WP                  4       RpV P                  V P                  .4      pV P                  ^\        V4      4       V P                  \        V^ ,          R,          4       V P                  W4^ ,          R,          4       R# )ze
When L{deprecatedProperty} is used on a C{property}, setter accesses
raise a L{DeprecationWarning}.
r^  rv   rh   N)
rN   rF  rJ  rD   rI  rx   Útest_propertySetterrP   r{   rz   )r    ÚnewValuera  rh   rþ   s   &    r!   rd  Ú,DeprecatedDecoratorTests.test_propertySetter4  s•   € ô
 “8ˆÜ)Ó+ˆà#Ôà�‰�h× 7Ñ 7Ô8ð;ð 	ð ×%Ñ% t×'?Ñ'?Ð&@ÓAˆØ×Ñ˜œC ›MÔ*Ø×ÑÔ+¨X°a­[¸Õ-DÔEØ×Ñ˜¨1¥+¨iÕ"8Ö9r$   c                óp  € \        4        V P                  \         RR.4       \        R^^^4      \         n        RpV P	                  V P
                  .4      pV P                  ^\        V4      4       V P                  \        V^ ,          R,          4       V P                  W^ ,          R,          4       R# )zö
When L{deprecated} is used on a class, instantiations raise a
L{DeprecationWarning} and class's docstring is updated to inform the
version in which it was deprecated. C{deprecatedVersion} attribute is
also set to inform the deprecation version.
z@Class which is entirely deprecated without having a replacement.r_  r‡   zRtwisted.python.test.test_deprecate.DeprecatedClass was deprecated in Twisted 1.2.3rv   rh   N)	rD  r[  r   r5  rx   Ú
test_classrP   r{   rz   )r    rh   rþ   s   &  r!   rh  Ú#DeprecatedDecoratorTests.test_classH  s£   € ô 	Ôà×ÑÜàVØ.ðô	
ô -4°I¸qÀ!ÀQÓ,GŒÔ)ð.ð 	ð ×%Ñ% t§¡Ð&7Ó8ˆØ×Ñ˜œC ›MÔ*Ø×ÑÔ+¨X°a­[¸Õ-DÔEØ×Ñ˜¨1¥+¨iÕ"8Ö9r$   c                ó†   € \        R^^ ^ 4      p\        VR4      ! \        4      pV P                  VP                  R4       R# )zò
L{deprecated} takes an additional replacement parameter that can be used
to indicate the new, non-deprecated method developers should use.  If
the replacement parameter is a string, it will be interpolated directly
into the warning message.
r‡   r9  z‚
Do nothing.

This is used to test the deprecation decorators.

Deprecated in Twisted 8.0.0; please use something.foobar instead.
N)r   r   r
  rP   r-   r'  s   &  r!   Útest_deprecatedReplacementÚ3DeprecatedDecoratorTests.test_deprecatedReplacementc  s@   € ô ˜) Q¨¨1Ó-ˆÜ˜7Ð$6Ô7¼ÓFˆØ×ÑØ�M‰Mðö	
r$   c                óº   € \        R^^ ^ 4      p\        V\        R7      pV! \        4      pV P	                  VP
                  RP                  \        4      4       R# )a  
L{deprecated} takes an additional replacement parameter that can be used
to indicate the new, non-deprecated method developers should use.  If
the replacement parameter is a callable, its fully qualified name will
be interpolated into the warning message.
r‡   r:  z‹
Do nothing.

This is used to test the deprecation decorators.

Deprecated in Twisted 8.0.0; please use {}.dummyReplacementMethod instead.
N)r   r   r  r
  rP   r-   r  r)   )r    rg   Ú	decoratorr  s   &   r!   Ú&test_deprecatedReplacementWithCallableÚ?DeprecatedDecoratorTests.test_deprecatedReplacementWithCallablev  sQ   € ô ˜) Q¨¨1Ó-ˆÜ˜wÔ4JÔKˆ	Ùœ-Ó(ˆØ×ÑØ�M‰Mð3÷ 4:±6¼(Ó3Cö	
r$   c                óL  € R p\        RR7      ;_uu_ 4       p\        R4       \        ^
^4       V P                  V. 4       \        ^
^^4       V P                  V. 4       \        ^
^^(R7       V P                  \	        V4      ^4       V P                  V^ ,          P
                  \        4       V P                  \        V^ ,          P                  4      V4       VP                  4        \        ^
^^2R7       V P                  V. 4       \        ^
^^^(4       V P                  \	        V4      ^4       V P                  V^ ,          P
                  \        4       V P                  \        V^ ,          P                  4      V4       RRR4       R#   + '       g   i     R# ; i)zzThe 'foo' parameter to twisted.python.test.test_deprecate.functionWithDeprecatedParameter was deprecated in Twisted 19.2.0Tr  r  )r5   )rR  N)
r   r   rS  rP   r{   rv   rz   r   rh   rÊ   )r    rh   Úwss   &  r!   Útest_deprecatedKeywordParameterÚ8DeprecatedDecoratorTests.test_deprecatedKeywordParameter‰  s;  € ð/ð 	ô  4×(Õ(¨BÜ˜Ô"ä+¨B°Ô3Ø×Ñ˜R Ô$ä+¨B°°BÔ7Ø×Ñ˜R Ô$ä+¨B°¸Õ;Ø×ÑœS ›W aÔ(Ø×Ñ˜R �UŸ^™^Ô-?Ô@Ø×ÑœS  A¥§¡Ó/°Ô9à�H‰HŒJÜ+¨B°¸Õ;Ø×Ñ˜R Ô$ä+¨B°°B¸Ô;Ø×ÑœS ›W aÔ(Ø×Ñ˜R �UŸ^™^Ô-?Ô@Ø×ÑœS  A¥§¡Ó/°Ô9÷+ )×(×(Ò(ús   —E1FÆF#	rc   N)r)   r*   r+   r,   r-   r[  r`  rd  rh  rk  ro  rs  r.   r/   r0   s   @r!   rU  rU     s3   ø‡ € ñò
ò:ò@:ò(:ò6
ò&
÷&:ð :r$   rU  c                   ó6   a € ] tR tRt o RtR tR tR tRtV t	R# )ÚAppendToDocstringTestsi©  z_
Test the _appendToDocstring function.

_appendToDocstring is used to add text to a docstring.
c                ó\   € R p\        VR4       V P                  RVP                  4       R# )z@
Appending to an empty docstring simply replaces the docstring.
c                  ó   € R # r   rc   rc   r$   r!   ÚnoDocstringÚGAppendToDocstringTests.test_appendToEmptyDocstring.<locals>.noDocstringµ  rØ   r$   úAppended text.N©r	   rP   r-   )r    ry  s   & r!   Útest_appendToEmptyDocstringÚ2AppendToDocstringTests.test_appendToEmptyDocstring°  s+   € ò
	ô 	˜;Ð(8Ô9Ø×ÑÐ)¨;×+>Ñ+>Ö?r$   c                óÐ   € R p\        VR4       V P                  . ROVP                  P                  4       4       V P	                  VP                  P                  R4      4       R# )aV  
Appending to a single line docstring places the message on a new line,
with a blank line separating it from the rest of the docstring.

The docstring ends with a newline, conforming to Twisted and PEP 8
standards. Unfortunately, the indentation is incorrect, since the
existing docstring doesn't have enough info to help us indent
properly.
c                 ó   € R# )ú;This doesn't comply with standards, but is here for a test.Nrc   rc   r$   r!   ÚsingleLineDocstringÚTAppendToDocstringTests.test_appendToSingleLineDocstring.<locals>.singleLineDocstringÆ  r  r$   r{  Ú
N)r�  r+  r{  )r	   rP   r-   rW  rï   rÝ   )r    r‚  s   & r!   Ú test_appendToSingleLineDocstringÚ7AppendToDocstringTests.test_appendToSingleLineDocstring»  s]   € ò	Nô 	Ð.Ð0@ÔAØ×Ñòð
  ×'Ñ'×2Ñ2Ó4ô	
ð 	�‰Ð+×3Ñ3×<Ñ<¸TÓBÖCr$   c                ó\   € R p\        VR4       V P                  RVP                  4       R# )zÖ
Appending to a multi-line docstring places the messade on a new line,
with a blank line separating it from the rest of the docstring.

Because we have multiple lines, we have enough information to do
indentation.
c                 ó   € R# )z!
This is a multi-line docstring.
Nrc   rc   r$   r!   ÚmultiLineDocstringÚRAppendToDocstringTests.test_appendToMultilineDocstring.<locals>.multiLineDocstringÝ  r  r$   r{  z1
This is a multi-line docstring.

Appended text.
Nr|  )r    r‰  s   & r!   Útest_appendToMultilineDocstringÚ6AppendToDocstringTests.test_appendToMultilineDocstringÔ  s/   € ò	ô
 	Ð-Ð/?Ô@Ø×ÑØLØ×&Ñ&ö	
r$   rc   N)
r)   r*   r+   r,   r-   r}  r…  r‹  r.   r/   r0   s   @r!   rv  rv  ©  s    ø‡ € ñò	@òD÷2
ð 
r$   rv  c                   óf   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tRtV tR# )ÚMutualArgumentExclusionTestsié  z*
Tests for L{mutuallyExclusiveArguments}.
c                ó°   € \        \        RR4      '       d!   \        \        P                  ! V4      W#4      # \	        \        P
                  ! V4      W#4      # )a‚  
Test an invocation of L{passed} with the given function, arguments, and
keyword arguments.

@param func: A function whose argspec will be inspected.
@type func: A callable.

@param args: The arguments which could be passed to C{func}.

@param kw: The keyword arguments which could be passed to C{func}.

@return: L{_passedSignature} or L{_passedArgSpec}'s return value
@rtype: L{dict}
Ú	signatureN)rG   Úinspectr   r�  r   Ú
getargspec©r    ÚfuncÚargsÚkws   &&*,r!   ÚcheckPassedÚ(MutualArgumentExclusionTests.checkPassedî  sE   € ô ”7˜K¨×.Ò.ä#¤G×$5Ò$5°dÓ$;¸TÓFÐFô "¤'×"4Ò"4°TÓ":¸DÓEÐEr$   c                óh   € R pV P                  V P                  V^^4      \        ^^R7      4       R# )zH
L{passed} identifies the arguments passed by a simple
positional test.
c                 ó   € R # r   rc   ©rO  rP  s   &&r!   r”  ÚGMutualArgumentExclusionTests.test_passed_simplePositional.<locals>.func
  rØ   r$   r›  N©rP   r—  r—   ©r    r”  s   & r!   Útest_passed_simplePositionalÚ9MutualArgumentExclusionTests.test_passed_simplePositional  s.   € ò	ð 	×Ñ˜×)Ñ)¨$°°1Ó5´t¸aÀ1´~ÖFr$   c                óT   € R pV P                  \        V P                  V^^^4       R# )zC
L{passed} raises a L{TypeError} if too many arguments are
passed.
c                 ó   € R # r   rc   r›  s   &&r!   r”  ÚBMutualArgumentExclusionTests.test_passed_tooManyArgs.<locals>.func  rØ   r$   N©rE   Ú	TypeErrorr—  rž  s   & r!   Útest_passed_tooManyArgsÚ4MutualArgumentExclusionTests.test_passed_tooManyArgs  s'   € ò	ð 	×Ñœ) T×%5Ñ%5°t¸QÀÀ1ÖEr$   c                óT   € R pV P                  \        V P                  V^^R7       R# )z[
L{passed} raises a L{TypeError} if a argument is passed both
positionally and by keyword.
c                 ó   € R # r   rc   ©rO  s   &r!   r”  ÚHMutualArgumentExclusionTests.test_passed_doublePassKeyword.<locals>.func   rØ   r$   rª  Nr¤  rž  s   & r!   Útest_passed_doublePassKeywordÚ:MutualArgumentExclusionTests.test_passed_doublePassKeyword  ó(   € ò	ð 	×Ñœ) T×%5Ñ%5°t¸QÀ!ÐÖDr$   c                óT   € R pV P                  \        V P                  V^^R7       R# )zl
L{passed} raises a L{TypeError} if a keyword argument not
present in the function's declaration is passed.
c                 ó   € R # r   rc   rª  s   &r!   r”  ÚIMutualArgumentExclusionTests.test_passed_unspecifiedKeyword.<locals>.func+  rØ   r$   )ÚzNr¤  rž  s   & r!   Útest_passed_unspecifiedKeywordÚ;MutualArgumentExclusionTests.test_passed_unspecifiedKeyword%  r®  r$   c                ój   € R pV P                  V P                  V^^^4      \        ^RR7      4       R# )zd
L{passed} places additional positional arguments into a tuple
under the name of the star argument.
c                 ó   € R # r   rc   r›  s   &*r!   r”  Ú;MutualArgumentExclusionTests.test_passed_star.<locals>.func6  rØ   r$   r›  N)é   é   r�  rž  s   & r!   Útest_passed_starÚ-MutualArgumentExclusionTests.test_passed_star0  s1   € ò	ð 	×Ñ˜×)Ñ)¨$°°1°aÓ8¼$ÀÀfÔ:MÖNr$   c                ó†   € R pV P                  V P                  V^^^^R7      \        ^\        ^^^R7      R7      4       R# )zV
Additional keyword arguments are passed as a dict to the star star
keyword argument.
c                 ó   € R # r   rc   r›  s   &,r!   r”  Ú?MutualArgumentExclusionTests.test_passed_starStar.<locals>.funcA  rØ   r$   )rÂ   Úyr²  r›  Nr�  rž  s   & r!   Útest_passed_starStarÚ1MutualArgumentExclusionTests.test_passed_starStar;  sC   € ò	ð 	×ÑØ×Ñ˜T 1¨¨Q°!ÐÓ4´d¸QÄ$ÈÈaÐSTÔBUÔ6Vö	
r$   c           	     ór   € RR lpV P                  V P                  V^^^R7      \        ^^^R7      4       R# )zX
The results of L{passed} only include arguments explicitly
passed, not default values.
c                 ó   € R # r   rc   ©rO  rP  rQ  ÚdÚes   &&&&&r!   r”  ÚFMutualArgumentExclusionTests.test_passed_noDefaultValues.<locals>.funcN  rØ   r$   )rÆ  )rO  rP  rÆ  N©é   r¸  r¹  r�  rž  s   & r!   Útest_passed_noDefaultValuesÚ8MutualArgumentExclusionTests.test_passed_noDefaultValuesH  s6   € ô	ð 	×Ñ˜×)Ñ)¨$°°1¸Ð)Ó:¼DÀ1ÈÈQÔ<OÖPr$   c                óÊ   € \        R.4      RR l4       pV P                  V! ^^4      ^
4       V P                  V! ^^^4      ^4       V P                  V! ^^^R7      ^4       R# )z…
L{mutuallyExclusiveArguments} does not interfere in its
decoratee's operation, either its receipt of arguments or its return
value.
c                 ó.   € W,           V,           V,           # r   rc   )rÂ   r¿  rO  rP  s   &&&&r!   r”  ÚMMutualArgumentExclusionTests.test_mutualExclusionPrimeDirective.<locals>.funcZ  s   € à•5˜1•9˜q•=Ð r$   ©rP  Nr›  ©r¹  é   )r   rP   rž  s   & r!   Ú"test_mutualExclusionPrimeDirectiveÚ?MutualArgumentExclusionTests.test_mutualExclusionPrimeDirectiveS  se   € ô 
% j \Ó	2ó	!ó 
3ð	!ð 	×Ñ™˜a › RÔ(Ø×Ñ™˜a  A›¨Ô+Ø×Ñ™˜a  aœ¨"Ö-r$   c                ód   € \        RR..4      RR l4       pV P                  \        V^^R7       R# )zy
L{mutuallyExclusiveArguments} raises a L{TypeError}n if its
decoratee is passed a pair of mutually exclusive arguments.
rO  rP  c                 ó   € W,           # r   rc   r›  s   &&r!   r”  ÚPMutualArgumentExclusionTests.test_mutualExclusionExcludesByKeyword.<locals>.funch  s	   € à•5ˆLr$   r›  NrÐ  )r   rE   r¥  rž  s   & r!   Ú%test_mutualExclusionExcludesByKeywordÚBMutualArgumentExclusionTests.test_mutualExclusionExcludesByKeywordb  s:   € ô 
% s¨C j \Ó	2ó	ó 
3ð	ð 	×Ñœ) T¨Q°!ÐÖ4r$   c                ó  €  ! R R4      p ! R R4      pR pV! ^^4       \         P                  ! V4      P                  pVP                  4       pV! RR4      VR&   V! V4      pV P	                  \
        \        VR	/ 4       R# )
z’
Create a fake signature with an invalid parameter
type to test error handling.  The valid parameter
types are specified in L{inspect.Parameter}.
c                   ó&   a € ] tR tRt o R tRtV tR# )ÚMMutualArgumentExclusionTests.test_invalidParameterType.<locals>.FakeSignatureiu  c                ó   € Wn         R # r   ©Ú
parameters)r    rÞ  s   &&r!   r"   ÚVMutualArgumentExclusionTests.test_invalidParameterType.<locals>.FakeSignature.__init__v  s   € Ø",–r$   rÝ  N©r)   r*   r+   r,   r"   r.   r/   r0   s   @r!   ÚFakeSignaturerÛ  u  s   ø‡ € ÷-ð -r$   rá  c                   ó&   a € ] tR tRt o R tRtV tR# )ÚMMutualArgumentExclusionTests.test_invalidParameterType.<locals>.FakeParameteriy  c                ó   € Wn         W n        R # r   )r|   Úkind)r    r|   rå  s   &&&r!   r"   ÚVMutualArgumentExclusionTests.test_invalidParameterType.<locals>.FakeParameter.__init__z  s   € Ø ”	Ø –	r$   )rå  r|   Nrà  r0   s   @r!   ÚFakeParameterrã  y  s   ø‡ € ÷!ð !r$   rç  c                 ó   € R # r   rc   r›  s   &&r!   r”  ÚDMutualArgumentExclusionTests.test_invalidParameterType.<locals>.func~  rØ   r$   ÚfakerQ  N©rÉ  r¸  )r‘  r�  rÞ  r§   rE   r¥  r   )r    rá  rç  r”  rÞ  ÚdummyParametersÚfakeSigs   &      r!   Útest_invalidParameterTypeÚ6MutualArgumentExclusionTests.test_invalidParameterTypen  sz   € ÷	-ñ 	-÷	!ñ 	!ò
	ñ 	ˆQ�Œ
Ü×&Ò& tÓ,×7Ñ7ˆ
Ø$Ÿ/™/Ó+ˆÙ,¨V°VÓ<ˆ˜ÑÙ Ó0ˆØ×Ñœ)Ô%5°wÀÈÖKr$   rc   N)r)   r*   r+   r,   r-   r—  rŸ  r¦  r¬  r³  rº  rÀ  rÊ  rÒ  r×  rî  r.   r/   r0   s   @r!   rŽ  rŽ  é  sO   ø‡ € ñòFò,	Gò	Fò	Eò	Eò	Oò
ò	Qò.ò
5÷Lð Lr$   rŽ  c                   ó0   a € ] tR tRt o RtR tR tRtV tR# )ÚKeywordOnlyTestsi‰  z$
Keyword only arguments (PEP 3102).
c                óB   € \        \        P                  ! V4      W#4      # )ah  
Test an invocation of L{passed} with the given function, arguments, and
keyword arguments.

@param func: A function whose argspec to pass to L{_passed}.
@type func: A callable.

@param args: The arguments which could be passed to L{func}.

@param kw: The keyword arguments which could be passed to L{func}.

@return: L{_passed}'s return value
@rtype: L{dict}
)r   r‘  r�  r“  s   &&*,r!   r—  ÚKeywordOnlyTests.checkPassedŽ  s   € ô  ¤× 1Ò 1°$Ó 7¸ÓBÐBr$   c                óœ  € RR/R lpRR/R lpV P                  V P                  V^^^4      \        RRR7      4       V P                  V P                  V^^^RR7      \        RRR7      4       V P                  V P                  V^^R^^^R7      \        RR^^^R	7      4       V P                  \        V P                  V^^R^^R
7       R# )zH
Keyword only arguments follow varargs.
They are specified in PEP 3102.
rP  Tc                ó   € R# )z5
b is a keyword-only argument, with a default value.
Nrc   )rP  rO  s   $*r!   Úfunc1Ú6KeywordOnlyTests.test_passedKeywordOnly.<locals>.func1¥  r  r$   c                ó   € R# )z@
b, c, d, e  are keyword-only arguments.
b has a default value.
Nrc   )rP  rQ  rÅ  rÆ  rO  s   $$$$*r!   Úfunc2Ú6KeywordOnlyTests.test_passedKeywordOnly.<locals>.func2ª  r  r$   r›  FrÏ  )rP  rQ  rÅ  rÆ  rÄ  )rP  rQ  rÅ  NrÈ  rë  )rP   r—  r—   rE   r¥  )r    rö  rù  s   &  r!   Útest_passedKeywordOnlyÚ'KeywordOnlyTests.test_passedKeywordOnlyŸ  sÙ   € ð	˜ô 	ð
	˜ô 	ð 	×Ñ˜×)Ñ)¨%°°A°qÓ9¼4À)ÈtÔ;TÔUØ×ÑØ×Ñ˜U A q¨!¨uÐÓ5´t¸iÈ5Ô7Qô	
ð 	×ÑØ×Ñ˜U A q¨E°Q¸!¸qÐÓAÜ�6˜U a¨1°Ô2ô	
ð 	×Ñœ) T×%5Ñ%5°u¸aÀÀeÈqÐTUÐÖVr$   rc   N)	r)   r*   r+   r,   r-   r—  rû  r.   r/   r0   s   @r!   rñ  rñ  ‰  s   ø‡ € ñòC÷"Wð Wr$   rñ  rÈ  )7r-   r‘  rˆ   r6   rþ   Úos.pathr   r   r   Ú	importlibr   ÚImportErrorÚincrementalr   Útwisted.pythonr   Útwisted.python.deprecater   r	   r
   r&  r   r   r   r   r   r   r   r   r   Útwisted.python.filepathr   Útwisted.python.runtimer   Útwisted.python.testr   Ú#twisted.python.test.modules_helpersr   Útwisted.trial.unittestr   r   r3   re   r�   rÆ   r
  r  r  rD  rF  rS  rU  rv  rŽ  rñ  rc   r$   r!   Ú<module>r     so  ðñó
 Û 
Û Û Ý ß 1ðÝ+õ  å $÷÷ ÷ ó õ -Ý +Ý 4Ý CÝ 6÷ñ ô"DYÐ*ô DYôN_@Ð2ô _@ôDl%Ð#6Ð8Kô l%ô^c
Ð0ô c
òLòôG
Ð2ô G
ñT ‰G�I˜q ! QÓ'Ó(÷ð ó )ð÷)ñ )ñ0 ™G I¨r°1°aÓ8¸%Ó@óó Aðôf:Ð2ô f:ôR=
Ð0ô =
ô@]LÐ#6ô ]Lô@/WÐ*ö /Wøðo# ô ØÓðús   ¢D& Ä&	D3Ä2D3