Commit Graph

5242 Commits

Author SHA1 Message Date
Mike Bayer f7cc3595ef oursql seems to handle this? unclear, might be dependent on mysql version 2014-08-08 14:40:44 -04:00
Mike Bayer ab7c785d96 - turn off the testing reaper here, that's the source of the leaks
when we are running with pydist, and even when we are running without it
in fact...
2014-08-08 13:06:41 -04:00
Ilya Pekelny a0e0f4c289 Public inspector method to load enum list
Provide opportunity to get enums list via an inspector instance public
interface.
2014-08-08 10:05:30 +03:00
Mike Bayer 6fd073b912 - take out the iterator approach here as it does not support concurrent access 2014-08-07 12:36:50 -04:00
Mike Bayer 3c6ff6adae -Fixed bug where Postgresql JSON type was not able to persist or
otherwise render a SQL NULL column value, rather than a JSON-encoded
``'null'``.  To support this case, changes are as follows:

* The value :func:`.null` can now be specified, which will always
  result in a NULL value resulting in the statement.

* A new parameter :paramref:`.JSON.none_as_null` is added, which
  when True indicates that the Python ``None`` value should be
  peristed as SQL NULL, rather than JSON-encoded ``'null'``.

Retrival of NULL as None is also repaired for DBAPIs other than
psycopg2, namely pg8000.

fixes #3159
2014-08-07 10:43:55 -04:00
Mike Bayer 7c80e521f0 - Fixed bug in CTE where `literal_binds` compiler argument would not
be always be correctly propagated when one CTE referred to another
aliased CTE in a statement.
Fixes #3154
2014-08-02 14:42:57 -04:00
Tony Locke ed1bbbed27 two_phase_recover, COMMIT PREPARED in transaction
In test/engine/test_transaction/test_two_phase_recover(), a COMMIT
PREPARED is issued while in a transaction. This causes an error, and
a prepared transaction is left hanging around which causes
the subsequent test to hang. I've altered the test to execute the
offending query with autocommit=true, then when it gets to the COMMIT
PRPARED it can go ahead.

There's another complication for pg8000 because its tpc_recover() method
started a transaction if one wasn't already in progress. I've decided
that this is incorrect behaviour and so from pg8000-1.9.13 this method
never starts or stops a transaction.
2014-08-02 15:29:36 +01:00
Tony Locke f586754c86 PEP8 tidy of test/engine/test_reconnect 2014-08-02 15:29:36 +01:00
Tony Locke c2a00153f1 With pg8000-1.9.13 passes engine/test_reconnect
The pg8000 dialect checks the text of the exception to determine if the
connection is closed. I'd (recklessly!) changed the text of the
exception in a recent version of the pg8000 driver adding capitalization
and a full stop. I've changed it back now so all works.
2014-08-02 15:29:36 +01:00
Mike Bayer 5a86dba402 - workaround removal of nested() in py3k 2014-07-30 12:50:38 -04:00
Mike Bayer 0bf33068f4 - ensure all tests are named test_* 2014-07-30 12:18:33 -04:00
Mike Bayer 326a3d85f7 - fix unit test affected by #3075 2014-07-29 19:09:48 -04:00
Mike Bayer e5620993bf pep8 cleanup 2014-07-29 14:17:29 -04:00
Mike Bayer 83326bf44c - The exception wrapping system for DBAPI errors can now accommodate
non-standard DBAPI exceptions, such as the psycopg2
TransactionRollbackError.  These exceptions will now be raised
using the closest available subclass in ``sqlalchemy.exc``, in the
case of TransactionRollbackError, ``sqlalchemy.exc.OperationalError``.
fixes #3075
2014-07-29 14:06:43 -04:00
Mike Bayer 405c223ae5 - Fixed 0.9.7 regression caused by 🎫3067 in conjunction with
a mis-named unit test such that so-called "schema" types like
:class:`.Boolean` and :class:`.Enum` could no longer be pickled.
fixes #3144
2014-07-29 13:32:05 -04:00
Mike Bayer 8574d5051a - find the remaining not cleaning up correctly test 2014-07-28 13:11:04 -04:00
Mike Bayer 1cb94d89d5 fix test ordering issues 2014-07-27 22:53:17 -04:00
Mike Bayer 54592942c4 - add support for tags, including include/exclude support.
simplify tox again now that we can exclude tests more easily
2014-07-27 18:46:20 -04:00
Mike Bayer 41a8a85311 Merge branch 'master' into xdist_poc 2014-07-26 20:53:27 -04:00
Mike Bayer 82965851fe fix paren here 2014-07-26 20:53:12 -04:00
Mike Bayer d2358629c9 - scale up for mysql, sqlite 2014-07-26 20:50:57 -04:00
Mike Bayer c85fa9fa50 - rework the exclusions system to have much better support for compound
rules, better message formatting
2014-07-26 18:26:22 -04:00
Mike Bayer 759e8aec13 - fix whitespace 2014-07-25 20:23:10 -04:00
Mike Bayer 54d086253e - restore non_updating_cascade to test_manytomany_nonpassive, but also
add sane_multi_rowcount requirement, as pg8000 doesn't do "multi" row count.
2014-07-25 18:51:44 -04:00
Mike Bayer fe878f5aff - more pg8000 tests passing 2014-07-25 16:39:44 -04:00
Mike Bayer 3c0efe508f Merge remote-tracking branch 'origin/pr/117' into pg8000 2014-07-25 16:17:15 -04:00
Mike Bayer d92177cede - Fixed bug in :class:.postgresql.array object where comparison
to a plain Python list would fail to use the correct array constructor.
Pull request courtesy Andrew.  fixes #3141
2014-07-25 16:08:21 -04:00
Mike Bayer 31178db914 - flake8 all of test/dialect/postgresql
- add __backend__ to most tests so that pg8000 can start coming in
2014-07-25 16:04:35 -04:00
Mike Bayer 6b60d3a9e6 - The MySQL dialect will now disable :meth:.ConnectionEvents.handle_error
events from firing for those statements which it uses internally
to detect if a table exists or not.   This is achieved using an
execution option ``skip_user_error_events`` that disables the handle
error event for the scope of that execution.   In this way, user code
that rewrites exceptions doesn't need to worry about the MySQL
dialect or other dialects that occasionally need to catch
SQLAlchemy specific exceptions.
2014-07-25 12:14:22 -04:00
Mike Bayer 8560522ff0 - use a variant with expected collation here for mysql 2014-07-25 12:02:05 -04:00
Mike Bayer 0df977ccad - Added a supported :meth:.FunctionElement.alias method to functions,
e.g. the ``func`` construct.  Previously, behavior for this method
was undefined.  The current behavior mimics that of pre-0.9.4,
which is that the function is turned into a single-column FROM
clause with the given alias name, where the column itself is
anonymously named.
fixes #3137
2014-07-24 14:33:50 -04:00
Mike Bayer 63c6aa0104 - update some SQL server tests, support
- add support for IDENTITY INSERT setting for INSERT with inline VALUES
2014-07-22 13:42:38 -04:00
Mike Bayer a007c6e616 put a greater variance into this test to prevent sporadic failures 2014-07-21 12:09:12 -04:00
Mike Bayer c02e95ed33 - Fixed bug introduced in 0.9.5 by new pg8000 isolation level feature
where engine-level isolation level parameter would raise an error
on connect. fixes #3134
2014-07-21 11:58:44 -04:00
Tony Locke a9d8d752ef PEP8 tidy of test/orm/test_dynamic.py 2014-07-20 11:59:33 +01:00
Tony Locke 7239f58742 Fixes for pg8000 for test/orm/test_dynamic.py 2014-07-20 11:59:33 +01:00
Tony Locke 0365a53c5d PEP8 tidy of test/orm/test_froms.py 2014-07-20 11:59:33 +01:00
Tony Locke b4f9a6949b Opened test_self_referential for pg8000
The test orm/test_froms.py test_self_referential works with pg8000 now,
so I've opened it up.
2014-07-20 11:59:33 +01:00
Tony Locke aa6ecc36b7 PEP8 tidy for test/orm/test_naturalpks.py 2014-07-20 11:59:33 +01:00
Tony Locke bdb99239f3 Remove requirement for manytomany_nonpassive
Removed the non_updating_cascade requirement from
test_manytomany_nonpassive. This is because setting
passive_updates=False in a relationship should work on *all* dialects.
2014-07-20 11:59:33 +01:00
Tony Locke 8646af82aa PEP8 tidy of test/orm/test_query.py 2014-07-20 11:59:33 +01:00
Tony Locke 4924058818 pg8000 passing test/orm/test_query.py 2014-07-20 11:59:09 +01:00
Tony Locke 6f5011a5c7 PEP8 tidy for test/orm/test_transaction.py 2014-07-19 20:20:12 +01:00
Tony Locke ebf74bd659 PEP8 tidy for test/orm/test_versioning.py 2014-07-19 20:20:12 +01:00
Mike Bayer bb5f4392a4 - update the flake8 rules again
- apply autopep8 + manual fixes to most of test/sql/
2014-07-18 17:40:58 -04: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 828cf1263a - use an odict here to ensure ordering of properties 2014-07-15 18:59:44 -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 f4653729a6 - wrestle with conv() and tests some more 2014-07-14 22:44:33 -04:00