+
    Z8i                       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	H
t
 ^RIHt ^RIHt ]P                   ]	P"                  .]3,          t]P(                  ! ]4      tRs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 llt R&R R llt!R R lt"R R lt#R R lt$R  t%R! t&R" R# lt'R$ R% lt(R# )'z1
Core API functions and initialization routines.
)annotationsN)backendcredentials)fail)	platform_c                    V ^8  d   QhRRRR/# )   keyringbackend.KeyringBackendreturnNone )formats   ",lib/python3.14/site-packages/keyring/core.py__annotate__r      s      / D     c                `    \        V \        P                  4      '       g   \        R4      hV sR# )zSet current keyring backend.z1The keyring must be an instance of KeyringBackendN)
isinstancer   KeyringBackend	TypeError_keyring_backend)r	   s   &r   set_keyringr      s)     gw5566KLLr   c                   V ^8  d   QhRR/# )r   r   r
   r   )r   s   "r   r   r       s     A A+ Ar   c                 x    \         f   \        4        \        P                  ! \        P
                  \         4      # )zGet current keyring backend.)r   init_backendtypingcastr   r   r   r   r   get_keyringr       s%    ;;w--/?@@r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   '   s     O O Or   c                    \         P                  ! 4       p  \        P                  ! V 4       \        P
                  P                  V R4      p\        P
                  P                  V4      '       d   RV 2p\        V4      h\        VRRR7      ;_uu_ 4       pVP                  R4       RRR4       R#   \         d     Li ; i  + '       g   i     R# ; i)z
Configure the null keyring as the default.

>>> fs = getfixture('fs')
>>> disable()
>>> disable()
Traceback (most recent call last):
...
RuntimeError: Refusing to overwrite...
keyringrc.cfgzRefusing to overwrite wutf-8encodingz7[backend]
default-keyring=keyring.backends.null.KeyringN)platformconfig_rootosmakedirsOSErrorpathjoinexistsRuntimeErroropenwrite)rootfilenamemsgfiles       r   disabler4   '   s     !D
D ww||D/2H	ww~~h&xj13	hg	.	.$

MN 
/	.   
/	.	.s   B4 C4CCC	c               $    V ^8  d   QhRRRRRR/# )r   service_namestrusernamer   
str | Noner   )r   s   "r   r   r   ?   s!     > >s >c >j >r   c                4    \        4       P                  W4      # )z(Get password from the specified service.)r   get_passwordr6   r8   s   &&r   r;   r;   ?   s    =%%l==r   c               (    V ^8  d   QhRRRRRRRR/# )r   r6   r7   r8   passwordr   r   r   )r   s   "r   r   r   D   s.     A As Ac AS AT Ar   c                :    \        4       P                  WV4       R# )z3Set password for the user in the specified service.N)r   set_password)r6   r8   r>   s   &&&r   r@   r@   D   s    M|x@r   c               $    V ^8  d   QhRRRRRR/# )r   r6   r7   r8   r   r   r   )r   s   "r   r   r   I   s!     : :# : : :r   c                8    \        4       P                  W4       R# )z:Delete the password for the user in the specified service.N)r   delete_passwordr<   s   &&r   rC   rC   I   s    M!!,9r   c               $    V ^8  d   QhRRRRRR/# )r   r6   r7   r8   r9   r   zcredentials.Credential | Noner   )r   s   "r   r   r   N   s)     @ @@!+@"@r   c                4    \        4       P                  W4      # )z+Get a Credential for the specified service.)r   get_credentialr<   s   &&r   rF   rF   N   s     =''??r   c                   V ^8  d   QhRR/# )r   r   boolr   )r   s   "r   r   r   U   s     ! !D !r   c                     V P                   ^8  # )   )priority)r   s   &r   recommendedrL   U   s    q  r   c                   V ^8  d   QhRR/# r   limitzLimitCallable | Noner   )r   s   "r   r   r   Y   s     ( (, (r   c                .    \        \        V 4      4       R# )z
Load a detected backend.
N)r   _detect_backendrO   s   &r   r   r   Y   s     &'r   c                   V ^8  d   QhRR/# rN   r   )r   s   "r   r   r   `   s      / r   c                    V \         n        \        4       ;'       g_    \        4       ;'       gM    \	        \        V \         P                  ! 4       4      \        P                  ! 4       \         P                  R7      # )z
Return a keyring specified in the config file or infer the best available.

Limit, if supplied, should be a callable taking a backend and returning
True if that backend should be included for consideration.
)defaultkey)
r   _limitload_envload_configmaxfilterget_all_keyringr   Keyringby_priorityrR   s   &r   rQ   rQ   `   s[     GN
 	
 	
=	
 	
5'1134LLN##	
	r   c                    V ^8  d   QhRRRR/# )r   keyring_namer7   r   ztype[backend.KeyringBackend]r   )r   s   "r   r   r   v   s     ' 'c '.J 'r   c                    V P                  R4      w  rp\        V4       \        P                  V,          p\	        WC4      # )a  
Load the keyring class indicated by name.

These popular names are tested to ensure their presence.

>>> popular_names = [
...      'keyring.backends.Windows.WinVaultKeyring',
...      'keyring.backends.macOS.Keyring',
...      'keyring.backends.kwallet.DBusKeyring',
...      'keyring.backends.SecretService.Keyring',
...  ]
>>> list(map(_load_keyring_class, popular_names))
[...]
.)
rpartition
__import__sysmodulesgetattr)r`   module_namesep
class_namemodules   &    r   _load_keyring_classrl   v   s:     $0#:#:3#? Kj{[[%F6&&r   c                    V ^8  d   QhRRRR/# )r   r`   r7   r   r
   r   )r   s   "r   r   r      s      s '= r   c                >    \        V 4      pVP                   V! 4       # )z~
Load the specified keyring by name (a fully-qualified name to the
keyring, such as 'keyring.backends.file.PlaintextKeyring')
)rl   rK   )r`   class_s   & r   load_keyringrp      s    
 !.F
OO8Or   c                   V ^8  d   QhRR/# r   r   zbackend.KeyringBackend | Noner   )r   s   "r   r   r      s      / r   c                 h     \        \        P                  R,          4      #   \         d     R# i ; i)z6Load a keyring configured in the environment variable.PYTHON_KEYRING_BACKENDN)rp   r'   environKeyErrorr   r   r   rX   rX      s.    BJJ'?@AA s   " 11c                 :    \         P                  ! 4       R ,          # )r    )r%   r&   r   r   r   _config_pathrx      s    !O33r   c                H    V P                  4       '       g   \        V 4      hV # N)r,   FileNotFoundError)r*   s   &r   _ensure_pathr|      s    ;;==%%Kr   c                   V ^8  d   QhRR/# rr   r   )r   s   "r   r   r      s     & &2 &r   c                    \         P                  ! 4       p  V P                  \        \	        4       4      RR7       \        T 4        T P                  R4      '       d"   T P                  RR4      P                  4       pMR# \        T4      #   \
         d     R# i ; i  \         P                  \        3 d>    \        P                  ! R4      pTP                  RR\	        4        2,           4        R# i ; i)	z8Load a keyring using the config file in the config root.r"   r#   Nr   zdefault-keyringr	   z/Keyring config file contains incorrect values.
zConfig file: )configparserRawConfigParserreadr|   rx   r{   _load_keyring_pathhas_sectiongetstripNoOptionErrorImportErrorlogging	getLoggerwarningrp   )configr`   loggers      r   rY   rY      s     ))+FL07C vi((!::i1BCIIKL %%'   &&4 ""9->ln-./	
 s$   $B 7B BBAC65C6c                    V ^8  d   QhRRRR/# )r   r   zconfigparser.RawConfigParserr   r   r   )r   s   "r   r   r      s      ;  r   c                    V P                  RR4      P                  4       p\        P                  P	                  ^ \
        P                  P                  V4      4       R#   \        P                  \        P                  3 d     R# i ; i)z)load the keyring-path option (if present)r   zkeyring-pathN)
r   r   re   r*   insertr'   
expanduserr   r   NoSectionError)r   r*   s   & r   r   r      sd    zz)^4::<277--d34&&(C(CD s   AA! !%B
	B
rz   ))__doc__
__future__r   r   r   r'   re   r    r   r   backendsr   utilr   r%   Callabler   rH   LimitCallabler   __name__logr   r   r   r4   r;   r@   rC   rF   rL   r   rQ   rl   rp   rX   rx   r|   rY   r   r   r   r   <module>r      s    #   	 
  "  '!7!7 8$ >?! AO0>
A
:
@!(,'*4&8r   