[web2py] malformed date in email.send

2011-10-14 Thread Alexey Nezhdanov
Hi web2py community. My users complained that emails (sent through mail.send) arrive dated by Jan 1st, 1970. Quick investigation showed that it is due to localized date: Date: пт, 14 окт 2011 13:16:56 + I fixed it by dropping hand-made line and using one from email.utils instead (there

[web2py] SQLFORM fix

2010-10-12 Thread Alexey Nezhdanov
Hi. I managed to crash SQLFORM(db.table).accepts(request.vars,session) call by adding a 'delete_this_record=on' to the list of request variables. Proposed fix: --- sqlhtml.bak.py 2010-10-13 09:52:01.202884906 +0400 +++ sqlhtml.py 2010-10-13 09:52:06.662884519 +0400 @@ -949,7 +949,7 @@

[web2py] Instructions to setup web2py under shared wsgi hosting

2010-09-19 Thread Alexey Nezhdanov
Hello. Recently I had to setup web2py on a shared hosting. However that hosting has wsgi support. Also that was not a new site but rather an old site, ported to web2py I didn't find any good documentation on how to setup web2py in this case so had to google and experiment. So, 1) The problem:

Re: [web2py] Re: CRUD RBAC problem

2010-09-08 Thread Alexey Nezhdanov
, mdipierro mdipie...@cs.depaul.edu wrote: I think this should be considered a bug and I agree with the change. Anybody opposed? Massimo On Sep 7, 11:46 pm, Alexey Nezhdanov snak...@gmail.com wrote: Hi. I think that I found some inconsistency in the topic. When you do, say, auth.add_permission

Re: [web2py] Re: CRUD RBAC problem

2010-09-08 Thread Alexey Nezhdanov
Sure On Thu, Sep 9, 2010 at 6:11 AM, mdipierro mdipie...@cs.depaul.edu wrote: No, it does not. It must be done in two queries. Can you send me the patch by email? thanks. On Sep 8, 8:44 pm, Alexey Nezhdanov snak...@gmail.com wrote: Updated version of the patch then. Includes case where

[web2py] CRUD RBAC problem

2010-09-07 Thread Alexey Nezhdanov
Hi. I think that I found some inconsistency in the topic. When you do, say, auth.add_permission(group_id) - it assumes the permission name 'any', table name empty and record_id 0. Which in turn feels like full admin rights - any action on any table on any record. In fact, that gives no permissions

Re: [web2py] web2py Africa

2010-09-03 Thread Alexey Nezhdanov
These times fans don't need to be around the place where the site located. More than this - it says that it runs on AppEngine :) On Sat, Sep 4, 2010 at 1:23 AM, hcvst hcv...@googlemail.com wrote: Hi, http://www.domain-name-registration.co.za powered by w2p, South African (co.za) domain name

Re: [web2py] Re: Has anyone used standalone web2py DAL in a project ?

2010-08-27 Thread Alexey Nezhdanov
I use web2py's DAL in my project (daemon). I modified db.py so that all calls to create_table happen with migrate=False (because I reuse the same db as in web app). So all I need from DAL is .select, .update, .delete and .insert. Also I take care to call these functions only from single thread.

Re: [web2py] Re: fascinating

2010-08-26 Thread Alexey Nezhdanov
Yes, once I used it to print an 'enhanced stack backtrace'. Each time the site engine was crashing (not web2py, long ago) the stack trace was emailed to me along with all variables values that existed at all levels of the trace. On Fri, Aug 27, 2010 at 6:53 AM, GoldenTiger goldenboy...@gmail.com

Re: [web2py] Web2py with barcode Reader

2010-08-25 Thread Alexey Nezhdanov
The question is not THAT clear, but I guess you can use external library to connect to barcode reader. However there is at least one problem - using the barcode reader is not a browser operation. So you will need either an ajax app that will poll the server for the presence of an active barcode

[web2py] updated ru-ru.py file

2010-08-24 Thread Alexey Nezhdanov
Hi. While writting an application bumped into partial translation of russian language. Updated file attached. It is from welcome.py application, no my app specific strings present. Regards Alexey # coding: utf8 { 'update is an optional expression like field1=\'newvalue\'. You cannot update or

Re: [web2py] Will a compiled app run on GAE?

2010-08-05 Thread Alexey Nezhdanov
I think your version of python must at least match version on Google's server. Did you check that? Regards Alexey On Thu, Aug 5, 2010 at 7:48 PM, mat -- mat...@gmail.com wrote: After clicking the `compile` button in appadmin, my web2py app no longer runs on GAE. Is this expected behavior?

Re: [web2py] this must be asked a 1000 times, but I couldn't find the answer

2010-08-04 Thread Alexey Nezhdanov
You are free to write it the way you want. You don't you do that? {{=DIV(HR(),H1('README'),UL(LI(T('blah'}} I think, though, that using wrappers gives lower perfomance so you'll be consuming more CPU. Otherwise - no objections to your method. On Wed, Aug 4, 2010 at 12:39 PM, Stef Mientki

[web2py] left outer join problem on db2

2010-05-11 Thread Alexey Nezhdanov
Hi. I've come across another subtle problem with web2py's DAL running over IBM DB2 database. DB2 requires the left table to immidiatedly preceed the 'left outer join' keyword. IOW: select * from a, b left outer join c on c.a_id=a.id is incorrect. Correct form is: select * from b, a left outer join

[web2py] bug in attributes check in _select

2010-05-11 Thread Alexey Nezhdanov
Hello. There is a bug in these lines: if [key for key in attributes if not key in valid_attributes]: raise SyntaxError, 'invalid select attribute: %s' % key At the moment of raise the 'key' variable holds last ispected value which is not neccessarily incorrect.

Re: [web2py] Re: can I hook my code to db.connect() ?

2010-04-22 Thread Alexey Nezhdanov
of Field('somename','date')? On Apr 20, 12:37 am, Alexey Nezhdanov snak...@gmail.com wrote: Oh, well. May be that's an Oracle bug then. I use my custom 'console.py' script here, but output should be clear enough: BTW - time_start column was created by web2py with this line: Field

Re: [web2py] Re: can I hook my code to db.connect() ?

2010-04-22 Thread Alexey Nezhdanov
,NULL,2010-04-22 4,ddd,NULL,2010-04-23 (Pdb) print db(db.mytable.mydt2'2010-04-22').select() mytable.id,mytable.myfield,mytable.mydt,mytable.mydt2 4,ddd,NULL,2010-04-23 (Pdb) Regards Alexey On Thu, Apr 22, 2010 at 2:43 PM, Alexey Nezhdanov snak...@gmail.com wrote: Sure. In short: everything works

Re: [web2py] Re: can I hook my code to db.connect() ?

2010-04-19 Thread Alexey Nezhdanov
. Any counterindication? On Apr 19, 12:32 am, Alexey Nezhdanov snak...@gmail.com wrote: Hi. Sometimes I have to execute this line prior to making a query: oradb.executesql(ALTER SESSION set NLS_DATE_FORMAT = '-MM-DD HH24:MI:SS';) That is because Oracle by default uses different

Re: [web2py] Re: can I hook my code to db.connect() ?

2010-04-19 Thread Alexey Nezhdanov
timestamp does. On Apr 19, 11:19 am, Alexey Nezhdanov snak...@gmail.com wrote: No, I'm all for it. Actually it sounds more like bugfix since atm web2py can't make datetime queries on Oracle. On Mon, Apr 19, 2010 at 6:16 PM, mdipierro mdipie...@cs.depaul.edu wrote: There is no hook

Re: [web2py] Re: can I hook my code to db.connect() ?

2010-04-19 Thread Alexey Nezhdanov
Ah, one more little comment though. In two cases select yielded an empty list - that is intentional. On Tue, Apr 20, 2010 at 9:37 AM, Alexey Nezhdanov snak...@gmail.com wrote: Oh, well. May be that's an Oracle bug then. I use my custom 'console.py' script here, but output should be clear

[web2py] can I hook my code to db.connect() ?

2010-04-18 Thread Alexey Nezhdanov
Hi. Sometimes I have to execute this line prior to making a query: oradb.executesql(ALTER SESSION set NLS_DATE_FORMAT = '-MM-DD HH24:MI:SS';) That is because Oracle by default uses different date format that causes my queries to fail. The problem is that doing that in model is incorrect -

Re: [web2py] Re: BUG in with_alias processing

2010-04-16 Thread Alexey Nezhdanov
db(db.TEST.id0). select(TEST.ALL, b.id.count(),left=b.on(b.top_id==TEST.id)) I agree this is not completely equivalent to your query. Massimo On Apr 15, 3:07 am, Alexey Nezhdanov snak...@gmail.com wrote: Ok, I bumped into same problem again. But this time I actually DO use same table

Re: [web2py] Re: BUG in with_alias processing

2010-04-16 Thread Alexey Nezhdanov
a bug in there. Can you explain the fix below? Oracle does not understand AS? Is there documentation about this somewhere I can reference as a comment to the fix? Massimo On Apr 16, 1:11 am, Alexey Nezhdanov snak...@gmail.com wrote: Oh, Massimo, actually I was wrong here again. Sorry

[web2py] BUG in with_alias processing

2010-04-15 Thread Alexey Nezhdanov
Ok, I bumped into same problem again. But this time I actually DO use same table twice. So, the task: there is a table that MAY refer to itself. In my application monitors network tree for disconnections (is just pings hosts). Some alerts 'come out of the blue' and some are caused by these - i.e.

Re: [web2py] Self Reference or Null

2010-04-15 Thread Alexey Nezhdanov
Question not clear. What does mean 'map' here? On Thu, Apr 15, 2010 at 4:45 PM, Leandro - ProfessionalIT lsever...@gmail.com wrote: Friends, I have a situation where I can have a dog that I don't know your father and mother. How to resolve this ? for example, a dog that I buy in a shop.

Re: [web2py] Re: Self Reference or Null

2010-04-15 Thread Alexey Nezhdanov
Hmm. Model looks ok. Why? On Thu, Apr 15, 2010 at 8:35 PM, Leandro - ProfessionalIT lsever...@gmail.com wrote: Hi Alexey, sorry, map = define table in models.py. -- Leandro. -- To unsubscribe, reply using remove me as the subject.

[web2py] Can't use placeholders when calling stored procedure in DB2

2010-03-23 Thread Alexey Nezhdanov
Problem: (Pdb) print db2db.executesql(call webxdsl.abonsearch (123, 'port_id', '41110', '1', ?, ?);) *** Error: ('07001', '[07001] [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001 (-9) (SQLExecDirectW)') (Pdb) print db2db._execute(call webxdsl.abonsearch (?),(1,2)) ***

[web2py] bug in current sql.py: aliases w/ left join

2010-03-12 Thread Alexey Nezhdanov
) -- Regards Alexey Nezhdanov -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit

[web2py] Problem with using 'exists' keyword in complex SQL query

2010-02-19 Thread Alexey Nezhdanov
Hello. I'm trying to use 'exists' keyword from the DB2 database. I know that web2py doesn't support that natively so I tried to pass the additional condition in as a string. However I struck a problem that the same table used in the same query 3 times (query greatly simplified here but it still

Re: [web2py] Re: Bug in sql.Set ?

2010-02-11 Thread Alexey Nezhdanov
as floating number - days. On Thu, Feb 11, 2010 at 9:14 PM, mdipierro mdipie...@cs.depaul.edu wrote: can you provide an example of usage? On Feb 11, 12:48 am, Alexey Nezhdanov snak...@gmail.com wrote: Hi. Sorry, didn't check if that bug still exists in latest version. Here is the problem

[web2py] Bug in sql.Set ?

2010-02-10 Thread Alexey Nezhdanov
Hi. Sorry, didn't check if that bug still exists in latest version. Here is the problem: in Oracle substracting one datetime column from the other gives the floating number (days). However the web2py considers the result to be another datetime, so this Set produces invalid condition string: (Pdb)

Re: [web2py] new dal

2010-02-05 Thread Alexey Nezhdanov
I_can_test_with_Oracle_if_new_DAL_supports_@(connector)_and_.(schema)_in_tablenames, I_had_to_modify_old_DAL_for_this. Sorry_for_underscores._Space_looks_broken. On Fri, Feb 5, 2010 at 7:14 PM, mdipierro mdipie...@cs.depaul.edu wrote: I encourage eveybody running from source to try the new

Re: [web2py:37667] Re: How to connect to Oracle table with dot and 'at' in the name?

2009-12-22 Thread Alexey Nezhdanov
a patch (just like before). On Tue, Dec 22, 2009 at 7:15 PM, Alexey Nezhdanov snak...@gmail.com wrote: I do not know actually as I am not the Oracle expert (or even regular user). Will find out tomorrow. Suppose - I can't - can you give any clue how to make an alias in web2py? The ideal would

Re: [web2py:37666] Re: How to connect to Oracle table with dot and 'at' in the name?

2009-12-22 Thread Alexey Nezhdanov
',length=16), migrate=False ) On Tue, Dec 22, 2009 at 5:47 PM, mdipierro mdipie...@cs.depaul.edu wrote: No. . and @ are not allowed in table names. Can you alias in Orcale? On Dec 22, 12:15 am, Alexey Nezhdanov snak...@gmail.com wrote: Hello. I've googled this group for my problem

[web2py:37639] How to connect to Oracle table with dot and 'at' in the name?

2009-12-21 Thread Alexey Nezhdanov
/web2py/browse_thread/thread/3c27af05333b34b5/a121f8bbccfeeb7f?lnk=gstq=oracle+table+dot#a121f8bbccfeeb7f -- Regards Alexey Nezhdanov -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com

[web2py:35503] RSS encoding

2009-11-17 Thread Alexey Nezhdanov
) return s.getvalue() -- Regards Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email

[web2py:31404] Re: [web2py:/] Re: file descriptors leak

2009-09-21 Thread Alexey Nezhdanov
You don't need the thread lock over the whole function: try: return MemcacheClient.__mc_instance else: lock() if not hasattr(MemcacheClient, '__mc_instance'): MemcacheClient.__mc_instance = _MemcacheClient(*a, **b) unlock() return MemcacheClient.__mc_instance On Sun, Sep

[web2py:29671] Re: Comma creates an invalid request?

2009-08-31 Thread Alexey Nezhdanov
Never tried but you probably also can try %2c On Mon, Aug 31, 2009 at 10:57 AM, SergeyPo ser...@zarealye.com wrote: Yes, in my application comma creates invalid request' error too. I had to write a special javascript routine to ensure that there is no commas in requests (they are produced by

[web2py:29672] Does double submission still breaks with recent web2py code?

2009-08-31 Thread Alexey Nezhdanov
Hello. Massimo, I have a question regarding double form submission. There is a phrase in the book (page 188): = Moreover, when multiple forms are present on the same page, the mechanism for preventing double submission breaks... = That was a good reason for me to look into the

[web2py:29679] Re: developer questions

2009-08-31 Thread Alexey Nezhdanov
1. Yes, if you want to port your application to python then you definitely have to learn the language. 2. Since this maillist is most 'web2py developer rich' place probably it is safe to ask here if Massimo doesn't mind. On Mon, Aug 31, 2009 at 4:41 PM, Markus prakash...@gmail.com wrote: Hello

[web2py:29688] Re: Does double submission still breaks with recent web2py code?

2009-08-31 Thread Alexey Nezhdanov
: That line should have been corrected. You cannot have two forms in the same page with the same _formname. That is all. On Aug 31, 2:34 am, Alexey Nezhdanov snak...@gmail.com wrote: Hello. Massimo, I have a question regarding double form submission. There is a phrase in the book (page 188

[web2py:29691] Re: web2py book, 2nd Ed

2009-08-31 Thread Alexey Nezhdanov
P.S. Some corrections have been proposed. I will implement those corrections asap. Oh, I've spotted several typos, but right now can recall just one :( page 187, onvalidation. In model you declare field 'd' but in external validator you set variable 'c'. I'll make a list of any other ones

[web2py:29692] Re: web2py book, 2nd Ed

2009-08-31 Thread Alexey Nezhdanov
dump that is included under it. You have to regenerate both. On Mon, Aug 31, 2009 at 5:29 PM, Alexey Nezhdanov snak...@gmail.com wrote: P.S. Some corrections have been proposed. I will implement those corrections asap. Oh, I've spotted several typos, but right now can recall just one :( page

[web2py:28337] Re: Static Uploads Time Out

2009-08-11 Thread Alexey Nezhdanov
yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr

[web2py:27677] Re: Default CRYPT() is unsecure

2009-07-31 Thread Alexey Nezhdanov
]) This will of course break backward compatibility, but this is   a real security vulnerability. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group

[web2py:27490] Re: A call for resumés...

2009-07-28 Thread Alexey Nezhdanov
distant future, and then some perminent work if all plays out well. (The contract work doesn't need to be in Finland. :D) Best Regards, Jason Brower -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:27229] Re: Stumped Beyond Belief

2009-07-23 Thread Alexey Nezhdanov
trunk Massimo On Jul 22, 3:09 am, Alexey Nezhdanov snak...@gmail.com wrote: On Friday 17 July 2009 19:11:11 JohnMc wrote: BTW, this is perfect example of helpless backtrace. Consider how much better it would be if it look like this: == SyntaxError: invalid field name

[web2py:27137] Re: Stumped Beyond Belief

2009-07-22 Thread Alexey Nezhdanov
over all 'raise' statements and submit a patch that will add more useful info just like in this example? Just sayin'. On Jul 17, 2:12 am, Alexey Nezhdanov snak...@gmail.com wrote: BTW, this is perfect example of helpless backtrace. Consider how much better it would be if it look like

[web2py:26725] Re: Stumped Beyond Belief

2009-07-17 Thread Alexey Nezhdanov
://groups.google.com/group/web2py/browse_thread/thread/8568a5ea5800908/be4e8cfefd4c5b12?lnk=gstq=alexey+nezhdanov#be4e8cfefd4c5b12 -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py

[web2py:24439] Re: Access Javacript variable's value in Web2py Code From view

2009-06-18 Thread Alexey Nezhdanov
, Yannick P. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from

[web2py:24298] Re: Views without controllers

2009-06-16 Thread Alexey Nezhdanov
know why though. You just need to have some content inserted into a site template. static file will not do that. Massimo - is it possible to have a controllerless static view which is still have view {{insert}} capabilities ? Thank you. -- Sincerely yours Alexey Nezhdanov

[web2py:24193] Re: Proposal for auth

2009-06-15 Thread Alexey Nezhdanov
opinions about this before changing it. Pros? Cons? Massimo On Jun 14, 10:28 pm, Alexey Nezhdanov snak...@gmail.com wrote: No, I didn't meant IE. I meant that since redirect page doesn't have anybody for a user AND it is not a 301/303 page - it actually rendered. That is visible at least

[web2py:24196] Re: Proposal for auth

2009-06-15 Thread Alexey Nezhdanov
On Jun 14, 10:28 pm, Alexey Nezhdanov snak...@gmail.com wrote: No, I didn't meant IE. I meant that since redirect page doesn't have anybody for a user AND it is not a 301/303 page - it actually rendered. That is visible at least in Firefox. Also if I just add some random content

[web2py:24143] Re: Proposal for auth

2009-06-14 Thread Alexey Nezhdanov
Ok, Massimo, do you still think this is a good idea? Should I make this optional for auth module with default set to [SE-friendly] 401? On Saturday 13 June 2009 20:08:36 Alexey Nezhdanov wrote: On Saturday 13 June 2009 16:58:33 mdipierro wrote: I will take this patch! Here it is, attached

[web2py:24185] Re: Proposal for auth

2009-06-14 Thread Alexey Nezhdanov
are being redirected' - site again). If you think that it is a good idea - I'll do. On Monday 15 June 2009 01:05:25 mdipierro wrote: You can replace the page blanking by adding some content longer than 512 chars On Jun 13, 11:08 am, Alexey Nezhdanov snak...@gmail.com wrote: On Saturday 13 June 2009

[web2py:24063] Proposal for auth

2009-06-13 Thread Alexey Nezhdanov
='auth',f='login')} If this is a good idea - I'll write a patch. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email

[web2py:24097] Re: Proposal for auth

2009-06-13 Thread Alexey Nezhdanov
and redrawn as opposed to 303 which just waits a bit, then instantly replaces page content. I do not know if there is a way to suppress that page blanking. Otherwise it seems to be working as intended. On Jun 13, 6:19 am, Alexey Nezhdanov snak...@gmail.com wrote: I'm writing unit tests for my app

[web2py:23978] Re: Self-reference table error after upgrading to the latest svn version of web2py

2009-06-12 Thread Alexey Nezhdanov
1143, in __init__ new_fields = [ SQLField('id', 'id') ] SyntaxError: SQLTable: table does not exist This worked before until I updated just this evening to Version 1.64.1 Any help would be appreciated. Thanks! -- Sincerely yours Alexey Nezhdanov

[web2py:23982] Re: web2py 1.64.1 and Auth funnies

2009-06-12 Thread Alexey Nezhdanov
this way. Some let me operate normally. (I am properly logged in during these operations.) I'll play around more tomorrow evening and see if I can see any rhyme or reason for the rejections. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received

[web2py:24058] Re: web2py and Debian

2009-06-12 Thread Alexey Nezhdanov
On Friday 12 June 2009 20:49:28 mdipierro wrote: I would go with bare web2py unless somebody wants to work on improving and clening up the sysadmin appliance. Umm... You propose to drop /admin/ from debian web2py package??? Thanks for your help -- Sincerely yours Alexey Nezhdanov

[web2py:23903] Re: not authorized is 401, not 400

2009-06-11 Thread Alexey Nezhdanov
:( I had to read code closer. There are actually three different keys so three different codes required. Modified patch attached. On Thursday 11 June 2009 17:15:23 Alexey Nezhdanov wrote: Hello. It is more proper to use 401 status code than 400 for 'not authorized' case. http://www.w3.org

[web2py:23937] Re: web2py 1.64.0 posted

2009-06-11 Thread Alexey Nezhdanov
) Massimo -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group

[web2py:23973] Re: YACI, or how to speed up model loading

2009-06-11 Thread Alexey Nezhdanov
EXTRA model to be included - I want to avoid loading unnecessary models. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send

[web2py:23818] Re: web2py perfomance

2009-06-10 Thread Alexey Nezhdanov
On Wednesday 10 June 2009 12:40:44 AchipA wrote: On Jun 10, 7:01 am, Alexey Nezhdanov snak...@gmail.com wrote: I get these results (best timing):   try-variant: 10.24s   regex: 9.58s So on my laptop try:except: function loses about 5% to regex - probably it depends on hardware/OS

[web2py:23821] Re: web2py perfomance

2009-06-10 Thread Alexey Nezhdanov
interrupted somewhere (disk, app, multitaskting, etc). See http://docs.python.org/library/timeit.html , it's quite useful. I was wondering during my previous testing if I should use only 'minimal' time. Thank you for the link, will read. -- Sincerely yours Alexey Nezhdanov

[web2py:23826] Re: web2py perfomance

2009-06-10 Thread Alexey Nezhdanov
On Jun 10, 7:48 am, Alexey Nezhdanov snak...@gmail.com wrote: On Wednesday 10 June 2009 16:31:31 AchipA wrote:So on my laptop try:except: function loses about 5% to regex - probably it depends on hardware/OS. Interesting, which python/platform are you using

[web2py:23837] Re: web2py perfomance

2009-06-10 Thread Alexey Nezhdanov
at the trunk tomorrow morning. Massimo On Jun 10, 11:10 am, Alexey Nezhdanov snak...@gmail.com wrote: Ok. Basically I'd like you to: 1) apply 'inits2.diff' - it optimises SQLTable.__init__ and SQLField.__init__ 2) remove is_integer altogether and replace it everywhere with str(id).isdigit

[web2py:23651] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
Ok. Now the confusion is resolved. 1) Speed improvements of 70% and up that I reported yesterday are really exist. I just reproduced a 3.47 times model speedup and 2.15 overall speedup for my app (r875 vs r822+inits). BUT this app is atypical. I have added some time measuring code there so it

[web2py:23655] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
new testing: SERVER KERNEL --prints r8750.04898 r822ini 0.03070 1.60x --silent r8750.04914 r822ini 0.03049 1.61x So I get much more consistent results on this hardware. While this is obviously not the best perfomance (my weaker box, with less RAM, troubled with video output

[web2py:23662] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
help to have tests in a state that you can ask others to run them;   a dozen or so other random boxes will help you gain the confidence you seek I think On Tue, Jun 9, 2009 at 2:12 AM, Alexey Nezhdanov snak...@gmail.com wrote: new testing: SERVER KERNEL --prints r875    0.04898

[web2py:23665] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
Wrote 'optimised inits v2' patch. Tested everything. Once again I changed my testing pattern a bit. 1) I dumped my own timing tool in favor of much more standard 'ab' (apache benchmark). 2) I decidedly will publish all these results in two main. I just finished first round of testing. Here are

[web2py:23671] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
Results of second set of test runs: r87545.523ms r88220.614ms inits v.1 18.464ms inits v.2 18.677ms inits1+lazyT15.377ms inits2+lazyT15.280ms Observed noise was 0.502ms for slowest execution (90:1 signal-to-noise) and 0.889ms for fastest execution

[web2py:23672] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
Forgot about patches. Here they are. 'optimised inits v.2' 'lazy tables' (this one is modified to be applicable to trunk version of sql.py) On Tue, Jun 9, 2009 at 3:10 PM, Alexey Nezhdanov snak...@gmail.com wrote: Results of second set of test runs: r87545.523ms r882

[web2py:23680] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
Wanted to attach test data as well but automatically clicked 'send' and oops... it gone. Here are couple of test runs: 1.63.544.572 On Tue, Jun 9, 2009 at 4:14 PM, Alexey Nezhdanov snak...@gmail.com wrote: Finally, I started migration (before I was just slapping sql.py, checked out of the trunk

[web2py:23682] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
-to-noise). full 'ab' output attached On Tue, Jun 9, 2009 at 4:25 PM, Alexey Nezhdanov snak...@gmail.com wrote: Wanted to attach test data as well but automatically clicked 'send' and oops... it gone. Here are couple of test runs: 1.63.544.572 On Tue, Jun 9, 2009 at 4:14 PM, Alexey Nezhdanov

[web2py:23811] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
On Wednesday 10 June 2009 09:01:04 Alexey Nezhdanov wrote: about 10k times faster than yours. Ah... no. I never used timit module before. You get values of the same order. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message

[web2py:23585] Re: web2py perfomance

2009-06-08 Thread Alexey Nezhdanov
is_integer=re.compile('-?[\d]+).match -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email to web2py@googlegroups.com

[web2py:23592] Re: web2py perfomance

2009-06-08 Thread Alexey Nezhdanov
profiling. Please check out the latest trunk. Massimo P.S. Here is small fix to is_integer. We forgot about negative numbers: Also this version is tiny bit faster is_integer=re.compile('-?[\d]+).match -- Sincerely yours Alexey Nezhdanov  x_table.diff

[web2py:23598] Re: web2py perfomance

2009-06-08 Thread Alexey Nezhdanov
, will finish in ~10minutes. Preliminary results (10 sets:) min 0.05579 avg 0.055944 max 0.05611 model time unknown That is against revision 875. Massimo On Jun 8, 9:54 am, Alexey Nezhdanov snak...@gmail.com wrote: On Monday 08 June 2009 17:57:36 mdipierro wrote: Thanks Alexey, since

[web2py:23599] Re: web2py perfomance

2009-06-08 Thread Alexey Nezhdanov
On Monday 08 June 2009 19:27:29 Alexey Nezhdanov wrote: On Monday 08 June 2009 19:18:26 mdipierro wrote: I understand what you say below but I think it is important to measure the total speedup from the original/stable sql.py and the one in trunk on the same machine and same complex model

[web2py:23602] Re: web2py perfomance

2009-06-08 Thread Alexey Nezhdanov
on this. A pity really that we didn't yet hit 100% barrier. If you don't mind - I'll continue working on it. And btw - I just realised that my 'optimised inits' patch is not optimal. I can do it better. Stand by. Massimo -- Sincerely yours Alexey Nezhdanov

[web2py:23609] Re: web2py perfomance

2009-06-08 Thread Alexey Nezhdanov
plan. Probably we won't hit 100% barrier :( I'm sorry guys. So much excitement... -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post

[web2py:23480] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
On Sunday 07 June 2009 11:13:49 Alexey Nezhdanov wrote: 1) When initialising, SQLField uses dir() call to find any clashes with reserved names. I was a bit incorrect here. It checks for already defined fields too. Anyways - I optimised it by commenting it out :-P In practice I'd recommend

[web2py:23482] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
from __future__ import with_statement and that WILL break python 2.4 compartibility once again. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post

[web2py:23490] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
On Sunday 07 June 2009 15:49:31 Iceberg wrote: On Jun7, 6:35pm, Alexey Nezhdanov snak...@gmail.com wrote: 2) is_integer is a fast call, but with 1.1k (!) calls ... Replaced it with my own version: integer_pat=re.compile('[0-9]+$') is_integer=lambda x: integer_pat.match(x) it's about

[web2py:23491] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
knew that I possible breaking other people's apps. But these changes were too effective to not try. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group

[web2py:23493] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
and then into sql.py. You omitted the validators patch completely. Why? W/o it all that testing is loss of time. :( I need to go now. I'll provide backwards-compartible validators patch when I return (something like 5 hours from now). -- Sincerely yours Alexey Nezhdanov

[web2py:23494] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
app (replace welcome.w2p with any packed app). There are many bug fixes in the library and new features that you would otherwise miss. Massimo On Jun 7, 7:33 am, Alexey Nezhdanov snak...@gmail.com wrote: On Sunday 07 June 2009 16:10:10 mdipierro wrote: BTW... why you did not like the newer

[web2py:23520] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
too then. Or may be just wait a day or two until I do deeper profiling. Please check out the latest trunk. Massimo P.S. Here is small fix to is_integer. We forgot about negative numbers: Also this version is tiny bit faster is_integer=re.compile('-?[\d]+).match -- Sincerely yours Alexey

[web2py:23477] Re: web2py perfomance

2009-06-07 Thread Alexey Nezhdanov
takes 30% (!!!) of time. That expense happens mostly in the kids, but the function itself takes a good share too. Definitely worths looking closer. 5) another __init__, now the SQLTable's. Same strings attached as to (4). Massimo On Jun 6, 1:14 am, Alexey Nezhdanov snak...@gmail.com wrote

[web2py:23406] Re: web2py perfomance

2009-06-06 Thread Alexey Nezhdanov
June 2009 07:53:18 Alexey Nezhdanov wrote: ON Saturday 06 June 2009 00:25:47 mdipierro wrote: One other trick you can try is replace db.define_table('table',SQLField('field'),...) db.table.field.requires= with db.define_table('table',SQLfield('field',requires=...),...) and so

[web2py:23317] web2py perfomance

2009-06-05 Thread Alexey Nezhdanov
structures somewhere around, probably pickled. May be it is still possible to use that approach to some extent? Or may be I am just completely missing the point. Please comment. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message

[web2py:23363] Re: web2py perfomance

2009-06-05 Thread Alexey Nezhdanov
has to open the db every time. Massimo On Jun 5, 2:58 am, Alexey Nezhdanov snak...@gmail.com wrote: Hello again. Recently I measured the perfomance of web2py regarding to 'milliseconds per request'. Got some unexpected results. The most slow part of the application is the model. It takes

[web2py:23385] Re: web2py perfomance

2009-06-05 Thread Alexey Nezhdanov
for processor time anyways. And actually the same goes about dedicated hosting too. If someone targets only a few visitors per day - it's ok. But not if we want tens and hundreds pageloads per second. On Jun 5, 11:29 am, Alexey Nezhdanov snak...@gmail.com wrote: On Friday 05 June 2009 17:07:55

[web2py:23037] Re: Upload progress

2009-06-01 Thread Alexey Nezhdanov
if there is an equivalent function somewhere in Web2py? If not, is there a way to show a progress of an upload to the user (without using Flash)? Thanks! -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you

[web2py:22643] Re: shouldn't tickets return HTTP(500)?

2009-05-25 Thread Alexey Nezhdanov
. in principle one just need to change 200 into 500 ino check_error_route Can you point me to any documentation that talks about the size of text in the error page and IE, because I do not have a windows machine handy to test it. Massimo On May 24, 10:41 am, Alexey Nezhdanov

[web2py:22646] Re: shouldn't tickets return HTTP(500)?

2009-05-25 Thread Alexey Nezhdanov
machine handy to test it. Massimo On May 24, 10:41 am, Alexey Nezhdanov snak...@gmail.com wrote: Please see the patch attached. Tested with IE6, I don't have any others under the hand, but deciding on what I've found on the Net - it should

[web2py:22541] progress bar with javascript

2009-05-24 Thread Alexey Nezhdanov
of wrapping some of web2py's internal procedures, but I'm not sure if I can access session instance from there. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework

[web2py:22540] shouldn't tickets return HTTP(500)?

2009-05-24 Thread Alexey Nezhdanov
and doesn't react properly to the error. So here is the subject - since that's an internal error - shouldn't it be HTTP(500) or at least HTTP(400) ? -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[web2py:22562] Re: shouldn't tickets return HTTP(500)?

2009-05-24 Thread Alexey Nezhdanov
on my box so I'll test it myself. Massimo On May 24, 2:17 am, Alexey Nezhdanov snak...@gmail.com wrote: Here is my problem. There is a javascript app that does asyncronous file upload. It works nice with web2py when I test it on localhost, but when I deliberately tried it over a slow link

  1   2   >