summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
Commit message (Collapse)AuthorAgeFilesLines
* flake8 refactor - test_dialectMike Bayer2019-01-052-1/+1
| | | | | | | | | | | | A full rewrite of all imports and pep8 formatting using zimports, black, commits are broken into sections. Directories included in this commit: test/dialect/ Change-Id: Iec0231a43eb00122fcaaec942f1528ac4a33e59d (cherry picked from commit e88e29bb8e1aced6898d2aa7105c6e9eae528291)
* - flake8 for lib passesMike Bayer2019-01-0515-38/+31
| | | | Change-Id: I0d7f5105f838a0275f3c240441bdcdc9ae7444d0
* - imports in lib pass flake8Mike Bayer2019-01-054-20/+2
| | | | Change-Id: Ia661822e9d1792da8f965fe3cbb00cce288c8739
* - compatMike Bayer2019-01-051-29/+26
| | | | Change-Id: I33024885c8c7c98294f27460a1531be165b78f37
* - orm passing flake8Mike Bayer2019-01-051-3/+3
| | | | Change-Id: Iabd5a5724ee15db27db21327901a59257fb4f0a1
* - dialects passes flake8Mike Bayer2019-01-053-3/+1
| | | | Change-Id: I9fa269423619c1adfbaa6d63e0997153ea115d73
* flake8 refactor - extMike Bayer2019-01-058-102/+112
| | | | | | | | | | | | A full rewrite of all imports and pep8 formatting using zimports, black, commits are broken into sections. Directories included in this commit: lib/sqlalchemy/ext/ Change-Id: I3dd7aed3f42675e9ada64446ffd2758db7c3bc93 (cherry picked from commit 0716a292e03040ad4f96b890691b9e2c888ec11d)
* flake8 refactor - dialectsMike Bayer2019-01-0533-300/+365
| | | | | | | | | | | | A full rewrite of all imports and pep8 formatting using zimports, black, commits are broken into sections. Directories included in this commit: lib/sqlalchemy/dialects/ lib/sqlalchemy/databases/ lib/sqlalchemy/connectors/ Change-Id: I7070d589303a760e6ed5eefde39efc11da818281 (cherry picked from commit aa46e6a9e2e3cd04f835c53ed4600e6f8e9ee13f)
* flake8 refactor - ormMike Bayer2019-01-0517-103/+184
| | | | | | | | | | | | A full rewrite of all imports and pep8 formatting using zimports, black, commits are broken into sections. Directories included in this commit: lib/sqlalchemy/orm/ Change-Id: Iad6a2e4a03a5bbfd5d68d174284aaabe69e2760a (cherry picked from commit 7eeed1cbb97b9b08bf74739a3b02d672d1858249)
* flake8 refactor - engineMike Bayer2019-01-0514-122/+335
| | | | | | | | | | | | A full rewrite of all imports and pep8 formatting using zimports, black, commits are broken into sections. Directories included in this commit: lib/sqlalchemy/*.py lib/sqlalchemy/engine/ lib/sqlalchemy/pool/ lib/sqlalchemy/event/ Change-Id: Idf6a7ba01bacd00fd9271fefd7e1bbab6f91f22b (cherry picked from commit e85ed21d2cdfcb215ff363592daecf9fe0d9e576)
* flake8 refactor - utilMike Bayer2019-01-0526-149/+371
| | | | | | | | | | | | A full rewrite of all imports and pep8 formatting using zimports, black, commits are broken into sections. Directories included in this commit: lib/sqlalchemy/testing/ lib/sqlalchemy/util/ Change-Id: Ia686b88e8b334874716de0be5e383c7b2abe5643 (cherry picked from commit 40ba6aca86362f54a27ae3380cb453ec6fd4448f)
* flake8 refactor - coreMike Bayer2019-01-0515-174/+304
| | | | | | | | | | | | A full rewrite of all imports and pep8 formatting using zimports, black, commits are broken into sections. Directories included in this commit: lib/sqlalchemy/sql/ Change-Id: Ia994322c398c55aaa01d11d21cb74f1d50ab683f (cherry picked from commit 0ae1a3ab57727b798da78befa1ee40537ae95b69)
* partial cherry-pick of master flake8. clean cherrypick for lib and test,Mike Bayer2019-01-0522-59/+58
| | | | | | | manually merged exaples. Change-Id: I9532d3b13d13f2769e6ca48eea23dd7d4041f68f (cherry picked from commit e3bdd80c6661c0e95fb67998c57540be667ce761)
* - do a broken zimports run on libMike Bayer2019-01-05174-2086/+1737
|
* - prep for clean zimports runMike Bayer2019-01-053-19/+19
|
* step 1, straight black -l 79 runMike Bayer2019-01-05188-16013/+23685
| | | | includes adjustment to setup.py to recognize __version__ correctly
* Prep for flake8 refactoringMike Bayer2019-01-033-7/+8
| | | | | | | | | a few code changes ahead of time to handle some __all__ issues better. also include new flake8 rules, since the existing flake8 doesn't pass in any case. Change-Id: I1efdf75124ae7bcac719c22e505bb5b13db06c04 (cherry picked from commit d229360a8d4071c2f150558897f37e13eb09f430)
* rework the exclusions spec expressionMike Bayer2018-12-311-12/+18
| | | | | | | | The expression was expecting spaces which means we were skipping Postgresql window function tests and possibly other things. Change-Id: I57c4aed558f4011f2f7b882a2d9b1fee210f9eaf (cherry picked from commit 1eaf9dc7776b9833a9fb62fe630b4b9ac63a31f4)
* commit 1b774808c926665047bf353222ecd191679a95d1Lele Gaifax2018-12-304-7/+7
| | | | | | | | | | | | | | | | Author: Lele Gaifax <lele@metapensiero.it> Date: Tue Dec 25 12:35:41 2018 +0100 Consistently use "PostgreSQL", fixing also a few doc glitches commit 0e382aaee4427193926f0dc10ad29056bc12c85e Author: Lele Gaifax <lele@metapensiero.it> Date: Tue Dec 25 12:08:49 2018 +0100 Remove duplicated words Change-Id: Iaa586b9412f46a50fe6ff3bbb92e07d6cb1905c8 (cherry picked from commit c0f9708fde39175c8695fdd87873464f516fdf98)
* Maintain compiled_params / replacement_expressions within expanding INMike Bayer2018-12-211-31/+44
| | | | | | | | | | Fixed issue in "expanding IN" feature where using the same bound parameter name more than once in a query would lead to a KeyError within the process of rewriting the parameters in the query. Fixes: #4394 Change-Id: Ibcadce9fefbcb060266d9447c2044ee6efeccf5a (cherry picked from commit c495769751e8b19d54fb92388ced587b5d13b85d)
* Handle PostgreSQL enums in remote schemasMike Bayer2018-12-213-24/+79
| | | | | | | | | | | | | | | | | | | Fixed issue where a :class:`.postgresql.ENUM` or a custom domain present in a remote schema would not be recognized within column reflection if the name of the enum/domain or the name of the schema required quoting. A new parsing scheme now fully parses out quoted or non-quoted tokens including support for SQL-escaped quotes. Fixed issue where multiple :class:`.postgresql.ENUM` objects referred to by the same :class:`.MetaData` object would fail to be created if multiple objects had the same name under different schema names. The internal memoization the Postgresql dialect uses to track if it has created a particular :class:`.postgresql.ENUM` in the database during a DDL creation sequence now takes schema name into account. Fixes: #4416 Change-Id: I8cf03069e10b12f409e9b6796e24fc5850979955 (cherry picked from commit 0b0a4c8ba2465fce5fa1954a0d31b44840f1b4b8)
* Rewrite the convert_unicode docs and add tons of dragonsMike Bayer2018-12-212-36/+75
| | | | | | | | These flags will all be going away as Python 3 has solved all of this. Change-Id: I4f581d8dd7826dd823b671d0d8e72250284236c8 (cherry picked from commit 7f12f63c3a8c77715135126aac88ac6055b279c0)
* Add missing parameter to docstringAgam Rafaeli2018-12-171-0/+3
| | | | | | | | | Closes: #4410 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4410 Pull-request-sha: 070a0f44f3a6ce651e6b8e9dcc84d2d507d00845 Change-Id: I7a026bf6a2041e7686d90d5f155b88d8001f2ba8 (cherry picked from commit b1e4b597811768378d964e16bd142e8ee8c448d8)
* Document and support nested compositesMike Bayer2018-12-121-1/+3
| | | | | | | | | | | Composites can behave in a "nested" fashion by defining the class in that way. To make the constructor more convenient, a callable can be passed to :func:`.composite` instead of the class itself. This works now, so add a test to ensure this pattern remains available. Change-Id: Ia009f274fca7269f41d6d824e0f70b6fb0ada081 (cherry picked from commit d4a130bb1b92869efe33675262c7b1fde364e477)
* Version 1.2.16 placeholderMike Bayer2018-12-111-1/+1
|
* Refer to existing of_type when resolving string attribute nameMike Bayer2018-12-071-2/+7
| | | | | | | | | | | Fixed bug where chaining of mapper options using :meth:`.RelationshipProperty.of_type` in conjunction with a chained option that refers to an attribute name by string only would fail to locate the attribute. Fixes: #4400 Change-Id: I01bf449ec4d8f56bb8c34e25153c1c9b31ff8012 (cherry picked from commit 099f3fd812ff4424f90f3c2b41ddce7049a54022)
* Merge "Fix PostgreSQL reflection of domains expressed as arrays" into rel_1_2mike bayer2018-12-031-3/+10
|\
| * Fix PostgreSQL reflection of domains expressed as arraysJakub Synowiec2018-12-011-3/+10
| | | | | | | | | | | | | | | | | | | | Fixed issue where reflection of a PostgreSQL domain that is expressed as an array would fail to be recognized. Pull request courtesy Jakub Synowiec. Fixes: #4377 Change-Id: I252c79ca435b87d4d9172b1c84e0e74e789ef676 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4380 (cherry picked from commit 46f9c3c7d4d2c31f3f1627dcf777bd3215e13e3d)
* | "left" -> "accidentally placed at"Mike Bayer2018-12-021-2/+2
|/ | | | | | | | | | | | since "left" is kind of ambiguous, use more explicit terminology here. Also update the test to use a positive assertion that the warning is emitted; quote the attribute name. Change-Id: Ic2284c200a26b32b2da063cfaf6d59547309d587 References: https://github.com/zzzeek/sqlalchemy/pull/488 (cherry picked from commit eacb31a89fe883edd0ada7f2724239c1f8c5b685)
* Merge "Add the write_timeout option for mysql." into rel_1_2mike bayer2018-11-301-0/+1
|\
| * Add the write_timeout option for mysql.jun923.gu2018-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | As MySQLdb support read_timeout and write_timeout option, and sqlalchemy just support read_timeout option. So sqlalchemy need to add write_timeout option. Fixes: #4381 Change-Id: I2bea80bdd6f20fafc72b48fa0e5d795626d9d9b9 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4385 (cherry picked from commit 6a8454ded311010927af04db30a57d683cf67dd4)
* | typoRaphael2018-11-301-1/+1
|/ | | | | | typo (cherry picked from commit 0a0b36686d5da0e7d04974c8df0ece574b71f3cb)
* Warn for lower-case column attribute on declarativeMike Bayer2018-11-261-0/+14
| | | | | | | | | | A warning is emitted in the case that a :func:`.column` object is applied to a declarative class, as it seems likely this intended to be a :class:`.Column` object. Fixes: #4374 Change-Id: I2e617ef65547162e3ba6587c168548ad0cf6203d (cherry picked from commit 6ec40eca1a03a9156ee82f3ce75850778220b39e)
* Modernize cx_oracle connect documentationMike Bayer2018-11-151-21/+41
| | | | | | | | in preparation for #4369, however the documentation was also inaccurate in that it did not mention connect_args. Change-Id: I992e5f53ce16cc9c72d2c893a3ca798a9c2b4d07 (cherry picked from commit 996727ed89cd2403e75e3ab924f01754d408075d)
* Add secondary selectable to FROM clauses for correlated existsMike Bayer2018-11-141-2/+5
| | | | | | | | | | | | | In continuing with a similar theme as that of very recent :ticket:`4349`, repaired issue with :meth:`.RelationshipProperty.Comparator.any` and :meth:`.RelationshipProperty.Comparator.has` where the "secondary" selectable needs to be explicitly part of the FROM clause in the EXISTS subquery to suit the case where this "secondary" is a :class:`.Join` object. Fixes: #4366 Change-Id: Icd0d0c3871bbd0059f0c9256e2b980edc2c90551 (cherry picked from commit fdfd1680603f6663182ba4766ae2f5abdd3ced45)
* Merge "Deannotate "parententity" in primaryjoin/secondaryjoin" into rel_1_2mike bayer2018-11-141-0/+17
|\
| * Deannotate "parententity" in primaryjoin/secondaryjoinMike Bayer2018-11-141-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where the ORM annotations could be incorrect for the primaryjoin/secondaryjoin a relationship if one used the pattern ``ForeignKey(SomeClass.id)`` in the declarative mappings. This pattern would leak undesired annotations into the join conditions which can break aliasing operations done within :class:`.Query` that are not supposed to impact elements in that join condition. These annotations are now removed up front if present. Also add a test suite for has/any into test_query which will form the basis for new tests to be added in :ticket:`4366`. Fixes: #4367 Change-Id: I929ef983981bb49bf975f346950ebb0e19c986b8 (cherry picked from commit 4ee5b2c4a9e7ad9f3df75940b9837d5c65cba6fd)
* | Insert primary entity in dynamic "secondary"Mike Bayer2018-11-131-1/+7
|/ | | | | | | | | | | | | Fixed regression caused by :ticket:`4349` where adding the "secondary" table to the FROM clause for a dynamic loader would affect the ability of the :class:`.Query` to make a subsequent join to another entity. The fix adds the primary entity as the first element of the FROM list since :meth:`.Query.join` wants to jump from that. Version 1.3 will have a more comprehensive solution to this problem as well (:ticket:`4365`). Fixes: #4363 Change-Id: I1abbb6207722619dc5369e1fd96de43d60a1ee62 (cherry picked from commit 40c1a46e993b5c5ff917ce41c3dca66c139bde94)
* Version 1.2.15 placeholderMike Bayer2018-11-101-1/+1
|
* Use case insensitive matching on lower_case_table_names=1,2Mike Bayer2018-11-091-5/+32
| | | | | | | | | | | | | | Fixed regression caused by :ticket:`4344` released in 1.2.13, where the fix for MySQL 8.0's case sensitivity problem with referenced column names when reflecting foreign key referents is worked around using the ``information_schema.columns`` view. The workaround was failing on OSX / ``lower_case_table_names=2`` which produces non-matching casing for the ``information_schema.columns`` vs. that of ``SHOW CREATE TABLE``, so in case-insensitive SQL modes case-insensitive matching is now used. Fixes: #4361 Change-Id: I748549bc4c27fad6394593f8ec93fc22bfd01f6c (cherry picked from commit af159c56957b26c523e7fe324edf7d17882f88be)
* Improve documentation re: Session.binds and partitioning strategiesMike Bayer2018-11-061-21/+80
| | | | | | | | | | Update documentation to include background on arbitrary superclass usage, add full cross-linking between all related methods and parameters. De-emphasize "twophase" and document that it is not well-supported in drivers. Change-Id: Id99894bb62cc506e896c9aa7c256e9f6e602243e (cherry picked from commit 1f13c8c833ebd96c09d1499b2504aa4950dca709)
* Minor cosmetic tweaks to reST markupLele Gaifax2018-11-031-9/+10
| | | | (cherry picked from commit e0dd82f26703f56e5fda7fb6deb579d1f96ecab9)
* Deannotate ORM columns in ColumnEntityMike Bayer2018-11-021-0/+11
| | | | | | | | | | | | Fixed a minor performance issue which could in some cases add unnecessary overhead to result fetching, involving the use of ORM columns and entities that include those same columns at the same time within a query. The issue has to do with hash / eq overhead when referring to the column in different ways. Fixes: #4347 Change-Id: I191d4d1b1623898060a9accdfd186de16f89a6b7 (cherry picked from commit 88bfa1b89c5b3b2290fa266c53322f003833af40)
* Use attr keys when testing bulk update params for primary keyMike Bayer2018-11-011-1/+7
| | | | | | | | | | | | | | Fixed bug in :meth:`.Session.bulk_update_mappings` where alternate mapped attribute names would result in the primary key column of the UPDATE statement being included in the SET clause, as well as the WHERE clause; while usually harmless, for SQL Server this can raise an error due to the IDENTITY column. This is a continuation of the same bug that was fixed in :ticket:`.3849`, where testing was insufficient to catch this additional flaw. Fixes: #4357 Change-Id: Iead058c0465dfa31c5b8a8780769278b7000acc8 (cherry picked from commit e991684a39fa9fae2628ce583e141b9aea99d856)
* Version 1.2.14 placeholderMike Bayer2018-10-311-1/+1
|
* Add missing index method to _AssociationList.Chris Macklin2018-10-311-0/+3
| | | | | | | | | Added missing ``.index()`` method to list-based association collections in the association proxy extension. Change-Id: Ice81dc4bcccd520638c5bc9a0f8bb2027946c846 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/485 (cherry picked from commit 1c3b2d71863f6aefbc060798c2f50d1e029feef1)
* Merge "Move pk on single-inh subclass check below conflict resolution check" ↵mike bayer2018-10-311-5/+5
|\ | | | | | | into rel_1_2
| * Move pk on single-inh subclass check below conflict resolution checkTom Manderson2018-10-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The column conflict resolution technique discussed at :ref:`declarative_column_conflicts` is now functional for a :class:`.Column` that is also a primary key column. Previously, a check for primary key columns declared on a single-inheritance subclass would occur before the column copy were allowed to pass. Fixes: #4352 Change-Id: Id4c025da53c28e58db6b549fe398f25f8a90d355 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/483 (cherry picked from commit 3ed79a5c18c14d842280805d1dae8a9c99ec8f18)
* | Add reserved word 'function' for MySQLAlex Hall2018-10-301-4/+4
|/ | | | | | | | | | Added word ``function`` to the list of reserved words for MySQL, which is now a keyword in MySQL 8.0 Fixes: #4348 Change-Id: Idd30acda7e99076810f65d0ee860055a18dc9193 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/481 (cherry picked from commit 38c81328e91884f71af175a115dfdb423d8f4910)
* Add missing spacewodim2018-10-301-1/+1
|