SQLAlchemy 2.0.56__py3-none-any.whl → 2.0.58__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sqlalchemy/__init__.py CHANGED
@@ -269,7 +269,7 @@ from .types import Uuid as Uuid
269
269
  from .types import VARBINARY as VARBINARY
270
270
  from .types import VARCHAR as VARCHAR
271
271
 
272
- __version__ = "2.0.56"
272
+ __version__ = "2.0.58"
273
273
 
274
274
 
275
275
  def __go(lcls: Any) -> None:
@@ -1443,7 +1443,7 @@ defined, so other SQL dialects may behave differently than PostgreSQL.
1443
1443
  The ``NULLS NOT DISTINCT`` clause can be used to change this behavior, treating
1444
1444
  null values as equal and preventing unintended duplicate rows. The opposite
1445
1445
  ``NULLS DISTINCT`` clause can also be used to make PostgreSQL's default behavior
1446
- explict.
1446
+ explicit.
1447
1447
 
1448
1448
  The ``postgresql_nulls_not_distinct`` parameter can be set to ``True`` to
1449
1449
  add the ``NULLS NOT DISTINCT`` clause, or ``False`` to add ``NULLS DISTINCT``.
@@ -1718,6 +1718,7 @@ from .types import REGCLASS as REGCLASS
1718
1718
  from .types import REGCONFIG as REGCONFIG # noqa: F401
1719
1719
  from .types import TIME as TIME
1720
1720
  from .types import TIMESTAMP as TIMESTAMP
1721
+ from .types import TSQUERY as TSQUERY
1721
1722
  from .types import TSVECTOR as TSVECTOR
1722
1723
  from ... import exc
1723
1724
  from ... import schema
@@ -1927,6 +1928,8 @@ ischema_names = {
1927
1928
  "boolean": BOOLEAN,
1928
1929
  "interval": INTERVAL,
1929
1930
  "tsvector": TSVECTOR,
1931
+ "tsquery": TSQUERY,
1932
+ "regconfig": REGCONFIG,
1930
1933
  }
1931
1934
 
1932
1935
 
sqlalchemy/engine/url.py CHANGED
@@ -400,7 +400,7 @@ class URL(NamedTuple):
400
400
 
401
401
  def update_query_pairs(
402
402
  self,
403
- key_value_pairs: Iterable[Tuple[str, Union[str, List[str]]]],
403
+ key_value_pairs: Iterable[Tuple[str, Union[str, Sequence[str]]]],
404
404
  append: bool = False,
405
405
  ) -> URL:
406
406
  """Return a new :class:`_engine.URL` object with the
@@ -421,8 +421,24 @@ class URL(NamedTuple):
421
421
  >>> str(url)
422
422
  'postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt'
423
423
 
424
- :param key_value_pairs: A sequence of tuples containing two strings
425
- each.
424
+ A value may also be given as a sequence of strings, which is
425
+ equivalent to passing the same key once for each string; the
426
+ above example may also be expressed as::
427
+
428
+ >>> url = make_url("postgresql+psycopg2://user:pass@host/dbname")
429
+ >>> url = url.update_query_pairs(
430
+ ... [
431
+ ... ("alt_host", ["host1", "host2"]),
432
+ ... ("ssl_cipher", "/path/to/crt"),
433
+ ... ]
434
+ ... )
435
+ >>> str(url)
436
+ 'postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt'
437
+
438
+ :param key_value_pairs: A sequence of tuples, each containing a
439
+ string key and a value that is either a string or a sequence of
440
+ strings. A key may appear more than once, in which case all of
441
+ its values are combined in the order given.
426
442
 
427
443
  :param append: if True, parameters in the existing query string will
428
444
  not be removed; new parameters will be in addition to those present.
@@ -431,6 +447,9 @@ class URL(NamedTuple):
431
447
 
432
448
  .. versionadded:: 1.4
433
449
 
450
+ .. versionchanged:: 2.0.58, 2.1.9 A value may be given as a sequence
451
+ of strings, including for a key that appears more than once.
452
+
434
453
  .. seealso::
435
454
 
436
455
  :attr:`_engine.URL.query`
@@ -442,12 +461,13 @@ class URL(NamedTuple):
442
461
  """ # noqa: E501
443
462
 
444
463
  existing_query = self.query
445
- new_keys: Dict[str, Union[str, List[str]]] = {}
464
+ new_keys: Dict[str, Union[str, Sequence[str]]] = {}
446
465
 
447
466
  for key, value in key_value_pairs:
448
467
  if key in new_keys:
449
- new_keys[key] = util.to_list(new_keys[key])
450
- cast("List[str]", new_keys[key]).append(cast(str, value))
468
+ current_as_list = util.to_list(new_keys[key])
469
+ current_as_list.extend(util.to_list(value))
470
+ new_keys[key] = current_as_list
451
471
  else:
452
472
  new_keys[key] = (
453
473
  list(value) if isinstance(value, (list, tuple)) else value
@@ -473,17 +493,12 @@ class URL(NamedTuple):
473
493
  }
474
494
  )
475
495
  else:
476
- new_query = self.query.union(
477
- {
478
- k: tuple(v) if isinstance(v, list) else v
479
- for k, v in new_keys.items()
480
- }
481
- )
496
+ new_query = {**self.query, **new_keys}
482
497
  return self.set(query=new_query)
483
498
 
484
499
  def update_query_dict(
485
500
  self,
486
- query_parameters: Mapping[str, Union[str, List[str]]],
501
+ query_parameters: Mapping[str, Union[str, Sequence[str]]],
487
502
  append: bool = False,
488
503
  ) -> URL:
489
504
  """Return a new :class:`_engine.URL` object with the
@@ -1166,7 +1166,7 @@ class async_scoped_session(Generic[_AS]):
1166
1166
 
1167
1167
  Raises :class:`_exc.NoResultFound` if the query selects no rows.
1168
1168
 
1169
- ..versionadded: 2.0.22
1169
+ .. versionadded:: 2.0.22
1170
1170
 
1171
1171
  .. seealso::
1172
1172
 
@@ -616,7 +616,7 @@ class AsyncSession(ReversibleProxy[Session]):
616
616
 
617
617
  Raises :class:`_exc.NoResultFound` if the query selects no rows.
618
618
 
619
- ..versionadded: 2.0.22
619
+ .. versionadded:: 2.0.22
620
620
 
621
621
  .. seealso::
622
622
 
@@ -445,8 +445,9 @@ class DeferredReflection:
445
445
  :param bind: :class:`_engine.Engine` or :class:`_engine.Connection`
446
446
  instance
447
447
 
448
- ..versionchanged:: 2.0.16 a :class:`_engine.Connection` is also
449
- accepted.
448
+ .. versionchanged::
449
+
450
+ 2.0.16 a :class:`_engine.Connection` is also accepted.
450
451
 
451
452
  :param \**reflect_kw: additional keyword arguments passed to
452
453
  :meth:`_schema.MetaData.reflect`, such as
sqlalchemy/orm/context.py CHANGED
@@ -57,6 +57,7 @@ from ..sql.base import Executable
57
57
  from ..sql.base import Generative
58
58
  from ..sql.base import Options
59
59
  from ..sql.dml import UpdateBase
60
+ from ..sql.elements import ColumnClause
60
61
  from ..sql.elements import GroupedElement
61
62
  from ..sql.elements import TextClause
62
63
  from ..sql.selectable import CompoundSelectState
@@ -80,6 +81,7 @@ if TYPE_CHECKING:
80
81
  from ..engine import Result
81
82
  from ..engine.interfaces import _CoreSingleExecuteParams
82
83
  from ..sql._typing import _ColumnsClauseArgument
84
+ from ..sql.base import ExecutableOption
83
85
  from ..sql.compiler import SQLCompiler
84
86
  from ..sql.dml import _DMLTableElement
85
87
  from ..sql.elements import ColumnElement
@@ -214,6 +216,39 @@ class QueryContext:
214
216
  def _get_top_level_context(self) -> QueryContext:
215
217
  return self.top_level_context or self
216
218
 
219
+ def _loader_strategy_options(self) -> Tuple[ExecutableOption, ...]:
220
+ """Return the options to be used by a loader strategy that emits
221
+ a new statement on behalf of this query, such as a selectin
222
+ loader or a selectin polymorphic loader.
223
+
224
+ The loader strategy is given paths and entities in terms of the
225
+ cached statement, i.e. ``compile_state.select_statement``, which
226
+ may not be the statement passed by the user. While the two are of
227
+ identical structure, entities like :class:`.AliasedInsp` from
228
+ :func:`_orm.aliased` or :func:`_orm.with_polymorphic` will usually
229
+ be a different object identity in each, and will not match up with
230
+ paths and loader lookups. So options with paths need to come from
231
+ the cached statement, while other options like
232
+ :func:`_orm.with_loader_criteria` need the latest state from the
233
+ uncached statement; as of #8399 each option decides this for itself
234
+ given both versions of itself.
235
+
236
+ """
237
+ orig_query = self.compile_state.select_statement
238
+
239
+ if orig_query is self.user_passed_query:
240
+ return orig_query._with_options
241
+
242
+ return tuple(
243
+ orig_opt._adapt_cached_option_to_uncached_option(
244
+ self, uncached_opt
245
+ )
246
+ for orig_opt, uncached_opt in zip(
247
+ orig_query._with_options,
248
+ self.user_passed_query._with_options,
249
+ )
250
+ )
251
+
217
252
 
218
253
  _orm_load_exec_options = util.immutabledict(
219
254
  {"_result_disable_adapt_to_context": True}
@@ -1622,12 +1657,43 @@ class ORMSelectCompileState(ORMCompileState, SelectState):
1622
1657
  **self._select_args,
1623
1658
  )
1624
1659
 
1660
+ # tables that are directly in the FROM list of the inner statement,
1661
+ # as opposed to being present only by way of an alias
1662
+ inner_tables = {
1663
+ elem
1664
+ for from_ in inner.get_final_froms()
1665
+ for elem in sql_util.surface_selectables(from_)
1666
+ if elem._is_table
1667
+ }
1668
+
1669
+ def _exclude_fn(elem):
1670
+ # a column of an un-aliased table is at the root of the lineage
1671
+ # of every column derived from that table, so
1672
+ # corresponding_column() can match it to a column of any alias
1673
+ # of that table; a column of an alias only matches columns
1674
+ # derived from that same alias. so skip adapting a column
1675
+ # that's attached to an un-aliased table when that table isn't
1676
+ # present as a plain table in the inner statement's FROM list,
1677
+ # either directly or within a join. the inner statement may
1678
+ # still have a column derived from that table by way of an
1679
+ # alias, such as that of an aliased() joined inheritance
1680
+ # subclass, but that alias refers to different rows, #13798
1681
+ return (
1682
+ isinstance(elem, ColumnClause)
1683
+ and elem.table is not None
1684
+ and elem.table._is_table
1685
+ and elem.table not in inner_tables
1686
+ )
1687
+
1625
1688
  inner = inner.alias()
1626
1689
 
1627
1690
  equivs = self._all_equivs()
1628
1691
 
1629
1692
  self.compound_eager_adapter = ORMStatementAdapter(
1630
- _TraceAdaptRole.COMPOUND_EAGER_STATEMENT, inner, equivalents=equivs
1693
+ _TraceAdaptRole.COMPOUND_EAGER_STATEMENT,
1694
+ inner,
1695
+ equivalents=equivs,
1696
+ exclude_fn=_exclude_fn,
1631
1697
  )
1632
1698
 
1633
1699
  statement = future.select(
@@ -353,6 +353,9 @@ class OneToManyDP(DependencyProcessor):
353
353
  (child_saves, after_save),
354
354
  (parent_saves, after_save),
355
355
  (after_save, child_post_updates),
356
+ (child_saves, before_delete),
357
+ (before_delete, child_post_updates),
358
+ (child_post_updates, parent_deletes),
356
359
  (before_delete, child_pre_updates),
357
360
  (child_pre_updates, parent_deletes),
358
361
  (child_pre_updates, child_deletes),
sqlalchemy/orm/events.py CHANGED
@@ -2605,8 +2605,7 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
2605
2605
  True, this will be the key used in the operation, such as
2606
2606
  ``collection[some_key_or_index] = value``.
2607
2607
  The parameter is not passed
2608
- to the event at all if the the
2609
- :paramref:`.AttributeEvents.include_key`
2608
+ to the event at all if the :paramref:`.AttributeEvents.include_key`
2610
2609
  was not used to set up the event; this is to allow backwards
2611
2610
  compatibility with existing event handlers that don't include the
2612
2611
  ``key`` parameter.
@@ -2660,8 +2659,7 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
2660
2659
  True, this will be the key used in the operation, such as
2661
2660
  ``collection[some_key_or_index] = value``.
2662
2661
  The parameter is not passed
2663
- to the event at all if the the
2664
- :paramref:`.AttributeEvents.include_key`
2662
+ to the event at all if the :paramref:`.AttributeEvents.include_key`
2665
2663
  was not used to set up the event; this is to allow backwards
2666
2664
  compatibility with existing event handlers that don't include the
2667
2665
  ``key`` parameter.
@@ -2730,8 +2728,7 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
2730
2728
  :paramref:`.AttributeEvents.include_key` parameter set to
2731
2729
  True, this will be the sequence of keys used in the operation,
2732
2730
  typically only for a dictionary update. The parameter is not passed
2733
- to the event at all if the the
2734
- :paramref:`.AttributeEvents.include_key`
2731
+ to the event at all if the :paramref:`.AttributeEvents.include_key`
2735
2732
  was not used to set up the event; this is to allow backwards
2736
2733
  compatibility with existing event handlers that don't include the
2737
2734
  ``key`` parameter.
@@ -2769,8 +2766,7 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
2769
2766
  :paramref:`.AttributeEvents.include_key` parameter set to
2770
2767
  True, this will be the key used in the operation, such as
2771
2768
  ``del collection[some_key_or_index]``. The parameter is not passed
2772
- to the event at all if the the
2773
- :paramref:`.AttributeEvents.include_key`
2769
+ to the event at all if the :paramref:`.AttributeEvents.include_key`
2774
2770
  was not used to set up the event; this is to allow backwards
2775
2771
  compatibility with existing event handlers that don't include the
2776
2772
  ``key`` parameter.
sqlalchemy/orm/loading.py CHANGED
@@ -40,6 +40,8 @@ from .context import FromStatement
40
40
  from .context import ORMCompileState
41
41
  from .context import QueryContext
42
42
  from .strategies import SelectInLoader
43
+ from .strategy_options import Load
44
+ from .util import _entity_corresponds_to
43
45
  from .util import _none_set
44
46
  from .util import state_str
45
47
  from .. import exc as sa_exc
@@ -1290,17 +1292,34 @@ def _load_subclass_via_in(
1290
1292
  if not states:
1291
1293
  return
1292
1294
 
1293
- orig_query = context.query
1294
-
1295
1295
  if path.parent:
1296
1296
  enable_opt_lcl = enable_opt._prepend_path(path)
1297
1297
  disable_opt_lcl = disable_opt._prepend_path(path)
1298
1298
  else:
1299
1299
  enable_opt_lcl = enable_opt
1300
1300
  disable_opt_lcl = disable_opt
1301
- options = (
1302
- (enable_opt_lcl,) + orig_query._with_options + (disable_opt_lcl,)
1303
- )
1301
+
1302
+ # options need to be in terms of the cached statement in order
1303
+ # to line up with "path"; see #13777
1304
+ query_options = context._loader_strategy_options()
1305
+
1306
+ if not path.parent:
1307
+ # for a top level entity, there's no current path to select
1308
+ # among the options of the parent query, which are processed
1309
+ # against the root entity of our query as is. leave out
1310
+ # those against some other entity, such as an aliased() or
1311
+ # with_polymorphic() of the base or another entity in the
1312
+ # statement; these would raise for not linking to our root
1313
+ # entity, and were applied by the parent query already.
1314
+ # see #13780
1315
+ query_options = tuple(
1316
+ opt
1317
+ for opt in query_options
1318
+ if not isinstance(opt, Load)
1319
+ or _entity_corresponds_to(entity, opt.path[0])
1320
+ )
1321
+
1322
+ options = (enable_opt_lcl,) + query_options + (disable_opt_lcl,)
1304
1323
 
1305
1324
  q2 = q.options(*options)
1306
1325
 
@@ -1538,11 +1538,19 @@ class SubqueryLoader(PostLoader):
1538
1538
  leftmost_attr,
1539
1539
  leftmost_relationship,
1540
1540
  orig_entity,
1541
+ options,
1541
1542
  ):
1542
1543
  # reformat the original query
1543
1544
  # to look only for significant columns
1544
1545
  q = orig_query._clone().correlate(None)
1545
1546
 
1547
+ # use the same option objects as the outer statement; the columns
1548
+ # of this query are replaced below so options with paths have
1549
+ # no effect, however sharing them keeps the cache key of the
1550
+ # outer statement the same whether or not the statement being
1551
+ # invoked is the cached one
1552
+ q._with_options = options
1553
+
1546
1554
  # LEGACY: make a Query back from the select() !!
1547
1555
  # This suits at least two legacy cases:
1548
1556
  # 1. applications which expect before_compile() to be called
@@ -1736,20 +1744,10 @@ class SubqueryLoader(PostLoader):
1736
1744
  context,
1737
1745
  q,
1738
1746
  subq_path,
1739
- rewritten_path,
1740
- orig_query,
1747
+ new_options,
1741
1748
  effective_entity,
1742
1749
  loadopt,
1743
1750
  ):
1744
- # note that because the subqueryload object
1745
- # does not reuse the cached query, instead always making
1746
- # use of the current invoked query, while we have two queries
1747
- # here (orig and context.query), they are both non-cached
1748
- # queries and we can transfer the options as is without
1749
- # adjusting for new criteria. Some work on #6881 / #6889
1750
- # brought this into question.
1751
- new_options = orig_query._with_options
1752
-
1753
1751
  if loadopt and loadopt._extra_criteria:
1754
1752
  new_options += (
1755
1753
  orm_util.LoaderCriteriaOption(
@@ -1759,8 +1757,10 @@ class SubqueryLoader(PostLoader):
1759
1757
  )
1760
1758
 
1761
1759
  # propagate loader options etc. to the new query.
1762
- # these will fire relative to subq_path.
1763
- q = q._with_current_path(rewritten_path)
1760
+ # these will fire relative to subq_path. rewritten_path is not
1761
+ # used here, as its leading entity is from the statement being
1762
+ # invoked and would not line up with the options
1763
+ q = q._with_current_path(subq_path)
1764
1764
  q = q.options(*new_options)
1765
1765
 
1766
1766
  return q
@@ -1862,11 +1862,20 @@ class SubqueryLoader(PostLoader):
1862
1862
  else:
1863
1863
  effective_entity = self.entity
1864
1864
 
1865
- subq_path, rewritten_path = context.query._execution_options.get(
1866
- ("subquery_paths", None),
1867
- (orm_util.PathRegistry.root, orm_util.PathRegistry.root),
1865
+ # rewritten_path is in terms of the statement being invoked, as it
1866
+ # is used to locate the leftmost entity within orig_query below
1867
+ rewritten_path = context.query._execution_options.get(
1868
+ ("subquery_rewritten_path", None), None
1868
1869
  )
1869
- is_root = subq_path is orm_util.PathRegistry.root
1870
+ is_root = rewritten_path is None
1871
+ if is_root:
1872
+ subq_path = rewritten_path = orm_util.PathRegistry.root
1873
+ else:
1874
+ # subq_path is in terms of the cached statement, the same as
1875
+ # "path" and the loader options applied in _setup_options().
1876
+ # the cached statement is a subquery load statement as well,
1877
+ # whose current path is the subq_path it was created with
1878
+ subq_path = compile_state.current_path
1870
1879
  subq_path = subq_path + path
1871
1880
  rewritten_path = rewritten_path + path
1872
1881
 
@@ -1919,6 +1928,12 @@ class SubqueryLoader(PostLoader):
1919
1928
 
1920
1929
  # generate a new Query from the original, then
1921
1930
  # produce a subquery from it.
1931
+ # subq_path and effective_entity are given to us in terms of the
1932
+ # cached statement, so options with paths need to come from the
1933
+ # cached statement as well, rather than from orig_query;
1934
+ # see QueryContext._loader_strategy_options() and #13779
1935
+ new_options = context._loader_strategy_options()
1936
+
1922
1937
  left_alias = self._generate_from_original_query(
1923
1938
  orig_compile_state,
1924
1939
  orig_query,
@@ -1926,6 +1941,7 @@ class SubqueryLoader(PostLoader):
1926
1941
  leftmost_attr,
1927
1942
  leftmost_relationship,
1928
1943
  entity,
1944
+ new_options,
1929
1945
  )
1930
1946
 
1931
1947
  # generate another Query that will join the
@@ -1940,7 +1956,7 @@ class SubqueryLoader(PostLoader):
1940
1956
  context.execution_options,
1941
1957
  {
1942
1958
  ("orig_query", SubqueryLoader): orig_query,
1943
- ("subquery_paths", None): (subq_path, rewritten_path),
1959
+ ("subquery_rewritten_path", None): rewritten_path,
1944
1960
  },
1945
1961
  )
1946
1962
 
@@ -1958,8 +1974,7 @@ class SubqueryLoader(PostLoader):
1958
1974
  context,
1959
1975
  q,
1960
1976
  subq_path,
1961
- rewritten_path,
1962
- orig_query,
1977
+ new_options,
1963
1978
  effective_entity,
1964
1979
  loadopt,
1965
1980
  )
@@ -3254,59 +3269,15 @@ class SelectInLoader(PostLoader, util.MemoizedSlots):
3254
3269
 
3255
3270
  q = q.filter(in_expr.in_(sql.bindparam("primary_keys")))
3256
3271
 
3257
- # a test which exercises what these comments talk about is
3258
- # test_selectin_relations.py -> test_twolevel_selectin_w_polymorphic
3259
- #
3260
3272
  # effective_entity above is given to us in terms of the cached
3261
- # statement, namely this one:
3262
- orig_query = context.compile_state.select_statement
3263
-
3264
- # the actual statement that was requested is this one:
3265
- # context_query = context.user_passed_query
3266
- #
3267
- # that's not the cached one, however. So while it is of the identical
3268
- # structure, if it has entities like AliasedInsp, which we get from
3269
- # aliased() or with_polymorphic(), the AliasedInsp will likely be a
3270
- # different object identity each time, and will not match up
3271
- # hashing-wise to the corresponding AliasedInsp that's in the
3272
- # cached query, meaning it won't match on paths and loader lookups
3273
- # and loaders like this one will be skipped if it is used in options.
3274
- #
3275
- # as it turns out, standard loader options like selectinload(),
3276
- # lazyload() that have a path need
3277
- # to come from the cached query so that the AliasedInsp etc. objects
3278
- # that are in the query line up with the object that's in the path
3279
- # of the strategy object. however other options like
3280
- # with_loader_criteria() that doesn't have a path (has a fixed entity)
3281
- # and needs to have access to the latest closure state in order to
3282
- # be correct, we need to use the uncached one.
3283
- #
3284
- # as of #8399 we let the loader option itself figure out what it
3285
- # wants to do given cached and uncached version of itself.
3273
+ # statement, so options with paths need to come from the cached
3274
+ # statement as well; see QueryContext._loader_strategy_options().
3275
+ # a test which exercises this is
3276
+ # test_selectin_relations.py -> test_twolevel_selectin_w_polymorphic
3277
+ new_options = context._loader_strategy_options()
3286
3278
 
3287
3279
  effective_path = path[self.parent_property]
3288
3280
 
3289
- if orig_query is context.user_passed_query:
3290
- new_options = orig_query._with_options
3291
- else:
3292
- cached_options = orig_query._with_options
3293
- uncached_options = context.user_passed_query._with_options
3294
-
3295
- # propagate compile state options from the original query,
3296
- # updating their "extra_criteria" as necessary.
3297
- # note this will create a different cache key than
3298
- # "orig" options if extra_criteria is present, because the copy
3299
- # of extra_criteria will have different boundparam than that of
3300
- # the QueryableAttribute in the path
3301
- new_options = [
3302
- orig_opt._adapt_cached_option_to_uncached_option(
3303
- context, uncached_opt
3304
- )
3305
- for orig_opt, uncached_opt in zip(
3306
- cached_options, uncached_options
3307
- )
3308
- ]
3309
-
3310
3281
  if loadopt and loadopt._extra_criteria:
3311
3282
  new_options += (
3312
3283
  orm_util.LoaderCriteriaOption(
sqlalchemy/orm/util.py CHANGED
@@ -118,6 +118,7 @@ if typing.TYPE_CHECKING:
118
118
  from ..sql.annotation import _SA
119
119
  from ..sql.base import ReadOnlyColumnCollection
120
120
  from ..sql.elements import BindParameter
121
+ from ..sql.elements import ClauseElement
121
122
  from ..sql.selectable import _ColumnsClauseElement
122
123
  from ..sql.selectable import Select
123
124
  from ..sql.selectable import Selectable
@@ -563,6 +564,7 @@ class ORMStatementAdapter(sql_util.ColumnAdapter):
563
564
  anonymize_labels: bool = False,
564
565
  adapt_on_names: bool = False,
565
566
  adapt_from_selectables: Optional[AbstractSet[FromClause]] = None,
567
+ exclude_fn: Optional[Callable[[ClauseElement], bool]] = None,
566
568
  ):
567
569
  self.role = role
568
570
  super().__init__(
@@ -573,6 +575,7 @@ class ORMStatementAdapter(sql_util.ColumnAdapter):
573
575
  anonymize_labels=anonymize_labels,
574
576
  adapt_on_names=adapt_on_names,
575
577
  adapt_from_selectables=adapt_from_selectables,
578
+ exclude_fn=exclude_fn,
576
579
  )
577
580
 
578
581
 
sqlalchemy/pool/base.py CHANGED
@@ -374,12 +374,27 @@ class Pool(log.Identified, event.EventTarget):
374
374
  else:
375
375
  self._dialect.do_close(connection)
376
376
  except BaseException as e:
377
- self.logger.error(
378
- f"Exception {'terminating' if terminate else 'closing'} "
379
- f"connection %r",
380
- connection,
381
- exc_info=True,
382
- )
377
+ if (
378
+ terminate
379
+ and self._dialect.has_terminate
380
+ and util.is_cancellation_exception(e)
381
+ ):
382
+ # the asyncio terminate() force-closes the connection before
383
+ # letting a cancellation of its graceful close propagate, so
384
+ # the connection is closed and there is no error to report.
385
+ # see #13772
386
+ self.logger.debug(
387
+ "Cancellation during terminate of connection %r; "
388
+ "connection was force-closed",
389
+ connection,
390
+ )
391
+ else:
392
+ self.logger.error(
393
+ f"Exception {'terminating' if terminate else 'closing'} "
394
+ f"connection %r",
395
+ connection,
396
+ exc_info=True,
397
+ )
383
398
  if not isinstance(e, Exception):
384
399
  raise
385
400
 
@@ -4214,19 +4214,27 @@ class _OverrideBinds(ColumnElement[_T]):
4214
4214
  """generate a cache key for the given element, substituting its bind
4215
4215
  values for the translation values present."""
4216
4216
 
4217
- existing_bps: List[BindParameter[Any]] = []
4218
- ck = self.element._gen_cache_key(anon_map, existing_bps)
4219
-
4220
- bindparams.extend(
4217
+ translate = self.translate
4218
+
4219
+ ck = self.element._gen_cache_key(anon_map, bindparams)
4220
+
4221
+ # the anon_map check stops self.element's traversal at objects
4222
+ # already visited, so their bound parameters aren't collected again
4223
+ # here. this happens when an element visited ahead of this one,
4224
+ # such as the path of a loader option, refers to the same aliased()
4225
+ # subquery as the criteria wrapped here. those parameters are
4226
+ # already in bindparams with the original values, so the
4227
+ # translation is applied to the whole list. see #13766
4228
+ bindparams[:] = [
4221
4229
  (
4222
4230
  bp._with_value(
4223
- self.translate[bp.key], maintain_key=True, required=False
4231
+ translate[bp.key], maintain_key=True, required=False
4224
4232
  )
4225
- if bp.key in self.translate
4233
+ if bp.key in translate
4226
4234
  else bp
4227
4235
  )
4228
- for bp in existing_bps
4229
- )
4236
+ for bp in bindparams
4237
+ ]
4230
4238
 
4231
4239
  return ck
4232
4240
 
@@ -4268,7 +4268,7 @@ class GenerativeSelect(DialectKWArgs, SelectBase, Generative):
4268
4268
 
4269
4269
  This is a numeric value which usually renders as ``FETCH {FIRST | NEXT}
4270
4270
  [ count ] {ROW | ROWS} {ONLY | WITH TIES}`` expression in the resulting
4271
- select. This functionality is is currently implemented for Oracle
4271
+ select. This functionality is currently implemented for Oracle
4272
4272
  Database, PostgreSQL, MSSQL.
4273
4273
 
4274
4274
  Use :meth:`_sql.GenerativeSelect.offset` to specify the offset.
@@ -5351,6 +5351,7 @@ class Select(
5351
5351
  ("_setup_joins", InternalTraversal.dp_setup_join_tuple),
5352
5352
  ("_correlate", InternalTraversal.dp_clauseelement_tuple),
5353
5353
  ("_correlate_except", InternalTraversal.dp_clauseelement_tuple),
5354
+ ("_correlate_mode", InternalTraversal.dp_plain_obj),
5354
5355
  ("_limit_clause", InternalTraversal.dp_clauseelement),
5355
5356
  ("_offset_clause", InternalTraversal.dp_clauseelement),
5356
5357
  ("_fetch_clause", InternalTraversal.dp_clauseelement),
@@ -5375,6 +5376,27 @@ class Select(
5375
5376
 
5376
5377
  _compile_state_factory: Type[SelectState]
5377
5378
 
5379
+ @property
5380
+ def _correlate_mode(self) -> Optional[str]:
5381
+ """Correlation state not otherwise captured by ``_correlate`` and
5382
+ ``_correlate_except``, for comparison and cache key purposes.
5383
+
5384
+ ``None`` for the default of auto-correlation; ``"explicit"`` once
5385
+ correlate() or correlate_except() has been called, which includes
5386
+ correlate(None) that disables correlation; ``"except_all"`` when
5387
+ correlate_except() was called with no FROM objects, which
5388
+ correlates all FROM objects to enclosing SELECTs. The latter two
5389
+ are otherwise indistinguishable from the default, as the cache key
5390
+ omits empty ``_correlate`` / ``_correlate_except`` tuples.
5391
+
5392
+ """
5393
+ if self._auto_correlate:
5394
+ return None
5395
+ elif self._correlate_except == ():
5396
+ return "except_all"
5397
+ else:
5398
+ return "explicit"
5399
+
5378
5400
  @classmethod
5379
5401
  def _create_raw_select(cls, **kw: Any) -> Select[Any]:
5380
5402
  """Create a :class:`.Select` using raw ``__new__`` with no coercions.
@@ -5873,27 +5895,73 @@ class Select(
5873
5895
  # they've become. This allows us to ensure the same cloned from
5874
5896
  # is used when other items such as columns are "cloned"
5875
5897
 
5876
- all_the_froms = set(
5877
- itertools.chain(
5878
- _from_objects(*self._raw_columns),
5879
- _from_objects(*self._where_criteria),
5880
- _from_objects(*[elem[0] for elem in self._setup_joins]),
5898
+ # FROMs of the columns clause and WHERE clause. if any of these
5899
+ # are converted into Join objects by the clone, these need to be
5900
+ # added to _from_obj explicitly, because otherwise they won't be
5901
+ # part of the new state, as a Join's columns are those of the
5902
+ # tables within it, which would then be found as the FROMs instead.
5903
+ column_froms = set(
5904
+ _from_objects(*self._raw_columns, *self._where_criteria)
5905
+ )
5906
+
5907
+ # explicit FROMs, i.e. select_from(), join targets and the left
5908
+ # side of join_from(), including joins memoized by
5909
+ # with_only_columns(). these aren't candidates for adding to
5910
+ # _from_obj, as they are already part of the new state, either in
5911
+ # _from_obj or _setup_joins
5912
+ all_setup_joins = self._setup_joins + tuple(
5913
+ itertools.chain.from_iterable(
5914
+ memoized._setup_joins
5915
+ for memoized in self._memoized_select_entities
5881
5916
  )
5882
5917
  )
5918
+ explicit_froms = (
5919
+ *self._from_obj,
5920
+ *(target for target, _, _, _ in all_setup_joins),
5921
+ *(
5922
+ from_
5923
+ for _, _, from_, _ in all_setup_joins
5924
+ if from_ is not None
5925
+ ),
5926
+ )
5883
5927
 
5884
- # do a clone for the froms we've gathered. what is important here
5885
- # is if any of the things we are selecting from, like tables,
5886
- # were converted into Join objects. if so, these need to be
5887
- # added to _from_obj explicitly, because otherwise they won't be
5888
- # part of the new state, as they don't associate themselves with
5889
- # their columns.
5890
- new_froms = {f: clone(f, **kw) for f in all_the_froms}
5928
+ # FROMs contained within the explicit FROMs, as given by
5929
+ # _from_objects(). for a table or alias this is the element
5930
+ # itself, but for a FromGrouping or SQL function it is only what's
5931
+ # inside of it
5932
+ contained_froms = _from_objects(*explicit_froms)
5933
+
5934
+ # FROMs of the columns memoized by with_only_columns()
5935
+ memoized_column_froms = _from_objects(
5936
+ *itertools.chain.from_iterable(
5937
+ memoized._raw_columns
5938
+ for memoized in self._memoized_select_entities
5939
+ )
5940
+ )
5891
5941
 
5892
- # 2. copy FROM collections, adding in joins that we've created.
5942
+ # do a clone for all of these, so that columns which refer to them,
5943
+ # such as those of a CTE, are pointed to the clone (#13791)
5944
+ from_clones = {
5945
+ f: clone(f, **kw)
5946
+ for f in column_froms.union(contained_froms, memoized_column_froms)
5947
+ }
5948
+
5949
+ # 2. copy FROM collections, adding in joins that we've created
5950
+ # from the column FROMs. the elements of _from_obj are cloned
5951
+ # directly rather than looked up in from_clones, as an annotated
5952
+ # FROM hashes and compares as equal to its unannotated form, so
5953
+ # the lookup can return the clone of the other one. e.g. the ORM
5954
+ # annotates the subquery used by relationship any() / has() with
5955
+ # "no_replacement_traverse", so that replacement_traverse() leaves
5956
+ # it as is, which only works if that exact element is cloned
5893
5957
  existing_from_obj = [clone(f, **kw) for f in self._from_obj]
5894
5958
  add_froms = (
5895
- {f for f in new_froms.values() if isinstance(f, Join)}
5896
- .difference(all_the_froms)
5959
+ {
5960
+ from_clones[f]
5961
+ for f in column_froms
5962
+ if isinstance(from_clones[f], Join)
5963
+ }
5964
+ .difference(column_froms)
5897
5965
  .difference(existing_from_obj)
5898
5966
  )
5899
5967
 
@@ -5905,8 +5973,8 @@ class Select(
5905
5973
  obj: Union[BinaryExpression[Any], ColumnClause[Any]],
5906
5974
  **kw: Any,
5907
5975
  ) -> Optional[KeyedColumnElement[Any]]:
5908
- if isinstance(obj, ColumnClause) and obj.table in new_froms:
5909
- newelem = new_froms[obj.table].corresponding_column(obj)
5976
+ if isinstance(obj, ColumnClause) and obj.table in from_clones:
5977
+ newelem = from_clones[obj.table].corresponding_column(obj)
5910
5978
  return newelem
5911
5979
  return None
5912
5980
 
@@ -76,6 +76,9 @@ from .compat import win32 as win32
76
76
  from .concurrency import await_fallback as await_fallback
77
77
  from .concurrency import await_only as await_only
78
78
  from .concurrency import greenlet_spawn as greenlet_spawn
79
+ from .concurrency import (
80
+ is_cancellation_exception as is_cancellation_exception,
81
+ )
79
82
  from .concurrency import is_exit_exception as is_exit_exception
80
83
  from .deprecations import became_legacy_20 as became_legacy_20
81
84
  from .deprecations import deprecated as deprecated
@@ -37,6 +37,10 @@ else:
37
37
  _T = TypeVar("_T")
38
38
 
39
39
 
40
+ def is_cancellation_exception(e: BaseException) -> bool:
41
+ return isinstance(e, asyncio.CancelledError)
42
+
43
+
40
44
  class _AsyncUtil:
41
45
  """Asyncio util for test suite/ util only"""
42
46
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SQLAlchemy
3
- Version: 2.0.56
3
+ Version: 2.0.58
4
4
  Summary: Database Abstraction Library
5
5
  Home-page: https://www.sqlalchemy.org
6
6
  Author: Mike Bayer
@@ -1,4 +1,4 @@
1
- sqlalchemy/__init__.py,sha256=UiqUaNkRrW2eztHVQohpdel4uGtfu6F9GMhPVxveqUQ,12659
1
+ sqlalchemy/__init__.py,sha256=iDhXHxwyz-VWlfjJiyChkty2MhqaPsZWwihWv3yP2KI,12659
2
2
  sqlalchemy/events.py,sha256=vEDW04X_PMhMw5y0_95tbEzht3wua8_gnkMBJstYNRw,525
3
3
  sqlalchemy/exc.py,sha256=JVVIizdjrbZYKA3poXDMSY5qDxTW8hwJzU_ZWx05LYc,23979
4
4
  sqlalchemy/inspection.py,sha256=Rqw5kFWLY5MH3pr0j2f3OQGZca3aFR-NOaL2sRGuBBo,5064
@@ -59,7 +59,7 @@ sqlalchemy/dialects/postgresql/__init__.py,sha256=Nai79gxCtxM05bqCv4HT8PxN9tIedF
59
59
  sqlalchemy/dialects/postgresql/_psycopg_common.py,sha256=1_Vb8JXRlNcCYoQn2Vgq6afvDiR6RJ77alGZUZEUbi8,6965
60
60
  sqlalchemy/dialects/postgresql/array.py,sha256=cz42HV28g_VbH1Nt4TnEeU1GUS8uSCbTqU2CNJ4qDfg,17279
61
61
  sqlalchemy/dialects/postgresql/asyncpg.py,sha256=xXhN0OJiiSy9C6bK4tr2mzFSA3FSralWGan7EPbxK9o,41050
62
- sqlalchemy/dialects/postgresql/base.py,sha256=2I1TC-aJUl90zjjShFJVcvoWJ6DeJuXNH0KKDuljFqc,196408
62
+ sqlalchemy/dialects/postgresql/base.py,sha256=Cn0PP7Ds05oZ2zLJAaugHfso-wRAYMlCGy_iPMgNAzM,196499
63
63
  sqlalchemy/dialects/postgresql/dml.py,sha256=kAnq3ZC-WBLgZTd0FQyKMkmmam7hxdw5Yxs-Um2j98A,12125
64
64
  sqlalchemy/dialects/postgresql/ext.py,sha256=bh3FeNNZkPABqX7caCSzP_iNGNRL-gOLJsdeBiQpERs,17695
65
65
  sqlalchemy/dialects/postgresql/hstore.py,sha256=jt2t4HDMCbmR_AW3JjkOF_Ip-4EQZ_nvi0w6F5dmMsY,11933
@@ -99,7 +99,7 @@ sqlalchemy/engine/reflection.py,sha256=dRRCaT3eZQY7ohG7WGI_8P1g5dZ-LAGf3hlj0Z84T
99
99
  sqlalchemy/engine/result.py,sha256=GqsgejFlJosUWfFSmi58-ojjDZ5B29yR_7sSdJ8Hogs,80587
100
100
  sqlalchemy/engine/row.py,sha256=sC91jITBoitEhjeQm36IS7KjGwiZJjiwCKzOFbxp5qo,12031
101
101
  sqlalchemy/engine/strategies.py,sha256=EUOp1y78tDlpbC2J9XJnyDMH-lVjusFBx_39zCh1khE,439
102
- sqlalchemy/engine/url.py,sha256=DO0vo3kq46eEgp8nsNKUDQvXDz63VfxWF2NOeKN7380,31089
102
+ sqlalchemy/engine/url.py,sha256=PYSAaVeRXJVAGFlOF2YqKlExQ1EB_bvc2FrkYvXdMOE,31948
103
103
  sqlalchemy/engine/util.py,sha256=Zk8LKTyOO_WfjQfmFVdXqlVFDJz1FjOb7bwF485Rago,5682
104
104
  sqlalchemy/event/__init__.py,sha256=DfSYrhLMf1nrCnEBeKaZT4bJkksge2cY2Tg506E41mU,1066
105
105
  sqlalchemy/event/api.py,sha256=s1qCAQ0yxC3W1erIvTt79QoEvOYo4u44xostJYaBWOs,8109
@@ -124,10 +124,10 @@ sqlalchemy/ext/asyncio/base.py,sha256=_tdhG2U24sB4iMk2qLVayp-joUl6j5Rm3FF1oWdPvI
124
124
  sqlalchemy/ext/asyncio/engine.py,sha256=Ac-1LyfZTNojBaro0kLiWljWIv24FjozFKbpI1U0Wyc,48453
125
125
  sqlalchemy/ext/asyncio/exc.py,sha256=CtGx8sjHzykpUZojihduYtXjZUz-q-OLcuP8ENoHFBY,639
126
126
  sqlalchemy/ext/asyncio/result.py,sha256=CU3YxS9_lf0vbeBNx96031nGa9tsGAPrF6c1AqXpQEA,31268
127
- sqlalchemy/ext/asyncio/scoping.py,sha256=2_hfAfSmLtHtXdQJPnCJNoqocajGlW8dNqrk4xU5aYk,52256
128
- sqlalchemy/ext/asyncio/session.py,sha256=5ztPLah-jDATeeSS3bm_XGwO2QATuI4yRARuY3XTeZ0,63273
127
+ sqlalchemy/ext/asyncio/scoping.py,sha256=4gtZhRNVeK0Ex-jvS8V2jNeZRdJTaesjgQUQTDIeKrs,52258
128
+ sqlalchemy/ext/asyncio/session.py,sha256=CleIoHEcqOLPgIM6wnud0EpTQWx6AtPgwYsRjhQxIbU,63275
129
129
  sqlalchemy/ext/declarative/__init__.py,sha256=wrIs8z6am8-rSwDYwoxZntw_3T2Dj_28NbyODnDxA8s,1818
130
- sqlalchemy/ext/declarative/extensions.py,sha256=-KawB2nr6AIljJjbBM0hREhFE5OQmJfitkUGphoBLGM,19532
130
+ sqlalchemy/ext/declarative/extensions.py,sha256=LWHQKja6WDlFdiRP86xPHLBdDWK6q3HN5pFiXMjmdts,19537
131
131
  sqlalchemy/ext/mypy/__init__.py,sha256=ovuYQ9Z8oiOl0KqmrOKotAchksj_2G6_bOaVLb95ugw,241
132
132
  sqlalchemy/ext/mypy/apply.py,sha256=1lmDsxDulQUiSc8w3LkVqMKZD88cLcSfJ3d9lmMg0M4,10591
133
133
  sqlalchemy/ext/mypy/decl_class.py,sha256=VHoYiSVmhWx0NTrXMa7fLmP-QuMO19uYv_rXhercQfE,17384
@@ -145,19 +145,19 @@ sqlalchemy/orm/base.py,sha256=ZllqtOLEOSzBujwuJge49rsaGNyOcWZIX1eDdf7-jgY,27501
145
145
  sqlalchemy/orm/bulk_persistence.py,sha256=yeCpvgcRifsfCbV9kmqzzA97DtaBGCVy27Oxclu8QIc,73920
146
146
  sqlalchemy/orm/clsregistry.py,sha256=mMpVBCC0YVTYf1uQ9u-YJnbRy4yfL5zeQV60tAjEuSs,17952
147
147
  sqlalchemy/orm/collections.py,sha256=T0M6cg-R-n27CEPBVUz6m-CC6OVmmEziPCk56471_wA,52282
148
- sqlalchemy/orm/context.py,sha256=2hsNE2YiXsQm3D2XRYBM-R3jZi7ocbRIwRnwUjwtr0k,115080
148
+ sqlalchemy/orm/context.py,sha256=0DgN8dSXlSp9HJq269_oZFc68wDQsOm2qVOeG4Y9LGc,118077
149
149
  sqlalchemy/orm/decl_api.py,sha256=zDmbrve7nE3tphiFyEQvhQ_lYgl4vrdkVK7nEl1zLHI,68424
150
150
  sqlalchemy/orm/decl_base.py,sha256=lprA841gO5WqkP2rUVp0TZF1_4R_Lzrqg8Pzq7HUpF0,84308
151
- sqlalchemy/orm/dependency.py,sha256=DkvtKgvIxqYiQDgmv_0VrDFabbQLKIIaW9vQEaFtkaI,47617
151
+ sqlalchemy/orm/dependency.py,sha256=V0yXWc_T18mHsNSPdNCTJnVElE1DnMT51qzffHRnCGI,47782
152
152
  sqlalchemy/orm/descriptor_props.py,sha256=_KkEziuEWU4CrxJBxb-5nblMAR6IP1WyzCRNRqSqyVE,37795
153
153
  sqlalchemy/orm/dynamic.py,sha256=t3RyVwVcINQgJqAsvGPvzxVLAxv604FT4trNeLqdmpU,9949
154
154
  sqlalchemy/orm/evaluator.py,sha256=DkKS71DYkzZRtxXRh-8pCyup_X7Xfbi9FjWHceTicOA,12352
155
- sqlalchemy/orm/events.py,sha256=g4bfkcJsRFnjyzfWHxQ84h2GCNPHKRL5X0OeQBN6HSQ,127232
155
+ sqlalchemy/orm/events.py,sha256=tSwC3ntuln8TLkFzZbe2DvycT3q0FQzWSTNxTApbcts,127180
156
156
  sqlalchemy/orm/exc.py,sha256=W11TA2kDVVDweYvrDKwoqgFVO7wiIoFW_yHqDts7fGU,7636
157
157
  sqlalchemy/orm/identity.py,sha256=kIgJgbN2MLaL3kc43-i1CA39eww7s3UXsv9xxijlQZo,9249
158
158
  sqlalchemy/orm/instrumentation.py,sha256=mNleDJMFAUgdrQ3CO1O5ioaS9i3zTivsLG-nUqZSoxo,24320
159
159
  sqlalchemy/orm/interfaces.py,sha256=eXGWQLKfx1dTAIY6CXC_IO9zzWmcc0VZaQQ5NYQc57A,49073
160
- sqlalchemy/orm/loading.py,sha256=EbAZIvnniRruXQRm_V4r0x0Q534jSamCn0w75hyBMEk,58484
160
+ sqlalchemy/orm/loading.py,sha256=cPltH6IQ0xzHXE-MP5Aku7LPsupU1--1NKO5HhqYb7w,59432
161
161
  sqlalchemy/orm/mapped_collection.py,sha256=UB3JmCNZQ2k0XB0MH6T7bgRPueE7pSrhcyFjSX_g8Ms,19734
162
162
  sqlalchemy/orm/mapper.py,sha256=MYFrewCv6mISFuNNABURssCjt1_2RywU97u359TmzwA,172155
163
163
  sqlalchemy/orm/path_registry.py,sha256=SQcS3E3DQBUR4fX1ewx4-c8u5cIvH5teL1CXakGoDAI,28209
@@ -169,14 +169,14 @@ sqlalchemy/orm/scoping.py,sha256=ZefFImjVQ19q4DPg53ktHGefhWaG258V6tLlWr4s4jk,782
169
169
  sqlalchemy/orm/session.py,sha256=sYBE_0x3NIFS_CMPRR-tra3-bzsQ__WshHSN9pZnOfk,196986
170
170
  sqlalchemy/orm/state.py,sha256=YS0voN_ffj7hg7dqklGdvNMGwEILKo1tXv725OIW9mU,38433
171
171
  sqlalchemy/orm/state_changes.py,sha256=zMhwxbQNVlcRmK7YwaPsYsxN4uhJkw4Mmg_snftAGDg,6816
172
- sqlalchemy/orm/strategies.py,sha256=YwNgGH9grk2vEs7yD-eA8_H7LWDBB3g1B99notbVUQQ,120743
172
+ sqlalchemy/orm/strategies.py,sha256=HjJkQ22oIoH9QGjCCZpC9TUFZLPYgQZvzZB3RBZj3ko,119392
173
173
  sqlalchemy/orm/strategy_options.py,sha256=1r0yaZ25KzNiDJeKHiekzUi7FmSOYE7a1PVbStOiVWQ,87290
174
174
  sqlalchemy/orm/sync.py,sha256=3ycmsWAHK4zwUfvfXj2e4v58MzmQ9KULWy4awoGzoMI,5779
175
175
  sqlalchemy/orm/unitofwork.py,sha256=wjVo-pQBtx93p4awjkdKpbfWG5ENz-k-VtpkFejcJho,27028
176
- sqlalchemy/orm/util.py,sha256=zZ_diBYkK3J4X_FI5w_gQJ91kVrmwkBIHgr5SGS3YQA,84668
176
+ sqlalchemy/orm/util.py,sha256=6q6bjimFYd8lq64uplofA-wuyMiEQX7iddOO5DEc2UE,84818
177
177
  sqlalchemy/orm/writeonly.py,sha256=OqRWliWa_9muWZII_CtDOm58YMYxNQWtaP6F_r9k-ig,22297
178
178
  sqlalchemy/pool/__init__.py,sha256=R0tdjvXH2TfTv8sS36CDs3g3RVwnno3eXWlfNJhhze0,1804
179
- sqlalchemy/pool/base.py,sha256=L92kOFvTt_SMEZvuC2ZYuqRXs3isVAqZPLW-E3zxo-M,55840
179
+ sqlalchemy/pool/base.py,sha256=1Zq5CnvGV3fjUXSDOQex6jx9OAS6Co7H8ezwpRwCB5I,56508
180
180
  sqlalchemy/pool/events.py,sha256=Fma2EvUl8XfbnPEYsRYmarRtumYJmpFTExxvO4bmOmk,13455
181
181
  sqlalchemy/pool/impl.py,sha256=7ROIywKBUO2tKoVULZmAj4GdHn6AM7sZv2DiLsu7Mgo,19307
182
182
  sqlalchemy/sql/__init__.py,sha256=X6VqQucEmXS5_0jW4Ik5768yJ--RwNPLCeV0ptoSG3k,5820
@@ -195,7 +195,7 @@ sqlalchemy/sql/crud.py,sha256=nCFEdYyodH995HawyqFaIltIe2r3KKYAF9RrXgkw8WU,59880
195
195
  sqlalchemy/sql/ddl.py,sha256=fJabeoCAj3Yc6RrmaiGBUiSnKG0xZe7eWZs5QgtJ2LI,47994
196
196
  sqlalchemy/sql/default_comparator.py,sha256=jaxd49IC1flS349qPZ2ZcJhHl1ayA-BuWq52B4RaJew,16706
197
197
  sqlalchemy/sql/dml.py,sha256=l64Mhi59_paz5h188vW07dUqGo-wXZ-V0_V8SEOdLpI,67039
198
- sqlalchemy/sql/elements.py,sha256=l8zk1ZJ9tqNFtjfIWmxNwfAqKYtWe5gGU9x2RLMOy6U,181612
198
+ sqlalchemy/sql/elements.py,sha256=dXOqP-PIflRJTzQcct_YumD5UCQqPVwyg8I_7b5O-nE,182077
199
199
  sqlalchemy/sql/events.py,sha256=xpqx3irkG8N3gysXAViLCqXXke9KCSU-6w4zZUdYXzw,18312
200
200
  sqlalchemy/sql/expression.py,sha256=ExolOUyIJ90eBZGpp0G5w29TXhJ0Vf4qyrKA-rKe9VU,7582
201
201
  sqlalchemy/sql/functions.py,sha256=Ws1jaG07G2zETpmJzyaMk24CDWMEXe1JRReTkY9J3p4,68652
@@ -204,7 +204,7 @@ sqlalchemy/sql/naming.py,sha256=w62T2yj6pafLNRe7SDUsutklHSYgIabXj2UtnaCJRSM,6855
204
204
  sqlalchemy/sql/operators.py,sha256=7h8oPww8gIzqyhizpiW-iyVNSFCEWUouGyMlhG1kXac,76792
205
205
  sqlalchemy/sql/roles.py,sha256=9KrnEd1mt5_Lm8G--7uKCKHVdrW3Pks3ZXSacQ79DQE,7662
206
206
  sqlalchemy/sql/schema.py,sha256=a9IzgHBihBA6R6szIfXxpgLemf7oksT0d-Wc5MASM_0,230502
207
- sqlalchemy/sql/selectable.py,sha256=2dKbEmRaKAZYYkg0HSAub9UBA5IqoqoJuJNe_K3MTpU,244675
207
+ sqlalchemy/sql/selectable.py,sha256=bxUYfI532pae14xWVZYS4zj0zXwpprBCEPVj6aPJ91s,247653
208
208
  sqlalchemy/sql/sqltypes.py,sha256=_2JnttMKMBG2hgoX5wizD9uNp9LTnFdk-Y-jdJDilYI,132644
209
209
  sqlalchemy/sql/traversals.py,sha256=nN1MDmqxKQA5WHAolJfLbDylSCkugu0D44iFLKoiFdc,33663
210
210
  sqlalchemy/sql/type_api.py,sha256=34zisNPcH0Sh4AP2MZWfDu29ayobjJdy86sSC2brN_g,86430
@@ -249,13 +249,13 @@ sqlalchemy/testing/suite/test_sequence.py,sha256=8a6UO3pjRFnQ23ELG9m5cMMRoD3iD7a
249
249
  sqlalchemy/testing/suite/test_types.py,sha256=lWbY_a39cbDh549hEgPcqkivy8U8IxmJEu5TB2_AGW8,74572
250
250
  sqlalchemy/testing/suite/test_unicode_ddl.py,sha256=tVLf9RqCJe-CsyhCWL9d-WuWazDx5iWYzoBrSCbgjXs,6141
251
251
  sqlalchemy/testing/suite/test_update_delete.py,sha256=llAnxDGvbK-C7CzEXbSNEjczhOSL1sKTLuzGyJahqV8,5195
252
- sqlalchemy/util/__init__.py,sha256=-8xDtPchwgZbqTz1n0LjZPDAqrV0zLYxzqSykBY2sr0,8535
252
+ sqlalchemy/util/__init__.py,sha256=xH1LKtiS_SV_t4yrdo7BPsBqmMQxN4eVw5hhevZ3544,8624
253
253
  sqlalchemy/util/_collections.py,sha256=EZ1GjqrZieXpltJqGws8psbvW0Hry09IiyGy26FcaxE,20011
254
254
  sqlalchemy/util/_concurrency_py3k.py,sha256=d9j6lSK_RRImFq_ItBBOlI25bAjdq7Ts9NnNxpoNbSw,9170
255
255
  sqlalchemy/util/_has_cy.py,sha256=hy1eXhxE25VT5bvWIKX6jtfqjawSQBnssrTbGo8kw9Q,1247
256
256
  sqlalchemy/util/_py_collections.py,sha256=9kc23VK2LWYoIJYIp-xEj26EQA8OLFCYcdTxjAYfj2k,16886
257
257
  sqlalchemy/util/compat.py,sha256=bzXtCcRoqBqRD1RkjTU1ROme62e_DEJsJ_hjRzyAHmc,14307
258
- sqlalchemy/util/concurrency.py,sha256=Qr7bVBAehbv8gv6--dqg8By5pTE2oIdinZMc7rcEsew,3350
258
+ sqlalchemy/util/concurrency.py,sha256=YZbAaX667VOwwVlorO3wKt11nU8WkMFUPWc51uaGIvE,3458
259
259
  sqlalchemy/util/deprecations.py,sha256=FaXayotv2JoI2UXwKxuCMMGZ8emX1W1dX4kQN06bRmY,12012
260
260
  sqlalchemy/util/langhelpers.py,sha256=Cfa011u-M5wgGySD3qvqys2HBNMlQ-TmYO95pNHG-Bw,68685
261
261
  sqlalchemy/util/preloaded.py,sha256=BvEjS_KDVIlsErMGM2hCSLFWLeMkCgd_b-D58b1Quww,5905
@@ -263,9 +263,9 @@ sqlalchemy/util/queue.py,sha256=N0y9hAQtvizeoFAfNPpkIajX2Y7ufw0MCsf6YR6iN94,1049
263
263
  sqlalchemy/util/tool_support.py,sha256=iZSwvKdF5pA8UtXuwbtln6dEDgerKJWasELSi7q6Epw,6136
264
264
  sqlalchemy/util/topological.py,sha256=yMpaA2s0JYIekQF4XKwzJzy8lVo-8yeo8o1J2xzxq48,3451
265
265
  sqlalchemy/util/typing.py,sha256=ae0GtYSpsuoEIIn-tDlKtfRfUQ-x-IfX4p2zhf78m0w,22571
266
- sqlalchemy-2.0.56.dist-info/licenses/AUTHORS,sha256=3B2wtdF0Va3De2k_-OQJyagPYD5EFpWCVRjDb3hslj4,492
267
- sqlalchemy-2.0.56.dist-info/licenses/LICENSE,sha256=6GK7W5BPtVE8PhQojXoloS6w7MeEegqWXTEOmpVefLk,1100
268
- sqlalchemy-2.0.56.dist-info/METADATA,sha256=dPUKPCRY_96Fe0facDae5CBgd4Ev7wteUWSCusjTfDw,9638
269
- sqlalchemy-2.0.56.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
270
- sqlalchemy-2.0.56.dist-info/top_level.txt,sha256=rp-ZgB7D8G11ivXON5VGPjupT1voYmWqkciDt5Uaw_Q,11
271
- sqlalchemy-2.0.56.dist-info/RECORD,,
266
+ sqlalchemy-2.0.58.dist-info/licenses/AUTHORS,sha256=3B2wtdF0Va3De2k_-OQJyagPYD5EFpWCVRjDb3hslj4,492
267
+ sqlalchemy-2.0.58.dist-info/licenses/LICENSE,sha256=6GK7W5BPtVE8PhQojXoloS6w7MeEegqWXTEOmpVefLk,1100
268
+ sqlalchemy-2.0.58.dist-info/METADATA,sha256=W_zZuAyGODdHFZN7lK3PXiDx3aHKh1M6IwwPP0if5uw,9638
269
+ sqlalchemy-2.0.58.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
270
+ sqlalchemy-2.0.58.dist-info/top_level.txt,sha256=rp-ZgB7D8G11ivXON5VGPjupT1voYmWqkciDt5Uaw_Q,11
271
+ sqlalchemy-2.0.58.dist-info/RECORD,,