Commit Graph

10240 Commits

Author SHA1 Message Date
Mike Bayer 3347ff7a91 - changelog for pullreq:11
- be specific about version 0.9.2
2014-01-18 15:13:20 -05:00
Mike Bayer 6e4fd0aea8 Merge branch 'patch-msql-pkc-clustered' of bitbucket.org:dharland/sqlalchemy into m 2014-01-18 15:06:08 -05:00
Mike Bayer 931655f417 cx_oracle is now "conditional" on py2k 2014-01-17 18:52:14 -05:00
Mike Bayer 882f615c68 - rework Oracle to no longer do its own unicode conversion; this has been observed
to be very slow.  this now has the effect of producing "conditional" unicode
conversion for the Oracle backend, as it still returns NVARCHAR etc. as unicode
[ticket:2911]
- add new "conditional" functionality to unicode processors; the C-level
function now uses PyUnicode_Check() as a fast alternative to the isinstance()
check in Python
2014-01-17 17:36:43 -05:00
donkopotamus cf8e5e3cf5 Bug Fix: Stop generating bad sql if an empty UniqueConstraint() is given 2014-01-17 11:00:24 +13:00
donkopotamus 3593548960 Support mssql_clustered option on UniqueConstraint (plus docs and test) 2014-01-17 10:46:16 +13:00
donkopotamus 1de7259093 Remove support for mssql_clustered on Table 2014-01-17 10:38:31 +13:00
Wichert Akkerman 906e33a7a6 Fix a typo in the relationship docs
The text refers to ``boston_addresses``, while the code sample uses
``addresses``.
2014-01-16 11:23:05 +01:00
Mike Bayer 4765895d10 even simpler 2014-01-15 15:22:11 -05:00
Mike Bayer 46728df2b4 - should close the session before rolling back the transaction
- make section title actually say, "such as for test suites"
- add topic section detailing an evented approach to allowing ROLLBACK by using savepoint
2014-01-15 15:14:24 -05:00
Mike Bayer 789ab91743 - changelog + test for pullreq github 58 2014-01-14 20:22:11 -05:00
mike bayer d87923c1d1 Merge pull request #58 from kstark/patch-1
Fix TypeError for class_mapper called w/ iterable
2014-01-14 17:20:03 -08:00
Mike Bayer 52b25c5319 - _cursor_execute() will close the cursor on error; oracle doesn't allow double close
- ensure no iterator changed size issues in testing.engines
2014-01-13 21:20:54 -05:00
donkopotamus 40563e9355 Support mssql_clustered option in mssql dialect for both Table and PrimaryKeyConstraint 2014-01-14 12:44:05 +13:00
Mike Bayer bd74f81bb5 - Fixed a bug involving the new flattened JOIN structures which
are used with :func:`.joinedload()` (thereby causing a regression
in joined eager loading) as well as :func:`.aliased`
in conjunction with the ``flat=True`` flag and joined-table inheritance;
basically multiple joins across a "parent JOIN sub" entity using different
paths to get to a target class wouldn't form the correct ON conditions.
An adjustment / simplification made in the mechanics of figuring
out the "left side" of the join in the case of an aliased, joined-inh
class repairs the issue. [ticket:2908]
2014-01-13 17:53:37 -05:00
Derek Harland fe1d892ba4 Merged zzzeek/sqlalchemy into master 2014-01-14 11:44:29 +13:00
Mike Bayer 62ec682239 - a little bit of profile bump, just on insert not too concerned 2014-01-13 16:35:50 -05:00
Mike Bayer 1536bc4664 - The MySQL CAST compilation now takes into account aspects of a string
type such as "charset" and "collation".  While MySQL wants all character-
based CAST calls to use the CHAR type, we now create a real CHAR
object at CAST time and copy over all the parameters it has, so that
an expression like ``cast(x, mysql.TEXT(charset='utf8'))`` will
render ``CAST(t.col AS CHAR CHARACTER SET utf8)``.

- Added new "unicode returns" detection to the MySQL dialect and
to the default dialect system overall, such that any dialect
can add extra "tests" to the on-first-connect "does this DBAPI
return unicode directly?" detection. In this case, we are
adding a check specifically against the "utf8" encoding with
an explicit "utf8_bin" collation type (after checking that
this collation is available) to test for some buggy unicode
behavior observed with MySQLdb version 1.2.3.  While MySQLdb
has resolved this issue as of 1.2.4, the check here should
guard against regressions.  The change also allows the "unicode"
checks to log in the engine logs, which was not previously
the case. [ticket:2906]
2014-01-13 14:05:05 -05:00
Kyle Stark 58d3a41473 Fix TypeError for class_mapper called w/ iterable
When the class_ passed is not a mapped class but is actually an iterable, the string formatting operation fails with a TypeError, and the expected ArgumentError is not raised. Calling code which is using reflection and expects this error will fail (e.g. the sadisplay module).
2014-01-13 08:52:31 -08:00
Mike Bayer 5d973d52aa update changelog from 0.3.2 to 0.3.4, re-patching the part of 2775c95b1e that was
intended
2014-01-13 10:37:53 -05:00
Mike Bayer 232e3762b7 revert r2775c95b1ee30831216cc5 which was mostly an inadvertent commit, except for the changelog part 2014-01-13 10:37:15 -05:00
Mike Bayer bebf30e34d - continue with [ticket:2907] and further clean up how we set up
_reset_agent, so that it's local to the various begin_impl(),
rollback_impl(), etc.  this allows setting/resetting of the flag
to be symmetric.
- don't set _reset_agent if it's not None, don't unset it if it isn't
our own transaction.
- make sure we clean it out in close().
- basically, we're dealing here with pools using "threadlocal" that have a
counter, other various mismatches that the tests bring up
- test for recover() now has to invalidate() the previous connection,
because closing it actually rolls it back (e.g. this test was relying
on the broken behavior).
2014-01-13 03:22:11 -05:00
Mike Bayer 578df5b86b - dont run deletes here 2014-01-13 02:38:41 -05:00
Mike Bayer 9c64607572 - :class:.Connection now associates a new
:class:`.RootTransaction` or :class:`.TwoPhaseTransaction`
with its immediate :class:`._ConnectionFairy` as a "reset handler"
for the span of that transaction, which takes over the task
of calling commit() or rollback() for the "reset on return" behavior
of :class:`.Pool` if the transaction was not otherwise completed.
This resolves the issue that a picky transaction
like that of MySQL two-phase will be
properly closed out when the connection is closed without an
explicit rollback or commit (e.g. no longer raises "XAER_RMFAIL"
in this case - note this only shows up in logging as the exception
is not propagated within pool reset).
This issue would arise e.g. when using an orm
:class:`.Session` with ``twophase`` set, and then
:meth:`.Session.close` is called without an explicit rollback or
commit.   The change also has the effect that you will now see
an explicit "ROLLBACK" in the logs when using a :class:`.Session`
object in non-autocommit mode regardless of how that session was
discarded.  Thanks to Jeff Dairiki and Laurence Rowe for isolating
the issue here. [ticket:2907]
2014-01-12 19:43:13 -05:00
Mike Bayer c91fd822bc - add new event PoolEvents.invalidate(). allows interception of invalidation
events including auto-invalidation, which is useful both for tests here as well as
detecting failure conditions within the "reset" or "close" cases.
- rename the argument for PoolEvents.reset() to dbapi_connection and connection_record
to be consistent with everything else.
- add new documentation sections on invalidation, including auto-invalidation
and the invalidation process within the pool.
- add _ConnectionFairy and _ConnectionRecord to the pool documentation.  Establish
docs for common _ConnectionFairy/_ConnectionRecord methods and accessors and
have PoolEvents docs refer to _ConnectionRecord,
since it is passed to all events.  Rename a few _ConnectionFairy methods that are actually
private to pool such as _checkout(), _checkin() and _checkout_existing(); there should not
be any external code calling these
2014-01-12 17:34:20 -05:00
Mike Bayer 86c3855c9b - bump up how many args for "named arg style" to four 2014-01-12 17:15:41 -05:00
Mike Bayer e2de4783cc - changelog for pullreq github 57 2014-01-12 12:42:01 -05:00
Mike Bayer 2386c63a1a - pullreq github 55 is in the wrong changelog! 0.9.2... 2014-01-12 12:40:48 -05:00
mike bayer b3ed2c7297 Merge pull request #57 from sdague/master
expose SchemaVisitor in the compatibility layer
2014-01-12 09:37:56 -08:00
Sean Dague 1214f39abb expose SchemaVisitor in the compatibility layer
sqlalchemy-migrate uses SchemaVisitor. It was one of the only
objects that changed namespaces without compatibility that we use.

Would love to get this added to remove a work around we need at
https://review.openstack.org/#/c/66156/
2014-01-11 23:08:27 -05:00
Mike Bayer c427d24d74 - add a CLI to determine waht kind of test to run 2014-01-11 19:43:50 -05:00
Mike Bayer 2775c95b1e new changelog 2014-01-11 13:12:40 -05:00
Mike Bayer 1d4f0df35d - fix some function mismatch in profiling 2014-01-09 23:20:00 -05:00
Mike Bayer b287a379e9 0.9.2 2014-01-09 18:35:22 -05:00
Mike Bayer 120b4a566e changelog for pullreq github:55 2014-01-09 18:34:44 -05:00
cgohlke 20dcbbe97f Use PyMODINIT_FUNC 2014-01-08 12:36:17 -08:00
cgohlke e135d9566a Use PyMODINIT_FUNC 2014-01-08 12:35:42 -08:00
cgohlke 83ffe25d53 Use PyMODINIT_FUNC 2014-01-08 12:34:45 -08:00
Mike Bayer 245dab384e - fixes 2014-01-08 12:26:07 -05:00
Mike Bayer 58fe2fb81a - add more critical behavioral change for [ticket:2804] 2014-01-08 11:36:19 -05:00
Mike Bayer 9d69035a1d - 0.9.1 rel_0_9_1 2014-01-05 19:29:15 -05:00
Mike Bayer fa5970c265 - these tests are really old but trying to make sure everything is closed out 2014-01-05 18:25:51 -05:00
Mike Bayer 60c00d7c1a fix the changelog merge 2014-01-05 18:25:24 -05:00
Mike Bayer f89d4d216b - happy new year 2014-01-05 16:57:05 -05:00
Mike Bayer 8646a4c109 0.9.1 2014-01-05 16:49:03 -05:00
Mike Bayer 21bc2c2a5b - docs + tests 2014-01-05 16:48:01 -05:00
Mike Bayer daafd63c3a Merge branch 'automap'
Conflicts:
	doc/build/changelog/changelog_09.rst
2014-01-05 16:47:15 -05:00
Mike Bayer 5386603099 - many-to-many support
- tests
- full documentation, changelog, new in 0.9 announcement
2014-01-05 16:46:01 -05:00
Mike Bayer 8c93a6c771 - fix some docstring stuff 2014-01-05 16:42:56 -05:00
Mike Bayer 196f7ee6cc - conjunctions like and_() and or_() can now accept generators as arguments. 2014-01-05 14:11:12 -05:00