Commit Graph

10240 Commits

Author SHA1 Message Date
Mike Bayer a0e95869a4 The _Binary base type now converts values through
the bytes() callable when run on Python 3; in particular
psycopg2 2.5 with Python 3.3 seems to now be returning
the "memoryview" type, so this is converted to bytes
before return.
2013-04-11 19:34:46 -04:00
Mike Bayer bbe247206d merge default 2013-04-11 19:10:19 -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 375ee317d8 merge default 2013-04-11 16:51:40 -04:00
Mike Bayer f35987d31a fix category 2013-04-11 16:51:27 -04:00
Mike Bayer 643097e868 merge default 2013-04-11 16:34:02 -04:00
Mike Bayer 0d6e297d1f indentation fix 2013-04-11 16:33:53 -04:00
Mike Bayer fbdad99ae9 merge default 2013-04-11 16:21:14 -04:00
Mike Bayer a5ede47f12 A major fix to the way in which a select() object produces
labeled columns when apply_labels() is used; this mode
produces a SELECT where each column is labeled as in
<tablename>_<columnname>, to remove column name collisions
for a multiple table select.   The fix is that if two labels
collide when combined with the table name, i.e.
"foo.bar_id" and "foo_bar.id", anonymous aliasing will be
applied to one of the dupes.  This allows the ORM to handle
both columns independently; previously, 0.7
would in some cases silently emit a second SELECT for the
column that was "duped", and in 0.8 an ambiguous column error
would be emitted.   The "keys" applied to the .c. collection
of the select() will also be deduped, so that the "column
being replaced" warning will no longer emit for any select()
that specifies use_labels, though the dupe key will be given
an anonymous label which isn't generally user-friendly.
[ticket:2702]
2013-04-11 16:14:23 -04:00
Mike Bayer ff89887bd6 merge default 2013-04-10 14:02:39 -04:00
Mike Bayer fa8c87eceb add calchipan 2013-04-10 14:02:24 -04:00
Mike Bayer e32a6cf489 merge default 2013-04-09 14:49:25 -04:00
Mike Bayer 37a9c5f52d order by... 2013-04-09 14:48:59 -04:00
Mike Bayer 8e2e511ad0 merge default 2013-04-09 14:21:53 -04:00
Mike Bayer d84ae4f754 Fixed indirect regression regarding :func:.has_inherited_table,
where since it considers the current class' ``__table__``, was
sensitive to when it was called.  This is 0.7's behavior also,
but in 0.7 things tended to "work out" within events like
``__mapper_args__()``.  :func:`.has_inherited_table` now only
considers superclasses, so should return the same answer
regarding the current class no matter when it's called
(obviously assuming the state of the superclass).
[ticket:2656]
2013-04-09 14:21:40 -04:00
Mike Bayer 70a173d22b 0.7 changelog 2013-04-09 12:01:31 -04:00
Mike Bayer 39069f9e71 merge default 2013-04-09 11:59:15 -04:00
Mike Bayer df4e59ff55 Fixed bug when a query of the form:
``query(SubClass).options(subqueryload(Baseclass.attrname))``,
where ``SubClass`` is a joined inh of ``BaseClass``,
would fail to apply the ``JOIN`` inside the subquery
on the attribute load, producing a cartesian product.
The populated results still tended to be correct as additional
rows are just ignored, so this issue may be present as a
performance degradation in applications that are
otherwise working correctly. [ticket:2699]
2013-04-09 11:52:21 -04:00
Hajime Nakagami 166088e635 revert cymysql deadlock 2013-04-06 21:51:56 +09:00
Hajime Nakagami b6d9381165 select not return rowcount at mysql+cymysql 2013-04-06 21:19:59 +09:00
Hajime Nakagami da6e50bf59 drop table in cymysql 2013-04-06 17:59:30 +09:00
Hajime Nakagami b4da894d02 merge from default 2013-04-06 17:45:42 +09:00
Mike Bayer 6bdd3bb93f - reinstate insert returning back into test_insert.py; defaultdialect
needs to be explicit here since tablestest sticks testing.db onto metadata.bind
2013-04-01 15:41:57 -04:00
Mike Bayer a507263ee0 merge default 2013-04-01 13:57:56 -04:00
Mike Bayer 5ee1bb09de merge default 2013-04-01 13:57:44 -04:00
Mike Bayer 52da670f6e merge default 2013-04-01 13:56:41 -04:00
Mike Bayer 82b6e07492 - Fixed bug in unit of work whereby a joined-inheritance
subclass could insert the row for the "sub" table
  before the parent table, if the two tables had no
  ForeignKey constraints set up between them.
  Also in 0.7.11. [ticket:2689]
- fix a glitch in the assertsql.CompiledSQL fixture regarding
when a multiparam compiledSQL is used within an AllOf
- add a new utility function randomize_unitofwork() which
does the function of --reversetop
2013-04-01 13:37:35 -04:00
Diana Clarke 25c6732019 moving insert returning test back into CRUD test class until I figure out why moving it broke the oracle/postgres builds 2013-03-30 09:30:58 -04:00
Diana Clarke 2fa9dd6bb8 whitespace 2013-03-30 01:39:40 -04:00
Diana Clarke 2ffc925588 move the update tests from CRUDTest into sql/test_update.py (see #2630) 2013-03-30 01:38:17 -04:00
Diana Clarke e6d6cfbf6b fixing tests for --db=mysql: VARCHAR requires a length on dialect mysql 2013-03-30 01:01:59 -04:00
Diana Clarke 192bddc720 starting on the update tests next, pep8 pass first (see #2630) 2013-03-30 00:33:07 -04:00
Diana Clarke 17487a0db7 move the insert tests from CRUDTest into sql/test_insert.py (see #2630) 2013-03-29 19:10:01 -04:00
Diana Clarke 0f203d57cd move the delete tests from CRUDTest into sql/test_delete.py (see #2630) 2013-03-29 17:25:39 -04:00
Diana Clarke e49efb5e2c adding pullreq # to changelog 2013-03-29 15:05:18 -04:00
Diana Clarke 423cd7fbf6 adding convenience method exists() to Query (see # 2673) 2013-03-29 14:58:33 -04:00
Mike Bayer 7dff6f6d49 - test all pymssql messages here
- changelog
2013-03-29 12:09:11 -04:00
Mike Bayer 7aea1bfc8e Merged in sontek/sqlalchemy/add_better_disconnect_checks (pull request #47)
Add disconnect check on timeouts
2013-03-29 12:03:17 -04:00
Mike Bayer c87f6af48c - add a nose runner that erases out argv, otherwise
you get "import test" as what it tries to run with
setup.py test
2013-03-25 16:59:27 -04:00
Mike Bayer 07c9bc77f7 - limit some of these on views, indexes, pk constraints being available 2013-03-24 18:24:21 -04:00
Mike Bayer 9ca5b47fc9 merge default 2013-03-24 14:32:50 -04:00
Mike Bayer 728e272201 Merged in msabramo/sqlalchemy (pull request #48)
Make MonkeyPatchedBinaryTest only run when using mssql. Prevents failed
2013-03-24 14:32:19 -04:00
Mike Bayer 5e66224d63 - add an event to testing so that other dialects can intercept "test_needs_autoincrement"
- get the assumption of "1" for "first sequence item" to be dialect configured
2013-03-24 14:31:48 -04:00
Mike Bayer a4703917d8 Loosened the check on dialect-specific argument names
passed to Table(); since we want to support external dialects
and also want to support args without a certain dialect
being installed, it only checks the format of the arg now,
rather than looking for that dialect in sqlalchemy.dialects.
2013-03-24 13:50:56 -04:00
Mike Bayer b5b751e3de fix syntax error 2013-03-24 13:45:37 -04:00
Mike Bayer 35c5fd3fba Fixed bug whereby a DBAPI that can return "0"
for cursor.lastrowid would not function correctly
in conjunction with :attr:`.ResultProxy.inserted_primary_key`.
2013-03-23 19:00:11 -04:00
Mike Bayer e69b9542a8 Merged in tshepang/sqlalchemy/grammar (pull request #51)
fix grammar
2013-03-23 11:30:28 -04:00
Mike Bayer e717b57590 Merged in tshepang/sqlalchemy/typos (pull request #52)
remove mistakenly-repeated words
2013-03-23 11:22:42 -04:00
Tshepang Lekhonkhobe fd23be645e fix grammar 2013-03-23 13:58:16 +02:00
Tshepang Lekhonkhobe 56ec242999 remove mistakenly-repeated words 2013-03-23 13:42:10 +02:00