Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer 0087ec7286 akiban-> foundationdb 2014-01-18 20:56:56 -05:00
Mike Bayer 1af8e2491d - implement kwarg validation and type system for dialect-specific
arguments; [ticket:2866]
- add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
2014-01-18 19:26:56 -05:00
Mike Bayer 4dfc7fb087 credit to Derek Harland 2014-01-18 15:15:42 -05:00
Mike Bayer 3347ff7a91 - changelog for pullreq:11
- be specific about version 0.9.2
2014-01-18 15:13:20 -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
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 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
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
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 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 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 2775c95b1e new changelog 2014-01-11 13:12:40 -05:00
Mike Bayer 120b4a566e changelog for pullreq github:55 2014-01-09 18:34:44 -05: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 2014-01-05 19:29:15 -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 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
Mike Bayer ecb3865615 - The :paramref:.Table.extend_existing and :paramref:.Table.autoload_replace
parameters are now available on the :meth:`.MetaData.reflect`
method.
- starting to use paramref and need newer paramlinks version.
2014-01-04 21:12:31 -05:00
Mike Bayer c450cd6cb6 - Fixed regression where using a `functools.partial()` with the event
system would cause a recursion overflow due to usage of inspect.getargspec()
on it in order to detect a legacy calling signature for certain events,
and apparently there's no way to do this with a partial object.  Instead
we skip the legacy check and assume the modern style; the check itself
now only occurs for the SessionEvents.after_bulk_update and
SessionEvents.after_bulk_delete events.  Those two events will require
the new signature style if assigned to a "partial" event listener.
[ticket:2905]
2014-01-04 00:35:48 -05:00
Mike Bayer 3182101127 - Fixed an extremely unlikely memory issue where when using
:class:`.DeferredReflection`
to define classes pending for reflection, if some subset of those
classes were discarded before the :meth:`.DeferredReflection.prepare`
method were called to reflect and map the class, a strong reference
to the class would remain held within the declarative internals.
This internal collection of "classes to map" now uses weak
references against the classes themselves.
2014-01-03 21:46:13 -05:00
Mike Bayer 3e7a17174f Merged in davidszotten/sqlalchemy/doc_typo (pull request #10)
typo in changelog
2014-01-02 19:08:46 -05:00
Mike Bayer 7880d84c5b - changelog for pullreq 9 from bitbucket 2014-01-02 19:07:13 -05:00
Mike Bayer 6d3e563a57 - Fixed regression where we don't check the given name against the
correct string class when setting up a backref based on a name,
therefore causing the error "too many values to unpack".  This was
related to the Py3k conversion. [ticket:2901]
2014-01-02 18:59:26 -05:00
Mike Bayer 8a7fdd4e5c - A quasi-regression where apparently in 0.8 you can set a class-level
attribute on declarative to simply refer directly to an :class:`.InstrumentedAttribute`
on a superclass or on the class itself, and it
acts more or less like a synonym; in 0.9, this fails to set up enough
bookkeeping to keep up with the more liberalized backref logic
from 🎫`2789`.  Even though this use case was never directly
considered, it is now detected by declarative at the "setattr()" level
as well as when setting up a subclass, and the mirrored/renamed attribute
is now set up as a :func:`.synonym` instead. [ticket:2900]
2014-01-02 18:51:49 -05:00
Mike Bayer ca8fca6391 - Fixed regression where we apparently still create an implicit
alias when saying query(B).join(B.cs), where "C" is a joined inh
class; however, this implicit alias was created only considering
the immediate left side, and not a longer chain of joins along different
joined-inh subclasses of the same base.   As long as we're still
implicitly aliasing in this case, the behavior is dialed back a bit
so that it will alias the right side in a wider variety of cases.
[ticket:2903]
2014-01-02 18:26:32 -05:00
David Szotten dc9c76486d typo in changelog 2014-01-01 10:28:58 +00:00
Mike Bayer f00657fa8a - 0.9.0 release date 2013-12-30 18:31:33 -05:00
Mike Bayer d88d755425 - call it 0.9.0 2013-12-30 18:30:11 -05:00
Mike Bayer 36024b4910 sphinx paramlinks 0.1.8 2013-12-30 13:46:41 -05:00
Mike Bayer 1eb3b6840a - use 0.1.7 at least 2013-12-30 13:22:54 -05:00
Mike Bayer 9e2c0931b9 - try out paramlinks 2013-12-30 12:23:05 -05:00
Mike Bayer 1eb92e50d9 - apply a similar fix for floats to mssql+pyodbc as we did to firebird
- wrangle through osx+pyodbc+freetds to get at least test_suite to pass again
with mssql+pyodbc. invovled adding some silly requirements
2013-12-28 17:50:19 -05:00
Mike Bayer cac7320eeb - adjust the behavior of cast() to only provide a type for the bindparam()
if we are coercing straight from string.  [ticket:2899]
- rework the tests here to be individual
2013-12-28 16:37:54 -05:00
Ben Alpert 7bb8944e31 session docs: Change object to someobject
This makes the code block more consistent with the preceding one and also prevents the variable from being colored as a builtin (which `object` is) during syntax highlighting.
2013-12-27 23:11:23 -07:00
Mike Bayer 2104d0ba2d - rework the JSON expression system so that "astext" is called *after*
the indexing.  this is for more natural operation.
- also add cast() to the JSON expression to complement astext. This integrates
the CAST call which will be needed frequently.  Part of [ticket:2687].
- it's a little unclear how more advanced unicode attribute-access is going to go,
some quick attempts at testing yielded strange error messages from psycopg2.
- do other cross linking as mentioned in [ticket:2687].
2013-12-27 18:25:57 -05:00
Mike Bayer de786a4208 - Declarative does an extra check to detect if the same
:class:`.Column` is mapped multiple times under different properties
(which typically should be a :func:`.synonym` instead) or if two
or more :class:`.Column` objects are given the same name, raising
a warning if this condition is detected. [ticket:2828]
2013-12-27 17:10:55 -05:00
Mike Bayer f50c670e47 - Changed the queries used by Firebird to list table and view names
to query from the ``rdb$relations`` view instead of the
``rdb$relation_fields`` and ``rdb$view_relations`` views.
Variants of both the old and new queries are mentioned on many
FAQ and blogs, however the new queries are taken straight from
the "Firebird FAQ" which appears to be the most official source
of info. [ticket:2898]
2013-12-27 16:39:54 -05:00
Mike Bayer 92a1426c06 - The firebird dialect will quote identifiers which begin with an
underscore.  Courtesy Treeve Jelbert. [ticket:2897]
2013-12-27 13:40:27 -05:00