Commit Graph

10329 Commits

Author SHA1 Message Date
Mike Bayer ebefbb3d3d - try to improve the default coverage job 2016-01-26 12:06:24 -05:00
Mike Bayer 70e24adaba - fix the deps for the last change 2016-01-24 19:37:16 -05:00
Mike Bayer 0ad5599229 - unfortunately we have to force the paths to be shorter due to
https://github.com/pypa/virtualenv/issues/596
2016-01-24 19:29:26 -05:00
Mike Bayer 6b05150392 - add a new qualifier "native" vs. "dbapi" unicode to avoid
profiling problems here
- add extras_require to setup.py for the most common DBAPIs
- rework tox.ini to use extras, specify a test matrix built in
2016-01-24 18:28:09 -05:00
Mike Bayer 926784f513 - fix array test that was essentially taking a weird guess
at the primary key of a row based on other tests invoking around it

(cherry picked from commit 7d70dfd412)
2016-01-23 18:31:07 -05:00
Mike Bayer 2419bfe34c - fix stray connection 2016-01-23 17:31:02 -05:00
Mike Bayer 67a69da3aa - restate the "secondary" / AssociationProxy warning more strongly.
references #3638
2016-01-23 16:38:44 -05:00
Mike Bayer 77a4794ed2 - use regex here, columns dont matter, keep coming up with different orderings 2016-01-23 15:32:10 -05:00
Mike Bayer 65010e97bc - use uuid fragments for provision names to enable multiple test suites
per server
2016-01-23 14:58:42 -05:00
Mike Bayer d18d6d9baf - native unicode expectations are too difficult to maintain
w/ the number of drivers /DBURIs /  python versions
2016-01-23 14:30:30 -05:00
Mike Bayer 269313218d - move out match compiler test to test_compiler
- test_query isn't assertscompiledsql
2016-01-23 14:29:25 -05:00
Mike Bayer 24bad4bf1a - make this test deterministic 2016-01-21 17:20:52 -05:00
Mike Bayer 38958f7b3f - add a forwards-test here as well 2016-01-21 15:32:53 -05:00
Mike Bayer 89fa08792e - documenation updates to clarify specific SQLite versions
that have problems with right-nested joins and UNION column keys;
references #3633 references #3634.   backport from 1.1 to 0.9
announcing 1.1 as where these behaviors will be retired based
on version-specific checks
- fix test_resultset so that it passes when SQLite 3.10.0 is
present, references #3633
2016-01-21 15:21:33 -05:00
Mike Bayer 963aa30297 - Added new parameter :paramref:.orm.mapper.passive_deletes to
available mapper options.   This allows a DELETE to proceed
for a joined-table inheritance mapping against the base table only,
while allowing for ON DELETE CASCADE to handle deleting the row
from the subclass tables.
fixes #2349
2016-01-20 17:59:56 -05:00
Mike Bayer 61016f17d1 - The unsupported Sybase dialect now raises `NotImplementedError`
when attempting to compile a query that includes "offset"; Sybase
has no straightforward "offset" feature.  fixes #2278
2016-01-20 16:32:27 -05:00
Mike Bayer 47d8858c54 - generalize the verbiage on LargeBinary so that it doesn't
create confusion for inherited classes such as BYTEA, fixes
2016-01-20 16:20:08 -05:00
Mike Bayer 24dba714cb - update oracle JDBC driver URL, fixes #3554 2016-01-20 15:58:24 -05:00
Mike Bayer a53bd6f74b - cross link for concrete helper classes
- remove redundant concrete helper docs from declarative docs,
two places is enough
2016-01-20 15:28:35 -05:00
Mike Bayer baabf3bedb - typo
(cherry picked from commit b53667526e)
2016-01-20 14:03:49 -05:00
Mike Bayer 632c4f21fa - redo the docs for concrete inheritance to more strongly
favor declarative, fixes #2890
2016-01-20 13:34:57 -05:00
Mike Bayer 02271efd89 - clarify the "Adding" section also illustrates updates, fixes #2942 2016-01-20 12:22:17 -05:00
Mike Bayer 165fa15b0f - add a note that the literal_binds flag should be used
when cross-compiling from DDL to SQL, fixes #3615
2016-01-20 12:10:40 -05:00
Chase a2badb751f Fix ArrayOfEnum's handling of empty arrays.
Prior to this change a value of `'{}'` would split into the list `['']`.
2016-01-19 22:36:15 -08:00
Mike Bayer 5a279e7ae4 - the order in which _generate_backref() for different mappers is called
is random; therefore it may be called against the subclass mapper first, so
need to check .concrete on both sides, references #3630
2016-01-19 17:08:50 -05:00
Mike Bayer 39837686b0 - calling str() on a core sql construct has been made more "friendly",
when the construct contains non-standard sql elements such as
returning, array index operations, or dialect-specific or custom
datatypes.  a string is now returned in these cases rendering an
approximation of the construct (typically the postgresql-style
version of it) rather than raising an error. fixes #3631
- add within_group to top-level imports
- add eq_ignore_whitespace to sqlalchemy.testing imports
2016-01-19 16:47:16 -05:00
Mike Bayer b7bc704f3d - Fixed issue where two same-named relationships that refer to
a base class and a concrete-inherited subclass would raise an error
if those relationships were set up using "backref", while setting up the
identical configuration using relationship() instead with the conflicting
names would succeed, as is allowed in the case of a concrete mapping.
fixes #3630
2016-01-19 13:34:42 -05:00
Mike Bayer 2a7f37b7b0 - The `str() call for :class:.Query` will now take into account
the :class:`.Engine` to which the :class:`.Session` is bound, when
generating the string form of the SQL, so that the actual SQL
that would be emitted to the database is shown, if possible.  Previously,
only the engine associated with the :class:`.MetaData` to which the
mappings are associated would be used, if present.  If
no bind can be located either on the :class:`.Session` or on
the :class:`.MetaData` to which the mappings are associated, then
the "default" dialect is used to render the SQL, as was the case
previously.  fixes #3081
2016-01-19 12:44:42 -05:00
Mike Bayer d4d9a65248 - Fixed bug where some exception re-raise scenarios would attach
the exception to itself as the "cause"; while the Python 3 interpreter
is OK with this, it could cause endless loops in iPython.
fixes #3625
- add tests for reraise, raise_from_cause
- raise_from_cause is the same on py2k/3k, use just one function
2016-01-18 17:35:44 -05:00
Mike Bayer b985483c59 Merge remote-tracking branch 'origin/pr/227' 2016-01-16 22:06:29 -05:00
Mike Bayer 66560cef74 - fix People -> Person , fixes #3628 2016-01-16 22:04:10 -05:00
rmn f9b2185586 Fix typo in relationships docs 2016-01-16 21:19:02 +03:00
Mike Bayer a7cc296714 - update 2016-01-14 18:21:23 -05:00
Mike Bayer 7bb578b1bd - illustrate these using the newer exception doctest format.
unfortunately we can't show the SQL unless we filtered it out
from doctest...not worth it
2016-01-14 18:20:00 -05:00
Mike Bayer 1f7a1f777d - A deep improvement to the recently added :meth:.TextClause.columns
method, and its interaction with result-row processing, now allows
the columns passed to the method to be positionally matched with the
result columns in the statement, rather than matching on name alone.
The advantage to this includes that when linking a textual SQL statement
to an ORM or Core table model, no system of labeling or de-duping of
common column names needs to occur, which also means there's no need
to worry about how label names match to ORM columns and so-forth.  In
addition, the :class:`.ResultProxy` has been further enhanced to
map column and string keys to a row with greater precision in some
cases.  fixes #3501
- reorganize the initialization of ResultMetaData for readability
and complexity; use the name "cursor_description", define the
task of "merging" cursor_description with compiled column information
as its own function, and also define "name extraction" as a separate task.
- fully change the name we use in the "ambiguous column" error to be the
actual name that was ambiguous, modify the C ext also
2016-01-14 18:06:26 -05:00
Mike Bayer 0ff3f95d5b - there was a DATEPART test after all, fix format 2016-01-14 17:50:03 -05:00
Mike Bayer d5d7284bdd - fix some old verbiage that refers to text() as an "implicit" thing
for SQL fragments; we've deprecated that in 1.0 and its a good idea
to document like this for 0.9 as well.
2016-01-14 17:18:21 -05:00
Mike Bayer f2b00f1048 - convert keys to str for None not sortable against str on py3k 2016-01-12 10:49:14 -05:00
Mike Bayer 215167d8d3 - changelog for pr bitbucket:70, fixes #3624 2016-01-12 09:53:09 -05:00
Guillaume DOUMENC c4f415d979 Remove quote on first DATEPART paramater 2016-01-12 04:46:32 +00:00
Mike Bayer 6fbfadc738 - reorganize schema_translate_map to be succinct and gain the performance
back by using an attrgetter for the default case
2016-01-11 16:44:28 -05:00
Mike Bayer b301f009e1 - refactor a bit the loader options system to make it a bit more
intelligible, given the fixes for ref #3623.  unfortunately the system
is still quite weird even though it was rewritten to be... less weird
2016-01-10 17:47:38 -05:00
Mike Bayer d03477d4b7 - fix link to types in metadata, fixes #3618
- fix "version" got whacked into "f" in core tutorial
- fix short underline in automap
- fix unmatched boldface in session events
2016-01-10 11:48:53 -05:00
Mike Bayer ddba8b0e7f Merge remote-tracking branch 'origin/pr/225' 2016-01-10 10:31:51 -05:00
Mike Bayer 536e5cecea Merge remote-tracking branch 'origin/pr/226' 2016-01-09 22:27:12 -05:00
Mike Bayer 331caf11d3 - ensure we use a Connection for effective schema here since Engine doesn't
have it; keep it simple
2016-01-09 22:25:56 -05:00
Adrian Moennich bb29449755 Fix typo in session docs 2016-01-09 20:35:19 +01:00
Mike Bayer c7ae0daf0e - Fixed regression since 0.9 where the 0.9 style loader options
system failed to accommodate for multiple :func:`.undefer_group`
loader options in a single query.   Multiple :func:`.undefer_group`
options will now be taken into account even against the same
entity. fixes #3623
2016-01-09 10:10:20 -05:00
Mike Bayer 89facbed88 - Multi-tenancy schema translation for :class:.Table objects is added.
This supports the use case of an application that uses the same set of
:class:`.Table` objects in many schemas, such as schema-per-user.
A new execution option
:paramref:`.Connection.execution_options.schema_translate_map` is
added. fixes #2685
- latest tox doesn't like the {posargs} in the profile rerunner
2016-01-08 22:12:25 -05:00
Mike Bayer 777e25694f - fix docstrings 2016-01-08 16:27:37 -05:00