Commit Graph

632 Commits

Author SHA1 Message Date
Mike Bayer e85871c612 merge tip 2010-11-14 17:53:57 -05:00
Mike Bayer 4ac3240679 - SessionEvents is on board and the event model is done, can start building 0.7 tip soon 2010-11-14 17:51:54 -05:00
Mike Bayer 7513b46730 - pool event tests that don't depend on deprecated listener system,
attempting "test just one thing" style
- reorganize fixtures to come primarily from the base test class
2010-11-14 13:59:03 -05:00
Mike Bayer 588f7402c5 - The 'info' attribute of Column is copied during
Column.copy(), i.e. as occurs when using columns
in declarative mixins.  [ticket:1967]
2010-11-14 12:42:34 -05:00
Mike Bayer 6d630990dd merge tip 2010-11-13 15:53:32 -05:00
Mike Bayer 3564ea86e7 - move deprecated interfaces down to bottom of TOC, update verbiage
- more docs for engine, pool, DDL events
- update DDL sequences documentation to use events
- update DDL() docstring to refer to execute_if()
- document parameters for DDLElement.execute_if()
- add retval=True flag to Engine.on_before_execute(), on_before_cursor_execute().
wrap the function if retval=False, check for appropriate usage of the flag, add
tests.
- remove ScopedSession.mapper and tests entirely
- remove ExtensionCarrier and tests
- change remaining tests that use MapperExtension to use MapperEvents
2010-11-10 19:00:28 -05:00
Mike Bayer a9b270a3ed - basic docs
- poolevent accepts Engine as a target
2010-11-09 17:35:24 -05:00
Mike Bayer e1a30715d2 - and fix everything from the last checkin that breaks on py 2.4, 2.5 2010-11-09 11:46:52 -05:00
Mike Bayer a41c50ad63 - Implemented sequence check capability for the C
version of RowProxy, as well as 2.7 style
"collections.Sequence" registration for RowProxy.
[ticket:1871]
2010-11-09 11:40:23 -05:00
Mike Bayer 4761b66cc1 ding 2010-11-07 12:54:54 -05:00
Mike Bayer 4e2c0f10cd - merge tip 2010-11-06 11:49:45 -04:00
Mike Bayer 35508a30d7 - engine_from_config() now accepts 'debug' for
'echo', 'echo_pool', 'force' for 'convert_unicode',
boolean values for 'use_native_unicode'.
[ticket:1899]
2010-10-15 11:43:59 -04:00
Mike Bayer 15442ed1f4 - added "views=True" option to metadata.reflect(),
will add the list of available views to those
being reflected.  [ticket:1936]
2010-10-02 18:05:19 -04:00
Mike Bayer 25c08f6def merge tip 2010-10-02 11:00:22 -04:00
Mike Bayer 761b4f29e2 - *Major* cleanup / modernization of the Informix
dialect for 0.6, courtesy Florian Apolloner.
[ticket:1906]
2010-10-01 21:26:05 -04:00
Mike Bayer 611fb77186 - use "key in dict" rather than KeyError if the usual case
is that the key is not present.
- don't need to uniquify Index schemes, just don't copy Indexes
that were known to be generated from the index=True flag
- user facing changes go in CHANGES
- Table.c allows string lookup
2010-09-18 11:40:25 -04:00
Chris Withers f08ea3c113 d.uh 2010-09-17 12:26:49 +01:00
Chris Withers 4bcb4c98f9 add warning about dodgy use of tometadata 2010-09-16 21:10:17 +01:00
Chris Withers 27cf184b50 tometadata now copies indexes as well 2010-09-16 20:58:15 +01:00
Chris Withers fd6c85cf7f make sure kwargs are copied by tometadata 2010-09-16 20:03:18 +01:00
Mike Bayer 3d389b19b7 - reorganization
- attrbutes.py splits into attribtes.py and instrumentation.py
- all the various Event subclasses go into events.py modules
- some ideas for orm events
- move *Extension out to deprecated_interfaces
2010-09-14 20:43:48 -04:00
Mike Bayer 33b70a1f02 merge from tip 2010-09-03 17:57:20 -04:00
Mike Bayer 6e9d62b46c - refinements to DDL events, including new execute_if(), got pickling to work 2010-09-03 11:53:54 -04:00
Mike Bayer 3a86cea34a doh, forgot about ddl events. need some work with the pickling. 2010-08-31 21:46:14 -04:00
Mike Bayer 1149197a36 - moved out to on_before_execute, on_after_execute. not much option here,
need both forms, the wrapping thing is just silly
- fixed the listen() to not re-wrap continuously.
2010-08-29 11:22:46 -04:00
Mike Bayer a635750213 going back to the simple way, plus trying to make the engine thing simpler, and....doesn't work.
on_before_execute and on_after_execute really not appealing here.   might have to just go back to
what it was the other day.
2010-08-28 11:29:07 -04:00
Mike Bayer 63c1800c56 - its probably worthwhile to make the primary listen() interface humane, i.e.:
def listen(target, args)

so here we provide a "wrapper" approach that allows this, and it is
basically pass-by-value.  a pass-by-value event *may* support rewriting
some of the args in the dictionary.

 the current
listen will become "listen_raw" since it saves about 100% overhead versus
the coercion to dict, and will be used internally, and will remain
pass-by-reference.

proxyconnection probably will rely upon the newer style of pass-by-value
for "rewrite the args" types of calls.
2010-08-27 20:17:37 -04:00
Mike Bayer 7d3a916fc3 - replaced all self.__connection.is_valid with
"safe" self._connection_is_valid.
- Fixed bug in Connection whereby if a "disconnect"
event occurred in the "initialize" phase of the
first connection pool connect, an AttributeError
would be raised when the Connection would attempt
to invalidate the DBAPI connection.  [ticket:1894]
- Connection.invalidate() can be called more than
once and subsequent calls do nothing.
2010-08-26 01:33:51 -04:00
Mike Bayer 87293d5b96 - reorganize events into cls->dispatch, which is an instance of _Dispatch.
cut down on extraneous stuff, cleanup
The Event class never gets instantiated and its methods stay the same
so that sphinx can get to it.
2010-08-10 00:19:50 -04:00
Mike Bayer f665ae7464 this reorganizes things so the EventDescriptor and all is on a "Dispatch" object.
this leaves the original Event class alone so sphinx documents it.

this is all a mess right now but the pool/engine tests are working fully
at the moment so wanted to mark a working version.
2010-08-09 23:34:23 -04:00
Mike Bayer a9288ca5bd working with how this will be documented and having some probs with sphinx 2010-08-09 20:49:08 -04:00
Mike Bayer bb5a85feca merge tip 2010-08-08 17:50:44 -04:00
Mike Bayer f8fb593132 mark this as intermittent crashes on the buildbot - reason for failures not clear 2010-08-08 11:41:26 -04:00
Mike Bayer 83c9b0dcdc - Fixed bug whereby replacing composite foreign key
columns in a reflected table would cause an attempt
to remove the reflected constraint from the table
a second time, raising a KeyError.  [ticket:1865]
- fixed test of error message now that we've improved it
(didn't know that msg had an assertion)
2010-08-04 21:30:53 -04:00
Mike Bayer 9cbfe389f7 - pretty much all tests passing, maybe some callcounts are off
- test suite adjusted to use engine/pool events and not listeners
- deprecation warnings
2010-07-25 13:08:39 -04:00
Mike Bayer a6b62cc3fe Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual intervention 2010-07-11 13:15:51 -04:00
Mike Bayer a8e53a4f31 - Column.copy() takes along the "unique" attribute
among others, fixes [ticket:1829] regarding declarative
mixins
2010-06-15 17:56:17 -04:00
Mike Bayer 27781263d9 - Inspector hits bind.connect() when invoked to ensure
initialize has been called.  the internal name ".conn"
is changed to ".bind", since that's what it is.
2010-06-11 11:38:06 -04:00
Mike Bayer 9bab63b693 - Pool classes will reuse the same "pool_logging_name" setting
after a dispose() occurs.

- Engine gains an "execution_options" argument and
update_execution_options() method, which will apply to
all connections generated by this engine.

- Added more aggressive caching to the mapper's usage of
UPDATE, INSERT, and DELETE expressions.  Assuming the
statement has no per-object SQL expressions attached,
the expression objects are cached by the mapper after
the first create, and their compiled form is stored
persistently in a cache dictionary for the duration of
the related Engine.

- change #3 required change #1 so that we could test
a set of mappers operating over the course of many engines without
memory usage increase.
2010-05-30 20:24:08 -04:00
Mike Bayer 14d5232652 - Added table.add_is_dependent_on(othertable), allows manual
placement of dependency rules between two Table objects
for use within create_all(), drop_all(), sorted_tables.
[ticket:1801]
2010-05-13 15:53:18 -04:00
Mike Bayer 41d2e24c4a merge tip 2010-05-03 19:32:34 -04:00
Mike Bayer 74a8723df3 - Fixed bug in connection pool cursor wrapper whereby if a
cursor threw an exception on close(), the logging of the
message would fail.  [ticket:1786]
2010-04-28 16:16:56 -04:00
Mike Bayer ff19492160 - Fixed "table" argument on constructor of ForeginKeyConstraint
[ticket:1571]
2010-04-26 00:14:21 -04:00
Mike Bayer b437bb2132 some more metadata cleanup since --dropall isnt specified on the buildbot 2010-04-16 15:24:56 -04:00
Mike Bayer 23f8c6c241 - Table.create() and Table.drop() no longer apply metadata-
level create/drop events.  [ticket:1771]
2010-04-16 13:08:45 -04:00
Mike Bayer 82d194c9a6 - Added get_pk_constraint() to reflection.Inspector, similar
to get_primary_keys() except returns a dict that includes the
name of the constraint, for supported backends (PG so far).
[ticket:1769]
- Postgresql reflects the name of primary key constraints,
if one exists.  [ticket:1769]
2010-04-15 19:05:41 -04:00
Mike Bayer 2a2890cae3 merge tip 2010-04-13 13:31:41 -04:00
Mike Bayer 731ad9b0b9 further testing reveals that cursor.rowcount is only called with update/delete and DDL,
and also that FB's cursor.rowcount is a little expensive, but not dramatically.
added a test to ensure cursor.rowcount is only called on update/delete.
the current default for firebird enable_rowcount is now True, leaving all the
options to turn it off etc..
2010-04-12 20:20:50 -04:00
Mike Bayer fc157ed8c5 - added a test for the solution in [ticket:1757].
- this does imply that a lot of the "test the RowProxy" tests in sql/test_query might be better off in engine/test_execute or perhaps engine/test_resultproxy
2010-04-11 15:37:20 -04:00
Mike Bayer cf9cac34ac merge default 2010-04-10 19:45:34 -04:00