summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "Clean up .execute calls in test_results.py"mike bayer2020-04-141-39/+38
|\ \
| * | Clean up .execute calls in test_results.pyGord Thompson2020-04-111-39/+38
| | | | | | | | | | | | Change-Id: I08b9046a48270f664ea8b8ba38d8be7763973a40
* | | Merge "Clean up .execute calls in test_select.py"mike bayer2020-04-141-87/+101
|\ \ \
| * | | Clean up .execute calls in test_select.pyGord Thompson2020-04-111-87/+101
| |/ / | | | | | | | | | Change-Id: I97dfb59d13a7c27c79c3dbcbcb5ba61948569e46
* | | Merge "Clean up .execute calls in remaining suite tests"mike bayer2020-04-145-65/+82
|\ \ \
| * | | Clean up .execute calls in remaining suite testsGord Thompson2020-04-125-65/+82
| |/ / | | | | | | | | | Change-Id: Ib5c7f46067bcf5b162060476cc323bf671db101a
* | | Merge "Clean up .execute calls in test_sequence.py"mike bayer2020-04-141-36/+36
|\ \ \
| * | | Clean up .execute calls in test_sequence.pyGord Thompson2020-04-121-36/+36
| |/ / | | | | | | | | | Change-Id: If92353297fc1b4bc843f6ec74cb29079b52c611b
* | | Merge "Clean up .execute calls in test_insert.py"mike bayer2020-04-141-52/+48
|\ \ \ | |_|/ |/| |
| * | Clean up .execute calls in test_insert.pyGord Thompson2020-04-111-52/+48
| | | | | | | | | | | | Change-Id: I87e144d00577b53baab203c675caeaf8ad46cb5c
* | | Enable zzzeeksphinx module prefixesMike Bayer2020-04-1413-60/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zzzeeksphinx 1.1.2 in git can now convert short prefix names in a configured lookup to fully qualified module names, so that we can have succinct and portable pyrefs that still resolve absolutely. It also includes a formatter that will format all pyrefs in a fully consistent way regardless of the package path, by unconditionally removing all package tokens but always leaving class names in place including for methods, which means we no longer have to deal with tildes in pyrefs. The most immediate goal of the absolute prefixes is that we have lots of "ambiguous" names that appear in muliple places, like select(), ARRAY, ENUM etc. With the incoming future packages there is going to be lots of name overlap so it is necessary that all names eventually use absolute package paths when Sphinx receives them. In multiple stages, pyrefs will be converted using the zzzeeksphinx tools/fix_xrefs.py tool so that doclinks can be made absolute using symbolic prefixes. For this review, the actual search and replace of symbols is not performed, instead some general cleanup to prepare the docs as well as a lookup file used by the tool to do the conversion. this relatively small patch will be backported with appropriate changes to 1.3, 1.2, 1.1 and the tool can then be run on each branch individually. We are shooting for almost no warnings at all for master (still a handful I can't figure out which don't seem to have any impact) , very few for 1.3, and for 1.2 / 1.1 we hope for a significant reduction in warnings. Overall for all versions pyrefs should always point to the correct target, if they are in fact hyperlinked. it's better for a ref to go nowhere and be plain text than go to the wrong thing. Right now, hundreds of API links are pointing to the wrong thing as they are ambiguous names such as refresh(), insert(), update(), select(), join(), JSON etc. and Sphinx sends these all to essesntially random destinations among as many as five or six possible choices per symbol. A shorthand system that allows us to use absolute refs without having to type out a full blown absoulte module is the only way this is going to work, and we should ultimately seek to abandon any use of prefix dot for lookups. Everything should be on an underscore token so at the very least the module spaces can be reorganized without having to search and replace the entire documentation every time. Change-Id: I484a7329034af275fcdb322b62b6255dfeea9151
* | | Merge "Repair find tables"mike bayer2020-04-131-1/+3
|\ \ \
| * | | Repair find tablesMike Bayer2020-04-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recipe given out on the ML for improving ABC fails in 1.4 due to find_tables() missing out on subqueries, which is due to the refactor of Alias into multiple sub-types. Change-Id: Idd2803b26a84b28db28e0b8c328b8f24550577e4
* | | | Merge "Add ``comment`` attribute to :class:`.Column` ``__repr__`` method."mike bayer2020-04-131-0/+2
|\ \ \ \
| * | | | Add ``comment`` attribute to :class:`.Column` ``__repr__`` method.Federico Caselli2020-04-111-0/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | Fixes #4138 Change-Id: Ia93f7d7b1d2f38509421725fbe152a2ff163d5f3
* | | | Merge "Use define_tables for IsOrIsNotDistinctFromTest"mike bayer2020-04-131-10/+12
|\ \ \ \ | |/ / / |/| | |
| * | | Use define_tables for IsOrIsNotDistinctFromTestMike Bayer2020-04-101-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ie8127ef29f1ec91e7afb88e1429538c27a321784 Mike failed to notice that this test is build on TablesTest and has just the one test function, which means the table is built up by the fixture. Change-Id: I855431bc976fe8ec96559ec1a22bb294aecf3c40
* | | | Fix almost all read-level sphinx warningsMike Bayer2020-04-118-11/+22
| |_|/ |/| | | | | | | | | | | | | | | | | | | | There are some related to changelog that I can't figure out and are likely due to something in the changelog extension. also one thing with a "collection" I can't figure out. Change-Id: I0a9e6f4291c3589aa19a4abcb9245cd22a266fe0
* | | Merge "The :meth:`.Inspector.reflecttable` was renamed to ↵mike bayer2020-04-112-3/+16
|\ \ \ | |/ / |/| | | | | :meth:`.Inspector.reflect_table`."
| * | The :meth:`.Inspector.reflecttable` was renamed to ↵Federico Caselli2020-04-102-3/+16
| | | | | | | | | | | | | | | | | | | | | :meth:`.Inspector.reflect_table`. Fixes: #5244 Change-Id: I2b12fd69ed24ce1ede8f6ed5cb14cc7761308ee3
* | | Merge "Fix distinct_from test for Firebird et al."mike bayer2020-04-101-1/+1
|\ \ \
| * | | Fix distinct_from test for Firebird et al.Gord Thompson2020-04-091-1/+1
| | |/ | |/| | | | | | | | | | | | | Firebird (and perhaps others) allow us to CREATE TABLE inside a transaction but we can't INSERT INTO that table unless we COMMIT first. Change-Id: Ie8127ef29f1ec91e7afb88e1429538c27a321784
* | | Merge "Evaluate fixes for cx_Oracle 8 API changes"mike bayer2020-04-101-5/+10
|\ \ \ | |_|/ |/| |
| * | Evaluate fixes for cx_Oracle 8 API changesMike Bayer2020-04-101-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in [1] we have reported some behavioral changes in cx_Oracle symbols. As it is unclear if these are intended changes in cx_Oracle, test workarounds for these changes against cx_Oracle master. [1] https://github.com/oracle/python-cx_Oracle/issues/415 Fixes: #5246 Change-Id: If63f92553c46484bf2b61b53a9e6d85cb08e800a
* | | Merge "Remove code deprecated before version 1.1"mike bayer2020-04-1042-1017/+159
|\ \ \ | |/ / |/| |
| * | Remove code deprecated before version 1.1Federico Caselli2020-04-0942-1017/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove deprecated method ``get_primary_keys` in the :class:`.Dialect` and :class:`.Inspector` classes. - Remove deprecated event ``dbapi_error`` and the method ``ConnectionEvents.dbapi_error`. - Remove support for deprecated engine URLs of the form ``postgres://``. - Remove deprecated dialect ``mysql+gaerdbms``. - Remove deprecated parameter ``quoting`` from :class:`.mysql.ENUM` and :class:`.mysql.SET` in the ``mysql`` dialect. - Remove deprecated function ``comparable_property``. and function ``comparable_using`` in the declarative extension. - Remove deprecated function ``compile_mappers``. - Remove deprecated method ``collection.linker``. - Remove deprecated method ``Session.prune`` and parameter ``Session.weak_identity_map``. This change also removes the class ``StrongInstanceDict``. - Remove deprecated parameter ``mapper.order_by``. - Remove deprecated parameter ``Session._enable_transaction_accounting`. - Remove deprecated parameter ``Session.is_modified.passive``. - Remove deprecated class ``Binary``. Please use :class:`.LargeBinary`. - Remove deprecated methods ``Compiled.compile``, ``ClauseElement.__and__`` and ``ClauseElement.__or__`` and attribute ``Over.func``. - Remove deprecated ``FromClause.count`` method. - Remove deprecated parameter ``Table.useexisting``. - Remove deprecated parameters ``text.bindparams`` and ``text.typemap``. - Remove boolean support for the ``passive`` parameter in ``get_history``. - Remove deprecated ``adapt_operator`` in ``UserDefinedType.Comparator``. Fixes: #4643 Change-Id: Idcd390c77bf7b0e9957907716993bdaa3f1a1763
* | | Modernize test_defaultsMike Bayer2020-04-101-1/+8
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | Use modern execution patterns, goal is so that these same tests can work for the future engine break sequence tests into test_sequences suite sequence tests that are testing implicit execution patterns at least move into their own suite that will go into test_deprecations eventually. Change-Id: I27cac9bd265c86ff2a3381ff9f844f60ef991cfc
* | Change ``orm.future`` to ``future.orm``Federico Caselli2020-04-082-1/+11
|/ | | | Change-Id: I7fcf8b691134a0c52fbbf7879da071a41ec28102
* Merge "Use dot-separated name resolution for relationship target"mike bayer2020-04-082-14/+92
|\
| * Use dot-separated name resolution for relationship targetMike Bayer2020-04-072-14/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The string argument accepted as the first positional argument by the :func:`.relationship` function when using the Declarative API is no longer interpreted using the Python ``eval()`` function; instead, the name is dot separated and the names are looked up directly in the name resolution dictionary without treating the value as a Python expression. However, passing a string argument to the other :func:`.relationship` parameters that necessarily must accept Python expressions will still use ``eval()``; the documentation has been clarified to ensure that there is no ambiguity that this is in use. Fixes: #5238 Change-Id: Id802f403190adfab0ca034afe2214ba10fd9cfbb
* | Gracefully skip isolation level if no row returnedMike Bayer2020-04-071-1/+8
|/ | | | | | | | | | | Fixed issue in MySQL dialect when connecting to a psuedo-MySQL database such as that provided by ProxySQL, the up front check for isolation level when it returns no row will not prevent the dialect from continuing to connect. A warning is emitted that the isolation level could not be detected. Fixes: #5239 Change-Id: I4a240386a0d38bd90733819495ce50e37fe2234c
* Merge "Broaden is[not]_distinct_from support"mike bayer2020-04-077-3/+103
|\
| * Broaden is[not]_distinct_from supportGord Thompson2020-04-027-3/+103
| | | | | | | | | | | | | | Added support for .is[not]_distinct_from to SQL Server, MySQL, and Oracle. Fixes: #5137 Change-Id: I3b4d3b199821a55687f83c9a5b63a95d07a64cd5
* | Ensure length parameter of Enum is adapted to new objectsMike Bayer2020-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Ensure length parameter added to Enum in Iea05dc8cd9e33959bb968b394fb10a7dd068c873 is correctly propagated to new enum objects adapted from this one. Fixes: #5183 ` Change-Id: I7f20d926f73ec8260938963df87e29894c7e55e2
* | Merge "Add length parameter in `Enum`"mike bayer2020-04-061-1/+18
|\ \
| * | Add length parameter in `Enum`Federico Caselli2020-04-061-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `Enum` type now supports the parameter `Enum.length` to specify the length of the VARCHAR column to create when using non native enums by setting `Enum.native_enum` to `False` Fixes: #5183 Change-Id: Iea05dc8cd9e33959bb968b394fb10a7dd068c873
* | | Apply fix to ComputedReflectionFixtureTestGord Thompson2020-04-042-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | Avoid errors for dialects without schema support. Also fix typo in test name. Fixes: #5230 Change-Id: Id0f759b591a6119069b0fc5fc3b02addb85b0597
* | | Key subqueryloaders on the property object, not string keyMike Bayer2020-04-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in :func:`.orm.selectinload` loading option where two or more loaders that represent different relationships with the same string key name as referenced from a single :func:`.orm.with_polymorphic` construct with multiple subclass mappers would fail to invoke each subqueryload separately, instead making use of a single string-based slot that would prevent the other loaders from being invoked. Fixes: #5228 Change-Id: Id0d1db8029ca88c13c0068115fe673adb7a68407
* | | Run autoflush for column attribute load operationsMike Bayer2020-04-034-9/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "autoflush" behavior of :class:`.Query` will now trigger for nearly all ORM level attribute load operations, including when a deferred column is loaded as well as when an expired column is loaded. Previously, autoflush on load of expired or unloaded attributes was limited to relationship-bound attributes only. However, this led to the issue where column-based attributes that also depended on other rows, or even other columns in the same row, in order to express the correct value, would show an effectively stale value when accessed as there could be pending changes in the session left to be flushed. Autoflush is now disabled only in some cases where attributes are being unexpired in the context of a history operation. Fixes: #5226 Change-Id: Ibd965b30918cd273ae020411a704bf2bb1891f59
* | Repair caching / traversals for valuesMike Bayer2020-04-013-56/+54
|/ | | | | | | | | | | | | | The test suite wasn't running the copy_internals most fixtures, enable that and try to get all cases working. Set up selectable.values to do tuple conversion within compilation step. at the same time, disable caching for selectable.values for the moment and make it equivalent to dml_multi_values. fix cache / compare / copy cases for dml_values and dml_multi_values which weren't fully tested or covered. Change-Id: I484ca6e9cb2b66c2e6a321698f2abc0838db1460
* Try to measure new style caching in the ORM, take twoMike Bayer2020-04-0122-215/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supercedes: If78fbb557c6f2cae637799c3fec2cbc5ac248aaf Trying to see if by making the cache key memoized, we still can have the older "identity" form of caching which is the cheapest of all, at the same time as the newer "cache key each time" version that is not nearly as cheap; but still much cheaper than no caching at all. Also needed is a per-execution update of _keymap when we invoke from a cached select, so that Column objects that are anonymous or otherwise adapted will match up. this is analogous to the adaption of bound parameters from the cache key. Adds test coverage for the keymap / construct_params() changes related to caching. Also hones performance to a large extent for statement construction and cache key generation. Also includes a new memoized attribute approach that vastly simplifies the previous approach of "group_expirable_memoized_property" and finally integrates cleanly with _clone(), _generate(), etc. no more hardcoding of attributes is needed, as well as that most _reset_memoization() calls are no longer needed as the reset is inherent in a _generate() call; this also has dramatic performance improvements. Change-Id: I95c560ffcbfa30b26644999412fb6a385125f663
* Fix databases -> dialectsMike Bayer2020-04-011-1/+1
| | | | | | | | | The change in I5343a2d270ed5a8c654b9fe13dff40cdf54649ed left the name "databases" present in one spot, which is usually not reached unless tests are being run on only partial files where not every dialect has been imported. Change-Id: I5a8776b412eaf2476f8a93eebc31448b6f9218ee
* Remove ORDER BY pk from subqueryload, selectinloadMike Bayer2020-03-301-13/+11
| | | | | | | | | | | | | | | | | | | | Modified the queries used by subqueryload and selectinload to no longer ORDER BY the primary key of the parent entity; this ordering was there to allow the rows as they come in to be copied into lists directly with a minimal level of Python-side collation. However, these ORDER BY clauses can negatively impact the performance of the query as in many scenarios these columns are derived from a subquery or are otherwise not actual primary key columns such that SQL planners cannot make use of indexes. The Python-side collation uses the native itertools.group_by() to collate the incoming rows, and has been modified to allow multiple row-groups-per-parent to be assembled together using list.extend(), which should still allow for relatively fast Python-side performance. There will still be an ORDER BY present for a relationship that includes an explicit order_by parameter, however this is the only ORDER BY that will be added to the query for both kinds of loading. Fixes: #5162 Change-Id: I8befd1303c1af7cc24cbf005f39bc01c8b2745f3
* Merge "String compiler can now literal compile datetime objects"mike bayer2020-03-301-0/+26
|\
| * String compiler can now literal compile datetime objectsFederico Caselli2020-03-291-0/+26
| | | | | | | | | | | | | | | | | | | | Add ability to literal compile a :class:`DateTime`, :class:`Date` or :class:"Time" when using the string dialect for debugging purposes. This change does not impact real dialect implementation that retain their current behavior. Fixes: #5052 Change-Id: Ia3fad2be905c6d35b0106b9a2388c7508f067e90
* | Merge "Add a third labeling mode for SELECT statements"mike bayer2020-03-308-62/+194
|\ \
| * | Add a third labeling mode for SELECT statementsMike Bayer2020-03-298-62/+194
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhanced the disambiguating labels feature of the :func:`~.sql.expression.select` construct such that when a select statement is used in a subquery, repeated column names from different tables are now automatically labeled with a unique label name, without the need to use the full "apply_labels()" feature that conbines tablename plus column name. The disambigated labels are available as plain string keys in the .c collection of the subquery, and most importantly the feature allows an ORM :func:`.orm.aliased` construct against the combination of an entity and an arbitrary subquery to work correctly, targeting the correct columns despite same-named columns in the source tables, without the need for an "apply labels" warning. The existing labeling style is now called LABEL_STYLE_TABLENAME_PLUS_COL. This labeling style will remain used throughout the ORM as has been the case for over a decade, however, the new disambiguation scheme could theoretically replace this scheme entirely. The new scheme would dramatically alter how SQL looks when rendered from the ORM to be more succinct but arguably harder to read. The tablename_columnname scheme used by Join.c is unaffected here, as that's still hardcoded to that scheme. Fixes: #5221 Change-Id: Ib47d9e0f35046b3afc77bef6e65709b93d0c3026
* | Remove support for python 3.4Federico Caselli2020-03-304-23/+6
|/ | | | | | Also remove no longer used compat code Change-Id: Ifda239fd84b425e43f4028cb55a5b3b8efa4dfc6
* Fix typo in resultproxy.c and test compatibility with python 3.5Federico Caselli2020-03-282-3/+4
| | | | | | | | | | | - Fix typo in resultproxy.c that would error on windows. - add -Wundef to C flags when linux is detected so that undefined symbols emit a warning - a few adjustments for tests to succeed on python 3.5 - note minimum version still documented here as 3.4 but this should move to at least 3.5 if not 3.6 for SQLAlchemy 1.4 Change-Id: Ia93ee1cb5c52e51e72eb0a24c100421c5157d04b
* Merge "Correct ambiguous func / class links"mike bayer2020-03-2513-120/+124
|\