summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Revise "literal parameters" FAQ sectionMike Bayer2021-11-011-1/+23
| | | | | | | | | | | | | | | | | | | | based on feedback in #7271, the emphasis on TypeDecorator as a solution to this problem is not very practical. illustrate a series of quick recipes that are useful for debugging purposes to print out a repr() or simple stringify of a parameter without the need to construct custom dialects or types. Change-Id: I788ce1b5ea01d88dd0a22d03d06f35aabff5e5c8
* | Merge "2.0 removals: LegacyRow, connectionless execution, close_with_result" ↵mike bayer2021-10-3116-719/+111
|\ \ | |/ |/| | | into main
| * 2.0 removals: LegacyRow, connectionless execution, close_with_resultMike Bayer2021-10-3116-719/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Remove deprecated dialects and drivers" into mainmike bayer2021-10-3126-3845/+12
|\ \
| * | Remove deprecated dialects and driversFederico Caselli2021-10-3126-3845/+12
| | | | | | | | | | | | | | | Fixes: #7258 Change-Id: I3577f665eca04f2632b69bcb090f0a4ec9271db9
* | | The ``has_table`` method now also checks viewsFederico Caselli2021-10-315-7/+54
| |/ |/| | | | | | | | | | | | | | | | | | | | | The :meth:`_engine.Inspector.has_table` method will now consistently check for views of the given name as well as tables. Previously this behavior was dialect dependent, with PostgreSQL, MySQL/MariaDB and SQLite supporting it, and Oracle and SQL Server not supporting it. Third party dialects should also seek to ensure their :meth:`_engine.Inspector.has_table` method searches for views as well as tables for the given name. Fixes: #7161 Change-Id: I9e523c76741b19596c81ef577dc6f0823e44183b
* | remove ORM autocommit and public-facing subtransactions conceptMike Bayer2021-10-303-156/+36
| | | | | | | | | | | | | | | | | | In order to do LegacyRow we have to do Connection, which means we lose close_with_result (hooray) which then means we have to get rid of ORM session autocommit which relies on it, so let's do that first. Change-Id: I115f614733b1d0ba19f320ffa9a49f0d762db094
* | initial 2.0 setupMike Bayer2021-10-301-1/+1
|/ | | | | | | Adapted from 55e64f857daeb6057b85ff67297a774b when we previously started a 2.0 branch. Change-Id: Ib5af75df94b23104eebe0e918adcf979d798ea3b
* warnings removal, merge_resultMike Bayer2021-10-294-27/+30
| | | | | | | | | | | this is the last warning to remove. Also fixes some mistakes I made with the new Base20DeprecationWarning and LegacyAPIWarning classes created, where functions in deprecations.py were still hardcoded to RemovedIn20Warning. Change-Id: I9a6045ac9b813fd2f9668c4bc518c46a7774c6ef
* Merge "warnings: session.autocommit, subtransactions" into mainmike bayer2021-10-292-2/+5
|\
| * warnings: session.autocommit, subtransactionsMike Bayer2021-10-292-2/+5
| | | | | | | | Change-Id: I7eb7c87c9656f8043ea90d53897958afad2b8fe9
* | clarify order_by(None) for Core; improve wordingMike Bayer2021-10-292-4/+19
| | | | | | | | | | | | | | the order_by(None) convention was documented for orm.Query but not Core select. Change-Id: I0c1ad76c3eefba1cb54b1649cfd09169c17e2bba
* | warnings: with_polymorphic()Mike Bayer2021-10-292-5/+8
|/ | | | | | | | Also clarifies a behavior of None/False for the selectable parameter to with_polymorphic() Fixes: #7262 Change-Id: I58c4004e0af227d3995e9ae2461470440f97f252
* Merge "Modernize tests - session_query_get" into mainmike bayer2021-10-292-4/+8
|\
| * Modernize tests - session_query_getGord Thompson2021-10-282-4/+8
| | | | | | | | | | Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: I92013aad471baf32df1b51b756e86d95449b5cfd
* | warnings: cascade_backrefsMike Bayer2021-10-282-3/+0
| | | | | | | | | | | | | | this one is a little different in that the thing changing is the detection of a behavior, not an explicit API. Change-Id: Id142943a2b901b39fe9053d0120c1e820dc1a6d0
* | Merge "Improve array support on pg8000" into mainmike bayer2021-10-283-2/+11
|\ \ | |/ |/|
| * Improve array support on pg8000Federico Caselli2021-10-273-2/+11
| | | | | | | | | | | | References: #6023 Change-Id: I0f6cbc34b3c0bfc0b8c86b3ebe4531e23039b6c0
* | Merge "deprecation warnings: with_parent, aliased, from_joinpoint" into mainmike bayer2021-10-275-9/+21
|\ \
| * | deprecation warnings: with_parent, aliased, from_joinpointMike Bayer2021-10-275-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "consider "inspect(_of_type)" to be the entity of a comparator" into mainmike bayer2021-10-272-2/+11
|\ \ \
| * | | consider "inspect(_of_type)" to be the entity of a comparatorMike Bayer2021-10-272-2/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed 1.4 regression where :meth:`_orm.Query.filter_by` would not function correctly when :meth:`_orm.Query.join` were joined to an entity which made use of :meth:`_orm.PropComparator.of_type` to specify an aliased version of the target entity. The issue also applies to future style ORM queries constructed with :func:`_sql.select`. Fixes: #7244 Change-Id: Ied28a03ce93201f932c7172d283cd4297be4d592
* | | Merge "Fixes: #5020" into mainmike bayer2021-10-271-7/+68
|\ \ \
| * | | Fixes: #5020jonathan vanasco2021-10-271-7/+68
| | | | | | | | | | | | | | | | | | | | | | | | Add mike's example to docs Change-Id: I96a79084cccca5c792bee697338422f3de0884fb
* | | | Merge "Fixes: #4100" into mainmike bayer2021-10-271-0/+9
|\ \ \ \ | |/ / / |/| | |
| * | | Fixes: #4100jonathan vanasco2021-10-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a warning, in two places, stating `with_for_update` will lock joinedload tables, because at least one person did not expect the obvious to happen. Also warn that eager loading techniques may not work with `with_for_update` and combining the two is not officially supported or recommended. Change-Id: Iedd609b56b3144d90a90fc2eea3cf5335a2d178a
* | | | Merge "add additional "oracle mode" reserved words" into mainmike bayer2021-10-261-3/+19
|\ \ \ \ | |_|_|/ |/| | |
| * | | add additional "oracle mode" reserved wordsMike Bayer2021-10-261-3/+19
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | despite mariadb's docs, the word "system" must be quoted in plain mariadb 10.5, not sure if that's "oracle mode" but it is > 10.3. observed keystone tests failing on a column of this name. Fixes: #7167 Change-Id: I153b79809e7da007bcceecec96c1340d1641f0de
* | | Merge "Remove depractions:" into mainmike bayer2021-10-261-2/+0
|\ \ \ | |/ / |/| |
| * | Remove depractions:Federico Caselli2021-10-261-2/+0
| | | | | | | | | | | | | | | | | | | | | - Passing bind arguments to Session.execute - This Session located a target engine via bound metadata Change-Id: I916c8c4cff344ee5652fceac4dfd241dd8160f7b
* | | dont pull filter_by from from_obj, entity is hopefully sufficientMike Bayer2021-10-261-1/+31
| |/ |/| | | | | | | | | | | | | | | Fixed 1.4 regression where :meth:`_orm.Query.filter_by` would not function correctly on a :class:`_orm.Query` that was produced from :meth:`_orm.Query.union`, :meth:`_orm.Query.from_self` or similar. Fixes: #7239 Change-Id: I3a0c3fd71180b1bfb6bf855f436a29c729664082
* | warnings: select_entity_from()Mike Bayer2021-10-252-3/+10
| | | | | | | | Change-Id: I8c259e61134c38a1fa907c308068337473c82914
* | deprecation warnings: strings in loader options, join, with_parentMike Bayer2021-10-254-14/+26
|/ | | | | | | | | | | | | Repairs one in-library deprecation warning regarding mapper propagation of options raises maxfail to 250, as 25 is too low when we are trying to address many errors at once. the 25 was originally due to the fact that our fixtures would be broken after that many failures in most cases, which today should not be the case nearly as often. Change-Id: I26affddf42e2cae2aaf9561633e9b8cd431eb189
* add full docs/notes for all TypeEngine/TypeDecorator interactionsMike Bayer2021-10-231-62/+207
| | | | | | | | | | | Added notes to all TypeEngine methods as to which should be overridden by TypeDecorator implementations. Made sure docstrings are present for all TypeDecorator methods as some were missing, and clarified which should be overridden, which should not, as well as what phase each method is called within. Change-Id: Ibd6e7fb0933ad3ca0927d8785d9087e3eddac90e References: #7230
* Merge "use correct entity in path for aliased class relationship" into mainmike bayer2021-10-225-3/+16
|\
| * use correct entity in path for aliased class relationshipMike Bayer2021-10-225-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in "relationship to aliased class" feature introduced at :ref:`relationship_aliased_class` where it was not possible to create a loader strategy option targeting an attribute on the target using the :func:`_orm.aliased` construct directly in a second loader option, such as ``selectinload(A.aliased_bs).joinedload(aliased_b.cs)``, without explicitly qualifying using :meth:`_orm.PropComparator.of_type` on the preceding element of the path. Additionally, targeting the non-aliased class directly would be accepted (inappropriately), but would silently fail, such as ``selectinload(A.aliased_bs).joinedload(B.cs)``; this now raises an error referring to the typing mismatch. Fixes: #7224 Change-Id: I40857c7275667dcb64f1d1fd0c8072e48758e678
* | Merge "fix: Update reserved words list of MySQL / MariaDB dialect" into mainmike bayer2021-10-205-308/+563
|\ \ | |/ |/|
| * fix: Update reserved words list of MySQL / MariaDB dialectKevin Kirsche2021-10-205-308/+563
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganized the list of reserved words into two separate lists, one for MySQL and one for MariaDB, so that these diverging sets of words can be managed more accurately; adjusted the MySQL/MariaDB dialect to switch among these lists based on either explicitly configured or server-version-detected "MySQL" or "MariaDB" backend. Added all current reserved words through MySQL 8 and current MariaDB versions including recently added keywords like "lead" . Pull request courtesy Kevin Kirsche. 1. Move reserved words to it's own file. 2. Add missing reserved words from https://mariadb.com/kb/en/reserved-words/ * Note: this only adds MariaDB though links to MySQL, it also does not include the reserved words for Oracle mode, as listed in the link. Fixes: #7167 Supercedes: #7197 Closes: #7207 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7207 Pull-request-sha: 5a682e331069520ccad9e6bf3cc5e4a77a889ef0 Change-Id: Ib25be8148568899f56b5c9b42d4f530ade8a04e3
* | Merge "Add missing deprecation to ``MetaData.bind`` argument" into mainmike bayer2021-10-201-0/+6
|\ \
| * | Add missing deprecation to ``MetaData.bind`` argumentFederico Caselli2021-10-181-0/+6
| | | | | | | | | | | | | | | Fixes: #7194 Change-Id: I9dacbb562aa55d9c408a43f8e57050db31dc8bfc
* | | remove _resolve_label and related attributesMike Bayer2021-10-202-20/+7
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | these seem to date back to 0.9 and revs like #3148 but none of it seems to be affecting things now, try removing it all and seeing what fails. we've noted that _resolve_label does not appear to be needed, however allow_label_resolve remains relevant both for non-column elements like text() as well as that it is used explicitly by the joined eager loader. Change-Id: Ic8a5d8001ef2a4133360f51a92a6f7b0cc389095
* | Version 1.4.27 placeholderMike Bayer2021-10-191-1/+1
| |
* | revise _get_crud_kv_pairs from 18b4a3437Mike Bayer2021-10-191-40/+38
| | | | | | | | | | | | | | submitted 18b4a3437a60fbfa0c25287d9a3b83d7c9d4f762 too soon as @CaselIT found a great refinement for this method. Change-Id: Id3818aa6bdc5938fc2f1395558aa8ead8ea6b319
* | process bulk_update_tuples before cache key or compilationMike Bayer2021-10-195-67/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "use coercions for label element, ensure propagate_attrs" into mainmike bayer2021-10-181-3/+15
|\ \
| * | use coercions for label element, ensure propagate_attrsMike Bayer2021-10-181-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where the ORM "plugin", necessary for features such as :func:`_orm.with_loader_criteria` to work correctly, would not be applied to a :func:`_sql.select` which queried from an ORM column expression if it made use of the :meth:`_sql.ColumnElement.label` modifier. Fixes: #7205 Change-Id: I72b84442e14df8b5ece33916f3c51ca3f358864b
* | | Merge "Modernize tests - query_from_self" into mainmike bayer2021-10-181-1/+0
|\ \ \
| * | | Modernize tests - query_from_selfGord Thompson2021-10-171-1/+0
| |/ / | | | | | | | | | Change-Id: Ic14fdb5b6c49b668698de146bbafbd996da3d843
* | | vendor asynccontextmanager outside of greenlet dependencyMike Bayer2021-10-183-65/+84
|/ / | | | | | | | | | | | | | | | | | | | | Fixed installation issue where the ``sqlalchemy.dialects.mysql`` module would not be importable if "greenlet" were not installed. This was actually breaking the sphinx build for when greenlet were not installed. Fixes: #7204 Change-Id: Ia351c124a2f1ca44bafe20a97267ce20cb55808f
* | Merge "re-enable asnycmy >= 0.2.3; disable aiomysql totally" into mainmike bayer2021-10-171-3/+6
|\ \ | |/ |/|