sqlobject-discuss Mailing List for SQLObject (Page 21)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
2003 |
Jan
|
Feb
(2) |
Mar
(43) |
Apr
(204) |
May
(208) |
Jun
(102) |
Jul
(113) |
Aug
(63) |
Sep
(88) |
Oct
(85) |
Nov
(95) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(38) |
Feb
(93) |
Mar
(125) |
Apr
(89) |
May
(66) |
Jun
(65) |
Jul
(53) |
Aug
(65) |
Sep
(79) |
Oct
(60) |
Nov
(171) |
Dec
(176) |
2005 |
Jan
(264) |
Feb
(260) |
Mar
(145) |
Apr
(153) |
May
(192) |
Jun
(166) |
Jul
(265) |
Aug
(340) |
Sep
(300) |
Oct
(469) |
Nov
(316) |
Dec
(235) |
2006 |
Jan
(236) |
Feb
(156) |
Mar
(229) |
Apr
(221) |
May
(257) |
Jun
(161) |
Jul
(97) |
Aug
(169) |
Sep
(159) |
Oct
(400) |
Nov
(136) |
Dec
(134) |
2007 |
Jan
(152) |
Feb
(101) |
Mar
(115) |
Apr
(120) |
May
(129) |
Jun
(82) |
Jul
(118) |
Aug
(82) |
Sep
(30) |
Oct
(101) |
Nov
(137) |
Dec
(53) |
2008 |
Jan
(83) |
Feb
(139) |
Mar
(55) |
Apr
(69) |
May
(82) |
Jun
(31) |
Jul
(66) |
Aug
(30) |
Sep
(21) |
Oct
(37) |
Nov
(41) |
Dec
(65) |
2009 |
Jan
(69) |
Feb
(46) |
Mar
(22) |
Apr
(20) |
May
(39) |
Jun
(30) |
Jul
(36) |
Aug
(58) |
Sep
(38) |
Oct
(20) |
Nov
(10) |
Dec
(11) |
2010 |
Jan
(24) |
Feb
(63) |
Mar
(22) |
Apr
(72) |
May
(8) |
Jun
(13) |
Jul
(35) |
Aug
(23) |
Sep
(12) |
Oct
(26) |
Nov
(11) |
Dec
(30) |
2011 |
Jan
(15) |
Feb
(44) |
Mar
(36) |
Apr
(26) |
May
(27) |
Jun
(10) |
Jul
(28) |
Aug
(12) |
Sep
|
Oct
|
Nov
(17) |
Dec
(16) |
2012 |
Jan
(12) |
Feb
(31) |
Mar
(23) |
Apr
(14) |
May
(10) |
Jun
(26) |
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(6) |
2013 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(4) |
May
(13) |
Jun
(7) |
Jul
(5) |
Aug
(15) |
Sep
(25) |
Oct
(18) |
Nov
(7) |
Dec
(3) |
2014 |
Jan
(1) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(11) |
Nov
|
Dec
(62) |
2015 |
Jan
(8) |
Feb
(3) |
Mar
(15) |
Apr
|
May
|
Jun
(6) |
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
(19) |
2016 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(3) |
Jun
(7) |
Jul
(14) |
Aug
(13) |
Sep
(6) |
Oct
(2) |
Nov
(3) |
Dec
|
2017 |
Jan
(6) |
Feb
(14) |
Mar
(2) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
(44) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2025 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oleg B. <ph...@ph...> - 2012-02-26 11:26:24
|
On Sun, Feb 26, 2012 at 09:00:37AM +0100, Petr Jake?? wrote: > The *names* list generated in: > names = [self.sqlmeta.columns[v[0]].dbName for v in setters] > (_SO_finishCreate method in main module) > > contains unicode type string elements (column names) for the columns, that > are not manually defined in the model. The solution, I think, would be to fix columnsFromSchema to make column names strings, not unicode. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Petr J. <pet...@tp...> - 2012-02-26 08:00:44
|
> > > sqlobject.dburi="firebird://user:password@localhost > > :3050/pathToTheDatabase/automaty.fdb?charset=utf8" > > > Finally, it looks I was focused on the column values to much, when hunting mentioned UnicodeDecodeError. You can find the solution here: The *names* list generated in: names = [self.sqlmeta.columns[v[0]].dbName for v in setters] (_SO_finishCreate method in main module) contains unicode type string elements (column names) for the columns, that are not manually defined in the model. because of that: return ("INSERT INTO %s (%s) VALUES (%s)" % (table, ', '.join(names), ', '.join([self.sqlrepr(v) for v in values]))) throws: UnicodeDecodeError "'ascii' codec can't decode byte 0xc4 in position 95: ordinal not in range(128)" Yes, it looks strange, but: 1. unicode type string is generated from the ', '.join(names), when there is at least one element in the list containing unicode type string 2. an unicode type string is generated from the "INSERT INTO %s (%s) VALUES (%s)" when the first part of the string formating is executed 3. when there is an encoded string in the values, it is not possible to execute the second part of the string formating and an exception ocures to understand it, try to experiment with the following code: table = "pokladna" myJoinedNames = u'id, autorizovano, vydal_osoby_id, mena_id, vydal_automaty_id, platny_zaznam, t_stamp, castka_czk, prijal_osoby_id, vycetky_od_automatu_id, prodejni_mista_id, prijal_automaty_id, pohyby_zbozi_id, castka, id_hash_vydal, poznamka, ucel_id, id_hash_prijal' myJoinedValues = "3219, 0, 3, 1, NULL, 1, '2012-02-26 00:41:31', 2000.0, 16, NULL, NULL, NULL, NULL, 2000.0, 3, '\xc4\x9b\xc5\xa1\xc4\x8d\xc5\x99', 3, NULL" print "INSERT INTO %s (%s) VALUES (%s)" % (table, myJoinedNames, myJoinedValues) As an "short and dirty" solution I have defined all columns in the affected table manually. I am not sure, if above mentioned is not caused because of I have rewritten columnsFromSchema and guessClass methods in the firebirdconnection module. I am pretty sure, Oleg will come with an other, elegant solution for this problem. Regards Petr |
From: Oleg B. <ph...@ph...> - 2012-02-25 20:55:56
|
On Sat, Feb 25, 2012 at 07:10:51PM +0100, Petr Jake?? wrote: > sqlobject.dburi="firebird://user:password@localhost > :3050/pathToTheDatabase/automaty.fdb?charset=utf8" FirebirdConnection should rename or alias ``charset`` to ``dbEncoding``. Adding it to my TODO... Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Petr J. <pet...@tp...> - 2012-02-25 19:38:32
|
> > > Do you have any idea how to force SQLObject to use the utf-8 instead of > "ascii" for decoding? > I think I have found something. I have an other table, where inserting encoded string works. The only difference between these two tables is the field charset definition. Inserting encoded string to the table, where field charset is set to UNICODE_FSS everything works OK Inserting encoded string to the table, where field charset is set to UTF-8 throws an Exception. Any hints? Petr |
From: Petr J. <pet...@tp...> - 2012-02-25 18:10:58
|
> It seems your DB API adapter (kinterbasedb) returned unicode values. > StringCol tried to encode them to strings in dbEncoding (ascii) and > failed. Perhaps you have to set a proper dbEncoding. SQLObject 1.1 can > set one encoding per table or per connection. > > Hmmm... the unicode type string comes from the TurboGears web form actually. Now I am encoding it to the utf-8 str type when it comes from the web form but the Error occurs as before File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/firebird/firebirdconnection.py", line 105, in _queryInsertID q = self._insertSQL(table, names, values) File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/dbconnection.py", line 387, in _insertSQL ', '.join([self.sqlrepr(v) for v in values]))) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128) I made the change in the sqlobject.dburi from sqlobject.dburi="firebird://user:password@localhost :3050/pathToTheDatabase/automaty.fdb" to sqlobject.dburi="firebird://user:password@localhost :3050/pathToTheDatabase/automaty.fdb?charset=utf8" but nothing changed. I made the change in the table column definition. Because I am using "fromDatabase = True" for all tables, I added the manual definition of the column in the table definition: poznamka = UnicodeCol(dbEncoding = "utf8") but nothing changed. Do you have any idea how to force SQLObject to use the utf-8 instead of "ascii" for decoding? Petr |
From: Oleg B. <ph...@ph...> - 2012-02-25 16:10:00
|
[Answering to the list.] On Sat, Feb 25, 2012 at 03:41:59PM +0100, Petr Jake?? wrote: > It looks like the .set method (main script) is encoding unicode strings > cointained in the kw dictionary (I mean the method is changing <type > 'unicode'> to <type 'str'>) > > it is happening here: > kw[name] = dbValue = from_python(value, self._SO_validatorState) > > and I really do not understand what is going on in above mentioned row. SQLObject is not really unicode-based, it's at most unicode-aware. All processing done internally using str. And SQLObject assumes it has to pass str values to DB API drivers. So it encodes values in .set(). > File > "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/dbconnection.py", > line 387, in _insertSQL > ', '.join([self.sqlrepr(v) for v in values]))) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 16: > ordinal not in range(128) AFAIU the same problem as before but in a different place. sqlrepr tried to re-encode some values and failed as dbEncoding is 'ascii'. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Oleg B. <ph...@ph...> - 2012-02-25 15:59:53
|
On Fri, Feb 24, 2012 at 10:33:34AM +0100, Petr Jake?? wrote: > File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py", > line 1130, in _SO_selectInit > colValue = col.to_python(colValue, self._SO_validatorState) > File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/col.py", > line 513, in to_python > return value.encode(dbEncoding) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in > position 8: ordinal not in range(128) It seems your DB API adapter (kinterbasedb) returned unicode values. StringCol tried to encode them to strings in dbEncoding (ascii) and failed. Perhaps you have to set a proper dbEncoding. SQLObject 1.1 can set one encoding per table or per connection. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Petr J. <pet...@tp...> - 2012-02-24 09:33:46
|
After some investigation of the method columnsFromSchema it looks like Firebird (FB 2.5 SuperServer actualy) returns the information about the field type in following form: > u'SHORT > ' > so it is necessary to add > t = t.strip() > in the for loop (tested) > > Anyway, I guess it cant hurt anything. > > My guess was wrong. It ruined a lot of things in my web app (TurboGears actually). I see on many of my pages something like bellow included Traceback. According to the Ivan Crstic, <http://farmdev.com/talks/unicode/> the schema for working with international characters = unicode has to be: 1. Decode early (by reading ASCII from the database and decode it using charset value default to the database or to the field) >>> def to_unicode_or_bust(... obj, encoding='utf-8'):... if isinstance(obj, basestring):... if not isinstance(obj, unicode):... obj = unicode(obj, encoding)... return obj 2. Unicode everywhere 3. Encode late But I am l lost again with all this UnicodeEncodeError troubles. Any idea how to solve it? What I am doing wrong? Page handler: <bound method ProdejniMista.stavyZasobniku of <fantomas.controllers.ProdejniMista instance at 0x3404e18>> Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 121, in _run self.main() File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 264, in main body = page_handler(*virtual_path, **self.params) File "<string>", line 3, in stavyZasobniku File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/controllers.py", line 360, in expose *args, **kw) File "<string>", line 5, in run_with_transaction File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/database.py", line 359, in so_rwt retval = func(*args, **kw) File "<string>", line 5, in _expose File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/controllers.py", line 373, in <lambda> mapping, fragment, args, kw))) File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/controllers.py", line 423, in _execute_func return _process_output(output, template, format, content_type, mapping, fragment) File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/controllers.py", line 88, in _process_output fragment=fragment) File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/view/base.py", line 159, in render return engine.render(**kw) File "/usr/lib/python2.5/site-packages/TurboKid-1.0.5-py2.5.egg/turbokid/kidsupport.py", line 220, in render output=output, format=format) File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/__init__.py", line 301, in serialize raise_template_error(module=self.__module__) File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/__init__.py", line 299, in serialize return serializer.serialize(self, encoding, fragment, format) File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/serialization.py", line 107, in serialize text = ''.join(self.generate(stream, encoding, fragment, format)) File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/serialization.py", line 629, in generate for ev, item in self.apply_filters(stream, format): File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/serialization.py", line 165, in format_stream for ev, item in stream: File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/parser.py", line 221, in _coalesce for ev, item in stream: File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/serialization.py", line 477, in inject_meta_tags for ev, item in stream: File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/parser.py", line 179, in _track for p in stream: File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/filter.py", line 32, in apply_matches item = stream.expand() File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/parser.py", line 108, in expand for ev, item in self._iter: File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/parser.py", line 179, in _track for p in stream: File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/parser.py", line 221, in _coalesce for ev, item in stream: File "/TG_web/fantomas/templates/zasobniky.py", line 207, in _pull File "<string>", line 1, in <lambda> File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py", line 1154, in _SO_foreignKey return joinClass.get(id, connection=self._connection) File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py", line 882, in get val._init(id, connection, selectResults) File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py", line 924, in _init self._SO_selectInit(selectResults) File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py", line 1130, in _SO_selectInit colValue = col.to_python(colValue, self._SO_validatorState) File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/col.py", line 513, in to_python return value.encode(dbEncoding) UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 8: ordinal not in range(128) Error location in template file '/TG_web/fantomas/templates/zasobniky.kid' between line 26, column 8 and line 27, column 8: <td align="left" py:content="zasobnik.ciselnik.nazev"/> |
From: Petr J. <pet...@tp...> - 2012-02-24 08:51:52
|
> By extending method guessClass. > > Oleg, I have generated the test table<https://docs.google.com/open?id=0B8Qr2m4bDZW0UjJsX0lJVnZScGE5Q2RCbFp4Z1VTQQ>for the Firebird 2.5 database. Than using the SQL select I have found on the web, I have queried fields metadata. Details here<https://docs.google.com/open?id=0B8Qr2m4bDZW0cXJYYXUyUFlTZDZtelZzWThQam5aZw> Can it be useful somehow for extending guessClass method? Petr |
From: Oleg B. <ph...@ph...> - 2012-02-23 20:07:22
|
On Thu, Feb 23, 2012 at 07:50:33PM +0100, Petr Jake?? wrote: > BTW I have found with some luck the FLOAT type is not detected properly. > u'FLOAT' is recognized as <class 'sqlobject.col.Col'> > > How to solve this? By extending method guessClass. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Oleg B. <ph...@ph...> - 2012-02-23 20:06:04
|
On Thu, Feb 23, 2012 at 07:40:54PM +0100, Petr Jake?? wrote: > After some investigation of the method columnsFromSchema it looks like > Firebird (FB 2.5 SuperServer actualy) returns the information about the > field type in following form: > u'SHORT > ' > so it is necessary to add > t = t.strip() > in the for loop (tested) Ok, I'll add it. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Petr J. <pet...@tp...> - 2012-02-23 18:50:40
|
After some investigation of the method columnsFromSchema it looks like Firebird (FB 2.5 SuperServer actualy) returns the information about the field type in following form: > u'SHORT > ' > so it is necessary to add > t = t.strip() > in the for loop (tested) > > BTW I have found with some luck the FLOAT type is not detected properly. u'FLOAT' is recognized as <class 'sqlobject.col.Col'> How to solve this? Petr |
From: Petr J. <pet...@tp...> - 2012-02-23 18:41:06
|
On 31 January 2012 18:28, Petr Jakeš <pet...@tp...> wrote: > That's ok. "fromDatabase" schema guessing in SQLObject is a bit >> primitive. It works slightly better for The Big Three (MySQL, Postgres, >> SQLite) but still far from ideal. >> You have a chance to improve the machinery for Firebird - it is in >> FirebirdConnection class, methods columnsFromSchema and guessClass. >> > > With some luck I will check it this weekend (I can not promiss). It looks > like it gives different results with different versions of Firebird. > Actually I am trying to migrate TurboGears working application to an other > machine. The Python, TurboGears, kinterbasdb, SQLObject are the same > version. The only differences are version of Firebird and different Ubuntu > version. > After some investigation of the method columnsFromSchema it looks like Firebird (FB 2.5 SuperServer actualy) returns the information about the field type in following form: u'SHORT ' so it is necessary to add t = t.strip() in the for loop (tested) Anyway, I guess it cant hurt anything. HTH Petr |
From: Oleg B. <ph...@ph...> - 2012-02-14 07:06:24
|
On Mon, Feb 13, 2012 at 11:48:11PM -0700, P??oм???тн?????s 0x01 wrote: > I have added you to the global permissions for the site; let me know if > everything works. Good luck on the renovation too! Thanks! Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Pʀoмᴇтнᴇυs 0. <pro...@gm...> - 2012-02-14 06:48:38
|
Hi Oleg, I have added you to the global permissions for the site; let me know if everything works. Good luck on the renovation too! -James 2012/2/13 Oleg Broytman <ph...@ph...> > On Sun, Feb 12, 2012 at 06:51:04PM -0700, P??oм???тн?????s 0x01 wrote: > > https://sites.google.com/site/sqlobject/ > > > > With Google Sites the spam problem will be fairly minimal (unauthorized > > users can only post comments), and there should be no problems with > regards > > to hosting or outages either. > > Yes, the advantage of Google. And the disadvantage is Google - they > require a Google account with a filled profile, and I'm in danger of > loosing my account as I'm not going to give them all my private info. > > > Let me know if you like this; > > I don't have an idea yet. Let's look how it turns out to be. > > > I'll add you as either another editor > > I am 'oleg.broytman' at Google. > > > or just transfer the site to you > > Oh, no, not me, please! I am busy this month with a renovation at my > apartments; my wife deserted me for two weeks with her own vacation so > I am at home busy 25 hours a day with my children and with the > renovation going on. Next few months - at least a few - I'll be > exceptionally busy at the job. > > Oleg. > -- > Oleg Broytman http://phdru.name/ ph...@ph... > Programmers don't die, they just GOSUB without RETURN. > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > |
From: Oleg B. <ph...@ph...> - 2012-02-14 06:03:42
|
On Mon, Feb 13, 2012 at 03:08:46PM -0700, P??oм???тн?????s 0x01 wrote: > Whenever I try to do easy_install, it seems that the only version I can get > is sqlobject 1.0.0 ? Am I doing something wrong? You can investigate yourself what is going on with the command easy_install -nv SQLObject Probably you want an upgrade? Try easy_install -Unv SQLObject Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Oleg B. <ph...@ph...> - 2012-02-14 06:02:10
|
On Sun, Feb 12, 2012 at 06:51:04PM -0700, P??oм???тн?????s 0x01 wrote: > https://sites.google.com/site/sqlobject/ > > With Google Sites the spam problem will be fairly minimal (unauthorized > users can only post comments), and there should be no problems with regards > to hosting or outages either. Yes, the advantage of Google. And the disadvantage is Google - they require a Google account with a filled profile, and I'm in danger of loosing my account as I'm not going to give them all my private info. > Let me know if you like this; I don't have an idea yet. Let's look how it turns out to be. > I'll add you as either another editor I am 'oleg.broytman' at Google. > or just transfer the site to you Oh, no, not me, please! I am busy this month with a renovation at my apartments; my wife deserted me for two weeks with her own vacation so I am at home busy 25 hours a day with my children and with the renovation going on. Next few months - at least a few - I'll be exceptionally busy at the job. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Pʀoмᴇтнᴇυs 0. <pro...@gm...> - 2012-02-13 22:09:12
|
Hi all, Whenever I try to do easy_install, it seems that the only version I can get is sqlobject 1.0.0 ? Am I doing something wrong? Thanks! -James |
From: Timo <tim...@gm...> - 2012-02-13 11:32:24
|
Op 12-02-12 20:55, Pʀoмᴇтнᴇυs 0x01 schreef: > Hi all, > > I don't know if anyone would be interested in this, but maybe some > kind of wiki or community-editable documentation/recipe site could be > useful? This way we can submit our own recipes or tips/tricks and > maybe grow the SQLObject user base? Just to give a heads up, I would be very interested in something like this. The documentation on the website is quite good, but I keep finding myself Googling for examples etc. Other peoples blogs are ok, but it would be nice to have a clean overview of recipes on the SQLObject website itself. What pops in mind though, is that recipes become abandoned after a while, and newer SQLObject may break things in the future. It would be nice to create a system where a "tested with SQLObject xyz" is included, or even something like the compatibility system Wordpress uses for their plugins (right side, just a random plugin from mainpage): http://wordpress.org/extend/plugins/wp-super-cache/ Cheers, Timo > > -James > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss |
From: Pʀoмᴇтнᴇυs 0. <pro...@gm...> - 2012-02-13 01:51:30
|
Hi Oleg, I tried setting something up on wikia, but I'm not sure that it's the appropriate venue because there's no control over page editing. I set something up on google sites however, which seems to work better. What do you think of this? https://sites.google.com/site/sqlobject/ With Google Sites the spam problem will be fairly minimal (unauthorized users can only post comments), and there should be no problems with regards to hosting or outages either. Let me know if you like this; I'll add you as either another editor or just transfer the site to you (I'm not too clear on how Google Site permissions work beyond 'can view' and 'can edit'). I don't mind helping run it, but my available time will fluctuate -- either way, it should be a lot easier to manage than dealing with spam from an open wiki. -James 2012/2/12 Oleg Broytman <ph...@ph...> > On Sun, Feb 12, 2012 at 12:55:06PM -0700, P??oм???тн?????s 0x01 wrote: > > I don't know if anyone would be interested in this, but maybe some kind > of > > wiki or community-editable documentation/recipe site could be useful? > This > > way we can submit our own recipes or tips/tricks and maybe grow the > > SQLObject user base? > > There were a few tries to create such a thing - all failed. A > community-edited site requires a dedicated administrator who will be > available 99% of her times - to resolve network and hosting problems, to > remove spam and so on. A few people tried to be such admins and all > deserted. > Also a community-edited site requires a community, preferable an > active community - which I have failed to build, even worse - which I > destroyed. Shame on me. > I'd certainly like to take another try, though. Would you want to be > the admin? What hosting do you propose? > > Oleg. > -- > Oleg Broytman http://phdru.name/ ph...@ph... > Programmers don't die, they just GOSUB without RETURN. > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > |
From: Oleg B. <ph...@ph...> - 2012-02-12 20:10:28
|
On Sun, Feb 12, 2012 at 12:55:06PM -0700, P??oм???тн?????s 0x01 wrote: > I don't know if anyone would be interested in this, but maybe some kind of > wiki or community-editable documentation/recipe site could be useful? This > way we can submit our own recipes or tips/tricks and maybe grow the > SQLObject user base? There were a few tries to create such a thing - all failed. A community-edited site requires a dedicated administrator who will be available 99% of her times - to resolve network and hosting problems, to remove spam and so on. A few people tried to be such admins and all deserted. Also a community-edited site requires a community, preferable an active community - which I have failed to build, even worse - which I destroyed. Shame on me. I'd certainly like to take another try, though. Would you want to be the admin? What hosting do you propose? Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Pʀoмᴇтнᴇυs 0. <pro...@gm...> - 2012-02-12 19:55:32
|
Hi all, I don't know if anyone would be interested in this, but maybe some kind of wiki or community-editable documentation/recipe site could be useful? This way we can submit our own recipes or tips/tricks and maybe grow the SQLObject user base? -James |
From: Daniel D. <dan...@ba...> - 2012-02-01 18:21:35
|
Oleg Broytman <ph...@ph...> writes: > Aha, got it. You've stumbled upon a subtle bug in SQLiteConnection. > SQLiteConnection uses a different (from its parent class DBAPI) > implementation of .getConnection() and maintain its own pool - > ._threadPool along with DBAPI._pool. But it doesn't clear the pool on > .close(). > > The quick-and-dirty solution for you is to clear the pool yourself: > > Rebuildd().sqlconnection.close() > Rebuildd().sqlconnection._threadPool = {} Thanks, this solve my issue. > You preserve an old SQLiteConnection, so you don't need the > following: > >> sqlobject.dbconnection.TheURIOpener.cachedURIs={} Ok, I plan to change rebuildd code and avoid singletons, this will permit to make each unit test in a separate context (and directory) to avoid side effects. At that time, I think I will be freed of all of this. [...] > And, BTW, this > >> os.unlink("/tmp/rebuildd-tests.db") > > is just > > Rebuildd().sqlconnection.dropDatabase() Thanks a lot. -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1 |
From: Oleg B. <ph...@ph...> - 2012-02-01 15:50:11
|
On Wed, Feb 01, 2012 at 03:28:30PM +0100, Daniel Dehennin wrote: > Rebuildd().sqlconnection.close() Aha, got it. You've stumbled upon a subtle bug in SQLiteConnection. SQLiteConnection uses a different (from its parent class DBAPI) implementation of .getConnection() and maintain its own pool - ._threadPool along with DBAPI._pool. But it doesn't clear the pool on .close(). The quick-and-dirty solution for you is to clear the pool yourself: Rebuildd().sqlconnection.close() Rebuildd().sqlconnection._threadPool = {} I'll add a proper .close() to SQLiteConnection. > sqlobject.sqlhub.processConnection = Rebuildd().sqlconnection You preserve an old SQLiteConnection, so you don't need the following: > sqlobject.dbconnection.TheURIOpener.cachedURIs={} The workaround is for the case when you want to create a new SQLiteConnection like this: Rebuildd().sqlconnection = connectionForURI(...) And, BTW, this > os.unlink("/tmp/rebuildd-tests.db") is just Rebuildd().sqlconnection.dropDatabase() Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Daniel D. <dan...@ba...> - 2012-02-01 14:28:42
|
Oleg Broytman <ph...@ph...> writes: > On Wed, Feb 01, 2012 at 02:53:20PM +0100, Daniel Dehennin wrote: >> I found a thread[4] on the list speaking about the same issue >> [4] http://thread.gmane.org/gmane.comp.python.sqlobject/5769 > > The thread has the answer, IMO. So, I should have not understand: #+begin_src test_init_job (TestJob.TestJob) ... E: setUp Cannot operate on a closed database. #+end_src I move the os.unlink fro the setUp() to tearDown() which call a new function: #+begin_src python def rebuildd_global_test_teardown(): try: Rebuildd().sqlconnection.close() sqlobject.sqlhub.processConnection = Rebuildd().sqlconnection sqlobject.dbconnection.TheURIOpener.cachedURIs={} os.unlink("/tmp/rebuildd-tests.db") except Exception, e: print "E: tearDown %s" % e pass #+end_src Regards. -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1 |