sqlobject-cvs Mailing List for SQLObject (Page 86)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
| 2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
| 2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
| 2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
| 2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
| 2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
| 2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
| 2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
| 2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
| 2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
| 2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
| 2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
| 2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
| 2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
|
From: <sub...@co...> - 2007-07-23 14:22:16
|
Author: phd Date: 2007-07-23 08:22:11 -0600 (Mon, 23 Jul 2007) New Revision: 2789 Modified: SQLObject/docs/SQLObject.txt Log: This is trunk docs. Modified: SQLObject/docs/SQLObject.txt =================================================================== --- SQLObject/docs/SQLObject.txt 2007-07-23 14:21:27 UTC (rev 2788) +++ SQLObject/docs/SQLObject.txt 2007-07-23 14:22:11 UTC (rev 2789) @@ -1,6 +1,6 @@ -````````````` -SQLObject 0.8 -````````````` +``````````````` +SQLObject trunk +``````````````` .. contents:: Contents: |
|
From: <sub...@co...> - 2007-07-23 14:21:35
|
Author: phd Date: 2007-07-23 08:21:27 -0600 (Mon, 23 Jul 2007) New Revision: 2788 Modified: SQLObject/branches/0.9/docs/SQLObject.txt Log: This is SQLObject 0.9. Modified: SQLObject/branches/0.9/docs/SQLObject.txt =================================================================== --- SQLObject/branches/0.9/docs/SQLObject.txt 2007-07-23 13:58:02 UTC (rev 2787) +++ SQLObject/branches/0.9/docs/SQLObject.txt 2007-07-23 14:21:27 UTC (rev 2788) @@ -1,5 +1,5 @@ ````````````` -SQLObject 0.8 +SQLObject 0.9 ````````````` .. contents:: Contents: |
|
From: <sub...@co...> - 2007-07-23 13:58:06
|
Author: phd
Date: 2007-07-23 07:58:02 -0600 (Mon, 23 Jul 2007)
New Revision: 2787
Modified:
SQLObject/trunk/sqlobject/events.py
SQLObject/trunk/sqlobject/main.py
Log:
Minor spaces cleanup.
Modified: SQLObject/trunk/sqlobject/events.py
===================================================================
--- SQLObject/trunk/sqlobject/events.py 2007-07-23 13:57:20 UTC (rev 2786)
+++ SQLObject/trunk/sqlobject/events.py 2007-07-23 13:58:02 UTC (rev 2787)
@@ -107,7 +107,7 @@
@@: Should this allow ``instance`` to be a primary key, so that a
row can be deleted without first fetching it?
"""
-
+
class RowUpdateSignal(Signal):
"""
Called when an instance is updated through a call to ``.set()``
Modified: SQLObject/trunk/sqlobject/main.py
===================================================================
--- SQLObject/trunk/sqlobject/main.py 2007-07-23 13:57:20 UTC (rev 2786)
+++ SQLObject/trunk/sqlobject/main.py 2007-07-23 13:58:02 UTC (rev 2787)
@@ -1275,7 +1275,7 @@
cache.created(id, self.__class__, self)
self._init(id)
post_funcs = []
- kw = dict([('class',self.__class__),('id',id)])
+ kw = dict([('class', self.__class__), ('id', id)])
self.sqlmeta.send(events.RowCreatedSignal, kw, post_funcs)
for func in post_funcs:
|
|
From: <sub...@co...> - 2007-07-23 13:57:24
|
Author: phd Date: 2007-07-23 07:57:20 -0600 (Mon, 23 Jul 2007) New Revision: 2786 Modified: SQLObject/docs/SQLObject.txt Log: Added events (signal) docs created by Andy Grover <an...@ba...>. Modified: SQLObject/docs/SQLObject.txt =================================================================== --- SQLObject/docs/SQLObject.txt 2007-07-23 13:55:10 UTC (rev 2785) +++ SQLObject/docs/SQLObject.txt 2007-07-23 13:57:20 UTC (rev 2786) @@ -1810,6 +1810,38 @@ .. _pymssql: http://pymssql.sourceforge.net/ .. _adodbapi: http://adodbapi.sourceforge.net/ +Events (signals) +================ + +Signals are a mechanism to be notified when data or schema changes happen +through SQLObject. This may be useful for doing custom data validation, +logging changes, setting default attributes, etc. Some of what signals can +do is also possible by overriding methods, but signals may provide +a cleaner way, especially across classes not related by inheritance. + +Example:: + + from sqlobject.events import listen, RowUpdateSignal, RowCreatedSignal + from model import Users + + def update_listener(instance, kwargs): + """keep "last_updated" field current""" + import datetime + # BAD method 1, causes infinite recursion? + # instance should be read-only + instance.last_updated = datetime.datetime.now() + # GOOD method 2 + kwargs['last_updated'] = datetime.datetime.now() + + def created_listener(kwargs, post_funcs): + """"email me when new users added""" + # email() implementation left as an exercise for the reader + msg = "%s just was just added to the database!" % kwargs['name'] + email(msg) + + listen(update_listener, Users, RowUpdateSignal) + listen(created_listener, Users, RowCreatedSignal) + Exported Symbols ================ |
|
From: <sub...@co...> - 2007-07-23 13:55:17
|
Author: phd Date: 2007-07-23 07:55:10 -0600 (Mon, 23 Jul 2007) New Revision: 2785 Modified: SQLObject/branches/0.9/docs/SQLObject.txt SQLObject/branches/0.9/sqlobject/events.py SQLObject/branches/0.9/sqlobject/main.py Log: Added events (signal) docs created by Andy Grover <an...@ba...>. Modified: SQLObject/branches/0.9/docs/SQLObject.txt =================================================================== --- SQLObject/branches/0.9/docs/SQLObject.txt 2007-07-23 13:54:13 UTC (rev 2784) +++ SQLObject/branches/0.9/docs/SQLObject.txt 2007-07-23 13:55:10 UTC (rev 2785) @@ -1810,6 +1810,38 @@ .. _pymssql: http://pymssql.sourceforge.net/ .. _adodbapi: http://adodbapi.sourceforge.net/ +Events (signals) +================ + +Signals are a mechanism to be notified when data or schema changes happen +through SQLObject. This may be useful for doing custom data validation, +logging changes, setting default attributes, etc. Some of what signals can +do is also possible by overriding methods, but signals may provide +a cleaner way, especially across classes not related by inheritance. + +Example:: + + from sqlobject.events import listen, RowUpdateSignal, RowCreatedSignal + from model import Users + + def update_listener(instance, kwargs): + """keep "last_updated" field current""" + import datetime + # BAD method 1, causes infinite recursion? + # instance should be read-only + instance.last_updated = datetime.datetime.now() + # GOOD method 2 + kwargs['last_updated'] = datetime.datetime.now() + + def created_listener(kwargs, post_funcs): + """"email me when new users added""" + # email() implementation left as an exercise for the reader + msg = "%s just was just added to the database!" % kwargs['name'] + email(msg) + + listen(update_listener, Users, RowUpdateSignal) + listen(created_listener, Users, RowCreatedSignal) + Exported Symbols ================ Modified: SQLObject/branches/0.9/sqlobject/events.py =================================================================== --- SQLObject/branches/0.9/sqlobject/events.py 2007-07-23 13:54:13 UTC (rev 2784) +++ SQLObject/branches/0.9/sqlobject/events.py 2007-07-23 13:55:10 UTC (rev 2785) @@ -107,7 +107,7 @@ @@: Should this allow ``instance`` to be a primary key, so that a row can be deleted without first fetching it? """ - + class RowUpdateSignal(Signal): """ Called when an instance is updated through a call to ``.set()`` Modified: SQLObject/branches/0.9/sqlobject/main.py =================================================================== --- SQLObject/branches/0.9/sqlobject/main.py 2007-07-23 13:54:13 UTC (rev 2784) +++ SQLObject/branches/0.9/sqlobject/main.py 2007-07-23 13:55:10 UTC (rev 2785) @@ -1275,7 +1275,7 @@ cache.created(id, self.__class__, self) self._init(id) post_funcs = [] - kw = dict([('class',self.__class__),('id',id)]) + kw = dict([('class', self.__class__), ('id', id)]) self.sqlmeta.send(events.RowCreatedSignal, kw, post_funcs) |
|
From: <sub...@co...> - 2007-07-23 13:54:18
|
Author: phd Date: 2007-07-23 07:54:13 -0600 (Mon, 23 Jul 2007) New Revision: 2784 Modified: SQLObject/branches/0.8/docs/SQLObject.txt SQLObject/branches/0.8/sqlobject/events.py SQLObject/branches/0.8/sqlobject/main.py Log: Added events (signal) docs created by Andy Grover <an...@ba...>. Modified: SQLObject/branches/0.8/docs/SQLObject.txt =================================================================== --- SQLObject/branches/0.8/docs/SQLObject.txt 2007-07-23 13:34:23 UTC (rev 2783) +++ SQLObject/branches/0.8/docs/SQLObject.txt 2007-07-23 13:54:13 UTC (rev 2784) @@ -1720,6 +1720,38 @@ .. _pymssql: http://pymssql.sourceforge.net/ .. _adodbapi: http://adodbapi.sourceforge.net/ +Events (signals) +================ + +Signals are a mechanism to be notified when data or schema changes happen +through SQLObject. This may be useful for doing custom data validation, +logging changes, setting default attributes, etc. Some of what signals can +do is also possible by overriding methods, but signals may provide +a cleaner way, especially across classes not related by inheritance. + +Example:: + + from sqlobject.events import listen, RowUpdateSignal, RowCreatedSignal + from model import Users + + def update_listener(instance, kwargs): + """keep "last_updated" field current""" + import datetime + # BAD method 1, causes infinite recursion? + # instance should be read-only + instance.last_updated = datetime.datetime.now() + # GOOD method 2 + kwargs['last_updated'] = datetime.datetime.now() + + def created_listener(kwargs, post_funcs): + """"email me when new users added""" + # email() implementation left as an exercise for the reader + msg = "%s just was just added to the database!" % kwargs['name'] + email(msg) + + listen(update_listener, Users, RowUpdateSignal) + listen(created_listener, Users, RowCreatedSignal) + Exported Symbols ================ Modified: SQLObject/branches/0.8/sqlobject/events.py =================================================================== --- SQLObject/branches/0.8/sqlobject/events.py 2007-07-23 13:34:23 UTC (rev 2783) +++ SQLObject/branches/0.8/sqlobject/events.py 2007-07-23 13:54:13 UTC (rev 2784) @@ -107,7 +107,7 @@ @@: Should this allow ``instance`` to be a primary key, so that a row can be deleted without first fetching it? """ - + class RowUpdateSignal(Signal): """ Called when an instance is updated through a call to ``.set()`` Modified: SQLObject/branches/0.8/sqlobject/main.py =================================================================== --- SQLObject/branches/0.8/sqlobject/main.py 2007-07-23 13:34:23 UTC (rev 2783) +++ SQLObject/branches/0.8/sqlobject/main.py 2007-07-23 13:54:13 UTC (rev 2784) @@ -1291,7 +1291,7 @@ cache.created(id, self.__class__, self) self._init(id) post_funcs = [] - kw = dict([('class',self.__class__),('id',id)]) + kw = dict([('class', self.__class__), ('id', id)]) self.sqlmeta.send(events.RowCreatedSignal, kw, post_funcs) |
|
From: <sub...@co...> - 2007-07-23 13:34:29
|
Author: phd Date: 2007-07-23 07:34:23 -0600 (Mon, 23 Jul 2007) New Revision: 2783 Added: SQLObject/docs/News1.txt Modified: SQLObject/docs/News.txt SQLObject/docs/rebuild Log: Split News.txt into News1.txt. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-07-23 13:22:48 UTC (rev 2782) +++ SQLObject/docs/News.txt 2007-07-23 13:34:23 UTC (rev 2783) @@ -627,451 +627,6 @@ * Lots of other bug fixes. -SQLObject 0.6.1 -=============== +`Older news`__ -Interface Changes ------------------ - -* The long broken and unused ``DBMConnection`` has been removed. - -* Added a connection parameter to all class methods (patch 974755) - -* Connection objects have a ``.module`` attribute, which points to - the DB-API module. This is useful for getting access to the - exception objects. - -Features --------- - -* New ``UnicodeCol()`` that converts to and from Unicode - in the database. See docs_. - -.. _docs: SQLObject.html#subclasses-of-col - -* Added indexing (from Jeremy Fitzhardinge). See `the - documentation`__ for more. - -.. __: SQLObject.html#indexes - -* All connections are explicitly closed, not just garbage collected. - Many database drivers don't close database connections properly when - the connection object is garbage collected. - -* New ``distinct`` option to selects, like ``MyClass.select(..., - distinct=True)`` - -* You can now do - ``MyClass.selectBy(joinedTable=joinedTableInstance)``, where before - you had to do - ``MyClass.selectBy(joinedTableID=joinedTableInstance.id)``. (From - Dave Cook) - -SQLObject 0.6 -============= - -Interface Changes ------------------ - -* Lazy updates. Add ``_lazyUpdate=True`` to your class, and updates - will only be written when you call ``obj.syncUpdate()`` or - ``obj.sync()`` (``sync`` also refetches the data from the database, - which ``syncUpdate`` does not do). When enabled, instances have a - property ``dirty``, which indicates if they have pending updates. - Inserts are still done immediately. - -* Separated database drivers (PostgresConnection, MySQLConnection, - etc.) into separate packages. You can access the driver through - URIs, like ``mysql://user:pass@host/dbname`` -- to set drivers after - class creation you should use `sqlobject.connectionForURI()`. - -* The ``SQLObject`` package has been renamed to ``sqlobject``. This - makes it similar to several other packages, and emphasizes the - distinction between the ``sqlobject`` package and the ``SQLObject`` - class. - -* Class instantiation now creates new rows (like `.new()` used to - do), and the `.get()` method now retrieves objects that already have - rows (like class instantiation used to do). - -* We're now using a Subversion repository instead of CVS. It is - located at http://svn.colorstudy.com/trunk/SQLObject - -* If you pass ``forceDBName=True`` to the ``*Col`` constructors, then - your column name doesn't have to be restricted to a-z, 0-9, and _. - -* ``*Col`` constructors now support cascade: ``cascade=None`` - (default) means no constraint; ``cascade=True`` means that if the - foreign key is deleted, the object will be deleted; - ``cascade=False`` means that the delete will fail; - ``cascade="null"`` means that the column will be set to NULL. The - constraints are only implemented in the DBMS, not in SQLObject - (i.e., they will not work in databases like MySQL and SQLite). - -* New ``_create(id, **kw)`` method that can be overridden to intercept - and modify attempts to insert rows in the database. - -* You can specify ``_idType`` in your class, like ``_idType = str``. - The default type is ``int``; i.e., IDs are coerced to integers. - This is a temporary interface; a more general specifier for primary - keys will be added later. - -* New classmethod ``createTableSQL()`` method for SQLObject classes, - which returns the SQL that can be used to create the table. Analog - to ``createTable()``. - -Bugs ----- - -* SQLite booleans fixed. - -* You can now use ``sqlite:/:memory:`` to store the database in - memory. - -* Some bugs resolved when caching is turned off (SF 956847) - -SQLObject 0.5.3 -=============== - -Bugs ----- - -* Python 2.2 booleans fixed (SF: 903488) - -* Longs (e.g., ``1L``) get converted properly (SF: 939965) - -SQLObject 0.5.2 -=============== - -We're now using Subversion instead of CVS. The repository is located -at svn://colorstudy.com/trunk/SQLObject - -Interface Changes ------------------ - -* If you commit or rollback a transaction, you must call - ``trans.begin()`` to restart the transaction. Any database access on - the transaction inbetween commit/rollback and being will result in an - AssertionError. (It's also acceptable to create a new transaction - object instead of reusing the old one, but objects in that - transaction will be invalid) - -Bugs ----- - -* Using .select() would hold on to a connection, and also release it - back to the connection pool. Very un-threadsafe and all-around - bad. -* Fixed bug which did not release connections after database (query) - error. -* When setting columns that use validators, the Pythonic - (vs. database) representation wasn't being stored in the column. - Now we roundtrip (through toPython and fromPython) the values when - they get set. -* PostgreConnection is back to using sequences for ID generation, - instead of oids. Long explanation -- oids can be unindexed in some - versions of Postgres, or not even exist. -* When turning caching off and using transactions, got an attribute - error on rollback. -* Rollback or commit didn't find objects that were expired from the - cache but still in memory. -* Rollback or commit didn't free the connection object, so as you - created more transactions it stole connections and didn't put them - back in the pool. - -SQLObject 0.5.1 -=============== - -Released: 12-Nov-2003 - -Interface Changes ------------------ - -* Select results no longer have a __len__ method (i.e., you can't do - ``len(Person.select(Person.q.firstName=='Bob'))``). There is now a - ``.count()`` method instead. ``__len__`` gets called implicitly in - several circumstances, like ``list()``, which causes potentially - expensive queries to ``COUNT(*)``. - -Bugs ----- - -* Objects retrieved from a join now respect the transaction context of - the original instance. -* ``.select().reversed()`` works. - -SQLObject 0.5 -============= - -Released: 1-Nov-2003 - -Features --------- - -* Firebird_ support. - -* Database-specific literal quoting (motivation: MySQL and Postgres - use backslashes, Firebird and SQLite do not). - -* Generic conversion/validation can be added to columns. - -* BoolCol for portable boolean columns (BOOL on Postgres, INT on - MySQL, etc.) - -* Non-integer IDs. (Automatic table creation is not supported for - non-integer IDs) - -* Explicit IDs for new instances/rows (required for non-integer IDs). - -* Instances can be synced with the database (in case there have been - updates to the object since it was first fetched). - -* Instances can be expired, so that they will be synced when they are - next accessed. - -.. _Firebird: http://firebird.sourceforge.net/ - -Interface Changes ------------------ - -* `SQLBuilder.sqlRepr` renamed to `SQLBuilder.sqlrepr`, signature - changed to ``sqlrepr(value, databaseName)`` to quote ``value``, - where ``databaseName`` is one of ``"mysql"``, ``"postgres"``, - ``"sqlite"``, ``"firebird"``. - -* ``sqlRepr`` magic method renamed to ``__sqlrepr__``, and takes new - ``databaseName`` argument. - -* When using explicit booleans, use ``Col.TRUE`` and ``Col.FALSE`` for - backward compatibility with Python 2.2. This is not required for - ``BoolCol``, however (which converts all true values to TRUE and - false values to FALSE) - -* SQLObject has a ``sqlrepr`` method, so you can construct queries - with something like ``"WHERE last_name = %s" % - Person.sqlrepr('Bob')`` - -Bugs ----- - -* Released all locks with ``finally:``, so that bugs won't cause - frozen locks. - -* Tons of transaction fixes. Transactions pretty much work. - -* A class can have multiple foreign keys pointing to the same table - (e.g., ``spouse = ForeignKey("Person"); supervisor = - ForeignKey("Person")``) - -SQLObject 0.4 -============= - -Features --------- - -* You can specify columns in a new, preferred manner:: - - class SomeObject(SQLObject): - someColumn = Col() - - Equivalent to:: - - class SomeObject(SQLObject): - _columns = [Col('someColumn')] - - Ditto joins. - -* Cache objects have a clear method, which empties all objects. - However, weak references to objects *are* maintained, so the - integrity of the cache can be ensured. - -* SQLObject subclasses can be further subclassed, adding or removing - column definitions (as well as changing settings like connection, - style, etc). Each class still refers to a single concrete table in - the database -- the class hierarchy is not represented in the - database. - -* Each SQLObject subclass can have an associated style, as given in - the `_style` attribute. This object is used to map between Python - and database names (e.g., the column name for a Python attribute). - Some samples are available in the `Style` module. - -* Postgres support for `_fromDatabase` (reading a table definition from - the database, and creating a class from that). - -* Postgres id columns more permissive, you don't have to create a - specially named sequence (or implicitly create that sequence through - ``SERIAL``). lastoid is used instead. - -* MySQL uses ``localhost`` as the default host, and the empty string - as the default password. - -* Added functions for use with queries: `ISNULL`, `ISNOTNULL`. ``==`` - and ``!=`` can be used with None, and is translated into `ISNULL`, - `ISNOTNULL`. - -* Classes can be part of a specific registry. Since classes are - referred to by name in several places, the names have to be unique. - This can be problematic, so you can add a class variable `_registry`, - the value of which should be a string. Classes references are - assumed to be inside that registry, and class names need only be - unique among classes in that registry. - -* ``SomeClass.select()`` selects all, instead of using - ``SomeClass.select('all')``. You can also use None instead of - ``'all'``. - -* Trying to fetch non-existent objects raises `SQLObjectNotFound`, - which is a subclass of the builtin exception `LookupError`. - This may not be raised if `_cacheValues` is False and you use - the ID to fetch an object (but alternateID fetches will raise - the exception in either case). - -* Can order by descending order, with the `reversed` option to - the `select` method, or by prefixing the column with a ``"-"``. - -* Ordering with joins works better -- you can order with multiple - columns, as well as descending ordering. - -Col and Join -~~~~~~~~~~~~ - -* `Join` constructors have an argument `orderBy`, which is the name - of a Python attribute to sort results by. If not given, the - appropriate class's `_defaultOrder` will be used. None implies - no sorting (and ``orderBy=None`` will override `_defaultOrder`). - -* `ForeignKey` class (subclass of `Col`), for somewhat easier/clearer - declaration of foreign keys. - -* `Col` (and subclasses) can take a `sqlType` argument, which is used - in table definitions. E.g., ``Col(sqlType="BOOLEAN")`` can be used - to create a ``BOOLEAN`` column, even though no `BooleanCol` exists. - -* `alternateID` (a specifier for columns) implies ``NOT NULL``. Also - implies ``UNIQUE``. - -* `unique` (a specifier for columns) added. - -* `DecimalCol` and `CurrencyCol` added. - -* `EnumCol` uses constraints on Postgres (if you use `createTable`). - -Bugs ----- - -* `DateTimeCol` uses ``TIMESTAMP`` for Postgres. Note that the - Python type name is used for column names, not necessarily the - SQL standard name. - -* Foreign key column names are slightly more permissive. They still - need to end in ``id``, but it's case insensitive. - -* _defaultOrder should be the python attribute's name, not the database - name. - -* SomeClass.q.colName uses proper Python attributes for colName, and - proper database names when executed in the database. - -* SQLite select results back to being proper iterator. - -* SomeClass.q.colName now does proper translation to database names, - using dbName, etc., instead of being entirely algorithm-driven. - -* Raise `TypeError` if you pass an unknown argument to the `new` - method. - -* You can override the _get_* or _set_* version of a property without - overriding the other. - -* Python 2.3 compatible. - -* Trying to use ``Col('id')`` or ``id = Col()`` will raise an - exception, instead of just acting funky. - -* ``ForeignKey`` columns return None if the associated column is - NULL in the database (used to just act weird). - -* Instantiating an object with an id of None will give an error, - instead of just acting weird. - -Internal --------- - -* `Col` class separated into `Col` and `SOCol` (and same for all other - `*Col` classes). `Col` defines a column, `SOCol` is that definition - bound to a particular SQLObject class. - -* Instance variable ``_SO_columns`` holds the `SOCol` instances. - -SQLObject 0.3 -============= - -Features --------- - -* Table creation (SQL schema generation) via new class method - `createTable`. And of course a `dropTable` method to go with. - -* Add and remove columns at runtime, optionally modifying the - schema in the database (via ``ALTER``). (Does not work in - SQLite) - -* New column classes (see `Col` module), indicates type - -* Classes can be created by parsing an already existant table - (MySQL only). - -* Objects are not cached indefinitely. Cached objects are expired - into a weak dictionary (it allows objects to be garbage collected if - nowhere else in the program is using the object, but until it is - collected it's still available to the cache). Some cache control, - pass ``nocache=True`` to your connection object to eliminate as much - caching as possible. See `Cache` module for a bit more. - -* New DBMConnection, implements a database-like backend without any - database to speak of, including queries (so long as you use - `SQLBuilder` and don't generate your where clauses manually). - Actual SQL generation is done entirely by the database connection, - allowing portability across very different backends. - -* Postgres table IDs should be created with type ``SERIAL`` (which - implicitly creates a sequence). - -* New `_defaultOrder` class variable gives a default for the - `orderBy` parameter to `select` queries. - -Bugs ----- - -* LIMIT/OFFSET (select result slicing) works in Postgres and SQLite. - -* ``tableExists`` method from DBConnection works in same. - -* mxDateTime not required (never should have been, always just an - option). - -SQLObject 0.2.1 -=============== - -Bugs ----- - -* Fixed caching of new objects - -Features --------- - -* SQLite_ support - -* Select statements are lazily generated, retrieve full rows for - speed, and are slicable (`select docs`_). - -* `alternateID` option for `Col` objects -- select individual objects - via UNIQUE columns, e.g., a username (`Col docs`_). - -.. _SQLite: http://sqlite.org/ - -.. _select docs: SQLObject.html#selecting-multiple-objects - -.. _Col docs: SQLObject.html#col-class-specifying-columns +.. __: News1.html Copied: SQLObject/docs/News1.txt (from rev 2782, SQLObject/docs/News.txt) =================================================================== --- SQLObject/docs/News1.txt (rev 0) +++ SQLObject/docs/News1.txt 2007-07-23 13:34:23 UTC (rev 2783) @@ -0,0 +1,457 @@ +++++ +News +++++ + +.. contents:: Contents: + :backlinks: none + +.. _start: + +SQLObject 0.6.1 +=============== + +Interface Changes +----------------- + +* The long broken and unused ``DBMConnection`` has been removed. + +* Added a connection parameter to all class methods (patch 974755) + +* Connection objects have a ``.module`` attribute, which points to + the DB-API module. This is useful for getting access to the + exception objects. + +Features +-------- + +* New ``UnicodeCol()`` that converts to and from Unicode + in the database. See docs_. + +.. _docs: SQLObject.html#subclasses-of-col + +* Added indexing (from Jeremy Fitzhardinge). See `the + documentation`__ for more. + +.. __: SQLObject.html#indexes + +* All connections are explicitly closed, not just garbage collected. + Many database drivers don't close database connections properly when + the connection object is garbage collected. + +* New ``distinct`` option to selects, like ``MyClass.select(..., + distinct=True)`` + +* You can now do + ``MyClass.selectBy(joinedTable=joinedTableInstance)``, where before + you had to do + ``MyClass.selectBy(joinedTableID=joinedTableInstance.id)``. (From + Dave Cook) + +SQLObject 0.6 +============= + +Interface Changes +----------------- + +* Lazy updates. Add ``_lazyUpdate=True`` to your class, and updates + will only be written when you call ``obj.syncUpdate()`` or + ``obj.sync()`` (``sync`` also refetches the data from the database, + which ``syncUpdate`` does not do). When enabled, instances have a + property ``dirty``, which indicates if they have pending updates. + Inserts are still done immediately. + +* Separated database drivers (PostgresConnection, MySQLConnection, + etc.) into separate packages. You can access the driver through + URIs, like ``mysql://user:pass@host/dbname`` -- to set drivers after + class creation you should use `sqlobject.connectionForURI()`. + +* The ``SQLObject`` package has been renamed to ``sqlobject``. This + makes it similar to several other packages, and emphasizes the + distinction between the ``sqlobject`` package and the ``SQLObject`` + class. + +* Class instantiation now creates new rows (like `.new()` used to + do), and the `.get()` method now retrieves objects that already have + rows (like class instantiation used to do). + +* We're now using a Subversion repository instead of CVS. It is + located at http://svn.colorstudy.com/trunk/SQLObject + +* If you pass ``forceDBName=True`` to the ``*Col`` constructors, then + your column name doesn't have to be restricted to a-z, 0-9, and _. + +* ``*Col`` constructors now support cascade: ``cascade=None`` + (default) means no constraint; ``cascade=True`` means that if the + foreign key is deleted, the object will be deleted; + ``cascade=False`` means that the delete will fail; + ``cascade="null"`` means that the column will be set to NULL. The + constraints are only implemented in the DBMS, not in SQLObject + (i.e., they will not work in databases like MySQL and SQLite). + +* New ``_create(id, **kw)`` method that can be overridden to intercept + and modify attempts to insert rows in the database. + +* You can specify ``_idType`` in your class, like ``_idType = str``. + The default type is ``int``; i.e., IDs are coerced to integers. + This is a temporary interface; a more general specifier for primary + keys will be added later. + +* New classmethod ``createTableSQL()`` method for SQLObject classes, + which returns the SQL that can be used to create the table. Analog + to ``createTable()``. + +Bugs +---- + +* SQLite booleans fixed. + +* You can now use ``sqlite:/:memory:`` to store the database in + memory. + +* Some bugs resolved when caching is turned off (SF 956847) + +SQLObject 0.5.3 +=============== + +Bugs +---- + +* Python 2.2 booleans fixed (SF: 903488) + +* Longs (e.g., ``1L``) get converted properly (SF: 939965) + +SQLObject 0.5.2 +=============== + +We're now using Subversion instead of CVS. The repository is located +at svn://colorstudy.com/trunk/SQLObject + +Interface Changes +----------------- + +* If you commit or rollback a transaction, you must call + ``trans.begin()`` to restart the transaction. Any database access on + the transaction inbetween commit/rollback and being will result in an + AssertionError. (It's also acceptable to create a new transaction + object instead of reusing the old one, but objects in that + transaction will be invalid) + +Bugs +---- + +* Using .select() would hold on to a connection, and also release it + back to the connection pool. Very un-threadsafe and all-around + bad. +* Fixed bug which did not release connections after database (query) + error. +* When setting columns that use validators, the Pythonic + (vs. database) representation wasn't being stored in the column. + Now we roundtrip (through toPython and fromPython) the values when + they get set. +* PostgreConnection is back to using sequences for ID generation, + instead of oids. Long explanation -- oids can be unindexed in some + versions of Postgres, or not even exist. +* When turning caching off and using transactions, got an attribute + error on rollback. +* Rollback or commit didn't find objects that were expired from the + cache but still in memory. +* Rollback or commit didn't free the connection object, so as you + created more transactions it stole connections and didn't put them + back in the pool. + +SQLObject 0.5.1 +=============== + +Released: 12-Nov-2003 + +Interface Changes +----------------- + +* Select results no longer have a __len__ method (i.e., you can't do + ``len(Person.select(Person.q.firstName=='Bob'))``). There is now a + ``.count()`` method instead. ``__len__`` gets called implicitly in + several circumstances, like ``list()``, which causes potentially + expensive queries to ``COUNT(*)``. + +Bugs +---- + +* Objects retrieved from a join now respect the transaction context of + the original instance. +* ``.select().reversed()`` works. + +SQLObject 0.5 +============= + +Released: 1-Nov-2003 + +Features +-------- + +* Firebird_ support. + +* Database-specific literal quoting (motivation: MySQL and Postgres + use backslashes, Firebird and SQLite do not). + +* Generic conversion/validation can be added to columns. + +* BoolCol for portable boolean columns (BOOL on Postgres, INT on + MySQL, etc.) + +* Non-integer IDs. (Automatic table creation is not supported for + non-integer IDs) + +* Explicit IDs for new instances/rows (required for non-integer IDs). + +* Instances can be synced with the database (in case there have been + updates to the object since it was first fetched). + +* Instances can be expired, so that they will be synced when they are + next accessed. + +.. _Firebird: http://firebird.sourceforge.net/ + +Interface Changes +----------------- + +* `SQLBuilder.sqlRepr` renamed to `SQLBuilder.sqlrepr`, signature + changed to ``sqlrepr(value, databaseName)`` to quote ``value``, + where ``databaseName`` is one of ``"mysql"``, ``"postgres"``, + ``"sqlite"``, ``"firebird"``. + +* ``sqlRepr`` magic method renamed to ``__sqlrepr__``, and takes new + ``databaseName`` argument. + +* When using explicit booleans, use ``Col.TRUE`` and ``Col.FALSE`` for + backward compatibility with Python 2.2. This is not required for + ``BoolCol``, however (which converts all true values to TRUE and + false values to FALSE) + +* SQLObject has a ``sqlrepr`` method, so you can construct queries + with something like ``"WHERE last_name = %s" % + Person.sqlrepr('Bob')`` + +Bugs +---- + +* Released all locks with ``finally:``, so that bugs won't cause + frozen locks. + +* Tons of transaction fixes. Transactions pretty much work. + +* A class can have multiple foreign keys pointing to the same table + (e.g., ``spouse = ForeignKey("Person"); supervisor = + ForeignKey("Person")``) + +SQLObject 0.4 +============= + +Features +-------- + +* You can specify columns in a new, preferred manner:: + + class SomeObject(SQLObject): + someColumn = Col() + + Equivalent to:: + + class SomeObject(SQLObject): + _columns = [Col('someColumn')] + + Ditto joins. + +* Cache objects have a clear method, which empties all objects. + However, weak references to objects *are* maintained, so the + integrity of the cache can be ensured. + +* SQLObject subclasses can be further subclassed, adding or removing + column definitions (as well as changing settings like connection, + style, etc). Each class still refers to a single concrete table in + the database -- the class hierarchy is not represented in the + database. + +* Each SQLObject subclass can have an associated style, as given in + the `_style` attribute. This object is used to map between Python + and database names (e.g., the column name for a Python attribute). + Some samples are available in the `Style` module. + +* Postgres support for `_fromDatabase` (reading a table definition from + the database, and creating a class from that). + +* Postgres id columns more permissive, you don't have to create a + specially named sequence (or implicitly create that sequence through + ``SERIAL``). lastoid is used instead. + +* MySQL uses ``localhost`` as the default host, and the empty string + as the default password. + +* Added functions for use with queries: `ISNULL`, `ISNOTNULL`. ``==`` + and ``!=`` can be used with None, and is translated into `ISNULL`, + `ISNOTNULL`. + +* Classes can be part of a specific registry. Since classes are + referred to by name in several places, the names have to be unique. + This can be problematic, so you can add a class variable `_registry`, + the value of which should be a string. Classes references are + assumed to be inside that registry, and class names need only be + unique among classes in that registry. + +* ``SomeClass.select()`` selects all, instead of using + ``SomeClass.select('all')``. You can also use None instead of + ``'all'``. + +* Trying to fetch non-existent objects raises `SQLObjectNotFound`, + which is a subclass of the builtin exception `LookupError`. + This may not be raised if `_cacheValues` is False and you use + the ID to fetch an object (but alternateID fetches will raise + the exception in either case). + +* Can order by descending order, with the `reversed` option to + the `select` method, or by prefixing the column with a ``"-"``. + +* Ordering with joins works better -- you can order with multiple + columns, as well as descending ordering. + +Col and Join +~~~~~~~~~~~~ + +* `Join` constructors have an argument `orderBy`, which is the name + of a Python attribute to sort results by. If not given, the + appropriate class's `_defaultOrder` will be used. None implies + no sorting (and ``orderBy=None`` will override `_defaultOrder`). + +* `ForeignKey` class (subclass of `Col`), for somewhat easier/clearer + declaration of foreign keys. + +* `Col` (and subclasses) can take a `sqlType` argument, which is used + in table definitions. E.g., ``Col(sqlType="BOOLEAN")`` can be used + to create a ``BOOLEAN`` column, even though no `BooleanCol` exists. + +* `alternateID` (a specifier for columns) implies ``NOT NULL``. Also + implies ``UNIQUE``. + +* `unique` (a specifier for columns) added. + +* `DecimalCol` and `CurrencyCol` added. + +* `EnumCol` uses constraints on Postgres (if you use `createTable`). + +Bugs +---- + +* `DateTimeCol` uses ``TIMESTAMP`` for Postgres. Note that the + Python type name is used for column names, not necessarily the + SQL standard name. + +* Foreign key column names are slightly more permissive. They still + need to end in ``id``, but it's case insensitive. + +* _defaultOrder should be the python attribute's name, not the database + name. + +* SomeClass.q.colName uses proper Python attributes for colName, and + proper database names when executed in the database. + +* SQLite select results back to being proper iterator. + +* SomeClass.q.colName now does proper translation to database names, + using dbName, etc., instead of being entirely algorithm-driven. + +* Raise `TypeError` if you pass an unknown argument to the `new` + method. + +* You can override the _get_* or _set_* version of a property without + overriding the other. + +* Python 2.3 compatible. + +* Trying to use ``Col('id')`` or ``id = Col()`` will raise an + exception, instead of just acting funky. + +* ``ForeignKey`` columns return None if the associated column is + NULL in the database (used to just act weird). + +* Instantiating an object with an id of None will give an error, + instead of just acting weird. + +Internal +-------- + +* `Col` class separated into `Col` and `SOCol` (and same for all other + `*Col` classes). `Col` defines a column, `SOCol` is that definition + bound to a particular SQLObject class. + +* Instance variable ``_SO_columns`` holds the `SOCol` instances. + +SQLObject 0.3 +============= + +Features +-------- + +* Table creation (SQL schema generation) via new class method + `createTable`. And of course a `dropTable` method to go with. + +* Add and remove columns at runtime, optionally modifying the + schema in the database (via ``ALTER``). (Does not work in + SQLite) + +* New column classes (see `Col` module), indicates type + +* Classes can be created by parsing an already existant table + (MySQL only). + +* Objects are not cached indefinitely. Cached objects are expired + into a weak dictionary (it allows objects to be garbage collected if + nowhere else in the program is using the object, but until it is + collected it's still available to the cache). Some cache control, + pass ``nocache=True`` to your connection object to eliminate as much + caching as possible. See `Cache` module for a bit more. + +* New DBMConnection, implements a database-like backend without any + database to speak of, including queries (so long as you use + `SQLBuilder` and don't generate your where clauses manually). + Actual SQL generation is done entirely by the database connection, + allowing portability across very different backends. + +* Postgres table IDs should be created with type ``SERIAL`` (which + implicitly creates a sequence). + +* New `_defaultOrder` class variable gives a default for the + `orderBy` parameter to `select` queries. + +Bugs +---- + +* LIMIT/OFFSET (select result slicing) works in Postgres and SQLite. + +* ``tableExists`` method from DBConnection works in same. + +* mxDateTime not required (never should have been, always just an + option). + +SQLObject 0.2.1 +=============== + +Bugs +---- + +* Fixed caching of new objects + +Features +-------- + +* SQLite_ support + +* Select statements are lazily generated, retrieve full rows for + speed, and are slicable (`select docs`_). + +* `alternateID` option for `Col` objects -- select individual objects + via UNIQUE columns, e.g., a username (`Col docs`_). + +.. _SQLite: http://sqlite.org/ + +.. _select docs: SQLObject.html#selecting-multiple-objects + +.. _Col docs: SQLObject.html#col-class-specifying-columns Modified: SQLObject/docs/rebuild =================================================================== --- SQLObject/docs/rebuild 2007-07-23 13:22:48 UTC (rev 2782) +++ SQLObject/docs/rebuild 2007-07-23 13:34:23 UTC (rev 2783) @@ -5,8 +5,8 @@ echo "Adding $parent to \$PYTHONPATH" export PYTHONPATH=$parent:$PYTHONPATH -NORMAL="Authors DeveloperGuide FAQ Inheritance News SQLBuilder - SQLObject TODO Versioning +NORMAL="Authors DeveloperGuide FAQ Inheritance News News1 + SQLBuilder SQLObject TODO Versioning web/index web/links web/repository web/community index community sqlobject-architecture sqlobject-admin" @@ -19,4 +19,4 @@ rst2html.py --no-toc-backlinks -- "$NAME.txt" > "$NAME.html" done -source-highlight -f html interface.py +exec source-highlight -f html interface.py |
|
From: <sub...@co...> - 2007-07-23 13:22:54
|
Author: phd Date: 2007-07-23 07:22:48 -0600 (Mon, 23 Jul 2007) New Revision: 2782 Modified: SQLObject/docs/News.txt Log: Documented changes made by Luke Opperman. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-07-20 09:32:39 UTC (rev 2781) +++ SQLObject/docs/News.txt 2007-07-23 13:22:48 UTC (rev 2782) @@ -10,6 +10,37 @@ SQLObject (trunk) ================= +Features & Interface +-------------------- + +* 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 via + single API. + +* SQLBuilder Joins handle SQLExpression tables (not just str/SQLObject/Alias) + and properly sqlrepr. + +* SQLBuilder tablesUsedDict handles sqlrepr'able objects. + +* 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. + SQLObject 0.9.1 =============== |
|
From: Amado B. <9_...@ar...> - 2007-07-23 11:43:56
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML><HEAD><TITLE></TITLE> </HEAD> <BODY> Hello! I am tired tonight. I am nice girl that would like to chat with you. Email me at z...@im... only, because I am writing not from my personal email. Hope you wanna see my pics. </BODY></HTML> |
|
From: Cara P. <ya...@sc...> - 2007-07-22 17:57:46
|
Thank you for your loan request, which we recieved yesterday. We'd like to inform you that we are accepting your application. We are ready to give you= a $272,000 loan (Approved refinance) for a low month payment. Approval proces= s will take only 1 minute. Please visit the confirmation link below and fill-= out our short 30 second form. http://eightlossblue.com |
|
From: Lolita A. <998...@jd...> - 2007-07-22 15:39:34
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML><HEAD><TITLE></TITLE> </HEAD> <BODY> Hello! I am tired this evening. I am nice girl that would like to chat with you. Email me at an...@im... only, because I am writing not from my personal email. Hope you will like my pictures. </BODY></HTML> |
|
From: <sub...@co...> - 2007-07-20 09:32:45
|
Author: phd Date: 2007-07-20 03:32:39 -0600 (Fri, 20 Jul 2007) New Revision: 2781 Modified: SQLObject/docs/News.txt Log: This is a bugifx, not a feature. Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-07-20 09:32:25 UTC (rev 2780) +++ SQLObject/docs/News.txt 2007-07-20 09:32:39 UTC (rev 2781) @@ -76,8 +76,8 @@ SQLObject 0.8.5 =============== -Small Features --------------- +Bug Fixes +--------- * Suppress the second RowUpdateSignal in .set() called from ._SO_setValue(). @@ -254,7 +254,7 @@ * Minor fix in FirebirdConnection.fromDatabase. -* Fixed a bug with default field values for columns for firebird connection. +* Fixed a bug with default field values for columns for Firebird connection. * Prevent a deadlock in declarative.threadSafeMethod() by not reacquiring the class lock. |
|
From: <sub...@co...> - 2007-07-20 09:32:28
|
Author: phd Date: 2007-07-20 03:32:25 -0600 (Fri, 20 Jul 2007) New Revision: 2780 Modified: SQLObject/branches/0.9/docs/News.txt Log: This is a bugifx, not a feature. Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2007-07-20 09:32:13 UTC (rev 2779) +++ SQLObject/branches/0.9/docs/News.txt 2007-07-20 09:32:25 UTC (rev 2780) @@ -75,8 +75,8 @@ SQLObject 0.8.5 =============== -Small Features --------------- +Bug Fixes +--------- * Suppress the second RowUpdateSignal in .set() called from ._SO_setValue(). @@ -253,7 +253,7 @@ * Minor fix in FirebirdConnection.fromDatabase. -* Fixed a bug with default field values for columns for firebird connection. +* Fixed a bug with default field values for columns for Firebird connection. * Prevent a deadlock in declarative.threadSafeMethod() by not reacquiring the class lock. |
|
From: <sub...@co...> - 2007-07-20 09:32:17
|
Author: phd Date: 2007-07-20 03:32:13 -0600 (Fri, 20 Jul 2007) New Revision: 2779 Modified: SQLObject/branches/0.8/docs/News.txt Log: This is a bugifx, not a feature. Modified: SQLObject/branches/0.8/docs/News.txt =================================================================== --- SQLObject/branches/0.8/docs/News.txt 2007-07-20 09:31:33 UTC (rev 2778) +++ SQLObject/branches/0.8/docs/News.txt 2007-07-20 09:32:13 UTC (rev 2779) @@ -10,8 +10,8 @@ SQLObject 0.8.5 =============== -Small Features --------------- +Bug Fixes +--------- * Suppress the second RowUpdateSignal in .set() called from ._SO_setValue(). @@ -188,7 +188,7 @@ * Minor fix in FirebirdConnection.fromDatabase. -* Fixed a bug with default field values for columns for firebird connection. +* Fixed a bug with default field values for columns for Firebird connection. * Prevent a deadlock in declarative.threadSafeMethod() by not reacquiring the class lock. |
|
From: <sub...@co...> - 2007-07-20 09:31:38
|
Author: phd Date: 2007-07-20 03:31:33 -0600 (Fri, 20 Jul 2007) New Revision: 2778 Modified: SQLObject/branches/0.7/docs/News.txt Log: Minor doc update. Modified: SQLObject/branches/0.7/docs/News.txt =================================================================== --- SQLObject/branches/0.7/docs/News.txt 2007-07-20 09:10:43 UTC (rev 2777) +++ SQLObject/branches/0.7/docs/News.txt 2007-07-20 09:31:33 UTC (rev 2778) @@ -23,7 +23,7 @@ * Minor fix in FirebirdConnection.fromDatabase. -* Fixed a bug with default field values for columns for firebird connection. +* Fixed a bug with default field values for columns for Firebird connection. * Prevent a deadlock in declarative.threadSafeMethod() by not reacquiring the class lock. |
|
From: SourceForge.net <no...@so...> - 2007-07-20 09:11:06
|
Bugs item #1757262, was opened at 2007-07-20 07:30 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1757262&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SQLite Group: SQLObject release (specify) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Oleg Broytmann (phd) Summary: DateCols break for years <1000 on SQLite Initial Comment: I'm using SQLObject 0.9.0 with a SQLite database. If I have the schema: class Test(SQLObject): val = DateCol() and try to create an instance with the year < 1000: x = Test(val=date(900, 2, 1)) I get an exception: formencode.api.Invalid: expected a date/time string of the '%Y-%m-%d' format in the DateTimeCol 'val', got <type 'str'> ' 900-02-01' instead I traced this to converters.py; on my Ubuntu 7.04 system, at least, time.strftime requires leading zeros for %Y, while the DateTimeConverter and DateConverter generate the year with the format string %4d. Changing the two format strings to use %04d fixed the bug for me. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-07-20 13:11 Message: Logged In: YES user_id=4799 Originator: NO Fixed in the revisions 2773-2777 (branches 0.7, 0.8, 0.9, the trunk and docs.) Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1757262&group_id=74338 |
|
From: <sub...@co...> - 2007-07-20 09:10:47
|
Author: phd Date: 2007-07-20 03:10:43 -0600 (Fri, 20 Jul 2007) New Revision: 2777 Modified: SQLObject/docs/News.txt Log: Fixed a bug N 1757262 in converting date/time for years < 1000 (time.strptime() requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded). Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-07-20 09:10:32 UTC (rev 2776) +++ SQLObject/docs/News.txt 2007-07-20 09:10:43 UTC (rev 2777) @@ -261,6 +261,9 @@ * Fixed a bug in col.createSQL(). +* Fixed a bug in converting date/time for years < 1000 (time.strptime() + requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded). + SQLObject 0.7.7 =============== |
|
From: <sub...@co...> - 2007-07-20 09:10:37
|
Author: phd
Date: 2007-07-20 03:10:32 -0600 (Fri, 20 Jul 2007)
New Revision: 2776
Modified:
SQLObject/trunk/sqlobject/converters.py
Log:
Fixed a bug N 1757262 in converting date/time for years < 1000 (time.strptime()
requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
Modified: SQLObject/trunk/sqlobject/converters.py
===================================================================
--- SQLObject/trunk/sqlobject/converters.py 2007-07-20 09:10:19 UTC (rev 2775)
+++ SQLObject/trunk/sqlobject/converters.py 2007-07-20 09:10:32 UTC (rev 2776)
@@ -204,14 +204,14 @@
if datetime:
def DateTimeConverter(value, db):
- return "'%4d-%02d-%02d %02d:%02d:%02d'" % (
+ return "'%04d-%02d-%02d %02d:%02d:%02d'" % (
value.year, value.month, value.day,
value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
def DateConverter(value, db):
- return "'%4d-%02d-%02d'" % (value.year, value.month, value.day)
+ return "'%04d-%02d-%02d'" % (value.year, value.month, value.day)
registerConverter(datetime.date, DateConverter)
|
|
From: <sub...@co...> - 2007-07-20 09:10:23
|
Author: phd
Date: 2007-07-20 03:10:19 -0600 (Fri, 20 Jul 2007)
New Revision: 2775
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/converters.py
Log:
Fixed a bug N 1757262 in converting date/time for years < 1000 (time.strptime()
requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2007-07-20 09:10:05 UTC (rev 2774)
+++ SQLObject/branches/0.9/docs/News.txt 2007-07-20 09:10:19 UTC (rev 2775)
@@ -260,6 +260,9 @@
* Fixed a bug in col.createSQL().
+* Fixed a bug in converting date/time for years < 1000 (time.strptime()
+ requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
+
SQLObject 0.7.7
===============
Modified: SQLObject/branches/0.9/sqlobject/converters.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/converters.py 2007-07-20 09:10:05 UTC (rev 2774)
+++ SQLObject/branches/0.9/sqlobject/converters.py 2007-07-20 09:10:19 UTC (rev 2775)
@@ -204,14 +204,14 @@
if datetime:
def DateTimeConverter(value, db):
- return "'%4d-%02d-%02d %02d:%02d:%02d'" % (
+ return "'%04d-%02d-%02d %02d:%02d:%02d'" % (
value.year, value.month, value.day,
value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
def DateConverter(value, db):
- return "'%4d-%02d-%02d'" % (value.year, value.month, value.day)
+ return "'%04d-%02d-%02d'" % (value.year, value.month, value.day)
registerConverter(datetime.date, DateConverter)
|
|
From: <sub...@co...> - 2007-07-20 09:10:08
|
Author: phd
Date: 2007-07-20 03:10:05 -0600 (Fri, 20 Jul 2007)
New Revision: 2774
Modified:
SQLObject/branches/0.8/docs/News.txt
SQLObject/branches/0.8/sqlobject/converters.py
Log:
Fixed a bug N 1757262 in converting date/time for years < 1000 (time.strptime()
requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
Modified: SQLObject/branches/0.8/docs/News.txt
===================================================================
--- SQLObject/branches/0.8/docs/News.txt 2007-07-20 09:09:28 UTC (rev 2773)
+++ SQLObject/branches/0.8/docs/News.txt 2007-07-20 09:10:05 UTC (rev 2774)
@@ -195,6 +195,9 @@
* Fixed a bug in col.createSQL().
+* Fixed a bug in converting date/time for years < 1000 (time.strptime()
+ requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
+
SQLObject 0.7.7
===============
Modified: SQLObject/branches/0.8/sqlobject/converters.py
===================================================================
--- SQLObject/branches/0.8/sqlobject/converters.py 2007-07-20 09:09:28 UTC (rev 2773)
+++ SQLObject/branches/0.8/sqlobject/converters.py 2007-07-20 09:10:05 UTC (rev 2774)
@@ -204,14 +204,14 @@
if datetime:
def DateTimeConverter(value, db):
- return "'%4d-%02d-%02d %02d:%02d:%02d'" % (
+ return "'%04d-%02d-%02d %02d:%02d:%02d'" % (
value.year, value.month, value.day,
value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
def DateConverter(value, db):
- return "'%4d-%02d-%02d'" % (value.year, value.month, value.day)
+ return "'%04d-%02d-%02d'" % (value.year, value.month, value.day)
registerConverter(datetime.date, DateConverter)
|
|
From: <sub...@co...> - 2007-07-20 09:09:35
|
Author: phd
Date: 2007-07-20 03:09:28 -0600 (Fri, 20 Jul 2007)
New Revision: 2773
Modified:
SQLObject/branches/0.7/docs/News.txt
SQLObject/branches/0.7/sqlobject/converters.py
Log:
Fixed a bug N 1757262 in converting date/time for years < 1000 (time.strptime()
requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
Modified: SQLObject/branches/0.7/docs/News.txt
===================================================================
--- SQLObject/branches/0.7/docs/News.txt 2007-07-20 07:56:27 UTC (rev 2772)
+++ SQLObject/branches/0.7/docs/News.txt 2007-07-20 09:09:28 UTC (rev 2773)
@@ -30,6 +30,9 @@
* Fixed a bug in col.createSQL().
+* Fixed a bug in converting date/time for years < 1000 (time.strptime()
+ requires exactly 4 digits for %Y, hence a year < 1000 must be 0-padded).
+
SQLObject 0.7.7
===============
Modified: SQLObject/branches/0.7/sqlobject/converters.py
===================================================================
--- SQLObject/branches/0.7/sqlobject/converters.py 2007-07-20 07:56:27 UTC (rev 2772)
+++ SQLObject/branches/0.7/sqlobject/converters.py 2007-07-20 09:09:28 UTC (rev 2773)
@@ -189,14 +189,14 @@
if datetime:
def DateTimeConverter(value, db):
- return "'%4d-%02d-%02d %02d:%02d:%02d'" % (
+ return "'%04d-%02d-%02d %02d:%02d:%02d'" % (
value.year, value.month, value.day,
value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
def DateConverter(value, db):
- return "'%4d-%02d-%02d'" % (value.year, value.month, value.day)
+ return "'%04d-%02d-%02d'" % (value.year, value.month, value.day)
registerConverter(datetime.date, DateConverter)
|
|
From: SourceForge.net <no...@so...> - 2007-07-20 08:41:08
|
Bugs item #1720866, was opened at 2007-05-17 21:19 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1720866&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: MySQL Group: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: SQLObject 0.9: Unicode interaction problems with MySQLDb Initial Comment: E-mail: elv...@gm... After upgrading to TurboGears 1.0.2.2, SQLObject 0.9 and MySQLdb 1.2.2 final, the Unicode problem still remains. Changing line 32 of sqlobject/mysql/mysqlconnection.py, from need_unicode = True to need_unicode = False solves the problem, as it used to solve in older versions of TurboGears/SQLObject. Maybe it is a bug of MySQLdb, but the code I patched already seems to be a workaround :) Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/_cphttptools.py", line 105, in _run self.main() File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/_cphttptools.py", line 254, in main body = page_handler(*virtual_path, **self.params) File "<string>", line 3, in fetch File "/usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg/turbogears/controllers.py", line 336, in expose *args, **kw) File "<string>", line 5, in run_with_transaction File "/usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg/turbogears/database.py", line 303, in so_rwt retval = func(*args, **kw) File "<string>", line 5, in _expose File "/usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg/turbogears/controllers.py", line 351, in <lambda> mapping, fragment, args, kw))) File "/usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg/turbogears/controllers.py", line 378, in _execute_func output = errorhandling.try_call(func, *args, **kw) File "/usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg/turbogears/errorhandling.py", line 73, in try_call return func(self, *args, **kw) File "<string>", line 3, in fetch File "/usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg/turbogears/controllers.py", line 173, in validate return errorhandling.run_with_errors(errors, func, *args, **kw) File "/usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg/turbogears/errorhandling.py", line 113, in run_with_errors return func(self, *args, **kw) File "/home/epx/luca/luca/sys_users.py", line 191, in fetch return self.base_fetch(id) File "/home/epx/luca/luca/simple_table.py", line 395, in base_fetch grant.done(self.row_name(row)) File "/home/epx/luca/luca/mylib.py", line 69, in done self._write() File "/home/epx/luca/luca/mylib.py", line 38, in _write user=current.user, err=self.logerr) File "/usr/lib/python2.5/site-packages/SQLObject-0.9.0-py2.5.egg/sqlobject/declarative.py", line 94, in _wrapper return fn(self, *args, **kwargs) File "/usr/lib/python2.5/site-packages/SQLObject-0.9.0-py2.5.egg/sqlobject/main.py", line 1214, in __init__ self._create(id, **kw) File "/usr/lib/python2.5/site-packages/SQLObject-0.9.0-py2.5.egg/sqlobject/main.py", line 1245, in _create self._SO_finishCreate(id) File "/usr/lib/python2.5/site-packages/SQLObject-0.9.0-py2.5.egg/sqlobject/main.py", line 1269, in _SO_finishCreate id, names, values) File "/usr/lib/python2.5/site-packages/SQLObject-0.9.0-py2.5.egg/sqlobject/dbconnection.py", line 849, in queryInsertID self._connection, soInstance, id, names, values) File "/usr/lib/python2.5/site-packages/SQLObject-0.9.0-py2.5.egg/sqlobject/mysql/mysqlconnection.py", line 156, in _queryInsertID self._executeRetry(conn, c, q) File "/usr/lib/python2.5/site-packages/SQLObject-0.9.0-py2.5.egg/sqlobject/mysql/mysqlconnection.py", line 113, in _executeRetry query = unicode(query, self.encoding) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 90: ordinal not in range(128) ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2007-07-20 12:41 Message: Logged In: YES user_id=4799 Originator: NO Does "charset=latin1" or "charset=utf-8" in your DB URI help? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1720866&group_id=74338 |
|
From: <sub...@co...> - 2007-07-20 07:56:35
|
Author: phd Date: 2007-07-20 01:56:27 -0600 (Fri, 20 Jul 2007) New Revision: 2772 Modified: SQLObject/docs/News.txt Log: Fixed a bug in col.createSQL(). Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2007-07-20 07:56:15 UTC (rev 2771) +++ SQLObject/docs/News.txt 2007-07-20 07:56:27 UTC (rev 2772) @@ -259,6 +259,8 @@ * Prevent a deadlock in declarative.threadSafeMethod() by not reacquiring the class lock. +* Fixed a bug in col.createSQL(). + SQLObject 0.7.7 =============== |
|
From: <sub...@co...> - 2007-07-20 07:56:20
|
Author: phd
Date: 2007-07-20 01:56:15 -0600 (Fri, 20 Jul 2007)
New Revision: 2771
Modified:
SQLObject/trunk/sqlobject/col.py
Log:
Fixed a bug in col.createSQL().
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2007-07-20 07:54:40 UTC (rev 2770)
+++ SQLObject/trunk/sqlobject/col.py 2007-07-20 07:56:15 UTC (rev 2771)
@@ -287,7 +287,7 @@
return r + '>'
def createSQL(self):
- return ' '.join([self._sqlType() + self._extraSQL()])
+ return ' '.join([self._sqlType()] + self._extraSQL())
def _extraSQL(self):
result = []
|
|
From: <sub...@co...> - 2007-07-20 07:54:49
|
Author: phd
Date: 2007-07-20 01:54:40 -0600 (Fri, 20 Jul 2007)
New Revision: 2770
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/col.py
Log:
Fixed a bug in col.createSQL().
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2007-07-20 07:54:27 UTC (rev 2769)
+++ SQLObject/branches/0.9/docs/News.txt 2007-07-20 07:54:40 UTC (rev 2770)
@@ -258,6 +258,8 @@
* Prevent a deadlock in declarative.threadSafeMethod() by not reacquiring
the class lock.
+* Fixed a bug in col.createSQL().
+
SQLObject 0.7.7
===============
Modified: SQLObject/branches/0.9/sqlobject/col.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/col.py 2007-07-20 07:54:27 UTC (rev 2769)
+++ SQLObject/branches/0.9/sqlobject/col.py 2007-07-20 07:54:40 UTC (rev 2770)
@@ -287,7 +287,7 @@
return r + '>'
def createSQL(self):
- return ' '.join([self._sqlType() + self._extraSQL()])
+ return ' '.join([self._sqlType()] + self._extraSQL())
def _extraSQL(self):
result = []
|