hey Robin - SA 0.3 is staying exactly the same as 0.2 conceptually....the change from 0.1 to 0.2 involved SA moving from being developed in a vacuum to being developed in the context of a community with a whole lot of needs and opinions, which is why it was severe - SA's world changed radically, and I wanted to get as much severity out of the way as early as possible, so we are done with upheavals of that sort.
The changes in 0.3 are primarily internal movings-around and better ways of doing things, like comparing attributes for changes and formulating the lists of objects to be updated and deleted on flush (). these should be perceived as enhanced behaviors that do not impact the public API. there are also some new features and options of course, which you can see summarized on the CHANGES page. SA's logging is now internally handled by Python's logging module. All of the same "echo" flags are still present on create_engine, create_session, pool_echo, etc. which behind the scenes will initialize logging with a basic configuration for standard output. However you can forego the "echo" flags altogether and use logging directly, which allows fine-grained control over what parts of SA send debug or informational output. I dont think the "echo" flags should interfere with existing logging setups but i might have to adjust that behavior if it turns out to be the case. The API of the MapperExtension has a few small API changes, since it is of all the public API the closest to the internals (and it also had the crappiest API). There is a little bit of streamlining in the schema package, and many things that have been deprecated all along in 0.2 (like being able to say mapper.select()) are being removed. the "threadlocal" extension stuff is all still present, both for create_engine and mapping, but the docs now downplay it heavily. the changes on the "schema" package are oriented towards slimming down the package and making it more explicit and consistent with itself. the vast majority of user code that ive seen shouldnt have to change at all: - the create() and drop() methods on Table dont have a return value now, so they act more like pythons list.reverse() for example. people should probably be using metadata.create_all() in most cases. - the "redefine" keyword argument and the deregister() method on Table also go away (since you can now just make a new MetaData if you need to change tables around). - all the create/drop/exists/etc. methods take an optional "connectable" parameter (which is the same as 0.2) and the "engine" parameter is gone (the "engine" param has been deprecated throughout all of 0.2). - The "index" and "unique" flags on Column now only accept True or False; to give an index or unique constraint a specific name, you should use the Index and UniqueConstraint constructs explicitly. You can also now use "index" and "unique" together to differentiate an Index with unique vs. UniqueConstraint. - The methods on Table and Column that were used to programmatically add items, which included a quasi-generic "append_item()" method that had an ambiguous relationship with other methods like "append_column()", have been honed into explicit names like "append_column()", "append_constraint()", and "append_foreign_key ()". but I have never seen anyone use those methods in an application before so i dont think there will be much impact there. A lot of the "private" classes in the SQL package, such as BinaryClause, BooleanClause, CompoundSelect, etc. have been renamed with an underscore "_" to mark them as "private". these classes were never part of the public API and the existing construction functions all remain the same. Some of the more prominent classes such as Join and Alias have stayed "public" (even though they have construction functions anyway). the list of most of whats new in 0.3 is viewable in the CHANGES page, which you can view straight from SVN via: http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/CHANGES and the current docs are on the site: http://www.sqlalchemy.org/docs_03/ also, 0.3 is very close and ive wanted to get it out the door for quite some time now. I need to restore the "extension" MapperOption (since the options system was internally rewritten), give it a try on the lesser tested DB's like oracle and MS-SQL, and thats about it. So your best best is to SVN up and try out your tutorials and examples against it. - mike On Oct 19, 2006, at 6:19 PM, Robin Munn wrote: > > It may be a little early to be asking this. But I'm going to be > teaching SQLAlchemy to about fifteen to twenty people in precisely > three weeks, and I'm preparing my lesson plan now. And I'm starting to > wonder whether my lesson plan (currently based on 0.2.8) will need > drastic tweaking, or minor tweaking, or no changes at all, when you > release 0.3. There were enough changes between 0.1 and 0.2 that a few > sections of my step-by-step tutorial needed a rewrite -- such as the > new create_engine() syntax, and passing a metadata object instead of > an engine object to the Table() constructor. (Incidentally, for anyone > who's interested, that tutorial is at > http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html). Do you know > yet what changes you're planning to make in 0.3? At least, well enough > to give me a hint or two like "I'm planning to completely overhaul the > ActiveMapper plugin" or something like that? > > -- > Robin Munn > [EMAIL PROTECTED] > GPG key 0xD6497014 > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy -~----------~----~----~----~------~----~------~--~---
