Commit Graph

6357 Commits

Author SHA1 Message Date
Mike Bayer 6e407b6c09 - remove debugging assertions
- keep sqlite as memory even with parallel for now
2014-07-27 18:55:02 -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 d2358629c9 - scale up for mysql, sqlite 2014-07-26 20:50:57 -04:00
Mike Bayer e65cb04974 Merge branch 'master' into xdist_poc
Conflicts:
	lib/sqlalchemy/engine/url.py
2014-07-26 19:04:07 -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 e602a73197 - use a template database for PG so extensions get created automatically 2014-07-25 20:19:06 -04:00
Mike Bayer 306047c006 Merge branch 'master' into xdist_poc 2014-07-25 19:15:11 -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 9e6624c049 - proof of concept for parallel testing 2014-07-25 18:33:04 -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 b7e75172b3 Merge remote-tracking branch 'origin/pr/124' into issue3141 2014-07-25 16:05:38 -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 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
Andrew ba58708643 Fix argument to array() in array._bind_param()
array.__init__() expects a list as its sole parameter but inside _bind_param(), instead of sending a list it's sending each item in the list as a separate argument which is incorrect.
2014-07-24 15:56:50 +10: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 76e127450c - allow 10 stray connections that need a gc
- be specific as to what occurred when we collect stray gc
2014-07-22 12:55:17 -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
Brian Jarrett cca03097f4 - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,
sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
2014-07-20 12:44:40 -04:00
Tony Locke 8fb6a91f1b Fix support for two phase commit in pg8000 dialect
The postgresql base dialect has problems with two-phase commit because
there isn't a standard way of handling autocommit in DBAPI. This commit
modifies the pg8000 dialect to use the DBAPI tpc extension, which is
supported by pg8000 as of version 1.9.11.
2014-07-19 20:20:12 +01:00
Mike Bayer 4020f2f440 - also add the alternate approach, name column distinctly from attribute name,
ref #3129
2014-07-16 15:24:32 -04:00
Mike Bayer 0083075b8e - add a documentation section for naming conflicts, fixes #3129 2014-07-16 15:18:03 -04:00
Mike Bayer 4597c1fe36 - reinstate E123, E125, E128
- edit strategies.py to conform
2014-07-16 14:30:35 -04:00
Mike Bayer e63767ed47 - fully flake8 this file 2014-07-15 13:34:55 -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
Mike Bayer dbc8bbfba3 - allow the compilation rule that gets the formatted name
to again have the chance to veto rendering, as the naming convention
can make the decision that the name is "none" or not now.
2014-07-14 21:11:51 -04:00
Mike Bayer d2193f53c1 - Fix bug in naming convention feature where using a check
constraint convention that includes ``constraint_name`` would
then force all :class:`.Boolean` and :class:`.Enum` types to
require names as well, as these implicitly create a
constraint, even if the ultimate target backend were one that does
not require generation of the constraint such as Postgresql.
The mechanics of naming conventions for these particular
constraints has been reorganized such that the naming
determination is done at DDL compile time, rather than at
constraint/table construction time.
fixes #3067
2014-07-14 20:26:38 -04:00
Mike Bayer 6fd0bc7c62 - Fixed a regression from 0.9.5 caused by 🎫3025 where the
query used to determine "default schema" is invalid in SQL Server 2000.
For SQL Server 2000 we go back to defaulting to the "schema name"
parameter of the dialect, which is configurable but defaults
to 'dbo'. fixes #3025
2014-07-14 19:16:11 -04:00
Mike Bayer 2825730e7b - Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref #3091 as this fix is also in that issue's patch, but is
a different issue.
2014-07-14 19:02:20 -04:00
Mike Bayer 0add251ea0 - In the SQL Server pyodbc dialect, repaired the implementation
for the ``description_encoding`` dialect parameter, which when
not explicitly set was preventing  cursor.description from
being parsed correctly in the case of result sets that
contained names in alternate encodings.  This parameter
shouldn't be needed going forward.
fixes #3091
2014-07-14 18:54:23 -04:00
Mike Bayer ec40a84d96 - Fixed a regression from 0.9.0 due to 🎫2736 where the
:meth:`.Query.select_from` method no longer set up the "from
entity" of the :class:`.Query` object correctly, so that
subsequent :meth:`.Query.filter_by` or :meth:`.Query.join`
calls would fail to check the appropriate "from" entity when
searching for attributes by string name.
fixes #3083
2014-07-14 18:49:06 -04:00
Mike Bayer 4619936417 -Fixed bug in common table expressions whereby positional bound
parameters could be expressed in the wrong final order
when CTEs were nested in certain ways.
fixes #3090
2014-07-14 18:34:32 -04:00
Mike Bayer eb4abda811 - Fixed bug where multi-valued :class:.Insert construct would fail
to check subsequent values entries beyond the first one given
for literal SQL expressions.
fixes #3069
2014-07-14 18:28:07 -04:00
Mike Bayer a49ec1cf77 - Added a "str()" step to the dialect_kwargs iteration for
Python version < 2.6.5, working around the
"no unicode keyword arg" bug as these args are passed along as
keyword args within some reflection processes.
fixes #3123
2014-07-14 18:09:54 -04:00
Mike Bayer 598e2311bf Merge branch 'pep8' 2014-07-13 20:19:25 -04:00
Brian Jarrett 28dd15081d PEP8 style fixes 2014-07-13 20:10:55 -04:00
Mike Bayer 071a183098 - Fixed bug in :class:.Enum and other :class:.SchemaType
subclasses where direct association of the type with a
:class:`.MetaData` would lead to a hang when events
(like create events) were emitted on the :class:`.MetaData`.
fixes #3124
2014-07-13 18:55:18 -04:00
Mike Bayer e5d0fa9493 - The :meth:.TypeEngine.with_variant method will now accept a
type class as an argument which is internally converted to an
instance, using the same convention long established by other
constructs such as :class:`.Column`. fixes #3122
2014-07-10 11:26:13 -04:00
Mike Bayer 5407ec9d38 - break up the <authors> copyright comment as part of a pass
to get all flake8 passing
2014-07-09 18:26:55 -04:00
Mike Bayer bbb81e682c - support __only_on__ and __backend__ at the same time 2014-07-09 18:12:32 -04:00
Mike Bayer 2b85e80d75 - Changed the default value of "raise_on_warnings" to False for
MySQLconnector.  This was set at True for some reason.  The "buffered"
flag unfortunately must stay at True as MySQLconnector does not allow
a cursor to be closed unless all results are fully fetched. fixes #2515
- lots of MySQL tests seemed to not be hitting all backends, so we should
be getting some mysqlconnector failures now
2014-07-09 16:04:07 -04:00
Mike Bayer 99350b159f - Fixed bug where "python setup.py test" wasn't calling into
distutils appropriately, and errors would be emitted at the end
of the test suite.
2014-07-09 15:50:17 -04:00
Mike Bayer e38bb315fd - The "evaulator" for query.update()/delete() won't work with multi-table
updates, and needs to be set to `synchronize_session=False` or
`synchronize_session='fetch'`; this now raises an exception, with a
message to change the synchronize setting.  This will be only a warning
in 0.9.7.  fixes #3117
2014-07-08 19:08:42 -04:00
jonathan vanasco c996b76d5b - add postgresql_regconfig argument to PG dialect for match() operator,
implements PG's to_tsquery('regconfig', 'arg') pattern. fixes #3078
2014-07-08 18:18:04 -04:00
mike bayer c9dceb0dfa Merge pull request #101 from ddimmich/master
Postgres 9.4 Jsonb support
2014-07-07 10:40:03 -04:00
mike bayer 7c29cff14d Merge pull request #100 from plaes/typos
Typo fixes
2014-07-06 17:17:59 -04:00
Mike Bayer 41563b5f5a Merged in therve/bug-3093/bug/3093 (pull request #24)
Return the assigned value in MultableDict.setdefault
2014-07-06 17:12:23 -04:00
mike bayer 49368458e0 Merge pull request #98 from abbec/mssql2008-multivalues-insert
Fixed support for multivalue inserts for MS SQL 2008
2014-07-06 16:55:05 -04:00