Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer e73f735382 - Fixed regression regarding the declarative `__declare_first__`
and ``__declare_last__`` accessors where these would no longer be
called on the superclass of the declarative base.
fixes #3383
2015-04-24 13:49:09 -04:00
Mike Bayer 0fc751e4ab 1.0.1 2015-04-23 14:21:56 -04:00
Mike Bayer 350d002ee9 - update date
- repair category for EXISTS issue
2015-04-23 14:21:56 -04:00
Mike Bayer 846b2b835e - change/migration edits 2015-04-23 13:43:25 -04:00
Mike Bayer dd4240e43b - Fixed support for "literal_binds" mode when using limit/offset
with Firebird, so that the values are again rendered inline when
this is selected.  Related to 🎫`3034`.
fixes #3381
2015-04-23 12:07:56 -04:00
Mike Bayer 167a45a442 changelog for #3380, fixes #3380 2015-04-23 11:40:40 -04:00
Mike Bayer 39978060b0 - repair a regression caused by #3282, where we no longer were
applying any topological sort to tables on SQLite.  See the
changelog for details, but we now continue to sort
tables for SQLite on DROP, prohibit the sort from considering
alter, and only warn if we encounter an unresolvable cycle, in
which case, then we forego the ordering.  use_alter as always
is used to break such a cycle.
fixes #3378
2015-04-22 14:14:11 -04:00
Mike Bayer f704b7265a - correct migration note for #3084; doesn't apply to create/drop 2015-04-22 11:59:08 -04:00
Mike Bayer 4442eb3e1e - typo 2015-04-21 13:05:24 -04:00
Mike Bayer c2e3002503 - Added the string value `"none"` to those accepted by the
:paramref:`.Pool.reset_on_return` parameter as a synonym for ``None``,
so that string values can be used for all settings, allowing
.ini file utilities like :func:`.engine_from_config` to be usable
without issue.
fixes #3375
2015-04-21 10:04:02 -04:00
Mike Bayer 3e80d628bd - Fixed issue where a straight SELECT EXISTS query would fail to
assign the proper result type of Boolean to the result mapping, and
instead would leak column types from within the query into the
result map.  This issue exists in 0.9 and earlier as well, however
has less of an impact in those versions.  In 1.0, due to #918
this becomes a regression in that we now rely upon the result mapping
to be very accurate, else we can assign result-type processors to
the wrong column.   In all versions, this issue also has the effect
that a simple EXISTS will not apply the Boolean type handler, leading
to simple 1/0 values for backends without native boolean instead of
True/False.   The fix includes that an EXISTS columns argument
will be anon-labeled like other column expressions; a similar fix is
implemented for pure-boolean expressions like ``not_(True())``.
fixes #3372
2015-04-20 19:21:00 -04:00
Mike Bayer 2c91f71776 - add migration note for #3084 2015-04-20 17:44:21 -04:00
Mike Bayer a3af638e1a - Fixed more regressions caused by NEVER_SET; comparisons
to transient objects with attributes unset would leak NEVER_SET,
and negated_contains_or_equals would do so for any transient
object as the comparison used only the committed value.
Repaired the NEVER_SET cases, fixes #3371, and also made
negated_contains_or_equals() use state_attr_by_column() just
like a non-negated comparison, fixes #3374
2015-04-20 17:38:03 -04:00
Mike Bayer bd61e7a328 - add documentation describing the behavioral change in relationship
assignments that we would see from #3060; fixes #3369
2015-04-17 17:03:16 -04:00
Mike Bayer d349ad448c - Fixed a critical regression caused by 🎫3061 where the
NEVER_SET symbol could easily leak into a lazyload query, subsequent
to the flush of a pending object.  This would occur typically
for a many-to-one relationship that does not use a simple
"get" strategy.   The good news is that the fix improves efficiency
vs. 0.9, because we can now skip the SELECT statement entirely
when we detect NEVER_SET symbols present in the parameters; prior to
🎫`3061`, we couldn't discern if the None here were set or not.
fixes #3368
2015-04-17 16:06:04 -04:00
Mike Bayer 9f468e305d 1.0.0 2015-04-16 14:58:51 -04:00
Mike Bayer 2bc8c92279 - Identified an inconsistency when handling :meth:.Query.join to the
same target more than once; it implicitly dedupes only in the case of
a relationship join, and due to 🎫`3233`, in 1.0 a join
to the same table twice behaves differently than 0.9 in that it no
longer erroneously aliases.   To help document this change,
the verbiage regarding 🎫`3233` in the migration notes has
been generalized, and a warning has been added when :meth:`.Query.join`
is called against the same target relationship more than once.
fixes #3367
2015-04-15 17:30:23 -04:00
Mike Bayer 35a488ae5f - Made a small improvement to the heuristics of relationship when
determining remote side with semi-self-referential (e.g. two joined
inh subclasses referring to each other), non-simple join conditions
such that the parententity is taken into account and can reduce the
need for using the ``remote()`` annotation; this can restore some
cases that might have worked without the annotation prior to 0.9.4
via 🎫`2948`. fixes #3364
2015-04-12 13:45:08 -04:00
Mike Bayer 55c26710a1 - Fixed issue where a :class:.MetaData object that used a naming
convention would not properly work with pickle.  The attribute was
skipped leading to inconsistencies and failures if the unpickled
:class:`.MetaData` object were used to base additional tables
from.
fixes #3362
2015-04-10 11:20:14 -04:00
Mike Bayer 07153dc092 - ensure that the keys we put into the parameters dictionary
for an insert from select are the string names, and not
the Column objects.  The MSSQL dialect in particular relies upon
checking for these keys in params to know if identity insert
should be on.  references #3360
2015-04-08 12:14:56 -04:00
Mike Bayer 1b83b588f5 - Fixed a regression where the "last inserted id" mechanics would
fail to store the correct value for MSSQL on an INSERT where the
primary key value was present in the insert params before execution.
fixes #3360
2015-04-08 11:59:12 -04:00
Mike Bayer 3f930732f1 - changelog for pr github:166 2015-04-08 10:54:32 -04:00
Mike Bayer b6d2296d5d - make sure this is 1.0.0 backported to 0.9 2015-04-04 19:08:44 -04:00
Mike Bayer f30e35babc - Fixed the pathing used when tests run; for sqla_nose.py and py.test,
the "./lib" prefix is again inserted at the head of sys.path but
only if sys.flags.no_user_site isn't set; this makes it act just
like the way Python puts "." in the current path by default.
For tox, we are setting the PYTHONNOUSERSITE flag now.
fixes #3356
2015-04-04 19:08:18 -04:00
Mike Bayer ecd7b31d5e - Fixed a long-standing bug where the :class:.Enum type as used
with the psycopg2 dialect in conjunction with non-ascii values
and ``native_enum=False`` would fail to decode return results properly.
This stemmed from when the PG :class:`.postgresql.ENUM` type used
to be a standalone type without a "non native" option.
fixes #3354
- corrected the assertsql comparison rule to expect a non-ascii
SQL string
2015-04-04 12:02:51 -04:00
Mike Bayer ee40c7afaa - changelog for #3084, fixes #3084 2015-04-03 18:04:29 -04:00
Mike Bayer 06d9307ae2 - changelog + docstring for pullreq github:164 2015-04-03 17:53:49 -04:00
Mike Bayer 541a9751fc 1.0.0b5 2015-04-03 14:02:36 -04:00
Mike Bayer 5e04995a82 - update 0.9 changelog from rel_0_9 2015-04-02 12:21:54 -04:00
Mike Bayer 359f471a12 - Fixed bug where the state tracking within multiple, nested
:meth:`.Session.begin_nested` operations would fail to propagate
the "dirty" flag for an object that had been updated within
the inner savepoint, such that if the enclosing savepoint were
rolled back, the object would not be part of the state that was
expired and therefore reverted to its database state.
fixes #3352
2015-04-02 12:19:15 -04:00
Mike Bayer fe19227641 - :class:.Query doesn't support joins, subselects, or special
FROM clauses when using the :meth:`.Query.update` or
:meth:`.Query.delete` methods; instead of silently ignoring these
fields if methods like :meth:`.Query.join` or
:meth:`.Query.select_from` has been called, an error is raised.
In 0.9.10 this only emits a warning.
fixes #3349
- don't needlessly call _compile_context() and build up a
whole statement that we never need.  Construct QueryContext
as it's part of the event contract, but don't actually call upon
mapper attributes; use more direct systems of determining the
update or delete table.
- don't realy need _no_select_modifiers anymore
2015-04-01 19:37:43 -04:00
Mike Bayer 59816435da - Added a list() call around a weak dictionary used within the
commit phase of the session, which without it could cause
a "dictionary changed size during iter" error if garbage collection
interacted within the process.   Change was introduced by
2015-04-01 16:55:58 -04:00
Mike Bayer 4b16493548 - Fixed bug where updated PG index reflection as a result of
🎫`3184` would cause index operations to fail on Postgresql
versions 8.4 and earlier.  The enhancements are now
disabled when using an older version of Postgresql.
fixes #3343
2015-04-01 16:50:32 -04:00
Mike Bayer 5ed49f38c3 - The warning emitted by the unicode type for a non-unicode type
has been liberalized to warn for values that aren't even string
values, such as integers; previously, the updated warning system
of 1.0 made use of string formatting operations which
would raise an internal TypeError.   While these cases should ideally
raise totally, some backends like SQLite and MySQL do accept them
and are potentially in use by legacy code, not to mention that they
will always pass through if unicode conversion is turned off
for the target backend.
fixes #3346
2015-03-31 15:10:42 -04:00
Mike Bayer 1a56177c21 - Fixed a bug related to "nested" inner join eager loading, which
exists in 0.9 as well but is more of a regression in 1.0 due to
🎫`3008` which turns on "nested" by default, such that
a joined eager load that travels across sibling paths from a common
ancestor using innerjoin=True will correctly splice each "innerjoin"
sibling into the appropriate part of the join, when a series of
inner/outer joins are mixed together.
fixes #3347
2015-03-30 17:49:39 -04:00
Mike Bayer a15b2ac0a1 call this 1.0.0b5 for the moment 2015-03-30 17:15:48 -04:00
Mike Bayer 78b1850ae5 1.0.0b4 2015-03-29 10:05:16 -04:00
Ernest Walzel a518b31f3b Fix typos
agaisnt -> against
'a Alias' -> 'an Alias'
2015-03-26 18:28:11 +00:00
Mike Bayer 422fca43f8 fdb drivers seem to be no longer available 2015-03-24 19:30:09 -04:00
Mike Bayer 50b7e818c2 - also add this to Oracle, and defensively to firebird and sybase 2015-03-24 12:35:30 -04:00
Mike Bayer 86cebccc4c - Turned off the "simple order by" flag on the MSSQL dialect; this
is the flag that per 🎫`2992` causes an order by or group by
an expression that's also in the columns clause to be copied by
label, even if referenced as the expression object.   The behavior
for MSSQL is now the old behavior that copies the whole expression
in by default, as MSSQL can be picky on these particularly in
GROUP BY expressions.
fixes #3338
- Add a test that includes a composed label in a GROUP BY
2015-03-24 12:28:19 -04:00
Mike Bayer bdcaa0f6ca - The "auto-attach" feature of constraints such as :class:.UniqueConstraint
and :class:`.CheckConstraint` has been further enhanced such that
when the constraint is associated with non-table-bound :class:`.Column`
objects, the constraint will set up event listeners with the
columns themselves such that the constraint auto attaches at the
same time the columns are associated with the table.  This in particular
helps in some edge cases in declarative but is also of general use.
fixes #3341
2015-03-24 10:55:29 -04:00
Mike Bayer 04545727d4 - Fixed bug in new "label resolution" feature of 🎫2992 where
a label that was anonymous, then labeled again with a name, would
fail to be locatable via a textual label.  This situation occurs
naturally when a mapped :func:`.column_property` is given an
explicit label in a query.
fixes #3340
2015-03-23 12:33:48 -04:00
Mike Bayer db853306c4 - Fixed unicode support for PyMySQL when using an "executemany"
operation with unicode parameters.  SQLAlchemy now passes both
the statement as well as the bound parameters as unicode
objects, as PyMySQL generally uses string interpolation
internally to produce the final statement, and in the case of
executemany does the "encode" step only on the final statement.
fixes #3337
2015-03-22 19:25:13 -04:00
Mike Bayer c09c21c9f3 - Fixed bug in new "label resolution" feature of 🎫2992 where
the string label placed in the order_by() or group_by() of a statement
would place higher priority on the name as found
inside the FROM clause instead of a more locally available name
inside the columns clause.
fixes #3335
2015-03-21 13:12:15 -04:00
Mike Bayer 7d6dfb4cf7 - 1.0.0b3 2015-03-20 19:54:45 -04:00
Mike Bayer 3ae00fea90 - Repaired the commit for issue #2771 which was inadvertently commented
out.
- add __backend__ to the dialect suite so that it runs on CI.
- will be 1.0.0b3
2015-03-20 19:53:12 -04:00
Mike Bayer 1bcd99bec9 - 1.0.0b2 2015-03-20 16:09:56 -04:00
Mike Bayer ffddfe1b17 - add a note that we aren't really doing zxjdbc right now even though
these files are present.
2015-03-20 15:10:52 -04:00
Mike Bayer 3971690731 - reorganize MySQL docs re: unicode, other cleanup and updates 2015-03-20 15:08:35 -04:00