
    -h\	                     V    S r SSKrSSKJr   " S S5      r\" 5       r\R                  rg)zRsupplies the "preloaded" registry to resolve circular module imports at
runtime.

    N   )compatc                   .    \ rS rSrSrSS jrS rS rSrg)	_ModuleRegistry   am  Registry of modules to load in a package init file.

To avoid potential thread safety issues for imports that are deferred
in a function, like https://bugs.python.org/issue38884, these modules
are added to the system module cache by importing them after the packages
has finished initialization.

A global instance is provided under the name :attr:`.preloaded`. Use
the function :func:`.preload_module` to register modules to load and
:meth:`.import_prefix` to load all the modules that start with the
given path.

While the modules are loaded in the global module cache, it's advisable
to access them using :attr:`.preloaded` to ensure that it was actually
registered. Each registered module is added to the instance ``__dict__``
in the form `<package>_<module>`, omitting ``sqlalchemy`` from the package
name. Example: ``sqlalchemy.sql.util`` becomes ``preloaded.sql_util``.
c                 .    [        5       U l        Xl        g N)setmodule_registryprefix)selfr   s     oC:\Users\ROHAN GUPTA\OneDrive\Desktop\mathbuddy-assessment\venv\Lib\site-packages\sqlalchemy/util/_preloaded.py__init___ModuleRegistry.__init__&   s    "u    c                 >    U R                   R                  U5        S $ )zAdds the specified modules to the list to load.

This method can be used both as a normal function and as a decorator.
No change is performed to the decorated object.
c                     U $ r	    )fns    r   <lambda>0_ModuleRegistry.preload_module.<locals>.<lambda>1   s    "r   )r   update)r   depss     r   preload_module_ModuleRegistry.preload_module*   s     	##D)r   c                    U R                    H  nU R                  (       a/  UR                  U R                  5      S   R                  SS5      nOUnU(       a  UR	                  U5      (       d  Md  X0R
                  ;  d  Mu  [        R                  " U[        5       [        5       5        [        R                  U   U R
                  U'   M     g)zLResolve all the modules in the registry that start with the
specified path.
._N)r   r   splitreplace
startswith__dict__r   import_globalslocalssysmodules)r   pathmodulekeys       r   import_prefix_ModuleRegistry.import_prefix3   s     **F{{ll4;;/3;;CEF--d33]]*vwy&(;%([[%8c" +r   )r   r   N)zsqlalchemy.)	__name__
__module____qualname____firstlineno____doc__r   r   r,   __static_attributes__r   r   r   r   r      s    &9r   r   )r2   r'    r   r   	preloadedr   r   r   r   <module>r6      s2   
  .9 .9b 	))r   