U a" @s ddlmZddlZddlZddlZddlZddlZddlmZddl m Z ddl m Z ddl Z ddlmZmZmZmZddlmZddl mZmZmZdd lmZdd lmZdd lmZd d lm Z m!Z!m"Z"d dl#m$Z$d dl#m%Z%d dl&m'Z'zddl(m)Z)ddl(m*Z*Wn.e+k r>ddl,m)Z)ddl,m*Z*YnXzddl-m.Z/WnJe+k rzddl m0Z/Wn"e+k rddl1m0Z/YnXYnXdZ2ej3dkrej4dkrej5Z6nej7Z6nejZ6eZ8e89dZ:e89dZ;ddZd d!Z?d"d#Z@d$d%ZAGd&d'd'eBZCd(d)ZDGd*d+d+eZEGd,d-d-eFZGGd.d/d/eFZHd0d1ZIGd2d3d3eFZJGd4d5d5ejKZLGd6d7d7eFZMd8d9ZNGd:d;d;eFZOdd?d?eFZQGd@dAdAeFZRGdBdCdCe$ZSGdDdEdEeTZUeVdFeUdS)G)absolute_importN)ceil) itemgetter)Lock)_app_ctx_stackabort current_apprequest) Namespace)eventinspectorm)make_url)UnmappedClassError)Session) itervalues string_typesxrange) DefaultMeta)Model)utils)declarative_base)DeclarativeMeta) getcurrent) get_identz2.5.1win32)rzmodels-committedzbefore-models-committedcKsHz|jf|}Wn2tk rB|D]\}}t|||q(YnX|SN)setAttributeErroritemssetattr)urlkwargskeyvaluer'ZC:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-eq0tl_ss\flask_sqlalchemy\__init__.py _sa_url_set=s r)cKs4t|j}|D]\}}|||qt||dS)N)query)dictr*r! setdefaultr))r#r$r*r%r&r'r'r(_sa_url_query_setdefaultHs r-csfdd}|S)Ncsft|dkr6t|djr6|djf|dd}|ddpDi}|dd||d<tj||S)Nrrinfobind_key)len isinstanceZColumnmetadatapopr, sqlalchemyTable)argsr$r.dbr'r( _make_tableRs  z _make_table.._make_tabler')r8r9r'r7r(r9Qs r9cCsd|kr||d<dS)N query_classr')dclsr'r'r(_set_default_query_class\sr=cstfdd}|S)NcsDt|d|kr:|d}t|tr,|if}t|d||S)Nbackrefr)r=r1r)r6r$r>r<fnr'r(newfnbs  z-_wrap_with_default_query_class..newfn) functoolswraps)r@r<rAr'r?r(_wrap_with_default_query_classasrDcCsvttjfD],}|jD] }t||st||t||qq t||_t|j ||_ t|j ||_ t|j ||_ t |_ dSr) r4r __all__hasattrr"getattrr9r5rDZ relationshipZrelationZdynamic_loaderr )objr<moduler%r'r'r(_include_sqlalchemyns   rJc@s\eZdZeedZeedZeedZeedZeedZ eddZ dd Z d S) _DebugQueryTuplerrrcCs |j|jSr)end_time start_timeselfr'r'r(durationsz_DebugQueryTuple.durationcCsd|j|j|jfS)Nz3) statement parametersrRrPr'r'r(__repr__s z_DebugQueryTuple.__repr__N) __name__ __module__ __qualname__propertyrrSrTrOrNcontextrRrUr'r'r'r(rK{s      rKcCsbtd}|jdk r^|jd}|rV||ks:||drV|jj}d|jj|j |fS|j}q dS)NrrV.z %s:%s (%s)z ) sys _getframef_back f_globalsget startswithf_codeco_name co_filenamef_lineno)Zapp_pathfrmnamefuncnamer'r'r(_calling_contexts   ric@s$eZdZdZd ddZd ddZdS) SignallingSessionaThe signalling session is the default session that Flask-SQLAlchemy uses. It extends the default session system with bind selection and modification tracking. If you want to use a different session you can override the :meth:`SQLAlchemy.create_session` function. .. versionadded:: 2.0 .. versionadded:: 2.1 The `binds` option was added, which allows a session to be joined to an external transaction. FTc Ksr||_}|jd}|ddp(|j}|d||}|dksH|rRt|tj |f||||d|dS)NSQLALCHEMY_TRACK_MODIFICATIONSbindbinds) autocommit autoflushrlrm) get_appappconfigr3engine get_binds_SessionSignalEventsregister SessionBase__init__) rQr8rnrooptionsrqtrack_modificationsrlrmr'r'r(rxs    zSignallingSession.__init__NcCsv|dk rhz |j}Wntk r,|j}YnXt|di}|d}|dk rht|j}|jj|j|dSt |||S)zuReturn the engine or connection for a given model or table, using the ``__bind_key__`` if it is set. Nr.r/)rl) persist_selectabler Z mapped_tablerGr` get_staterqr8 get_enginerwget_bind)rQmapperZclauser{r.r/stater'r'r(r~s     zSignallingSession.get_bind)FT)NN)rVrWrX__doc__rxr~r'r'r'r(rjs rjc@sVeZdZeddZeddZedddZedd Zed d Z ed d Z dS)rucCsdt|dsi|_t|d|jt|d|jt|d|jt|d|jt|d|jdSN_model_changesZ before_flush before_commit after_commitafter_rollback)rFrr listen record_opsrrrr<sessionr'r'r(rvs z_SessionSignalEvents.registercCsbt|dr|`t|d|jt|d|jt|d|jt|d|jt|d|jdSr)rFrr removerrrrrr'r'r( unregisters z_SessionSignalEvents.unregisterNc Cs~z |j}Wntk r YdSX|jdf|jdf|jdffD]:\}}|D],}t|}|jrb|jnt|}||f||<qJq>dS)Ninsertupdatedelete) rr newZdirtyZdeletedr Z has_identityZ identity_keyid) rZ flush_contextZ instancesr;targets operationtargetrr%r'r'r(rs $z_SessionSignalEvents.record_opscCsBz |j}Wntk r YdSX|r>tj|jt|ddSN)changes)rr before_models_committedsendrqlistvaluesrr;r'r'r(rs  z"_SessionSignalEvents.before_commitcCsJz |j}Wntk r YdSX|rFtj|jt|d|dSr)rr models_committedrrqrrclearrr'r'r(rs z!_SessionSignalEvents.after_commitcCs.z |j}Wntk r YdSX|dSr)rr rrr'r'r(r s  z#_SessionSignalEvents.after_rollback)NN) rVrWrX classmethodrvr staticmethodrrrrr'r'r'r(rus     ruc@s0eZdZdZddZddZddZdd Zd S) _EngineDebuggingSignalEventszTSets up handlers for two events that let us track the execution time of queries.cCs||_||_dSr)rs app_package)rQrs import_namer'r'r(rxsz%_EngineDebuggingSignalEvents.__init__cCs(t|jd|jt|jd|jdS)Nbefore_cursor_executeafter_cursor_execute)r rrsrrrPr'r'r(rvsz%_EngineDebuggingSignalEvents.registercCstr t|_dSr)r_timer_query_start_time)rQconncursorrSrTrZ executemanyr'r'r(r#sz2_EngineDebuggingSignalEvents.before_cursor_executec CsXtrTz tjj}Wn tk r0g}tj_YnX|t|||jtt |j fdSr) rrtopsqlalchemy_queriesr appendrKrrrir)rQrrrSrTrZrZqueriesr'r'r(r)s z1_EngineDebuggingSignalEvents.after_cursor_executeN)rVrWrXrrxrvrrr'r'r'r(rs rcCsttjdgS)aIn debug mode Flask-SQLAlchemy will log all the SQL queries sent to the database. This information is available until the end of request which makes it possible to easily ensure that the SQL generated is the one expected on errors or in unittesting. If you don't want to enable the DEBUG mode for your unittests you can also enable the query recording by setting the ``'SQLALCHEMY_RECORD_QUERIES'`` config variable to `True`. This is automatically enabled if Flask is in testing mode. The value returned will be a list of named tuples with the following attributes: `statement` The SQL statement issued `parameters` The parameters for the SQL statement `start_time` / `end_time` Time the query started / the results arrived. Please keep in mind that the timer function used depends on your platform. These values are only useful for sorting or comparing. They do not necessarily represent an absolute timestamp. `duration` Time the query took in seconds `context` A string giving a rough estimation of where in your application query was issued. The exact format is undefined so don't try to reconstruct filename or function name. r)rGrrr'r'r'r(get_debug_queries8s rc@sreZdZdZddZeddZdddZed d Zed d Z dd dZ eddZ eddZ dddZ dS) Paginationa>Internal helper class returned by :meth:`BaseQuery.paginate`. You can also construct it from any other SQLAlchemy query object if you are working with other libraries. Additionally it is possible to pass `None` as query object in which case the :meth:`prev` and :meth:`next` will no longer work. cCs"||_||_||_||_||_dSr)r*pageper_pagetotalr!)rQr*rrrr!r'r'r(rxcs zPagination.__init__cCs,|jdkrd}ntt|jt|j}|S)zThe total number of pagesr)rintrrfloat)rQpagesr'r'r(rps zPagination.pagesFcCs*|jdk std|j|jd|j|S)z;Returns a :class:`Pagination` object for the previous page.N2a query object is required for this method to workrr*AssertionErrorpaginaterrrQ error_outr'r'r(prevyszPagination.prevcCs|js dS|jdS)zNumber of the previous page.Nr)has_prevrrPr'r'r(prev_numszPagination.prev_numcCs |jdkS)zTrue if a previous page existsr)rrPr'r'r(rszPagination.has_prevcCs*|jdk std|j|jd|j|S)z7Returns a :class:`Pagination` object for the next page.Nrrrrr'r'r(nextszPagination.nextcCs |j|jkS)zTrue if a next page exists.)rrrPr'r'r(has_nextszPagination.has_nextcCs|js dS|jdS)zNumber of the next pageNr)rrrPr'r'r(next_numszPagination.next_numrLccspd}td|jdD]V}||ksN||j|dkr@||j|ksN||j|kr|d|kr`dV|V|}qdS)uIterates over the page numbers in the pagination. The four parameters control the thresholds how many numbers should be produced from the sides. Skipped page numbers are represented as `None`. This is how you could render such a pagination in the templates: .. sourcecode:: html+jinja {% macro render_pagination(pagination, endpoint) %} {% endmacro %} rrN)rrr)rQZ left_edgeZ left_currentZ right_currentZ right_edgelastnumr'r'r( iter_pagess   zPagination.iter_pagesN)F)F)rLrLrrL)rVrWrXrrxrYrrrrrrrrr'r'r'r(r[s$        rc@s.eZdZdZd ddZd ddZd dd ZdS) BaseQueryaZSQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with convenience methods for querying in a web application. This is the default :attr:`~Model.query` object used for models, and exposed as :attr:`~SQLAlchemy.Query`. Override the query class for an individual model by subclassing this and setting :attr:`~Model.query_class`. NcCs"||}|dkrtd|d|S)zPLike :meth:`get` but aborts with 404 if not found instead of returning ``None``.N description)r`r)rQidentrrvr'r'r( get_or_404s  zBaseQuery.get_or_404cCs |}|dkrtd|d|S)zRLike :meth:`first` but aborts with 404 if not found instead of returning ``None``.Nrr)firstr)rQrrr'r'r( first_or_404s zBaseQuery.first_or_404Tc CsLtr|dkrLzttjdd}Wn(ttfk rJ|rBtdd}YnX|dkrzttjdd}Wqttfk r|rtdd}YqXn|dkrd}|dkrd}|dk rt||}|dkr|rtdnd}|dkr|rtdnd}|| |d| }|s.|dkr.|r.td| d }t |||||S)aReturns ``per_page`` items from page ``page``. If ``page`` or ``per_page`` are ``None``, they will be retrieved from the request query. If ``max_per_page`` is specified, ``per_page`` will be limited to that value. If there is no request or they aren't in the query, they default to 1 and 20 respectively. When ``error_out`` is ``True`` (default), the following rules will cause a 404 response: * No items are found and ``page`` is not 1. * ``page`` is less than 1, or ``per_page`` is negative. * ``page`` or ``per_page`` are not ints. When ``error_out`` is ``False``, ``page`` and ``per_page`` default to 1 and 20 respectively. Returns a :class:`Pagination` object. Nrrrrr)r rr6r` TypeError ValueErrorrminlimitoffsetallZorder_bycountr)rQrrrZ max_per_pager!rr'r'r(rsD     zBaseQuery.paginate)N)N)NNTN)rVrWrXrrrrr'r'r'r(rs  rc@seZdZddZddZdS)_QueryPropertycCs ||_dSr)sa)rQrr'r'r(rx!sz_QueryProperty.__init__cCsDz(t|}|r&|j||jdWSWntk r>YdSXdS)N)r)r Z class_mapperr:rrr)rQrHtyperr'r'r(__get__$s  z_QueryProperty.__get__N)rVrWrXrxrr'r'r'r(r srcCs0|jr dS|jd}|dk r |St|jdS)NTSQLALCHEMY_RECORD_QUERIESZTESTING)debugrrboolr`)rqZrqr'r'r(_record_queries-s  rc@s.eZdZd ddZddZddZdd ZdS) _EngineConnectorNcCs*||_||_d|_d|_||_t|_dSr)_sa_app_engine_connected_for_bindr_lock)rQrrqrlr'r'r(rx8s z_EngineConnector.__init__cCsJ|jdkr|jjdS|jjdp&d}|j|ks@td|j||jS)NSQLALCHEMY_DATABASE_URISQLALCHEMY_BINDSr'zPBind %r is not specified. Set it in the SQLALCHEMY_BINDS configuration variable)rrrrr`r)rQrmr'r'r(get_uri@s   z_EngineConnector.get_uric Cs|j|}|jjd}||f|jkr<|jW5QRSt|}|||\}}|j |||_}t |jrt |j|jj  ||f|_|W5QRSQRXdS)NSQLALCHEMY_ECHO)rrrrrrrr get_optionsr create_enginerrrrv)rQuriechosa_urlryrr'r'r(r}Is   z_EngineConnector.get_enginecCs^i}|j|j|}|j|j||\}}|r6||d<||jjd||jj||fS)NrSQLALCHEMY_ENGINE_OPTIONS)rapply_pool_defaultsrapply_driver_hacksrrr_engine_options)rQrrryr'r'r(r\sz_EngineConnector.get_options)N)rVrWrXrxrr}rr'r'r'r(r6s  rcCsd|jkstd|jdS)z"Gets the state for the applicationr4zsThe sqlalchemy extension was not registered to the current application. Please make sure to call init_app() first.) extensionsr)rqr'r'r(r|os r|c@seZdZdZddZdS)_SQLAlchemyStatez0Remembers configuration for the (db, app) tuple.cCs||_i|_dSr)r8 connectors)rQr8r'r'r(rxzsz_SQLAlchemyState.__init__N)rVrWrXrrxr'r'r'r(rwsrc@seZdZdZdZddddeedfddZeddZ d.dd Z d d Z d/d d Z ddZ ddZddZeddZd0ddZd1ddZddZd2ddZd3ddZd4d d!Zd5d#d$Zd6d&d'Zd7d(d)Zd8d*d+Zd,d-ZdS)9 SQLAlchemyapThis class is used to control the SQLAlchemy integration to one or more Flask applications. Depending on how you initialize the object it is usable right away or will attach as needed to a Flask application. There are two usage modes which work very similarly. One is binding the instance to a very specific Flask application:: app = Flask(__name__) db = SQLAlchemy(app) The second possibility is to create the object once and configure the application later to support it:: db = SQLAlchemy() def create_app(): app = Flask(__name__) db.init_app(app) return app The difference between the two is that in the first case methods like :meth:`create_all` and :meth:`drop_all` will work all the time but in the second case a :meth:`flask.Flask.app_context` has to exist. By default Flask-SQLAlchemy will apply some backend-specific settings to improve your experience with them. As of SQLAlchemy 0.6 SQLAlchemy will probe the library for native unicode support. If it detects unicode it will let the library handle that, otherwise do that itself. Sometimes this detection can fail in which case you might want to set ``use_native_unicode`` (or the ``SQLALCHEMY_NATIVE_UNICODE`` configuration key) to ``False``. Note that the configuration key overrides the value you pass to the constructor. Direct support for ``use_native_unicode`` and SQLALCHEMY_NATIVE_UNICODE are deprecated as of v2.4 and will be removed in v3.0. ``engine_options`` and ``SQLALCHEMY_ENGINE_OPTIONS`` may be used instead. This class also provides access to all the SQLAlchemy functions and classes from the :mod:`sqlalchemy` and :mod:`sqlalchemy.orm` modules. So you can declare models like this:: class User(db.Model): username = db.Column(db.String(80), unique=True) pw_hash = db.Column(db.String(80)) You can still use :mod:`sqlalchemy` and :mod:`sqlalchemy.orm` directly, but note that Flask-SQLAlchemy customizations are available only through an instance of this :class:`SQLAlchemy` class. Query classes default to :class:`BaseQuery` for `db.Query`, `db.Model.query_class`, and the default query_class for `db.relationship` and `db.backref`. If you use these interfaces through :mod:`sqlalchemy` and :mod:`sqlalchemy.orm` directly, the default query class will be that of :mod:`sqlalchemy`. .. admonition:: Check types carefully Don't perform type or `isinstance` checks against `db.Table`, which emulates `Table` behavior but is not a class. `db.Table` exposes the `Table` interface, but is a function which allows omission of metadata. The ``session_options`` parameter, if provided, is a dict of parameters to be passed to the session constructor. See :class:`~sqlalchemy.orm.session.Session` for the standard options. The ``engine_options`` parameter, if provided, is a dict of parameters to be passed to create engine. See :func:`~sqlalchemy.create_engine` for the standard options. The values given here will be merged with and override anything set in the ``'SQLALCHEMY_ENGINE_OPTIONS'`` config variable or othewise set by this library. .. versionadded:: 0.10 The `session_options` parameter was added. .. versionadded:: 0.16 `scopefunc` is now accepted on `session_options`. It allows specifying a custom function which will define the SQLAlchemy session's scoping. .. versionadded:: 2.1 The `metadata` parameter was added. This allows for setting custom naming conventions among other, non-trivial things. The `query_class` parameter was added, to allow customisation of the query class, in place of the default of :class:`BaseQuery`. The `model_class` parameter was added, which allows a custom model class to be used in place of :class:`Model`. .. versionchanged:: 2.1 Utilise the same query class across `session`, `Model.query` and `Query`. .. versionadded:: 2.4 The `engine_options` parameter was added. .. versionchanged:: 2.4 The `use_native_unicode` parameter was deprecated. .. versionchanged:: 2.4.3 ``COMMIT_ON_TEARDOWN`` is deprecated and will be removed in version 3.1. Call ``db.session.commit()`` directly instead. NTcCs^||_||_|||_||||_t|_||_|p:i|_ t |||dk rZ| |dSr) use_native_unicodeQuerycreate_scoped_sessionrmake_declarative_baserr _engine_lockrqrrJinit_app)rQrqrZsession_optionsr2r:Z model_classZengine_optionsr'r'r(rxs   zSQLAlchemy.__init__cCs|jjS)z*The metadata associated with ``db.Model``.)rr2rPr'r'r(r2szSQLAlchemy.metadatacCs:|dkr i}|dt}|d|jtj|||dS)a-Create a :class:`~sqlalchemy.orm.scoping.scoped_session` on the factory from :meth:`create_session`. An extra key ``'scopefunc'`` can be set on the ``options`` dict to specify a custom scope function. If it's not provided, Flask's app context stack identity is used. This will ensure that sessions are created and removed with the request/response cycle, and should be fine in most cases. :param options: dict of keyword arguments passed to session class in ``create_session`` N scopefuncZ query_cls)r)r3 _ident_funcr,rr Zscoped_sessioncreate_session)rQryrr'r'r(rs z SQLAlchemy.create_scoped_sessioncCstjft|d|S)aCreate the session factory used by :meth:`create_scoped_session`. The factory **must** return an object that SQLAlchemy recognizes as a session, or registering session events may raise an exception. Valid factories include a :class:`~sqlalchemy.orm.session.Session` class or a :class:`~sqlalchemy.orm.session.sessionmaker`. The default implementation creates a ``sessionmaker`` for :class:`SignallingSession`. :param options: dict of keyword arguments passed to session class )class_r8)r Z sessionmakerrj)rQryr'r'r(rszSQLAlchemy.create_sessioncCsTt|tst|d|td}|dk r2|j|k r2||_t|ddsF|j|_t||_ |S)a|Creates the declarative base that all models will inherit from. :param model: base model class (or a tuple of base classes) to pass to :func:`~sqlalchemy.ext.declarative.declarative_base`. Or a class returned from ``declarative_base``, in which case a new base class is not created. :param metadata: :class:`~sqlalchemy.MetaData` instance to use, or none to use SQLAlchemy's default. .. versionchanged 2.3.0:: ``model`` can be an existing declarative base in order to support complex customization such as changing the metaclass. r)r<rgr2 metaclassNr:) r1rrrr2rGrr:rr*)rQmodelr2r'r'r(r(s    z SQLAlchemy.make_declarative_basecsJdjkrdjkrtdjddjddjddjddjd djd djd djd djd djddjdd}jdi|dkrttdtjdd dtjdd dtjdd dtjdd dtjd<j fdd}dS)zThis callback can be used to initialize an application for the use with this database setup. Never use a database in the context of an application not initialized that way or connections will leak. rrzxNeither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. Defaulting SQLALCHEMY_DATABASE_URI to "sqlite:///:memory:".zsqlite:///:memory:NSQLALCHEMY_NATIVE_UNICODErFrSQLALCHEMY_POOL_SIZESQLALCHEMY_POOL_TIMEOUTSQLALCHEMY_POOL_RECYCLESQLALCHEMY_MAX_OVERFLOWSQLALCHEMY_COMMIT_ON_TEARDOWNrkrzSQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.z3.0 pool_size pool_timeout pool_recycle max_overflowr4cs6jdr(tdt|dkr(jj|S)Nrzt'COMMIT_ON_TEARDOWN' is deprecated and will be removed in version 3.1. Call 'db.session.commit()'` directly instead.)rrwarningswarnDeprecationWarningrcommitr)Zresponse_or_excrqrQr'r(shutdown_sessionvs   z-SQLAlchemy.init_app..shutdown_session) rrr r r,FSADeprecationWarningrZengine_config_warningrrZteardown_appcontext)rQrqrzrr'rr(rIsBzSQLAlchemy.init_appcs:fdd}|dd|dd|dd|d d S) z .. versionchanged:: 2.5 Returns the ``options`` dict, for consistency with :meth:`apply_driver_hacks`. csj|}|dk r||<dSr)rr)Z optionkeyZ configkeyr&rqryr'r( _setdefaults z3SQLAlchemy.apply_pool_defaults.._setdefaultrrr rr rr rr')rQrqryrr'rr(rs     zSQLAlchemy.apply_pool_defaultsc Cs6|jdrengine mapping. This is suitable for use of sessionmaker(binds=db.get_binds(app)). Nrr'c3s|]}|fVqdSrr').0r$rsr'r( +sz'SQLAlchemy.get_binds..)rprrrr`r}r%rr+)rQrqrmretvalrlr"r'r'r(rt s   zSQLAlchemy.get_bindsFc Cs||}|dkr.dgt|jdp&d}nt|ts@|dkrH|g}n|}|D]F}i}|sn||}||d<t|jj |}|fd| ||i|qPdS)NrErr'r"rl) rprrrr`r1rr%rGrr2r}) rQrqrlr skip_tablesrmextrar"opr'r'r(_execute_for_all_tables.s  z"SQLAlchemy._execute_for_all_tablesrEcCs|||ddS)z_Creates all tables. .. versionchanged:: 0.12 Parameters were added create_allNr-rQrlrqr'r'r(r.@szSQLAlchemy.create_allcCs|||ddS)z]Drops all tables. .. versionchanged:: 0.12 Parameters were added drop_allNr/r0r'r'r(r1HszSQLAlchemy.drop_allcCs|j||ddddS)znReflects tables from the database. .. versionchanged:: 0.12 Parameters were added reflectT)r*Nr/r0r'r'r(r2PszSQLAlchemy.reflectcCs"d|jj|jstr|jjndfS)Nz<%s engine=%r>) __class__rVrqrrsr#rPr'r'r(rUXszSQLAlchemy.__repr__)N)N)NN)NN)N)N)N)F)rEN)rEN)rEN)rVrWrXrrrrrxrYr2rrrrrrrsr!r}rrpr%rtr-r.r1r2rUr'r'r'r(rs:i    !=H         rcseZdZfddZZS)_BoundDeclarativeMetacs*tjtdddtt||||dS)Nz_"_BoundDeclarativeMeta" has been renamed to "DefaultMeta". The old name will be removed in 3.0.r) stacklevel)r r rsuperr4rx)r<rgbasesr;r3r'r(rx`s z_BoundDeclarativeMeta.__init__)rVrWrXrx __classcell__r'r'r8r(r4_sr4c@s eZdZdS)rN)rVrWrXr'r'r'r(rhsralways)W __future__rrBrr\timer mathroperatorr threadingrr4Zflaskrrrr Z flask.signalsr r r r Zsqlalchemy.engine.urlrZsqlalchemy.orm.excrZsqlalchemy.orm.sessionrrw_compatrrrrrrrrZsqlalchemy.ormrr ImportErrorZsqlalchemy.ext.declarativeZgreenletrrrthread __version__platform version_info perf_counterrZclockZ_signalssignalrrr)r-r9r=rDrJtuplerKrirjobjectrurrrrrrrrr|rrr4rr simplefilterr'r'r'r(s                      3C%#g^  9c