News
SQLObject 1.6.0
Released 15 May 2014.
Features & Interface
- Python 2.4 is no longer supported. The minimal supported version is
Python 2.5.
- Support for Python 2.5 is declared obsolete and will be removed
in the next release.
Minor features
- Upgrade ez_setup to 1.4.2.
SQLObject 1.5.2
Released 13 Apr 2014.
- Adapt duplicate error message strings for SQLite 3.8.
SQLObject 1.5.1
Released 15 Dec 2013.
- SQLiteConnection.close() now closes and reopens a connection
to in-memory database.
SQLObject 1.5.0
Released 5 Oct 2013.
Features & Interface
- Helpers for class Outer were changed to lookup columns in table's
declarations.
- Support for Python 2.4 is declared obsolete and will be removed
in the next release.
Minor features
- When a PostgresConnection raises an exception the instance has
code/error attributes copied from psycopg2's pgcode/pgerror attributes.
- Encode unicode enum values to str.
- Removed setDeprecationLevel from the list of public functions.
- A number of fixes for tests.
Bugfixes
- A bug was fixed in DBConnection.close(); close() doesn't raise
an UnboundLocalError if connection pool is empty.
- Fixed parameters for pymssql.
Documentation
- GNU LGPL text was added as docs/LICENSE file.
- Old FSF address was changed to the new one.
SQLObject 1.4.1
Released 26 May 2013.
SQLObject 1.4.0
Released 18 May 2013.
Features & Interface
- Support for PostgreSQL 8.1 is dropped. The minimal supported version of
PostgreSQL is 8.2 now.
- Optimization in PostgresConnection: use INSERT...RETURNING id
to get the autoincremented id in one query instead of two
(INSERT + SELECT id).
- Changed the way to get if the table has identity in MS SQL.
- NCHAR/NVARCHAR and N''-quoted strings for MS SQL.
SQLObject 1.3.3
Released 26 May 2013.
- Fixed bugs in pickling and unpickling (remove/restore a weak proxy to self,
fixed cache handling).
- Added an example of using SQLObject with web.py by Rhubarb Sin
to the links page.
SQLObject 1.3.2
Released 20 Oct 2012.
SQLObject 1.3.1
Released 25 May 2012.
SQLObject 1.3.0
Released 31 Mar 2012.
Features & Interface
- PostgresConnection performs translation of exceptions to standard
SQLObject's hierarchy of exceptions.
- Major update of FirebirdConnection: introspection was completely
rewritten and extended; charset was renamed to dbEncoding;
a longstanding bug was fixed - pass port to connect().
SQLObject 1.2.4
Released 20 Oct 2012.
- Fixed a bug in sqlbuilder.Select.filter - removed comparison with
SQLTrueClause.
- Neil Muller fixed a number of tests.
SQLObject 1.2.3
Released 25 May 2012.
- Fixed a minor bug in PostgreSQL introspection: VIEWs don't have
PRIMARY KEYs - use sqlmeta.idName as the key.
- Fixed a bug in cache handling while unpickling.
SQLObject 1.2.2
Released 1 Mar 2012.
SQLObject 1.2.1
Released 4 Dec 2011.
SQLObject 1.2.0
Released 20 Nov 2011.
Features & Interface
- Strings are treated specially in Select to allow
Select(['id, 'name'], where='value = 42'). Update allows a string in
WHERE.
- ForeignKey('Table', refColumn='refcol_id') to allow ForeignKey to
point to a non-id column; the referred column must be a unique integer
column.
- delColumn now accepts a ForeignKey's name without 'ID'.
- Support for PostgreSQL 7.* is dropped. The minimal supported version of
PostgreSQL is 8.1 now.
- Quoting rules changed for PostgreSQL: SQLObject uses E'' escape string
if the string contains characters escaped with backslash.
- A bug caused by psycopg2 recently added a new boolean not callable
autocommit attribute was fixed.
- sqlobject.__doc__ and main.__doc__ no longer contain version number.
Use sqlobject.version or version_info.
SQLObject 1.1.5
Released 1 Mar 2012.
- A bug was fixed in SQLiteConnection - clear _threadPool on close().
SQLObject 1.1.4
Released 4 Dec 2011.
- A bug was fixed in handling modulo operator - SQLite implements
only %, MySQL - only MOD(), PostgreSQL implements both.
SQLObject 1.1.3
Released 30 Aug 2011.
SQLObject 1.1.2
Released 8 Aug 2011.
SQLObject 1.1.1
Released 1 Jul 2011.
- Parsing sqlobject.__doc__ for version number is declared obsolete. Use
sqlobject.version or version_info.
- Documented sqlmeta.dbEncoding and connection.dbEncoding.
SQLObject 1.1
Released 20 Jun 2011.
Features & Interface
- SelectResults (returned from .select()) is allowed in IN(column, list).
- A different workaround is used in SQLiteConnection to prevent PySQLite
from converting strings to unicode - in the case of a registered text
conversion function PySQLite silently converts empty strings to Nones;
now SQLObject uses text_factory instead and properly returns empty
strings.
- It is now possible to declare one encoding for all UnicodeCol's per
table (as sqlmeta.dbEncoding) or per connection (as connection.dbEncoding).
Default (if dbEncoding is found neither in column nor in table nor in
connection) is 'utf-8'.
Source code and internals
- Decorators @classmethod and @staticmethod are used everywhere.
- All 'mydict.has_key(name)' checks were replaced with 'name in mydict'.
SQLObject 1.0.3
Released 30 Aug 2011.
- Fixed a bug with Postgres - add quotes in "SET client_encoding" query.
SQLObject 1.0.2
Released 8 Aug 2011.
- A bug was fixed in SelectResults slicing that prevented to slice a
slice (my_results[:20][1:5]).
SQLObject 1.0.1
Released 30 May 2011.
- A syntax incompatibility was fixed in SQLiteConnection that prevented
SQLObject to be used with Python 2.4.
SQLObject 1.0.0
Released 28 Mar 2011.
Features & Interface
- Major API change: DB URI parser was changed to use urllib.split*() and
unquote(). This means any username/password/path are allowed in DB
URIs if they are properly %-encoded, and DB URIs are automatically
unquoted.
- A new module __version__.py was added. New variables version
(string) and version_info (5-tuple: major, minor, micro, release
level, serial) are imported into sqlobject namespace.
- In SQLite, id columns are made AUTOINCREMENT.
- Parameter backend in DB URI is no longer supported, use parameter
driver.
SQLObject 0.15.1
Released 22 Mar 2011.
- A bug was fixed in MSSQLConnection.
- A minor bug was fixed in sqlbuilder.Union.
SQLObject 0.15.0
Released 6 Dec 2010.
Features & Interface
- Major API change: all signals are sent with the instance (or the class)
as the first parameter. The following signals were changed:
RowCreateSignal, RowCreatedSignal, DeleteColumnSignal.
- Major API change: post-processing functions for all signals are called
with the instance as the first parameter. The following signals were
changed: RowUpdatedSignal, RowDestroySignal, RowDestroyedSignal.
SQLObject 0.14.2
- A minor bug was fixed in sqlbuilder.Union.
SQLObject 0.14.1
Released 15 Oct 2010.
SQLObject 0.14.0
Released 10 Oct 2010.
Features & Interface
- The lists of columns/indices/joins are now sorted according to the order
of declaration.
- validator2 was added to all columns; it is inserted at the beginning
of the list of validators, i.e. its from_python() method is called
first, to_python() is called last, after all validators in the list.
- SQLiteConnection's parameter use_table_info became boolean with default
value True; this means the default schema parser is now based on PRAGMA
table_info().
- Major API change: attribute dirty was moved to sqlmeta.
SQLObject 0.13.1
Released 15 Oct 2010.
- A bug was fixed in a subtle case when a per-instance connection is not
passed to validators.
SQLObject 0.13.0
Released 11 Aug 2010.
Features & Interface
- SQLObject instances that don't have a per-instance connection can be
pickled and unpickled.
- Validators became stricter: StringCol and UnicodeCol now accept only str,
unicode or an instance of a class that implements __unicode__ (but not
__str__ because every object has a __str__ method); BoolCol accepts only
bool or int or an instance of a class that implements __nonzero__; IntCol
accepts int, long or an instance of a class that implements __int__ or
__long__; FloatCol accepts float, int, long or an instance of a class
that implements __float__, __int__ or __long__.
- Added a connection class for rdbhost.com (commercial Postgres-over-Web
service).
Small Features
- Added TimedeltaCol; currently it's only implemented on PostgreSQL as an
INTERVAL type.
- Do not pollute the base sqlmeta class to allow Style to set idName. In
the case of inherited idName inherited value takes precedence; to allow
Style to set idName reset inherited idName to None.
- Better handling of circular dependencies in sqlobject-admin -
do not include the class in the list of other classes.
- Renamed db_encoding to dbEncoding in UnicodeStringValidator.
- A new parameter sslmode was added to PostgresConnection.
- Removed SQLValidator - its attemptConvert was never called because in
FormEncode it's named attempt_convert.
SQLObject 0.12.5
- backend parameter was renamed to driver. To preserve backward
compatibility backend is still recognized and will be recognized
for some time.
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.
SQLObject 0.12.2
Released 4 Mar 2010.
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
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.
- 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.11.2
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.11.1
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.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.