zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
U
¸ý°d§ã@s†dZddlmZddlZddlmZddlmZddlmZddlmZeded    efd
Z    erbdd l
m Z dd l
m Zdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZ ddlm!Z"ddlm#Z$ddlm%Z&ddlm'Z(ddlm)Z*ddlm+Z,ddlm-Z.ddlm/Z0ddlm1Z2ddlm3Z4ddlm5Z6dd lm7Z8dd!l9m:Z;dd"l9m<Z=dd#l9m>Z?dd$l9m@ZAdd%l9mBZCdd&l9mDZEdd'l9mFZGdd(l9mHZIdd)l9mJZKdd l9m7ZLe Z eZMeZNeZOeZPeZQe ZReZSeZ eZTe"ZUe$ZVe(ZWe&ZXe*ZYe,ZZe.Z[e0Z\e4Z]e6Z^e2Z_e8Z`e;Zae=Zbe?ZceAZdeCZeeGZfeKZgeEZheIZieLZjGd*d+„d+ƒZkekƒZleljmZmeljnZndS),zRsupplies the "preloaded" registry to resolve circular module imports at
runtime.
 
é)Ú annotationsN)ÚAny)ÚCallable)Ú TYPE_CHECKING)ÚTypeVarÚ_FN.)Úbound)Údialects)Úorm)Úcursor)Údefault)Ú
reflection)Úresult)Úurl)Ú
attributes)Úbase)Ú clsregistry)Údecl_api)Ú    decl_base)Ú
dependency)Údescriptor_props)Ú    mapperlib)Ú
properties)Ú relationships)Úsession)Ústate)Ú
strategies)Ústrategy_options)Úutil)Údefault_comparator)Údml)Úelements)Ú    functions)Únaming)Úschema)Ú
selectable)Úsqltypes)Ú
traversalsc@s:eZdZdZddd„Zdddœdd    „Zdd
d œd d „ZdS)Ú_ModuleRegistrya¥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``.
    ú sqlalchemy.cCstƒ|_||_dS©N)ÚsetÚmodule_registryÚprefix)Úselfr-©r/úPd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\sqlalchemy/util/preloaded.pyÚ__init__rsz_ModuleRegistry.__init__ÚstrzCallable[[_FN], _FN])ÚdepsÚreturncGs|j |¡dd„S)z¿Adds 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.
        cSs|Sr*r/)Úfnr/r/r0Ú<lambda>}óz0_ModuleRegistry.preload_module.<locals>.<lambda>)r,Úupdate)r.r3r/r/r0Úpreload_modulevs z_ModuleRegistry.preload_moduleÚNone)Úpathr4cCsv|jD]j}|jr*| |j¡d dd¡}n|}|r<| |¡r||jkrt|tƒtƒƒt    j
||j|<tƒ|<qdS)z\Resolve all the modules in the registry that start with the
        specified path.
        éÿÿÿÿÚ.Ú_N) r,r-ÚsplitÚreplaceÚ
startswithÚ__dict__Ú
__import__ÚglobalsÚlocalsÚsysÚmodules)r.r;ÚmoduleÚkeyr/r/r0Ú import_prefixs
ÿÿþz_ModuleRegistry.import_prefixN)r))Ú__name__Ú
__module__Ú __qualname__Ú__doc__r1r9rJr/r/r/r0r(^s
    r()orNÚ
__future__rrFÚtypingrrrrrZ
sqlalchemyr    Ú    _dialectsr
Z_ormZsqlalchemy.enginer Z_engine_cursorr Z_engine_defaultr Z_engine_reflectionrZ_engine_resultrZ _engine_urlZsqlalchemy.ormrZ_orm_attributesrZ    _orm_baserZ_orm_clsregistryrZ _orm_decl_apirZ_orm_decl_baserZ_orm_dependencyrZ_orm_descriptor_propsrZ _orm_mapperrZ_orm_propertiesrZ_orm_relationshipsrZ _orm_sessionrZ
_orm_staterZ_orm_strategiesrZ_orm_strategy_optionsrZ    _orm_utilZsqlalchemy.sqlrZ_sql_default_comparatorr Z_sql_dmlr!Z _sql_elementsr"Z_sql_functionsr#Z _sql_namingr$Z _sql_schemar%Z_sql_selectabler&Z _sql_sqltypesr'Z_sql_traversalsZ    _sql_utilZ engine_cursorZengine_defaultZengine_reflectionZ engine_resultZ
engine_urlZorm_clsregistryZorm_baseZorm_attributesZ orm_decl_apiZ orm_decl_baseZorm_descriptor_propsZorm_dependencyZ
orm_mapperZorm_propertiesZorm_relationshipsZ orm_sessionZorm_strategiesZorm_strategy_optionsZ    orm_stateZorm_utilZsql_default_comparatorZsql_dmlZ sql_elementsZ sql_functionsZ
sql_namingZsql_selectableZsql_traversalsZ
sql_schemaZ sql_sqltypesZsql_utilr(Z_regr9rJr/r/r/r0Ú<module>    s˜                                     1