9
:released: Tue Sep 05 2006
15
cleanup on connection methods + documentation. custom DBAPI
16
arguments specified in query string, 'connect_args' argument
17
to 'create_engine', or custom creation function via 'creator'
18
function to 'create_engine'.
24
added "recycle" argument to Pool, is "pool_recycle" on create_engine,
25
defaults to 3600 seconds; connections after this age will be closed and
26
replaced with a new one, to handle db's that automatically close
33
changed "invalidate" semantics with pooled connection; will
34
instruct the underlying connection record to reconnect the next
35
time its called. "invalidate" will also automatically be called
36
if any error is thrown in the underlying call to connection.cursor().
37
this will hopefully allow the connection pool to reconnect to a
38
database that had been stopped and started without restarting
39
the connecting application
45
eesh ! the tutorial doctest was broken for quite some time.
51
add_property() method on mapper does a "compile all mappers"
52
step in case the given property references a non-compiled mapper
53
(as it did in the case of the tutorial !)
59
check for pg sequence already existing before create
65
if a contextual session is established via MapperExtension.get_session
66
(as it is using the sessioncontext plugin, etc), a lazy load operation
67
will use that session by default if the parent object is not
68
persistent with a session already.
74
lazy loads will not fire off for an object that does not have a
75
database identity (why?
76
see http://www.sqlalchemy.org/trac/wiki/WhyDontForeignKeysLoadData)
82
unit-of-work does a better check for "orphaned" objects that are
83
part of a "delete-orphan" cascade, for certain conditions where the
84
parent isnt available to cascade from.
90
mappers can tell if one of their objects is an "orphan" based
91
on interactions with the attribute package. this check is based
92
on a status flag maintained for each relationship
93
when objects are attached and detached from each other.
99
it is now invalid to declare a self-referential relationship with
100
"delete-orphan" (as the abovementioned check would make them impossible
107
improved the check for objects being part of a session when the
108
unit of work seeks to flush() them as part of a relationship..
114
statement execution supports using the same BindParam
115
object more than once in an expression; simplified handling of positional
116
parameters. nice job by Bill Noon figuring out the basic idea.
122
postgres reflection moved to use pg_schema tables, can be overridden
123
with use_information_schema=True argument to create_engine.
129
added case_sensitive argument to MetaData, Table, Column, determines
130
itself automatically based on if a parent schemaitem has a non-None
131
setting for the flag, or if not, then whether the identifier name is all lower
132
case or not. when set to True, quoting is applied to identifiers with mixed or
133
uppercase identifiers. quoting is also applied automatically in all cases to
134
identifiers that are known to be reserved words or contain other non-standard
135
characters. various database dialects can override all of this behavior, but
136
currently they are all using the default behavior. tested with postgres, mysql,
137
sqlite, oracle. needs more testing with firebird, ms-sql. part of the ongoing
144
unit tests updated to run without any pysqlite installed; pool
145
test uses a mock DBAPI
151
urls support escaped characters in passwords
157
added limit/offset to UNION queries (though not yet in oracle)
163
added "timezone=True" flag to DateTime and Time types. postgres
164
so far will convert this to "TIME[STAMP] (WITH|WITHOUT) TIME ZONE",
165
so that control over timezone presence is more controllable (psycopg2
166
returns datetimes with tzinfo's if available, which can create confusion
167
against datetimes that dont).
173
fix to using query.count() with distinct, \**kwargs with SelectResults
180
deregister Table from MetaData when autoload fails;
186
import of py2.5s sqlite3
192
unicode fix for startswith()/endswith()
196
:released: Sat Aug 12 2006
202
quoting facilities set up so that database-specific quoting can be
203
turned on for individual table, schema, and column identifiers when
204
used in all queries/creates/drops. Enabled via "quote=True" in
205
Table or Column, as well as "quote_schema=True" in Table. Thanks to
206
Aaron Spike for the excellent efforts.
212
assignmapper was setting is_primary=True, causing all sorts of mayhem
213
by not raising an error when redundant mappers were set up, fixed
219
added allow_null_pks option to Mapper, allows rows where some
220
primary key columns are null (i.e. when mapping to outer joins etc)
226
modifcation to unitofwork to not maintain ordering within the
227
"new" list or within the UOWTask "objects" list; instead, new objects
228
are tagged with an ordering identifier as they are registered as new
229
with the session, and the INSERT statements are then sorted within the
230
mapper save_obj. the INSERT ordering has basically been pushed all
231
the way to the end of the flush cycle. that way the various sorts and
232
organizations occuring within UOWTask (particularly the circular task
233
sort) dont have to worry about maintaining order (which they werent anyway)
239
fixed reflection of foreign keys to autoload the referenced table
240
if it was not loaded already
246
- pass URL query string arguments to connect() function
252
- oracle boolean type
258
custom primary/secondary join conditions in a relation *will* be propagated
259
to backrefs by default. specifying a backref() will override this behavior.
265
better check for ambiguous join conditions in sql.Join; propagates to a
266
better error message in PropertyLoader (i.e. relation()/backref()) for when
267
the join condition can't be reasonably determined.
273
sqlite creates ForeignKeyConstraint objects properly upon table
280
adjustments to pool stemming from changes made for.
281
overflow counter should only be decremented if the connection actually
282
succeeded. added a test script to attempt testing this.
288
fixed mysql reflection of default values to be PassiveDefault
294
added reflected 'tinyint', 'mediumint' type to MS-SQL.
300
SingletonThreadPool has a size and does a cleanup pass, so that
301
only a given number of thread-local connections stay around (needed
302
for sqlite applications that dispose of threads en masse)
308
fixed small pickle bug(s) with lazy loaders
314
fixed possible error in mysql reflection where certain versions
315
return an array instead of string for SHOW CREATE TABLE call
321
fix to lazy loads when mapping to joins
327
all create()/drop() calls have a keyword argument of "connectable".
328
"engine" is deprecated.
334
fixed ms-sql connect() to work with adodbapi
340
added "nowait" flag to Select()
346
inheritance check uses issubclass() instead of direct __mro__ check
347
to make sure class A inherits from B, allowing mapper inheritance to more
348
flexibly correspond to class inheritance
354
SelectResults will use a subselect, when calling an aggregate (i.e.
355
max, min, etc.) on a SelectResults that has an ORDER BY clause
361
fixes to types so that database-specific types more easily used;
362
fixes to mysql text types to work with this methodology
368
some fixes to sqlite date type organization
374
added MSTinyInteger to MS-SQL
378
:released: Thu Jul 20 2006
384
big overhaul to schema to allow truly composite primary and foreign
385
key constraints, via new ForeignKeyConstraint and PrimaryKeyConstraint
387
Existing methods of primary/foreign key creation have not been changed
388
but use these new objects behind the scenes. table creation
389
and reflection is now more table oriented rather than column oriented.
395
overhaul to MapperExtension calling scheme, wasnt working very well
402
tweaks to ActiveMapper, supports self-referential relationships
408
slight rearrangement to objectstore (in activemapper/threadlocal)
409
so that the SessionContext is referenced by '.context' instead
410
of subclassed directly.
416
activemapper will use threadlocal's objectstore if the mod is
417
activated when activemapper is imported
423
small fix to URL regexp to allow filenames with '@' in them
429
fixes to Session expunge/update/etc...needs more cleanup.
435
select_table mappers *still* werent always compiling
441
fixed up Boolean datatype
447
added count()/count_by() to list of methods proxied by assignmapper;
448
this also adds them to activemapper
454
connection exceptions wrapped in DBAPIError
460
ActiveMapper now supports autoloading column definitions from the
461
database if you supply a __autoload__ = True attribute in your
462
mapping inner-class. Currently this does not support reflecting
469
deferred column load could screw up the connection status in
470
a flush() under some circumstances, this was fixed
476
expunge() was not working with cascade, fixed.
482
potential endless loop in cascading operations fixed.
488
added "synonym()" function, applied to properties to have a
489
propname the same as another, for the purposes of overriding props
490
and allowing the original propname to be accessible in select_by().
496
fix to typing in clause construction which specifically helps
497
type issues with polymorphic_union (CAST/ColumnClause propagates
498
its type to proxy columns)
504
mapper compilation work ongoing, someday it'll work....moved
505
around the initialization of MapperProperty objects to be after
506
all mappers are created to better handle circular compilations.
507
do_init() method is called on all properties now which are more
508
aware of their "inherited" status if so.
514
eager loads explicitly disallowed on self-referential relationships, or
515
relationships to an inheriting mapper (which is also self-referential)
521
reduced bind param size in query._get to appease the picky oracle
527
added 'checkfirst' argument to table.create()/table.drop(), as
528
well as table.exists()
534
some other ongoing fixes to inheritance
540
attribute/backref/orphan/history-tracking tweaks as usual...
544
:released: Sat Jul 08 2006
550
fixed endless loop bug in select_by(), if the traversal hit
551
two mappers that referenced each other
557
upgraded all unittests to insert './lib/' into sys.path,
558
working around new setuptools PYTHONPATH-killing behavior
564
further fixes with attributes/dependencies/etc....
570
improved error handling for when DynamicMetaData is not connected
576
MS-SQL support largely working (tested with pymssql)
582
ordering of UPDATE and DELETE statements within groups is now
583
in order of primary key values, for more deterministic ordering
589
after_insert/delete/update mapper extensions now called per object,
590
not per-object-per-table
596
further fixes/refactorings to mapper compilation
600
:released: Tue Jun 27 2006
606
try/except when the mapper sets init.__name__ on a mapped class,
613
fixed bug where threadlocal engine would still autocommit
614
despite a transaction in progress
620
lazy load and deferred load operations require the parent object
621
to be in a Session to do the operation; whereas before the operation
622
would just return a blank list or None, it now raises an exception.
628
Session.update() is slightly more lenient if the session to which
629
the given object was formerly attached to was garbage collected;
630
otherwise still requires you explicitly remove the instance from
631
the previous Session.
637
fixes to mapper compilation, checking for more error conditions
643
small fix to eager loading combined with ordering/limit/offset
649
utterly remarkable: added a single space between 'CREATE TABLE'
650
and '(<the rest of it>' since *thats how MySQL indicates a non-
651
reserved word tablename.....*
657
more fixes to inheritance, related to many-to-many relations
664
fixed bug when specifying explicit module to mysql dialect
670
when QueuePool times out it raises a TimeoutError instead of
671
erroneously making another connection
677
Queue.Queue usage in pool has been replaced with a locally
678
modified version (works in py2.3/2.4!) that uses a threading.RLock
679
for a mutex. this is to fix a reported case where a ConnectionFairy's
680
__del__() method got called within the Queue's get() method, which
681
then returns its connection to the Queue via the put() method,
682
causing a reentrant hang unless threading.RLock is used.
688
postgres will not place SERIAL keyword on a primary key column
689
if it has a foreign key constraint
695
cursor() method on ConnectionFairy allows db-specific extension
696
arguments to be propagated
702
lazy load bind params properly propagate column type
708
new MySQL types: MSEnum, MSTinyText, MSMediumText, MSLongText, etc.
709
more support for MS-specific length/precision params in numeric types
710
patch courtesy Mike Bernson
716
some fixes to connection pool invalidate()
720
:released: Sat Jun 17 2006
726
overhaul to mapper compilation to be deferred. this allows mappers
727
to be constructed in any order, and their relationships to each
728
other are compiled when the mappers are first used.
734
fixed a pretty big speed bottleneck in cascading behavior particularly
735
when backrefs were in use
741
the attribute instrumentation module has been completely rewritten; its
742
now a large degree simpler and clearer, slightly faster. the "history"
743
of an attribute is no longer micromanaged with each change and is
744
instead part of a "CommittedState" object created when the
745
instance is first loaded. HistoryArraySet is gone, the behavior of
746
list attributes is now more open ended (i.e. theyre not sets anymore).
752
py2.4 "set" construct used internally, falls back to sets.Set when
753
"set" not available/ordering is needed.
759
fix to transaction control, so that repeated rollback() calls
760
dont fail (was failing pretty badly when flush() would raise
761
an exception in a larger try/except transaction block)
767
"foreignkey" argument to relation() can also be a list. fixed
768
auto-foreignkey detection
774
fixed bug where tables with schema names werent getting indexed in
775
the MetaData object properly
781
fixed bug where Column with redefined "key" property wasnt getting
782
type conversion happening in the ResultProxy
788
fixed 'port' attribute of URL to be an integer if present
794
fixed old bug where if a many-to-many table mapped as "secondary"
795
had extra columns, delete operations didnt work
801
bugfixes for mapping against UNION queries
807
fixed incorrect exception class thrown when no DB driver present
813
added NonExistentTable exception thrown when reflecting a table
820
small fix to ActiveMapper regarding one-to-one backrefs, other
827
overridden constructor in mapped classes gets __name__ and
828
__doc__ from the original class
834
fixed small bug in selectresult.py regarding mapper extension
840
small tweak to cascade_mappers, not very strongly supported
841
function at the moment
847
some fixes to between(), column.between() to propagate typing
854
if an object fails to be constructed, is not added to the
861
CAST function has been made into its own clause object with
862
its own compilation function in ansicompiler; allows MySQL
863
to silently ignore most CAST calls since MySQL
864
seems to only support the standard CAST syntax with Date types.
865
MySQL-compatible CAST support for strings, ints, etc. a TODO
869
:released: Mon Jun 05 2006
875
big improvements to polymorphic inheritance behavior, enabling it
876
to work with adjacency list table structures
882
major fixes and refactorings to inheritance relationships overall,
889
fixed "echo_pool" flag on create_engine()
895
fix to docs, removed incorrect info that close() is unsafe to use
896
with threadlocal strategy (its totally safe !)
902
create_engine() can take URLs as string or unicode
908
firebird support partially completed;
909
thanks to James Ralston and Brad Clements for their efforts.
915
Oracle url translation was broken, fixed, will feed host/port/sid
916
into cx_oracle makedsn() if 'database' field is present, else uses
917
straight TNS name from the 'host' field
923
fix to using unicode criterion for query.get()/query.load()
929
count() function on selectables now uses table primary key or
930
first column instead of "1" for criterion, also uses label "rowcount"
937
got rudimental "mapping to multiple tables" functionality cleaned up,
938
more correctly documented
944
restored global_connect() function, attaches to a DynamicMetaData
945
instance called "default_metadata". leaving MetaData arg to Table
946
out will use the default metadata.
952
fixes to session cascade behavior, entity_name propigation
958
reorganized unittests into subdirectories
964
more fixes to threadlocal connection nesting patterns
968
:released: Mon May 29 2006
974
"pool" argument to create_engine() properly propagates
980
fixes to URL, raises exception if not parsed, does not pass blank
981
fields along to the DB connect string (a string such as
982
user:host@/db was breaking on postgres)
988
small fixes to Mapper when it inserts and tries to get
989
new primary key values back
995
rewrote half of TLEngine, the ComposedSQLEngine used with
996
'strategy="threadlocal"'. it now properly implements engine.begin()/
997
engine.commit(), which nest fully with connection.begin()/trans.commit().
998
added about six unittests.
1004
major "duh" in pool.Pool, forgot to put back the WeakValueDictionary.
1005
unittest which was supposed to check for this was also silently missing
1006
it. fixed unittest to ensure that ConnectionFairy properly falls out
1013
placeholder dispose() method added to SingletonThreadPool, doesnt
1020
rollback() is automatically called when an exception is raised,
1021
but only if theres no transaction in process (i.e. works more like
1028
fixed exception raise in sqlite if no sqlite module present
1034
added extra example detail for association object doc
1040
Connection adds checks for already being closed
1044
:released: Sat May 27 2006
1050
overhaul to Engine system so that what was formerly the SQLEngine
1051
is now a ComposedSQLEngine which consists of a variety of components,
1052
including a Dialect, ConnectionProvider, etc. This impacted all the
1053
db modules as well as Session and Mapper.
1059
create_engine now takes only RFC-1738-style strings:
1060
driver://user:password@host:port/database
1066
total rewrite of connection-scoping methodology, Connection objects
1067
can now execute clause elements directly, added explicit "close" as
1068
well as support throughout Engine/ORM to handle closing properly,
1069
no longer relying upon __del__ internally to return connections
1076
overhaul to Session interface and scoping. uses hibernate-style
1077
methods, including query(class), save(), save_or_update(), etc.
1078
no threadlocal scope is installed by default. Provides a binding
1079
interface to specific Engines and/or Connections so that underlying
1080
Schema objects do not need to be bound to an Engine. Added a basic
1081
SessionTransaction object that can simplistically aggregate transactions
1082
across multiple engines.
1088
overhaul to mapper's dependency and "cascade" behavior; dependency logic
1089
factored out of properties.py into a separate module "dependency.py".
1090
"cascade" behavior is now explicitly controllable, proper implementation
1091
of "delete", "delete-orphan", etc. dependency system can now determine at
1092
flush time if a child object has a parent or not so that it makes better
1093
decisions on how that child should be updated in the DB with regards to deletes.
1099
overhaul to Schema to build upon MetaData object instead of an Engine.
1100
Entire SQL/Schema system can be used with no Engines whatsoever, executed
1101
solely by an explicit Connection object. the "bound" methodlogy exists via the
1102
BoundMetaData for schema objects. ProxyEngine is generally not needed
1103
anymore and is replaced by DynamicMetaData.
1109
true polymorphic behavior implemented, fixes
1115
"oid" system has been totally moved into compile-time behavior;
1116
if they are used in an order_by where they are not available, the order_by
1117
doesnt get compiled, fixes
1123
overhaul to packaging; "mapping" is now "orm", "objectstore" is now
1124
"session", the old "objectstore" namespace gets loaded in via the
1125
"threadlocal" mod if used
1131
mods now called in via "import <modname>". extensions favored over
1132
mods as mods are globally-monkeypatching
1138
fix to add_property so that it propagates properties to inheriting
1145
backrefs create themselves against primary mapper of its originating
1146
property, priamry/secondary join arguments can be specified to override.
1147
helps their usage with polymorphic mappers
1153
"table exists" function has been implemented
1159
"create_all/drop_all" added to MetaData object
1165
improvements and fixes to topological sort algorithm, as well as more
1172
tutorial page added to docs which also can be run with a custom doctest
1173
runner to ensure its properly working. docs generally overhauled to
1174
deal with new code patterns
1180
many more fixes, refactorings.
1186
migration guide is available on the Wiki at
1187
http://www.sqlalchemy.org/trac/wiki/02Migration