<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/testing/assertions.py, branch master</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>2.0 removals: LegacyRow, connectionless execution, close_with_result</title>
<updated>2021-10-31T19:37:08+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-10-30T18:44:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=aa026c302c6b188a7e28508f9ecb603809b9e03f'/>
<id>aa026c302c6b188a7e28508f9ecb603809b9e03f</id>
<content type='text'>
in order to remove LegacyRow / LegacyResult, we have
to also lose close_with_result, which connectionless
execution relies upon.

also includes a new profiles.txt file that's all against
py310, as that's what CI is on now.  some result counts
changed by one function call which was enough to fail the
low-count result tests.

Replaces Connectable as the common interface between
Connection and Engine with EngineEventsTarget.  Engine
is no longer Connectable.  Connection and MockConnection
still are.

References: #7257
Change-Id: Iad5eba0313836d347e65490349a22b061356896a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in order to remove LegacyRow / LegacyResult, we have
to also lose close_with_result, which connectionless
execution relies upon.

also includes a new profiles.txt file that's all against
py310, as that's what CI is on now.  some result counts
changed by one function call which was enough to fail the
low-count result tests.

Replaces Connectable as the common interface between
Connection and Engine with EngineEventsTarget.  Engine
is no longer Connectable.  Connection and MockConnection
still are.

References: #7257
Change-Id: Iad5eba0313836d347e65490349a22b061356896a
</pre>
</div>
</content>
</entry>
<entry>
<title>deprecation warnings: with_parent, aliased, from_joinpoint</title>
<updated>2021-10-27T15:41:00+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-10-26T19:37:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=0f98ead274df103a5a623baa3898580932e1c8e2'/>
<id>0f98ead274df103a5a623baa3898580932e1c8e2</id>
<content type='text'>
most of the work for aliased / from_joinpoint has been done
already as I added all new tests for these and moved
most aliased/from_joinpoint to test/orm/test_deprecations.py
already

Change-Id: Ia23e332dec183de17b2fb9d89d946af8d5e89ae7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
most of the work for aliased / from_joinpoint has been done
already as I added all new tests for these and moved
most aliased/from_joinpoint to test/orm/test_deprecations.py
already

Change-Id: Ia23e332dec183de17b2fb9d89d946af8d5e89ae7
</pre>
</div>
</content>
</entry>
<entry>
<title>warn or deprecate for auto-aliasing in joins</title>
<updated>2021-09-28T17:27:54+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-09-04T16:12:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=6ce0d644db60ce6ea89eb15a76e078c4fa1a9066'/>
<id>6ce0d644db60ce6ea89eb15a76e078c4fa1a9066</id>
<content type='text'>
An extra layer of warning messages has been added to the functionality
of :meth:`_orm.Query.join` and the ORM version of
:meth:`_sql.Select.join`, where a few places where "automatic aliasing"
continues to occur will now be called out as a pattern to avoid, mostly
specific to the area of joined table inheritance where classes that share
common base tables are being joined together without using explicit aliases.
One case emits a legacy warning for a pattern that's not recommended,
the other case is fully deprecated.

The automatic aliasing within ORM join() which occurs for overlapping
mapped tables does not work consistently with all APIs such as
``contains_eager()``, and rather than continue to try to make these use
cases work everywhere, replacing with a more user-explicit pattern
is clearer, less prone to bugs and simplifies SQLAlchemy's internals
further.

The warnings include links to the errors.rst page where each pattern is
demonstrated along with the recommended pattern to fix.

* Improved the exception message generated when configuring a mapping with
  joined table inheritance where the two tables either have no foreign key
  relationships set up, or where they have multiple foreign key relationships
  set up. The message is now ORM specific and includes context that the
  :paramref:`_orm.Mapper.inherit_condition` parameter may be needed
  particularly for the ambiguous foreign keys case.

* Add explicit support in the _expect_warnings() assertion for nested
  _expect_warnings calls

* generalize the NoCache fixture, which we also need to catch warnings
  during compilation consistently

* generalize the __str__() method for the HasCode mixin so all warnings
  and errors include the code link in their string

Fixes: #6974
Change-Id: I84ed79ba2112c39eaab7973b6d6f46de7fa80842
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An extra layer of warning messages has been added to the functionality
of :meth:`_orm.Query.join` and the ORM version of
:meth:`_sql.Select.join`, where a few places where "automatic aliasing"
continues to occur will now be called out as a pattern to avoid, mostly
specific to the area of joined table inheritance where classes that share
common base tables are being joined together without using explicit aliases.
One case emits a legacy warning for a pattern that's not recommended,
the other case is fully deprecated.

The automatic aliasing within ORM join() which occurs for overlapping
mapped tables does not work consistently with all APIs such as
``contains_eager()``, and rather than continue to try to make these use
cases work everywhere, replacing with a more user-explicit pattern
is clearer, less prone to bugs and simplifies SQLAlchemy's internals
further.

The warnings include links to the errors.rst page where each pattern is
demonstrated along with the recommended pattern to fix.

* Improved the exception message generated when configuring a mapping with
  joined table inheritance where the two tables either have no foreign key
  relationships set up, or where they have multiple foreign key relationships
  set up. The message is now ORM specific and includes context that the
  :paramref:`_orm.Mapper.inherit_condition` parameter may be needed
  particularly for the ambiguous foreign keys case.

* Add explicit support in the _expect_warnings() assertion for nested
  _expect_warnings calls

* generalize the NoCache fixture, which we also need to catch warnings
  during compilation consistently

* generalize the __str__() method for the HasCode mixin so all warnings
  and errors include the code link in their string

Fixes: #6974
Change-Id: I84ed79ba2112c39eaab7973b6d6f46de7fa80842
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace all http:// links to https://</title>
<updated>2021-07-04T18:54:33+00:00</updated>
<author>
<name>Federico Caselli</name>
<email>cfederico87@gmail.com</email>
</author>
<published>2021-07-04T17:29:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=fb81f9c8d914f9911925dd3f4e77d7fc374b267c'/>
<id>fb81f9c8d914f9911925dd3f4e77d7fc374b267c</id>
<content type='text'>
Also replace http://pypi.python.org/pypi with https://pypi.org/project

Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also replace http://pypi.python.org/pypi with https://pypi.org/project

Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
</pre>
</div>
</content>
</entry>
<entry>
<title>init extra_criteria_entities in fromstatement w/ DML</title>
<updated>2021-06-07T13:22:47+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-06-07T13:21:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=94169108cdd4dace09b752a6af4f4404819b49a3'/>
<id>94169108cdd4dace09b752a6af4f4404819b49a3</id>
<content type='text'>
Fixed issue in experimental "select ORM objects from INSERT/UPDATE" use
case where an error was raised if the statement were against a
single-table-inheritance subclass.

Additionally makes some adjustments in the SQL assertion
fixture to test a FromStatement w/ DML.

Fixes: #6591
Change-Id: I53a627ab18a01dc6d9b5037e28312a1177891327
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed issue in experimental "select ORM objects from INSERT/UPDATE" use
case where an error was raised if the statement were against a
single-table-inheritance subclass.

Additionally makes some adjustments in the SQL assertion
fixture to test a FromStatement w/ DML.

Fixes: #6591
Change-Id: I53a627ab18a01dc6d9b5037e28312a1177891327
</pre>
</div>
</content>
</entry>
<entry>
<title>delete exception traceback in _expect_raises</title>
<updated>2021-06-03T03:07:28+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-06-03T03:07:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=dcdc9442ed94f0857a62de40e17e588250f0576e'/>
<id>dcdc9442ed94f0857a62de40e17e588250f0576e</id>
<content type='text'>
a new segfault is observed in python 3.10.0b2 in conjunction
with asyncio and possibly greenlet.   Ensuring the
traceback object is deleted from scope here, which is a
good idea anyway, apparently seems to resolve the issue.

Change-Id: Ia83bafb088ef19853044f1d436db259cbfd1e5f4
References: https://github.com/python-greenlet/greenlet/issues/242
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a new segfault is observed in python 3.10.0b2 in conjunction
with asyncio and possibly greenlet.   Ensuring the
traceback object is deleted from scope here, which is a
good idea anyway, apparently seems to resolve the issue.

Change-Id: Ia83bafb088ef19853044f1d436db259cbfd1e5f4
References: https://github.com/python-greenlet/greenlet/issues/242
</pre>
</div>
</content>
</entry>
<entry>
<title>Support DEFAULT VALUES and VALUES(DEFAULT) individually</title>
<updated>2021-04-14T16:51:58+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-04-13T14:52:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=94a1c523984e2082bb16d784cf8615061ba9d49a'/>
<id>94a1c523984e2082bb16d784cf8615061ba9d49a</id>
<content type='text'>
Fixed regression where the introduction of the INSERT syntax "INSERT...
VALUES (DEFAULT)" was not supported on some backends that do however
support "INSERT..DEFAULT VALUES", including SQLite. The two syntaxes are
now each individually supported or non-supported for each dialect, for
example MySQL supports "VALUES (DEFAULT)" but not "DEFAULT VALUES".
Support for Oracle is still not enabled as there are unresolved issues
in using RETURNING at the same time.

Fixes: #6254
Change-Id: I47959bc826e3d9d2396ccfa290eb084841b02e77
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed regression where the introduction of the INSERT syntax "INSERT...
VALUES (DEFAULT)" was not supported on some backends that do however
support "INSERT..DEFAULT VALUES", including SQLite. The two syntaxes are
now each individually supported or non-supported for each dialect, for
example MySQL supports "VALUES (DEFAULT)" but not "DEFAULT VALUES".
Support for Oracle is still not enabled as there are unresolved issues
in using RETURNING at the same time.

Fixes: #6254
Change-Id: I47959bc826e3d9d2396ccfa290eb084841b02e77
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove internal use of string attr in loader option</title>
<updated>2021-03-23T17:45:52+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-03-23T02:56:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=9ec860e7a5c944799f9ef4de9069d707cfc1ed27'/>
<id>9ec860e7a5c944799f9ef4de9069d707cfc1ed27</id>
<content type='text'>
Fixed issue where a "removed in 2.0" warning were generated internally by
the relationship loader mechanics.

This changeset started the effort of converting all string usage
in the test suite, however this is a much longer job as the
use of strings in loader options is widespread.  In particular
I'm not totally comfortable with strings not being accepted
in obvious spots like Load(User).load_only("x", "y", "z"), which
points to a new string expecting functionality that's not
what's there now.  However at the moment it seems like we need
to continue removing all support for strings and then figure out
"immediate strings from an explicit class" later.

Fixes: #6115
Change-Id: I6b314d135d2bc049fd66500914b772c1fe60b5b3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed issue where a "removed in 2.0" warning were generated internally by
the relationship loader mechanics.

This changeset started the effort of converting all string usage
in the test suite, however this is a much longer job as the
use of strings in loader options is widespread.  In particular
I'm not totally comfortable with strings not being accepted
in obvious spots like Load(User).load_only("x", "y", "z"), which
points to a new string expecting functionality that's not
what's there now.  However at the moment it seems like we need
to continue removing all support for strings and then figure out
"immediate strings from an explicit class" later.

Fixes: #6115
Change-Id: I6b314d135d2bc049fd66500914b772c1fe60b5b3
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure all Query statements compile w/ orm, fix test harness</title>
<updated>2021-03-05T21:06:26+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-03-05T21:02:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=8b8a4c373e1cec2203f73b1772704b9ded75c1fe'/>
<id>8b8a4c373e1cec2203f73b1772704b9ded75c1fe</id>
<content type='text'>
Fixed regression where :meth:`_orm.Query.join` would produce no effect if
the query itself as well as the join target were against a
:class:`_schema.Table` object, rather than a mapped class. This was part of
a more systemic issue where the legacy ORM query compiler would not be
correctly used from a :class:`_orm.Query` if the statement produced had not
ORM entities present within it.

Also repair the assert_compile() method, which was using
Query._compile_state() which was bypassing the bug.   A handful
of ORM tests with Query objects and Core-only objects were actually
failing if the default compilation path were used.

Fixes: #6003
Change-Id: I97478b2d06bf6c01fe1f09ee118e1f2ac4c849bc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed regression where :meth:`_orm.Query.join` would produce no effect if
the query itself as well as the join target were against a
:class:`_schema.Table` object, rather than a mapped class. This was part of
a more systemic issue where the legacy ORM query compiler would not be
correctly used from a :class:`_orm.Query` if the statement produced had not
ORM entities present within it.

Also repair the assert_compile() method, which was using
Query._compile_state() which was bypassing the bug.   A handful
of ORM tests with Query objects and Core-only objects were actually
failing if the default compilation path were used.

Fixes: #6003
Change-Id: I97478b2d06bf6c01fe1f09ee118e1f2ac4c849bc
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert AppenderQuery modifications from ORM</title>
<updated>2021-02-25T22:19:19+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2021-02-25T22:07:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=852119c9f8235a75dcfa9339e6ebf2f57eb39154'/>
<id>852119c9f8235a75dcfa9339e6ebf2f57eb39154</id>
<content type='text'>
We are unfortunately stuck with this class completely
until we get rid of "dynamic" altogether.    The usage
contract includes the "query_class" mixin feature where
users add their own methods, and this use case  very
well in line with 2.0's contract.  As Query is not going away
in any case this has to stay in "legacy" style, there's no
point trying to change it as the new version was still fully
dependent on Query.

Fixes: #5981
Change-Id: I1bc623b17d976b4bb417ab623248d4ac227db74d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are unfortunately stuck with this class completely
until we get rid of "dynamic" altogether.    The usage
contract includes the "query_class" mixin feature where
users add their own methods, and this use case  very
well in line with 2.0's contract.  As Query is not going away
in any case this has to stay in "legacy" style, there's no
point trying to change it as the new version was still fully
dependent on Query.

Fixes: #5981
Change-Id: I1bc623b17d976b4bb417ab623248d4ac227db74d
</pre>
</div>
</content>
</entry>
</feed>
