Commit Graph

2307 Commits

Author SHA1 Message Date
Bog 0cd79fb1f5 Fix doc gen on Windows platform
- replaced hardcoded ":" path separator with OS dependent one.
2014-07-21 00:52:58 +02:00
Mike Bayer 0eb53b2e79 - Fixed bug in oracle dialect test suite where in one test,
'username' was assumed to be in the database URL, even though
this might not be the case.  Fixes #3128
2014-07-18 14:27:59 -04:00
Mike Bayer 889013529f - forwards-port changelog for ref #3093 2014-07-16 13:44:27 -04:00
Mike Bayer 61384fd0e5 - Fixed a regression caused by 🎫2976 released in 0.9.4 where
the "outer join" propagation along a chain of joined eager loads
would incorrectly convert an "inner join" along a sibling join path
into an outer join as well, when only descendant paths should be
receiving the "outer join" propagation; additionally, fixed related
issue where "nested" join propagation would take place inappropriately
between two sibling join paths.

this is accomplished by re-introducing the removed flag "allow_innerjoin",
now inverted and named "chained_from_outerjoin".  Propagating this flag
allows us to know when we have encountered an outerjoin along a load
path, without confusing it for state obtained from a sibling path.

fixes #3131
ref #2976
2014-07-15 13:20:55 -04:00
Mike Bayer 3d7b188638 - Fixed a SQLite join rewriting issue where a subquery that is embedded
as a scalar subquery such as within an IN would receive inappropriate
substitutions from the enclosing query, if the same table were present
inside the subquery as were in the enclosing query such as in a
joined inheritance scenario.
fixes #3130
2014-07-15 12:25:38 -04:00
Mike Bayer d2193f53c1 - Fix bug in naming convention feature where using a check
constraint convention that includes ``constraint_name`` would
then force all :class:`.Boolean` and :class:`.Enum` types to
require names as well, as these implicitly create a
constraint, even if the ultimate target backend were one that does
not require generation of the constraint such as Postgresql.
The mechanics of naming conventions for these particular
constraints has been reorganized such that the naming
determination is done at DDL compile time, rather than at
constraint/table construction time.
fixes #3067
2014-07-14 20:26:38 -04:00
Mike Bayer 6fd0bc7c62 - Fixed a regression from 0.9.5 caused by 🎫3025 where the
query used to determine "default schema" is invalid in SQL Server 2000.
For SQL Server 2000 we go back to defaulting to the "schema name"
parameter of the dialect, which is configurable but defaults
to 'dbo'. fixes #3025
2014-07-14 19:16:11 -04:00
Mike Bayer 2825730e7b - Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref #3091 as this fix is also in that issue's patch, but is
a different issue.
2014-07-14 19:02:20 -04:00
Mike Bayer 0add251ea0 - In the SQL Server pyodbc dialect, repaired the implementation
for the ``description_encoding`` dialect parameter, which when
not explicitly set was preventing  cursor.description from
being parsed correctly in the case of result sets that
contained names in alternate encodings.  This parameter
shouldn't be needed going forward.
fixes #3091
2014-07-14 18:54:23 -04:00
Mike Bayer ec40a84d96 - Fixed a regression from 0.9.0 due to 🎫2736 where the
:meth:`.Query.select_from` method no longer set up the "from
entity" of the :class:`.Query` object correctly, so that
subsequent :meth:`.Query.filter_by` or :meth:`.Query.join`
calls would fail to check the appropriate "from" entity when
searching for attributes by string name.
fixes #3083
2014-07-14 18:49:06 -04:00
Mike Bayer 4619936417 -Fixed bug in common table expressions whereby positional bound
parameters could be expressed in the wrong final order
when CTEs were nested in certain ways.
fixes #3090
2014-07-14 18:34:32 -04:00
Mike Bayer eb4abda811 - Fixed bug where multi-valued :class:.Insert construct would fail
to check subsequent values entries beyond the first one given
for literal SQL expressions.
fixes #3069
2014-07-14 18:28:07 -04:00
Mike Bayer c6de724785 need a 1.0.0 here 2014-07-14 18:10:34 -04:00
Mike Bayer a49ec1cf77 - Added a "str()" step to the dialect_kwargs iteration for
Python version < 2.6.5, working around the
"no unicode keyword arg" bug as these args are passed along as
keyword args within some reflection processes.
fixes #3123
2014-07-14 18:09:54 -04:00
Mike Bayer 071a183098 - Fixed bug in :class:.Enum and other :class:.SchemaType
subclasses where direct association of the type with a
:class:`.MetaData` would lead to a hang when events
(like create events) were emitted on the :class:`.MetaData`.
fixes #3124
2014-07-13 18:55:18 -04:00
Mike Bayer e5d0fa9493 - The :meth:.TypeEngine.with_variant method will now accept a
type class as an argument which is internally converted to an
instance, using the same convention long established by other
constructs such as :class:`.Column`. fixes #3122
2014-07-10 11:26:13 -04:00
Mike Bayer 2b85e80d75 - Changed the default value of "raise_on_warnings" to False for
MySQLconnector.  This was set at True for some reason.  The "buffered"
flag unfortunately must stay at True as MySQLconnector does not allow
a cursor to be closed unless all results are fully fetched. fixes #2515
- lots of MySQL tests seemed to not be hitting all backends, so we should
be getting some mysqlconnector failures now
2014-07-09 16:04:07 -04:00
Mike Bayer 04e9a81136 - add 0.9 changelog 2014-07-09 15:51:47 -04:00
Mike Bayer 99350b159f - Fixed bug where "python setup.py test" wasn't calling into
distutils appropriately, and errors would be emitted at the end
of the test suite.
2014-07-09 15:50:17 -04:00
Mike Bayer e38bb315fd - The "evaulator" for query.update()/delete() won't work with multi-table
updates, and needs to be set to `synchronize_session=False` or
`synchronize_session='fetch'`; this now raises an exception, with a
message to change the synchronize setting.  This will be only a warning
in 0.9.7.  fixes #3117
2014-07-08 19:08:42 -04:00
jonathan vanasco c996b76d5b - add postgresql_regconfig argument to PG dialect for match() operator,
implements PG's to_tsquery('regconfig', 'arg') pattern. fixes #3078
2014-07-08 18:18:04 -04:00
Mike Bayer 5eefdae113 document JSONB 2014-07-07 17:59:47 -04:00
Mike Bayer c956c443f6 changelog 2014-07-07 10:42:19 -04:00
mike bayer 7c29cff14d Merge pull request #100 from plaes/typos
Typo fixes
2014-07-06 17:17:59 -04:00
Mike Bayer 961ede0510 changelog, fixes #3093 2014-07-06 17:16:26 -04:00
Mike Bayer 50040ec776 - changelog 2014-07-06 16:55:28 -04:00
Mike Bayer dfb5707dae - rework the entire approach to #3076. As we need to catch all exceptions
in all cases unconditionally, the number of use cases that go beyond what
dbapi_error() is expecting has gone too far for an 0.9 release.
Additionally, the number of things we'd like to track is really a lot
more than the five arguments here, and ExecutionContext is really not
suitable as totally public API for this.   So restore dbapi_error
to its old version, deprecate, and build out handle_error instead.
This is a lot more extensible and doesn't get in the way of anything
compatibility-wise.
2014-07-04 15:40:47 -04:00
Mike Bayer c60eb86a91 - Added new attributes :attr:.ExecutionContext.exception and
:attr:`.ExecutionContext.is_disconnect` which are meaningful within
the :meth:`.ConnectionEvents.dbapi_error` handler to see both the
original DBAPI error as well as whether or not it represents
a disconnect.
2014-07-03 21:49:37 -04:00
Mike Bayer e0a9b94abb - The mechanics of the :meth:.ConnectionEvents.dbapi_error handler
have been enhanced such that the function handler is now capable
of raising or returning a new exception object, which will replace
the exception normally being thrown by SQLAlchemy.
fixes #3076
2014-07-03 17:30:49 -04:00
Mike Bayer 427ee3a61e - Fixed bug where items that were persisted, deleted, or had a
primary key change within a savepoint block would not
participate in being restored to their former state (not in
session, in session, previous PK) after the outer transaction
were rolled back. fixes #3108
2014-07-01 12:12:51 -04:00
Mike Bayer 2d8d1dcf60 - repair the _enable_single_crit method, it was named the same
as the attribute and probably just replaced itself, so that is
now _set_enable_single_crit
- as a side effect of the main issue fixed here, correct the case in
adjust_for_single_inheritance where the same mapper appears more
than once in mapper_adapter_map; run through a set() for uniqueness.
- Fixed bug in subquery eager loading in conjunction with
:func:`.with_polymorphic`, the targeting of entities and columns
in the subquery load has been made more accurate with respect
to this type of entity and others. Fixes #3106
2014-06-30 20:25:04 -04:00
Mike Bayer 4b6d6d5f80 - add new section Working with Raw DBAPI Connections, fixes #2218. 2014-06-30 11:08:05 -04:00
Priit Laes 8c33709985 typo: s/founds/found 2014-06-28 12:45:50 +03:00
Mike Bayer 01215cdaef - Fixed a bug within the custom operator plus :meth:.TypeEngine.with_variant
system, whereby using a :class:`.TypeDecorator` in conjunction with
variant would fail with an MRO error when a comparison operator was used.
fixes #3102
2014-06-27 16:08:42 -04:00
Mike Bayer 3d7cd1741b wrong version number 2014-06-27 16:07:05 -04:00
Mike Bayer 3ea154fbf5 - MySQL error 2014 "commands out of sync" appears to be raised as a
ProgrammingError, not OperationalError, in modern MySQL-Python versions;
all MySQL error codes that are tested for "is disconnect" are now
checked within OperationalError and ProgrammingError regardless.
fixes #3101
2014-06-27 15:52:40 -04:00
Mike Bayer f2cf62090c - Fixed bug involving dynamic attributes, that was again a regression
of 🎫`3060` from verision 0.9.5.  A self-referential relationship
with lazy='dynamic' would raise a TypeError within a flush operation.
fixes #3099
2014-06-26 14:58:42 -04:00
Mike Bayer feda84e5b2 add missing release date 2014-06-25 14:31:18 -04:00
Mike Bayer ca58fa5d93 - Fixed bug when the declarative `__abstract__` flag was not being
distinguished for when it was actually the value ``False``.
The ``__abstract__`` flag needs to acutally evaluate to a True
value at the level being tested.
fixes #3097
2014-06-25 14:30:25 -04:00
uralbash 3be189e5d1 fix pullreq link in changelog_09.rst edited online with Bitbucket 2014-06-24 05:12:14 +00:00
Mike Bayer f10eb28d90 - reverse course in #3061 so that we instead no longer set None in the attribute
when we do a get; we return the None as always but we leave the dict blank
and the loader callable still in place.  The case for this implicit get on a pending object is not
super common and there really should be no change in state at all when this
operation proceeds.   This change is more dramatic as it reverses
a behavior SQLA has had since the first release.
fixes #3061
2014-06-23 19:50:23 -04:00
Mike Bayer 7e7447db1f - Reverted the change for 🎫3060 - this is a unit of work
fix that is updated more comprehensively in 1.0 via 🎫`3061`.
The fix in 🎫`3060` unfortunately produces a new issue whereby
an eager load of a many-to-one attribute can produce an event
that is interpreted into an attribute change.
2014-06-23 18:42:54 -04:00
Mike Bayer ea54b635d6 0.9.5 released date 2014-06-23 11:30:36 -04:00
Mike Bayer 179a3551bd fix changelog 2014-06-23 11:12:47 -04:00
Mike Bayer a1bbf3a005 - Additional checks have been added for the case where an inheriting
mapper is implicitly combining one of its column-based attributes
with that of the parent, where those columns normally don't necessarily
share the same value.  This is an extension of an existing check that
was added via 🎫`1892`; however this new check emits only a
warning, instead of an exception, to allow for applications that may
be relying upon the existing behavior.
fixes #3042
2014-06-20 18:47:28 -04:00
Mike Bayer d7f467fcd5 additional version notes 2014-06-20 18:06:15 -04:00
Mike Bayer 018ac859dc add missing version markers 2014-06-20 18:04:26 -04:00
Mike Bayer bd56485f4c - The :paramref:.Column.nullable flag is implicitly set to `False`
when that :class:`.Column` is referred to in an explicit
:class:`.PrimaryKeyConstraint` for that table.  This behavior now
matches that of when the :class:`.Column` itself has the
:paramref:`.Column.primary_key` flag set to ``True``, which is
intended to be an exactly equivalent case.
fixes #3023
2014-06-20 18:03:28 -04:00
Mike Bayer 42bbb7163a - Added a new type :class:.postgresql.OID to the Postgresql dialect.
While "oid" is generally a private type within PG that is not exposed
in modern versions, there are some PG use cases such as large object
support where these types might be exposed, as well as within some
user-reported schema reflection use cases.
fixes #3002
2014-06-20 17:58:06 -04:00
Mike Bayer a46932422b - Fixed bug where column names added to `mysql_length` parameter
on an index needed to have the same quoting for quoted names in
order to be recognized.  The fix makes the quotes optional but
also provides the old behavior for backwards compatibility with those
using the workaround.
fixes #3085
2014-06-18 10:56:23 -04:00