Commit Graph

346 Commits

Author SHA1 Message Date
Mike Bayer 8df4dc4385 - Threadlocal engine methods rollback(), commit(),
prepare() won't raise if no transaction is in progress;
this was a regression introduced in 0.6.  [ticket:1998]
2010-12-08 13:46:29 -05:00
Mike Bayer 987828194e oracle fixes 2010-12-06 17:05:32 -05:00
Mike Bayer d30678d18d new calling style: event.listen(target, identifier, fn) 2010-12-01 14:10:11 -05:00
Mike Bayer 71083b6977 combine test/engine/test_metadata.py and test/sql/test_columns.py into new
test/sql/test_metadata.py, [ticket:1970]
2010-11-28 15:34:41 -05:00
Mike Bayer 58b2939433 - sqlalchemy.test and nose plugin moves back to being entirely
outside of "sqlalchemy" and under "test/".

Rationale:

- coverage plugin works without issue, without need for an awkward
additional package install
- command line for "nosetests" isn't polluted with SQLAlchemy options

[ticket:1949]
2010-11-28 14:19:44 -05:00
Mike Bayer 134d78c8b4 - post_process_text() is called for DDL() constructs, in particular allowing
'%' with only one level of escaping.  Note this is backwards-incompatible
with previously triple-escaped sections.  [ticket:1897]
2010-11-28 11:52:24 -05:00
Mike Bayer 45cdb17ef0 - fixes for PG, mysql, twophase
- added "pool_events" arg to create_engine(), "events" to pool, allowing
establishment of listeners which fire before those of the dialect
2010-11-20 17:57:30 -05:00
Mike Bayer ca2d85540f - logging has been overhauled such that engines no longer need to encode the
"hex id" string in their logging name in order to maintain separate loggers
per engine. thanks to Vinay Sajip for assistance.  merge of [ticket:1926]
2010-11-20 16:28:39 -05:00
Mike Bayer e3ca3a773f - merge FromObj cleanup, immutable .c attribute patch, [ticket:1917] 2010-11-20 15:35:43 -05:00
Mike Bayer e187cc538d - merge metadata/schema/declarative branch, [ticket:1893] 2010-11-20 15:30:12 -05:00
Mike Bayer 98674959d2 - initial patch for [ticket:1926] 2010-11-17 17:54:52 -05:00
Mike Bayer 041a329e69 - adapt initial patch from [ticket:1917] to current tip
- raise TypeError for immutability
2010-11-16 15:53:14 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer 166a8a0b73 [ticket:1893] implementation 2010-11-15 19:05:48 -05:00
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