sqlobject-cvs Mailing List for SQLObject (Page 31)
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
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2012-05-25 16:34:03
|
Bugs item #3525829, was opened at 2012-05-11 06:34 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&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 from repository >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: LJSilver (ljsilver) Assigned to: Oleg Broytman (phd) Summary: KeyError in multiprocessing environment Initial Comment: When disabling the cache, SQLObject works quiet well in a multiprocessing environment. Sometimes SQLObject throws KeyError from the sqlobject.cache.CacheSet.put method in the following line: self.caches[cls.__name__].put(id, obj) This seems to be because of a mapped object is put back to the DB without getting it from the DB in the same process. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-05-25 09:34 Message: Ok, I applied my fix and committed it in revisions 4529-4531 (branches 1.2, 1.3 and the trunk). ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-05-13 11:31 Message: Aha, and the "queue" (whatever it is) passes objects between processes using pickle, I suspect. Hence there is a bug in SQLObject.__setstate__. Can you test the following patch? Index: main.py =================================================================== --- main.py (revision 4524) +++ main.py (working copy) @@ -1683,7 +1685,7 @@ self.__init__(_SO_fetch_no_create=1) self._SO_writeLock = threading.Lock() self.__dict__.update(d) - self.__class__._connection.cache.put(self.id, self.__class__, self) + self._connection.cache.created(self.id, self.__class__, self) def setterName(name): ---------------------------------------------------------------------- Comment By: LJSilver (ljsilver) Date: 2012-05-13 10:51 Message: Right. The row is fetched in one process and passed to the other using a queue. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-05-11 06:53 Message: What have you done to have the row without getting it first?! Did you get the row from DB in one process and passed it to the other process? How do you pass objects between processes? ---------------------------------------------------------------------- Comment By: LJSilver (ljsilver) Date: 2012-05-11 06:35 Message: I've managed to fix it using the following monkey patch: def sqlobject_cache_put_monkey(self, id, cls, obj): try: self.caches[cls.__name__].put(id, obj) except KeyError: self.caches[cls.__name__] = sqlobject.cache.CacheFactory(*self.args, **self.kw) self.caches[cls.__name__].put(id, obj) sqlobject.cache.CacheSet.put = sqlobject_cache_put_monkey ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&group_id=74338 |
From: <sub...@co...> - 2012-05-25 16:32:20
|
Author: phd Date: Fri May 25 10:32:14 2012 New Revision: 4531 Log: Merged revision 4530 from branch 1.3: fixed a bug in unpickling. Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/main.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Fri May 25 10:30:57 2012 (r4530) +++ SQLObject/trunk/docs/News.txt Fri May 25 10:32:14 2012 (r4531) @@ -13,7 +13,7 @@ SQLObject 1.3.1 =============== -* A bugfix was ported from `SQLObject 1.2.3`_. +* Two bugfixes were ported from `SQLObject 1.2.3`_. SQLObject 1.3.0 =============== @@ -34,7 +34,9 @@ =============== * Fixed a minor bug in PostgreSQL introspection: VIEWs don't have - PRIMARY KEYs - use sqlmeta.idName as the key if there is no one. + PRIMARY KEYs - use sqlmeta.idName as the key. + +* Fixed a bug in cache handling while unpickling. SQLObject 1.2.2 =============== Modified: SQLObject/trunk/sqlobject/main.py ============================================================================== --- SQLObject/trunk/sqlobject/main.py Fri May 25 10:30:57 2012 (r4530) +++ SQLObject/trunk/sqlobject/main.py Fri May 25 10:32:14 2012 (r4531) @@ -1670,6 +1670,8 @@ return NotImplemented + # (De)serialization (pickle, etc.) + def __getstate__(self): if self.sqlmeta._perConnection: from pickle import PicklingError @@ -1680,10 +1682,16 @@ return d def __setstate__(self, d): + id = d['id'] + cls = self.__class__ + cache = self._connection.cache + if cache.get(id, cls) is not None: + raise ValueError( + "Cannot unpickle %s row with id=%s - the id already exists in the cache" % (cls.__name__, id)) self.__init__(_SO_fetch_no_create=1) self._SO_writeLock = threading.Lock() self.__dict__.update(d) - self.__class__._connection.cache.put(self.id, self.__class__, self) + cache.created(id, cls, self) def setterName(name): |
From: <sub...@co...> - 2012-05-25 16:31:03
|
Author: phd Date: Fri May 25 10:30:57 2012 New Revision: 4530 Log: Merged revision 4529 from branch 1.2: fixed a bug in unpickling. Modified: SQLObject/branches/1.3/docs/News.txt SQLObject/branches/1.3/sqlobject/main.py Modified: SQLObject/branches/1.3/docs/News.txt ============================================================================== --- SQLObject/branches/1.3/docs/News.txt Fri May 25 10:28:24 2012 (r4529) +++ SQLObject/branches/1.3/docs/News.txt Fri May 25 10:30:57 2012 (r4530) @@ -10,7 +10,7 @@ SQLObject 1.3.1 =============== -* A bugfix was ported from `SQLObject 1.2.3`_. +* Two bugfixes were ported from `SQLObject 1.2.3`_. SQLObject 1.3.0 =============== @@ -31,7 +31,9 @@ =============== * Fixed a minor bug in PostgreSQL introspection: VIEWs don't have - PRIMARY KEYs - use sqlmeta.idName as the key if there is no one. + PRIMARY KEYs - use sqlmeta.idName as the key. + +* Fixed a bug in cache handling while unpickling. SQLObject 1.2.2 =============== Modified: SQLObject/branches/1.3/sqlobject/main.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/main.py Fri May 25 10:28:24 2012 (r4529) +++ SQLObject/branches/1.3/sqlobject/main.py Fri May 25 10:30:57 2012 (r4530) @@ -1670,6 +1670,8 @@ return NotImplemented + # (De)serialization (pickle, etc.) + def __getstate__(self): if self.sqlmeta._perConnection: from pickle import PicklingError @@ -1680,10 +1682,16 @@ return d def __setstate__(self, d): + id = d['id'] + cls = self.__class__ + cache = self._connection.cache + if cache.get(id, cls) is not None: + raise ValueError( + "Cannot unpickle %s row with id=%s - the id already exists in the cache" % (cls.__name__, id)) self.__init__(_SO_fetch_no_create=1) self._SO_writeLock = threading.Lock() self.__dict__.update(d) - self.__class__._connection.cache.put(self.id, self.__class__, self) + cache.created(id, cls, self) def setterName(name): |
From: <sub...@co...> - 2012-05-25 16:28:32
|
Author: phd Date: Fri May 25 10:28:24 2012 New Revision: 4529 Log: Fixed a bug in cache handling while unpickling (bug 3525829). Modified: SQLObject/branches/1.2/docs/News.txt SQLObject/branches/1.2/sqlobject/main.py Modified: SQLObject/branches/1.2/docs/News.txt ============================================================================== --- SQLObject/branches/1.2/docs/News.txt Thu May 24 13:37:48 2012 (r4528) +++ SQLObject/branches/1.2/docs/News.txt Fri May 25 10:28:24 2012 (r4529) @@ -11,7 +11,9 @@ =============== * Fixed a minor bug in PostgreSQL introspection: VIEWs don't have - PRIMARY KEYs - use sqlmeta.idName as the key if there is no one. + PRIMARY KEYs - use sqlmeta.idName as the key. + +* Fixed a bug in cache handling while unpickling. SQLObject 1.2.2 =============== Modified: SQLObject/branches/1.2/sqlobject/main.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/main.py Thu May 24 13:37:48 2012 (r4528) +++ SQLObject/branches/1.2/sqlobject/main.py Fri May 25 10:28:24 2012 (r4529) @@ -1670,6 +1670,8 @@ return NotImplemented + # (De)serialization (pickle, etc.) + def __getstate__(self): if self.sqlmeta._perConnection: from pickle import PicklingError @@ -1680,10 +1682,16 @@ return d def __setstate__(self, d): + id = d['id'] + cls = self.__class__ + cache = self._connection.cache + if cache.get(id, cls) is not None: + raise ValueError( + "Cannot unpickle %s row with id=%s - the id already exists in the cache" % (cls.__name__, id)) self.__init__(_SO_fetch_no_create=1) self._SO_writeLock = threading.Lock() self.__dict__.update(d) - self.__class__._connection.cache.put(self.id, self.__class__, self) + cache.created(id, cls, self) def setterName(name): |
From: <sub...@co...> - 2012-05-24 19:37:56
|
Author: phd Date: Thu May 24 13:37:48 2012 New Revision: 4528 Log: createParamsPre/Post Modified: SQLObject/trunk/docs/TODO.txt Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Tue May 22 15:18:37 2012 (r4527) +++ SQLObject/trunk/docs/TODO.txt Thu May 24 13:37:48 2012 (r4528) @@ -3,12 +3,16 @@ * RelatedJoin.hasOther(otherObject[.id]) -* tableParamSQL:: +* createParamsPre/Post:: class MyTable(SQLObject): - class sqlmeta: - tableParamSQL = 'ENGINE InnoDB' - tableParamSQL = {'mysql': 'ENGINE InnoDB'} + class sqlmeta: + createParamsPre = 'TEMPORARY IF NOT EXISTS' + createParamsPre = {temporary: True, ifNotExists: True, + 'postgres': 'LOCAL'} + createParamsPost = 'ENGINE InnoDB' + createParamsPost = {'mysql': 'ENGINE InnoDB', + 'postgres': 'WITH OIDS'} * SQLObject.fastInsert(). |
From: <sub...@co...> - 2012-05-22 21:18:45
|
Author: phd Date: Tue May 22 15:18:37 2012 New Revision: 4527 Log: In Python 2.6 make ConnectionHub a context manager instead of .doInTransaction(). Modified: SQLObject/trunk/docs/TODO.txt Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Sun May 13 09:54:50 2012 (r4526) +++ SQLObject/trunk/docs/TODO.txt Tue May 22 15:18:37 2012 (r4527) @@ -41,9 +41,10 @@ * Cache columns in sqlmeta.getColumns(); reset the cache on add/del Column/Join. -* Stop supporting Python 2.4: use ``with lock``; use hashlib instead of md5. +* Stop supporting Python 2.4: use hashlib instead of md5. -* Stop supporting Python 2.5: remove import sets. +* Stop supporting Python 2.5: remove import sets; use ``with lock``; + make ConnectionHub a context manager instead of .doInTransaction(). * Create JSONCol. |
From: SourceForge.net <no...@so...> - 2012-05-13 18:31:03
|
Bugs item #3525829, was opened at 2012-05-11 06:34 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&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 from repository Status: Open Resolution: None Priority: 5 Private: No Submitted By: LJSilver (ljsilver) Assigned to: Oleg Broytman (phd) Summary: KeyError in multiprocessing environment Initial Comment: When disabling the cache, SQLObject works quiet well in a multiprocessing environment. Sometimes SQLObject throws KeyError from the sqlobject.cache.CacheSet.put method in the following line: self.caches[cls.__name__].put(id, obj) This seems to be because of a mapped object is put back to the DB without getting it from the DB in the same process. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-05-13 11:31 Message: Aha, and the "queue" (whatever it is) passes objects between processes using pickle, I suspect. Hence there is a bug in SQLObject.__setstate__. Can you test the following patch? Index: main.py =================================================================== --- main.py (revision 4524) +++ main.py (working copy) @@ -1683,7 +1685,7 @@ self.__init__(_SO_fetch_no_create=1) self._SO_writeLock = threading.Lock() self.__dict__.update(d) - self.__class__._connection.cache.put(self.id, self.__class__, self) + self._connection.cache.created(self.id, self.__class__, self) def setterName(name): ---------------------------------------------------------------------- Comment By: LJSilver (ljsilver) Date: 2012-05-13 10:51 Message: Right. The row is fetched in one process and passed to the other using a queue. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-05-11 06:53 Message: What have you done to have the row without getting it first?! Did you get the row from DB in one process and passed it to the other process? How do you pass objects between processes? ---------------------------------------------------------------------- Comment By: LJSilver (ljsilver) Date: 2012-05-11 06:35 Message: I've managed to fix it using the following monkey patch: def sqlobject_cache_put_monkey(self, id, cls, obj): try: self.caches[cls.__name__].put(id, obj) except KeyError: self.caches[cls.__name__] = sqlobject.cache.CacheFactory(*self.args, **self.kw) self.caches[cls.__name__].put(id, obj) sqlobject.cache.CacheSet.put = sqlobject_cache_put_monkey ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&group_id=74338 |
From: SourceForge.net <no...@so...> - 2012-05-13 17:51:53
|
Bugs item #3525829, was opened at 2012-05-11 06:34 Message generated for change (Comment added) made by ljsilver You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&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 from repository Status: Open Resolution: None Priority: 5 Private: No Submitted By: LJSilver (ljsilver) Assigned to: Oleg Broytman (phd) Summary: KeyError in multiprocessing environment Initial Comment: When disabling the cache, SQLObject works quiet well in a multiprocessing environment. Sometimes SQLObject throws KeyError from the sqlobject.cache.CacheSet.put method in the following line: self.caches[cls.__name__].put(id, obj) This seems to be because of a mapped object is put back to the DB without getting it from the DB in the same process. ---------------------------------------------------------------------- Comment By: LJSilver (ljsilver) Date: 2012-05-13 10:51 Message: Right. The row is fetched in one process and passed to the other using a queue. ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-05-11 06:53 Message: What have you done to have the row without getting it first?! Did you get the row from DB in one process and passed it to the other process? How do you pass objects between processes? ---------------------------------------------------------------------- Comment By: LJSilver (ljsilver) Date: 2012-05-11 06:35 Message: I've managed to fix it using the following monkey patch: def sqlobject_cache_put_monkey(self, id, cls, obj): try: self.caches[cls.__name__].put(id, obj) except KeyError: self.caches[cls.__name__] = sqlobject.cache.CacheFactory(*self.args, **self.kw) self.caches[cls.__name__].put(id, obj) sqlobject.cache.CacheSet.put = sqlobject_cache_put_monkey ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&group_id=74338 |
From: SourceForge.net <no...@so...> - 2012-05-13 15:56:16
|
Patches item #3471315, was opened at 2012-01-09 04:49 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=3471315&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: Henry S Thompson (hthompson) Assigned to: Oleg Broytman (phd) Summary: Can't use VIEWs with postgres Initial Comment: SQLObject v.1.2.1, Python 2.6, Windows 7 x64, Postgresql 9.1 The code in pgconnection.py for finding primary keys won't ever find anything for a VIEW. Not sure what the correct fix is (I don't understand postgres internals v. well), but the attached patch works for me. . . ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-05-13 08:56 Message: Well, after reading Postgres' docs and looking into pg_catalog tables I see VIEWs don't have PRIMARY KEYs. Seems I have noting but accept your patch. Sorry it took so long and thank you for help! Applied and committed in the revisions 4524-4526 (branches 1.2, 1.3 and the trunk). Will be in the next round of releases. ---------------------------------------------------------------------- Comment By: Henry S Thompson (hthompson) Date: 2012-01-10 09:35 Message: Sorry not to be clearer -- what you've written is the existing code, which doesn't work for VIEWs. I don't understand how postgres lays out and uses its internal tables, so I can't offer any suggestions about how to modify that SELECT so that it works for VIEWs, sorry. The proximate problem with that code is that although there is an entry in pg_class for a view, so there is an oid for it, that oid does _not_ appear in pg_index in the indrelid column (or in any other column). I'm afraid I don't know where to look next. . . ---------------------------------------------------------------------- Comment By: Oleg Broytman (phd) Date: 2012-01-10 09:11 Message: Instead of blindly copying idName wouldn't it be better to find out why PostgresConnection doesn't recognize pkeys on views? Try the following query replacing 'test' with the name of a VIEW: SELECT pg_index.indisprimary, pg_catalog.pg_get_indexdef(pg_index.indexrelid) FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index AS pg_index WHERE c.relname = 'test' AND c.oid = pg_index.indrelid AND pg_index.indexrelid = c2.oid AND pg_index.indisprimary It have to return something like indisprimary | pg_get_indexdef --------------+----------------------------------------------------------- t | CREATE UNIQUE INDEX test_pkey ON test USING btree (my_id) (1 row) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=3471315&group_id=74338 |
From: <sub...@co...> - 2012-05-13 15:54:56
|
Author: phd Date: Sun May 13 09:54:50 2012 New Revision: 4526 Log: Merged revision 4525 from branch 1.3: fixed a minor bug in PostgreSQL introspection. Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/TODO.txt SQLObject/trunk/sqlobject/postgres/pgconnection.py Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sun May 13 09:52:34 2012 (r4525) +++ SQLObject/trunk/docs/News.txt Sun May 13 09:54:50 2012 (r4526) @@ -10,6 +10,11 @@ SQLObject (trunk) ================= +SQLObject 1.3.1 +=============== + +* A bugfix was ported from `SQLObject 1.2.3`_. + SQLObject 1.3.0 =============== @@ -25,6 +30,12 @@ rewritten and extended; ``charset`` was renamed to ``dbEncoding``; a longstanding bug was fixed - pass port to connect(). +SQLObject 1.2.3 +=============== + +* Fixed a minor bug in PostgreSQL introspection: VIEWs don't have + PRIMARY KEYs - use sqlmeta.idName as the key if there is no one. + SQLObject 1.2.2 =============== Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Sun May 13 09:52:34 2012 (r4525) +++ SQLObject/trunk/docs/TODO.txt Sun May 13 09:54:50 2012 (r4526) @@ -47,6 +47,8 @@ * Create JSONCol. +* Make version_info a namedtuple. + * Stop supporting Python 2.6: restore using urllib.splituser in _parseURI. * Expression columns - in SELECT but not in INSERT/UPDATE. Something like this:: Modified: SQLObject/trunk/sqlobject/postgres/pgconnection.py ============================================================================== --- SQLObject/trunk/sqlobject/postgres/pgconnection.py Sun May 13 09:52:34 2012 (r4525) +++ SQLObject/trunk/sqlobject/postgres/pgconnection.py Sun May 13 09:54:50 2012 (r4526) @@ -289,6 +289,9 @@ assert match, "Unparseable contraint definition: %r" % indexDef assert primaryKey is None, "Already found primary key (%r), then found: %r" % (primaryKey, indexDef) primaryKey = match.group(1) + if primaryKey is None: + # VIEWs don't have PRIMARY KEYs - accept help from user + primaryKey = soClass.sqlmeta.idName assert primaryKey, "No primary key found in table %r" % tableName if primaryKey.startswith('"'): assert primaryKey.endswith('"') |
From: <sub...@co...> - 2012-05-13 15:52:41
|
Author: phd Date: Sun May 13 09:52:34 2012 New Revision: 4525 Log: Merged revision 4524 from branch 1.2: fixed a minor bug in PostgreSQL introspection. Modified: SQLObject/branches/1.3/docs/News.txt SQLObject/branches/1.3/sqlobject/postgres/pgconnection.py Modified: SQLObject/branches/1.3/docs/News.txt ============================================================================== --- SQLObject/branches/1.3/docs/News.txt Sun May 13 09:48:41 2012 (r4524) +++ SQLObject/branches/1.3/docs/News.txt Sun May 13 09:52:34 2012 (r4525) @@ -7,6 +7,11 @@ .. _start: +SQLObject 1.3.1 +=============== + +* A bugfix was ported from `SQLObject 1.2.3`_. + SQLObject 1.3.0 =============== @@ -18,10 +23,16 @@ * PostgresConnection performs translation of exceptions to standard SQLObject's hierarchy of exceptions. -* Major update in FirebirdConnection: introspection was completely +* Major update of FirebirdConnection: introspection was completely rewritten and extended; ``charset`` was renamed to ``dbEncoding``; a longstanding bug was fixed - pass port to connect(). +SQLObject 1.2.3 +=============== + +* Fixed a minor bug in PostgreSQL introspection: VIEWs don't have + PRIMARY KEYs - use sqlmeta.idName as the key if there is no one. + SQLObject 1.2.2 =============== Modified: SQLObject/branches/1.3/sqlobject/postgres/pgconnection.py ============================================================================== --- SQLObject/branches/1.3/sqlobject/postgres/pgconnection.py Sun May 13 09:48:41 2012 (r4524) +++ SQLObject/branches/1.3/sqlobject/postgres/pgconnection.py Sun May 13 09:52:34 2012 (r4525) @@ -289,6 +289,9 @@ assert match, "Unparseable contraint definition: %r" % indexDef assert primaryKey is None, "Already found primary key (%r), then found: %r" % (primaryKey, indexDef) primaryKey = match.group(1) + if primaryKey is None: + # VIEWs don't have PRIMARY KEYs - accept help from user + primaryKey = soClass.sqlmeta.idName assert primaryKey, "No primary key found in table %r" % tableName if primaryKey.startswith('"'): assert primaryKey.endswith('"') |
From: <sub...@co...> - 2012-05-13 15:48:50
|
Author: phd Date: Sun May 13 09:48:41 2012 New Revision: 4524 Log: Fixed a minor bug in PostgreSQL introspection [fixes issue 3471315]. Modified: SQLObject/branches/1.2/docs/News.txt SQLObject/branches/1.2/sqlobject/postgres/pgconnection.py Modified: SQLObject/branches/1.2/docs/News.txt ============================================================================== --- SQLObject/branches/1.2/docs/News.txt Fri Apr 20 08:35:41 2012 (r4523) +++ SQLObject/branches/1.2/docs/News.txt Sun May 13 09:48:41 2012 (r4524) @@ -7,6 +7,12 @@ .. _start: +SQLObject 1.2.3 +=============== + +* Fixed a minor bug in PostgreSQL introspection: VIEWs don't have + PRIMARY KEYs - use sqlmeta.idName as the key if there is no one. + SQLObject 1.2.2 =============== Modified: SQLObject/branches/1.2/sqlobject/postgres/pgconnection.py ============================================================================== --- SQLObject/branches/1.2/sqlobject/postgres/pgconnection.py Fri Apr 20 08:35:41 2012 (r4523) +++ SQLObject/branches/1.2/sqlobject/postgres/pgconnection.py Sun May 13 09:48:41 2012 (r4524) @@ -246,6 +246,9 @@ assert match, "Unparseable contraint definition: %r" % indexDef assert primaryKey is None, "Already found primary key (%r), then found: %r" % (primaryKey, indexDef) primaryKey = match.group(1) + if primaryKey is None: + # VIEWs don't have PRIMARY KEYs - accept help from user + primaryKey = soClass.sqlmeta.idName assert primaryKey, "No primary key found in table %r" % tableName if primaryKey.startswith('"'): assert primaryKey.endswith('"') |
From: SourceForge.net <no...@so...> - 2012-05-11 13:53:23
|
Bugs item #3525829, was opened at 2012-05-11 06:34 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&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 from repository Status: Open Resolution: None Priority: 5 Private: No Submitted By: LJSilver (ljsilver) >Assigned to: Oleg Broytman (phd) Summary: KeyError in multiprocessing environment Initial Comment: When disabling the cache, SQLObject works quiet well in a multiprocessing environment. Sometimes SQLObject throws KeyError from the sqlobject.cache.CacheSet.put method in the following line: self.caches[cls.__name__].put(id, obj) This seems to be because of a mapped object is put back to the DB without getting it from the DB in the same process. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-05-11 06:53 Message: What have you done to have the row without getting it first?! Did you get the row from DB in one process and passed it to the other process? How do you pass objects between processes? ---------------------------------------------------------------------- Comment By: LJSilver (ljsilver) Date: 2012-05-11 06:35 Message: I've managed to fix it using the following monkey patch: def sqlobject_cache_put_monkey(self, id, cls, obj): try: self.caches[cls.__name__].put(id, obj) except KeyError: self.caches[cls.__name__] = sqlobject.cache.CacheFactory(*self.args, **self.kw) self.caches[cls.__name__].put(id, obj) sqlobject.cache.CacheSet.put = sqlobject_cache_put_monkey ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&group_id=74338 |
From: SourceForge.net <no...@so...> - 2012-05-11 13:35:41
|
Bugs item #3525829, was opened at 2012-05-11 06:34 Message generated for change (Comment added) made by ljsilver You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&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 from repository Status: Open Resolution: None Priority: 5 Private: No Submitted By: LJSilver (ljsilver) Assigned to: Nobody/Anonymous (nobody) Summary: KeyError in multiprocessing environment Initial Comment: When disabling the cache, SQLObject works quiet well in a multiprocessing environment. Sometimes SQLObject throws KeyError from the sqlobject.cache.CacheSet.put method in the following line: self.caches[cls.__name__].put(id, obj) This seems to be because of a mapped object is put back to the DB without getting it from the DB in the same process. ---------------------------------------------------------------------- >Comment By: LJSilver (ljsilver) Date: 2012-05-11 06:35 Message: I've managed to fix it using the following monkey patch: def sqlobject_cache_put_monkey(self, id, cls, obj): try: self.caches[cls.__name__].put(id, obj) except KeyError: self.caches[cls.__name__] = sqlobject.cache.CacheFactory(*self.args, **self.kw) self.caches[cls.__name__].put(id, obj) sqlobject.cache.CacheSet.put = sqlobject_cache_put_monkey ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&group_id=74338 |
From: SourceForge.net <no...@so...> - 2012-05-11 13:34:47
|
Bugs item #3525829, was opened at 2012-05-11 06:34 Message generated for change (Tracker Item Submitted) made by ljsilver You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&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 from repository Status: Open Resolution: None Priority: 5 Private: No Submitted By: LJSilver (ljsilver) Assigned to: Nobody/Anonymous (nobody) Summary: KeyError in multiprocessing environment Initial Comment: When disabling the cache, SQLObject works quiet well in a multiprocessing environment. Sometimes SQLObject throws KeyError from the sqlobject.cache.CacheSet.put method in the following line: self.caches[cls.__name__].put(id, obj) This seems to be because of a mapped object is put back to the DB without getting it from the DB in the same process. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3525829&group_id=74338 |
From: <sub...@co...> - 2012-04-20 14:37:24
|
Author: phd Date: Fri Apr 20 08:35:41 2012 New Revision: 4523 Log: Create JSONCol. Modified: SQLObject/trunk/docs/TODO.txt Modified: SQLObject/trunk/docs/TODO.txt ============================================================================== --- SQLObject/trunk/docs/TODO.txt Tue Apr 3 13:25:40 2012 (r4522) +++ SQLObject/trunk/docs/TODO.txt Fri Apr 20 08:35:41 2012 (r4523) @@ -45,6 +45,8 @@ * Stop supporting Python 2.5: remove import sets. +* Create JSONCol. + * Stop supporting Python 2.6: restore using urllib.splituser in _parseURI. * Expression columns - in SELECT but not in INSERT/UPDATE. Something like this:: |
From: SourceForge.net <no...@so...> - 2012-04-03 19:27:20
|
Bugs item #3161107, was opened at 2011-01-18 11:46 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3161107&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 from repository >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Oleg Broytman (phd) Summary: SQLObjectIntegrityError exception with from sqlobject import Initial Comment: If I import SQLObject via from sqlobject import * the exception SQLObjectIntegrityError is not available in the global scope after doing that import. The exception is not listed in the __all__ list for the main.py module. I feel it should be in global scope since the sresults.py raises that exception in the getOne method if the select results contain more than one result. ---------------------------------------------------------------------- >Comment By: Oleg Broytman (phd) Date: 2012-04-03 12:27 Message: Fixed in the revision 4522. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3161107&group_id=74338 |
From: <sub...@co...> - 2012-04-03 19:25:48
|
Author: phd Date: Tue Apr 3 13:25:40 2012 New Revision: 4522 Log: Declare SQLObjectIntegrityError public. Modified: SQLObject/trunk/sqlobject/main.py Modified: SQLObject/trunk/sqlobject/main.py ============================================================================== --- SQLObject/trunk/sqlobject/main.py Tue Apr 3 12:34:50 2012 (r4521) +++ SQLObject/trunk/sqlobject/main.py Tue Apr 3 13:25:40 2012 (r4522) @@ -1729,7 +1729,7 @@ else: return obj -__all__ = ['NoDefault', 'SQLObject', 'sqlmeta', - 'getID', 'getObject', - 'SQLObjectNotFound', 'sqlhub', - 'setDeprecationLevel'] +__all__ = ['NoDefault', 'SQLObject', 'sqlmeta', 'sqlhub', + 'getID', 'getObject', 'setDeprecationLevel', + 'SQLObjectNotFound', 'SQLObjectIntegrityError', + ] |
From: <sub...@co...> - 2012-04-03 18:35:05
|
Author: phd Date: Tue Apr 3 12:34:50 2012 New Revision: 4521 Log: Added a link to SQLObject wiki at Google Sites. Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/docs/community.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sat Mar 31 04:41:26 2012 (r4520) +++ SQLObject/trunk/docs/News.txt Tue Apr 3 12:34:50 2012 (r4521) @@ -21,7 +21,7 @@ * PostgresConnection performs translation of exceptions to standard SQLObject's hierarchy of exceptions. -* Major update in FirebirdConnection: introspection was completely +* Major update of FirebirdConnection: introspection was completely rewritten and extended; ``charset`` was renamed to ``dbEncoding``; a longstanding bug was fixed - pass port to connect(). Modified: SQLObject/trunk/docs/community.txt ============================================================================== --- SQLObject/trunk/docs/community.txt Sat Mar 31 04:41:26 2012 (r4520) +++ SQLObject/trunk/docs/community.txt Tue Apr 3 12:34:50 2012 (r4521) @@ -25,6 +25,9 @@ The `Author List <docs/Authors.html>`_ tries to list all the major contributors. +One can also contribute to `community-editable recipe/documentation site +<https://sites.google.com/site/sqlobject/>`_. + .. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=74338&type=10 :target: http://sourceforge.net/projects/sqlobject :class: noborder |
From: <sub...@co...> - 2012-03-31 10:41:32
|
Author: phd Date: Sat Mar 31 04:41:26 2012 New Revision: 4520 Log: Stable version 1.3.0. Modified: SQLObject/tags/1.3.0/README.txt SQLObject/tags/1.3.0/setup.cfg SQLObject/tags/1.3.0/sqlobject/__version__.py Modified: SQLObject/tags/1.3.0/README.txt ============================================================================== --- SQLObject/tags/1.3.0/README.txt Sat Mar 31 04:39:50 2012 (r4519) +++ SQLObject/tags/1.3.0/README.txt Sat Mar 31 04:41:26 2012 (r4520) @@ -1,5 +1,5 @@ -SQLObject 1.3 -============= +SQLObject 1.3.0 +=============== 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.3.0/setup.cfg ============================================================================== --- SQLObject/tags/1.3.0/setup.cfg Sat Mar 31 04:39:50 2012 (r4519) +++ SQLObject/tags/1.3.0/setup.cfg Sat Mar 31 04:41:26 2012 (r4520) @@ -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.3.0/sqlobject/__version__.py ============================================================================== --- SQLObject/tags/1.3.0/sqlobject/__version__.py Sat Mar 31 04:39:50 2012 (r4519) +++ SQLObject/tags/1.3.0/sqlobject/__version__.py Sat Mar 31 04:41:26 2012 (r4520) @@ -1,8 +1,8 @@ -version = '1.3' +version = '1.3.0' major = 1 minor = 3 micro = 0 -release_level = 'trunk' +release_level = 'final' serial = 0 version_info = (major, minor, micro, release_level, serial) |
From: <sub...@co...> - 2012-03-31 10:39:56
|
Author: phd Date: Sat Mar 31 04:39:50 2012 New Revision: 4519 Log: Tagging 1.3.0 Added: SQLObject/tags/1.3.0/ - copied from r4518, SQLObject/branches/1.3/ |
From: <sub...@co...> - 2012-03-31 10:33:45
|
Author: phd Date: Sat Mar 31 04:33:39 2012 New Revision: 4518 Log: Merged revision 4517 from branch 1.3: going to release 1.3.0. Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Sat Mar 31 04:31:22 2012 (r4517) +++ SQLObject/trunk/docs/News.txt Sat Mar 31 04:33:39 2012 (r4518) @@ -13,6 +13,8 @@ SQLObject 1.3.0 =============== +Released 31 Mar 2012. + Features & Interface -------------------- |
From: <sub...@co...> - 2012-03-31 10:31:30
|
Author: phd Date: Sat Mar 31 04:31:22 2012 New Revision: 4517 Log: Going to release SQLObject 1.3.0. Modified: SQLObject/branches/1.3/docs/News.txt Modified: SQLObject/branches/1.3/docs/News.txt ============================================================================== --- SQLObject/branches/1.3/docs/News.txt Sat Mar 31 04:23:45 2012 (r4516) +++ SQLObject/branches/1.3/docs/News.txt Sat Mar 31 04:31:22 2012 (r4517) @@ -7,12 +7,11 @@ .. _start: -SQLObject (trunk) -================= - SQLObject 1.3.0 =============== +Released 31 Mar 2012. + Features & Interface -------------------- |
From: <sub...@co...> - 2012-03-31 10:23:51
|
Author: phd Date: Sat Mar 31 04:23:45 2012 New Revision: 4516 Log: Next branch will be 1.4. Modified: SQLObject/trunk/README.txt SQLObject/trunk/sqlobject/__version__.py Modified: SQLObject/trunk/README.txt ============================================================================== --- SQLObject/trunk/README.txt Sat Mar 31 04:16:06 2012 (r4515) +++ SQLObject/trunk/README.txt Sat Mar 31 04:23:45 2012 (r4516) @@ -1,4 +1,4 @@ -SQLObject 1.3 +SQLObject 1.4 ============= Thanks for looking at SQLObject. SQLObject is an object-relational Modified: SQLObject/trunk/sqlobject/__version__.py ============================================================================== --- SQLObject/trunk/sqlobject/__version__.py Sat Mar 31 04:16:06 2012 (r4515) +++ SQLObject/trunk/sqlobject/__version__.py Sat Mar 31 04:23:45 2012 (r4516) @@ -1,7 +1,7 @@ -version = '1.3' +version = '1.4' major = 1 -minor = 3 +minor = 4 micro = 0 release_level = 'trunk' serial = 0 |
From: <sub...@co...> - 2012-03-31 10:16:12
|
Author: phd Date: Sat Mar 31 04:16:06 2012 New Revision: 4515 Log: This is a stable branch. Modified: SQLObject/branches/1.3/setup.py Modified: SQLObject/branches/1.3/setup.py ============================================================================== --- SQLObject/branches/1.3/setup.py Sat Mar 31 04:08:32 2012 (r4514) +++ SQLObject/branches/1.3/setup.py Sat Mar 31 04:16:06 2012 (r4515) @@ -55,7 +55,7 @@ ], author="Ian Bicking", author_email="ia...@co...", - url="http://sqlobject.org/devel/", + url="http://sqlobject.org/", download_url="http://pypi.python.org/pypi/SQLObject/%s" % version, license="LGPL", packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages], |