<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/orm/test_update_delete.py, branch master</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>Modernize tests - session_query_get</title>
<updated>2021-10-29T00:31:09+00:00</updated>
<author>
<name>Gord Thompson</name>
<email>gord@gordthompson.com</email>
</author>
<published>2021-09-30T23:39:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=6a786297014c7b2a381084299ac3b4aabcf3c318'/>
<id>6a786297014c7b2a381084299ac3b4aabcf3c318</id>
<content type='text'>
Co-authored-by: Mike Bayer &lt;mike_mp@zzzcomputing.com&gt;
Change-Id: I92013aad471baf32df1b51b756e86d95449b5cfd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Mike Bayer &lt;mike_mp@zzzcomputing.com&gt;
Change-Id: I92013aad471baf32df1b51b756e86d95449b5cfd
</pre>
</div>
</content>
</entry>
<entry>
<title>process bulk_update_tuples before cache key or compilation</title>
<updated>2021-10-19T19:10:14+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-10-19T18:07:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=18b4a3437a60fbfa0c25287d9a3b83d7c9d4f762'/>
<id>18b4a3437a60fbfa0c25287d9a3b83d7c9d4f762</id>
<content type='text'>
Fixed regression where the use of a :class:`_orm.hybrid_property` attribute
or a mapped :func:`_orm.composite` attribute as a key passed to the
:meth:`_dml.Update.values` method for an ORM-enabled :class:`_dml.Update`
statement, as well as when using it via the legacy
:meth:`_orm.Query.update` method, would be processed for incoming
ORM/hybrid/composite values within the compilation stage of the UPDATE
statement, which meant that in those cases where caching occurred,
subsequent invocations of the same statement would no longer receive the
correct values. This would include not only hybrids that use the
:meth:`_orm.hybrid_property.update_expression` method, but any use of a
plain hybrid attribute as well. For composites, the issue instead caused a
non-repeatable cache key to be generated, which would break caching and
could fill up the statement cache with repeated statements.

The :class:`_dml.Update` construct now handles the processing of key/value
pairs passed to :meth:`_dml.Update.values` and
:meth:`_dml.Update.ordered_values` up front when the construct is first
generated, before the cache key has been generated so that the key/value
pairs are processed each time, and so that the cache key is generated
against the individual column/value pairs that will ultimately be
used in the statement.

Fixes: #7209
Change-Id: I08f248d1d60ea9690b014c21439b775d951fb9e5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed regression where the use of a :class:`_orm.hybrid_property` attribute
or a mapped :func:`_orm.composite` attribute as a key passed to the
:meth:`_dml.Update.values` method for an ORM-enabled :class:`_dml.Update`
statement, as well as when using it via the legacy
:meth:`_orm.Query.update` method, would be processed for incoming
ORM/hybrid/composite values within the compilation stage of the UPDATE
statement, which meant that in those cases where caching occurred,
subsequent invocations of the same statement would no longer receive the
correct values. This would include not only hybrids that use the
:meth:`_orm.hybrid_property.update_expression` method, but any use of a
plain hybrid attribute as well. For composites, the issue instead caused a
non-repeatable cache key to be generated, which would break caching and
could fill up the statement cache with repeated statements.

The :class:`_dml.Update` construct now handles the processing of key/value
pairs passed to :meth:`_dml.Update.values` and
:meth:`_dml.Update.ordered_values` up front when the construct is first
generated, before the cache key has been generated so that the key/value
pairs are processed each time, and so that the cache key is generated
against the individual column/value pairs that will ultimately be
used in the statement.

Fixes: #7209
Change-Id: I08f248d1d60ea9690b014c21439b775d951fb9e5
</pre>
</div>
</content>
</entry>
<entry>
<title>Modernize tests - calling_mapper_directly</title>
<updated>2021-09-30T14:10:16+00:00</updated>
<author>
<name>Gord Thompson</name>
<email>gord@gordthompson.com</email>
</author>
<published>2021-08-12T19:04:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=257f9130c321aaa948690d0e49c7352ad1188abd'/>
<id>257f9130c321aaa948690d0e49c7352ad1188abd</id>
<content type='text'>
a few changes for py2k:

* map_imperatively() includes the check that a class
  is being sent, this was only working for mapper() before

* the test suite didn't place the py2k "autouse" workaround
  in the correct order, seemingly, tried to adjust the
  per-test ordering setup in pytestplugin.py

Change-Id: I4cc39630724e810953cfda7b2afdadc8b948e3c2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a few changes for py2k:

* map_imperatively() includes the check that a class
  is being sent, this was only working for mapper() before

* the test suite didn't place the py2k "autouse" workaround
  in the correct order, seemingly, tried to adjust the
  per-test ordering setup in pytestplugin.py

Change-Id: I4cc39630724e810953cfda7b2afdadc8b948e3c2
</pre>
</div>
</content>
</entry>
<entry>
<title>test_update_delete - fix the fixed comment (#7020)</title>
<updated>2021-09-12T18:46:48+00:00</updated>
<author>
<name>Daniel Black</name>
<email>daniel@mariadb.org</email>
</author>
<published>2021-09-12T18:46:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=0277ec7b9d894b16b5ef83ec722c321d5cb3c0e4'/>
<id>0277ec7b9d894b16b5ef83ec722c321d5cb3c0e4</id>
<content type='text'>
Spelling Criteria right.

Fixes 3ea321ce22438c5b7450e027d087437474eb4498

Also makes it PEP8 compatible again to be under 80
characters.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Spelling Criteria right.

Fixes 3ea321ce22438c5b7450e027d087437474eb4498

Also makes it PEP8 compatible again to be under 80
characters.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix various lib / test / examples typos (#7017)</title>
<updated>2021-09-11T20:26:59+00:00</updated>
<author>
<name>Kevin Kirsche</name>
<email>kevin.kirsche@one.verizon.com</email>
</author>
<published>2021-09-11T20:26:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=3ea321ce22438c5b7450e027d087437474eb4498'/>
<id>3ea321ce22438c5b7450e027d087437474eb4498</id>
<content type='text'>
* fix: lib/sqlalchemy/sql/lambdas.py

* fix: lib/sqlalchemy/sql/compiler.py

* fix: lib/sqlalchemy/sql/selectable.py

* fix: lib/sqlalchemy/orm/relationships.py

* fix: lib/sqlalchemy/dialects/mssql/base.py

* fix: lib/sql/test_compiler.py

* fix: lib/sqlalchemy/testing/requirements.py

* fix: lib/sqlalchemy/orm/path_registry.py

* fix: lib/sqlalchemy/dialects/postgresql/psycopg2.py

* fix: lib/sqlalchemy/cextension/immutabledict.c

* fix: lib/sqlalchemy/cextension/resultproxy.c

* fix: ./lib/sqlalchemy/dialects/oracle/cx_oracle.py

* fix: examples/versioned_rows/versioned_rows_w_versionid.py

* fix: examples/elementtree/optimized_al.py

* fix: test/orm/test_attribute.py

* fix: test/sql/test_compare.py

* fix: test/sql/test_type_expression.py

* fix: capitalization in test/dialect/mysql/test_compiler.py

* fix: typos in test/dialect/postgresql/test_reflection.py

* fix: typo in tox.ini comment

* fix: typo in /lib/sqlalchemy/orm/decl_api.py

* fix: typo in test/orm/test_update_delete.py

* fix: self-induced typo

* fix: typo in test/orm/test_query.py

* fix: typos in test/dialect/mssql/test_types.py

* fix: typo in test/sql/test_types.py</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix: lib/sqlalchemy/sql/lambdas.py

* fix: lib/sqlalchemy/sql/compiler.py

* fix: lib/sqlalchemy/sql/selectable.py

* fix: lib/sqlalchemy/orm/relationships.py

* fix: lib/sqlalchemy/dialects/mssql/base.py

* fix: lib/sql/test_compiler.py

* fix: lib/sqlalchemy/testing/requirements.py

* fix: lib/sqlalchemy/orm/path_registry.py

* fix: lib/sqlalchemy/dialects/postgresql/psycopg2.py

* fix: lib/sqlalchemy/cextension/immutabledict.c

* fix: lib/sqlalchemy/cextension/resultproxy.c

* fix: ./lib/sqlalchemy/dialects/oracle/cx_oracle.py

* fix: examples/versioned_rows/versioned_rows_w_versionid.py

* fix: examples/elementtree/optimized_al.py

* fix: test/orm/test_attribute.py

* fix: test/sql/test_compare.py

* fix: test/sql/test_type_expression.py

* fix: capitalization in test/dialect/mysql/test_compiler.py

* fix: typos in test/dialect/postgresql/test_reflection.py

* fix: typo in tox.ini comment

* fix: typo in /lib/sqlalchemy/orm/decl_api.py

* fix: typo in test/orm/test_update_delete.py

* fix: self-induced typo

* fix: typo in test/orm/test_query.py

* fix: typos in test/dialect/mssql/test_types.py

* fix: typo in test/sql/test_types.py</pre>
</div>
</content>
</entry>
<entry>
<title>dont warn for dictionary passed positionally</title>
<updated>2021-07-21T20:00:12+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-07-20T15:03:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=27ec4929198807702190b96d3c00d0291976f49e'/>
<id>27ec4929198807702190b96d3c00d0291976f49e</id>
<content type='text'>
Fixed issue where use of the :paramref:`_sql.case.whens` parameter passing
a dictionary positionally and not as a keyword argument would emit a 2.0
deprecation warning, referring to the deprecation of passing a list
positionally. The dictionary format of "whens", passed positionally, is
still supported and was accidentally marked as deprecated.

Removes warning filter for case statement.

Fixes: #6786
Change-Id: I8efd1882563773bec89ae5e34f0dfede77fc4683
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed issue where use of the :paramref:`_sql.case.whens` parameter passing
a dictionary positionally and not as a keyword argument would emit a 2.0
deprecation warning, referring to the deprecation of passing a list
positionally. The dictionary format of "whens", passed positionally, is
still supported and was accidentally marked as deprecated.

Removes warning filter for case statement.

Fixes: #6786
Change-Id: I8efd1882563773bec89ae5e34f0dfede77fc4683
</pre>
</div>
</content>
</entry>
<entry>
<title>Update black flak8 and zimports</title>
<updated>2021-05-12T20:10:19+00:00</updated>
<author>
<name>Federico Caselli</name>
<email>cfederico87@gmail.com</email>
</author>
<published>2021-05-12T20:01:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=debeea97eeae4b4a39a2d50f2a2d96c366421a30'/>
<id>debeea97eeae4b4a39a2d50f2a2d96c366421a30</id>
<content type='text'>
Change-Id: I488c9557eda390e4a88319affd4c8813ee274f80
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I488c9557eda390e4a88319affd4c8813ee274f80
</pre>
</div>
</content>
</entry>
<entry>
<title>repair rowcount test</title>
<updated>2021-03-31T17:55:30+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-03-31T17:55:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f849eebdfed86d8f63ce04059ac09b542ccd7c1b'/>
<id>f849eebdfed86d8f63ce04059ac09b542ccd7c1b</id>
<content type='text'>
in 42185a1f3866bfc8ebffa2a6c724fac I pushed a simple rowcount
assertion, forgetting that we have some mssql case where rowcount
is not supported.

Change-Id: I2e86ed9da05723ac5c0929cb8bb156117d581905
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in 42185a1f3866bfc8ebffa2a6c724fac I pushed a simple rowcount
assertion, forgetting that we have some mssql case where rowcount
is not supported.

Change-Id: I2e86ed9da05723ac5c0929cb8bb156117d581905
</pre>
</div>
</content>
</entry>
<entry>
<title>document rowcount for ORM update/delete</title>
<updated>2021-03-31T13:42:47+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-03-31T13:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=42185a1f3866bfc8ebffa2a6c724face8a2db5dc'/>
<id>42185a1f3866bfc8ebffa2a6c724face8a2db5dc</id>
<content type='text'>
Change-Id: I16f50cb50fc3cccc1bd7cae3a64a085b1ea68612
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I16f50cb50fc3cccc1bd7cae3a64a085b1ea68612
</pre>
</div>
</content>
</entry>
<entry>
<title>Use explicit names for mapper _get_clause parameters</title>
<updated>2021-03-17T17:56:17+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-03-17T15:04:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=5f9c45400556f821550e7a39331f1bd5af5a34ce'/>
<id>5f9c45400556f821550e7a39331f1bd5af5a34ce</id>
<content type='text'>
Fixed a critical regression in the relationship lazy loader where the SQL
criteria used to fetch a related many-to-one object could go stale in
relation to other memoized structures within the loader if the mapper had
configuration changes, such as can occur when mappers are late configured
or configured on demand, producing a comparison to None and returning no
object. Huge thanks to Alan Hamlett for their help tracking this down late
into the night.

The primary change is that mapper._get_clause() uses a fixed name
for its bound parameters, which is memoized under a lambda statement
in the case of many-to-one lazy loading.  This has implications for some other
logic namely the .compare() used by loader strategies to determine
use_get needed to be adjusted.

This change also repairs the lambda module's behavior of removing
the "required" flag from bound parameters, which caused this issue
to also fail silently rather than issuing an error for a required
bind parameter.

Fixes: #6055
Change-Id: I19e1aba9207a049873e0f13c19bad7541e223cfd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed a critical regression in the relationship lazy loader where the SQL
criteria used to fetch a related many-to-one object could go stale in
relation to other memoized structures within the loader if the mapper had
configuration changes, such as can occur when mappers are late configured
or configured on demand, producing a comparison to None and returning no
object. Huge thanks to Alan Hamlett for their help tracking this down late
into the night.

The primary change is that mapper._get_clause() uses a fixed name
for its bound parameters, which is memoized under a lambda statement
in the case of many-to-one lazy loading.  This has implications for some other
logic namely the .compare() used by loader strategies to determine
use_get needed to be adjusted.

This change also repairs the lambda module's behavior of removing
the "required" flag from bound parameters, which caused this issue
to also fail silently rather than issuing an error for a required
bind parameter.

Fixes: #6055
Change-Id: I19e1aba9207a049873e0f13c19bad7541e223cfd
</pre>
</div>
</content>
</entry>
</feed>
