Commit Graph

492 Commits

Author SHA1 Message Date
Mike Bayer f9bb6c2a54 - additional oracle fixes. cx_oracle under py3k is complaining about tuples to executemany(),
so just unconditionally turn this into a list
- this one test segfaults only on py3k + cx_oracle
2013-05-27 17:06:05 -04:00
Mike Bayer 4276049e49 fix test_execute w c extensions 2013-05-26 20:44:34 -04:00
Mike Bayer cca97433c1 merge default 2013-05-05 01:42:26 -04:00
Mike Bayer 31792e86ae - cleanup
- move the timeout here to 14 seconds as jenkins still chokes occasionally
2013-05-05 01:39:35 -04:00
Mike Bayer 021b5143e6 that's all of engine 2013-05-04 15:57:03 -04:00
Mike Bayer 6c8b8da877 cleanup 2013-05-04 15:35:47 -04:00
Mike Bayer ef629e7b3d cleanup 2013-05-04 15:35:47 -04:00
Mike Bayer 920e134d53 test_execute up for sqlite, pg, oursql, mysql 2.7 + 3.3 2013-05-04 15:29:04 -04:00
Mike Bayer be523db4a2 merge default 2013-04-30 10:03:14 -04:00
Mike Bayer 62eeb1bf26 missing comma 2013-04-30 00:15:36 -04:00
Mike Bayer e082ca503c merge default 2013-04-29 19:50:49 -04:00
Mike Bayer eb431e4aa5 Updated mysqlconnector dialect to check for disconnect based
on the apparent string message sent in the exception; tested
against mysqlconnector 1.0.9.
2013-04-29 19:49:28 -04:00
Mike Bayer 4b614b9b35 - the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
2013-04-27 19:53:57 -04:00
Mike Bayer 1b9c1a2ecf - test + changelog for [ticket:2691] 2013-04-18 12:01:16 -04:00
Mike Bayer ee7bb9c174 Improvements to Connection auto-invalidation
handling.  If a non-disconnect error occurs,
but leads to a delayed disconnect error within error
handling (happens with MySQL), the disconnect condition
is detected.  The Connection can now also be closed
when in an invalid state, meaning it will raise "closed"
on next usage, and additionally the "close with result"
feature will work even if the autorollback in an error
handling routine fails and regardless of whether the
condition is a disconnect or not.
[ticket:2695]
2013-04-11 19:10:02 -04:00
Mike Bayer a98bb5f0cd Merged in nakagami/sqlalchemy/cymysql (pull request #42)
cymysql support
2013-03-07 12:36:35 -05:00
Mike Bayer 6ddfe3b390 - :meth:.MetaData.create_all and :meth:.MetaData.drop_all will
now accommodate an empty list as an instruction to not create/drop
any items, rather than ignoring the collection. [ticket:2664].
This is a behavioral change and extra notes to the changelog
and migration document have been added.

- create a new test suite for exercising codepaths
in engine/ddl.py
2013-03-02 17:47:58 -05:00
Mike Bayer 133e8fd388 - Fixed an import of "logging" in test_execute which was not
working on some linux platforms.  Also in 0.7.11.
- only need "logging.handlers" here, "logging" comes in implicitly
2013-03-02 16:20:49 -05:00
Hajime Nakagami 62e3560e4d fix decorator position 2013-03-02 15:30:43 +09:00
Hajime Nakagami 220f2b851a mymysql dialect 2013-03-01 00:00:18 +09:00
Mike Gilbert 05eb72d431 test_execute: import logging.handlers to fix AttributeError
See also: https://bugs.gentoo.org/show_bug.cgi?id=458684
2013-02-27 15:01:37 -05:00
Hajime Nakagami 4eac4f4be1 avoid drop table in mysql+cymysql test because of deadlock 2013-02-22 01:29:43 +09:00
Hajime Nakagami 60028c3607 test for cymysql 2013-02-17 15:07:19 +09:00
Mike Bayer a0ef9edc19 - adding in requirements
- get test_naturalpks to be more generalized
2013-02-06 19:06:09 -05:00
Mike Bayer 0f0ce7c9b7 - recognize that do_rollback() and do_commit() work with a DBAPI connection,
whereas the other do_rollback_twophase(), savepoint etc. work with
:class:`.Connection`.  the context on these are different as twophase/savepoint
are available at the :class:`.Connection` level, whereas commit/rollback are needed
at a lower level as well.  Rename the argument to "dbapi_connection" when the conneciton
is in fact the DBAPI interface.
- start thinking about being able to track "autocommit" vs. "commit", but not sure
we have a need for this yet.
- have Pool call out to a Dialect for all rollback/commit/close operations now.  Pool
no longer calls DBAPI methods directly.  May use this for a workaround for [ticket:2611]
- add a new Pool event reset() to allow the pool's reset of the connection to be intercepted.
- remove methods in Informix dialect which appear to be hardcoding some isolation
settings on new Transaction only; the isolation API should be implemented for Informix.
also removed "flag" for transaction commit/rollback being not available; this should
be based on server/DBAPI version and we will need someone with test access in order
to help determine how this should work
2012-11-22 23:45:24 -05:00
Mike Bayer 59f0685290 The :meth:.Connection.connect and :meth:.Connection.contextual_connect
methods now return a "branched" version so that the :meth:`.Connection.close`
method can be called on the returned connection without affecting the
original.   Allows symmetry when using :class:`.Engine` and
:class:`.Connection` objects as context managers.
2012-11-14 01:18:58 -05:00
Mike Bayer 504daf1bc0 Fixed :meth:.MetaData.reflect to correctly use
the given :class:`.Connection`, if given, without
opening a second connection from that connection's
:class:`.Engine`. [ticket:2604]
2012-11-14 00:52:31 -05:00
Mike Bayer bac14cdf47 Added a new method :meth:.Engine.execution_options
to :class:`.Engine`.  This method works similarly to
      :class:`.Connection.execution_options` in that it creates
      a copy of the parent object which will refer to the new
      set of options.   The method can be used to build
      sharding schemes where each engine shares the same
      underlying pool of connections.   The method
      has been tested against the horizontal shard
      recipe in the ORM as well.
2012-10-23 12:08:20 -04:00
Mike Bayer f4ba5b856e - test updates 2012-10-04 10:28:21 -04:00
Mike Bayer b9ea55f861 - more tests, move some tests out of test_reflection, test_query 2012-09-27 16:11:32 -04:00
Mike Bayer 20cdc64588 trying different approaches to test layout. in this one, the testing modules
become an externally usable package but still remains within the main sqlalchemy parent package.
in this system, we use kind of an ugly hack to get the noseplugin imported outside of the
"sqlalchemy" package, while still making it available within sqlalchemy for usage by
third party libraries.
2012-09-27 02:37:33 -04:00
Mike Bayer 444abbe847 - got firebird running
- add some failure cases
- [bug] Firebird now uses strict "ansi bind rules"
so that bound parameters don't render in the
columns clause of a statement - they render
literally instead.

- [bug] Support for passing datetime as date when
using the DateTime type with Firebird; other
dialects support this.
2012-09-23 18:09:18 -04:00
Mike Bayer 7e815c67a9 finished fixes for mxodbc; need to use at least version 3.2.1 2012-09-21 17:43:22 -04:00
Mike Bayer df7a3792f5 - add req's for predictable gc 2012-09-05 12:46:28 -04:00
Mike Bayer 626ae5b7a1 - fixes for mxODBC, some pyodbc
- enhancements to test suite including ability to set up a testing engine
for a whole test class, fixes to how noseplugin sets up/tears
down per-class context
2012-09-02 15:14:09 -04:00
Mike Bayer 764c9fee72 with statement 2012-09-01 22:24:19 -04:00
Mike Bayer 73d5b74f26 - get all tests within -w engine + pyodbc:mssql on windows to pass 2012-09-01 19:16:17 -04:00
Mike Bayer d1c2b7aff8 adjust this test which passes on some psycopg2s, fails on others, and we dont have a good
testing decorator to check this
2012-08-28 17:50:12 -04:00
Mike Bayer 326f2e4f60 - [feature] The "required" flag is set to
True by default, if not passed explicitly,
on bindparam() if the "value" or "callable"
parameters are not passed.
This will cause statement execution to check
for the parameter being present in the final
collection of bound parameters, rather than
implicitly assigning None. [ticket:2556]
2012-08-27 15:11:53 -04:00
Mike Bayer 393b294776 - [feature] Added support for .info dictionary argument to
column_property(), relationship(), composite().
All MapperProperty classes have an auto-creating .info
dict available overall.
2012-08-24 18:48:42 -04:00
Mike Bayer a113c7b3a7 future for with statement 2012-08-24 18:42:28 -04:00
Mike Bayer 28bfc3d5df - [feature] The before_cursor_execute event
fires off for so-called "_cursor_execute"
    events, which are usually special-case
   executions of primary-key bound sequences
    and default-generation SQL
    phrases that invoke separately when RETURNING
    is not used with INSERT.  [ticket:2459]
2012-08-23 15:40:09 -04:00
Mike Bayer 819ec8e13f - add new C extension "utils", so far includes distill_params
- repair test_processors which wasn't hitting the python functions
- add another suite to test_processors that does distill_params
2012-08-07 15:23:11 -04:00
Mike Bayer 5a02c9e73f - break out engine/base.py into base, interfaces, result, util.
- remove deprecated 0.7 engine methods
2012-08-07 12:01:19 -04:00
Mike Bayer 22ba1c43b7 -whitespace bonanza, contd 2012-07-28 17:05:50 -04:00
Mike Bayer 3e55ed778b - [feature] Connection event listeners can
now be associated with individual
Connection objects, not just Engine
objects.  [ticket:2511]
2012-07-18 20:23:01 -04:00
Mike Bayer eaec7fd2b0 try to loosen the times up here to reduce failures due to latency 2012-07-17 09:32:11 -04:00
Mike Bayer 844831c14f notify_all workaround for 2.5 2012-06-25 14:25:36 -04:00
Mike Bayer 7b1a1a66cd - change notify to notify_all() so all waiters exit immediately,
continuing [ticket:2522]
2012-06-25 11:15:50 -04:00
Mike Bayer e597d3d145 - [bug] Fixed bug whereby if a database restart
affected multiple connections, each
connection would individually invoke a new
disposal of the pool, even though only
one disposal is needed.  [ticket:2522]
2012-06-22 12:42:01 -04:00