sqlobject-cvs Mailing List for SQLObject (Page 68)
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-05-19 14:54:37
|
Author: phd
Date: 2008-05-19 08:53:49 -0600 (Mon, 19 May 2008)
New Revision: 3433
Added:
SQLObject/branches/0.9/sqlobject/tests/test_aggregates.py
Removed:
SQLObject/branches/0.9/sqlobject/tests/test_minmax.py
Modified:
SQLObject/branches/0.9/docs/News.txt
SQLObject/branches/0.9/sqlobject/sresults.py
Log:
Aggregate functions now honors 'distinct'.
Modified: SQLObject/branches/0.9/docs/News.txt
===================================================================
--- SQLObject/branches/0.9/docs/News.txt 2008-05-16 19:07:12 UTC (rev 3432)
+++ SQLObject/branches/0.9/docs/News.txt 2008-05-19 14:53:49 UTC (rev 3433)
@@ -7,6 +7,11 @@
.. _start:
+SQLObject 0.9.7
+===============
+
+* Aggregate functions now honors 'distinct'.
+
SQLObject 0.9.6
===============
Modified: SQLObject/branches/0.9/sqlobject/sresults.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/sresults.py 2008-05-16 19:07:12 UTC (rev 3432)
+++ SQLObject/branches/0.9/sqlobject/sresults.py 2008-05-19 14:53:49 UTC (rev 3433)
@@ -209,11 +209,15 @@
or a dot-q attribute (like Table.q.aColumn)
"""
expressions = []
+ conn = self._getConnection()
+ if self.ops.get('distinct'):
+ distinct = 'DISTINCT '
+ else:
+ distinct = ''
for func_name, attribute in attributes:
- if type(attribute) == StringType:
- expression = '%s(%s)' % (func_name, attribute)
- else:
- expression = getattr(sqlbuilder.func, func_name)(attribute)
+ if not isinstance(attribute, str):
+ attribute = conn.sqlrepr(attribute)
+ expression = '%s(%s%s)' % (func_name, distinct, attribute)
expressions.append(expression)
return self.accumulate(*expressions)
Copied: SQLObject/branches/0.9/sqlobject/tests/test_aggregates.py (from rev 3406, SQLObject/branches/0.9/sqlobject/tests/test_minmax.py)
===================================================================
--- SQLObject/branches/0.9/sqlobject/tests/test_aggregates.py (rev 0)
+++ SQLObject/branches/0.9/sqlobject/tests/test_aggregates.py 2008-05-19 14:53:49 UTC (rev 3433)
@@ -0,0 +1,67 @@
+from sqlobject import *
+from sqlobject.tests.dbtest import *
+
+# Test MIN, AVG, MAX, COUNT, SUM
+
+
+class IntAccumulator(SQLObject):
+ value = IntCol()
+
+
+class FloatAccumulator(SQLObject):
+ value = FloatCol()
+
+
+def test_integer():
+ setupClass(IntAccumulator)
+ IntAccumulator(value=1)
+ IntAccumulator(value=2)
+ IntAccumulator(value=3)
+
+ assert IntAccumulator.select().min(IntAccumulator.q.value) == 1
+ assert IntAccumulator.select().avg(IntAccumulator.q.value) == 2
+ assert IntAccumulator.select().max(IntAccumulator.q.value) == 3
+ assert IntAccumulator.select().sum(IntAccumulator.q.value) == 6
+
+ assert IntAccumulator.select(IntAccumulator.q.value > 1).max(IntAccumulator.q.value) == 3
+ assert IntAccumulator.select(IntAccumulator.q.value > 1).sum(IntAccumulator.q.value) == 5
+
+
+def floatcmp(f1, f2):
+ if abs(f1-f2) < 0.1:
+ return 0
+ if f1 < f2:
+ return 1
+ return -1
+
+def test_float():
+ setupClass(FloatAccumulator)
+ FloatAccumulator(value=1.2)
+ FloatAccumulator(value=2.4)
+ FloatAccumulator(value=3.8)
+
+ assert floatcmp(FloatAccumulator.select().min(FloatAccumulator.q.value), 1.2) == 0
+ assert floatcmp(FloatAccumulator.select().avg(FloatAccumulator.q.value), 2.5) == 0
+ assert floatcmp(FloatAccumulator.select().max(FloatAccumulator.q.value), 3.8) == 0
+ assert floatcmp(FloatAccumulator.select().sum(FloatAccumulator.q.value), 7.4) == 0
+
+
+def test_many():
+ setupClass(IntAccumulator)
+ IntAccumulator(value=1)
+ IntAccumulator(value=1)
+ IntAccumulator(value=2)
+ IntAccumulator(value=2)
+ IntAccumulator(value=3)
+ IntAccumulator(value=3)
+
+ attribute = IntAccumulator.q.value
+ assert IntAccumulator.select().accumulateMany(
+ ("MIN", attribute), ("AVG", attribute), ("MAX", attribute),
+ ("COUNT", attribute), ("SUM", attribute)
+ ) == (1, 2, 3, 6, 12)
+
+ assert IntAccumulator.select(distinct=True).accumulateMany(
+ ("MIN", attribute), ("AVG", attribute), ("MAX", attribute),
+ ("COUNT", attribute), ("SUM", attribute)
+ ) == (1, 2, 3, 3, 6)
Deleted: SQLObject/branches/0.9/sqlobject/tests/test_minmax.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/tests/test_minmax.py 2008-05-16 19:07:12 UTC (rev 3432)
+++ SQLObject/branches/0.9/sqlobject/tests/test_minmax.py 2008-05-19 14:53:49 UTC (rev 3433)
@@ -1,59 +0,0 @@
-from sqlobject import *
-from sqlobject.tests.dbtest import *
-
-# Test MIN, AVG, MAX, SUM
-
-
-class IntAccumulator(SQLObject):
- value = IntCol()
-
-
-class FloatAccumulator(SQLObject):
- value = FloatCol()
-
-
-def test_integer():
- setupClass(IntAccumulator)
- IntAccumulator(value=1)
- IntAccumulator(value=2)
- IntAccumulator(value=3)
-
- assert IntAccumulator.select().min(IntAccumulator.q.value) == 1
- assert IntAccumulator.select().avg(IntAccumulator.q.value) == 2
- assert IntAccumulator.select().max(IntAccumulator.q.value) == 3
- assert IntAccumulator.select().sum(IntAccumulator.q.value) == 6
-
- assert IntAccumulator.select(IntAccumulator.q.value > 1).max(IntAccumulator.q.value) == 3
- assert IntAccumulator.select(IntAccumulator.q.value > 1).sum(IntAccumulator.q.value) == 5
-
-
-def floatcmp(f1, f2):
- if abs(f1-f2) < 0.1:
- return 0
- if f1 < f2:
- return 1
- return -1
-
-def test_float():
- setupClass(FloatAccumulator)
- FloatAccumulator(value=1.2)
- FloatAccumulator(value=2.4)
- FloatAccumulator(value=3.8)
-
- assert floatcmp(FloatAccumulator.select().min(FloatAccumulator.q.value), 1.2) == 0
- assert floatcmp(FloatAccumulator.select().avg(FloatAccumulator.q.value), 2.5) == 0
- assert floatcmp(FloatAccumulator.select().max(FloatAccumulator.q.value), 3.8) == 0
- assert floatcmp(FloatAccumulator.select().sum(FloatAccumulator.q.value), 7.4) == 0
-
-
-def test_many():
- setupClass(IntAccumulator)
- IntAccumulator(value=1)
- IntAccumulator(value=2)
- IntAccumulator(value=3)
-
- select = IntAccumulator.select()
- attribute = IntAccumulator.q.value
- assert select.accumulateMany(
- ("MIN", attribute), ("AVG", attribute), ("MAX", attribute)
- ) == (1, 2, 3)
|
|
From: <sub...@co...> - 2008-05-04 14:08:40
|
Author: phd Date: 2008-05-04 08:08:34 -0600 (Sun, 04 May 2008) New Revision: 3413 Modified: SQLObject/tags/0.10.1/setup.cfg SQLObject/tags/0.10.1/setup.py SQLObject/tags/0.10.1/sqlobject/__init__.py SQLObject/tags/0.10.1/sqlobject/main.py Log: Version 0.10.1, stable. Modified: SQLObject/tags/0.10.1/setup.cfg =================================================================== --- SQLObject/tags/0.10.1/setup.cfg 2008-05-04 14:07:14 UTC (rev 3412) +++ SQLObject/tags/0.10.1/setup.cfg 2008-05-04 14:08:34 UTC (rev 3413) @@ -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.1/setup.py =================================================================== --- SQLObject/tags/0.10.1/setup.py 2008-05-04 14:07:14 UTC (rev 3412) +++ SQLObject/tags/0.10.1/setup.py 2008-05-04 14:08:34 UTC (rev 3413) @@ -21,7 +21,7 @@ """ setup(name="SQLObject", - version="0.10", + version="0.10.1", 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.1", license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], scripts=["scripts/sqlobject-admin"], Modified: SQLObject/tags/0.10.1/sqlobject/__init__.py =================================================================== --- SQLObject/tags/0.10.1/sqlobject/__init__.py 2008-05-04 14:07:14 UTC (rev 3412) +++ SQLObject/tags/0.10.1/sqlobject/__init__.py 2008-05-04 14:08:34 UTC (rev 3413) @@ -1,5 +1,5 @@ """ -SQLObject 0.10 +SQLObject 0.10.1 """ from main import * Modified: SQLObject/tags/0.10.1/sqlobject/main.py =================================================================== --- SQLObject/tags/0.10.1/sqlobject/main.py 2008-05-04 14:07:14 UTC (rev 3412) +++ SQLObject/tags/0.10.1/sqlobject/main.py 2008-05-04 14:08:34 UTC (rev 3413) @@ -1,6 +1,6 @@ """ -SQLObject 0.10 --------------- +SQLObject 0.10.1 +---------------- :author: Ian Bicking <ia...@co...> |
|
From: <sub...@co...> - 2008-05-04 14:07:21
|
Author: phd Date: 2008-05-04 08:07:14 -0600 (Sun, 04 May 2008) New Revision: 3412 Added: SQLObject/tags/0.10.1/ Log: Tagging 0.10.1 Copied: SQLObject/tags/0.10.1 (from rev 3411, SQLObject/branches/0.10) |
|
From: <sub...@co...> - 2008-05-04 14:06:55
|
Author: phd Date: 2008-05-04 08:06:48 -0600 (Sun, 04 May 2008) New Revision: 3411 Modified: SQLObject/trunk/docs/News.txt Log: SQLObject 0.10.1 released 4 May 2008. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-05-04 14:05:46 UTC (rev 3410) +++ SQLObject/trunk/docs/News.txt 2008-05-04 14:06:48 UTC (rev 3411) @@ -36,6 +36,8 @@ SQLObject 0.10.1 ================ +Released 4 May 2008. + * Fixed a bug: limit doesn't work in sqlbuilder.Select. * A number of changes ported from `SQLObject 0.9.6`_. |
|
From: <sub...@co...> - 2008-05-04 14:05:53
|
Author: phd Date: 2008-05-04 08:05:46 -0600 (Sun, 04 May 2008) New Revision: 3410 Modified: SQLObject/branches/0.10/docs/News.txt Log: SQLObject 0.10.1 released 4 May 2008. Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-05-04 14:02:19 UTC (rev 3409) +++ SQLObject/branches/0.10/docs/News.txt 2008-05-04 14:05:46 UTC (rev 3410) @@ -10,6 +10,8 @@ SQLObject 0.10.1 ================ +Released 4 May 2008. + * Fixed a bug: limit doesn't work in sqlbuilder.Select. * A number of changes ported from `SQLObject 0.9.6`_. |
|
From: <sub...@co...> - 2008-05-04 14:02:24
|
Author: phd Date: 2008-05-04 08:02:19 -0600 (Sun, 04 May 2008) New Revision: 3409 Modified: SQLObject/trunk/docs/News.txt Log: SQLObject 0.9.6 released 4 May 2008. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-05-04 14:01:42 UTC (rev 3408) +++ SQLObject/trunk/docs/News.txt 2008-05-04 14:02:19 UTC (rev 3409) @@ -113,6 +113,8 @@ SQLObject 0.9.6 =============== +Released 4 May 2008. + * A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). |
|
From: <sub...@co...> - 2008-05-04 14:01:49
|
Author: phd Date: 2008-05-04 08:01:42 -0600 (Sun, 04 May 2008) New Revision: 3408 Modified: SQLObject/branches/0.10/docs/News.txt Log: SQLObject 0.9.6 released 4 May 2008. Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-05-04 14:01:02 UTC (rev 3407) +++ SQLObject/branches/0.10/docs/News.txt 2008-05-04 14:01:42 UTC (rev 3408) @@ -87,6 +87,8 @@ SQLObject 0.9.6 =============== +Released 4 May 2008. + * A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). |
|
From: <sub...@co...> - 2008-05-04 14:01:08
|
Author: phd Date: 2008-05-04 08:01:02 -0600 (Sun, 04 May 2008) New Revision: 3407 Modified: SQLObject/tags/0.9.6/docs/News.txt SQLObject/tags/0.9.6/setup.cfg SQLObject/tags/0.9.6/setup.py SQLObject/tags/0.9.6/sqlobject/__init__.py SQLObject/tags/0.9.6/sqlobject/main.py Log: SQLObject 0.9.6 released 4 May 2008. Modified: SQLObject/tags/0.9.6/docs/News.txt =================================================================== --- SQLObject/tags/0.9.6/docs/News.txt 2008-05-04 13:58:50 UTC (rev 3406) +++ SQLObject/tags/0.9.6/docs/News.txt 2008-05-04 14:01:02 UTC (rev 3407) @@ -10,6 +10,8 @@ SQLObject 0.9.6 =============== +Released 4 May 2008. + * A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). Modified: SQLObject/tags/0.9.6/setup.cfg =================================================================== --- SQLObject/tags/0.9.6/setup.cfg 2008-05-04 13:58:50 UTC (rev 3406) +++ SQLObject/tags/0.9.6/setup.cfg 2008-05-04 14:01:02 UTC (rev 3407) @@ -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.6/setup.py =================================================================== --- SQLObject/tags/0.9.6/setup.py 2008-05-04 13:58:50 UTC (rev 3406) +++ SQLObject/tags/0.9.6/setup.py 2008-05-04 14:01:02 UTC (rev 3407) @@ -28,7 +28,7 @@ """ setup(name="SQLObject", - version="0.9", + version="0.9.6", 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.6", license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], scripts=["scripts/sqlobject-admin"], Modified: SQLObject/tags/0.9.6/sqlobject/__init__.py =================================================================== --- SQLObject/tags/0.9.6/sqlobject/__init__.py 2008-05-04 13:58:50 UTC (rev 3406) +++ SQLObject/tags/0.9.6/sqlobject/__init__.py 2008-05-04 14:01:02 UTC (rev 3407) @@ -1,5 +1,5 @@ """ -SQLObject 0.9 +SQLObject 0.9.6 """ from main import * Modified: SQLObject/tags/0.9.6/sqlobject/main.py =================================================================== --- SQLObject/tags/0.9.6/sqlobject/main.py 2008-05-04 13:58:50 UTC (rev 3406) +++ SQLObject/tags/0.9.6/sqlobject/main.py 2008-05-04 14:01:02 UTC (rev 3407) @@ -1,6 +1,6 @@ """ -SQLObject 0.9 -------------- +SQLObject 0.9.6 +--------------- :author: Ian Bicking <ia...@co...> |
|
From: <sub...@co...> - 2008-05-04 13:58:56
|
Author: phd Date: 2008-05-04 07:58:50 -0600 (Sun, 04 May 2008) New Revision: 3406 Modified: SQLObject/branches/0.9/docs/News.txt Log: SQLObject 0.9.6 released 4 May 2008. Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2008-05-04 13:56:43 UTC (rev 3405) +++ SQLObject/branches/0.9/docs/News.txt 2008-05-04 13:58:50 UTC (rev 3406) @@ -10,6 +10,8 @@ SQLObject 0.9.6 =============== +Released 4 May 2008. + * A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). |
|
From: <sub...@co...> - 2008-05-04 13:56:51
|
Author: phd Date: 2008-05-04 07:56:43 -0600 (Sun, 04 May 2008) New Revision: 3405 Added: SQLObject/tags/0.9.6/ Log: Tagging 0.9.6 Copied: SQLObject/tags/0.9.6 (from rev 3404, SQLObject/branches/0.9) |
|
From: SourceForge.net <no...@so...> - 2008-04-29 14:32:15
|
Bugs item #1953896, was opened at 2008-04-29 09:38 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1953896&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: General Group: SQLObject release (specify) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: RicMoo (ricmoo) >Assigned to: Oleg Broytmann (phd) Summary: Limit doesn't work in sqlbuilder Initial Comment: There is a name error in the sqlbuilder for the Select class. Line 674 of sqlbuilder (0.10.0) reads: end = start + limit And no variable is named limit. Instead, it should be: end = start + self.ops['limit'] If you try to use limit in a Select() constructor, you receive a NameError when you request the SQL be generated. I have made this change locally to my version, and it works wonderfully, however I am not sure how to create patches. Hopefully somemone will pick this up as low hanging fruit. Thanks, RicMoo ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2008-04-29 18:31 Message: Logged In: YES user_id=4799 Originator: NO Fixed in the revisions 3402, 3403 (branch 0.10 and the trunk). Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1953896&group_id=74338 |
|
From: <sub...@co...> - 2008-04-29 14:31:16
|
Author: phd
Date: 2008-04-29 08:30:40 -0600 (Tue, 29 Apr 2008)
New Revision: 3403
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/sqlbuilder.py
Log:
Fixed a bug N 1953896 : Limit doesn't work in sqlbuilder.Select.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2008-04-29 14:27:56 UTC (rev 3402)
+++ SQLObject/trunk/docs/News.txt 2008-04-29 14:30:40 UTC (rev 3403)
@@ -36,6 +36,8 @@
SQLObject 0.10.1
================
+* Fixed a bug: limit doesn't work in sqlbuilder.Select.
+
* A number of changes ported from `SQLObject 0.9.6`_.
SQLObject 0.10.0
Modified: SQLObject/trunk/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlbuilder.py 2008-04-29 14:27:56 UTC (rev 3402)
+++ SQLObject/trunk/sqlobject/sqlbuilder.py 2008-04-29 14:30:40 UTC (rev 3403)
@@ -689,7 +689,7 @@
select += " ORDER BY %s" % sqlrepr(reverser(orderBy), db)
start, end = self.ops['start'], self.ops['end']
if self.ops['limit'] is not NoDefault:
- end = start + limit
+ end = start + self.ops['limit']
if start or end:
from dbconnection import dbConnectionForScheme
select = dbConnectionForScheme(db)._queryAddLimitOffset(select, start, end)
|
|
From: <sub...@co...> - 2008-04-29 14:28:53
|
Author: phd
Date: 2008-04-29 08:27:56 -0600 (Tue, 29 Apr 2008)
New Revision: 3402
Modified:
SQLObject/branches/0.10/docs/News.txt
SQLObject/branches/0.10/sqlobject/sqlbuilder.py
Log:
Fixed a bug N 1953896 : Limit doesn't work in sqlbuilder.Select.
Modified: SQLObject/branches/0.10/docs/News.txt
===================================================================
--- SQLObject/branches/0.10/docs/News.txt 2008-04-29 14:18:48 UTC (rev 3401)
+++ SQLObject/branches/0.10/docs/News.txt 2008-04-29 14:27:56 UTC (rev 3402)
@@ -10,6 +10,8 @@
SQLObject 0.10.1
================
+* Fixed a bug: limit doesn't work in sqlbuilder.Select.
+
* A number of changes ported from `SQLObject 0.9.6`_.
SQLObject 0.10.0
Modified: SQLObject/branches/0.10/sqlobject/sqlbuilder.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/sqlbuilder.py 2008-04-29 14:18:48 UTC (rev 3401)
+++ SQLObject/branches/0.10/sqlobject/sqlbuilder.py 2008-04-29 14:27:56 UTC (rev 3402)
@@ -671,7 +671,7 @@
select += " ORDER BY %s" % sqlrepr(reverser(orderBy), db)
start, end = self.ops['start'], self.ops['end']
if self.ops['limit'] is not NoDefault:
- end = start + limit
+ end = start + self.ops['limit']
if start or end:
from dbconnection import dbConnectionForScheme
select = dbConnectionForScheme(db)._queryAddLimitOffset(select, start, end)
|
|
From: <sub...@co...> - 2008-04-29 14:19:45
|
Author: phd Date: 2008-04-29 08:18:33 -0600 (Tue, 29 Apr 2008) New Revision: 3400 Modified: SQLObject/branches/0.10/docs/News.txt Log: Corrected English grammar. Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-04-29 14:18:00 UTC (rev 3399) +++ SQLObject/branches/0.10/docs/News.txt 2008-04-29 14:18:33 UTC (rev 3400) @@ -85,7 +85,7 @@ SQLObject 0.9.6 =============== -* A bug in inheritable delColumn() that doesn't removes properties was fixed. +* A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). |
|
From: <sub...@co...> - 2008-04-29 14:19:38
|
Author: phd Date: 2008-04-29 08:18:48 -0600 (Tue, 29 Apr 2008) New Revision: 3401 Modified: SQLObject/trunk/docs/News.txt Log: Corrected English grammar. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-04-29 14:18:33 UTC (rev 3400) +++ SQLObject/trunk/docs/News.txt 2008-04-29 14:18:48 UTC (rev 3401) @@ -111,7 +111,7 @@ SQLObject 0.9.6 =============== -* A bug in inheritable delColumn() that doesn't removes properties was fixed. +* A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). |
|
From: <sub...@co...> - 2008-04-29 14:18:51
|
Author: phd Date: 2008-04-29 08:18:00 -0600 (Tue, 29 Apr 2008) New Revision: 3399 Modified: SQLObject/branches/0.9/docs/News.txt Log: Corrected English grammar. Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2008-04-29 14:14:57 UTC (rev 3398) +++ SQLObject/branches/0.9/docs/News.txt 2008-04-29 14:18:00 UTC (rev 3399) @@ -10,7 +10,7 @@ SQLObject 0.9.6 =============== -* A bug in inheritable delColumn() that doesn't removes properties was fixed. +* A bug in inheritable delColumn() that doesn't remove properties was fixed. * A minor bug was fixed in col.py - the registry must be passed to findClass(). |
|
From: <sub...@co...> - 2008-04-29 14:15:38
|
Author: phd Date: 2008-04-29 08:14:57 -0600 (Tue, 29 Apr 2008) New Revision: 3398 Modified: SQLObject/trunk/docs/News.txt Log: I forgot to update News. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2008-04-29 14:14:04 UTC (rev 3397) +++ SQLObject/trunk/docs/News.txt 2008-04-29 14:14:57 UTC (rev 3398) @@ -33,6 +33,11 @@ Bug Fixes --------- +SQLObject 0.10.1 +================ + +* A number of changes ported from `SQLObject 0.9.6`_. + SQLObject 0.10.0 ================ |
|
From: <sub...@co...> - 2008-04-29 14:15:05
|
Author: phd Date: 2008-04-29 08:14:04 -0600 (Tue, 29 Apr 2008) New Revision: 3397 Modified: SQLObject/branches/0.10/docs/News.txt Log: I forgot to update News. Modified: SQLObject/branches/0.10/docs/News.txt =================================================================== --- SQLObject/branches/0.10/docs/News.txt 2008-04-24 06:47:45 UTC (rev 3396) +++ SQLObject/branches/0.10/docs/News.txt 2008-04-29 14:14:04 UTC (rev 3397) @@ -7,6 +7,11 @@ .. _start: +SQLObject 0.10.1 +================ + +* A number of changes ported from `SQLObject 0.9.6`_. + SQLObject 0.10.0 ================ |
|
From: SourceForge.net <no...@so...> - 2008-04-29 05:38:57
|
Bugs item #1953896, was opened at 2008-04-28 22:38 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=1953896&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: General Group: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: RicMoo (ricmoo) Assigned to: Nobody/Anonymous (nobody) Summary: Limit doesn't work in sqlbuilder Initial Comment: There is a name error in the sqlbuilder for the Select class. Line 674 of sqlbuilder (0.10.0) reads: end = start + limit And no variable is named limit. Instead, it should be: end = start + self.ops['limit'] If you try to use limit in a Select() constructor, you receive a NameError when you request the SQL be generated. I have made this change locally to my version, and it works wonderfully, however I am not sure how to create patches. Hopefully somemone will pick this up as low hanging fruit. Thanks, RicMoo ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1953896&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2008-04-16 18:28:18
|
Patches item #1944231, was opened at 2008-04-16 21:44 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1944231&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: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Matthew Wilson (mw44118) >Assigned to: Oleg Broytmann (phd) Summary: Corrected some bad spelling in docstring Initial Comment: This is a trivial change to a docstring. I corrected the spelling. $ svn diff Index: sqlobject/manager/command.py =================================================================== --- sqlobject/manager/command.py (revision 3382) +++ sqlobject/manager/command.py (working copy) @@ -874,7 +874,7 @@ help = ('Record state of table definitions. The state of each ' 'table is written out to a separate file in a directory, ' 'and that directory forms a "version". A table is also ' - 'added to you datebase (%s) that reflects the version the ' + 'added to your database (%s) that reflects the version the ' 'database is currently at. Use the upgrade command to ' 'sync databases with code.' % SQLObjectVersionTable.sqlmeta.table) ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2008-04-16 22:28 Message: Logged In: YES user_id=4799 Originator: NO Applied and committed in the revisions 3383-3385 (branches 0.9, 0.10 and the trunk). Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1944231&group_id=74338 |
|
From: <sub...@co...> - 2008-04-16 18:28:03
|
Author: phd
Date: 2008-04-16 12:27:58 -0600 (Wed, 16 Apr 2008)
New Revision: 3385
Modified:
SQLObject/trunk/sqlobject/manager/command.py
Log:
Applied the patch N 1944231: Corrected some bad spelling in docstring.
Modified: SQLObject/trunk/sqlobject/manager/command.py
===================================================================
--- SQLObject/trunk/sqlobject/manager/command.py 2008-04-16 18:26:22 UTC (rev 3384)
+++ SQLObject/trunk/sqlobject/manager/command.py 2008-04-16 18:27:58 UTC (rev 3385)
@@ -874,7 +874,7 @@
help = ('Record state of table definitions. The state of each '
'table is written out to a separate file in a directory, '
'and that directory forms a "version". A table is also '
- 'added to you datebase (%s) that reflects the version the '
+ 'added to your datebase (%s) that reflects the version the '
'database is currently at. Use the upgrade command to '
'sync databases with code.'
% SQLObjectVersionTable.sqlmeta.table)
|
|
From: <sub...@co...> - 2008-04-16 18:26:29
|
Author: phd
Date: 2008-04-16 12:26:22 -0600 (Wed, 16 Apr 2008)
New Revision: 3384
Modified:
SQLObject/branches/0.10/sqlobject/manager/command.py
Log:
Applied the patch N 1944231: Corrected some bad spelling in docstring.
Modified: SQLObject/branches/0.10/sqlobject/manager/command.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/manager/command.py 2008-04-16 18:25:16 UTC (rev 3383)
+++ SQLObject/branches/0.10/sqlobject/manager/command.py 2008-04-16 18:26:22 UTC (rev 3384)
@@ -876,7 +876,7 @@
help = ('Record state of table definitions. The state of each '
'table is written out to a separate file in a directory, '
'and that directory forms a "version". A table is also '
- 'added to you datebase (%s) that reflects the version the '
+ 'added to your datebase (%s) that reflects the version the '
'database is currently at. Use the upgrade command to '
'sync databases with code.'
% SQLObjectVersionTable.sqlmeta.table)
|
|
From: <sub...@co...> - 2008-04-16 18:25:25
|
Author: phd
Date: 2008-04-16 12:25:16 -0600 (Wed, 16 Apr 2008)
New Revision: 3383
Modified:
SQLObject/branches/0.9/sqlobject/manager/command.py
Log:
Applied the patch N 1944231: Corrected some bad spelling in docstring.
Modified: SQLObject/branches/0.9/sqlobject/manager/command.py
===================================================================
--- SQLObject/branches/0.9/sqlobject/manager/command.py 2008-04-14 14:38:46 UTC (rev 3382)
+++ SQLObject/branches/0.9/sqlobject/manager/command.py 2008-04-16 18:25:16 UTC (rev 3383)
@@ -876,7 +876,7 @@
help = ('Record state of table definitions. The state of each '
'table is written out to a separate file in a directory, '
'and that directory forms a "version". A table is also '
- 'added to you datebase (%s) that reflects the version the '
+ 'added to your datebase (%s) that reflects the version the '
'database is currently at. Use the upgrade command to '
'sync databases with code.'
% SQLObjectVersionTable.sqlmeta.table)
|
|
From: SourceForge.net <no...@so...> - 2008-04-16 17:44:06
|
Patches item #1944231, was opened at 2008-04-16 13:44 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=1944231&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: Matthew Wilson (mw44118) Assigned to: Nobody/Anonymous (nobody) Summary: Corrected some bad spelling in docstring Initial Comment: This is a trivial change to a docstring. I corrected the spelling. $ svn diff Index: sqlobject/manager/command.py =================================================================== --- sqlobject/manager/command.py (revision 3382) +++ sqlobject/manager/command.py (working copy) @@ -874,7 +874,7 @@ help = ('Record state of table definitions. The state of each ' 'table is written out to a separate file in a directory, ' 'and that directory forms a "version". A table is also ' - 'added to you datebase (%s) that reflects the version the ' + 'added to your database (%s) that reflects the version the ' 'database is currently at. Use the upgrade command to ' 'sync databases with code.' % SQLObjectVersionTable.sqlmeta.table) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1944231&group_id=74338 |
|
From: <sub...@co...> - 2008-04-14 14:39:19
|
Author: phd
Date: 2008-04-14 08:38:46 -0600 (Mon, 14 Apr 2008)
New Revision: 3382
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/declarative.py
Log:
Reverted the patch N 1407684 (declarative.threadSafeMethod()) - it causes more harm then good.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2008-04-14 14:37:53 UTC (rev 3381)
+++ SQLObject/trunk/docs/News.txt 2008-04-14 14:38:46 UTC (rev 3382)
@@ -110,6 +110,9 @@
* A minor bug was fixed in col.py - the registry must be passed to findClass().
+* Reverted the patch declarative.threadSafeMethod() - it causes more harm
+ then good.
+
SQLObject 0.9.5
===============
@@ -468,9 +471,6 @@
* Fixed a bug with default field values for columns for Firebird connection.
-* Prevent a deadlock in declarative.threadSafeMethod() by not reacquiring
- the class lock.
-
* Fixed a bug in col.createSQL().
* Fixed a bug in converting date/time for years < 1000 (time.strptime()
Modified: SQLObject/trunk/sqlobject/declarative.py
===================================================================
--- SQLObject/trunk/sqlobject/declarative.py 2008-04-14 14:37:53 UTC (rev 3381)
+++ SQLObject/trunk/sqlobject/declarative.py 2008-04-14 14:38:46 UTC (rev 3382)
@@ -32,16 +32,15 @@
or an instance method depending on where it is called.
"""
-import threading
+import copy
import events
-__all__ = ('classinstancemethod', 'DeclarativeMeta', 'Declarative')
-
-import copy
-
import itertools
counter = itertools.count()
+__all__ = ('classinstancemethod', 'DeclarativeMeta', 'Declarative')
+
+
class classinstancemethod(object):
"""
Acts like a class method when called from a class, like an
@@ -77,25 +76,6 @@
return ('<bound method %s.%s of %r>'
% (self.type.__name__, self.func.func_name, self.obj))
-def threadSafeMethod(lock):
- def decorator(fn):
- def _wrapper(self, *args, **kwargs):
- # This prevents deadlocks.
- # The class lock isn't really needed in __init__() while fetching.
- if '_SO_fetch_no_create' in kwargs:
- return fn(self, *args, **kwargs)
- lock.acquire()
- try:
- return fn(self, *args, **kwargs)
- finally:
- lock.release()
- try:
- _wrapper.func_name = fn.func_name
- except TypeError:
- pass
- return _wrapper
- return decorator
-
class DeclarativeMeta(type):
def __new__(meta, class_name, bases, new_attrs):
@@ -110,9 +90,6 @@
if new_attrs.has_key('__classinit__'):
cls.__classinit__ = staticmethod(cls.__classinit__.im_func)
cls.__classinit__(cls, new_attrs)
- if new_attrs.has_key('__init__'):
- lock = threading.RLock()
- cls.__init__ = threadSafeMethod(lock)(cls.__init__)
for func in post_funcs:
func(cls)
return cls
|