summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/orm/_orm_constructors.py4
-rw-r--r--lib/sqlalchemy/orm/decl_base.py9
-rw-r--r--lib/sqlalchemy/orm/properties.py3
3 files changed, 9 insertions, 7 deletions
diff --git a/lib/sqlalchemy/orm/_orm_constructors.py b/lib/sqlalchemy/orm/_orm_constructors.py
index 18a18bd80..0692cac09 100644
--- a/lib/sqlalchemy/orm/_orm_constructors.py
+++ b/lib/sqlalchemy/orm/_orm_constructors.py
@@ -325,7 +325,6 @@ def column_property(
deferred: bool = False,
raiseload: bool = False,
comparator_factory: Optional[Type[PropComparator[_T]]] = None,
- descriptor: Optional[Any] = None,
active_history: bool = False,
expire_on_flush: bool = True,
info: Optional[_InfoType] = None,
@@ -387,7 +386,7 @@ def column_property(
flush, that is, has any kind of "dirty" state within a flush.
Setting this parameter to ``False`` will have the effect of
leaving any existing value present after the flush proceeds.
- Note however that the :class:`.Session` with default expiration
+ Note that the :class:`.Session` with default expiration
settings still expires
all attributes after a :meth:`.Session.commit` call, however.
@@ -421,7 +420,6 @@ def column_property(
deferred=deferred,
raiseload=raiseload,
comparator_factory=comparator_factory,
- descriptor=descriptor,
active_history=active_history,
expire_on_flush=expire_on_flush,
info=info,
diff --git a/lib/sqlalchemy/orm/decl_base.py b/lib/sqlalchemy/orm/decl_base.py
index 6bd957de1..a66421e22 100644
--- a/lib/sqlalchemy/orm/decl_base.py
+++ b/lib/sqlalchemy/orm/decl_base.py
@@ -19,6 +19,7 @@ from typing import List
from typing import Mapping
from typing import NoReturn
from typing import Optional
+from typing import Sequence
from typing import Tuple
from typing import Type
from typing import TYPE_CHECKING
@@ -63,6 +64,7 @@ if TYPE_CHECKING:
from ._typing import _RegistryType
from .decl_api import declared_attr
from .instrumentation import ClassManager
+ from ..sql.elements import NamedColumn
from ..sql.schema import MetaData
from ..sql.selectable import FromClause
@@ -228,7 +230,12 @@ class _MapperConfig:
cls: Type[Any]
classname: str
- properties: util.OrderedDict[str, MapperProperty[Any]]
+ properties: util.OrderedDict[
+ str,
+ Union[
+ Sequence[NamedColumn[Any]], NamedColumn[Any], MapperProperty[Any]
+ ],
+ ]
declared_attr_reg: Dict[declared_attr[Any], Any]
@classmethod
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index 911617d6d..ad3e9f248 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -116,7 +116,6 @@ class ColumnProperty(
"deferred",
"instrument",
"comparator_factory",
- "descriptor",
"active_history",
"expire_on_flush",
"_creation_order",
@@ -136,7 +135,6 @@ class ColumnProperty(
deferred: bool = False,
raiseload: bool = False,
comparator_factory: Optional[Type[PropComparator[_T]]] = None,
- descriptor: Optional[Any] = None,
active_history: bool = False,
expire_on_flush: bool = True,
info: Optional[_InfoType] = None,
@@ -163,7 +161,6 @@ class ColumnProperty(
if comparator_factory is not None
else self.__class__.Comparator
)
- self.descriptor = descriptor
self.active_history = active_history
self.expire_on_flush = expire_on_flush