/
opt
/
alt
/
python27
/
lib64
/
python2.7
/
site-packages
/
sqlalchemy
/
orm
/
/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm
mkdir
upload
Name
Size
Mode
Actions
attributes.py
67137
0644
edit
dl
rm
attributes.pyc
62129
0644
edit
dl
rm
attributes.pyo
61851
0644
edit
dl
rm
base.py
14864
0644
edit
dl
rm
base.pyc
15558
0644
edit
dl
rm
base.pyo
15558
0644
edit
dl
rm
collections.py
52614
0644
edit
dl
rm
collections.pyc
63448
0644
edit
dl
rm
collections.pyo
63226
0644
edit
dl
rm
dependency.py
46556
0644
edit
dl
rm
dependency.pyc
29624
0644
edit
dl
rm
dependency.pyo
29533
0644
edit
dl
rm
deprecated_interfaces.py
20751
0644
edit
dl
rm
deprecated_interfaces.pyc
22776
0644
edit
dl
rm
deprecated_interfaces.pyo
22776
0644
edit
dl
rm
descriptor_props.py
28201
0644
edit
dl
rm
descriptor_props.pyc
32216
0644
edit
dl
rm
descriptor_props.pyo
32216
0644
edit
dl
rm
dynamic.py
14666
0644
edit
dl
rm
dynamic.pyc
15339
0644
edit
dl
rm
dynamic.pyo
15339
0644
edit
dl
rm
evaluator.py
5441
0644
edit
dl
rm
evaluator.pyc
7819
0644
edit
dl
rm
evaluator.pyo
7819
0644
edit
dl
rm
events.py
94409
0644
edit
dl
rm
events.pyc
103665
0644
edit
dl
rm
events.pyo
103665
0644
edit
dl
rm
exc.py
6610
0644
edit
dl
rm
exc.pyc
8838
0644
edit
dl
rm
exc.pyo
8838
0644
edit
dl
rm
identity.py
10299
0644
edit
dl
rm
identity.pyc
15109
0644
edit
dl
rm
identity.pyo
15109
0644
edit
dl
rm
instrumentation.py
18131
0644
edit
dl
rm
instrumentation.pyc
21633
0644
edit
dl
rm
instrumentation.pyo
21544
0644
edit
dl
rm
interfaces.py
25766
0644
edit
dl
rm
interfaces.pyc
30234
0644
edit
dl
rm
interfaces.pyo
30234
0644
edit
dl
rm
loading.py
32236
0644
edit
dl
rm
loading.pyc
20574
0644
edit
dl
rm
loading.pyo
20549
0644
edit
dl
rm
mapper.py
128344
0644
edit
dl
rm
mapper.pyc
100412
0644
edit
dl
rm
mapper.pyo
100198
0644
edit
dl
rm
path_registry.py
9262
0644
edit
dl
rm
path_registry.pyc
13256
0644
edit
dl
rm
path_registry.pyo
13256
0644
edit
dl
rm
persistence.py
65652
0644
edit
dl
rm
persistence.pyc
46786
0644
edit
dl
rm
persistence.pyo
46786
0644
edit
dl
rm
properties.py
11043
0644
edit
dl
rm
properties.pyc
12111
0644
edit
dl
rm
properties.pyo
12111
0644
edit
dl
rm
query.py
172590
0644
edit
dl
rm
query.pyc
155014
0644
edit
dl
rm
query.pyo
154936
0644
edit
dl
rm
relationships.py
124442
0644
edit
dl
rm
relationships.pyc
105318
0644
edit
dl
rm
relationships.pyo
105293
0644
edit
dl
rm
scoping.py
6393
0644
edit
dl
rm
scoping.pyc
7680
0644
edit
dl
rm
scoping.pyo
7680
0644
edit
dl
rm
session.py
128754
0644
edit
dl
rm
session.pyc
120117
0644
edit
dl
rm
session.pyo
119938
0644
edit
dl
rm
state.py
31044
0644
edit
dl
rm
state.pyc
32294
0644
edit
dl
rm
state.pyo
32238
0644
edit
dl
rm
strategies.py
84602
0644
edit
dl
rm
strategies.pyc
63019
0644
edit
dl
rm
strategies.pyo
62668
0644
edit
dl
rm
strategy_options.py
55505
0644
edit
dl
rm
strategy_options.pyc
52730
0644
edit
dl
rm
strategy_options.pyo
52596
0644
edit
dl
rm
sync.py
5536
0644
edit
dl
rm
sync.pyc
4628
0644
edit
dl
rm
sync.pyo
4628
0644
edit
dl
rm
unitofwork.py
24735
0644
edit
dl
rm
unitofwork.pyc
24565
0644
edit
dl
rm
unitofwork.pyo
24489
0644
edit
dl
rm
util.py
44859
0644
edit
dl
rm
util.pyc
44363
0644
edit
dl
rm
util.pyo
44211
0644
edit
dl
rm
__init__.py
9542
0644
edit
dl
rm
__init__.pyc
10759
0644
edit
dl
rm
__init__.pyo
10759
0644
edit
dl
rm
Edit:
/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.py
(6610B)
# orm/exc.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQLAlchemy ORM exceptions.""" from .. import exc as sa_exc from .. import util NO_STATE = (AttributeError, KeyError) """Exception types that may be raised by instrumentation implementations.""" class StaleDataError(sa_exc.SQLAlchemyError): """An operation encountered database state that is unaccounted for. Conditions which cause this to happen include: * A flush may have attempted to update or delete rows and an unexpected number of rows were matched during the UPDATE or DELETE statement. Note that when version_id_col is used, rows in UPDATE or DELETE statements are also matched against the current known version identifier. * A mapped object with version_id_col was refreshed, and the version number coming back from the database does not match that of the object itself. * A object is detached from its parent object, however the object was previously attached to a different parent identity which was garbage collected, and a decision cannot be made if the new parent was really the most recent "parent". """ ConcurrentModificationError = StaleDataError class FlushError(sa_exc.SQLAlchemyError): """A invalid condition was detected during flush().""" class UnmappedError(sa_exc.InvalidRequestError): """Base for exceptions that involve expected mappings not present.""" class ObjectDereferencedError(sa_exc.SQLAlchemyError): """An operation cannot complete due to an object being garbage collected. """ class DetachedInstanceError(sa_exc.SQLAlchemyError): """An attempt to access unloaded attributes on a mapped instance that is detached.""" code = "bhk3" class UnmappedInstanceError(UnmappedError): """An mapping operation was requested for an unknown instance.""" @util.dependencies("sqlalchemy.orm.base") def __init__(self, base, obj, msg=None): if not msg: try: base.class_mapper(type(obj)) name = _safe_cls_name(type(obj)) msg = ( "Class %r is mapped, but this instance lacks " "instrumentation. This occurs when the instance " "is created before sqlalchemy.orm.mapper(%s) " "was called." % (name, name) ) except UnmappedClassError: msg = _default_unmapped(type(obj)) if isinstance(obj, type): msg += ( "; was a class (%s) supplied where an instance was " "required?" % _safe_cls_name(obj) ) UnmappedError.__init__(self, msg) def __reduce__(self): return self.__class__, (None, self.args[0]) class UnmappedClassError(UnmappedError): """An mapping operation was requested for an unknown class.""" def __init__(self, cls, msg=None): if not msg: msg = _default_unmapped(cls) UnmappedError.__init__(self, msg) def __reduce__(self): return self.__class__, (None, self.args[0]) class ObjectDeletedError(sa_exc.InvalidRequestError): """A refresh operation failed to retrieve the database row corresponding to an object's known primary key identity. A refresh operation proceeds when an expired attribute is accessed on an object, or when :meth:`.Query.get` is used to retrieve an object which is, upon retrieval, detected as expired. A SELECT is emitted for the target row based on primary key; if no row is returned, this exception is raised. The true meaning of this exception is simply that no row exists for the primary key identifier associated with a persistent object. The row may have been deleted, or in some cases the primary key updated to a new value, outside of the ORM's management of the target object. """ @util.dependencies("sqlalchemy.orm.base") def __init__(self, base, state, msg=None): if not msg: msg = ( "Instance '%s' has been deleted, or its " "row is otherwise not present." % base.state_str(state) ) sa_exc.InvalidRequestError.__init__(self, msg) def __reduce__(self): return self.__class__, (None, self.args[0]) class UnmappedColumnError(sa_exc.InvalidRequestError): """Mapping operation was requested on an unknown column.""" class NoResultFound(sa_exc.InvalidRequestError): """A database result was required but none was found.""" class MultipleResultsFound(sa_exc.InvalidRequestError): """A single database result was required but more than one were found.""" class LoaderStrategyException(sa_exc.InvalidRequestError): """A loader strategy for an attribute does not exist.""" def __init__( self, applied_to_property_type, requesting_property, applies_to, actual_strategy_type, strategy_key, ): if actual_strategy_type is None: sa_exc.InvalidRequestError.__init__( self, "Can't find strategy %s for %s" % (strategy_key, requesting_property), ) else: sa_exc.InvalidRequestError.__init__( self, 'Can\'t apply "%s" strategy to property "%s", ' 'which is a "%s"; this loader strategy is intended ' 'to be used with a "%s".' % ( util.clsname_as_plain_name(actual_strategy_type), requesting_property, util.clsname_as_plain_name(applied_to_property_type), util.clsname_as_plain_name(applies_to), ), ) def _safe_cls_name(cls): try: cls_name = ".".join((cls.__module__, cls.__name__)) except AttributeError: cls_name = getattr(cls, "__name__", None) if cls_name is None: cls_name = repr(cls) return cls_name @util.dependencies("sqlalchemy.orm.base") def _default_unmapped(base, cls): try: mappers = base.manager_of_class(cls).mappers except NO_STATE: mappers = {} except TypeError: mappers = {} name = _safe_cls_name(cls) if not mappers: return "Class '%s' is not mapped" % name
Save
cmd:
run