summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Remove errant linkMike Bayer2020-07-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The link to "passive_deletes" has moved in 9e1ee412b8650761af6df993e119906682604728 however the tag stayed here and caused a self link. Fixes: #5484 Change-Id: I3ac5970be30504367294b9e9a83eb5a2c579cc71
* | | | Merge "Ensure is_comparison passed for PG RANGE op() methods"mike bayer2020-07-293-23/+71
|\ \ \ \ | |_|_|/ |/| | |
| * | | Ensure is_comparison passed for PG RANGE op() methodsJim Bosch2020-07-263-23/+71
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where the return type for the various RANGE comparison operators would itself be the same RANGE type rather than BOOLEAN, which would cause an undesirable result in the case that a :class:`.TypeDecorator` that defined result-processing behavior were in use. Pull request courtesy Jim Bosch. Fixes: #5476 Closes: #5477 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5477 Pull-request-sha: 925b117e0c91cdd67d9ddbd9d65f5ca3e88af91f Change-Id: I52ab4d4362d379c8253990f9d328a40990a64520
* | | Merge "Remove comment code lines"mike bayer2020-07-261-3/+0
|\ \ \ | |/ / |/| |
| * | Remove comment code linesj003562872020-07-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PyODBCConnector.initialize just super from Connector, no need to redeclare, so I guess that's why they are commented before. <!-- Provide a general summary of your proposed changes in the Title field above --> ### Description <!-- Describe your changes in detail --> Remove the useless comment code lines. ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [x] A documentation / typographical error fix - Good to go, no issue or tests are needed - [ ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #5475 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5475 Pull-request-sha: 23176a7f0316d74407492c2bb299c88924ed0868 Change-Id: If94bb6275c30015e3aaa1519471b7d9bcda18bf8
* | | Improve delete cascade and passive deletes sectionsMike Bayer2020-07-264-95/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add cross linking from Core to ORM and also add new sections and examples regarding many-to-many. Move the section out of "collections" and into the "cascades" chapter where it's more likely to be found. Change-Id: If29360e463e5745279bc5335bd12352d50ad8953
* | | Update docs with actual MariaDB JSON supportDefteZ2020-07-261-2/+2
|/ /
* | Merge "Revise setinputsizes approach"mike bayer2020-07-233-60/+154
|\ \
| * | Revise setinputsizes approachMike Bayer2020-07-193-60/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in order to support asyncpg as well as pg8000, we need to revise setinputsizes to work for more cases as well as adjust NativeForEmulated a bit to work more completely with the INTERVAL datatype. - put most of the setinputsizes work into the compiler where the computation can be cached. - support per-element setinputsizes for a tuple - adjust TypeDecorator so that _unwrapped_dialect_impl will honor a type that the dialect links to directly in it's adaption mapping. Decouble _unwrapped_dialect_impl from TypeDecorator._gen_dialect_impl() which has a different purpose. This allows setinputsizes to do the right thing with the INTERVAL datatype. - test cases for Oracle with Variant continue to work Change-Id: I9e1ea33aeca3b92b365daa4a356d778191070c03
* | | Merge "Allow Grouping to pass along proxy_set of element"mike bayer2020-07-233-0/+36
|\ \ \
| * | | Allow Grouping to pass along proxy_set of elementMike Bayer2020-07-213-0/+36
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Repaired an issue where the "ORDER BY" clause rendering a label name rather than a complete expression, which is particularly important for SQL Server, would fail to occur if the expression were enclosed in a parenthesized grouping in some cases. This case has been added to test support. Fixes: #5470 Change-Id: Ie0e27c39e5d53be78b32f7810f93d2d0536375e7
* | | Ensure _distinct_on removed within from_selectableMike Bayer2020-07-202-0/+95
|/ / | | | | | | | | Fixes: #5469 Change-Id: I85498d3380c2efb595782d2ba92cfd692c3efc48
* | Fix mssql dialect escaping object names containing ']'Gord Thompson2020-07-183-4/+26
| | | | | | | | | | Fixes: #5467 Change-Id: I054ec219717ba62847a9daf1214e215dd6b70633
* | Merge "Add requirement for test_get_view_definition"mike bayer2020-07-161-0/+1
|\ \
| * | Add requirement for test_get_view_definitionGord Thompson2020-07-151-0/+1
| | | | | | | | | | | | | | | | | | Bypass the test if the views are not being created. Change-Id: I3945acb418575d12e5fe0e4657eb5e3b1c08b90e
* | | Repair test modified in 5de0f1cf50cc0170d8eMike Bayer2020-07-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | was "failing" for SQL server since a second set of assertions had been removed, these can be back as long as the session is rolled back afterwards Change-Id: Ie5d75aea41ba98f549cd72d71c6b4fdb30726775
* | | Repair doubled "using engines in fork()" sectionMike Bayer2020-07-152-97/+59
|/ / | | | | | | | | | | | | | | | | This section was written twice in two different ways with the same recipe. consolidate into one section and add additional caveats regading dispose. Change-Id: I20524935e7c10e3624d561ea2735312fd04e673d References: #5460
* | Merge "test single and double quote inspection scenarios"2020_tutorialmike bayer2020-07-136-20/+185
|\ \
| * | test single and double quote inspection scenariosMike Bayer2020-07-136-20/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applied a sweep through all included dialects to ensure names that contain single or double quotes are properly escaped when querying system tables, for all :class:`.Inspector` methods that accept object names as an argument (e.g. table names, view names, etc). SQLite and MSSQL contained two quoting issues that were repaired. Fixes: #5456 Change-Id: I3bc98806f5166f3d82275650079ff561446f2aef
* | | Merge "more docs for autocommit isolation level"mike bayer2020-07-1310-81/+232
|\ \ \
| * | | more docs for autocommit isolation levelMike Bayer2020-07-1210-81/+232
| |/ / | | | | | | | | | | | | | | | | | | | | | this concept is not clear that we offer real DBAPI autocommit everywhere. backport 1.3 with edits as well Change-Id: I2e8328b7fb6e1cdc5453ab29c94276f60c7ca149
* | | Merge "Make call-count profiling tests on osx have their own platform key"mike bayer2020-07-133-0/+5
|\ \ \ | |/ / |/| |
| * | Make call-count profiling tests on osx have their own platform keyFederico Caselli2020-07-113-0/+5
| | | | | | | | | | | | | | | | | | | | | They previously would use the linux profiles, but recently some discrepancies in the function call count on osx would make the tests fail. Change-Id: Ifdfdca1676972de4179f59cdaae196f6805d4a21
* | | Correct mock call from 5de0f1cf50Mike Bayer2020-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | mock in python 2.7 / 3.8 seems to have an "args" accessor but in prior python 3 versions this is not the case, so this is likely a recent addition to "mock" but wasn't present in the python3 vendored versions. Change-Id: Iff8afe75e891c9658c7c7b577831fefd5986940b
* | | Correct incorrect readme.rst fileMike Bayer2020-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | in the move to setup.cfg at 9ca81f5f79498356c4f3387c17edda0ed3dad451 we put the wrong README file. Change-Id: I25193d248e325e9473f26901925f91bef54ca07a
* | | Further corrections to session docsMike Bayer2020-07-111-79/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | many more to come. One issue is that references to documentation sections inside of decorator-configured deprecation warnings will also generate a meaningless token when the runtime warning is emitted. It would be nice to improve upon this somehow. Change-Id: I16b214b3d310850bbfb0d9ade70235f5a9735eba
* | | Merge "Convert remaining ORM APIs to support 2.0 style"mike bayer2020-07-1145-2071/+4226
|\ \ \ | |/ / |/| |
| * | Convert remaining ORM APIs to support 2.0 styleMike Bayer2020-07-1145-2071/+4226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is kind of a mixed bag of all kinds to help get us to 1.4 betas. The documentation stuff is a work in progress. Lots of other relatively small changes to APIs and things. More commits will follow to continue improving the documentation and transitioning to the 1.4/2.0 hybrid documentation. In particular some refinements to Session usage models so that it can match Engine's scoping / transactional patterns, and a decision to start moving away from "subtransactions" completely. * add select().from_statement() to produce FromStatement in an ORM context * begin referring to select() that has "plugins" for the few edge cases where select() will have ORM-only behaviors * convert dynamic.AppenderQuery to its own object that can use select(), though at the moment it uses Query to support legacy join calling forms. * custom query classes for AppenderQuery are replaced by do_orm_execute() hooks for custom actions, a separate gerrit will document this * add Session.get() to replace query.get() * Deprecate session.begin->subtransaction. propose within the test suite a hypothetical recipe for apps that rely on this pattern * introduce Session construction level context manager, sessionmaker context manager, rewrite the whole top of the session_transaction.rst documentation. Establish context manager patterns for Session that are identical to engine * ensure same begin_nested() / commit() behavior as engine * devise all new "join into an external transaction" recipe, add test support for it, add rules into Session so it just works, write new docs. need to ensure this doesn't break anything * vastly reduce the verbosity of lots of session docs as I dont think people read this stuff and it's difficult to keep current in any case * constructs like case(), with_only_columns() really need to move to *columns, add a coercion rule to just change these. * docs need changes everywhere I look. in_() is not in the Core tutorial? how do people even know about it? Remove tons of cruft from Select docs, etc. * build a system for common ORM options like populate_existing and autoflush to populate from execution options. * others? Change-Id: Ia4bea0f804250e54d90b3884cf8aab8b66b82ecf
* | | Merge "Improvements to test_computed_col_default_not_set"mike bayer2020-07-091-6/+5
|\ \ \
| * | | Improvements to test_computed_col_default_not_setRafi Shamim2020-07-091-6/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <!-- Provide a general summary of your proposed changes in the Title field above --> ### Description <!-- Describe your changes in detail --> - Update the test so it looks at computed_default_table instead of computed_column_table. - Stop inspecting autoincrement; instead directly check for default/non-default values for the relevant columns. Fixes: #5414 ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [x] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #5417 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5417 Pull-request-sha: 5918af6abb991e6d2322ea4252e56d456da628dc Change-Id: Id9484ae7f297735345016be5b7461325825503da
* | | Limit init_subclass test above python 3.6Mike Bayer2020-07-082-1/+8
|/ / | | | | | | | | | | | | | | The commit for I1654befe9eb1c8b8e7fc0784bdbe64284614f0ea #5357 runs the test on all Python 3 versions, however we need to limit at least python 3.6 for this. Change-Id: Ie86b78bbfd8c7bd013ff9aa7f8905328d792c1b3
* | Propose --nomemory by defaultMike Bayer2020-07-081-4/+6
| | | | | | | | | | | | | | | | | | | | the memory tests are solely responsible for the largest chunk of time and CPU energy taken up in running the tests. Regressions in this area are nonexistent unless major changes are being taken up. Try to revert them to False and see if a single gerrit job can perhaps run these. Change-Id: Ibaead2d1c0a76f1339bee63652a8aead689e8b75
* | Repair change of "future_select" caught in merge conflictMike Bayer2020-07-081-7/+7
| | | | | | | | | | | | | | | | the recent change to select() apparently seems to have been merged with other statements in the test_update_delete test that was still using the old term. Change-Id: I6be3eb148249bfcf08aae19efcad89803c69c658
* | Merge remote-tracking branch 'origin/pr/5410'Mike Bayer2020-07-082-4/+8
|\ \ | | | | | | | | | Change-Id: Ib052efc33ddd58d38e16c0cc721abee668b861d5
| * | resolves #5333 typo correction 'explcit' should be 'explicit'.RamonWill2020-07-042-4/+8
| | |
* | | Merge remote-tracking branch 'origin/pr/5439'Mike Bayer2020-07-081-0/+3
|\ \ \ | | | | | | | | | | | | Change-Id: Ibab5889b14c546a8c43c5eaf88ed5d1f53713880
| * | | resolves #3757RamonWill2020-07-041-0/+3
| | | |
* | | | Merge "Add future=True to create_engine/Session; unify select()"mike bayer2020-07-08108-2708/+2958
|\ \ \ \ | |_|_|/ |/| | |
| * | | Add future=True to create_engine/Session; unify select()Mike Bayer2020-07-08108-2708/+2958
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several weeks of using the future_select() construct has led to the proposal there be just one select() construct again which features the new join() method, and otherwise accepts both the 1.x and 2.x argument styles. This would make migration simpler and reduce confusion. However, confusion may be increased by the fact that select().join() is different Current thinking is we may be better off with a few hard behavioral changes to old and relatively unknown APIs rather than trying to play both sides within two extremely similar but subtly different APIs. At the moment, the .join() thing seems to be the only behavioral change that occurs without the user taking any explicit steps. Session.execute() will still behave the old way as we are adding a future flag. This change also adds the "future" flag to Session() and session.execute(), so that interpretation of the incoming statement, as well as that the new style result is returned, does not occur for existing applications unless they add the use of this flag. The change in general is moving the "removed in 2.0" system further along where we want the test suite to fully pass even if the SQLALCHEMY_WARN_20 flag is set. Get many tests to pass when SQLALCHEMY_WARN_20 is set; this should be ongoing after this patch merges. Improve the RemovedIn20 warning; these are all deprecated "since" 1.4, so ensure that's what the messages read. Make sure the inforamtion link is on all warnings. Add deprecation warnings for parameters present and add warnings to all FromClause.select() types of methods. Fixes: #5379 Fixes: #5284 Change-Id: I765a0b912b3dcd0e995426427d8bb7997cbffd51 References: #5159
* | | Merge "ensure we unwrap desc() /label() all the way w/ order by"mike bayer2020-07-073-2/+65
|\ \ \
| * | | ensure we unwrap desc() /label() all the way w/ order byMike Bayer2020-07-073-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deprecated logic to move order_by expressions up into the columns clause needed adjustment to accommodate for a more deeply-wrapped structure when desc() + label() are combined in an order by column. This structure now comes from coercions in 1.4. it's not clear to me at the moment why it's different from 1.3 but this shouldn't really matter. Fixes: #5443 Change-Id: If909a86f715992318d7aa283603197f7711f1d3b
* | | | Merge "Add **kw support to DeclarativeMeta.__init__"mike bayer2020-07-073-1/+37
|\ \ \ \ | |/ / / |/| | |
| * | | Add **kw support to DeclarativeMeta.__init__EwenGillies2020-07-063-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a ``**kw`` argument to the :meth:`.DeclarativeMeta.__init__` method. This allows a class to support the :pep:`487` metaclass hook ``__init_subclass__``. Pull request courtesy Ewen Gillies. Fixes: #5357 Closes: #5363 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5363 Pull-request-sha: 0ad05a768316cba03a4d312ab39d3e8fbca7ac54 Change-Id: I1654befe9eb1c8b8e7fc0784bdbe64284614f0ea
* | | | Merge "added semicolon (;) to improve warning message clarity"mike bayer2020-07-061-1/+1
|\ \ \ \
| * | | | added semicolon (;) to improve warning message clarityjonathan vanasco2020-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### Description Added a semicolon to improve the clarity of warning message. I actually had a table named `backend`, and thought it was involved! While updating the code, I noticed no test that directly tests for this warning message. There are tests for the `Can't sort tables for DROP;` prefix of this message and the `exc.CircularDependencyError`; and some tests for the `exc.CircularDependencyError` message itself. I couldn't find any test for this particular message though. (Just thought I'd bring that up) No issue created, because this is minor. Closes: #5431 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5431 Pull-request-sha: 87fb5733ff4fc1a13dd94277716814ea852f654c Change-Id: I87a504d30a7dd5155c34f7d7f30b2116d0d3cd3f
* | | | | Consolidate connection customization documentationMike Bayer2020-07-062-46/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. move all discussion of how to customize connection to the engines.rst section. have the section in pooling.rst point to engines. 2. ensure all of the common use cases for connection modification are listed out in order of level of modification. the use case of modifying an existing connection is separate from that of modifying how connect is called; ensure that poolevents.connect is referred to just as prominently as dialectevents.do_connect. 3. completely replace any discussion of create_engine.creator, as this hook does not offer anything beyond what do_connect() does. "creator" is more about using a Pool object directly without an Engine, which is no longer a documented use case. Change-Id: Ibe366d2a6e63eb420a6136fdc71ce0fb545edf8f
* | | | | Ensure synchronize_session works with lambda statementsMike Bayer2020-07-052-6/+180
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few places have logic that assumes the top-level statement is the actual UPDATE or DELETE which is not the case with a lambda. Ensure the correct object is used. This fixes issues specific to both "fetch" strategy as well as "evaluate" strategy. Fixes: #5442 Change-Id: Ic9cc01c696c3c338d5bc79688507e6717c4c169b
* | | | Document pyodbc built-in poolingMike Bayer2020-07-051-0/+26
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | PyODBC apparently pools connections by default and this is a module-wide setting only. Documenent that this happens and how to disable it. Fixes: #5440 Change-Id: I415bda7beb2211c66991b6c804b0ddb4d79e427f
* | | introduce deferred lambdasMike Bayer2020-07-0336-363/+3204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The coercions system allows us to add in lambdas as arguments to Core and ORM elements without changing them at all. By allowing the lambda to produce a deterministic cache key where we can also cheat and yank out literal parameters means we can move towards having 90% of "baked" functionality in a clearer way right in Core / ORM. As a second step, we can have whole statements inside the lambda, and can then add generation with __add__(), so then we have 100% of "baked" functionality with full support of ad-hoc literal values. Adds some more short_selects tests for the moment for comparison. Other tweaks inside cache key generation as we're trying to approach a certain level of performance such that we can remove the use of "baked" from the loader strategies. As we have not yet closed #4639, however the caching feature has been fully integrated as of b0cfa7379cf8513a821a3dbe3028c4965d9f85bd, we will also add complete caching documentation here and close that issue as well. Closes: #4639 Fixes: #5380 Change-Id: If91f61527236fd4d7ae3cad1f24c38be921c90ba
* | | typoMike Bayer2020-07-011-1/+1
| | | | | | | | | | | | Change-Id: I8b10309e47b07065893f6f41dfdbd67ad3e96bad