Commit Graph

8932 Commits

Author SHA1 Message Date
Mike Bayer 35855a47ea Merged in gunnlaugur/sqlalchemy (pull request #19)
Add note on PostgreSQL config for test runs
2014-05-15 17:09:25 -04:00
Gunnlaugur Þór Briem 5c1dd21295 Add note on PostgreSQL config for test runs
Several tests on PostgreSQL depend on English-language text search
config being the default in the test DB. This adds a note about that.
2014-05-15 21:02:59 +00:00
Mike Bayer aa12fdb40e - Fixed bug in mutable extension where :class:.MutableDict did not
report change events for the ``setdefault()`` dictionary operation.
fixes #3051
2014-05-14 10:03:24 -04:00
Mike Bayer 92ab5a8f5b Merge branch 'master' of bitbucket.org:zzzeek/sqlalchemy 2014-05-12 17:18:56 -04:00
Mike Bayer 976b4c97df - add a new FAQ section "performance", put the profiling article there,
move the insert rows article there as well
2014-05-12 17:17:41 -04:00
Wieland Hoffmann 045861dbe2 Posgtresql -> PostgreSQL 2014-05-12 17:17:29 -04:00
Mike Bayer c7857ec079 Merged in mineo/sqlalchemy/mineo/posgtresql-postgresql-1399232068499 (pull request #17)
Posgtresql -> PostgreSQL
2014-05-12 11:52:26 -04:00
Mike Bayer 46763173fc changelog for pullreq bitbucket:15 2014-05-12 11:39:49 -04:00
Mike Bayer 0a08177b59 Merged in WSMcG/sqlalchemy (pull request #15)
Added optional '=' to MySQL KEY_BLOCK_SIZE regex
2014-05-12 11:38:24 -04:00
mike bayer 1abd53a355 Merge pull request #91 from smurfix/de_apostroph_ify
Documentation fix-up: "its" vs. "it's"
2014-05-11 13:04:05 -04:00
Matthias Urlichs f341cfbfe1 Documentation fix-up: "its" vs. "it's"
Removed ungrammatical apostrophes from documentation, replacing
"it's" with "its" where appropriate (but in a few cases with "it is"
when that read better).

While doing that, I also fixed a couple of minor typos etc.
as I noticed them.
2014-05-11 16:49:56 +02:00
Mike Bayer 230c0d5a19 - Fixed ORM bug where the :func:.class_mapper function would mask
AttributeErrors or KeyErrors that should raise during mapper
configuration due to user errors.  The catch for attribute/keyerror
has been made more specific to not include the configuration step.
fixes #3047
2014-05-10 23:26:09 -04:00
Mike Bayer 168ca1d37d - stress test for invalidation 2014-05-10 15:52:31 -04:00
Mike Bayer 85d1899b76 - Fixed some "double invalidate" situations were detected where
a connection invalidation could occur within an already critical section
like a connection.close(); ultimately, these conditions are caused
by the change in 🎫`2907`, in that the "reset on return" feature
calls out to the Connection/Transaction in order to handle it, where
"disconnect detection" might be caught.  However, it's possible that
the more recent change in 🎫`2985` made it more likely for this
to be seen as the "connection invalidate" operation is much quicker,
as the issue is more reproducible on 0.9.4 than 0.9.3.

Checks are now added within any section that
an invalidate might occur to halt further disallowed operations
on the invalidated connection.  This includes two fixes both at the
engine level and at the pool level.   While the issue was observed
with highly concurrent gevent cases, it could in theory occur in
any kind of scenario where a disconnect occurs within the connection
close operation.
fixes #3043
ref #2985
ref #2907

- add some defensive checks during an invalidate situation:
1. _ConnectionRecord.invalidate might be called twice within finalize_fairy
if the _reset() raises an invalidate condition, invalidates, raises and then
goes to invalidate the CR.  so check for this.
2. similarly within Conneciton, anytime we do handle_dbapi_error(), we might become invalidated.
so a following finally must check self.__invalid before dealing with the connection
any futher.
2014-05-10 15:34:42 -04:00
Mike Bayer 55eacc8dbe - Fixed bug where :meth:.Table.update and :meth:.Table.delete
would produce an empty WHERE clause when an empty :func:`.and_()`
or :func:`.or_()` or other blank expression were applied.  This is
now consistent with that of :func:`.select`.
fixes #3045
2014-05-08 22:44:06 -04:00
Wieland Hoffmann c17ec9ee53 Posgtresql -> PostgreSQL 2014-05-04 19:34:37 +00:00
Mike Bayer c8873b31f0 - critically, py.test for unknown reasons *SKIPS* tests that have an __init__() method.
No clue.  nosetests doesn't do this.  concerning that other tests might have the same issue.
2014-05-02 18:43:12 -04:00
Mike Bayer 890ac4c81b doc fixes 2014-05-01 20:34:33 -04:00
Mike Bayer 2a458680a4 - Fixed bug where the combination of "limit" rendering as
"SELECT FIRST n ROWS" using a bound parameter (only firebird has both),
combined with column-level subqueries
which also feature "limit" as well as "positional" bound parameters
(e.g. qmark style) would erroneously assign the subquery-level positions
before that of the enclosing SELECT, thus returning parameters which
are out of order. Fixes #3038
2014-04-30 19:07:45 -04:00
Alex Gaynor 1caa7fafbd Fix many typos throughout the codebase
Found using: https://github.com/intgr/topy
2014-04-26 13:13:13 -07:00
Mike Bayer 146fbf6d26 - add a note about versioning only applying to flushes 2014-04-25 12:31:04 -04:00
Mike Bayer 5016b581b6 - document that joinedload/eagerload work with of_type() + with_polymoprhic() 2014-04-23 19:13:04 -04:00
Mike Bayer 18403c07f9 Merged in benselme/sqlalchemy/docs_linking (pull request #16)
Added some links in session docs
2014-04-23 12:38:26 -04:00
benselme c3bbc6497e Added some links in session docs 2014-04-23 12:18:32 -04:00
Mike Bayer 7303b59b00 - The "primaryjoin" model has been stretched a bit further to allow
a join condition that is strictly from a single column to itself,
translated through some kind of SQL function or expression.  This
is kind of experimental, but the first proof of concept is a
"materialized path" join condition where a path string is compared
to itself using "like".   The :meth:`.Operators.like` operator has
also been added to the list of valid operators to use in a primaryjoin
condition.  fixes #3029
2014-04-19 18:49:58 -04:00
Mike Bayer c33d037880 - Liberalized the contract for :class:.Index a bit in that you can
specify a :func:`.text` expression as the target; the index no longer
needs to have a table-bound column present if the index is to be
manually added to the table, either via inline declaration or via
:meth:`.Table.append_constraint`. fixes #3028
2014-04-19 12:31:19 -04:00
W. Sean McGivern c5a95ea8e3 Added optional '=' to MySQL KEY_BLOCK_SIZE regex 2014-04-19 12:16:46 -04:00
Mike Bayer 1fb4ad75a3 - Revised the query used to determine the current default schema name
to use the ``database_principal_id()`` function in conjunction with
the ``sys.database_principals`` view so that we can determine
the default schema independently of the type of login in progress
(e.g., SQL Server, Windows, etc). fixes #3025
2014-04-17 15:36:43 -04:00
Mike Bayer 99ae0dc821 - Fixed bug in new :meth:.DialectKWArgs.argument_for method where
adding an argument for a construct not previously included for any
special arguments would fail. fixes #3024
2014-04-15 23:34:07 -04:00
Mike Bayer 0c4a1cf963 changelog 2014-04-14 14:58:27 -04:00
Mike Bayer a347741d35 Merged in goodscloud/sqlalchemy (pull request #14)
fixes for #2830
2014-04-14 14:55:59 -04:00
Matt Chisholm c887d62810 use importlib.machinery to load modules instead of imp under Python 3.3 and greater
part of #2830
2014-04-14 13:58:39 -04:00
Matt Chisholm f0d71dc2d6 remove unused import 2014-04-14 13:53:28 -04:00
Matt Chisholm 3cefa27709 fix unclosed file ResourceWarning
part of #2830
2014-04-14 13:27:59 -04:00
Mike Bayer 73095b3531 - Added a new "disconnect" message "connection has been closed unexpectedly".
This appears to be related to newer versions of SSL.
Pull request courtesy Antti Haapala.
2014-04-11 15:42:36 -04:00
Mike Bayer 992928fb44 Merged in antti_haapala/sqlalchemy/antti_haapala/added-an-ssl-related-connection-error-1397245079299 (pull request #13)
added an SSL related connection error
2014-04-11 15:39:34 -04:00
antti_haapala 4e56c9386d added an SSL related connection error 2014-04-11 19:38:07 +00:00
mike bayer a48217b135 Merge pull request #84 from Daniel-B-Smith/master
Fixed bug in example code on orm session page.
2014-04-11 14:53:20 -04:00
Mike Bayer fcda519452 - Fixed regression introduced in 0.9 where new "ORDER BY <labelname>"
feature from 🎫`1068` would not apply quoting rules to the
label name as rendered in the ORDER BY.
fix #3020, re: #1068
2014-04-10 22:33:33 -04:00
Daniel Smith 10ea59241f Fixed bug in example code. 2014-04-10 19:15:17 -04:00
Mike Bayer 9f74861d6d - Added new utility function :func:.make_transient_to_detached which can
be used to manufacture objects that behave as though they were loaded
from a session, then detached.   Attributes that aren't present
are marked as expired, and the object can be added to a Session
where it will act like a persistent one. fix #3017
2014-04-09 17:49:16 -04:00
Mike Bayer e8c08b5d7b repair erroneous whitespace in autodoc directives, preventing members from
being documented
2014-04-06 18:14:44 -04:00
Mike Bayer 4527b6ab94 - Restored the import for :class:.Function to the `sqlalchemy.sql.expression`
import namespace, which was removed at the beginning of 0.9.
2014-04-05 21:05:29 -04:00
Mike Bayer a68fdf0d2f - add some docs for the instancestate linkage to the inspection system 2014-04-04 17:33:35 -04:00
Mike Bayer aba956a85d escape backslash 2014-04-02 18:14:10 -04:00
Mike Bayer b23bb79581 - reverse order of columns in sample CTEs as this is a UNION and the cols need to line up
- alter this in the unit tests as well as these queries were just copied from the tests
- remove the included_parts.join(parts) from the core CTE doc (also just copied from the
test, where we want to make sure joins don't get screwed up with the CTE) as it doesn't
contribute to the query itself
fixes #3014
2014-04-02 18:11:11 -04:00
Mike Bayer 66f2e1257a - back off the callcounts a bit for the boolean fix
- rewrite callcounts for select()
2014-04-01 18:29:54 -04:00
Mike Bayer 2e5c8913a8 - Fixes to the newly enhanced boolean coercion in 🎫2804 where
the new rules for "where" and "having" woudn't take effect for the
"whereclause" and "having" kw arguments of the :func:`.select` construct,
which is also what :class:`.Query` uses so wasn't working in the
ORM either. fixes #3013 re: #2804
2014-04-01 13:03:52 -04:00
Mike Bayer e16ede8cae - Added new flag :paramref:.expression.between.symmetric, when set to True
renders "BETWEEN SYMMETRIC".  Also added a new negation operator
"notbetween_op", which now allows an expression like ``~col.between(x, y)``
to render as "col NOT BETWEEN x AND y", rather than a parentheiszed NOT
string.  fixes #2990
2014-03-30 21:20:20 -04:00
Mike Bayer efd3c311e0 update 2014-03-30 21:09:33 -04:00