++++ News ++++ .. contents:: Contents: :backlinks: none .. _start: SQLObject 0.12.4 ================ Released 5 May 2010. * Bugs were fixed in calling from_python(). * A bugfix was ported from `SQLObject 0.11.6`_. SQLObject 0.12.3 ================ Released 11 Apr 2010. * A bugfix ported from `SQLObject 0.11.5`_. SQLObject 0.12.2 ================ Released 4 Mar 2010. * Bugfixes ported from `SQLObject 0.11.4`_. SQLObject 0.12.1 ================ Released 8 Jan 2010. * Fixed three bugs in PostgresConnection. * A number of changes ported from `SQLObject 0.11.3`_. SQLObject 0.12.0 ================ Released 20 Oct 2009. Features & Interface -------------------- * .selectBy(), .deleteBy() and .by*() methods pass all values through .from_python(), not only unicode. * The user can choose a DB API driver for SQLite by using a "backend" parameter in DB URI or SQLiteConnection that can be a comma-separated list of backend names. Possible backends are: "pysqlite2" (alias "sqlite2"), "sqlite3", "sqlite" (alias "sqlite1"). Default is to test pysqlite2, sqlite3 and sqlite in that order. * The user can choose a DB API driver for PostgreSQL by using a "backend" parameter in DB URI or PostgresConnection that can be a comma-separated list of backend names. Possible backends are: "psycopg2", "psycopg1", "psycopg" (tries psycopg2 and psycopg1), "pygresql". Default is "psycopg". WARNING: API change! PostgresConnection's parameter "usePygresql" is now replaced with "backend=pygresql". * The user can choose a DB API driver for MSSQL by using a "backend" parameter in DB URI or MSSQLConnection that can be a comma-separated list of backend names. Possible backends are: "adodb" (alias "adodbapi") and "pymssql". Default is to test adodbapi and pymssql in that order. * alternateMethodName is defined for all unique fields, not only alternateID; this makes SQLObject create .by*() methods for all unique fields. * SET client_encoding for PostgreSQL to the value of "charset" parameter in DB URI or PostgresConnection. * TimestampCol() can be instantiated without any defaults, in this case default will be None (good default for TIMESTAMP columns in MySQL). Small Features -------------- * Imported DB API drivers are stored as connection instance variables, not in global variables; this allows to use different DB API drivers at the same time; for example, PySQLite2 and sqlite3. * Removed all deprecated attributes and functions. * Removed the last remained string exceptions. SQLObject 0.11.6 ================ Released 5 May 2010. * A bug was fixed in SQLiteConnection.columnsFromSchema(): pass None as size/precision to DecimalCol; DecimalCol doesn't allow default values (to force user to pass meaningful values); but columnsFromSchema() doesn't implement proper parsing of column details. SQLObject 0.11.5 ================ Released 11 Apr 2010. * Fixed a bug in replacing _connection in a case when no previous _connection has been set. SQLObject 0.11.4 ================ Released 4 Mar 2010. * Fixed a bug in inheritance - if creation of the row failed and if the connection is not a transaction and is in autocommit mode - remove parent row(s). * Do not set _perConnection flag if get() or _init() is passed the same connection; this is often the case with select(). SQLObject 0.11.3 ================ Released 8 Jan 2010. * Fixed a bug in col.py and dbconnection.py - if dbEncoding is None suppose it's 'ascii'. * Fixed a bug in FirebirdConnection. * A change ported from `SQLObject 0.10.9`_. SQLObject 0.11.2 ================ Released 30 Sep 2009. * A number of changes ported from `SQLObject 0.10.8`_. SQLObject 0.11.1 ================ Released 20 Sep 2009. * A number of changes ported from `SQLObject 0.10.7`_. SQLObject 0.11.0 ================ Released 12 Aug 2009. Features & Interface -------------------- * Dropped support for Python 2.3. The minimal version of Python for SQLObject is 2.4 now. * Dropped support for PostgreSQL 7.2. The minimal supported version of PostgreSQL is 7.3 now. * New magic attribute 'j' similar to 'q' was added that automagically does join with the other table in MultipleJoin or RelatedJoin. * SQLObject can now create and drop a database in MySQL, PostgreSQL, SQLite and Firebird/Interbase. * Added some support for schemas in PostgreSQL. * Added DecimalStringCol - similar to DecimalCol but stores data as strings to work around problems in some drivers and type affinity problem in SQLite. * Added sqlobject.include.hashcol.HashCol - a column type that automatically hashes anything going into it, and returns out an object that hashes anything being compared to itself. Basically, it's good for really simple one-way password fields, and it even supports the assignment of None to indicate no password set. By default, it uses the md5 library for hashing, but this can be changed in a HashCol definition. * RowDestroyedSignal and RowUpdatedSignal were added. Minor features -------------- * Use reversed() in manager/command.py instead of .__reversed__(). * Minor change in logging to console - logger no longer stores the output file, it gets the file from module sys every time by name; this means logging will use new sys.stdout (or stderr) in case the user changed them. * Changed the order of testing of SQLite modules - look for external PySQLite2 before sqlite3. SQLObject 0.10.9 ================ * The cache culling algorithm was enhanced to eliminate memory leaks by removing references to dead objects; tested on a website that runs around 4 million requests a day. SQLObject 0.10.8 ================ Released 30 Sep 2009. * Fixed a bug in logging to console - convert unicode to str. * Fixed an obscure bug in ConnectionHub triggered by an SQLObject class whose instances can be coerced to boolean False. SQLObject 0.10.7 ================ Released 20 Sep 2009. * Fixed a bug: Sybase tables with identity column fire two identity_inserts. * Fixed a bug: q.startswith(), q.contains() and q.endswith() escape (with a backslash) all special characters (backslashes, underscores and percent signs). SQLObject 0.10.6 ================ Released 18 May 2009. * Better support for Python 2.6: do not import the deprecated sets module. * A number of changes ported from `SQLObject 0.9.11`_. SQLObject 0.10.5 ================ Released 6 May 2009. * A number of changes ported from `SQLObject 0.9.10`_. * sqlmeta.getColumns() becomes classmethod. SQLObject 0.10.4 ================ Released 8 Dec 2008. * Fixed createSQL constrains generation under MySQL when the table's name includes the database's name (contains a dot). SQLObject 0.10.3 ================ Released 1 Dec 2008. * A number of changes ported from `SQLObject 0.9.8`_. SQLObject 0.10.2 ================ Released 30 May 2008. * A number of changes ported from `SQLObject 0.9.7`_. SQLObject 0.10.1 ================ Released 4 May 2008. * Fixed a bug: limit doesn't work in sqlbuilder.Select. * A number of changes ported from `SQLObject 0.9.6`_. SQLObject 0.10.0 ================ Released 11 Mar 2008. Features & Interface -------------------- * Dropped support for Python 2.2. The minimal version of Python for SQLObject is 2.3 now. * Removed actively deprecated attributes; lowered deprecation level for other attributes to be removed after 0.10. * SQLBuilder Select supports the rest of SelectResults options (reversed, distinct, joins, etc.) * SQLObject.select() (i.e., SelectResults) and DBConnection.queryForSelect() use SQLBuilder Select queries; this make all SELECTs implemented internally via a single mechanism. * SQLBuilder Joins handle SQLExpression tables (not just str/SQLObject/Alias) and properly sqlrepr. * Added SQLBuilder ImportProxy. It allows one to ignore the circular import issues with referring to SQLObject classes in other files - it uses the classregistry as the string class names for FK/Joins do, but specifically intended for SQLBuilder expressions. See tests/test_sqlbuilder_importproxy.py. * Added SelectResults.throughTo. It allows one to traverse relationships (FK/Join) via SQL, avoiding the intermediate objects. Additionally, it's a simple mechanism for pre-caching/eager-loading of later FK relationships (i.e., going to loop over a select of somePeople and ask for aPerson.group, first call list(somePeople.throughTo.group) to preload those related groups and use 2 db queries instead of N+1). See tests/test_select_through.py. * Added ViewSQLObject. * Added sqlmeta.getColumns() to get all the columns for a class (including parent classes), excluding the column 'childName' and including the column 'id'. sqlmeta.asDict() now uses getColumns(), so there is no need to override it in the inheritable sqlmeta class; this makes asDict() to work properly on inheritable sqlobjects. * Allow MyTable.select(MyTable.q.foreignKey == object) where object is an instance of SQLObject. * Added rich comparison methods; SQLObjects of the same class are considered equal is they have the same id; other methods return NotImplemented. * RowDestroySignal is sent on destroying an SQLObject instance; postfunctions are run after the row has been destroyed. * Changed the implementation type in BoolCol under SQLite from TINYINT to BOOLEAN and made fromDatabase machinery to recognize it. * MySQLConnection (and DB URI) accept a number of SSL-related parameters: ssl_key, ssl_cert, ssl_ca, ssl_capath. * Use sets instead of dicts in tablesUsed. Dropped tablesUsedDict function; instead there is tablesUsedSet that returns a set of strings. * SQLBuilder tablesUsedSet handles sqlrepr'able objects. * Under MySQL, PickleCol no longer used TEXT column types; the smallest column is now BLOB - it is not possible to create TINYBLOB column. SQLObject 0.9.11 ================ Released 18 May 2009. * Two bugs in SQLiteConnection.columnsFromSchema() were fixed: use sqlmeta.idName instead of 'id'; convert default 'NULL' to None. * Use sqlmeta.idName instead of 'id' in all connection classes. * Fixed a bug that prevented to override per class _connection if there is sqlhub.processConnection. SQLObject 0.9.10 ================ Released 6 May 2009. * Another unicode-related patch for MySQL; required because different versions of MySQLdb require different handling:: - MySQLdb < 1.2.1: only ascii - MySQLdb = 1.2.1: only unicode - MySQLdb > 1.2.1: both ascii and unicode * Setup requires FormEncode version 1.1.1+. * A minor bug was fixed in creating a DecimalValidator - pass the column name to it. * A bug was fixed in InheritableIteration - pass connection to child klass.select(). * A bug was fixed in PostgresConnection.columnsFromSchema() - foreign keys are now recognized and created as proper ForeignKey with correct column name and table name. * Bugs in PostgresConnection and MSSQLConnection related to properties was fixed. A note for developers: from now on properties in DBConnection classes are forbidden as they don't work with Transaction - Transaction.__getattr__() cannot properly wrap 'self' so a property is called with wrong 'self'. * Transaction instances now explicitly raises TypeError on close() - without this calling Transaction.close() calls connection.close() which is wrong. * A bug in SQLiteConnection.columnsFromSchema() that led to an infinite loop was fixed. SQLObject 0.9.9 =============== * Backported from the trunk: under MySQL use the connection's dbEncoding instead of ascii, when converting a unicode value from python to database for a StringCol. SQLObject 0.9.8 =============== Released 1 Dec 2008. * Changed interpretation of strings in the DB URI for boolean parameters: '0', 'no', 'off' and 'false' are now interpreted as False. * Fixed a bug with incorrect handling of calls like connectionForURI(dburi, cache=False) when dburi already contains some parameters in the URI. * Convert decimal.to_eng_string() to str to work around a bug in Python 2.5.2; see http://mail.python.org/pipermail/python-dev/2008-March/078189.html * Added test_default_style.py. * Fixed a minor bug in SQLiteConnection that fails to parse Enum columns. SQLObject 0.9.7 =============== Released 30 May 2008. Small Features -------------- * Use VARCHAR(MAX) and VARBINARY(MAX) for MSSQL >= 9.0. * Run post_funcs after RowDestroySignal. Bug Fixes --------- * Fixed a minor bug in Set column. * A bug fixed for RowCreatedSignal together with InheritableSQLObject: run post_funcs after the entire hierarchy has been created. * Aggregate functions now honors 'distinct'. SQLObject 0.9.6 =============== Released 4 May 2008. * A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). * Reverted the patch declarative.threadSafeMethod() - it causes more harm then good. SQLObject 0.9.5 =============== Released 10 Mar 2008. * Fixed a minor bug in SQLiteConnection.columnsFromSchema() - set dbName. * A bug in delColumn() that removes all properties was fixed by recreating properties. SQLObject 0.9.4 =============== Released 3 Mar 2008. * Use list.reverse() in manager/command.py for Python 2.2 compatibility. * Prevent MultipleJoin from removing the intermediate table if it was not created by the Join. * Fixed a bug with no default when defaultSQL is defined for the column. * Recognize POINT data type as string in PostgresConnection.columnsFromSchema(). SQLObject 0.9.3 =============== Released 10 Jan 2008. * A number of changes ported from SQLObject 0.7.10. SQLObject 0.9.2 =============== Released 30 Oct 2007. * Fixed a bug in Versioning - do not copy "alternateID" and "unique" attributes from the versioned table. * Fixed a misspelled 'zerofill' option's name. * Fixed bugs in SQLiteConnection.guessColumn(). * A number of changes ported from SQLObject 0.7.9 and SQLObject 0.8.6. SQLObject 0.9.1 =============== Released 25 July 2007. Bug Fixes --------- * Fixed misspelled methods in col.py. * A number of bugfixes ported from SQLObject 0.7.8 and SQLObject 0.8.5. SQLObject 0.9.0 =============== Released 10 May 2007. Features & Interface -------------------- * Support for Python 2.2 has been declared obsolete. * Removed actively deprecated attributes; lowered deprecation level for other attributes to be removed after 0.9. * SQLite connection got columnsFromSchema(). Now all connections fully support fromDatabase. There are two version of columnsFromSchema() for SQLite - one parses the result of "SELECT sql FROM sqlite_master" and the other uses "PRAGMA table_info"; the user can choose one over the other by using "use_table_info" parameter in DB URI; default is False as the pragma is available only in the later versions of SQLite. * Changed connection.delColumn(): the first argument is sqlmeta, not tableName (required for SQLite). * SQLite connection got delColumn(). Now all connections fully support delColumn(). As SQLite backend doesn't implement "ALTER TABLE DROP COLUMN" delColumn() is implemented by creating a new table without the column, copying all data, dropping the original table and renaming the new table. * Versioning_. .. _Versioning: Versioning.html * MySQLConnection got new keyword "conv" - a list of custom converters. * Use logging if it's available and is configured via DB URI. * New columns: TimestampCol to support MySQL TIMESTAMP type; SetCol to support MySQL SET type; TinyIntCol for TINYINT; SmallIntCol for SMALLINT; MediumIntCol for MEDIUMINT; BigIntCol for BIGINT. Small Features -------------- * Support for MySQL INT type attributes: UNSIGNED, ZEROFILL. * Support for DEFAULT SQL attribute via defaultSQL keyword argument. * cls.tableExists() as a shortcut for conn.tableExists(cls.sqlmeta.table). * cls.deleteMany(), cls.deleteBy(). Bug Fixes --------- * idName can be inherited from the parent sqlmeta class. .. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=74338&type=10 :target: http://sourceforge.net/projects/sqlobject :class: noborder :align: center :height: 15 :width: 80 :alt: Get SQLObject at SourceForge.net. Fast, secure and Free Open Source software downloads