summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
Commit message (Collapse)AuthorAgeFilesLines
* Clean up .execute calls in test_insert.pyGord Thompson2020-04-111-52/+48
| | | | Change-Id: I87e144d00577b53baab203c675caeaf8ad46cb5c
* 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
* | Remove code deprecated before version 1.1Federico Caselli2020-04-092-17/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Merge "Broaden is[not]_distinct_from support"mike bayer2020-04-072-0/+65
|\
| * Broaden is[not]_distinct_from supportGord Thompson2020-04-022-0/+65
| | | | | | | | | | | | | | Added support for .is[not]_distinct_from to SQL Server, MySQL, and Oracle. Fixes: #5137 Change-Id: I3b4d3b199821a55687f83c9a5b63a95d07a64cd5
* | 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
* 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
* Merge "Add a third labeling mode for SELECT statements"mike bayer2020-03-301-1/+2
|\
| * Add a third labeling mode for SELECT statementsMike Bayer2020-03-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-2/+2
|/ | | | | | Also remove no longer used compat code Change-Id: Ifda239fd84b425e43f4028cb55a5b3b8efa4dfc6
* Fix typo in resultproxy.c and test compatibility with python 3.5Federico Caselli2020-03-281-1/+2
| | | | | | | | | | | - 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
* Deprecate add of columns in order by with distinctFederico Caselli2020-03-251-3/+6
| | | | | | | Deprecate automatic addition of order by column in a query with a distinct Fixes: #5134 Change-Id: I467a39379c496be7e84a05f11ba9f8ca2bcc6e32
* Merge "Convert schema_translate to a post compile"mike bayer2020-03-243-8/+17
|\
| * Convert schema_translate to a post compileMike Bayer2020-03-243-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revised the :paramref:`.Connection.execution_options.schema_translate_map` feature such that the processing of the SQL statement to receive a specific schema name occurs within the execution phase of the statement, rather than at the compile phase. This is to support the statement being efficiently cached. Previously, the current schema being rendered into the statement for a particular run would be considered as part of the cache key itself, meaning that for a run against hundreds of schemas, there would be hundreds of cache keys, rendering the cache much less performant. The new behavior is that the rendering is done in a similar manner as the "post compile" rendering added in 1.4 as part of :ticket:`4645`, :ticket:`4808`. Fixes: #5004 Change-Id: Ia5c89eb27cc8dc2c5b8e76d6c07c46290a7901b6
* | Implement autocommit isolation level for cx_oracleGord Thompson2020-03-232-1/+92
|/ | | | | | | | | | | | | | | | As part of this change Oracle also gets the concept of a default isolation level, however since Oracle does not provide a fixed method of knowing what the isolation level would be without a server side transaction actually in progress, for now we hardcode just to "READ COMMITTED". Enhanced the test suite for isolation level testing in the dialect test suite and added features to requirements so that the supported isolation levels can be reported generically for dialects. Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Fixes: #5200 Change-Id: I2c4d49da9ff80ccc228c21e196ec9a961de53478
* Deprecate plain string in execute and introduce `exec_driver_sql`Federico Caselli2020-03-214-5/+13
| | | | | | | | | | | | | | | Execution of literal sql string is deprecated in the :meth:`.Connection.execute` and a warning is raised when used stating that it will be coerced to :func:`.text` in a future release. To execute a raw sql string the new connection method :meth:`.Connection.exec_driver_sql` was added, that will retain the previous behavior, passing the string to the DBAPI driver unchanged. Usage of scalar or tuple positional parameters in :meth:`.Connection.execute` is also deprecated. Fixes: #4848 Fixes: #5178 Change-Id: I2830181054327996d594f7f0d59c157d477c3aa9
* Support inspection of computed columnFederico Caselli2020-03-153-0/+186
| | | | | | | | | | | | | | | | | | | Added support for reflection of "computed" columns, which are now returned as part of the structure returned by :meth:`.Inspector.get_columns`. When reflecting full :class:`.Table` objects, computed columns will be represented using the :class:`.Computed` construct. Also improve the documentation in :meth:`Inspector.get_columns`, correctly listing all the returned keys. Fixes: #5063 Fixes: #4051 Closes: #5064 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5064 Pull-request-sha: ba00fc321ce468f8885aad23b3dd33c789e50fbe Change-Id: I789986554fc8ac7f084270474d0b2c12046b1cc2
* Merge "Fix IntegerTest for sqlalchemy-firebird"mike bayer2020-03-131-1/+1
|\
| * Fix IntegerTest for sqlalchemy-firebirdGord Thompson2020-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | Recent cleanup of test_types.py introduced a regression for sqlalchemy-firebird (and possibly other external dialects). With this change, `test_huge_int` now passes for sqlalchemy-firebird. Change-Id: Ieeb4b33ec5985f2e2bf6832d1cdef294f85407a0
* | Fix tests failing for SQLite file databases; repair provisioningGord Thompson2020-03-132-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. ensure provision.py loads dialect implementations when running reap_dbs.py. Reapers haven't been working since 598f2f7e557073f29563d4d567f43931fc03013f . 2. add some exclusion rules to allow the sqlite_file target to work; add to tox. 3. add reap dbs target for SQLite, repair SQLite drop_db routine which also wasn't doing the right thing for memory databases etc. 4. Fix logging in provision files, as the main provision logger is the one that's enabled by reap_dbs and maybe others, have all the provision files use the provision logger. Fixes: #5180 Fixes: #5168 Change-Id: Ibc1b0106394d20f5bcf847f37b09d185f26ac9b5
* | Dont raise on pytest deprecation warningsMike Bayer2020-03-122-0/+22
| | | | | | | | | | | | | | | | | | py.test 5.4.0 emits deprecation warnings for pytest.Class. make sure we don't raise for these, and log the code that will be used for 5.4.0 when we bump requirements. Fixes: #5201 Change-Id: I83e0402c4a6b2365a63b58d052c6989df3a37328
* | Rework select(), CompoundSelect() in terms of CompileStateMike Bayer2020-03-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuation of I408e0b8be91fddd77cf279da97f55020871f75a9 - add an options() method to the base Generative construct. this will be where ORM options can go - Change Null, False_, True_ to be singletons, so that we aren't instantiating them and having to use isinstance. The previous issue with this was that they would produce dupe labels in SELECT statements. Apply the duplicate column logic, newly added in 1.4, to these objects as well as to non-apply-labels SELECT statements in general as a means of improving this. - create a revised system for generating ClauseList compilation constructs that simplfies up front creation to not actually use ClauseList; a simple tuple is rendered by the compiler using the same constrcution rules as what are used for ClauseList but without creating the actual object. Apply to Select, CompoundSelect, revise Update, Delete - Select, CompoundSelect get an initial CompileState implementation. All methods used only within compilation are moved here - refine update/insert/delete compile state to not require an outside boolean - refine and simplify Select._copy_internals - rework bind(), which is going away, to not use some of the internal traversal stuff - remove "autocommit", "for_update" parameters from Select, references #4643 - remove "autocommit" parameter from TextClause , references #4643 - add deprecation warnings for statement.execute(), engine.execute(), statement.scalar(), engine.scalar(). Fixes: #5193 Change-Id: I04ca0152b046fd42c5054ba10f37e43fc6e5a57b
* | Don't import provision.py unconditionallyMike Bayer2020-03-032-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the imports for provision.py from each dialect and instead added a call in the central provision.py to a new dialect level method load_provisioning(). The provisioning registry works in the same way, so an existing dialect that is using the provision.py system right now by importing it as part of the package will still continue to function. However, to avoid pulling in the testing package when the dialect is used in a non-testing context, the new hook may be used. Also removed a module-level dependency of the testing framework on the orm package. Revised an internal change to the test system added as a result of :ticket:`5085` where a testing-related module per dialect would be loaded unconditionally upon making use of that dialect, pulling in SQLAlchemy's testing framework as well as the ORM into the module import space. This would only impact initial startup time and memory to a modest extent, however it's best that these additional modules aren't reverse-dependent on straight Core usage. Fixes: #5180 Change-Id: I6355601da5f6f44d85a2bbc3acb5928559942b9c
* | Merge "Ensure all nested exception throws have a cause"mike bayer2020-03-023-22/+65
|\ \
| * | Ensure all nested exception throws have a causeMike Bayer2020-03-023-22/+65
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applied an explicit "cause" to most if not all internally raised exceptions that are raised from within an internal exception catch, to avoid misleading stacktraces that suggest an error within the handling of an exception. While it would be preferable to suppress the internally caught exception in the way that the ``__suppress_context__`` attribute would, there does not as yet seem to be a way to do this without suppressing an enclosing user constructed context, so for now it exposes the internally caught exception as the cause so that full information about the context of the error is maintained. Fixes: #4849 Change-Id: I55a86b29023675d9e5e49bc7edc5a2dc0bcd4751
* | Deprecate the databases packagesFederico Caselli2020-02-281-2/+2
|/ | | | | | | The databases package is an old alias to the dialect package, and its usage is now deprecated Change-Id: I5343a2d270ed5a8c654b9fe13dff40cdf54649ed
* Clean up test_types.py in test suiteGord Thompson2020-02-231-65/+71
| | | | | | | Convert connectionless execution calls to use preferred methods Change-Id: I64c49cb9b495007d43fc6c83e677a19cc2c6c9b9
* Merge "Repair inline flag"mike bayer2020-02-221-0/+3
|\
| * Repair inline flagMike Bayer2020-02-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 9fca5d827d we attempted to deprecate the "inline=True" flag and add a generative inline() method, however failed to include any tests and the method was implemented incorrectly such that it would get overwritten with the boolean flag immediately. Rename the internal "inline" flag to "_inline" and add test support both for the method as well as deprecated support for the flag, including a fixture addition to assert the expected value of the flag as it generally does not affect the actual compiled SQL string. Change-Id: I0450049f17f1f0d91e22d27f1a973a2b6c0e59f7
* | Update test_unicode and move to test suiteGord Thompson2020-02-222-0/+207
|/ | | | | | | | External dialects will definitely want to be able to test their handling of Unicode table/column names. Change-Id: If1b67cf170dc9e4a42e3f51760ced8ddb7a34fcf
* Result initial introductionMike Bayer2020-02-213-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This builds on cc718cccc0bf8a01abdf4068c7ea4f3 which moved RowProxy to Row, allowing Row to be more like a named tuple. - KeyedTuple in ORM is replaced with Row - ResultSetMetaData broken out into "simple" and "cursor" versions for ORM and Core, as well as LegacyCursor version. - Row now has _mapping attribute that supplies full mapping behavior. Row and SimpleRow both have named tuple behavior otherwise. LegacyRow has some mapping features on the tuple which emit deprecation warnings (e.g. keys(), values(), etc). the biggest change for mapping->tuple is the behavior of __contains__ which moves from testing of "key in row" to "value in row". - ResultProxy breaks into ResultProxy and FutureResult (interim), the latter has the newer APIs. Made available to dialects using execution options. - internal reflection methods and most tests move off of implicit Row mapping behavior and move to row._mapping, result.mappings() method using future result - a new strategy system for cursor handling replaces the various subclasses of RowProxy - some execution context adjustments. We will leave EC in but refined things like get_result_proxy() and out parameter handling. Dialects for 1.4 will need to adjust from get_result_proxy() to get_result_cursor_strategy(), if they are using this method - out parameter handling now accommodated by get_out_parameter_values() EC method. Oracle changes for this. external dialect for DB2 for example will also need to adjust for this. - deprecate case_insensitive flag for engine / result, this feature is not used mapping-methods on Row are deprecated, and replaced with Row._mapping.<meth>, including: row.keys() -> use row._mapping.keys() row.items() -> use row._mapping.items() row.values() -> use row._mapping.values() key in row -> use key in row._mapping int in row -> use int < len(row) Fixes: #4710 Fixes: #4878 Change-Id: Ieb9085e9bcff564359095b754da9ae0af55679f0
* Deprecate connection branchingMike Bayer2020-02-213-2/+6
| | | | | | | | | | | | | | | The :meth:`.Connection.connect` method is deprecated as is the concept of "connection branching", which copies a :class:`.Connection` into a new one that has a no-op ".close()" method. This pattern is oriented around the "connectionless execution" concept which is also being removed in 2.0. As part of this change we begin to move the internals away from "connectionless execution" overall. Remove the "connectionless execution" concept from the reflection internals and replace with explicit patterns at the Inspector level. Fixes: #5131 Change-Id: Id23d28a9889212ac5ae7329b85136157815d3e6f
* Modernize test_rowcount and move to dialect suiteMike Bayer2020-02-192-0/+156
| | | | | | | Amazingly there are no "rowcount" tests in suite, so these tests should definitely be there. Change-Id: Ib4c595fe6e16b457680ce4ee01180ccc8ddb6a40
* Merge "Replace engine.execute w/ context manager (step1)"mike bayer2020-02-194-108/+113
|\
| * Replace engine.execute w/ context manager (step1)Gord Thompson2020-02-174-108/+113
| | | | | | | | | | | | | | | | | | First (baby) step at replacing engine.execute calls in test code with the new preferred way of executing. MSSQL was targeted because it was the easiest for me to test locally. Change-Id: Id2e02f0e39007cbfd28ca6a535115f53c6407015
* | Merge "Create initial future package, RemovedIn20Warning"mike bayer2020-02-171-0/+2
|\ \
| * | Create initial future package, RemovedIn20WarningMike Bayer2020-02-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganization of Select() is the first major element of the 2.0 restructuring. In order to start this we need to first create the new Select constructor and apply legacy elements to the old one. This in turn necessitates starting up the RemovedIn20Warning concept which itself need to refer to "sqlalchemy.future", so begin to establish this basic framework. Additionally, update the DML constructors with the newer no-keyword style. Remove the use of the "pending deprecation" and fix Query.add_column() deprecation which was not acting as deprecated. Fixes: #4845 Fixes: #4648 Change-Id: I0c7a22b2841a985e1c379a0bb6c94089aae6264c
* | | Limit non-backend critical profiling tests to SQLiteMike Bayer2020-02-171-1/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issues with backend-specific profiling should be limited to tests that are explcitly against resultset, compiler, etc. MySQL in particular has an often varying callcount that isn't worth running these tests against nor is it worth profiling them for other backends like Oracle and SQL Server. Also add the REQUIRE_SQLALCHEMY_CEXT flag to the regen_callcounts.tox.ini script, which is part of some review somewhere but is needed here to generate callcounts correctly. Add a "warmup" phase for some of the ORM tests for join conditions that have varying profile counts based on whether mappings have been used already or not; profiling should always be against the "warmed up" version of a function. Change-Id: If483820235fa4cc4360cbd067a9b68d83512d587
* | Fractional seconds starts at Python 3.7Mike Bayer2020-02-131-0/+7
| | | | | | | | | | | | | | | | CI didn't notice that the fractional seconds in the new SQL Server DATETIMEOFFSET test are not available on Python 3.6. It was inadvertently assumed this was a Python 2 incompatibility. Change-Id: I9839eafbf7c37512eef1ecf666846983f9651c02
* | Rework combination exclusionsMike Bayer2020-02-102-77/+132
|/ | | | | | | | | | | | | | | | | | | | | | | | | The technique arrived at for doing exclusions inside of combinations relies upon comparing all the arguments in a particular combination to some set of combinations that were gathered as having "exclusions". This logic is actually broken for the case where the @testing.combinations has an "id", but if we fix that, we still have the issue of all the arguments being compared, which is complicated and also doesn't work for the case of a py2/py3 incompatibility like a timezone that has fractional minutes or seconds in it. It's also not clear if a @testing.combinations that uses lambdas will work either (maybe it does though because lambdax == lambdax compares...). anyway, this patch reworks it so that we hit this on the decorator side instead, where we add our own decorator and go through the extra effort to create a decorator that accepts an extra argument of "exclusions" which we can then check in a way that is local to the whole pytest @combinations thing in the first place. The only difficulty is that pytest is very sneaky about looking at the test function so we need to make sure __wrapped__ isn't set when doing this. Change-Id: Ic57aae15b378e0f4ed009e4e82ae7ba73fb6dfc5
* Do away with pool._refsMike Bayer2020-02-012-50/+8
| | | | | | | | | | | | | This collection was added only for the benefit of unit tests and is unnecessary for the pool to function. As SQLAlchemy 2.0 will be removing the automatic handling of connections that are garbage collection, remove this collection so that we ultimately don't need a weakref handler to do anything within the pool. The handler will do nothing other than emit a warning that a connection was dereferenced without being explicitly returned to the pool, invalidated, or detached. Change-Id: I4ca196270d5714efbac44dbf6f034e8c7f0af58a
* Add pyprojectFederico Caselli2020-01-271-1/+2
| | | | | | | | | | | | | - Added pyproject.toml with black arguments - Updated black version in precommit hook - Reformatted the code Fixes: #5100 Closes: #5103 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5103 Pull-request-sha: 795fd5f896be4a07a2b18e6525674b815ac17593 Change-Id: I14eedbaa51fb531cbf90fcefe6a1e07c8a565625
* Refactor test provisioning to dialect-level filesGord Thompson2020-01-262-317/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5085 <!-- Provide a general summary of your proposed changes in the Title field above --> Move dialect-specific provisioning code to dialect-level copies of provision.py. <!-- 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: #5092 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5092 Pull-request-sha: 25b9b7a9800549fb823576af8674e8d33ff4b2c1 Change-Id: Ie0b4a69aa472a60bdbd825e04c8595382bcc98e1
* Add test requirement: indexes_with_ascdescGord Thompson2020-01-232-2/+11
| | | | | | | | | | | | | There are some tests for indexes that include DESC in the columns. Firebird and maybe others don't support this concept, so put it under a requirement rule. Fixes: #5106 Closes: #5108 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5108 Pull-request-sha: 4b1560f28a52feb7d4a6c5d828f587a735d6a40b Change-Id: I4744246005f3af263ea1e028d8a46795b87de62c
* Merge "apply asbool reduction to the onclause in join()"mike bayer2020-01-181-0/+102
|\
| * apply asbool reduction to the onclause in join()Mike Bayer2020-01-171-0/+102
| | | | | | | | | | | | | | | | | | | | The :func:`.true` and :func:`.false` operators may now be applied as the "onclause" of a :func:`.sql.join` on a backend that does not support "native boolean" expressions, e.g. Oracle or SQL Server, and the expression will render as "1=1" for true and "1=0" false. This is the behavior that was introduced many years ago in :ticket:`2804` for and/or expressions. Change-Id: I85311c31c22d6e226c618f8840f6b95eca611153
* | Remove jython code, remove all jython / pypy symbolsMike Bayer2020-01-175-31/+13
|/ | | | | | | | | | | | | | | | | | | | | | Removed all dialect code related to support for Jython and zxJDBC. Jython has not been supported by SQLAlchemy for many years and it is not expected that the current zxJDBC code is at all functional; for the moment it just takes up space and adds confusion by showing up in documentation. At the moment, it appears that Jython has achieved Python 2.7 support in its releases but not Python 3. If Jython were to be supported again, the form it should take is against the Python 3 version of Jython, and the various zxJDBC stubs for various backends should be implemented as a third party dialect. Additionally modernized logic that distinguishes between "cpython" and "pypy" to instead look at platform.python_distribution() which reliably tells us if we are cPython or not; all booleans which previously checked for pypy and sometimes jython are now converted to be "not cpython", this impacts the test suite for tests that are cPython centric. Fixes: #5094 Change-Id: I226cb55827f997daf6b4f4a755c18e7f4eb8d9ad
* Merge remote-tracking branch 'origin/pr/5077'Mike Bayer2020-01-151-1/+1
|\ | | | | | | Change-Id: Ie8e0d631f7c6271bcd8173065506e85130b754c4
| * Remove return statement in __init__.Heckad2020-01-041-1/+1
| |