]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
11 years agoFix many typos throughout the codebase
Alex Gaynor [Sat, 26 Apr 2014 20:13:13 +0000 (13:13 -0700)] 
Fix many typos throughout the codebase

Found using: https://github.com/intgr/topy

11 years ago- add a note about versioning only applying to flushes
Mike Bayer [Fri, 25 Apr 2014 16:31:04 +0000 (12:31 -0400)] 
- add a note about versioning only applying to flushes

11 years ago- document that joinedload/eagerload work with of_type() + with_polymoprhic()
Mike Bayer [Wed, 23 Apr 2014 23:13:04 +0000 (19:13 -0400)] 
- document that joinedload/eagerload work with of_type() + with_polymoprhic()

11 years agoMerged in benselme/sqlalchemy/docs_linking (pull request #16)
Mike Bayer [Wed, 23 Apr 2014 16:38:26 +0000 (12:38 -0400)] 
Merged in benselme/sqlalchemy/docs_linking (pull request #16)

Added some links in session docs

11 years agoAdded some links in session docs
benselme [Wed, 23 Apr 2014 16:18:32 +0000 (12:18 -0400)] 
Added some links in session docs

11 years ago- The "primaryjoin" model has been stretched a bit further to allow
Mike Bayer [Sat, 19 Apr 2014 22:49:58 +0000 (18:49 -0400)] 
- 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

11 years ago- Liberalized the contract for :class:`.Index` a bit in that you can
Mike Bayer [Sat, 19 Apr 2014 16:31:19 +0000 (12:31 -0400)] 
- 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

11 years ago- Revised the query used to determine the current default schema name
Mike Bayer [Thu, 17 Apr 2014 19:36:43 +0000 (15:36 -0400)] 
- 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

11 years ago- Fixed bug in new :meth:`.DialectKWArgs.argument_for` method where
Mike Bayer [Wed, 16 Apr 2014 03:34:07 +0000 (23:34 -0400)] 
- 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

11 years agochangelog
Mike Bayer [Mon, 14 Apr 2014 18:58:27 +0000 (14:58 -0400)] 
changelog

11 years agoMerged in goodscloud/sqlalchemy (pull request #14)
Mike Bayer [Mon, 14 Apr 2014 18:55:59 +0000 (14:55 -0400)] 
Merged in goodscloud/sqlalchemy (pull request #14)

fixes for #2830

11 years agouse importlib.machinery to load modules instead of imp under Python 3.3 and greater
Matt Chisholm [Mon, 14 Apr 2014 17:54:01 +0000 (13:54 -0400)] 
use importlib.machinery to load modules instead of imp under Python 3.3 and greater

part of #2830

11 years agoremove unused import
Matt Chisholm [Mon, 14 Apr 2014 17:53:28 +0000 (13:53 -0400)] 
remove unused import

11 years agofix unclosed file ResourceWarning
Matt Chisholm [Mon, 14 Apr 2014 17:27:59 +0000 (13:27 -0400)] 
fix unclosed file ResourceWarning

part of #2830

11 years ago- Added a new "disconnect" message "connection has been closed unexpectedly".
Mike Bayer [Fri, 11 Apr 2014 19:42:36 +0000 (15:42 -0400)] 
- 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.

11 years agoMerged in antti_haapala/sqlalchemy/antti_haapala/added-an-ssl-related-connection...
Mike Bayer [Fri, 11 Apr 2014 19:39:34 +0000 (15:39 -0400)] 
Merged in antti_haapala/sqlalchemy/antti_haapala/added-an-ssl-related-connection-error-1397245079299 (pull request #13)

added an SSL related connection error

11 years agoadded an SSL related connection error
antti_haapala [Fri, 11 Apr 2014 19:38:07 +0000 (19:38 +0000)] 
added an SSL related connection error

11 years agoMerge pull request #84 from Daniel-B-Smith/master
mike bayer [Fri, 11 Apr 2014 18:53:20 +0000 (14:53 -0400)] 
Merge pull request #84 from Daniel-B-Smith/master

Fixed bug in example code on orm session page.

11 years ago- Fixed regression introduced in 0.9 where new "ORDER BY <labelname>"
Mike Bayer [Fri, 11 Apr 2014 02:33:33 +0000 (22:33 -0400)] 
- Fixed regression introduced in 0.9 where new "ORDER BY <labelname>"
feature from :ticket:`1068` would not apply quoting rules to the
label name as rendered in the ORDER BY.
fix #3020, re: #1068

11 years agoFixed bug in example code.
Daniel Smith [Thu, 10 Apr 2014 23:15:17 +0000 (19:15 -0400)] 
Fixed bug in example code.

11 years ago- Added new utility function :func:`.make_transient_to_detached` which can
Mike Bayer [Wed, 9 Apr 2014 21:49:16 +0000 (17:49 -0400)] 
- 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

11 years agorepair erroneous whitespace in autodoc directives, preventing members from
Mike Bayer [Sun, 6 Apr 2014 22:14:44 +0000 (18:14 -0400)] 
repair erroneous whitespace in autodoc directives, preventing members from
being documented

11 years ago- Restored the import for :class:`.Function` to the ``sqlalchemy.sql.expression``
Mike Bayer [Sun, 6 Apr 2014 01:05:29 +0000 (21:05 -0400)] 
- Restored the import for :class:`.Function` to the ``sqlalchemy.sql.expression``
import namespace, which was removed at the beginning of 0.9.

11 years ago- add some docs for the instancestate linkage to the inspection system
Mike Bayer [Fri, 4 Apr 2014 21:33:35 +0000 (17:33 -0400)] 
- add some docs for the instancestate linkage to the inspection system

11 years agoescape backslash
Mike Bayer [Wed, 2 Apr 2014 22:14:10 +0000 (18:14 -0400)] 
escape backslash

11 years ago- reverse order of columns in sample CTEs as this is a UNION and the cols need to...
Mike Bayer [Wed, 2 Apr 2014 22:11:11 +0000 (18:11 -0400)] 
- 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

11 years ago- back off the callcounts a bit for the boolean fix
Mike Bayer [Tue, 1 Apr 2014 22:29:54 +0000 (18:29 -0400)] 
- back off the callcounts a bit for the boolean fix
- rewrite callcounts for select()

11 years ago- Fixes to the newly enhanced boolean coercion in :ticket:`2804` where
Mike Bayer [Tue, 1 Apr 2014 17:03:52 +0000 (13:03 -0400)] 
- Fixes to the newly enhanced boolean coercion in :ticket:`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

11 years ago- Added new flag :paramref:`.expression.between.symmetric`, when set to True
Mike Bayer [Mon, 31 Mar 2014 01:20:20 +0000 (21:20 -0400)] 
- 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

11 years agoupdate
Mike Bayer [Mon, 31 Mar 2014 01:09:33 +0000 (21:09 -0400)] 
update

11 years ago- fix mapper ref
Mike Bayer [Fri, 28 Mar 2014 23:59:54 +0000 (19:59 -0400)] 
- fix mapper ref
- don't talk about "can't check for rows matched" here as we changed that in 0.9

11 years ago0.9.4 rel_0_9_4
Mike Bayer [Fri, 28 Mar 2014 23:40:09 +0000 (19:40 -0400)] 
0.9.4

11 years agodont need rowcount here...
Mike Bayer [Fri, 28 Mar 2014 23:19:55 +0000 (19:19 -0400)] 
dont need rowcount here...

11 years ago- Added new parameter :paramref:`.mapper.confirm_deleted_rows`. Defaults
Mike Bayer [Fri, 28 Mar 2014 22:00:35 +0000 (18:00 -0400)] 
- Added new parameter :paramref:`.mapper.confirm_deleted_rows`.  Defaults
to True, indicates that a series of DELETE statements should confirm
that the cursor rowcount matches the number of primary keys that should
have matched;  this behavior had been taken off in most cases
(except when version_id is used) to support the unusual edge case of
self-referential ON DELETE CASCADE; to accomodate this, the message
is now just a warning, not an exception, and the flag can be used
to indicate a mapping that expects self-refererntial cascaded
deletes of this nature.  See also :ticket:`2403` for background on the
original change. re: #2403 fix #3007

11 years ago- revert part of c01558ae7f4a for now as we also test that a DELETE of two rows
Mike Bayer [Fri, 28 Mar 2014 21:42:55 +0000 (17:42 -0400)] 
- revert part of c01558ae7f4a for now as we also test that a DELETE of two rows
where one is to be deleted from ON DELETE CASCADE succeeds; the check here makes that fail.
We will need to add an option to enable/disable this check per mapping, will likely
do this in next version

11 years agomark failing tests for buggy mysqlconnector
Mike Bayer [Fri, 28 Mar 2014 21:26:45 +0000 (17:26 -0400)] 
mark failing tests for buggy mysqlconnector

11 years agorevert inadvertent pdb
Mike Bayer [Fri, 28 Mar 2014 20:48:05 +0000 (16:48 -0400)] 
revert inadvertent pdb

11 years ago- the rewording of orderinglist docs got committed by accident, finish it up
Mike Bayer [Fri, 28 Mar 2014 20:47:12 +0000 (16:47 -0400)] 
- the rewording of orderinglist docs got committed by accident, finish it up

11 years ago- add further coverage for join_condition to make sure we get this case where
Mike Bayer [Fri, 28 Mar 2014 20:41:08 +0000 (16:41 -0400)] 
- add further coverage for join_condition to make sure we get this case where
there are multiple, equivalent foreign keys

11 years agopickle of execption not supported on mysqlconnector
Mike Bayer [Fri, 28 Mar 2014 20:37:43 +0000 (16:37 -0400)] 
pickle of execption not supported on mysqlconnector

11 years ago- fix set syntax supposed to be dict
Mike Bayer [Fri, 28 Mar 2014 20:36:11 +0000 (16:36 -0400)] 
- fix set syntax supposed to be dict

11 years ago- Fixed ORM bug where changing the primary key of an object, then marking
Mike Bayer [Fri, 28 Mar 2014 20:32:11 +0000 (16:32 -0400)] 
- Fixed ORM bug where changing the primary key of an object, then marking
it for DELETE would fail to target the correct row for DELETE.
Then to compound matters, basic "number of rows matched" checks were
not being performed.  Both issues are fixed, however note that the
"rows matched" check requires so-called "sane multi-row count"
functionality; the DBAPI's executemany() method must count up the
rows matched by individual statements and SQLAlchemy's dialect must
mark this feature as supported, currently applies to some mysql dialects,
psycopg2, sqlite only. fixes #3006
- Enabled "sane multi-row count" checking for the psycopg2 DBAPI, as
this seems to be supported as of psycopg2 2.0.9.

11 years agoclarify doc here
Mike Bayer [Fri, 28 Mar 2014 15:05:46 +0000 (11:05 -0400)] 
clarify doc here

11 years ago- fix py3k bug re: dictionary values(), fixes #3005
Mike Bayer [Fri, 28 Mar 2014 15:02:34 +0000 (11:02 -0400)] 
- fix py3k bug re: dictionary values(), fixes #3005

11 years ago- Added support to automap for the case where a relationship should
Mike Bayer [Fri, 28 Mar 2014 14:49:37 +0000 (10:49 -0400)] 
- Added support to automap for the case where a relationship should
not be created between two classes that are in a joined inheritance
relationship, for those foreign keys that link the subclass back to
the superclass.
fixes #3004

11 years ago- Fixed a very old behavior where the lazy load emitted for a one-to-many
Mike Bayer [Fri, 28 Mar 2014 00:38:46 +0000 (20:38 -0400)] 
- Fixed a very old behavior where the lazy load emitted for a one-to-many
could inappropriately pull in the parent table, and also return results
inconsistent based on what's in the parent table, when the primaryjoin
includes some kind of discriminator against the parent table, such
as ``and_(parent.id == child.parent_id, parent.deleted == False)``.
While this primaryjoin doesn't make that much sense for a one-to-many,
it is slightly more common when applied to the many-to-one side, and
the one-to-many comes as a result of a backref.
Loading rows from ``child`` in this case would keep ``parent.deleted == False``
as is within the query, thereby yanking it into the FROM clause
and doing a cartesian product.  The new behavior will now substitute
the value of the local "parent.deleted" for that parameter as is
appropriate.   Though typically, a real-world app probably wants to use a
different primaryjoin for the o2m side in any case.
fixes #2948

11 years ago- Improved the check for "how to join from A to B" such that when
Mike Bayer [Thu, 27 Mar 2014 23:43:15 +0000 (19:43 -0400)] 
- Improved the check for "how to join from A to B" such that when
a table has multiple, composite foreign keys targeting a parent table,
the :paramref:`.relationship.foreign_keys` argument will be properly
interpreted in order to resolve the ambiguity; previously this condition
would raise that there were multiple FK paths when in fact the
foreign_keys argument should be establishing which one is expected.
fixes #2965

11 years ago- Tweaked the settings for mysql-connector-python; in Py2K, the
Mike Bayer [Thu, 27 Mar 2014 23:18:06 +0000 (19:18 -0400)] 
- Tweaked the settings for mysql-connector-python; in Py2K, the
"supports unicode statements" flag is now False, so that SQLAlchemy
will encode the *SQL string* (note: *not* the parameters)
to bytes before sending to the database.  This seems to allow
all unicode-related tests to pass for mysql-connector, including those
that use non-ascii table/column names, as well as some tests for the
TEXT type using unicode under cursor.executemany().
- other mysql-connector fixes; latest version seems to do better on
function call counts

11 years agoAdded missing text_type requirement to TextTest
Stefan Reich [Wed, 26 Mar 2014 15:04:23 +0000 (16:04 +0100)] 
Added missing text_type requirement to TextTest

Conflicts:
lib/sqlalchemy/testing/suite/test_types.py

11 years ago- fixes to multi-backend tests
Mike Bayer [Thu, 27 Mar 2014 17:17:20 +0000 (13:17 -0400)] 
- fixes to multi-backend tests
- move the logic to determine "test id" into plugin_base
- update callcounts

11 years agofixes to get profiling tests working again
Mike Bayer [Thu, 27 Mar 2014 00:43:20 +0000 (20:43 -0400)] 
fixes to get profiling tests working again

11 years agodont warn, that just crashes the test...
Mike Bayer [Wed, 26 Mar 2014 23:15:49 +0000 (19:15 -0400)] 
dont warn, that just crashes the test...

11 years agotry to liberalize the pool._refs assertion a bit
Mike Bayer [Wed, 26 Mar 2014 20:52:04 +0000 (16:52 -0400)] 
try to liberalize the pool._refs assertion a bit

11 years agouse integer division here
Mike Bayer [Wed, 26 Mar 2014 20:39:43 +0000 (16:39 -0400)] 
use integer division here

11 years ago- work on fixing some race-condition failures:
Mike Bayer [Wed, 26 Mar 2014 20:31:52 +0000 (16:31 -0400)] 
- work on fixing some race-condition failures:
1. make sure pool._invalidate() sets the timestamp up before
invalidating the target connection.  we can otherwise show how the
conn.invalidate() + pool._invalidate() can lead to an extra connection
being made.
2. to help with that, soften up the check on connection.invalidate()
when connection is already closed. a warning is fine here
3. add a mutex to test_max_overflow() when we connect, because the way
we're using mock depends on an iterator, that needs to be synchronized

11 years ago- rework memusage tests so that it only runs five iterations at a time, if it sees...
Mike Bayer [Wed, 26 Mar 2014 19:18:29 +0000 (15:18 -0400)] 
- rework memusage tests so that it only runs five iterations at a time, if it sees success within
that period, it's done.  memusage tests have become very slow

11 years ago- remove nose dependency
Mike Bayer [Wed, 26 Mar 2014 18:42:51 +0000 (14:42 -0400)] 
- remove nose dependency

11 years ago- Fixed regression caused by release 0.8.5 / 0.9.3's compatibility
Mike Bayer [Tue, 25 Mar 2014 16:26:42 +0000 (12:26 -0400)] 
- Fixed regression caused by release 0.8.5 / 0.9.3's compatibility
enhancements where index reflection on Postgresql versions specific
to only the 8.1, 8.2 series again
broke, surrounding the ever problematic int2vector type.  While
int2vector supports array operations as of 8.1, apparently it only
supports CAST to a varchar as of 8.3.
fix #3000

11 years agoadd some more mock structure so tricky DBAPIs like pypy work
Mike Bayer [Mon, 24 Mar 2014 23:30:44 +0000 (19:30 -0400)] 
add some more mock structure so tricky DBAPIs like pypy work

11 years agofix
Mike Bayer [Mon, 24 Mar 2014 17:33:53 +0000 (13:33 -0400)] 
fix

11 years ago- add some more rules to make sure all tests run if DBs are available
Mike Bayer [Mon, 24 Mar 2014 16:49:22 +0000 (12:49 -0400)] 
- add some more rules to make sure all tests run if DBs are available

11 years agofix some mysqlconnector failures
Mike Bayer [Mon, 24 Mar 2014 16:12:26 +0000 (12:12 -0400)] 
fix some mysqlconnector failures

11 years ago- fix the uuid routine here to not run out of uuids
Mike Bayer [Mon, 24 Mar 2014 15:57:38 +0000 (11:57 -0400)] 
- fix the uuid routine here to not run out of uuids

11 years ago- fix some doctest failures (though some remain, as it's not easy to get doctest
Mike Bayer [Mon, 24 Mar 2014 15:48:18 +0000 (11:48 -0400)] 
- fix some doctest failures (though some remain, as it's not easy to get doctest
to accept things flexibly), fix #2999

11 years ago- rename __multiple__ to __backend__, and apply __backend__ to a large number of...
Mike Bayer [Mon, 24 Mar 2014 15:33:53 +0000 (11:33 -0400)] 
- rename __multiple__ to __backend__, and apply __backend__ to a large number of tests.
- move out logging tests from test_execute to test_logging

11 years ago- Added some new event mechanics for dialect-level events; the initial
Mike Bayer [Mon, 24 Mar 2014 14:22:39 +0000 (10:22 -0400)] 
- Added some new event mechanics for dialect-level events; the initial
implementation allows an event handler to redefine the specific mechanics
by which an arbitrary dialect invokes execute() or executemany() on a
DBAPI cursor.  The new events, at this point semi-public and experimental,
are in support of some upcoming transaction-related extensions.

11 years agotake out accidental PG dialect use here
Mike Bayer [Mon, 24 Mar 2014 14:09:07 +0000 (10:09 -0400)] 
take out accidental PG dialect use here

11 years agosome profile updates...
Mike Bayer [Mon, 24 Mar 2014 01:39:17 +0000 (21:39 -0400)] 
some profile updates...

11 years ago- Fixed regression from 0.8.3 as a result of :ticket:`2818`
Mike Bayer [Sat, 22 Mar 2014 23:55:00 +0000 (19:55 -0400)] 
- Fixed regression from 0.8.3 as a result of :ticket:`2818`
where :meth:`.Query.exists` wouldn't work on a query that only
had a :meth:`.Query.select_from` entry but no other entities.
re: #2818 fixes #2995

11 years ago- An event listener can now be associated with a :class:`.Engine`,
Mike Bayer [Sat, 22 Mar 2014 23:34:18 +0000 (19:34 -0400)] 
- An event listener can now be associated with a :class:`.Engine`,
after one or more :class:`.Connection` objects have been created
(such as by an orm :class:`.Session` or via explicit connect)
and the listener will pick up events from those connections.
Previously, performance concerns pushed the event transfer from
:class:`.Engine` to  :class:`.Connection` at init-time only, but
we've inlined a bunch of conditional checks to make this possible
without any additional function calls. fixes #2978

11 years agothere's no "assert_call_count" on mock
Mike Bayer [Sat, 22 Mar 2014 23:10:00 +0000 (19:10 -0400)] 
there's no "assert_call_count" on mock

11 years ago- restore the old behavior of the connection pool replacing itself just
Mike Bayer [Sat, 22 Mar 2014 23:02:37 +0000 (19:02 -0400)] 
- restore the old behavior of the connection pool replacing itself just
within userland engine.dispose(); as some SQLA tests already failed when the replace step
was removed, due to those conns still being referenced, it's likely this will
create surprises for all those users that incorrectly use dispose()
and it's not really worth dealing with.  This doesn't affect the change
we made for ref: #2985.

11 years ago- Fixed a few errant ``u''`` strings that would prevent tests from passing
Mike Bayer [Sat, 22 Mar 2014 22:48:59 +0000 (18:48 -0400)] 
- Fixed a few errant ``u''`` strings that would prevent tests from passing
in Py3.2.  Patch courtesy Arfrever Frehtes Taifersar Arahesis. fixes #2980

11 years ago- A major improvement made to the mechanics by which the :class:`.Engine`
Mike Bayer [Sat, 22 Mar 2014 22:45:39 +0000 (18:45 -0400)] 
- A major improvement made to the mechanics by which the :class:`.Engine`
recycles the connection pool when a "disconnect" condition is detected;
instead of discarding the pool and explicitly closing out connections,
the pool is retained and a "generational" timestamp is updated to
reflect the current time, thereby causing all existing connections
to be recycled when they are next checked out.   This greatly simplifies
the recycle process, removes the need for "waking up" connect attempts
waiting on the old pool and eliminates the race condition that many
immediately-discarded "pool" objects could be created during the
recycle operation. fixes #2985

11 years ago- Added new datatype :class:`.oracle.DATE`, which is a subclass of
Mike Bayer [Sat, 22 Mar 2014 22:22:17 +0000 (18:22 -0400)] 
- Added new datatype :class:`.oracle.DATE`, which is a subclass of
:class:`.DateTime`.  As Oracle has no "datetime" type per se,
it instead has only ``DATE``, it is appropriate here that the
``DATE`` type as present in the Oracle dialect be an instance of
:class:`.DateTime`.  This issue doesn't change anything as far as
the behavior of the type, as data conversion is handled by the
DBAPI in any case, however the improved subclass layout will help
the use cases of inspecting types for cross-database compatibility.
Also removed uppercase ``DATETIME`` from the Oracle dialect as this
type isn't functional in that context.  fixes #2987

11 years ago- we aren't supporting py2.5 so just simplify this import for platform, re: #2986
Mike Bayer [Sat, 22 Mar 2014 21:49:35 +0000 (17:49 -0400)] 
- we aren't supporting py2.5 so just simplify this import for platform, re: #2986

11 years ago- Adjusted ``setup.py`` file to support the possible future
Mike Bayer [Sat, 22 Mar 2014 21:31:50 +0000 (17:31 -0400)] 
- Adjusted ``setup.py`` file to support the possible future
removal of the ``setuptools.Feature`` extension from setuptools.
If this keyword isn't present, the setup will still succeed
with setuptools rather than falling back to distutils.  C extension
building can be disabled now also by setting the
DISABLE_SQLALCHEMY_CEXT environment variable.  This variable works
whether or not setuptools is even available. fixes #2986
- using platform.python_implementation() in setup.py to detect CPython.
I've tested this function on OSX and linux on Python 2.6 through 3.4,
including 3.1, 3.2, 3.3.
Unfortunately, on OSX + 3.2 only, it seems to segfault.  I've tried
installing 3.2.5 from the python.org .dmg, building it from source,
and also blew away the whole 3.2 directory, something seems to be wrong
with the "platform" module on that platform only, and there's also no
issue on bugs.python.org; however, I'm going with
it anyway. If someone is using 3.2 on OSX they really should be upgrading.

11 years agochangelog to fix #2988
Mike Bayer [Sat, 22 Mar 2014 20:36:06 +0000 (16:36 -0400)] 
changelog to fix #2988

11 years agoMerge branch 'fix_table_registration' of https://github.com/malor/sqlalchemy into t
Mike Bayer [Sat, 22 Mar 2014 20:34:51 +0000 (16:34 -0400)] 
Merge branch 'fix_table_registration' of https://github.com/malor/sqlalchemy into t

11 years agoMerge pull request #81 from tony/patch-2
mike bayer [Fri, 21 Mar 2014 13:59:23 +0000 (09:59 -0400)] 
Merge pull request #81 from tony/patch-2

Fix tag typo in changelog_09

11 years agoFix tag typo in changelog_09
Tony Narlock [Fri, 21 Mar 2014 13:42:37 +0000 (08:42 -0500)] 
Fix tag typo in changelog_09

11 years ago- reword the paragraph which talks about web framework integration for sessions:
Mike Bayer [Fri, 21 Mar 2014 02:46:23 +0000 (22:46 -0400)] 
- reword the paragraph which talks about web framework integration for sessions:

1. fix the typo in the paragraph, fixes #2998
2. as zope-sqlalchemy only provides transaction integration and not session scoping,
dial back the language here as people are probably using scoped_session with pyramid anyway
3. as I'm going to again start recommending people don't cling to flask-sqlalchemy so hard,
take out the word "strongly" from the recommendation.
4. as flask is the only framework I can think of that actually has an explicit SQLAlchemy
layer that handles setting up scoped_session, take out the word "most", now it's "some web frameworks"
(by which it means "only flask...and flask-sqlalchemy is probably not worth using anyway")

11 years ago- The :meth:`.ConnectionEvents.after_cursor_execute` event is now
Mike Bayer [Wed, 19 Mar 2014 17:03:44 +0000 (13:03 -0400)] 
- The :meth:`.ConnectionEvents.after_cursor_execute` event is now
emitted for the "_cursor_execute()" method of :class:`.Connection`;
this is the "quick" executor that is used for things like
when a sequence is executed ahead of an INSERT statement, as well as
for dialect startup checks like unicode returns, charset, etc.
the :meth:`.ConnectionEvents.before_cursor_execute` event was already
invoked here.  The "executemany" flag is now always set to False
here, as this event always corresponds to a single execution.
Previously the flag could be True if we were acting on behalf of
an executemany INSERT statement.

11 years agofix assertion
Mike Bayer [Wed, 19 Mar 2014 15:47:58 +0000 (11:47 -0400)] 
fix assertion

11 years ago- Fixed bug in mutable extension as well as
Mike Bayer [Wed, 19 Mar 2014 15:09:38 +0000 (11:09 -0400)] 
- Fixed bug in mutable extension as well as
:func:`.attributes.flag_modified` where the change event would not be
propagated if the attribute had been reassigned to itself.
fixes #2997

11 years agoMerge branch 'ca/dev/add_is_and_isnot_to_tutorial' of https://github.com/charlax...
Mike Bayer [Mon, 17 Mar 2014 21:27:21 +0000 (17:27 -0400)] 
Merge branch 'ca/dev/add_is_and_isnot_to_tutorial' of https://github.com/charlax/sqlalchemy

11 years ago- Improved an error message which would occur if a query() were made
Mike Bayer [Mon, 17 Mar 2014 20:25:51 +0000 (16:25 -0400)] 
- Improved an error message which would occur if a query() were made
against a non-selectable, such as a :func:`.literal_column`, and then
an attempt was made to use :meth:`.Query.join` such that the "left"
side would be determined as ``None`` and then fail.  This condition
is now detected explicitly.

11 years agotypo
Mike Bayer [Sun, 16 Mar 2014 18:51:06 +0000 (14:51 -0400)] 
typo

11 years ago- Added support for the not-quite-yet-documented ``insert=True``
Mike Bayer [Sun, 16 Mar 2014 18:50:55 +0000 (14:50 -0400)] 
- Added support for the not-quite-yet-documented ``insert=True``
flag for :func:`.event.listen` to work with mapper / instance events.

11 years agoAdd is_ and isnot filter to the tutorial
Charles-Axel Dein [Sat, 15 Mar 2014 00:40:04 +0000 (17:40 -0700)] 
Add is_ and isnot filter to the tutorial

Most linter complain when comparing with None.

11 years ago- fairly epic rework of the cascade documentation
Mike Bayer [Sat, 15 Mar 2014 19:44:29 +0000 (15:44 -0400)] 
- fairly epic rework of the cascade documentation

11 years ago- correct this to make the intention clear
Mike Bayer [Fri, 14 Mar 2014 00:14:23 +0000 (20:14 -0400)] 
- correct this to make the intention clear

11 years ago- Added support for literal rendering of boolean values, e.g.
Mike Bayer [Fri, 14 Mar 2014 00:03:48 +0000 (20:03 -0400)] 
- Added support for literal rendering of boolean values, e.g.
"true" / "false" or "1" / "0".
- added Boolean tests to the test suite

11 years ago- move some requirements up to the testing module to better support running
Mike Bayer [Thu, 13 Mar 2014 23:59:10 +0000 (19:59 -0400)] 
- move some requirements up to the testing module to better support running
SQLA internal tests outside; plus things like savepoints, twophase

11 years agocomment
Mike Bayer [Thu, 13 Mar 2014 23:18:58 +0000 (19:18 -0400)] 
comment

11 years ago- add a suite test for underscore as initial char
Mike Bayer [Thu, 13 Mar 2014 23:05:22 +0000 (19:05 -0400)] 
- add a suite test for underscore as initial char

11 years ago- add more support for suite tests, moving some tests from test_query out to suite
Mike Bayer [Thu, 13 Mar 2014 22:54:56 +0000 (18:54 -0400)] 
- add more support for suite tests, moving some tests from test_query out to suite
and adding some more requirements

11 years agoRemove tables from metadata when autoload fails
Roman Podoliaka [Tue, 11 Mar 2014 00:34:42 +0000 (17:34 -0700)] 
Remove tables from metadata when autoload fails

If autoloading of a table fails, don't register it in a metadata
instance. It seems that the original behaviour was accidentally
changed in f6198d9abf453182f4b111e0579a7a4ef1614e79, restore it.

Closes issue #2988

11 years ago- Added a new feature :func:`.schema.conv`, the purpose of which is to
Mike Bayer [Wed, 12 Mar 2014 21:33:03 +0000 (17:33 -0400)] 
- Added a new feature :func:`.schema.conv`, the purpose of which is to
mark a constraint name as already having had a naming convention applied.
This token will be used by Alembic migrations as of Alembic 0.6.4
in order to render constraints in migration scripts with names marked
as already having been subject to a naming convention.
re: #2991

11 years ago:paramref:`.MetaData.naming_convention` feature will now also
Mike Bayer [Wed, 12 Mar 2014 19:09:48 +0000 (15:09 -0400)] 
:paramref:`.MetaData.naming_convention` feature will now also
apply to :class:`.CheckConstraint` objects that are associated
directly with a :class:`.Column` instead of just on the
:class:`.Table`.