sqlobject-cvs Mailing List for SQLObject (Page 22)
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
|
Dec
|
|
From: <sub...@co...> - 2014-05-11 15:54:24
|
Author: phd Date: Sun May 11 09:54:16 2014 New Revision: 4735 Log: Merge revision 4734 from branch 1.7: no need to work around a bug in Decimal Modified: SQLObject/trunk/sqlobject/converters.py SQLObject/trunk/sqlobject/tests/test_decimal.py Modified: SQLObject/trunk/sqlobject/converters.py ============================================================================== --- SQLObject/trunk/sqlobject/converters.py Sun May 11 09:53:02 2014 (r4734) +++ SQLObject/trunk/sqlobject/converters.py Sun May 11 09:54:16 2014 (r4735) @@ -164,8 +164,7 @@ registerConverter(datetime.time, TimeConverter) def DecimalConverter(value, db): - # 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 + return value.to_eng_string() registerConverter(Decimal, DecimalConverter) Modified: SQLObject/trunk/sqlobject/tests/test_decimal.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_decimal.py Sun May 11 09:53:02 2014 (r4734) +++ SQLObject/trunk/sqlobject/tests/test_decimal.py Sun May 11 09:54:16 2014 (r4735) @@ -49,14 +49,3 @@ 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"), - col2='10.01', col3='10.01') - assert d.col1 == Decimal("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...> - 2014-05-11 15:53:11
|
Author: phd Date: Sun May 11 09:53:02 2014 New Revision: 4734 Log: Python 2.5 is no longer supported: no need to work around a bug in Decimal Modified: SQLObject/branches/1.7/sqlobject/converters.py SQLObject/branches/1.7/sqlobject/tests/test_decimal.py Modified: SQLObject/branches/1.7/sqlobject/converters.py ============================================================================== --- SQLObject/branches/1.7/sqlobject/converters.py Sat May 10 12:18:55 2014 (r4733) +++ SQLObject/branches/1.7/sqlobject/converters.py Sun May 11 09:53:02 2014 (r4734) @@ -180,8 +180,7 @@ registerConverter(datetime.time, TimeConverter) def DecimalConverter(value, db): - # 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 + return value.to_eng_string() registerConverter(Decimal, DecimalConverter) Modified: SQLObject/branches/1.7/sqlobject/tests/test_decimal.py ============================================================================== --- SQLObject/branches/1.7/sqlobject/tests/test_decimal.py Sat May 10 12:18:55 2014 (r4733) +++ SQLObject/branches/1.7/sqlobject/tests/test_decimal.py Sun May 11 09:53:02 2014 (r4734) @@ -49,14 +49,3 @@ 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"), - col2='10.01', col3='10.01') - assert d.col1 == Decimal("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...> - 2014-05-10 18:19:02
|
Author: phd
Date: Sat May 10 12:18:55 2014
New Revision: 4733
Log:
Merge revision 4732 from branch 1.7: document sqlhub.doInTransaction
Modified:
SQLObject/trunk/docs/SQLObject.txt
Modified: SQLObject/trunk/docs/SQLObject.txt
==============================================================================
--- SQLObject/trunk/docs/SQLObject.txt Sat May 10 12:17:50 2014 (r4732)
+++ SQLObject/trunk/docs/SQLObject.txt Sat May 10 12:18:55 2014 (r4733)
@@ -1432,6 +1432,13 @@
Person.select(Person.q.name=="value", forUpdate=True, connection=trans)
+Method ``sqlhub.doInTransaction`` can be used to run a piece of code in
+a transaction. The method accepts a callable and positional and keywords
+arguments. It begins a transaction using its ``processConnection`` or
+``threadConnection``, calls the callable, commits the transaction and
+closes the underlying connection; it returns whatever the callable
+returned. If an error occurs during call to the callable it rolls the
+transaction back and reraise the exception.
Automatic Schema Generation
---------------------------
|
|
From: <sub...@co...> - 2014-05-10 18:17:59
|
Author: phd
Date: Sat May 10 12:17:50 2014
New Revision: 4732
Log:
Document sqlhub.doInTransaction
Modified:
SQLObject/branches/1.7/docs/SQLObject.txt
Modified: SQLObject/branches/1.7/docs/SQLObject.txt
==============================================================================
--- SQLObject/branches/1.7/docs/SQLObject.txt Fri May 9 11:47:30 2014 (r4731)
+++ SQLObject/branches/1.7/docs/SQLObject.txt Sat May 10 12:17:50 2014 (r4732)
@@ -1432,6 +1432,13 @@
Person.select(Person.q.name=="value", forUpdate=True, connection=trans)
+Method ``sqlhub.doInTransaction`` can be used to run a piece of code in
+a transaction. The method accepts a callable and positional and keywords
+arguments. It begins a transaction using its ``processConnection`` or
+``threadConnection``, calls the callable, commits the transaction and
+closes the underlying connection; it returns whatever the callable
+returned. If an error occurs during call to the callable it rolls the
+transaction back and reraise the exception.
Automatic Schema Generation
---------------------------
|
|
From: <sub...@co...> - 2014-05-09 17:47:38
|
Author: phd Date: Fri May 9 11:47:30 2014 New Revision: 4731 Log: Merge revisions 4726:4730 from branch 1.7: stop supporting Python 2.5 Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/SQLObject.txt SQLObject/trunk/docs/TODO.txt SQLObject/trunk/sqlobject/converters.py SQLObject/trunk/sqlobject/main.py SQLObject/trunk/sqlobject/tests/test_converters.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Fri May 9 11:32:55 2014 (r4730) +++ SQLObject/trunk/docs/News.txt Fri May 9 11:47:30 2014 (r4731) @@ -25,6 +25,9 @@ Features & Interface -------------------- +* Python 2.5 is no longer supported. The minimal supported version is + Python 2.6. + * DateTimeCol and TimeCol can read values with microseconds (created by SQLObject 2.0) but do not write microseconds back. Modified: SQLObject/trunk/docs/SQLObject.txt ============================================================================== --- SQLObject/trunk/docs/SQLObject.txt Fri May 9 11:32:55 2014 (r4730) +++ SQLObject/trunk/docs/SQLObject.txt Fri May 9 11:47:30 2014 (r4731) @@ -66,7 +66,7 @@ .. _FreeTDS: http://www.freetds.org/ .. _ADODBAPI: http://adodbapi.sourceforge.net/ -Python 2.3 or higher is required. SQLObject makes extensive use of +Python 2.6 or higher is required. SQLObject makes extensive use of new-style classes. Compared To Other Database Wrappers Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Fri May 9 11:32:55 2014 (r4730) +++ SQLObject/trunk/docs/TODO.txt Fri May 9 11:47:30 2014 (r4731) @@ -45,7 +45,7 @@ * Cache columns in sqlmeta.getColumns(); reset the cache on add/del Column/Join. -* Stop supporting Python 2.5: remove import sets; use ``with lock``; +* Stop supporting Python 2.5: make ConnectionHub a context manager instead of .doInTransaction(); replace time.strptime with datetime.strptime. Upgrade ez_setup to 2.0+. Modified: SQLObject/trunk/sqlobject/converters.py ============================================================================== --- SQLObject/trunk/sqlobject/converters.py Fri May 9 11:32:55 2014 (r4730) +++ SQLObject/trunk/sqlobject/converters.py Fri May 9 11:47:30 2014 (r4731) @@ -139,10 +139,6 @@ registerConverter(dict, SequenceConverter) registerConverter(set, SequenceConverter) registerConverter(frozenset, SequenceConverter) -if sys.version_info[:3] < (2, 6, 0): # Module sets was deprecated in Python 2.6 - from sets import Set, ImmutableSet - registerConverter(Set, SequenceConverter) - registerConverter(ImmutableSet, SequenceConverter) if hasattr(time, 'struct_time'): def StructTimeConverter(value, db): Modified: SQLObject/trunk/sqlobject/main.py ============================================================================== --- SQLObject/trunk/sqlobject/main.py Fri May 9 11:32:55 2014 (r4730) +++ SQLObject/trunk/sqlobject/main.py Fri May 9 11:47:30 2014 (r4731) @@ -43,8 +43,8 @@ from util.threadinglocal import local import sys -if sys.version_info[:3] < (2, 5, 0): - raise ImportError, "SQLObject requires Python 2.5.0 or later" +if sys.version_info[:3] < (2, 6, 0): + raise ImportError, "SQLObject requires Python 2.6.0 or later" """ This thread-local storage is needed for RowCreatedSignals. It gathers Modified: SQLObject/trunk/sqlobject/tests/test_converters.py ============================================================================== --- SQLObject/trunk/sqlobject/tests/test_converters.py Fri May 9 11:32:55 2014 (r4730) +++ SQLObject/trunk/sqlobject/tests/test_converters.py Fri May 9 11:47:30 2014 (r4731) @@ -191,13 +191,6 @@ pass else: assert sqlrepr(set([1])) == "(1)" - if sys.version_info[:3] < (2, 6, 0): # Module sets was deprecated in Python 2.6 - try: - from sets import Set - except ImportError: - pass - else: - assert sqlrepr(Set([1])) == "(1)" def test_timedelta(): assert sqlrepr(timedelta(seconds=30*60)) == \ |
|
From: <sub...@co...> - 2014-05-09 17:33:02
|
Author: phd Date: Fri May 9 11:32:55 2014 New Revision: 4730 Log: Minimal supported Python version is 2.6 Modified: SQLObject/branches/1.7/docs/SQLObject.txt Modified: SQLObject/branches/1.7/docs/SQLObject.txt ============================================================================== --- SQLObject/branches/1.7/docs/SQLObject.txt Fri May 9 11:32:10 2014 (r4729) +++ SQLObject/branches/1.7/docs/SQLObject.txt Fri May 9 11:32:55 2014 (r4730) @@ -66,7 +66,7 @@ .. _FreeTDS: http://www.freetds.org/ .. _ADODBAPI: http://adodbapi.sourceforge.net/ -Python 2.3 or higher is required. SQLObject makes extensive use of +Python 2.6 or higher is required. SQLObject makes extensive use of new-style classes. Compared To Other Database Wrappers |
|
From: <sub...@co...> - 2014-05-09 17:32:17
|
Author: phd Date: Fri May 9 11:32:10 2014 New Revision: 4729 Log: Minimal supported Python version is 2.5 Modified: SQLObject/branches/1.6/docs/SQLObject.txt Modified: SQLObject/branches/1.6/docs/SQLObject.txt ============================================================================== --- SQLObject/branches/1.6/docs/SQLObject.txt Fri May 9 11:30:50 2014 (r4728) +++ SQLObject/branches/1.6/docs/SQLObject.txt Fri May 9 11:32:10 2014 (r4729) @@ -66,7 +66,7 @@ .. _FreeTDS: http://www.freetds.org/ .. _ADODBAPI: http://adodbapi.sourceforge.net/ -Python 2.3 or higher is required. SQLObject makes extensive use of +Python 2.5 or higher is required. SQLObject makes extensive use of new-style classes. Compared To Other Database Wrappers |
|
From: <sub...@co...> - 2014-05-09 17:31:01
|
Author: phd Date: Fri May 9 11:30:50 2014 New Revision: 4728 Log: Minimal version of Python for SQLObject is 2.4 since release 0.11 Modified: SQLObject/branches/1.5/docs/SQLObject.txt Modified: SQLObject/branches/1.5/docs/SQLObject.txt ============================================================================== --- SQLObject/branches/1.5/docs/SQLObject.txt Mon May 5 12:43:58 2014 (r4727) +++ SQLObject/branches/1.5/docs/SQLObject.txt Fri May 9 11:30:50 2014 (r4728) @@ -66,7 +66,7 @@ .. _FreeTDS: http://www.freetds.org/ .. _ADODBAPI: http://adodbapi.sourceforge.net/ -Python 2.3 or higher is required. SQLObject makes extensive use of +Python 2.4 or higher is required. SQLObject makes extensive use of new-style classes. Compared To Other Database Wrappers |
|
From: <sub...@co...> - 2014-05-05 18:44:06
|
Author: phd Date: Mon May 5 12:43:58 2014 New Revision: 4727 Log: Stop supporting Python 2.5 Modified: SQLObject/branches/1.7/docs/TODO.txt SQLObject/branches/1.7/sqlobject/main.py Modified: SQLObject/branches/1.7/docs/TODO.txt ============================================================================== --- SQLObject/branches/1.7/docs/TODO.txt Mon May 5 12:37:35 2014 (r4726) +++ SQLObject/branches/1.7/docs/TODO.txt Mon May 5 12:43:58 2014 (r4727) @@ -45,7 +45,7 @@ * Cache columns in sqlmeta.getColumns(); reset the cache on add/del Column/Join. -* Stop supporting Python 2.5: use ``with lock``; +* Stop supporting Python 2.5: make ConnectionHub a context manager instead of .doInTransaction(); replace time.strptime with datetime.strptime. Upgrade ez_setup to 2.0+. Modified: SQLObject/branches/1.7/sqlobject/main.py ============================================================================== --- SQLObject/branches/1.7/sqlobject/main.py Mon May 5 12:37:35 2014 (r4726) +++ SQLObject/branches/1.7/sqlobject/main.py Mon May 5 12:43:58 2014 (r4727) @@ -43,8 +43,8 @@ from util.threadinglocal import local import sys -if sys.version_info[:3] < (2, 5, 0): - raise ImportError, "SQLObject requires Python 2.5.0 or later" +if sys.version_info[:3] < (2, 6, 0): + raise ImportError, "SQLObject requires Python 2.6.0 or later" """ This thread-local storage is needed for RowCreatedSignals. It gathers |
|
From: <sub...@co...> - 2014-05-05 18:37:43
|
Author: phd
Date: Mon May 5 12:37:35 2014
New Revision: 4726
Log:
Stop supporting Python 2.5: remove import sets
Modified:
SQLObject/branches/1.7/docs/News.txt
SQLObject/branches/1.7/docs/TODO.txt
SQLObject/branches/1.7/sqlobject/converters.py
SQLObject/branches/1.7/sqlobject/tests/test_converters.py
Modified: SQLObject/branches/1.7/docs/News.txt
==============================================================================
--- SQLObject/branches/1.7/docs/News.txt Mon May 5 12:30:12 2014 (r4725)
+++ SQLObject/branches/1.7/docs/News.txt Mon May 5 12:37:35 2014 (r4726)
@@ -13,6 +13,9 @@
Features & Interface
--------------------
+* Python 2.5 is no longer supported. The minimal supported version is
+ Python 2.6.
+
* DateTimeCol and TimeCol can read values with microseconds (created by
SQLObject 2.0) but do not write microseconds back.
Modified: SQLObject/branches/1.7/docs/TODO.txt
==============================================================================
--- SQLObject/branches/1.7/docs/TODO.txt Mon May 5 12:30:12 2014 (r4725)
+++ SQLObject/branches/1.7/docs/TODO.txt Mon May 5 12:37:35 2014 (r4726)
@@ -45,7 +45,7 @@
* Cache columns in sqlmeta.getColumns(); reset the cache on add/del Column/Join.
-* Stop supporting Python 2.5: remove import sets; use ``with lock``;
+* Stop supporting Python 2.5: use ``with lock``;
make ConnectionHub a context manager instead of .doInTransaction();
replace time.strptime with datetime.strptime. Upgrade ez_setup to 2.0+.
Modified: SQLObject/branches/1.7/sqlobject/converters.py
==============================================================================
--- SQLObject/branches/1.7/sqlobject/converters.py Mon May 5 12:30:12 2014 (r4725)
+++ SQLObject/branches/1.7/sqlobject/converters.py Mon May 5 12:37:35 2014 (r4726)
@@ -155,10 +155,6 @@
registerConverter(dict, SequenceConverter)
registerConverter(set, SequenceConverter)
registerConverter(frozenset, SequenceConverter)
-if sys.version_info[:3] < (2, 6, 0): # Module sets was deprecated in Python 2.6
- from sets import Set, ImmutableSet
- registerConverter(Set, SequenceConverter)
- registerConverter(ImmutableSet, SequenceConverter)
if hasattr(time, 'struct_time'):
def StructTimeConverter(value, db):
Modified: SQLObject/branches/1.7/sqlobject/tests/test_converters.py
==============================================================================
--- SQLObject/branches/1.7/sqlobject/tests/test_converters.py Mon May 5 12:30:12 2014 (r4725)
+++ SQLObject/branches/1.7/sqlobject/tests/test_converters.py Mon May 5 12:37:35 2014 (r4726)
@@ -191,13 +191,6 @@
pass
else:
assert sqlrepr(set([1])) == "(1)"
- if sys.version_info[:3] < (2, 6, 0): # Module sets was deprecated in Python 2.6
- try:
- from sets import Set
- except ImportError:
- pass
- else:
- assert sqlrepr(Set([1])) == "(1)"
def test_timedelta():
assert sqlrepr(timedelta(seconds=30*60)) == \
|
|
From: <sub...@co...> - 2014-05-05 18:30:19
|
Author: phd Date: Mon May 5 12:30:12 2014 New Revision: 4725 Log: Merge revision 4724 from branch 1.7: Update News Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Mon May 5 12:28:38 2014 (r4724) +++ SQLObject/trunk/docs/News.txt Mon May 5 12:30:12 2014 (r4725) @@ -22,9 +22,17 @@ SQLObject 1.7.0 =============== +Features & Interface +-------------------- + * DateTimeCol and TimeCol can read values with microseconds (created by SQLObject 2.0) but do not write microseconds back. +Bugfixes +-------- + +* A bugfix was ported from `SQLObject 1.5.2`_. + SQLObject 1.6.0 =============== |
|
From: <sub...@co...> - 2014-05-05 18:28:47
|
Author: phd Date: Mon May 5 12:28:38 2014 New Revision: 4724 Log: Update News Modified: SQLObject/branches/1.7/docs/News.txt Modified: SQLObject/branches/1.7/docs/News.txt ============================================================================== --- SQLObject/branches/1.7/docs/News.txt Sun May 4 13:02:31 2014 (r4723) +++ SQLObject/branches/1.7/docs/News.txt Mon May 5 12:28:38 2014 (r4724) @@ -10,9 +10,17 @@ SQLObject 1.7.0 =============== +Features & Interface +-------------------- + * DateTimeCol and TimeCol can read values with microseconds (created by SQLObject 2.0) but do not write microseconds back. +Bugfixes +-------- + +* A bugfix was ported from `SQLObject 1.5.2`_. + SQLObject 1.6.0 =============== |
|
From: <sub...@co...> - 2014-05-04 19:02:38
|
Author: phd Date: Sun May 4 13:02:31 2014 New Revision: 4723 Log: Update News Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sun May 4 13:00:59 2014 (r4722) +++ SQLObject/trunk/docs/News.txt Sun May 4 13:02:31 2014 (r4723) @@ -13,9 +13,18 @@ SQLObject 2.0.0 =============== +* DateTimeCol and TimeCol can read and write values with microseconds. + + WARNING: backward compatibility problem! Date/Time columns created + with microseconds cannot be read back with versions of SQLObject older + than 1.7. + SQLObject 1.7.0 =============== +* DateTimeCol and TimeCol can read values with microseconds (created by + SQLObject 2.0) but do not write microseconds back. + SQLObject 1.6.0 =============== @@ -25,14 +34,6 @@ * Python 2.4 is no longer supported. The minimal supported version is Python 2.5. -* DateTimeCol and TimeCol preserve microseconds. The feature requires - Python 2.6+ because in Python 2.5 datetime.strptime doesn't support - '%f' format. - - WARNING: backward compatibility problem! Date/Time columns created - with microseconds cannot be read back with older versions of - SQLObject. - * Upgrade ez_setup to 1.4.2. * A bugfix was ported from `SQLObject 1.5.2`_. |
|
From: <sub...@co...> - 2014-05-04 19:01:06
|
Author: phd Date: Sun May 4 13:00:59 2014 New Revision: 4722 Log: Better explanation for limitations Modified: SQLObject/branches/1.7/docs/News.txt Modified: SQLObject/branches/1.7/docs/News.txt ============================================================================== --- SQLObject/branches/1.7/docs/News.txt Sun May 4 12:58:20 2014 (r4721) +++ SQLObject/branches/1.7/docs/News.txt Sun May 4 13:00:59 2014 (r4722) @@ -11,7 +11,7 @@ =============== * DateTimeCol and TimeCol can read values with microseconds (created by - SQLObject 2.0). + SQLObject 2.0) but do not write microseconds back. SQLObject 1.6.0 =============== |
|
From: <sub...@co...> - 2014-05-04 18:58:28
|
Author: phd
Date: Sun May 4 12:58:20 2014
New Revision: 4721
Log:
Read microseconds for forward compatibility but do not write them
Modified:
SQLObject/branches/1.7/docs/News.txt
SQLObject/branches/1.7/sqlobject/converters.py
SQLObject/branches/1.7/sqlobject/tests/test_converters.py
SQLObject/branches/1.7/sqlobject/tests/test_datetime.py
Modified: SQLObject/branches/1.7/docs/News.txt
==============================================================================
--- SQLObject/branches/1.7/docs/News.txt Sun May 4 11:33:58 2014 (r4720)
+++ SQLObject/branches/1.7/docs/News.txt Sun May 4 12:58:20 2014 (r4721)
@@ -10,6 +10,9 @@
SQLObject 1.7.0
===============
+* DateTimeCol and TimeCol can read values with microseconds (created by
+ SQLObject 2.0).
+
SQLObject 1.6.0
===============
@@ -19,14 +22,6 @@
* Python 2.4 is no longer supported. The minimal supported version is
Python 2.5.
-* DateTimeCol and TimeCol preserve microseconds. The feature requires
- Python 2.6+ because in Python 2.5 datetime.strptime doesn't support
- '%f' format.
-
- WARNING: backward compatibility problem! Date/Time columns created
- with microseconds cannot be read back with older versions of
- SQLObject.
-
* Upgrade ez_setup to 1.4.2.
* A bugfix was ported from `SQLObject 1.5.2`_.
Modified: SQLObject/branches/1.7/sqlobject/converters.py
==============================================================================
--- SQLObject/branches/1.7/sqlobject/converters.py Sun May 4 11:33:58 2014 (r4720)
+++ SQLObject/branches/1.7/sqlobject/converters.py Sun May 4 12:58:20 2014 (r4721)
@@ -7,11 +7,16 @@
try:
+ import mx.DateTime.ISO
+ origISOStr = mx.DateTime.ISO.strGMT
from mx.DateTime import DateTimeType, DateTimeDeltaType
except ImportError:
try:
+ import DateTime.ISO
+ origISOStr = DateTime.ISO.strGMT
from DateTime import DateTimeType, DateTimeDeltaType
except ImportError:
+ origISOStr = None
DateTimeType = None
DateTimeDeltaType = None
@@ -36,6 +41,17 @@
('\t', '\\t'),
]
+def isoStr(val):
+ """
+ Gets rid of time zone information
+ (@@: should we convert to GMT?)
+ """
+ val = origISOStr(val)
+ if val.find('+') == -1:
+ return val
+ else:
+ return val[:val.find('+')]
+
class ConverterRegistry:
def __init__(self):
@@ -117,12 +133,12 @@
if DateTimeType:
def DateTimeConverter(value, db):
- return "'%s'" % value.strftime("%Y-%m-%d %H:%M:%S.%s")
+ return "'%s'" % isoStr(value)
registerConverter(DateTimeType, DateTimeConverter)
def TimeConverter(value, db):
- return "'%s'" % value.strftime("%H:%M:%S")
+ return "'%s'" % value.strftime("%T")
registerConverter(DateTimeDeltaType, TimeConverter)
@@ -151,9 +167,9 @@
registerConverter(time.struct_time, StructTimeConverter)
def DateTimeConverter(value, db):
- return "'%04d-%02d-%02d %02d:%02d:%02d.%d'" % (
+ return "'%04d-%02d-%02d %02d:%02d:%02d'" % (
value.year, value.month, value.day,
- value.hour, value.minute, value.second, value.microsecond)
+ value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
@@ -163,7 +179,7 @@
registerConverter(datetime.date, DateConverter)
def TimeConverter(value, db):
- return "'%02d:%02d:%02d.%d'" % (value.hour, value.minute, value.second, value.microsecond)
+ return "'%02d:%02d:%02d'" % (value.hour, value.minute, value.second)
registerConverter(datetime.time, TimeConverter)
Modified: SQLObject/branches/1.7/sqlobject/tests/test_converters.py
==============================================================================
--- SQLObject/branches/1.7/sqlobject/tests/test_converters.py Sun May 4 11:33:58 2014 (r4720)
+++ SQLObject/branches/1.7/sqlobject/tests/test_converters.py Sun May 4 12:58:20 2014 (r4721)
@@ -88,11 +88,11 @@
def test_datetime():
from datetime import datetime, date, time
- assert sqlrepr(datetime(2005, 7, 14, 13, 31, 2)) == "'2005-07-14 13:31:02.0'"
+ assert sqlrepr(datetime(2005, 7, 14, 13, 31, 2)) == "'2005-07-14 13:31:02'"
assert sqlrepr(date(2005, 7, 14)) == "'2005-07-14'"
- assert sqlrepr(time(13, 31, 2)) == "'13:31:02.0'"
+ assert sqlrepr(time(13, 31, 2)) == "'13:31:02'"
# now dates before 1900
- assert sqlrepr(datetime(1428, 7, 14, 13, 31, 2)) == "'1428-07-14 13:31:02.0'"
+ assert sqlrepr(datetime(1428, 7, 14, 13, 31, 2)) == "'1428-07-14 13:31:02'"
assert sqlrepr(date(1428, 7, 14)) == "'1428-07-14'"
def test_instance():
Modified: SQLObject/branches/1.7/sqlobject/tests/test_datetime.py
==============================================================================
--- SQLObject/branches/1.7/sqlobject/tests/test_datetime.py Sun May 4 11:33:58 2014 (r4720)
+++ SQLObject/branches/1.7/sqlobject/tests/test_datetime.py Sun May 4 12:58:20 2014 (r4721)
@@ -25,8 +25,7 @@
assert dt1.col1.day == _now.day
assert dt1.col1.hour == _now.hour
assert dt1.col1.minute == _now.minute
- assert dt1.col1.second == _now.second
- assert dt1.col1.microsecond == _now.microsecond
+ assert dt1.col1.second == int(_now.second)
assert isinstance(dt1.col2, date)
assert not isinstance(dt1.col2, datetime)
@@ -37,8 +36,7 @@
assert isinstance(dt1.col3, time)
assert dt1.col3.hour == _now.hour
assert dt1.col3.minute == _now.minute
- assert dt1.col3.second == _now.second
- assert dt1.col3.microsecond == _now.microsecond
+ assert dt1.col3.second == int(_now.second)
if mxdatetime_available:
col.default_datetime_implementation = MXDATETIME_IMPLEMENTATION
@@ -49,7 +47,7 @@
if connection.dbName == "sqlite":
if connection.using_sqlite2:
# mxDateTime sends and PySQLite2 returns full date/time for dates
- dateFormat = "%Y-%m-%d %H:%M:%S.%f"
+ dateFormat = "%Y-%m-%d %H:%M:%S"
class DateTime2(SQLObject):
col1 = DateTimeCol()
@@ -59,7 +57,7 @@
def test_mxDateTime():
setupClass(DateTime2)
_now = now()
- dt2 = DateTime2(col1=_now, col2=_now, col3=Time(_now.hour, _now.minute, _now.second))
+ dt2 = DateTime2(col1=_now, col2=_now, col3=Time(_now.hour, _now.minute, int(_now.second)))
assert isinstance(dt2.col1, col.DateTimeType)
assert dt2.col1.year == _now.year
|
|
From: <sub...@co...> - 2014-05-04 17:34:05
|
Author: phd Date: Sun May 4 11:33:58 2014 New Revision: 4720 Log: The next branch will be 2.0 Modified: SQLObject/trunk/README.txt SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/__version__.py Modified: SQLObject/trunk/README.txt ============================================================================== --- SQLObject/trunk/README.txt Sun May 4 11:31:47 2014 (r4719) +++ SQLObject/trunk/README.txt Sun May 4 11:33:58 2014 (r4720) @@ -1,4 +1,4 @@ -SQLObject 1.7 +SQLObject 2.0 ============= Thanks for looking at SQLObject. SQLObject is an object-relational Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sun May 4 11:31:47 2014 (r4719) +++ SQLObject/trunk/docs/News.txt Sun May 4 11:33:58 2014 (r4720) @@ -10,6 +10,9 @@ SQLObject (trunk) ================= +SQLObject 2.0.0 +=============== + SQLObject 1.7.0 =============== Modified: SQLObject/trunk/sqlobject/__version__.py ============================================================================== --- SQLObject/trunk/sqlobject/__version__.py Sun May 4 11:31:47 2014 (r4719) +++ SQLObject/trunk/sqlobject/__version__.py Sun May 4 11:33:58 2014 (r4720) @@ -1,7 +1,7 @@ -version = '1.7' -major = 1 -minor = 7 +version = '2.0' +major = 2 +minor = 0 micro = 0 release_level = 'trunk' serial = 0 |
|
From: <sub...@co...> - 2014-05-04 17:31:55
|
Author: phd Date: Sun May 4 11:31:47 2014 New Revision: 4719 Log: The branch is in maintenance mode Modified: SQLObject/branches/1.7/setup.cfg SQLObject/branches/1.7/setup.py Modified: SQLObject/branches/1.7/setup.cfg ============================================================================== --- SQLObject/branches/1.7/setup.cfg Sun May 4 11:23:50 2014 (r4718) +++ SQLObject/branches/1.7/setup.cfg Sun May 4 11:31:47 2014 (r4719) @@ -40,6 +40,6 @@ make-dirs = 1 ## For live documentation: -# doc-dest = scp://web.sourceforge.net:/home/project-web/sqlobject/ +doc-dest = scp://web.sourceforge.net:/home/project-web/sqlobject/ ## For in-development documentation: -doc-dest = scp://web.sourceforge.net:/home/project-web/sqlobject/devel/ +# doc-dest = scp://web.sourceforge.net:/home/project-web/sqlobject/devel/ Modified: SQLObject/branches/1.7/setup.py ============================================================================== --- SQLObject/branches/1.7/setup.py Sun May 4 11:23:50 2014 (r4718) +++ SQLObject/branches/1.7/setup.py Sun May 4 11:31:47 2014 (r4719) @@ -67,7 +67,7 @@ author_email="ia...@co...", maintainer="Oleg Broytman", maintainer_email="ph...@ph...", - url="http://sqlobject.org/devel/", + url="http://sqlobject.org/", download_url="https://pypi.python.org/pypi/SQLObject/%s" % version, license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], |
|
From: <sub...@co...> - 2014-05-04 17:23:57
|
Author: phd Date: Sun May 4 11:23:50 2014 New Revision: 4718 Log: Branch 1.7 Modified: SQLObject/branches/1.7/docs/News.txt SQLObject/branches/1.7/sqlobject/__version__.py Modified: SQLObject/branches/1.7/docs/News.txt ============================================================================== --- SQLObject/branches/1.7/docs/News.txt Sun May 4 11:22:18 2014 (r4717) +++ SQLObject/branches/1.7/docs/News.txt Sun May 4 11:23:50 2014 (r4718) @@ -7,9 +7,6 @@ .. _start: -SQLObject (trunk) -================= - SQLObject 1.7.0 =============== Modified: SQLObject/branches/1.7/sqlobject/__version__.py ============================================================================== --- SQLObject/branches/1.7/sqlobject/__version__.py Sun May 4 11:22:18 2014 (r4717) +++ SQLObject/branches/1.7/sqlobject/__version__.py Sun May 4 11:23:50 2014 (r4718) @@ -3,6 +3,6 @@ major = 1 minor = 7 micro = 0 -release_level = 'trunk' +release_level = 'branch' serial = 0 version_info = (major, minor, micro, release_level, serial) |
|
From: <sub...@co...> - 2014-05-04 17:22:25
|
Author: phd
Date: Sun May 4 11:22:18 2014
New Revision: 4717
Log:
Branch 1.7
Added:
SQLObject/branches/1.7/
- copied from r4716, SQLObject/trunk/
|
|
From: <sub...@co...> - 2014-05-04 17:21:16
|
Author: phd Date: Sun May 4 11:21:08 2014 New Revision: 4716 Log: Going to create branch 1.7 Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sun May 4 09:16:27 2014 (r4715) +++ SQLObject/trunk/docs/News.txt Sun May 4 11:21:08 2014 (r4716) @@ -10,6 +10,9 @@ SQLObject (trunk) ================= +SQLObject 1.7.0 +=============== + SQLObject 1.6.0 =============== |
|
From: <sub...@co...> - 2014-05-04 15:16:34
|
Author: phd Date: Sun May 4 09:16:27 2014 New Revision: 4715 Log: Support for Python 2.5 is declared obsolete Modified: SQLObject/branches/1.6/docs/News.txt Modified: SQLObject/branches/1.6/docs/News.txt ============================================================================== --- SQLObject/branches/1.6/docs/News.txt Sun May 4 09:15:29 2014 (r4714) +++ SQLObject/branches/1.6/docs/News.txt Sun May 4 09:16:27 2014 (r4715) @@ -16,6 +16,9 @@ * Python 2.4 is no longer supported. The minimal supported version is Python 2.5. +* Support for Python 2.5 is declared obsolete and will be removed + in the next release. + * Upgrade ez_setup to 1.4.2. * A bugfix was ported from `SQLObject 1.5.2`_. |
|
From: <sub...@co...> - 2014-05-04 15:15:38
|
Author: phd
Date: Sun May 4 09:15:29 2014
New Revision: 4714
Log:
Remove support for microseconds
Modified:
SQLObject/branches/1.6/docs/News.txt
SQLObject/branches/1.6/sqlobject/col.py
SQLObject/branches/1.6/sqlobject/converters.py
SQLObject/branches/1.6/sqlobject/tests/test_converters.py
SQLObject/branches/1.6/sqlobject/tests/test_datetime.py
Modified: SQLObject/branches/1.6/docs/News.txt
==============================================================================
--- SQLObject/branches/1.6/docs/News.txt Sun Apr 13 06:12:41 2014 (r4713)
+++ SQLObject/branches/1.6/docs/News.txt Sun May 4 09:15:29 2014 (r4714)
@@ -16,14 +16,6 @@
* Python 2.4 is no longer supported. The minimal supported version is
Python 2.5.
-* DateTimeCol and TimeCol preserve microseconds. The feature requires
- Python 2.6+ because in Python 2.5 datetime.strptime doesn't support
- '%f' format.
-
- WARNING: backward compatibility problem! Date/Time columns created
- with microseconds cannot be read back with older versions of
- SQLObject.
-
* Upgrade ez_setup to 1.4.2.
* A bugfix was ported from `SQLObject 1.5.2`_.
Modified: SQLObject/branches/1.6/sqlobject/col.py
==============================================================================
--- SQLObject/branches/1.6/sqlobject/col.py Sun Apr 13 06:12:41 2014 (r4713)
+++ SQLObject/branches/1.6/sqlobject/col.py Sun May 4 09:15:29 2014 (r4714)
@@ -20,9 +20,7 @@
from array import array
from itertools import count
-import re
-import sys
-import time
+import re, time
try:
import cPickle as pickle
except ImportError:
@@ -1100,27 +1098,11 @@
else:
return datetime.time(value.hour, value.minute, int(value.second))
try:
- if self.format.find(".%f") >= 0:
- if '.' in value:
- _value = value.split('.')
- microseconds = _value[-1]
- _l = len(microseconds)
- if _l < 6:
- _value[-1] = '%06d' % int(microseconds)
- elif _l > 6:
- _value[-1] = microseconds[:6]
- if _l != 6:
- value = '.'.join(_value)
- else:
- value += '.0'
- if sys.version_info[:3] < (2, 6, 0): # datetime.strptime in python2.5 doesn't support '%f' format
- stime = time.strptime(value, self.format)
- return datetime.datetime(*stime[:6])
- else:
- return datetime.datetime.strptime(value, self.format)
+ stime = time.strptime(value, self.format)
except:
raise validators.Invalid("expected a date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \
(self.format, self.name, type(value), value), value, state)
+ return datetime.datetime(*stime[:6])
def from_python(self, value, state):
if value is None:
@@ -1147,29 +1129,11 @@
elif isinstance(value, datetime.time):
return DateTime.Time(value.hour, value.minute, value.second)
try:
- if self.format.find(".%f") >= 0:
- if '.' in value:
- _value = value.split('.')
- microseconds = _value[-1]
- _l = len(microseconds)
- if _l < 6:
- _value[-1] = '%06d' % int(microseconds)
- elif _l > 6:
- _value[-1] = microseconds[:6]
- if _l != 6:
- value = '.'.join(_value)
- else:
- value += '.0'
- if sys.version_info[:3] < (2, 6, 0): # datetime.strptime in python2.5 doesn't support '%f' format
- stime = time.strptime(value, self.format)
- return DateTime.mktime(stime)
- else:
- value = datetime.datetime.strptime(value, self.format)
- return DateTime.DateTime(value.year, value.month, value.day,
- value.hour, value.minute, value.second)
+ stime = time.strptime(value, self.format)
except:
raise validators.Invalid("expected a date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \
(self.format, self.name, type(value), value), value, state)
+ return DateTime.mktime(stime)
def from_python(self, value, state):
if value is None:
@@ -1182,7 +1146,7 @@
(self.name, type(value), value), value, state)
class SODateTimeCol(SOCol):
- datetimeFormat = '%Y-%m-%d %H:%M:%S.%f'
+ datetimeFormat = '%Y-%m-%d %H:%M:%S'
def __init__(self, **kw):
datetimeFormat = kw.pop('datetimeFormat', None)
@@ -1313,7 +1277,7 @@
from_python = to_python
class SOTimeCol(SOCol):
- timeFormat = '%H:%M:%S.%f'
+ timeFormat = '%H:%M:%S'
def __init__(self, **kw):
timeFormat = kw.pop('timeFormat', None)
Modified: SQLObject/branches/1.6/sqlobject/converters.py
==============================================================================
--- SQLObject/branches/1.6/sqlobject/converters.py Sun Apr 13 06:12:41 2014 (r4713)
+++ SQLObject/branches/1.6/sqlobject/converters.py Sun May 4 09:15:29 2014 (r4714)
@@ -7,11 +7,16 @@
try:
+ import mx.DateTime.ISO
+ origISOStr = mx.DateTime.ISO.strGMT
from mx.DateTime import DateTimeType, DateTimeDeltaType
except ImportError:
try:
+ import DateTime.ISO
+ origISOStr = DateTime.ISO.strGMT
from DateTime import DateTimeType, DateTimeDeltaType
except ImportError:
+ origISOStr = None
DateTimeType = None
DateTimeDeltaType = None
@@ -36,6 +41,17 @@
('\t', '\\t'),
]
+def isoStr(val):
+ """
+ Gets rid of time zone information
+ (@@: should we convert to GMT?)
+ """
+ val = origISOStr(val)
+ if val.find('+') == -1:
+ return val
+ else:
+ return val[:val.find('+')]
+
class ConverterRegistry:
def __init__(self):
@@ -117,12 +133,12 @@
if DateTimeType:
def DateTimeConverter(value, db):
- return "'%s'" % value.strftime("%Y-%m-%d %H:%M:%S.%s")
+ return "'%s'" % isoStr(value)
registerConverter(DateTimeType, DateTimeConverter)
def TimeConverter(value, db):
- return "'%s'" % value.strftime("%H:%M:%S")
+ return "'%s'" % value.strftime("%T")
registerConverter(DateTimeDeltaType, TimeConverter)
@@ -151,9 +167,9 @@
registerConverter(time.struct_time, StructTimeConverter)
def DateTimeConverter(value, db):
- return "'%04d-%02d-%02d %02d:%02d:%02d.%d'" % (
+ return "'%04d-%02d-%02d %02d:%02d:%02d'" % (
value.year, value.month, value.day,
- value.hour, value.minute, value.second, value.microsecond)
+ value.hour, value.minute, value.second)
registerConverter(datetime.datetime, DateTimeConverter)
@@ -163,7 +179,7 @@
registerConverter(datetime.date, DateConverter)
def TimeConverter(value, db):
- return "'%02d:%02d:%02d.%d'" % (value.hour, value.minute, value.second, value.microsecond)
+ return "'%02d:%02d:%02d'" % (value.hour, value.minute, value.second)
registerConverter(datetime.time, TimeConverter)
Modified: SQLObject/branches/1.6/sqlobject/tests/test_converters.py
==============================================================================
--- SQLObject/branches/1.6/sqlobject/tests/test_converters.py Sun Apr 13 06:12:41 2014 (r4713)
+++ SQLObject/branches/1.6/sqlobject/tests/test_converters.py Sun May 4 09:15:29 2014 (r4714)
@@ -88,11 +88,11 @@
def test_datetime():
from datetime import datetime, date, time
- assert sqlrepr(datetime(2005, 7, 14, 13, 31, 2)) == "'2005-07-14 13:31:02.0'"
+ assert sqlrepr(datetime(2005, 7, 14, 13, 31, 2)) == "'2005-07-14 13:31:02'"
assert sqlrepr(date(2005, 7, 14)) == "'2005-07-14'"
- assert sqlrepr(time(13, 31, 2)) == "'13:31:02.0'"
+ assert sqlrepr(time(13, 31, 2)) == "'13:31:02'"
# now dates before 1900
- assert sqlrepr(datetime(1428, 7, 14, 13, 31, 2)) == "'1428-07-14 13:31:02.0'"
+ assert sqlrepr(datetime(1428, 7, 14, 13, 31, 2)) == "'1428-07-14 13:31:02'"
assert sqlrepr(date(1428, 7, 14)) == "'1428-07-14'"
def test_instance():
Modified: SQLObject/branches/1.6/sqlobject/tests/test_datetime.py
==============================================================================
--- SQLObject/branches/1.6/sqlobject/tests/test_datetime.py Sun Apr 13 06:12:41 2014 (r4713)
+++ SQLObject/branches/1.6/sqlobject/tests/test_datetime.py Sun May 4 09:15:29 2014 (r4714)
@@ -25,8 +25,7 @@
assert dt1.col1.day == _now.day
assert dt1.col1.hour == _now.hour
assert dt1.col1.minute == _now.minute
- assert dt1.col1.second == _now.second
- assert dt1.col1.microsecond == _now.microsecond
+ assert dt1.col1.second == int(_now.second)
assert isinstance(dt1.col2, date)
assert not isinstance(dt1.col2, datetime)
@@ -37,8 +36,7 @@
assert isinstance(dt1.col3, time)
assert dt1.col3.hour == _now.hour
assert dt1.col3.minute == _now.minute
- assert dt1.col3.second == _now.second
- assert dt1.col3.microsecond == _now.microsecond
+ assert dt1.col3.second == int(_now.second)
if mxdatetime_available:
col.default_datetime_implementation = MXDATETIME_IMPLEMENTATION
@@ -49,7 +47,7 @@
if connection.dbName == "sqlite":
if connection.using_sqlite2:
# mxDateTime sends and PySQLite2 returns full date/time for dates
- dateFormat = "%Y-%m-%d %H:%M:%S.%f"
+ dateFormat = "%Y-%m-%d %H:%M:%S"
class DateTime2(SQLObject):
col1 = DateTimeCol()
@@ -59,7 +57,7 @@
def test_mxDateTime():
setupClass(DateTime2)
_now = now()
- dt2 = DateTime2(col1=_now, col2=_now, col3=Time(_now.hour, _now.minute, _now.second))
+ dt2 = DateTime2(col1=_now, col2=_now, col3=Time(_now.hour, _now.minute, int(_now.second)))
assert isinstance(dt2.col1, col.DateTimeType)
assert dt2.col1.year == _now.year
|
|
From: <sub...@co...> - 2014-04-13 12:12:48
|
Author: phd
Date: Sun Apr 13 06:12:41 2014
New Revision: 4713
Log:
SQLObject 1.6.0b1
Modified:
SQLObject/tags/1.6.0b1/README.txt
SQLObject/tags/1.6.0b1/setup.py
SQLObject/tags/1.6.0b1/sqlobject/__version__.py
Modified: SQLObject/tags/1.6.0b1/README.txt
==============================================================================
--- SQLObject/tags/1.6.0b1/README.txt Sun Apr 13 06:10:20 2014 (r4712)
+++ SQLObject/tags/1.6.0b1/README.txt Sun Apr 13 06:12:41 2014 (r4713)
@@ -1,5 +1,5 @@
-SQLObject 1.6
-=============
+SQLObject 1.6.0b1
+=================
Thanks for looking at SQLObject. SQLObject is an object-relational
mapper, i.e., a library that will wrap your database tables in Python
Modified: SQLObject/tags/1.6.0b1/setup.py
==============================================================================
--- SQLObject/tags/1.6.0b1/setup.py Sun Apr 13 06:10:20 2014 (r4712)
+++ SQLObject/tags/1.6.0b1/setup.py Sun Apr 13 06:12:41 2014 (r4713)
@@ -68,7 +68,7 @@
maintainer="Oleg Broytman",
maintainer_email="ph...@ph...",
url="http://sqlobject.org/",
- download_url="https://pypi.python.org/pypi/SQLObject/%s" % version,
+ download_url="https://pypi.python.org/pypi/SQLObject/1.6.0b1dev-r4713",
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin", "scripts/sqlobject-convertOldURI"],
Modified: SQLObject/tags/1.6.0b1/sqlobject/__version__.py
==============================================================================
--- SQLObject/tags/1.6.0b1/sqlobject/__version__.py Sun Apr 13 06:10:20 2014 (r4712)
+++ SQLObject/tags/1.6.0b1/sqlobject/__version__.py Sun Apr 13 06:12:41 2014 (r4713)
@@ -1,8 +1,8 @@
-version = '1.6'
+version = '1.6.0b1'
major = 1
minor = 6
micro = 0
-release_level = 'branch'
-serial = 0
+release_level = 'beta'
+serial = 1
version_info = (major, minor, micro, release_level, serial)
|
|
From: <sub...@co...> - 2014-04-13 12:10:27
|
Author: phd
Date: Sun Apr 13 06:10:20 2014
New Revision: 4712
Log:
Tagging 1.6.0b1
Added:
SQLObject/tags/1.6.0b1/
- copied from r4711, SQLObject/branches/1.6/
|
|
From: <sub...@co...> - 2014-04-13 11:58:42
|
Author: phd Date: Sun Apr 13 05:58:35 2014 New Revision: 4711 Log: Stable version 1.5.2 Modified: SQLObject/tags/1.5.2/README.txt SQLObject/tags/1.5.2/setup.cfg SQLObject/tags/1.5.2/sqlobject/__version__.py Modified: SQLObject/tags/1.5.2/README.txt ============================================================================== --- SQLObject/tags/1.5.2/README.txt Sun Apr 13 05:56:34 2014 (r4710) +++ SQLObject/tags/1.5.2/README.txt Sun Apr 13 05:58:35 2014 (r4711) @@ -1,5 +1,5 @@ -SQLObject 1.5 -============= +SQLObject 1.5.2 +=============== Thanks for looking at SQLObject. SQLObject is an object-relational mapper, i.e., a library that will wrap your database tables in Python Modified: SQLObject/tags/1.5.2/setup.cfg ============================================================================== --- SQLObject/tags/1.5.2/setup.cfg Sun Apr 13 05:56:34 2014 (r4710) +++ SQLObject/tags/1.5.2/setup.cfg Sun Apr 13 05:58:35 2014 (r4711) @@ -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/1.5.2/sqlobject/__version__.py ============================================================================== --- SQLObject/tags/1.5.2/sqlobject/__version__.py Sun Apr 13 05:56:34 2014 (r4710) +++ SQLObject/tags/1.5.2/sqlobject/__version__.py Sun Apr 13 05:58:35 2014 (r4711) @@ -1,8 +1,8 @@ -version = '1.5' +version = '1.5.2' major = 1 minor = 5 -micro = 0 -release_level = 'branch' +micro = 2 +release_level = 'final' serial = 0 version_info = (major, minor, micro, release_level, serial) |