summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "document get_bind() overrides for async session" into mainmike bayer2021-11-301-1/+78
|\ \
| * | document get_bind() overrides for async sessionMike Bayer2021-11-291-1/+78
| | | | | | | | | | | | | | | Change-Id: Ifcc936a5861d49857d1f365416190cfbd0981aac References: #7383
* | | scoped_session adjustmentsMike Bayer2021-11-302-4/+21
| | | | | | | | | | | | | | | | | | | | | * fix typo, change to a note the async scoped session note * more dragons re: threading.local() Change-Id: I76266507510e4014456d992656f4aadf6d03ba4a
* | | Merge "adapt pytest plugin to support pytest v7" into mainmike bayer2021-11-298-82/+103
|\ \ \ | |/ / |/| |
| * | adapt pytest plugin to support pytest v7Federico Caselli2021-11-298-82/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented support for the test suite to run correctly under Pytest 7. Previously, only Pytest 6.x was supported for Python 3, however the version was not pinned on the upper bound in tox.ini. Pytest is not pinned in tox.ini to be lower than version 8 so that SQLAlchemy versions released with the current codebase will be able to be tested under tox without changes to the environment. Much thanks to the Pytest developers for their help with this issue. Change-Id: I3b12166199be2b913ee16e78b3ebbff415654396
* | | Merge "provide connectionfairy on initialize" into mainmike bayer2021-11-2938-510/+1276
|\ \ \ | |/ / |/| |
| * | provide connectionfairy on initializeMike Bayer2021-11-2938-510/+1276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is so that dialect methods that are called within init can assume the same argument structure as when they are called in other places; we can nail down the type of object as well. This change seems to mostly impact the isolation level routines in the dialects, as these are called during initialize() as well as on established connections. these methods can now assume a non-proxied DBAPI connection object in all cases, as it is commonly required that attributes like ".autocommit" are set on the object which don't work well in a proxied situation. Other changes: * adds an interface for the "connectionfairy" concept called PoolProxiedConnection. * Removes ``Connectable`` superclass of Connection. ``Connectable`` was originally meant to provide for the "method which accepts connection or engine" theme. As this pattern is greatly reduced in 2.0 and Engine no longer extends from it, the ``Connectable`` superclass doesnt serve any real purpose. Leading from that, to set this in I also applied pep 484 annotations to the Dialect base, and then in the interests of seeing some of the typing information show up in my IDE did a little bit for Engine, Connection and others. I hope that it's feasible that we can add annotations to specific classes and attributes ahead of when we actually try to mass-populate the whole library. This was the original spirit of pep-484 that we can apply annotations gradually. I do of course want to try to do a mass-populate although i think even in that case we will end up doing a lot of manual work anyway (in particular for the changes here which are distinct from what the stubs have). Fixes: #7122 Change-Id: I5dd7fbff8a7ae520a81c165091af12a6a68826db
* | | update migration strategy for dynamic loadersMike Bayer2021-11-274-7/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | discuss the two current ways for this use case that use 2.0 style querying and introduce that a newer API is likely on the way. Also repair autofunctions for with_parent for 2.0 only. References: #7123 References: #7372 Change-Id: I2ff6cfd780540ee4ee887b61137af7afa1327a9f
* | | Fix a typo in psycopg_async module name (#7369)Denis Laxalde2021-11-271-2/+2
| | |
* | | "graceful fetch" test should....clean up gracefully!Mike Bayer2021-11-261-25/+25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this test was relying on gc to close out the connection. this would lead to problems with aiosqlite as we invalidate async connetions that aren't gracefully closed, and this test suite was create tables per suite, so we'd get into a spot where a new sqlite memory connection without the tables would get set up. would only occur for full test run + -n2 + C extensions + python 3.7, but we assume that is all related to just getting gc to trigger or not trigger at exactly the right moment in this situation. confirmed if we add a gc.collect() to the test without explcitly closing out the conenction, the connection is gc'ed and detached, and we get the error reproduced on the subsequent test. Change-Id: Icc9d4bc703f0842c27600f532f34bc4c7d3baf21
* | Added support for ``psycopg`` dialect.Federico Caselli2021-11-2632-265/+1395
| | | | | | | | | | | | | | Both sync and async versions are supported. Fixes: #6842 Change-Id: I57751c5028acebfc6f9c43572562405453a2f2a4
* | Merge "propose emulated setinputsizes embedded in the compiler" into mainmike bayer2021-11-2525-443/+771
|\ \
| * | propose emulated setinputsizes embedded in the compilerMike Bayer2021-11-2325-443/+771
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new system so that PostgreSQL and other dialects have a reliable way to add casts to bound parameters in SQL statements, replacing previous use of setinputsizes() for PG dialects. rationale: 1. psycopg3 will be using the same SQLAlchemy-side "setinputsizes" as asyncpg, so we will be seeing a lot more of this 2. the full rendering that SQLAlchemy's compilation is performing is in the engine log as well as error messages. Without this, we introduce three levels of SQL rendering, the compiler, the hidden "setinputsizes" in SQLAlchemy, and then whatever the DBAPI driver does. With this new approach, users reporting bugs etc. will be less confused that there are as many as two separate layers of "hidden rendering"; SQLAlchemy's rendering is again fully transparent 3. calling upon a setinputsizes() method for every statement execution is expensive. this way, the work is done behind the caching layer 4. for "fast insertmany()", I also want there to be a fast approach towards setinputsizes. As it was, we were going to be taking a SQL INSERT with thousands of bound parameter placeholders and running a whole second pass on it to apply typecasts. this way, we will at least be able to build the SQL string once without a huge second pass over the whole string 5. psycopg2 can use this same system for its ARRAY casts 6. the general need for PostgreSQL to have lots of type casts is now mostly in the base PostgreSQL dialect and works independently of a DBAPI being present. dependence on DBAPI symbols that aren't complete / consistent / hashable is removed I was originally going to try to build this into bind_expression(), but it was revealed this worked poorly with custom bind_expression() as well as empty sets. the current impl also doesn't need to run a second expression pass over the POSTCOMPILE sections, which came out better than I originally thought it would. Change-Id: I363e6d593d059add7bcc6d1f6c3f91dd2e683c0c
* | | Merge "Clean up most py3k compat" into mainmike bayer2021-11-25173-2060/+971
|\ \ \
| * | | Clean up most py3k compatFederico Caselli2021-11-24173-2060/+971
| |/ / | | | | | | | | | Change-Id: I8172fdcc3103ff92aa049827728484c8779af6b7
* | | Try fixing ``ORMExecuteState`` again.Federico Caselli2021-11-241-1/+1
| | | | | | | | | | | | | | | | | | follow up of 7c3d3670c68298e88d03bc8f02e01c6a3f7fe42f Change-Id: I3e9b7ab458677efcf47256103543fcc6db2a3076
* | | Improve ``ORMExecuteState`` documentationFederico Caselli2021-11-241-1/+0
|/ /
* | Support lightweight compiler column elements w/ slotsMike Bayer2021-11-229-94/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the _CompileLabel class included ``__slots__`` but these weren't used as the superclasses included slots. Create a ``__slots__`` superclass for ``ClauseElement``, creating a new class of compilable SQL elements that don't include heavier features like caching, annotations and cloning, which are meant to be used only in an ad-hoc compiler fashion. Create new ``CompilerColumnElement`` from that which serves in column-oriented contexts, but similarly does not include any expression operator support as it is intended to be used only to generate a string. Apply this to both ``_CompileLabel`` as well as PostgreSQL ``_ColonCast``, which does not actually subclass ``ColumnElement`` as this class has memoized attributes that aren't worth changing, and does not include SQL operator capabilities as these are not needed for these compiler-only objects. this allows us to more inexpensively add new ad-hoc labels / casts etc. at compile time, as we will be seeking to expand out the typecasts that are needed for PostgreSQL dialects in a subsequent patch. Change-Id: I52973ae3295cb6e2eb0d7adc816c678a626643ed
* | Remove object in class definitionFederico Caselli2021-11-22222-969/+969
| | | | | | | | | | References: #4600 Change-Id: I2a62ddfe00bc562720f0eae700a497495d7a987a
* | provide space for new 2.0 changes not part of upgrade pathMike Bayer2021-11-212-11/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we are going to be adding new improvements such as variant, cython, psycopg3, more RETURNING support, fast execution helpers, and probably a lot more, the 2.0 migration doc needs to also still have the "what's new in 2.0?" thing going on as well. Organize the document so it has space to introduce these sections, as well as the existing 1.4->2.0 migration sections. If the "What's New" document gets large, we will break up this page into two separate pages, it's already quite large, so the proposal would be the exising migration doc becomes a separate special migration document. Change-Id: I62496b30229806f4a82d1f92b3f4eda53e64df57
* | fix yearMike Bayer2021-11-211-1/+1
| | | | | | | | Change-Id: I56a325fde167501a53b588cc1b69255238ac1dbb
* | Merge "favor setuptools imports over distutils" into mainmike bayer2021-11-192-4/+24
|\ \
| * | favor setuptools imports over distutilsMike Bayer2021-11-172-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 3.10 has deprecated "distutils" in favor of explicit use of "setuptools" in :pep:`632`; SQLAlchemy's setup.py has replaced imports accordingly. However, since setuptools itself only recently added the replacement symbols mentioned in pep-632 as of November of 2022 in version 59.0.1, ``setup.py`` still has fallback imports to distutils, as SQLAlchemy 1.4 does not have a hard setuptools versioning requirement at this time. SQLAlchemy 2.0 is expected to use a full :pep:`517` installation layout which will indicate appropriate setuptools versioning up front. Fixes: #7311 Change-Id: I215ef3c3b226a38266f59d181214aea462c4664d
* | | Merge "generalize cache_ok to UserDefinedType" into mainmike bayer2021-11-197-65/+242
|\ \ \
| * | | generalize cache_ok to UserDefinedTypeMike Bayer2021-11-177-65/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extended the ``cache_ok`` flag and corresponding warning message if this flag is not defined, a behavior first established for :class:`.TypeDecorator` as part of :ticket:`6436`, to also take place for :class:`.UserDefinedType`, by generalizing the flag and associated caching logic to a new common base for these two types, :class:`.ExternalType`. The change means any current :class:`.UserDefinedType` will now cause SQL statement caching to no longer take place for statements which make use of the datatype, along with a warning being emitted, unless the class defines the :attr:`.UserDefinedType.cache_ok` flag as True. If the datatype cannot form a deterministic, hashable cache key derived from its arguments, it may return False which will continue to keep caching disabled but will suppress the warning. In particular, custom datatypes currently used in packages such as SQLAlchemy-utils will need to implement this flag. The issue was observed as a result of a SQLAlchemy-utils datatype that is not currently cacheable. Fixes: #7319 Change-Id: Ie0b5d4587df87bfe66d2fe7cd4585c3882584575
* | | | Merge "disable raiseerr for refresh state loader options" into mainmike bayer2021-11-183-1/+68
|\ \ \ \
| * | | | disable raiseerr for refresh state loader optionsMike Bayer2021-11-183-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed ORM regression where the new behavior of "eager loaders run on unexpire" added in :ticket:`1763` would lead to loader option errors being raised inappropriately for the case where a single :class:`_orm.Query` or :class:`_sql.Select` were used to load multiple kinds of entities, along with loader options that apply to just one of those kinds of entity like a :func:`_orm.joinedload`, and later the objects would be refreshed from expiration, where the loader options would attempt to be applied to the mismatched object type and then raise an exception. The check for this mismatch now bypasses raising an error for this case. Fixes: #7318 Change-Id: I111e0f3e0fb0447355574cbdcde002f734833490
* | | | | Merge "use typing.Dict" into mainmike bayer2021-11-182-4/+6
|\ \ \ \ \
| * | | | | use typing.DictMike Bayer2021-11-182-4/+6
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newer Pythons seem to accept ``dict[Any, Any]`` which is why this wasn't noticed. Revise fix for #7321 made in I55656e867876677c5c55143449db371344be8600. Fixes: #7321 Change-Id: Idc22e15d098543e07853f4532cfd1aaae4dd6404
* | | | | Merge "fully support isolation_level parameter in base dialect" into mainmike bayer2021-11-1826-326/+437
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | fully support isolation_level parameter in base dialectMike Bayer2021-11-1826-326/+437
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalized the :paramref:`_sa.create_engine.isolation_level` parameter to the base dialect so that it is no longer dependent on individual dialects to be present. This parameter sets up the "isolation level" setting to occur for all new database connections as soon as they are created by the connection pool, where the value then stays set without being reset on every checkin. The :paramref:`_sa.create_engine.isolation_level` parameter is essentially equivalent in functionality to using the :paramref:`_engine.Engine.execution_options.isolation_level` parameter via :meth:`_engine.Engine.execution_options` for an engine-wide setting. The difference is in that the former setting assigns the isolation level just once when a connection is created, the latter sets and resets the given level on each connection checkout. Fixes: #6342 Change-Id: Id81d6b1c1a94371d901ada728a610696e09e9741
* | | | Merge "remove "native decimal" warning" into mainmike bayer2021-11-187-50/+67
|\ \ \ \
| * | | | remove "native decimal" warningMike Bayer2021-11-177-50/+67
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the warning that emits from the :class:`_types.Numeric` type about DBAPIs not supporting Decimal values natively. This warning was oriented towards SQLite, which does not have any real way without additional extensions or workarounds of handling precision numeric values more than 15 significant digits as it only uses floating point math to represent numbers. As this is a known and documented limitation in SQLite itself, and not a quirk of the pysqlite driver, there's no need for SQLAlchemy to warn for this. The change does not otherwise modify how precision numerics are handled. Values can continue to be handled as ``Decimal()`` or ``float()`` as configured with the :class:`_types.Numeric`, :class:`_types.Float` , and related datatypes, just without the ability to maintain precision beyond 15 significant digits when using SQLite, unless alternate representations such as strings are used. Fixes: #7299 Change-Id: Ic570f8107177dec3ddbe94c7b43f40057b03276a
* | | | Merge "Add new sections regarding schemas and reflection" into mainmike bayer2021-11-187-43/+285
|\ \ \ \
| * | | | Add new sections regarding schemas and reflectionjonathan vanasco2021-11-177-43/+285
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add a new section to reflection.rst `Schemas and Reflection`. * this contains some text from the ticket * migrate some text from `Specifying the Schema Name` to new section * migrate some text from PostgreSQL dialect to new section * target text is made more generic * cross-reference the postgres and new sections to one another, to avoid duplication of docs * update some docs 'meta' to 'metadata_obj' Fixes: #4387 Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: I2b08672753fb2575d30ada07ead77587468fdade
* | | | Merge "handle dunder names in @declared_attr separately" into mainmike bayer2021-11-185-1/+83
|\ \ \ \
| * | | | handle dunder names in @declared_attr separatelyMike Bayer2021-11-175-1/+83
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed Mypy crash which would occur when using Mypy plugin against code which made use of :class:`_orm.declared_attr` methods for non-mapped names like ``__mapper_args__``, ``__table_args__``, or other dunder names, as the plugin would try to interpret these as mapped attributes which would then be later mis-handled. As part of this change, the decorated function is still converted by the plugin into a generic assignment statement (e.g. ``__mapper_args__: Any``) so that the argument signature can continue to be annotated in the same way one would for any other ``@classmethod`` without Mypy complaining about the wrong argument type for a method that isn't explicitly ``@classmethod``. Fixes: #7321 Change-Id: I55656e867876677c5c55143449db371344be8600
* | | | Merge "Deprecate create_engine.implicit_returning" into mainmike bayer2021-11-1818-736/+835
|\ \ \ \ | |_|/ / |/| | |
| * | | Deprecate create_engine.implicit_returningjonathan vanasco2021-11-0918-736/+835
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The :paramref:`_sa.create_engine.implicit_returning` parameter is deprecated on the :func:`_sa.create_engine` function only; the parameter remains available on the :class:`_schema.Table` object. This parameter was originally intended to enable the "implicit returning" feature of SQLAlchemy when it was first developed and was not enabled by default. Under modern use, there's no reason this parameter should be disabled, and it has been observed to cause confusion as it degrades performance and makes it more difficult for the ORM to retrieve recently inserted server defaults. The parameter remains available on :class:`_schema.Table` to specifically suit database-level edge cases which make RETURNING infeasible, the sole example currently being SQL Server's limitation that INSERT RETURNING may not be used on a table that has INSERT triggers on it. Also removed from the Oracle dialect some logic that would upgrade an Oracle 8/8i server version to use implicit returning if the parameter were explictly passed; these versions of Oracle still support RETURNING so the feature is now enabled for all Oracle versions. Fixes: #6962 Change-Id: Ib338e300cd7c8026c3083043f645084a8211aed8
* | | | Add Non linear CTE supportEric Masseran2021-11-164-30/+237
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Compound select" methods like :meth:`_sql.Select.union`, :meth:`_sql.Select.intersect_all` etc. now accept ``*other`` as an argument rather than ``other`` to allow for multiple additional SELECTs to be compounded with the parent statement at once. In particular, the change as applied to :meth:`_sql.CTE.union` and :meth:`_sql.CTE.union_all` now allow for a so-called "non-linear CTE" to be created with the :class:`_sql.CTE` construct, whereas previously there was no way to have more than two CTE sub-elements in a UNION together while still correctly calling upon the CTE in recursive fashion. Pull request courtesy Eric Masseran. Allow: ```sql WITH RECURSIVE nodes(x) AS ( SELECT 59 UNION SELECT aa FROM edge JOIN nodes ON bb=x UNION SELECT bb FROM edge JOIN nodes ON aa=x ) SELECT x FROM nodes; ``` Based on @zzzeek suggestion: https://github.com/sqlalchemy/sqlalchemy/pull/7133#issuecomment-933882348 Fixes: #7259 Closes: #7260 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7260 Pull-request-sha: 2565a5fd4b1940e92125e53aeaa731cc682f49bb Change-Id: I685c8379762b5fb6ab4107ff8f4d8a4de70c0ca6
* | | pass through docs for 2.0 styleMike Bayer2021-11-1111-129/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this change restores the orm/tutorial.rst and core/tutorial.rst files, hidden from the index with an update on the new tutorial. Also started noting Query is legacy, as we will have lots of docs to update for 2.0 style. Change-Id: I4f98eeaaa0fd6e03b9976320b568975fe6d06ade
* | | cherry-pick changelog update for 1.4.28Mike Bayer2021-11-111-0/+4
| | |
* | | cherry-pick changelog from 1.4.27Mike Bayer2021-11-1118-218/+235
| | |
* | | Merge "removals: all unicode encoding / decoding" into mainmike bayer2021-11-1126-1114/+101
|\ \ \
| * | | removals: all unicode encoding / decodingMike Bayer2021-11-1026-1114/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed here includes: * convert_unicode parameters * encoding create_engine() parameter * description encoding support * "non-unicode fallback" modes under Python 2 * String symbols regarding Python 2 non-unicode fallbacks * any concept of DBAPIs that don't accept unicode statements, unicode bound parameters, or that return bytes for strings anywhere except an explicit Binary / BLOB type * unicode processors in Python / C Risk factors: * Whether all DBAPIs do in fact return Unicode objects for all entries in cursor.description now * There was logic for mysql-connector trying to determine description encoding. A quick test shows Unicode coming back but it's not clear if there are still edge cases where they return bytes. if so, these are bugs in that driver, and at most we would only work around it in the mysql-connector DBAPI itself (but we won't do that either). * It seems like Oracle 8 was not expecting unicode bound parameters. I'm assuming this was all Python 2 stuff and does not apply for modern cx_Oracle under Python 3. * third party dialects relying upon built in unicode encoding/decoding but it's hard to imagine any non-SQLAlchemy database driver not dealing exclusively in Python unicode strings in Python 3 Change-Id: I97d762ef6d4dd836487b714d57d8136d0310f28a References: #7257
* | | | qualify asyncpg API tests for python 3.8Mike Bayer2021-11-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Getting TypeError: object MagicMock can't be used in 'await' expression for Python 3.7 and earlier. this test is not needed on all platforms it's confirming that two methods are present. Change-Id: If918add023c98c062ea0c1cd132a999647a2d35f
* | | | Merge "set within_columns_clause=False for all sub-elements of select()" ↵mike bayer2021-11-093-0/+62
|\ \ \ \ | | | | | | | | | | | | | | | into main
| * | | | set within_columns_clause=False for all sub-elements of select()Mike Bayer2021-11-093-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where using the feature of using a string label for ordering or grouping described at :ref:`tutorial_order_by_label` would fail to function correctly if used on a :class:`.CTE` construct, when the CTE were embedded inside of an enclosing :class:`_sql.Select` statement that itself was set up as a scalar subquery. Fixes: #7269 Change-Id: Ied6048a1c9a622374a418230c8cfedafa8d3f87e
* | | | | Merge "upgrade deferred loader to regular loader if refresh_state" into mainmike bayer2021-11-093-2/+195
|\ \ \ \ \
| * | | | | upgrade deferred loader to regular loader if refresh_stateMike Bayer2021-11-093-2/+195
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where deferred polymorphic loading of attributes from a joined-table inheritance subclass would fail to populate the attribute correctly if the :func:`_orm.load_only` option were used to originally exclude that attribute, in the case where the load_only were descending from a relationship loader option. The fix allows that other valid options such as ``defer(..., raiseload=True)`` etc. still function as expected. Fixes: #7304 Change-Id: I58b7ce7c450bcc52d2f0c9bfbcb4d747463ee9b2