summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Ensure col is not None when retrieving quick populatorsMike Bayer2017-08-231-2/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where an :func:`.undefer_group` option would not be recognized if it extended from a relationship that was loading using joined eager loading. In particular we need to double check the column both in terms of the given "adapter" as well as without applying the "adapter" when searching for the column in the result. As we now avoid redoing the row processor step we also improve on callcounts in joined eager loading. Change-Id: I0f48766f12f7299f4626ff41a00bf1f5bfca5f3b Fixes: #4048
* | Handle cache key for option that has no strategyMike Bayer2017-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | Fixed regression where the use of a :func:`.undefer_group` option in conjunction with a lazy loaded relationship option would cause an attribute error, due to a bug in the SQL cache key generation added in 1.2 as part of :ticket:`3954`. Change-Id: Icd9a34f0b5aa96d6433a2ab9c8d3eaee0006f609 Fixes: #4049
* | - fix typosMike Bayer2017-08-221-1/+1
| | | | | | | | Change-Id: Ibf8bc0e997ff989c7b0c16afad48a95414078052
* | - modernize the mysql connection timeout docsMike Bayer2017-08-222-6/+17
| | | | | | | | | | Change-Id: Icb0474509539c1eb7536544749f2a48b4972078a (cherry picked from commit 4ce46fb0a085c1cc739e21881cc25567e663f8dc)
* | Deactivate transaction if rollback failsMike Bayer2017-08-222-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fixed regression introduced in 1.2.0b1 due to :ticket:`3934` where the :class:`.Session` would fail to "deactivate" the transaction, if a rollback failed (the target issue is when MySQL loses track of a SAVEPOINT). This would cause a subsequent call to :meth:`.Session.rollback` to raise an error a second time, rather than completing and bringing the :class:`.Session` back to ACTIVE. Fixes: #4050 Change-Id: Id245e8dd3487cb006b2d6631c8bd513b5ce81abe
* | - allow a separate template database to be used forMike Bayer2017-08-222-5/+11
| | | | | | | | | | | | | | PG CREATE DATABASE. as nobody will connect to it that would solve the contention issue here Change-Id: I00a4d52091876e120faff4a8a5493c53280d96f1
* | - repair --dbsMike Bayer2017-08-222-1/+21
|/ | | | | Change-Id: I69e39d2368f50b126c369ecc35e01799fd013254 (cherry picked from commit 3fc6f32ddc5fbbf439acff42c2fdae9e910154be)
* - simplify and see if it still worksMike Bayer2017-08-211-23/+6
| | | | Change-Id: Id0cf7ae2223507d413aaa22e5f8df066b7ac2b46
* - keep trying to get PG dbs to buildMike Bayer2017-08-211-0/+11
| | | | Change-Id: Ib36949da8f079594494a482423d96e7509673481
* - add missing quotesMike Bayer2017-08-211-1/+1
| | | | Change-Id: Ib6efc465cccd7c7661dd089856edfd4979b53517
* - try to get PG database create to be more reliableMike Bayer2017-08-211-1/+10
| | | | Change-Id: I9c9d101547f4484af447db924dc06afd0392a03e
* - sanitize class names for junit reportingMike Bayer2017-08-211-1/+8
| | | | Change-Id: I42821d8324208b708adc17a10b1a2758797cb9db
* - filter out non-oracle URLsMike Bayer2017-08-211-0/+2
| | | | Change-Id: I475f744f8801bc923d738e466d208d662e707413
* - a few mysql fixes, more to comeMike Bayer2017-08-201-3/+4
| | | | Change-Id: Icdcc8ed03374251b8d3815ae58e2726ea27c14b4
* - rework oracle de-provisioning to write URLs to the file as well,Mike Bayer2017-08-203-33/+47
| | | | | | supporting custom dburi etc. Change-Id: Ic0ab0b3b4223e40fd335ee3313fda4dfce942100
* - add some logging for the provisioningMike Bayer2017-08-191-0/+2
| | | | Change-Id: I1ac16bc77642f4f576195ac10443ed8e641e0d49
* - do ten attempts to create databaseMike Bayer2017-08-191-1/+1
| | | | Change-Id: I14a5dd920d14096aa4401cb8b9d71f47d3915879
* Merge "First level repair for cx_Oracle 6.0 test regressions"mike bayer2017-08-191-1/+3
|\
| * First level repair for cx_Oracle 6.0 test regressionsMike Bayer2017-08-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fixed more regressions caused by cx_Oracle 6.0; at the moment, the only behavioral change for users is disconnect detection now detects for cx_Oracle.DatabaseError in addition to cx_Oracle.InterfaceError, as this behavior seems to have changed. Other issues regarding numeric precision and uncloseable connections are pending with the upstream cx_Oracle issue tracker. Change-Id: Id61f1e33b21c155a598396340dfdecd28ff4066b Fixes: #4045
* | - correct server side cursor assertion for driver namesMike Bayer2017-08-191-5/+5
|/ | | | Change-Id: Id8156f6af15a36f7d5653dff56f68e81431692a6
* Merge "Enable uuid for pg8000"mike bayer2017-08-171-2/+26
|\
| * Enable uuid for pg8000Mike Bayer2017-08-081-2/+26
| | | | | | | | | | | | | | | | | | Enabled UUID support for the pg8000 driver, which supports native Python uuid round trips for this datatype. Arrays of UUID are still not supported, however. Change-Id: I44ca323c5d9f2cd87327210233bc36a3556eb050 Fixes: #4016
* | Merge "Ensure Oracle index w/ col DESC etc. is reflected"mike bayer2017-08-145-23/+83
|\ \
| * | Ensure Oracle index w/ col DESC etc. is reflectedMike Bayer2017-08-145-23/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where an index reflected under Oracle with an expression like "column DESC" would not be returned, if the table also had no primary key, as a result of logic that attempts to filter out the index implicitly added by Oracle onto the primary key columns. Reworked the "filter out the primary key index" logic in oracle get_indexes() to be clearer. This changeset also adds an internal check to ColumnCollection to accomodate for the case of a column being added twice, as well as adding a private _table argument to Index such that reflection can specify the Table explicitly. The _table argument can become part of public API in a later revision or release if needed. Change-Id: I745711e03b3e450b7f31185fc70e10d3823063fa Fixes: #4042
* | | Isolate memory tests in forksMike Bayer2017-08-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swing the biggest hammer, run multiprocessing.Process() for each memusage test individually so that they are fully isolated from the parent process and any side effects of pytest-xdist Also add --nomemory as a shortcut to exclude_tags=memory-intensive and add this to the setup.py test runner as the memory tests should not be running for quick runs Change-Id: I3c16c781e21b33deb939a64e77a6e0e41fb86922
* | | Restore original test namesMike Bayer2017-08-141-4/+3
|/ / | | | | | | | | | | | | | | | | | | | | The change in de1f8f8345ecd6af0ec1177703465e9471cfe862 modified how test classes are named, breaking logic that extracts the class name for the profiling suite. Add a new variable _sa_orig_cls_name if we've modified the name so that the profiling logic doesn't need to guess the original class name. Change-Id: Ica15a97408b9e0749a78c87f62749c15c1627009
* | Merge branch 'master--typos' of https://github.com/nphilipp/sqlalchemyMike Bayer2017-08-091-2/+2
|\ \ | |/ |/|
| * fix "constrast" typosNils Philippsen2017-08-051-2/+2
| |
* | Add quoted_name to pg8000 py_typesMike Bayer2017-08-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | Fixed bug where the pg8000 driver would fail if using :meth:`.MetaData.reflect` with a schema name, since the schema name would be sent as a "quoted_name" object that's a string subclass, which pg8000 doesn't recognize. The quoted_name type is added to pg8000's py_types collection on connect. Change-Id: Id0f838320cb66563685e094e4eae2d5116100d27 Fixes: #4041
* | Enable multi-level selectin polymorphic loadingMike Bayer2017-08-077-44/+109
| | | | | | | | | | Change-Id: Icc742bbeecdb7448ce84caccd63e086af16e81c1 Fixes: #4026
* | - modernize orm.reconstructor documentation a bitMike Bayer2017-08-052-0/+11
|/ | | | Change-Id: Ied786e8f9ad78f524be03a382d002dada7dd218b
* Allow multiple versions of single backendMike Bayer2017-08-043-9/+17
| | | | | | | | | | Improve screen output to illustrate which server version is running for a particular database config, and additionally allow full overriding for the backend-specific targets in tox.ini via environment variables, so that CI can inject multiple server urls for a particular database such as MySQL/MariaDB. Change-Id: Ibf443bb9fb82e4563efd1bb66058fa9989aa2fda
* Revert cx_Oracle WITH_UNICODE change under > 5.0Mike Bayer2017-07-281-4/+13
| | | | | | | | | | | | | | | | Fixed performance regression caused by the fix for :ticket:`3937` where cx_Oracle as of version 5.3 dropped the ``.UNICODE`` symbol from its namespace, which was interpreted as cx_Oracle's "WITH_UNICODE" mode being turned on unconditionally, which invokes functions on the SQLAlchemy side which convert all strings to unicode unconditionally and causing a performance impact. In fact, per cx_Oracle's author the "WITH_UNICODE" mode has been removed entirely as of 5.1, so the expensive unicode conversion functions are no longer necessary and are disabled if cx_Oracle 5.1 or greater is detected under Python 2. The warning against "WITH_UNICODE" mode that was removed under :ticket:`3937` is also restored. Change-Id: Iddd38d81a5adb27c953a5ee2eae5529a21da16e1 Fixes: #4035
* - 1.2.0b3 prepMike Bayer2017-07-251-1/+1
| | | | Change-Id: I9aa6e891ca896b90b97fbd0e52f0ad73494e38d7
* Merge "Ensure we check for boolean condition when we inspect __exit__()"mike bayer2017-07-241-1/+1
|\
| * Ensure we check for boolean condition when we inspect __exit__()Mike Bayer2017-07-241-1/+1
| | | | | | | | | | | | | | | | Fixed issue in testing fixtures which was incompatible with a change made as of Python 3.6.2 involving context managers. Change-Id: I0f12aa6cc15cba89153f7e4888ac347e7ce599c7 Fixes: #4034
* | Guard all indexed access in WeakInstanceDictMike Bayer2017-07-241-15/+38
|/ | | | | | | | | | | | Added ``KeyError`` checks to all methods within :class:`.WeakInstanceDict` where a check for ``key in dict`` is followed by indexed access to that key, to guard against a race against garbage collection that under load can remove the key from the dict after the code assumes its present, leading to very infrequent ``KeyError`` raises. Change-Id: I881cc2899f7961d29a0549f44149a2615ae7a4ea Fixes: #4030
* Merge "Check for column object in eval_none, not propkey"mike bayer2017-07-192-2/+2
|\
| * Check for column object in eval_none, not propkeyMike Bayer2017-07-182-2/+2
| | | | | | | | | | | | | | | | | | | | Fixed bug involving JSON NULL evaluation logic added in 1.1 as part of :ticket:`3514` where the logic would not accommodate ORM mapped attributes named differently from the :class:`.Column` that was mapped. Change-Id: I1848afcfb63ad7f074f315d8d3097666069b42be Fixes: #4031
* | Check for non-entity when inspecting for subqueryloadMike Bayer2017-07-181-0/+1
|/ | | | | | | | | | Fixed issue where adding additional non-entity columns to a query that includes an entity with subqueryload relationships would fail, due to an inspection added in 1.1.11 as a result of :ticket:`4011`. Change-Id: I8ef082be649125bdc07b428cb9b0a77a65d73671 Fixes: #4033
* - 1.2.0b2 placeholderMike Bayer2017-07-141-1/+1
| | | | Change-Id: I95ff7f4bb0048b363987344d359f252469b23b79
* Merge "Add support for CACHE and ORDER to sequences"mike bayer2017-07-063-3/+22
|\
| * Add support for CACHE and ORDER to sequencesDavid Moore2017-07-053-3/+22
| | | | | | | | | | | | | | | | | | | | | | Added new keywords :paramref:`.Sequence.cache` and :paramref:`.Sequence.order` to :class:`.Sequence`, to allow rendering of the CACHE parameter understood by Oracle and PostgreSQL, and the ORDER parameter understood by Oracle. Pull request courtesy David Moore. Change-Id: I082c3f8ef56ef89dbaad5da9d5695be5313b0614 Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/96
* | Add .autocommit to scoped_sessionBen Fagin2017-07-051-1/+2
|/ | | | | | | | | | Added ``.autocommit`` attribute to :class:`.scoped_session`, proxying the ``.autocommit`` attribute of the underling :class:`.Session` currently assigned to the thread. Pull request courtesy Ben Fagin. Change-Id: Iff741978bd67762f4c7375a23cc151b26192042b Pull-request: https://github.com/zzzeek/sqlalchemy/pull/372
* Implement MySQL's ON DUPLICATE KEY UPDATEMichael Doronin2017-07-033-0/+200
| | | | | | | | | | | Added support for MySQL's ON DUPLICATE KEY UPDATE MySQL-specific :class:`.mysql.dml.Insert` object. Pull request courtesy Michael Doronin. Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Resolves: #4009 Change-Id: Ic71424f3c88af6082b48a910a2efb7fbfc0a7eb4 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/365
* Include missing import in exampleMichael Stewart2017-06-301-0/+1
|
* Coerce to float for Float with all native decimal backendsMike Bayer2017-06-262-1/+2
| | | | | | | | | | | | | The result processor for the :class:`.Float` type now unconditionally runs values through the ``float()`` processor if the dialect specifies that it also supports "native decimal" mode. While most backends will deliver Python ``float`` objects for a floating point datatype, the MySQL backends in some cases lack the typing information in order to provide this and return ``Decimal`` unless the float conversion is done. Change-Id: I638f1480fb00a507036efaf0e0080f26893d98ad Fixes: #4020
* Merge "Support state expiration for with_expression(); rename ↵mike bayer2017-06-265-13/+27
|\ | | | | | | deferred_expression"
| * Support state expiration for with_expression(); rename deferred_expressionMike Bayer2017-06-265-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attributeimpl for a deferred_expression does not support a scalar loader, add new configurability so that the impl can have this flag turned off. Document that the with_expression() system currently does not offer any deferred loading. To eliminate confusion over "deferred", which refers to lazy loading of column attributes, and "with_expression", which refers to an attribute that is explicitly at query time only, rename deferred_expression to query_expression. Change-Id: I07c4a050ed68c79ccbde9492e9de1630b7470d74
* | Return given type when it matches the adaptationMike Bayer2017-06-261-38/+32
|/ | | | | | | | | | | | | The rules for type coercion between :class:`.Numeric`, :class:`.Integer`, and date-related types now include additional logic that will attempt to preserve the settings of the incoming type on the "resolved" type. Currently the target for this is the ``asdecimal`` flag, so that a math operation between :class:`.Numeric` or :class:`.Float` and :class:`.Integer` will preserve the "asdecimal" flag as well as if the type should be the :class:`.Float` subclass. Change-Id: Idfaba17220d6db21ca1ca4dcb4c19834cd397817 Fixes: #4018