Commit Graph

10240 Commits

Author SHA1 Message Date
Mike Bayer 7d96ad4d53 - Fixed bug where use of the :meth:.Query.select_from method would
cause a subsequent call to the :meth:`.Query.with_parent` method to
fail. fixes #3606
- add mark-as-fail test for #3607
2015-12-12 21:08:56 -05:00
Mike Bayer d67d04c70a 1.0.10
(cherry picked from commit 6b87e0b301)
2015-12-11 16:05:41 -05:00
Mike Bayer 5710a1e88b - Added support for the `dict.pop() and dict.popitem()` methods
to the :class:`.mutable.MutableDict` class.
fixes #3605
2015-12-11 11:21:46 -05:00
Mike Bayer 741b8af31b - convert ORM tutorial and basic_relationships to favor
back_populates while still maintaining great familiarity
w/ backref so as not to confuse people.  fixes #3390
2015-12-10 18:27:14 -05:00
Mike Bayer d533b8e922 - The ORM and Core tutorials, which have always been in doctest format,
are now exercised within the normal unit test suite in both Python
2 and Python 3.
- remove the old testdocs.py runner and replace with test/base/test_tutorials.py
- use pytest's unicode fixer so that we can test for unicode strings
in both py2k/3k
- use py3k format overall for prints, exceptions
- add other fixers to guarantee deterministic results
- add skips and ellipses to outputs that aren't worth matching
2015-12-10 17:09:47 -05:00
Mike Bayer fb443199c1 Merge remote-tracking branch 'origin/pr/220' 2015-12-10 14:23:44 -05:00
Mike Bayer b606e47ddc - refactor of adapt_like_to_iterable(), fixes #3457.
Includes removal of adapt_like_to_iterable() as well
as _set_iterable(), uses __slots__ for collectionadapter,
does much less duck typing of collections.
2015-12-09 19:15:12 -05:00
Mike Bayer e57bf79616 - Fixed issue within the :meth:.Insert.from_select construct whereby
the :class:`.Select` construct would have its ``._raw_columns``
collection mutated in-place when compiling the :class:`.Insert`
construct, when the target :class:`.Table` has Python-side defaults.
The :class:`.Select` construct would compile standalone with the
erroneous column present subsequent to compilation of the
:class:`.Insert`, and the the :class:`.Insert` statement itself would
fail on a second compile attempt due to duplicate bound parameters.
fixes #3603
2015-12-09 18:15:25 -05:00
Nils Philippsen 7e6f331233 fix some typos 2015-12-08 23:47:00 +01:00
Mike Bayer f4a1129e79 - fix changelog for #3602
- add version switch for backend fsp test

(cherry picked from commit 67b22cee3a)
2015-12-08 13:50:25 -05:00
Mike Bayer 7df4054b04 - make this DROP conditional, attempting to isolate why jenkins has
an issue with just one test
2015-12-08 10:40:45 -05:00
Mike Bayer 3f42743d6a - Fixed bug in MySQL reflection where the "fractional sections portion"
of the :class:`.mysql.DATETIME`, :class:`.mysql.TIMESTAMP` and
:class:`.mysql.TIME` types would be incorrectly placed into the
``timestamp`` attribute, which is unused by MySQL, instead of the
``fsp`` attribute.
fixes #3602
2015-12-07 17:24:09 -05:00
Mike Bayer d7eae8c95c - flake8 test_reflection and rework the type-based tests into
individual categories w/ modernized fixtures, assert attributes
within type objects.
2015-12-07 17:09:11 -05:00
Mike Bayer 8fa62d652b - write a real inline documentation section for from_self(),
building on the example of query.join().  Ideally all the methods
in Query would have this kind of thing.  fixes #3544
2015-12-07 12:36:36 -05:00
Mike Bayer 077f26af5f - and NLS_LANG.... 2015-12-05 17:17:40 -05:00
Mike Bayer 7f423e8756 - add ORACLE_HOME to passenv allowing oracle to work w/ tox 2.0 2015-12-05 16:56:53 -05:00
Mike Bayer 012f3852bf - fix loading.py merge_result for new _merge() argument 2015-12-04 17:31:47 -05:00
Mike Bayer 3ec9b9f6b6 - The :meth:.Session.merge method now tracks pending objects by
primary key before emitting an INSERT, and merges distinct objects with
duplicate primary keys together as they are encountered, which is
essentially semi-deterministic at best.   This behavior
matches what happens already with persistent objects.
fixes #3601
2015-12-04 11:52:16 -05:00
Mike Bayer 935bc34dc5 - Fixed issue where post_update on a many-to-one relationship would
fail to emit an UPDATE in the case where the attribute were set to
None and not previously loaded.
fixes #3599
2015-12-02 12:13:57 -05:00
Mike Bayer 9695faf329 - Fixed bug where CREATE TABLE with a no-column table, but a constraint
such as a CHECK constraint would render an erroneous comma in the
definition; this scenario can occur such as with a Postgresql
INHERITS table that has no columns of its own.
fixes #3598
2015-12-01 19:03:03 -05:00
Mike Bayer ab69467697 - Added the error "20006: Write to the server failed" to the list
of disconnect errors for the pymssql driver, as this has been observed
to render a connection unusable.
fixes #3585
2015-11-30 13:15:40 -05:00
Mike Bayer f4cb3f8cac - changelog for #3573, fixes #3573 2015-11-30 13:06:11 -05:00
Mike Bayer 9c2c247563 Merge remote-tracking branch 'origin/pr/216' 2015-11-30 13:02:39 -05:00
Mike Bayer c3fbfa8257 - changelog for pullreq github:215 2015-11-30 13:01:07 -05:00
Mike Bayer a09fc9740d Merge remote-tracking branch 'origin/pr/215' 2015-11-30 12:57:47 -05:00
Mike Bayer 954aafa064 Merge remote-tracking branch 'origin/pr/217' 2015-11-30 12:55:26 -05:00
Mike Bayer 38e043a475 Merge remote-tracking branch 'origin/pr/214' 2015-11-30 12:53:56 -05:00
Mike Bayer be24b3ea83 - restore 'declarative' classifier 2015-11-30 12:52:01 -05:00
Nils Philippsen ef85a0d189 py2k: accept unicode literals on :func:backref, too
Fixed bug where in Py2K a unicode literal would not be accepted as the
string name of a class or other argument within declarative using
:func:`.backref` on :func:`.relationship`.

amends commit e6f67f4805

backport to rel_1_0

(cherry picked from commit 58f73d2278)
(cherry picked from commit 33c3aded3a)
2015-11-30 12:49:44 -05:00
Mike Bayer d5fd26b836 Merge remote-tracking branch 'origin/pr/212' 2015-11-30 12:46:45 -05:00
Mike Bayer 2c5ba60269 - update changelog for all the py3.5/3.6 related prs at once
(cherry picked from commit 4bb6770ae8)
2015-11-30 12:41:10 -05:00
Mike Bayer a058233f55 Merge remote-tracking branch 'origin/pr/211' 2015-11-30 12:35:10 -05:00
Mike Bayer 03a3b5ffd3 - A descriptive ValueError is now raised in the event that SQL server
returns an invalid date or time format from a DATE or TIME
column, rather than failing with a NoneType error.  Pull request
courtesy Ed Avis.
pullreq github:206
2015-11-30 12:19:26 -05:00
Mike Bayer 8145100da4 - update changelog to accommodate pr github:218
(cherry picked from commit 6657a008d6)
2015-11-30 11:55:31 -05:00
Mike Bayer 2b39f09e73 Merge remote-tracking branch 'origin/pr/218' 2015-11-30 11:53:09 -05:00
Iuri de Silvio d9178320d6 Fix _assert_unorderable_types on py36.
The error message changed to:

`'<' not supported between instances of 'foo' and 'bar'`
2015-11-30 14:50:25 -02:00
Mike Bayer d59e951f46 - changelog for pr github:210
(cherry picked from commit 3a4b89c5a0)
2015-11-30 11:42:55 -05:00
Mike Bayer e45e4aa97d Merge remote-tracking branch 'origin/pr/210' 2015-11-30 11:40:44 -05:00
Mike Bayer 86e5419968 - make inserted_primary_key a link and be more clear what happens here 2015-11-30 11:25:07 -05:00
Mike Bayer 4fcd93afb8 - close the session 2015-11-29 21:50:50 -05:00
Mike Bayer b0308a7b3a - Fixed an issue in baked queries where the .get() method, used either
directly or within lazy loads, didn't consider the mapper's "get clause"
as part of the cache key, causing bound parameter mismatches if the
clause got re-generated.  This clause is cached by mappers
on the fly but in highly concurrent scenarios may be generated more
than once when first accessed.
fixes #3597
2015-11-29 11:42:55 -05:00
Mike Bayer c90f0a49f3 - Added support for parameter-ordered SET clauses in an UPDATE
statement.  This feature is available by passing the
:paramref:`~.sqlalchemy.sql.expression.update.preserve_parameter_order`
flag either to the core :class:`.Update` construct or alternatively
adding it to the :paramref:`.Query.update.update_args` dictionary at
the ORM-level, also passing the parameters themselves as a list of 2-tuples.
Thanks to Gorka Eguileor for implementation and tests.
adapted from pullreq github:200
2015-11-28 14:30:05 -05:00
Hugh Cole-Baker 0438065a20 Fix a typo in the disconnect handling code example 2015-11-28 15:21:11 +00:00
Mike Bayer 1202e140b9 - Fixed bug which is actually a regression that occurred between
versions 0.8.0 and 0.8.1, due 🎫`2714`.  The case where
joined eager loading needs to join out over a subclass-bound
relationship when "with_polymorphic" were also used would fail
to join from the correct entity.
fixes #3593
2015-11-25 15:29:04 -05:00
Mike Bayer 2a2be6a2ce - support declarativemappedtest with per-test setup 2015-11-25 15:15:35 -05:00
Mike Bayer 2743b674f5 - add an ignore for N806 2015-11-25 14:31:58 -05:00
Nils Philippsen 58f73d2278 py2k: accept unicode literals on :func:backref, too
Fixed bug where in Py2K a unicode literal would not be accepted as the
string name of a class or other argument within declarative using
:func:`.backref` on :func:`.relationship`.

amends commit e6f67f4805
2015-11-25 16:03:59 +01:00
Bas van den Heuvel 054b22c786 - Change "expr" to "entity" for example illustrating an event
that intercepts a query and adds entity-oriented criteria
2015-11-24 14:10:51 -05:00
Diana Clarke fd47fea6fb - Postgres: Do not prefix table with schema in: "FOR UPDATE of <table>"
For example, this query:

    SELECT s1.users.name FROM s1.users FOR UPDATE OF s1.users

should actually be:

    SELECT s1.users.name FROM s1.users FOR UPDATE OF users

fixes #3573
2015-11-24 13:58:50 -05:00
aisch 0921a6abbc fix postgresql exclude contraint to check when= against None rather than __bool__ eval 2015-11-23 10:22:50 -08:00