sqlobject-discuss Mailing List for SQLObject (Page 26)
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: Christoph Z. <ci...@on...> - 2011-05-26 20:16:56
|
Am 26.05.2011 21:47 schrieb Oleg Broytman: > There is no need for opinions - I'm going to restore Python 2.4 > compatibility and release SQLObject 1.0.1, just not immediately Ok, thanks. If you need any help with testing, let me know. -- Christoph |
From: Oleg B. <ph...@ph...> - 2011-05-26 19:47:44
|
On Thu, May 26, 2011 at 09:20:11PM +0200, Christoph Zwerschke wrote: > Since this involves discussing which Python versions are supported, > maybe it's better to discuss it here so people can voice their opinions. There is no need for opinions - I'm going to restore Python 2.4 compatibility and release SQLObject 1.0.1, just not immediately - I've upgraded to Debian 6.0 and lost some python modules for older versions, including PySQLite2. As of tests - of course I always run tests with all supported python versions and with SQLite and PostgreSQL backends; there are many tests so I developed a set of shell scripts that run tests and it seems there is a bug in the test system somewhere as the scripts didn't report the problem. Quis custodiet ipsos custodes? Who does fix bugs in test? ;-) Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Christoph Z. <ci...@on...> - 2011-05-26 19:20:10
|
Am 26.05.2011 18:46 schrieb Oleg Broytman: > Thank you for spotting this! Where do you prefer to discuss the issue > - in the mailing list or in the SF tracker? Since this involves discussing which Python versions are supported, maybe it's better to discuss it here so people can voice their opinions. -- Christoph |
From: Oleg B. <ph...@ph...> - 2011-05-26 16:46:47
|
On Thu, May 26, 2011 at 06:34:55PM +0200, Christoph Zwerschke wrote: > Just noticed that SQLObject 1.0.0 does not work with Py 2.4 any more > which also breaks Py 2.4 compatibility for TurboGears 1. > > Can somebody look into this and either release a bugfix or declare Py > 2.4 as officially unsupported? > > I've already created a bug report at > https://sourceforge.net/tracker/?group_id=74338&atid=540672 Thank you for spotting this! Where do you prefer to discuss the issue - in the mailing list or in the SF tracker? Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Christoph Z. <ci...@on...> - 2011-05-26 16:34:55
|
Just noticed that SQLObject 1.0.0 does not work with Py 2.4 any more which also breaks Py 2.4 compatibility for TurboGears 1. Can somebody look into this and either release a bugfix or declare Py 2.4 as officially unsupported? I've already created a bug report at https://sourceforge.net/tracker/?group_id=74338&atid=540672 -- Christoph |
From: Oleg B. <ph...@ph...> - 2011-05-16 19:27:31
|
On Mon, May 16, 2011 at 09:15:57PM +0200, Daniel Fetchinson wrote: > > AFAIU sqlite3 is the only py3k-compatible driver now. I've added py-postgresql, MySQL > > Connector/Python, oursql and pyfirebirdsql to TODO, but not at the very > > top. > > What about psycopg? > > http://initd.org/psycopg/articles/2011/01/24/psycopg2-porting-python-3-report/ I haven't heard the news, thank you for the reference. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Daniel F. <fet...@go...> - 2011-05-16 19:16:06
|
> BTW, what backend are you going to use for testing? I'll be using sqlite3. > AFAIU sqlite3 is the only py3k-compatible driver now. I've added py-postgresql, MySQL > Connector/Python, oursql and pyfirebirdsql to TODO, but not at the very > top. What about psycopg? http://initd.org/psycopg/articles/2011/01/24/psycopg2-porting-python-3-report/ Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |
From: Oleg B. <ph...@ph...> - 2011-05-16 16:45:19
|
BTW, what backend are you going to use for testing? AFAIU sqlite3 is the only py3k-compatible driver now. I've added py-postgresql, MySQL Connector/Python, oursql and pyfirebirdsql to TODO, but not at the very top. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Oleg B. <ph...@ph...> - 2011-05-15 15:50:22
|
On Sun, May 15, 2011 at 04:10:04PM +0200, Daniel Fetchinson wrote: > I planning to send a series of patches for moving closer to python 3 > compatibility as far as it is possible with python 2.x > > This first patch changes all 'mydict.has_key(name)' type of checks > with 'name in mydict'. Applied and committed in the revision 4387 in the trunk. Thank you! Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Daniel F. <fet...@go...> - 2011-05-15 14:10:11
|
I planning to send a series of patches for moving closer to python 3 compatibility as far as it is possible with python 2.x This first patch changes all 'mydict.has_key(name)' type of checks with 'name in mydict'. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |
From: Daniel F. <fet...@go...> - 2011-05-15 13:49:11
|
> I'll some the patches soon, s/some/send/ Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |
From: Daniel F. <fet...@go...> - 2011-05-15 13:48:43
|
>> So basically my question is what versions of the test framework >> 'py.test' do you use for the tests > > I use py.test from SVN, currently at revision 80343; I think it's > version 1.0.1 or 1.0.2. I can upgrade to 1.3.3 (the version in Debian 6.0). I downgraded to py-1.1.1 at which version 'py' and 'py.test' were both included in 'py'. And now things work with python 2.7 just like with python 2.6. So I guess there was some non-backward compatible change in 'py' and/or 'py.test' recently. In any case the reason I needed python 2.7 is that I can test python 3 related stuff with 2.7. >> and how do you run them? > > I use a number of shell scripts. Will send them to you. Thanks! I'll some the patches soon, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |
From: Oleg B. <ph...@ph...> - 2011-05-15 12:03:32
|
On Sun, May 15, 2011 at 01:50:24PM +0200, Daniel Fetchinson wrote: > So basically my question is what versions of the test framework > 'py.test' do you use for the tests I use py.test from SVN, currently at revision 80343; I think it's version 1.0.1 or 1.0.2. I can upgrade to 1.3.3 (the version in Debian 6.0). > and how do you run them? I use a number of shell scripts. Will send them to you. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Daniel F. <fet...@go...> - 2011-05-15 11:50:31
|
Hi Oleg, I'm trying to move sqlobject closer to python 3 and plan to submit a couple of patches. But before doing so I wanted to run the test suite and ran into a bit of a mess with py.test versions. With python 2.6 and py 1.1.1 I can run the tests but with python 2.7 and py 1.4.3 and py.test 2.0.3 even 'py.test --help' doesn't work: [fetchinson@fetch sqlobject]$ py.test --version Traceback (most recent call last): File "/usr/local/bin/py.test", line 8, in <module> load_entry_point('pytest==2.0.3', 'console_scripts', 'py.test')() File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 457, in main pluginmanager=_pluginmanager, args=args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 412, in __call__ return self._docall(methods, kwargs) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 423, in _docall res = mc.execute() File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 341, in execute res = method(**kwargs) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 10, in pytest_cmdline_parse config.parse(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 337, in parse self._preparse(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 316, in _preparse self._setinitialconftest(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 295, in _setinitialconftest self._conftest.setinitial(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 159, in setinitial self._path2confmods[None] = self.getconftestmodules(anchor) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 185, in getconftestmodules clist.append(self.importconftest(conftestpath)) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 214, in importconftest self._conftestpath2mod[conftestpath] = mod = conftestpath.pyimport() File "/usr/local/lib/python2.7/site-packages/py-1.4.3-py2.7.egg/py/_path/local.py", line 529, in pyimport mod = __import__(modname, None, None, ['__doc__']) File "/home/fetchinson/files/python/svn/sqlobject/sqlobject/conftest.py", line 34, in <module> Option = py.test.config.Option File "/usr/local/lib/python2.7/site-packages/py-1.4.3-py2.7.egg/py/_apipkg.py", line 159, in __getattribute__ return getattr(getmod(), name) AttributeError: 'module' object has no attribute 'config' The sqlobject svn source is in /home/fetchinson/files/python/svn/sqlobject and I did a python2.7 setup.py develop in that directory (similarly with formencode). The installations are both fine, with python2.7 I can import sqlobject. With the py and py.test versions I have with python 2.6 there was only one library, 'py' and this included py.test. But with the newer versions that I have installed for python 2.7, they are separate, there is a 'py' and a 'pytest' package with different version numbers. So basically my question is what versions of the test framework 'py.test' do you use for the tests and how do you run them? I'd prefer duplicating the exact same setup as what you have and in that way there will be the least amount of friction between my patches and your work flow. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |
From: Oleg B. <ph...@ph...> - 2011-05-11 19:52:25
|
On Wed, May 11, 2011 at 01:14:22PM -0600, Pгoм???тн?????s 0x01 wrote: > I was wondering if it was possible to attach columns from another table Not with high-level API (classes/instances); see http://sqlobject.org/FAQ.html#how-can-i-do-a-left-join See also sqlbuilder.Select: http://sqlobject.org/SQLBuilder.html#select but it's lower-level API. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Pгoмᴇтнᴇυs 0. <pro...@gm...> - 2011-05-11 19:14:30
|
Hi all, I was wondering if it was possible to attach columns from another table (a many-to-many relationship table) to results returned from er-- that other table. To use an example from the SQLObject documentation: http://sqlobject.org/FAQ.html#how-can-i-define-my-own-intermediate-table-in-my-many-to-many-relationship Is it possible to have User.roles return the Role information along with 'active' from the UserRoles class? How might this be done? Thanks again! |
From: Pгoмᴇтнᴇυs 0. <pro...@gm...> - 2011-05-11 19:10:16
|
Thanks; I'm gonna have to comb through that code later and try to figure out how to avoid this. 2011/5/10 Oleg Broytman <ph...@ph...> > On Tue, May 10, 2011 at 03:33:43PM -0600, Pгoм???тн?????s 0x01 wrote: > > Is there something I can do to catch this? Should I be using some kind of > > registry or dictionary to keep track of imports? (Would that help?) > > In my experience, problematic import is usually a result of mixed > absolute and relative import - a submodule A imports submodule X as > parent.X and submodule B imports X as X; add sys.path manipulations and > voila - X is imported both as parent.X and top-level X. > > Oleg. > -- > Oleg Broytman http://phdru.name/ ph...@ph... > Programmers don't die, they just GOSUB without RETURN. > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > |
From: Oleg B. <ph...@ph...> - 2011-05-10 21:50:34
|
On Tue, May 10, 2011 at 03:33:43PM -0600, Pгoм???тн?????s 0x01 wrote: > Is there something I can do to catch this? Should I be using some kind of > registry or dictionary to keep track of imports? (Would that help?) In my experience, problematic import is usually a result of mixed absolute and relative import - a submodule A imports submodule X as parent.X and submodule B imports X as X; add sys.path manipulations and voila - X is imported both as parent.X and top-level X. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Pгoмᴇтнᴇυs 0. <pro...@gm...> - 2011-05-10 21:33:50
|
Is there something I can do to catch this? Should I be using some kind of registry or dictionary to keep track of imports? (Would that help?) 2011/5/10 Oleg Broytman <ph...@ph...> > On Tue, May 10, 2011 at 02:18:55PM -0600, Pгoм???тн?????s 0x01 wrote: > > Is it possible for it to be loading the same class twice? > > Yes, and bugs caused by dual import are, in my opinion, the most > painful to debug. > > Oleg. > -- > Oleg Broytman http://phdru.name/ ph...@ph... > Programmers don't die, they just GOSUB without RETURN. > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > |
From: Oleg B. <ph...@ph...> - 2011-05-10 21:04:45
|
On Tue, May 10, 2011 at 02:18:55PM -0600, Pгoм???тн?????s 0x01 wrote: > Is it possible for it to be loading the same class twice? Yes, and bugs caused by dual import are, in my opinion, the most painful to debug. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Pгoмᴇтнᴇυs 0. <pro...@gm...> - 2011-05-10 20:19:02
|
Is it possible for it to be loading the same class twice? (I am using raw__import__ statements) -- and if so, is there any way to use some kind of if/else statement to avoid a dual attempt? The big picture is that I have a uWSGI application "loader.py" which then loads up the requested *.py file and calls a run function within that file. So index.py has that run function, and it loads up a View object from SQLObject and from there determines what other additional modules to load, etc... 2011/5/10 Oleg Broytman <ph...@ph...> > On Tue, May 10, 2011 at 01:08:46PM -0600, Pгoм???тн?????s 0x01 wrote: > > ValueError: class View is already in the registry (other class is , from > the > > module lf.db in /local/lf/db.pyc; attempted new class > > Are you sure you don't have two classes named View? If not I suspect > somewhere (may be in PHP-Python bridge) there are sys.path manipulations > and you ended up importing the same module twice as different modules. > Try to print sys.modules. > > Oleg. > -- > Oleg Broytman http://phdru.name/ ph...@ph... > Programmers don't die, they just GOSUB without RETURN. > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > |
From: Oleg B. <ph...@ph...> - 2011-05-10 19:57:35
|
On Tue, May 10, 2011 at 01:08:46PM -0600, Pгoм???тн?????s 0x01 wrote: > ValueError: class View is already in the registry (other class is , from the > module lf.db in /local/lf/db.pyc; attempted new class Are you sure you don't have two classes named View? If not I suspect somewhere (may be in PHP-Python bridge) there are sys.path manipulations and you ended up importing the same module twice as different modules. Try to print sys.modules. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Sean D. <hal...@gm...> - 2011-05-10 19:54:59
|
Im just guessing here, but perhaps you should try naming your class something other than "View" On Tue, May 10, 2011 at 12:08 PM, Pгoмᴇтнᴇυs 0x01 <pro...@gm... > wrote: > Hi all, > > First, thanks for the help and support with all my earlier queries > (especially Oleg); you've all helped me a lot with this stuff, and I've > gotten over all my previous problems. > > I currently have a new problem (I am using a wrapper to run python scripts > like a PHP script/cgi script): > > Traceback (most recent call last): > File "/local/lf/index.py", line 38, in main > oContent = Content(sPageName, req); > File "/local/lf/content.py", line 75, in __init__ > self.template, self.module = self.loadTemplate(self.view.template); > File "/local/lf/content.py", line 277, in loadTemplate > __import__(config.sModulePrefix + sTemplateModule); > File "/local/lf/lf/__init__.py", line 62, in > import db; > File "/local/lf/db.py", line 34, in > class View(SQLObject): > File > "/usr/local/lib/python2.6/dist-packages/SQLObject-1.0.0-py2.6.egg/sqlobject/declarative.py", > line 92, in __new__ > cls.__classinit__(cls, new_attrs) > File > "/usr/local/lib/python2.6/dist-packages/SQLObject-1.0.0-py2.6.egg/sqlobject/main.py", > line 818, in __classinit__ > classregistry.registry(sqlmeta.registry).addClass(cls) > File > "/usr/local/lib/python2.6/dist-packages/SQLObject-1.0.0-py2.6.egg/sqlobject/classregistry.py", > line 91, in addClass > '__file__', '(unknown)'))) > ValueError: class View is already in the registry (other class is , from > the module lf.db in /local/lf/db.pyc; attempted new class > > Any ideas on what I can do to overcome this? I've tried to replicate this > error in python (interactive mode), but I haven't been able to. What causes > this error exactly? > > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > > |
From: Pгoмᴇтнᴇυs 0. <pro...@gm...> - 2011-05-10 19:08:53
|
Hi all, First, thanks for the help and support with all my earlier queries (especially Oleg); you've all helped me a lot with this stuff, and I've gotten over all my previous problems. I currently have a new problem (I am using a wrapper to run python scripts like a PHP script/cgi script): Traceback (most recent call last): File "/local/lf/index.py", line 38, in main oContent = Content(sPageName, req); File "/local/lf/content.py", line 75, in __init__ self.template, self.module = self.loadTemplate(self.view.template); File "/local/lf/content.py", line 277, in loadTemplate __import__(config.sModulePrefix + sTemplateModule); File "/local/lf/lf/__init__.py", line 62, in import db; File "/local/lf/db.py", line 34, in class View(SQLObject): File "/usr/local/lib/python2.6/dist-packages/SQLObject-1.0.0-py2.6.egg/sqlobject/declarative.py", line 92, in __new__ cls.__classinit__(cls, new_attrs) File "/usr/local/lib/python2.6/dist-packages/SQLObject-1.0.0-py2.6.egg/sqlobject/main.py", line 818, in __classinit__ classregistry.registry(sqlmeta.registry).addClass(cls) File "/usr/local/lib/python2.6/dist-packages/SQLObject-1.0.0-py2.6.egg/sqlobject/classregistry.py", line 91, in addClass '__file__', '(unknown)'))) ValueError: class View is already in the registry (other class is , from the module lf.db in /local/lf/db.pyc; attempted new class Any ideas on what I can do to overcome this? I've tried to replicate this error in python (interactive mode), but I haven't been able to. What causes this error exactly? |
From: Oleg B. <ph...@ph...> - 2011-04-25 06:54:13
|
On Sat, Apr 23, 2011 at 08:06:50PM -0600, Pгoм???тн?????s 0x01 wrote: > Another newbie question: is it possible to override the *.by<AltID> method? It's hard 'cause .by* methods are created on the fly, not via inheritance. > I have a custom encoding for that column (it is in base64), and I can't call > it naturally unless I can override the method. Writing my own method doesn't > seem to work -- it doesn't get called at all! In this case you should rather create a validator that will encode and decode your data. Similar to what HashCol does - see the source in sqlobject/include/hascol.py. Validators work for all methods. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |