sqlobject-cvs Mailing List for SQLObject (Page 66)
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...> - 2008-07-11 16:37:59
|
Author: phd Date: 2008-07-11 10:37:56 -0600 (Fri, 11 Jul 2008) New Revision: 3504 Modified: SQLObject/trunk/docs/Authors.txt SQLObject/trunk/sqlobject/col.py SQLObject/trunk/sqlobject/tests/test_decimal.py Log: DecimalStringValidator now supports quantization, thanks to Christopher Singley <csingley at gmail.com>. Modified: SQLObject/trunk/docs/Authors.txt =================================================================== --- SQLObject/trunk/docs/Authors.txt 2008-07-11 15:29:51 UTC (rev 3503) +++ SQLObject/trunk/docs/Authors.txt 2008-07-11 16:37:56 UTC (rev 3504) @@ -21,6 +21,7 @@ * David Turner, The Open Planning Project * Dan Pascu <dan at ag-projects.com> * Diez B. Roggisch <deets at web.de> +* Christopher Singley <csingley at gmail.com> * Oleg Broytmann <ph...@ph...> .. image:: http://sourceforge.net/sflogo.php?group_id=74338&type=4 Modified: SQLObject/trunk/sqlobject/col.py =================================================================== --- SQLObject/trunk/sqlobject/col.py 2008-07-11 15:29:51 UTC (rev 3503) +++ SQLObject/trunk/sqlobject/col.py 2008-07-11 16:37:56 UTC (rev 3504) @@ -1347,38 +1347,48 @@ class DecimalStringValidator(DecimalValidator): + def to_python(self, value, state): + value = super(DecimalStringValidator, self).to_python(value, state) + if self.precision and isinstance(value, Decimal): + assert value < self.max, \ + "Value must be less than %s" % int(self.max) + value = value.quantize(self.precision) + return value + def from_python(self, value, state): - if value is None: - return None - if isinstance(value, sqlbuilder.SQLExpression): - return value - if not isinstance(value, basestring): + value = super(DecimalStringValidator, self).from_python(value, state) + if isinstance(value, Decimal): + if self.precision: + assert value < self.max, \ + "Value must be less than %s" % int(self.max) + value = value.quantize(self.precision) + value = value.to_eng_string() + elif isinstance(value, (int, long)): value = str(value) - connection = state.soObject._connection - if hasattr(connection, "decimalSeparator"): - value = value.replace(connection.decimalSeparator, ".") - try: - Decimal(value) # Test if the value is valid - except: - raise validators.Invalid("can not parse Decimal value '%s' in the DecimalCol from '%s'" % - (value, getattr(state, 'soObject', '(unknown)')), value, state) - else: - return value + return value class SODecimalStringCol(SOStringCol): def __init__(self, **kw): - size = kw.pop('size', NoDefault) - assert size is not NoDefault, \ - "You must give a size argument" - precision = kw.pop('precision', NoDefault) - assert precision is not NoDefault, \ - "You must give a precision argument" - kw['length'] = size + precision + self.size = kw.pop('size', NoDefault) + assert (self.size is not NoDefault) and (self.size >= 0), \ + "You must give a size argument as a positive integer" + self.precision = kw.pop('precision', NoDefault) + assert (self.precision is not NoDefault) and (self.precision >= 0), \ + "You must give a precision argument as a positive integer" + kw['length'] = int(self.size) + int(self.precision) + self.quantize = kw.pop('quantize', False) + assert isinstance(self.quantize, bool), \ + "quantize argument must be Boolean True/False" super(SODecimalStringCol, self).__init__(**kw) def createValidators(self): - return [DecimalStringValidator()] + \ - super(SODecimalStringCol, self).createValidators() + if self.quantize: + v = DecimalStringValidator( + precision=Decimal(10) ** (-1 * int(self.precision)), + max=Decimal(10) ** (int(self.size) - int(self.precision))) + else: + v = DecimalStringValidator(precision=0) + return [v] + super(SODecimalStringCol, self).createValidators() class DecimalStringCol(StringCol): baseClass = SODecimalStringCol Modified: SQLObject/trunk/sqlobject/tests/test_decimal.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_decimal.py 2008-07-11 15:29:51 UTC (rev 3503) +++ SQLObject/trunk/sqlobject/tests/test_decimal.py 2008-07-11 16:37:56 UTC (rev 3504) @@ -11,27 +11,52 @@ class DecimalTable(SQLObject): name = UnicodeCol(length=255) col1 = DecimalCol(size=6, precision=4) + col2 = DecimalStringCol(size=6, precision=4) + col3 = DecimalStringCol(size=6, precision=4, quantize=True) if supports('decimalColumn'): def test_1_decimal(): setupClass(DecimalTable) - d = DecimalTable(name='test', col1=21.12) + d = DecimalTable(name='test', col1=21.12, col2='10.01', col3='10.01') # psycopg2 returns float as Decimal if isinstance(d.col1, Decimal): assert d.col1 == Decimal("21.12") else: assert d.col1 == 21.12 + assert d.col2 == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col2'].to_python('10.01', + d._SO_validatorState) == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col2'].from_python('10.01', + d._SO_validatorState) == "10.01" + assert d.col3 == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col3'].to_python('10.01', + d._SO_validatorState) == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col3'].from_python('10.01', + d._SO_validatorState) == "10.0100" def test_2_decimal(): setupClass(DecimalTable) - d = DecimalTable(name='test', col1=Decimal("21.12")) + d = DecimalTable(name='test', col1=Decimal("21.12"), + col2=Decimal('10.01'), col3=Decimal('10.01')) assert d.col1 == Decimal("21.12") + assert d.col2 == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col2'].to_python(Decimal('10.01'), + d._SO_validatorState) == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col2'].from_python(Decimal('10.01'), + d._SO_validatorState) == "10.01" + assert d.col3 == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col3'].to_python(Decimal('10.01'), + d._SO_validatorState) == Decimal("10.01") + assert DecimalTable.sqlmeta.columns['col3'].from_python(Decimal('10.01'), + d._SO_validatorState) == "10.0100" # See http://mail.python.org/pipermail/python-dev/2008-March/078189.html if isinstance(Decimal(u'123').to_eng_string(), unicode): # a bug in Python 2.5.2 def test_3_unicode(): setupClass(DecimalTable) - d = DecimalTable(name='test', col1=Decimal(u"21.12")) + d = DecimalTable(name='test', col1=Decimal(u"21.12"), + col2='10.01', col3='10.01') assert d.col1 == Decimal("21.12") - d = DecimalTable(name=unicode('', 'koi8-r'), col1=Decimal(u"21.12")) + d = DecimalTable(name=unicode('', 'koi8-r'), col1=Decimal(u"21.12"), + col2='10.01', col3='10.01') assert d.col1 == Decimal("21.12") |
|
From: <sub...@co...> - 2008-07-11 15:29:55
|
Author: phd Date: 2008-07-11 09:29:51 -0600 (Fri, 11 Jul 2008) New Revision: 3503 Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/converters.py SQLObject/trunk/sqlobject/tests/test_decimal.py Log: 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 Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-07-11 15:15:54 UTC (rev 3502) +++ SQLObject/trunk/docs/News.txt 2008-07-11 15:29:51 UTC (rev 3503) @@ -33,6 +33,11 @@ * DecimalStringCol - similar to DecimalCol but stores data as strings to work around problems in some drivers and type affinity problem in SQLite. +SQLObject 0.10.3 +================ + +* A number of changes ported from `SQLObject 0.9.8`_. + SQLObject 0.10.2 ================ @@ -119,6 +124,12 @@ * 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.8 +=============== + +* 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 + SQLObject 0.9.7 =============== Modified: SQLObject/trunk/sqlobject/converters.py =================================================================== --- SQLObject/trunk/sqlobject/converters.py 2008-07-11 15:15:54 UTC (rev 3502) +++ SQLObject/trunk/sqlobject/converters.py 2008-07-11 15:29:51 UTC (rev 3503) @@ -180,7 +180,8 @@ registerConverter(datetime.time, TimeConverter) def DecimalConverter(value, db): - return value.to_eng_string() + # See http://mail.python.org/pipermail/python-dev/2008-March/078189.html + return str(value.to_eng_string()) # Convert to str to work around a bug in Python 2.5.2 registerConverter(Decimal, DecimalConverter) Modified: SQLObject/trunk/sqlobject/tests/test_decimal.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_decimal.py 2008-07-11 15:15:54 UTC (rev 3502) +++ SQLObject/trunk/sqlobject/tests/test_decimal.py 2008-07-11 15:29:51 UTC (rev 3503) @@ -1,3 +1,5 @@ +# -*- coding: koi8-r -*- + from decimal import Decimal from sqlobject import * from sqlobject.tests.dbtest import * @@ -7,25 +9,29 @@ ######################################## class DecimalTable(SQLObject): + name = UnicodeCol(length=255) col1 = DecimalCol(size=6, precision=4) - col2 = DecimalStringCol(size=6, precision=4) if supports('decimalColumn'): def test_1_decimal(): setupClass(DecimalTable) - d = DecimalTable(col1=21.12, col2='10.01') + d = DecimalTable(name='test', col1=21.12) # psycopg2 returns float as Decimal if isinstance(d.col1, Decimal): assert d.col1 == Decimal("21.12") else: assert d.col1 == 21.12 - assert d.col2 == Decimal("10.01") def test_2_decimal(): setupClass(DecimalTable) - d = DecimalTable(col1=Decimal("21.12"), col2=Decimal('10.01')) - if isinstance(d.col1, Decimal): + d = DecimalTable(name='test', col1=Decimal("21.12")) + assert d.col1 == Decimal("21.12") + + # See http://mail.python.org/pipermail/python-dev/2008-March/078189.html + if isinstance(Decimal(u'123').to_eng_string(), unicode): # a bug in Python 2.5.2 + def test_3_unicode(): + setupClass(DecimalTable) + d = DecimalTable(name='test', col1=Decimal(u"21.12")) assert d.col1 == Decimal("21.12") - else: - assert d.col1 == 21.12 - assert d.col2 == Decimal("10.01") + d = DecimalTable(name=unicode('', 'koi8-r'), col1=Decimal(u"21.12")) + assert d.col1 == Decimal("21.12") |
|
From: <sub...@co...> - 2008-07-11 15:15:58
|
Author: phd Date: 2008-07-11 09:15:54 -0600 (Fri, 11 Jul 2008) New Revision: 3502 Modified: SQLObject/branches/0.10/docs/News.txt SQLObject/branches/0.10/sqlobject/converters.py SQLObject/branches/0.10/sqlobject/tests/test_decimal.py Log: 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 Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-07-11 15:11:29 UTC (rev 3501) +++ SQLObject/branches/0.10/docs/News.txt 2008-07-11 15:15:54 UTC (rev 3502) @@ -7,6 +7,11 @@ .. _start: +SQLObject 0.10.3 +================ + +* A number of changes ported from `SQLObject 0.9.8`_. + SQLObject 0.10.2 ================ @@ -93,6 +98,12 @@ * Under MySQL, PickleCol no longer uses TEXT column types; the smallest column is now BLOB - it is not possible to create TINYBLOB column. +SQLObject 0.9.8 +=============== + +* 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 + SQLObject 0.9.7 =============== Modified: SQLObject/branches/0.10/sqlobject/converters.py =================================================================== --- SQLObject/branches/0.10/sqlobject/converters.py 2008-07-11 15:11:29 UTC (rev 3501) +++ SQLObject/branches/0.10/sqlobject/converters.py 2008-07-11 15:15:54 UTC (rev 3502) @@ -194,7 +194,8 @@ if Decimal: def DecimalConverter(value, db): - return value.to_eng_string() + # See http://mail.python.org/pipermail/python-dev/2008-March/078189.html + return str(value.to_eng_string()) # Convert to str to work around a bug in Python 2.5.2 registerConverter(Decimal, DecimalConverter) Modified: SQLObject/branches/0.10/sqlobject/tests/test_decimal.py =================================================================== --- SQLObject/branches/0.10/sqlobject/tests/test_decimal.py 2008-07-11 15:11:29 UTC (rev 3501) +++ SQLObject/branches/0.10/sqlobject/tests/test_decimal.py 2008-07-11 15:15:54 UTC (rev 3502) @@ -1,3 +1,5 @@ +# -*- coding: koi8-r -*- + from sqlobject import * from sqlobject.tests.dbtest import * @@ -11,13 +13,14 @@ ######################################## class DecimalTable(SQLObject): + name = UnicodeCol(length=255) col1 = DecimalCol(size=6, precision=4) if supports('decimalColumn'): def test_1_decimal(): """Tests new instance with a float in col1.""" setupClass(DecimalTable) - d = DecimalTable(col1=21.12) + d = DecimalTable(name='test', col1=21.12) if Decimal: assert d.col1 == Decimal("21.12") else: @@ -27,5 +30,14 @@ def test_2_decimal(): """Tests new instance with a Decimal in col1.""" setupClass(DecimalTable) - d = DecimalTable(col1=Decimal("21.12")) + d = DecimalTable(name='test', col1=Decimal("21.12")) assert d.col1 == Decimal("21.12") + + # See http://mail.python.org/pipermail/python-dev/2008-March/078189.html + if isinstance(Decimal(u'123').to_eng_string(), unicode): # a bug in Python 2.5.2 + def test_3_unicode(): + setupClass(DecimalTable) + d = DecimalTable(name='test', col1=Decimal(u"21.12")) + assert d.col1 == Decimal("21.12") + d = DecimalTable(name=unicode('', 'koi8-r'), col1=Decimal(u"21.12")) + assert d.col1 == Decimal("21.12") |
|
From: <sub...@co...> - 2008-07-11 15:11:33
|
Author: phd Date: 2008-07-11 09:11:29 -0600 (Fri, 11 Jul 2008) New Revision: 3501 Modified: SQLObject/branches/0.9/docs/News.txt SQLObject/branches/0.9/sqlobject/converters.py SQLObject/branches/0.9/sqlobject/tests/test_decimal.py Log: 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 Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2008-07-04 04:47:17 UTC (rev 3500) +++ SQLObject/branches/0.9/docs/News.txt 2008-07-11 15:11:29 UTC (rev 3501) @@ -7,6 +7,12 @@ .. _start: +SQLObject 0.9.8 +=============== + +* 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 + SQLObject 0.9.7 =============== Modified: SQLObject/branches/0.9/sqlobject/converters.py =================================================================== --- SQLObject/branches/0.9/sqlobject/converters.py 2008-07-04 04:47:17 UTC (rev 3500) +++ SQLObject/branches/0.9/sqlobject/converters.py 2008-07-11 15:11:29 UTC (rev 3501) @@ -222,7 +222,8 @@ if Decimal: def DecimalConverter(value, db): - return value.to_eng_string() + # See http://mail.python.org/pipermail/python-dev/2008-March/078189.html + return str(value.to_eng_string()) # Convert to str to work around a bug in Python 2.5.2 registerConverter(Decimal, DecimalConverter) Modified: SQLObject/branches/0.9/sqlobject/tests/test_decimal.py =================================================================== --- SQLObject/branches/0.9/sqlobject/tests/test_decimal.py 2008-07-04 04:47:17 UTC (rev 3500) +++ SQLObject/branches/0.9/sqlobject/tests/test_decimal.py 2008-07-11 15:11:29 UTC (rev 3501) @@ -1,3 +1,5 @@ +# -*- coding: koi8-r -*- + from sqlobject import * from sqlobject.tests.dbtest import * @@ -11,13 +13,14 @@ ######################################## class DecimalTable(SQLObject): + name = UnicodeCol(length=255) col1 = DecimalCol(size=6, precision=4) if supports('decimalColumn'): def test_1_decimal(): """Tests new instance with a float in col1.""" setupClass(DecimalTable) - d = DecimalTable(col1=21.12) + d = DecimalTable(name='test', col1=21.12) if Decimal: assert d.col1 == Decimal("21.12") else: @@ -27,5 +30,14 @@ def test_2_decimal(): """Tests new instance with a Decimal in col1.""" setupClass(DecimalTable) - d = DecimalTable(col1=Decimal("21.12")) + d = DecimalTable(name='test', col1=Decimal("21.12")) assert d.col1 == Decimal("21.12") + + # See http://mail.python.org/pipermail/python-dev/2008-March/078189.html + if isinstance(Decimal(u'123').to_eng_string(), unicode): # a bug in Python 2.5.2 + def test_3_unicode(): + setupClass(DecimalTable) + d = DecimalTable(name='test', col1=Decimal(u"21.12")) + assert d.col1 == Decimal("21.12") + d = DecimalTable(name=unicode('', 'koi8-r'), col1=Decimal(u"21.12")) + assert d.col1 == Decimal("21.12") |
|
From: SourceForge.net <no...@so...> - 2008-07-08 05:08:22
|
Patches item #2013132, was opened at 2008-07-08 05:08 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=2013132&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: None Group: None Status: Open Resolution: None Priority: 5 Private: Yes Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: HashCol type for passwords and the like Initial Comment: This is some fairly simple code for a 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 great 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. The attached code could pretty neatly be slotted right into col.py within the source. sam...@gm... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=2013132&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2008-07-03 15:26:35
|
Bugs item #2009801, was opened at 2008-07-03 15:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2009801&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: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: sqlobject-admin fails to process sqlite database with enums Initial Comment: Seen in both 10.1 and 10.2, installed via setuptools. The problem occurs when running a command such as... ====== sqlobject-admin record --output-dir=sqlobject-history ====== ... using a sqlite database that has enum types. The symptoms are that an infinite loop is reached and executes until an out of memory exception occurs: ====== Creating version 2008-07-03 Making directory sqlobject-history/2008-07-03 Python(3304,0xa0237fa0) malloc: *** mmap(size=1140854784) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Traceback (most recent call last): File "/usr/local/bin/sqlobject-admin", line 5, in <module> pkg_resources.run_script('SQLObject==0.10.2', 'sqlobject-admin') File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 442, in run_script self.require(requires)[0].run_script(script_name, ns) File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 1160, in run_script execfile(script_filename, namespace, namespace) File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/EGG-INFO/scripts/sqlobject-admin", line 35, in <module> command.the_runner.run(sys.argv) File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/sqlobject/manager/command.py", line 101, in run runner.run() File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/sqlobject/manager/command.py", line 307, in run self.command() File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/sqlobject/manager/command.py", line 1015, in command diffs = db_differences(cls, conn) File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/sqlobject/manager/command.py", line 55, in db_differences soClass) File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/sqlobject/sqlite/sqliteconnection.py", line 286, in columnsFromSchema return self._columnsFromSchemaParse(tableName, soClass) File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/sqlobject/sqlite/sqliteconnection.py", line 313, in _columnsFromSchemaParse colData = colData[:st] + colData[en+1:] MemoryError ====== The problem is specifically in sqliteconnection.py, on or around line 313 with the following loop: ====== while colData.find('(') > -1: st = colData.find('(') en = colData.find(')') colData = colData[:st] + colData[en+1:] ====== When this code processes colData with the following value: ====== CREATE TABLE test_table ( id INTEGER PRIMARY KEY, test_enum VARCHAR (9) CHECK (test_enum in ('available', 'reserved', 'used')), test_string VARCHAR (64) UNIQUE ) ====== After an iteration or so, colData will have the following value (still valid): ====== id INTEGER PRIMARY KEY, test_enum VARCHAR CHECK (test_enum in ('available', 'reserved', 'used')), test_string VARCHAR (64) UNIQUE ====== Now comes the problem. During this iteration, st will get the index of the first open paren on the enum line, and en will get the index of the first close paren on the enum line. This is incorrect. The correct behavior is for en to get the index of the second close paren on the enum line. This incorrect behavior results in the following new value for colData: ====== id INTEGER PRIMARY KEY, test_enum VARCHAR CHECK ), test_string VARCHAR (64) UNIQUE ====== en from this point on continuously gets the index of that close paren left behind on the enum line, while st gets the index of the open paren on the following line... blowing up the file. At a minimum, doing en = colData.find(')', st) will prevent it from blowing up, although this isn't technically correct behavior, since it will still leave behind that close paren. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2009801&group_id=74338 |
|
From: <sub...@co...> - 2008-07-01 16:27:47
|
Author: phd Date: 2008-07-01 10:27:44 -0600 (Tue, 01 Jul 2008) New Revision: 3498 Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/SQLObject.txt SQLObject/trunk/sqlobject/col.py SQLObject/trunk/sqlobject/tests/test_decimal.py Log: DecimalStringCol - similar to DecimalCol but stores data as strings to work around problems in some drivers and type affinity problem in SQLite. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-07-01 16:26:34 UTC (rev 3497) +++ SQLObject/trunk/docs/News.txt 2008-07-01 16:27:44 UTC (rev 3498) @@ -30,6 +30,9 @@ * Use reversed() in manager/command.py instead of .__reversed__(). +* DecimalStringCol - similar to DecimalCol but stores data as strings to + work around problems in some drivers and type affinity problem in SQLite. + SQLObject 0.10.2 ================ Modified: SQLObject/trunk/docs/SQLObject.txt =================================================================== --- SQLObject/trunk/docs/SQLObject.txt 2008-07-01 16:26:34 UTC (rev 3497) +++ SQLObject/trunk/docs/SQLObject.txt 2008-07-01 16:27:44 UTC (rev 3498) @@ -1135,6 +1135,10 @@ .. _`type affinity`: http://sqlite.org/datatype3.html#affinity +`DecimalStringCol`: + Similar to `DecimalCol` but stores data as strings to work around + problems in some drivers and type affinity problem in SQLite. + `EnumCol`: One of several string values -- give the possible strings as a list, with the `enumValues` keyword argument. MySQL has a native Modified: SQLObject/trunk/sqlobject/col.py =================================================================== --- SQLObject/trunk/sqlobject/col.py 2008-07-01 16:26:34 UTC (rev 3497) +++ SQLObject/trunk/sqlobject/col.py 2008-07-01 16:27:44 UTC (rev 3498) @@ -1346,6 +1346,44 @@ baseClass = SOCurrencyCol +class DecimalStringValidator(DecimalValidator): + def from_python(self, value, state): + if value is None: + return None + if isinstance(value, sqlbuilder.SQLExpression): + return value + if not isinstance(value, basestring): + value = str(value) + connection = state.soObject._connection + if hasattr(connection, "decimalSeparator"): + value = value.replace(connection.decimalSeparator, ".") + try: + Decimal(value) # Test if the value is valid + except: + raise validators.Invalid("can not parse Decimal value '%s' in the DecimalCol from '%s'" % + (value, getattr(state, 'soObject', '(unknown)')), value, state) + else: + return value + +class SODecimalStringCol(SOStringCol): + def __init__(self, **kw): + size = kw.pop('size', NoDefault) + assert size is not NoDefault, \ + "You must give a size argument" + precision = kw.pop('precision', NoDefault) + assert precision is not NoDefault, \ + "You must give a precision argument" + kw['length'] = size + precision + super(SODecimalStringCol, self).__init__(**kw) + + def createValidators(self): + return [DecimalStringValidator()] + \ + super(SODecimalStringCol, self).createValidators() + +class DecimalStringCol(StringCol): + baseClass = SODecimalStringCol + + class BinaryValidator(validators.Validator): """ Validator for binary types. Modified: SQLObject/trunk/sqlobject/tests/test_decimal.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_decimal.py 2008-07-01 16:26:34 UTC (rev 3497) +++ SQLObject/trunk/sqlobject/tests/test_decimal.py 2008-07-01 16:27:44 UTC (rev 3498) @@ -8,23 +8,24 @@ class DecimalTable(SQLObject): col1 = DecimalCol(size=6, precision=4) + col2 = DecimalStringCol(size=6, precision=4) if supports('decimalColumn'): - def test_1decimal(): - """Tests new instance with a float in col1.""" + def test_1_decimal(): setupClass(DecimalTable) - d = DecimalTable(col1=21.12) + d = DecimalTable(col1=21.12, col2='10.01') # psycopg2 returns float as Decimal if isinstance(d.col1, Decimal): assert d.col1 == Decimal("21.12") else: assert d.col1 == 21.12 + assert d.col2 == Decimal("10.01") - def test_2Decimal(): - """Tests new instance with a Decimal in col1.""" + def test_2_decimal(): setupClass(DecimalTable) - d = DecimalTable(col1=Decimal("21.12")) + d = DecimalTable(col1=Decimal("21.12"), col2=Decimal('10.01')) if isinstance(d.col1, Decimal): assert d.col1 == Decimal("21.12") else: assert d.col1 == 21.12 + assert d.col2 == Decimal("10.01") |
|
From: <sub...@co...> - 2008-07-01 16:26:35
|
Author: phd
Date: 2008-07-01 10:26:34 -0600 (Tue, 01 Jul 2008)
New Revision: 3497
Modified:
SQLObject/branches/0.10/sqlobject/tests/test_decimal.py
Log:
SQLObject always converts values to Decimal.
Modified: SQLObject/branches/0.10/sqlobject/tests/test_decimal.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/tests/test_decimal.py 2008-07-01 16:25:01 UTC (rev 3496)
+++ SQLObject/branches/0.10/sqlobject/tests/test_decimal.py 2008-07-01 16:26:34 UTC (rev 3497)
@@ -14,22 +14,18 @@
col1 = DecimalCol(size=6, precision=4)
if supports('decimalColumn'):
- def test_1decimal():
+ def test_1_decimal():
"""Tests new instance with a float in col1."""
setupClass(DecimalTable)
d = DecimalTable(col1=21.12)
- # psycopg2 returns float as Decimal
- if Decimal and isinstance(d.col1, Decimal):
+ if Decimal:
assert d.col1 == Decimal("21.12")
else:
assert d.col1 == 21.12
if Decimal:
- def test_2Decimal():
+ def test_2_decimal():
"""Tests new instance with a Decimal in col1."""
setupClass(DecimalTable)
d = DecimalTable(col1=Decimal("21.12"))
- if isinstance(d.col1, Decimal):
- assert d.col1 == Decimal("21.12")
- else:
- assert d.col1 == 21.12
+ assert d.col1 == Decimal("21.12")
|
|
From: <sub...@co...> - 2008-07-01 16:25:08
|
Author: phd
Date: 2008-07-01 10:25:01 -0600 (Tue, 01 Jul 2008)
New Revision: 3496
Modified:
SQLObject/branches/0.9/sqlobject/tests/test_decimal.py
Log:
SQLObject always converts values to Decimal.
Modified: SQLObject/branches/0.9/sqlobject/tests/test_decimal.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/tests/test_decimal.py 2008-06-25 16:05:45 UTC (rev 3495)
+++ SQLObject/branches/0.9/sqlobject/tests/test_decimal.py 2008-07-01 16:25:01 UTC (rev 3496)
@@ -14,22 +14,18 @@
col1 = DecimalCol(size=6, precision=4)
if supports('decimalColumn'):
- def test_1decimal():
+ def test_1_decimal():
"""Tests new instance with a float in col1."""
setupClass(DecimalTable)
d = DecimalTable(col1=21.12)
- # psycopg2 returns float as Decimal
- if Decimal and isinstance(d.col1, Decimal):
+ if Decimal:
assert d.col1 == Decimal("21.12")
else:
assert d.col1 == 21.12
if Decimal:
- def test_2Decimal():
+ def test_2_decimal():
"""Tests new instance with a Decimal in col1."""
setupClass(DecimalTable)
d = DecimalTable(col1=Decimal("21.12"))
- if isinstance(d.col1, Decimal):
- assert d.col1 == Decimal("21.12")
- else:
- assert d.col1 == 21.12
+ assert d.col1 == Decimal("21.12")
|
|
From: SourceForge.net <no...@so...> - 2008-07-01 00:13:46
|
Patches item #2007233, was opened at 2008-07-01 00:13 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=2007233&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: More testing for styles Initial Comment: I've written some more tests for the built-in styles, in anticipation of adding customizable ForeignKey naming. In any case, these tests will help guarantee that the naming stays consistent. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=2007233&group_id=74338 |
|
From: <sub...@co...> - 2008-05-30 15:21:01
|
Author: phd Date: 2008-05-30 09:20:31 -0600 (Fri, 30 May 2008) New Revision: 3487 Modified: SQLObject/trunk/docs/index.txt Log: Removed a link to a dead wiki. Modified: SQLObject/trunk/docs/index.txt =================================================================== --- SQLObject/trunk/docs/index.txt 2008-05-30 15:20:12 UTC (rev 3486) +++ SQLObject/trunk/docs/index.txt 2008-05-30 15:20:31 UTC (rev 3487) @@ -13,7 +13,6 @@ * `Download <download.html>`_ * `Mailing list, bugs, etc. <community.html>`_ * `Related projects and articles <links.html>`_ -* `Wiki and tracker <http://sqlobject.gcu.info/trac>`_ Documentation ============= |
|
From: <sub...@co...> - 2008-05-30 15:20:33
|
Author: phd Date: 2008-05-30 09:20:12 -0600 (Fri, 30 May 2008) New Revision: 3486 Modified: SQLObject/branches/0.10/docs/index.txt Log: Removed a link to a dead wiki. Modified: SQLObject/branches/0.10/docs/index.txt =================================================================== --- SQLObject/branches/0.10/docs/index.txt 2008-05-30 15:19:43 UTC (rev 3485) +++ SQLObject/branches/0.10/docs/index.txt 2008-05-30 15:20:12 UTC (rev 3486) @@ -13,7 +13,6 @@ * `Download <download.html>`_ * `Mailing list, bugs, etc. <community.html>`_ * `Related projects and articles <links.html>`_ -* `Wiki and tracker <http://sqlobject.gcu.info/trac>`_ Documentation ============= |
|
From: <sub...@co...> - 2008-05-30 15:19:51
|
Author: phd Date: 2008-05-30 09:19:43 -0600 (Fri, 30 May 2008) New Revision: 3485 Modified: SQLObject/branches/0.9/docs/index.txt Log: Removed a link to a dead wiki. Modified: SQLObject/branches/0.9/docs/index.txt =================================================================== --- SQLObject/branches/0.9/docs/index.txt 2008-05-30 12:22:59 UTC (rev 3484) +++ SQLObject/branches/0.9/docs/index.txt 2008-05-30 15:19:43 UTC (rev 3485) @@ -13,7 +13,6 @@ * `Download <download.html>`_ * `Mailing list, bugs, etc. <community.html>`_ * `Related projects and articles <links.html>`_ -* `Wiki and tracker <http://sqlobject.gcu.info/trac>`_ Documentation ============= |
|
From: <sub...@co...> - 2008-05-30 12:23:13
|
Author: phd Date: 2008-05-30 06:22:59 -0600 (Fri, 30 May 2008) New Revision: 3484 Modified: SQLObject/tags/0.10.2/setup.cfg SQLObject/tags/0.10.2/setup.py SQLObject/tags/0.10.2/sqlobject/__init__.py SQLObject/tags/0.10.2/sqlobject/main.py Log: Version 0.10.2. Modified: SQLObject/tags/0.10.2/setup.cfg =================================================================== --- SQLObject/tags/0.10.2/setup.cfg 2008-05-30 12:21:46 UTC (rev 3483) +++ SQLObject/tags/0.10.2/setup.cfg 2008-05-30 12:22:59 UTC (rev 3484) @@ -5,10 +5,6 @@ [easy_install] #find_links = http://svn.pythonpaste.org/package_index.html -[egg_info] -tag_build = dev -tag_svn_revision = true - [pudge] theme = pythonpaste.org docs = docs/index.txt docs/Authors.txt docs/DeveloperGuide.txt docs/FAQ.txt Modified: SQLObject/tags/0.10.2/setup.py =================================================================== --- SQLObject/tags/0.10.2/setup.py 2008-05-30 12:21:46 UTC (rev 3483) +++ SQLObject/tags/0.10.2/setup.py 2008-05-30 12:22:59 UTC (rev 3484) @@ -21,7 +21,7 @@ """ setup(name="SQLObject", - version="0.10", + version="0.10.2", description="Object-Relational Manager, aka database wrapper", long_description="""\ SQLObject is a popular *Object Relational Manager* for providing an @@ -49,7 +49,7 @@ author="Ian Bicking", author_email="ia...@co...", url="http://sqlobject.org/", - download_url="http://cheeseshop.python.org/pypi/SQLObject/0.10", + download_url="http://cheeseshop.python.org/pypi/SQLObject/0.10.2", license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], scripts=["scripts/sqlobject-admin"], Modified: SQLObject/tags/0.10.2/sqlobject/__init__.py =================================================================== --- SQLObject/tags/0.10.2/sqlobject/__init__.py 2008-05-30 12:21:46 UTC (rev 3483) +++ SQLObject/tags/0.10.2/sqlobject/__init__.py 2008-05-30 12:22:59 UTC (rev 3484) @@ -1,5 +1,5 @@ """ -SQLObject 0.10 +SQLObject 0.10.2 """ from main import * Modified: SQLObject/tags/0.10.2/sqlobject/main.py =================================================================== --- SQLObject/tags/0.10.2/sqlobject/main.py 2008-05-30 12:21:46 UTC (rev 3483) +++ SQLObject/tags/0.10.2/sqlobject/main.py 2008-05-30 12:22:59 UTC (rev 3484) @@ -1,6 +1,6 @@ """ -SQLObject 0.10 --------------- +SQLObject 0.10.2 +---------------- :author: Ian Bicking <ia...@co...> |
|
From: <sub...@co...> - 2008-05-30 12:21:51
|
Author: phd Date: 2008-05-30 06:21:46 -0600 (Fri, 30 May 2008) New Revision: 3483 Added: SQLObject/tags/0.10.2/ Log: Tagging 0.10.2 Copied: SQLObject/tags/0.10.2 (from rev 3482, SQLObject/branches/0.10) |
|
From: <sub...@co...> - 2008-05-30 12:21:12
|
Author: phd Date: 2008-05-30 06:21:08 -0600 (Fri, 30 May 2008) New Revision: 3482 Modified: SQLObject/trunk/docs/News.txt Log: SQLObject 0.10.2 released 30 May 2008. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-05-30 12:20:39 UTC (rev 3481) +++ SQLObject/trunk/docs/News.txt 2008-05-30 12:21:08 UTC (rev 3482) @@ -33,6 +33,8 @@ SQLObject 0.10.2 ================ +Released 30 May 2008. + * A number of changes ported from `SQLObject 0.9.7`_. SQLObject 0.10.1 |
|
From: <sub...@co...> - 2008-05-30 12:20:42
|
Author: phd Date: 2008-05-30 06:20:39 -0600 (Fri, 30 May 2008) New Revision: 3481 Modified: SQLObject/branches/0.10/docs/News.txt Log: SQLObject 0.10.2 released 30 May 2008. Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-05-30 12:18:03 UTC (rev 3480) +++ SQLObject/branches/0.10/docs/News.txt 2008-05-30 12:20:39 UTC (rev 3481) @@ -10,6 +10,8 @@ SQLObject 0.10.2 ================ +Released 30 May 2008. + * A number of changes ported from `SQLObject 0.9.7`_. SQLObject 0.10.1 |
|
From: <sub...@co...> - 2008-05-30 12:18:07
|
Author: phd Date: 2008-05-30 06:18:03 -0600 (Fri, 30 May 2008) New Revision: 3480 Modified: SQLObject/tags/0.9.7/setup.cfg SQLObject/tags/0.9.7/setup.py SQLObject/tags/0.9.7/sqlobject/__init__.py SQLObject/tags/0.9.7/sqlobject/main.py Log: Version 0.9.7. Modified: SQLObject/tags/0.9.7/setup.cfg =================================================================== --- SQLObject/tags/0.9.7/setup.cfg 2008-05-30 12:16:38 UTC (rev 3479) +++ SQLObject/tags/0.9.7/setup.cfg 2008-05-30 12:18:03 UTC (rev 3480) @@ -5,10 +5,6 @@ [easy_install] #find_links = http://svn.pythonpaste.org/package_index.html -[egg_info] -tag_build = dev -tag_svn_revision = true - [pudge] theme = pythonpaste.org docs = docs/index.txt docs/SQLObject.txt docs/TODO.txt Modified: SQLObject/tags/0.9.7/setup.py =================================================================== --- SQLObject/tags/0.9.7/setup.py 2008-05-30 12:16:38 UTC (rev 3479) +++ SQLObject/tags/0.9.7/setup.py 2008-05-30 12:18:03 UTC (rev 3480) @@ -28,7 +28,7 @@ """ setup(name="SQLObject", - version="0.9", + version="0.9.7", description="Object-Relational Manager, aka database wrapper", long_description="""\ SQLObject is a popular *Object Relational Manager* for providing an @@ -56,7 +56,7 @@ author="Ian Bicking", author_email="ia...@co...", url="http://sqlobject.org/", - download_url="http://cheeseshop.python.org/pypi/SQLObject/0.9", + download_url="http://cheeseshop.python.org/pypi/SQLObject/0.9.7", license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], scripts=["scripts/sqlobject-admin"], Modified: SQLObject/tags/0.9.7/sqlobject/__init__.py =================================================================== --- SQLObject/tags/0.9.7/sqlobject/__init__.py 2008-05-30 12:16:38 UTC (rev 3479) +++ SQLObject/tags/0.9.7/sqlobject/__init__.py 2008-05-30 12:18:03 UTC (rev 3480) @@ -1,5 +1,5 @@ """ -SQLObject 0.9 +SQLObject 0.9.7 """ from main import * Modified: SQLObject/tags/0.9.7/sqlobject/main.py =================================================================== --- SQLObject/tags/0.9.7/sqlobject/main.py 2008-05-30 12:16:38 UTC (rev 3479) +++ SQLObject/tags/0.9.7/sqlobject/main.py 2008-05-30 12:18:03 UTC (rev 3480) @@ -1,6 +1,6 @@ """ -SQLObject 0.9 -------------- +SQLObject 0.9.7 +--------------- :author: Ian Bicking <ia...@co...> |
|
From: <sub...@co...> - 2008-05-30 12:16:43
|
Author: phd Date: 2008-05-30 06:16:38 -0600 (Fri, 30 May 2008) New Revision: 3479 Added: SQLObject/tags/0.9.7/ Log: Tagging 0.9.7 Copied: SQLObject/tags/0.9.7 (from rev 3478, SQLObject/branches/0.9) |
|
From: <sub...@co...> - 2008-05-30 12:16:13
|
Author: phd Date: 2008-05-30 06:16:02 -0600 (Fri, 30 May 2008) New Revision: 3478 Modified: SQLObject/trunk/docs/News.txt Log: SQLObject 0.9.7 released 30 May 2008. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-05-30 12:15:34 UTC (rev 3477) +++ SQLObject/trunk/docs/News.txt 2008-05-30 12:16:02 UTC (rev 3478) @@ -117,6 +117,8 @@ SQLObject 0.9.7 =============== +Released 30 May 2008. + Small Features -------------- |
|
From: <sub...@co...> - 2008-05-30 12:15:37
|
Author: phd Date: 2008-05-30 06:15:34 -0600 (Fri, 30 May 2008) New Revision: 3477 Modified: SQLObject/branches/0.10/docs/News.txt Log: SQLObject 0.9.7 released 30 May 2008. Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-05-30 12:15:04 UTC (rev 3476) +++ SQLObject/branches/0.10/docs/News.txt 2008-05-30 12:15:34 UTC (rev 3477) @@ -94,6 +94,8 @@ SQLObject 0.9.7 =============== +Released 30 May 2008. + Small Features -------------- |
|
From: <sub...@co...> - 2008-05-30 12:15:11
|
Author: phd Date: 2008-05-30 06:15:04 -0600 (Fri, 30 May 2008) New Revision: 3476 Modified: SQLObject/branches/0.9/docs/News.txt Log: SQLObject 0.9.7 released 30 May 2008. Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2008-05-29 22:49:20 UTC (rev 3475) +++ SQLObject/branches/0.9/docs/News.txt 2008-05-30 12:15:04 UTC (rev 3476) @@ -10,6 +10,8 @@ SQLObject 0.9.7 =============== +Released 30 May 2008. + Small Features -------------- |
|
From: <sub...@co...> - 2008-05-26 15:11:12
|
Author: phd
Date: 2008-05-26 09:11:07 -0600 (Mon, 26 May 2008)
New Revision: 3469
Modified:
SQLObject/trunk/docs/SQLObject.txt
Log:
Added a note about type affinity in SQLite.
Modified: SQLObject/trunk/docs/SQLObject.txt
===================================================================
--- SQLObject/trunk/docs/SQLObject.txt 2008-05-26 15:10:16 UTC (rev 3468)
+++ SQLObject/trunk/docs/SQLObject.txt 2008-05-26 15:11:07 UTC (rev 3469)
@@ -1126,11 +1126,15 @@
number of digits stored, and `precision` for the number of digits
after the decimal point.
WARNING: it may happen that DecimalCol values, although correctly
- stored in the DB, are returned as floats instead of decimals.
+ stored in the DB, are returned as floats instead of decimals. For
+ example, due to the `type affinity`_ SQLite stores decimals as integers
+ or floats (NUMERIC storage class).
You should test with your database adapter, and you should try
importing the Decimal type and your DB adapter before importing
SQLObject.
+.. _`type affinity`: http://sqlite.org/datatype3.html#affinity
+
`EnumCol`:
One of several string values -- give the possible strings as a
list, with the `enumValues` keyword argument. MySQL has a native
|
|
From: <sub...@co...> - 2008-05-26 15:10:24
|
Author: phd
Date: 2008-05-26 09:10:16 -0600 (Mon, 26 May 2008)
New Revision: 3468
Modified:
SQLObject/branches/0.10/docs/SQLObject.txt
Log:
Added a note about type affinity in SQLite.
Modified: SQLObject/branches/0.10/docs/SQLObject.txt
===================================================================
--- SQLObject/branches/0.10/docs/SQLObject.txt 2008-05-26 15:09:23 UTC (rev 3467)
+++ SQLObject/branches/0.10/docs/SQLObject.txt 2008-05-26 15:10:16 UTC (rev 3468)
@@ -1115,11 +1115,15 @@
number of digits stored, and `precision` for the number of digits
after the decimal point.
WARNING: it may happen that DecimalCol values, although correctly
- stored in the DB, are returned as floats instead of decimals.
+ stored in the DB, are returned as floats instead of decimals. For
+ example, due to the `type affinity`_ SQLite stores decimals as integers
+ or floats (NUMERIC storage class).
You should test with your database adapter, and you should try
importing the Decimal type and your DB adapter before importing
SQLObject.
+.. _`type affinity`: http://sqlite.org/datatype3.html#affinity
+
`EnumCol`:
One of several string values -- give the possible strings as a
list, with the `enumValues` keyword argument. MySQL has a native
|
|
From: <sub...@co...> - 2008-05-26 15:09:31
|
Author: phd
Date: 2008-05-26 09:09:23 -0600 (Mon, 26 May 2008)
New Revision: 3467
Modified:
SQLObject/branches/0.9/docs/SQLObject.txt
Log:
Added a note about type affinity in SQLite.
Modified: SQLObject/branches/0.9/docs/SQLObject.txt
===================================================================
--- SQLObject/branches/0.9/docs/SQLObject.txt 2008-05-23 12:33:55 UTC (rev 3466)
+++ SQLObject/branches/0.9/docs/SQLObject.txt 2008-05-26 15:09:23 UTC (rev 3467)
@@ -1097,11 +1097,15 @@
number of digits stored, and `precision` for the number of digits
after the decimal point.
WARNING: it may happen that DecimalCol values, although correctly
- stored in the DB, are returned as floats instead of decimals.
+ stored in the DB, are returned as floats instead of decimals. For
+ example, due to the `type affinity`_ SQLite stores decimals as integers
+ or floats (NUMERIC storage class).
You should test with your database adapter, and you should try
importing the Decimal type and your DB adapter before importing
SQLObject.
+.. _`type affinity`: http://sqlite.org/datatype3.html#affinity
+
`EnumCol`:
One of several string values -- give the possible strings as a
list, with the `enumValues` keyword argument. MySQL has a native
|