summaryrefslogtreecommitdiff
path: root/test/base
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed regression where using a ``functools.partial()`` with the eventMike Bayer2014-01-042-1/+50
| | | | | | | | | | | system would cause a recursion overflow due to usage of inspect.getargspec() on it in order to detect a legacy calling signature for certain events, and apparently there's no way to do this with a partial object. Instead we skip the legacy check and assume the modern style; the check itself now only occurs for the SessionEvents.after_bulk_update and SessionEvents.after_bulk_delete events. Those two events will require the new signature style if assigned to a "partial" event listener. [ticket:2905]
* - Improvements to the system by which SQL types generate withinMike Bayer2013-12-181-0/+49
| | | | | | | | ``__repr__()``, particularly with regards to the MySQL integer/numeric/ character types which feature a wide variety of keyword arguments. The ``__repr__()`` is important for use with Alembic autogenerate for when Python code is rendered in a migration script. [ticket:2893]
* - add support for removal of instance methods as event listeners, takingMike Bayer2013-10-011-0/+26
| | | | into account the id() of the function itself and self, [ticket:2832]
* - add WeakSequence.append()Mike Bayer2013-08-181-3/+33
| | | | - fix and test weakref cleanout for WeakSequence, [ticket:2794]
* - Removal of event listeners is now implemented. The feature isMike Bayer2013-07-261-24/+178
| | | | | | | | | | | | | | | | provided via the :func:`.event.remove` function. [ticket:2268] - reorganization of event.py module into a package; with the addition of the docstring work as well as the new registry for removal, there's a lot more code now. the package separates concerns and provides a top-level doc for each subsection of functionality - the remove feature works by providing the EventKey object which associates the user-provided arguments to listen() with a global, weak-referencing registry. This registry stores a collection of _ListenerCollection and _DispatchDescriptor objects associated with each set of arguments, as well as the wrapped function which was applied to that collection. The EventKey can then be recreated for a removal, all the _ListenerCollection and _DispatchDescriptor objects are located, and the correct wrapped function is removed from each one.
* - create a new system where we can decorate an event methodMike Bayer2013-07-081-0/+215
| | | | | | | | | | | | | | | | with @_legacy_signature, will inspect incoming listener functions to see if they match an older signature, will wrap into a newer sig - add an event listen argument named=True, will send all args as kw args so that event listeners can be written with **kw, any combination of names - add a doc system to events that writes out the various calling styles for a given event, produces deprecation messages automatically. a little concerned that it's a bit verbose but will look at it up on RTD for awhile to get a feel. - change the calling signature for bulk update/delete events - we have the BulkUD object right there, and there's at least six or seven things people might want to see, so just send the whole BulkUD in [ticket:2775]
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-301-69/+67
| | | | | | | | | | | | actual mock objects from the mock library. I'd like to use mock for new tests so we might as well use it in obvious places. - use unittest.mock in py3.3 - changelog - add a note to README.unittests - add tests_require in setup.py - have tests import from sqlalchemy.testing.mock - apply usage of mock to one of the event tests. we can be using this approach all over the place.
* remove all remaining start/end py2k/py3k blocksMike Bayer2013-06-072-56/+40
|
* merge defaultMike Bayer2013-05-231-2/+22
|\
| * Fixed a bug where the routine to detect the correct kwargsMike Bayer2013-05-231-2/+22
| | | | | | | | | | | | being sent to :func:`.create_engine` would fail in some cases, such as with the Sybase dialect. [ticket:2732]
* | baseMike Bayer2013-05-041-8/+6
| |
* | - the raw 2to3 runMike Bayer2013-04-274-99/+101
|/ | | | - went through examples/ and cleaned out excess list() calls
* - add workaround for sqlite memusage tests, so no longer need to count to ↵Mike Bayer2013-01-121-1/+27
| | | | | | | | | | | | | 220/skip tests - Fixed potential memory leak which could occur if an arbitrary number of :class:`.sessionmaker` objects were created. The anonymous subclass created by the sessionmaker, when dereferenced, would not be garbage collected due to remaining class-level references from the event package. This issue also applies to any custom system that made use of ad-hoc subclasses in conjunction with an event dispatcher. Also in 0.7.10. [ticket:2650]
* initializing _labels to an empty list so that the other methods don't throw ↵Diana Clarke2012-11-171-21/+12
| | | | exceptions in the None labels case, but rather return (), [], or {}. this is not backwards compatible, but doubt anyone is relying on those exceptions #2601
* adding _fields, _asdict() to KeyedTuple #2601Diana Clarke2012-11-171-4/+33
|
* adding tests for KeyedTuple, pep8 passDiana Clarke2012-11-171-72/+221
|
* oops! python 3 doesn't do the rich comparison cmp thingDiana Clarke2012-11-141-8/+13
|
* __sub__ was declared twice, just increasing test coverage before I change ↵Diana Clarke2012-11-131-17/+414
| | | | anything
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-275-13/+13
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* - repair bool() for instance level event listener where events are ↵Mike Bayer2012-09-201-0/+7
| | | | classlevel, continuing [ticket:2516]
* - [feature] The before_cursor_execute eventMike Bayer2012-08-231-6/+220
| | | | | | | | | fires off for so-called "_cursor_execute" events, which are usually special-case executions of primary-key bound sequences and default-generation SQL phrases that invoke separately when RETURNING is not used with INSERT. [ticket:2459]
* -whitespace bonanza, contdMike Bayer2012-07-284-24/+24
|
* - express most of the orm.util functions in terms of the inspection systemMike Bayer2012-07-161-3/+12
| | | | | | | | | | | | | | - modify inspection system: 1. raise a new exception for any case where the inspection context can't be returned. this supersedes the "not mapped" errors. 2. don't configure mappers on a mapper inspection. this allows the inspectors to be used during mapper config time. instead, the mapper configures on "with_polymorphic_selectable" now, which is needed for all queries - add a bunch of new "is_XYZ" attributes to inspectors - finish making the name change of "compile" -> "configure", for some reason this was only done partially
* remove WeakIdentityMapping testsMike Bayer2012-06-241-191/+0
|
* - [feature] Dramatic improvement in memoryMike Bayer2012-06-201-29/+50
| | | | | | | | usage of the event system; instance-level collections are no longer created for a particular type of event until instance-level listeners are established for that event. [ticket:2516] Also in 0.7.9.
* fix 2.5 failureMike Bayer2012-04-241-1/+1
|
* merge patch for [ticket:2208]. This still needs documentation.Mike Bayer2012-04-231-0/+62
|\
| * begin implementing inspection system for #2208Mike Bayer2012-04-031-0/+62
| |
* | - merge attribute flag overhaul for [ticket:2358]Mike Bayer2012-04-231-0/+21
|/
* - [bug] Fixed event registration bugMike Bayer2012-03-071-0/+104
| | | | | | | | which would primarily show up as events not being registered with sessionmaker() instances created after the event was associated with the Session class. [ticket:2424]
* - [feature] IdentitySet supports the - operatorMike Bayer2011-12-061-0/+13
| | | | | as the same as difference(), handy when dealing with Session.dirty etc. [ticket:2301]
* - Fixed bug in unit of work whereby detection ofMike Bayer2011-09-221-2/+28
| | | | | | | | | | "cycles" among classes in highly interlinked patterns would not produce a deterministic result; thereby sometimes missing some nodes that should be considered cycles and causing further issues down the road. Note this bug is in 0.6 also; not backported at the moment. [ticket:2282]
* who knew we already had a test for thatMike Bayer2011-08-221-12/+19
|
* - Added an improved repr() to TypeEngine objectsMike Bayer2011-07-041-0/+87
| | | | | | that will only display constructor args which are positional or kwargs that deviate from the default. [ticket:2209]
* - Added @event.listens_for() decorator, givenMike Bayer2011-04-021-44/+68
| | | | | | target + event name, applies the decorated function as a listener. [ticket:2106] - remove usage of globals from test.base.test_events
* - move all the comments that got shoved below the fixture grabs back upMike Bayer2011-03-272-0/+2
|
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-274-30/+30
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - alex gaynor's latest batch of pypy test fixesMike Bayer2011-03-161-1/+3
|
* Removing unused symbol importTaavi Burns2011-03-151-1/+1
|
* - establish an "insert" option for events to control ordering if needed (not ↵Mike Bayer2011-02-251-0/+19
| | | | | | needed yet tho) - render foreign key constraints in the order in which they were cerated
* - Non-DBAPI errors which occur in the scope of an `execute()`Mike Bayer2011-02-091-16/+15
| | | | | | | | call are now wrapped in sqlalchemy.exc.StatementError, and the text of the SQL statement and repr() of params is included. This makes it easier to identify statement executions which fail before the DBAPI becomes involved. [ticket:2015]
* rename 'frozendict' to 'immutabledict', since 'frozen' implies hashabilityMike Bayer2011-01-201-1/+1
| | | | | like frozenset which isn't really the purpose of 'immutabledict' (could be someday, in which case, we'd change the name back :) )
* - whitespace removal bonanzaMike Bayer2011-01-022-65/+65
|
* - removes the "on_" prefix.Mike Bayer2010-12-301-46/+46
|
* - factor out the dependency on the "on_" nameMike Bayer2010-12-301-1/+1
|
* - they don't want "on_". First step, change the naming convention on EventsMike Bayer2010-12-301-3/+3
| | | | so that non-events are just _name.
* - merge default tipMike Bayer2010-12-051-2/+0
|\
| * - Fixed operator precedence rules for multipleMike Bayer2010-11-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | chains of a single non-associative operator. I.e. "x - (y - z)" will compile as "x - (y - z)" and not "x - y - z". Also works with labels, i.e. "x - (y - z).label('foo')" [ticket:1984] - Single element tuple expressions inside an IN clause parenthesize correctly, also from [ticket:1984], added tests for PG - re-fix again importlater, [ticket:1983]
* | - move topological, queue into utilMike Bayer2010-12-051-2/+1
| | | | | | | | | | - move function_named into test.lib.util - use @decorator for all decorators in test/
* | new calling style: event.listen(target, identifier, fn)Mike Bayer2010-12-011-16/+16
| |