Re: AuthKit bug!

2009-12-28 Thread Marcin Kasperski
I have to use 2.4. Our servers are running RedHat Enterprise Linux 5.4 which ships py2.4 by default. Yeah, RedHat Enterprise, our beloved museum... I used to compile python2.6 which is better, but having to install compilation tools on these servers is considered a security risk. Have you

Routes and the leading slash

2009-11-09 Thread Marcin Kasperski
-- -- | Marcin Kasperski |(...) the only completion criterion for | http://mekk.waw.pl | the Analysis and Design phases is - the date

Re: Routes and the leading slash

2009-11-09 Thread Marcin Kasperski
Jonathan Vanasco jonat...@findmeon.com writes: What version of Routes do you have installed? 1.11 It definitely does not requires the leading slash in Routes-1.10 OK, I was not sure, someone on IRC suggested that the change was introduced in 0.9.7. Still, it deserves some warning, I just

Re: Pylons and Mako caching configuration

2009-09-16 Thread Marcin Kasperski
Is there a way to make Mako aware of beaker.cache.type setting inside Pylons? Let me quote recent Mako 0.2.5 announcement: - Mako 0.2.5 is now released and available at http://www.makotemplates.org/download.html . The new feature in here (which I've been using for many months now,

Invalid thread id (and thread hung)

2009-09-10 Thread Marcin Kasperski
In logs of my pylons app I spotted recently a few backtraces like the one below. Not sure whether this is harmful, but maybe it is worth a look? 2009-09-10_06:08:37.07570 08:08:37,075 WARNI [paste.httpserver.ThreadPool] Thread 47284430936400 hung (working on task for 9610 seconds)

Re: Pylons and memory use

2008-06-09 Thread Marcin Kasperski
I was thinking about signing up with a web host that supports Pylons (among many other things) and one of the differences between the various plans is application memory for long-running processes. The plan I'd like to sign up for has 80MB. Does anyone know if this is enough for basic Pylons

Re: Documentation, Sphinx, linking

2008-05-05 Thread Marcin Kasperski
master page here or there. PS And it would be truly beautiful if there existed single pretty PDF file which would allow one to print 'everything he needs...'. -- -- | Marcin Kasperski | Communication takes place between people

Re: Multiple Pylons instances, processor affinity, and threads

2008-04-24 Thread Marcin Kasperski
WSGIDaemonProcess let you set the number of dedicated processess... -- -- | Marcin Kasperski | A process that is too complex will fail. | http://mekk.waw.pl | (Booch

simplejson 1.8.1 windows easy_install (compilation) failure

2008-04-16 Thread Marcin Kasperski
Attempt to easy_install pylons 1.9.7beta on windows ends during simplejson 1.8.1 install with: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Ic:\python25\include -IC:\users\path-to-my-virtual-env\PC /Tcsimplejson/_speedups.c

Re: Internal Errors due to WebError failures on source encoding

2008-04-14 Thread Marcin Kasperski
Are there any chances to have this patched, in any - even temporary and dirty - way, so easy_install-ed weberror does not crash? At the moment I must manually patch it on every environment, that's really troublesome. --~--~-~--~~~---~--~~ You received this

Re: Unpacking PylonsApp?

2008-04-14 Thread Marcin Kasperski
and smoother. PS I roughly did the aforementioned split, can post it if somebody is interested. Not much testing so far though. -- -- | Marcin Kasperski | Users typically do not know exactly what | http://mekk.waw.pl | they want

Unpacking PylonsApp?

2008-04-11 Thread Marcin Kasperski
PylonsApp seems to do two separate things: - construct and register objects like request, response, session, g, h, ... - dispatch the request to correct controller (and wrap it with testing support and error handling) Couldn't those two be separated? Why? Well, I would fairly like to

Internal Errors due to WebError failures on source encoding

2008-04-08 Thread Marcin Kasperski
I have comments and docstrings in Polish in my (utf-8 encoded) sources. -- -- | Marcin Kasperski | In any large change, 1/3 will think it is | http://mekk.waw.pl | great, 1/3 will think it is stupid, and 1/3

Re: Asynchronous HTTP requests

2008-03-03 Thread Marcin Kasperski
to be adapted... -- -- | Marcin Kasperski | Software is not released, | http://mekk.waw.pl | it is allowed to escape

Re: How should I include condicional css into my base template?

2008-02-21 Thread Marcin Kasperski
id=blahblah ... /body - in CSS #header { background: ...default-one...; } #blahblah #header { background: ...specific-one...; } Of course you can also rewrite it to classes instead of ids. -- -- | Marcin Kasperski

Re: Pylons + mod_wsgi Oracle

2008-02-14 Thread Marcin Kasperski
Damjan [EMAIL PROTECTED] writes: AFAIK you'll have to start httpd with env - ORACLE_HOME=... /usr/sbin/httpd ... and add PassEnv ORACLE_HOME (or sth like that, haven't used it for some time) to the apache configuration. Apache removes environment variables for some reason...

Re: [ANN] Pylons Cheatsheet

2008-01-28 Thread Marcin Kasperski
http://wiki.pylonshq.com/display/pylonsmisc/Pylons+Cheatsheet Minor remark: in mako templates I prefer ${ next.body() } not ${ self.body() } If you use only one-level inheritance then there is no difference, but next is useful if you have sequence of templates (say main layout,

Re: debugging beaker

2008-01-18 Thread Marcin Kasperski
And I don't setup db conn on every requests. At least I think so. sqlalchemy.default.echo_pool = True -- -- | Marcin Kasperski | You have the right to produce quality work | http://mekk.waw.pl | at all the times

Re: Templatizing javascripts

2007-12-17 Thread Marcin Kasperski
application startup (and save them in public directory just then). Using caching reverse-proxy (and setting caching headers) is another possibility. -- -- | Marcin Kasperski | Working overtime sucks the spirit and | http

Any chances for printable (PDF?) docs?

2007-12-17 Thread Marcin Kasperski
. -- -- | Marcin Kasperski | In any large change, 1/3 will think it is | http://mekk.waw.pl | great, 1/3 will think it is stupid, and 1/3 || will wait (Reed

Re: Any chances for printable (PDF?) docs?

2007-12-17 Thread Marcin Kasperski
... -- -- | Marcin Kasperski | If we are to be successful, we must still have | http://mekk.waw.pl |the courage to put our faith in people as || opposed to a process. (Booch,Martin,Newkirk

Re: using django's newforms

2007-11-27 Thread Marcin Kasperski
? -- -- | Marcin Kasperski | You have the right to produce quality work | http://mekk.waw.pl | at all the times. (Beck

Re: Routes user survey

2007-11-23 Thread Marcin Kasperski
the destination object using the redirected-to route without generating any redirect to the browser) as one of the methods. -- -- | Marcin Kasperski | People resist change, regardless of what | http://mekk.waw.pl

Re: SqlAlchemy logging - sqlalchemy.echo*

2007-11-23 Thread Marcin Kasperski
before .url) -- -- | Marcin Kasperski | Software is not released, | http://mekk.waw.pl | it is allowed to escape

Re: Running pylons with nginx + mod_wsgi

2007-11-16 Thread Marcin Kasperski
for pylons request need not be that good. I am fairly happy using nginx as reverse proxy (and static content handler) for pylons served by paste... -- -- | Marcin Kasperski | The cost of a few uncorrected non-critical | http

Re: Reducing pylons app memory usage?

2007-11-05 Thread Marcin Kasperski
Actually, Ian clarified that the threadpool can be turned off. Add the following to the [server] section: use_threadpool = false On my linux system, that cut the Virtual from 100Mb to 18Mb. But this is then single-process mode, I guess?

Re: Reducing pylons app memory usage?

2007-11-05 Thread Marcin Kasperski
* threadpool_workers = 10 virtual 108104, resident 18900 (...) So it looks like it is all about thread-local storage. Maybe just the thread stack size... What figures do you get for the above if you run: ulimit -s 512 *Far* smaller, for example with workers=10 I got virtual about

~Solved~: Reducing pylons app memory usage?

2007-11-05 Thread Marcin Kasperski
Any ideas how could I reduce pylons app RAM usage? At the moment pylons process takes above 100MB (almost static site serving some templates) - both when run with paste, and when run under mod_wsgi. Quite a lot, considering that for example whole moinmoin manages to work on ~25MB. Short

Re: ~Solved~: Reducing pylons app memory usage?

2007-11-05 Thread Marcin Kasperski
Alberto Valverde [EMAIL PROTECTED] writes: Thanks for the summary Martin! Good old habit from times when I participated in tru64-unix-managers. On that list the initial poster was always expected to create 'solution' post with the summary info, at least in case reply was not trivial. I must

Re: Reducing pylons app memory usage?

2007-10-31 Thread Marcin Kasperski
Just a (post-mortem?) note. After having very good experience from migration (on some non-pylons site) from moinmoin hosted on apache with fastcgi to moinmoin on twisted proxied behind nginx (I did not make any formal measures, but it just feels that the app runs faster) I opted for similar path

Re: Reducing pylons app memory usage?

2007-10-31 Thread Marcin Kasperski
[server:main] threadpool_nworkers = 5 did not work for me. Resolved. One should use threadpool_workers = 5 (without 'n'). Then it works. Some observations in the next post. --~--~-~--~~~---~--~~ You received this message because you are

Re: Reducing pylons app memory usage?

2007-10-31 Thread Marcin Kasperski
Ben Bangert [EMAIL PROTECTED] writes: On Oct 31, 2007, at 8:39 AM, Marcin Kasperski wrote: I am still not very happy with paster (~100MB virtual, 22MB resident), and hoping to search for some improvements here. But at least it is just one such process... Can you ask your ISP

Re: Reducing pylons app memory usage?

2007-10-22 Thread Marcin Kasperski
you should see if the Apache configuration you are using defines a value for the ThreadStackSize directive. Thanks for the hint. I am still to make my experiments, but here is initial summary for this thread from my point of view. It is highly suspected, that significant part of the RAM

Re: Reducing pylons app memory usage?

2007-10-19 Thread Marcin Kasperski
I've run a few tests on my OSX machine, can you run them on your box? Could you share the [EMAIL PROTECTED] of test apps? I wouldn't like to experiment too much with creating them Cheap VPS's (like serveraxis.com) start around $30/mth with half a gig of ram, and a gig of swap... Well, I

Re: Reducing pylons app memory usage?

2007-10-19 Thread Marcin Kasperski
Are the Zope and Moin numbers from the same environment your Pylons is running on? Yes. [EMAIL PROTECTED] in both cases. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this

Re: Reducing pylons app memory usage?

2007-10-17 Thread Marcin Kasperski
Any ideas how could I reduce pylons app RAM usage? At the moment pylons process takes above 100MB (almost static site serving some templates) - both when run with paste, and when run under mod_wsgi. Quite a lot, considering that for example whole moinmoin manages to work

Why no cache_max_age for StaticJavascripts?

2007-10-16 Thread Marcin Kasperski
Well. This works nice: static_app = StaticURLParser(config['pylons.paths']['static_files'], cache_max_age = 3600) But ... here one can not pass such a param: javascripts_app = StaticJavascripts() After noticing that: class

Reducing pylons app memory usage?

2007-10-16 Thread Marcin Kasperski
Any ideas how could I reduce pylons app RAM usage? At the moment pylons process takes above 100MB (almost static site serving some templates) - both when run with paste, and when run under mod_wsgi. Quite a lot, considering that for example whole moinmoin manages to work on ~25MB.

Shouldn't default find_controllers use pkg_resources?

2007-10-13 Thread Marcin Kasperski
Well, I am just making my first experiments with pylons deployment, and while trying to 'run egg' I immediately got an error like: Sat Oct 13 22:25:56 2007] [error] [client 127.0.0.1] OSError: [Errno 20] Not a directory:

Is it possible to set title with AJAX? Or another floating text technique...

2007-09-17 Thread Marcin Kasperski
a id='MyLink' title=Blah blah href=...Some link/a shows fairly nice floating text when the mouse is over the link. Is it possible to (using reasonably small javascript code and utilizing pylons helpers) load the title AJAXically in onMouseOver? I tried using sth like ${h.link_to(uBlah blah,

Re: Pylons and twisted?

2007-09-06 Thread Marcin Kasperski
plus Twisted's Deferreds and callbacks are enough to make many other programmers run screaming from the room. Heya, they are beautiful ;-) Especially with the @deferredGenerator and @inlineCallback syntaxes. This is pretty: @deferredGenerator def thingummy(): thing =

Tuning Pylons for tight memory requirements?

2007-09-06 Thread Marcin Kasperski
How would you tune pylons application to reduce its RAM usage as much as possible? I mean the case of rather-small-application with rather-small-trafic, which is expected to run on machine with 64 or 96MB RAM (sideways some other apps). (*) In case somebody is curious: not, not embedded system.

Pylons and twisted?

2007-09-05 Thread Marcin Kasperski
Has anybody tried merging pylons techniques with twisted? In general it should be possible as twisted contains WSGI container... Purpose? Well, I have some twisted app (some works over the network) which would benefit from additional web interface. And would be nice if this could be colocated

Re: Trouble with Routes

2007-08-30 Thread Marcin Kasperski
Indeed, in Routes 2.0 the behavior you expect will be the default, I blogged more about other Routes 2.0 and 1.X features: http://groovie.org/articles/2007/08/29/routes-planning-and-the-road-to-routes-2-0 Cool! Apart from clearing name route confusion, I noticed you plan to solve another

Re: Trouble with Routes

2007-08-28 Thread Marcin Kasperski
(after additional reconsideration) I think that the - with respect to the current behaviour - whole term 'named route' and mapper syntax is misleading. Let's once more take a look at the original example: from routes import * m = Mapper() m.connect('gallery_thumb',

Re: Trouble with Routes

2007-08-27 Thread Marcin Kasperski
Ben Bangert [EMAIL PROTECTED] writes: On Aug 24, 2007, at 2:56 AM, Dan Korostelev wrote: Yeah, I also worked around the problem this way, but I don't like it. Looks like there's a bug in Routes. Thanks for information. There's no bug in routes, this is exactly how it works, and how the

Re: Trouble with Routes

2007-08-27 Thread Marcin Kasperski
m.connect('gallery_thumb', 'images/gallery/:(image_id)_:(image_size).jpg', image_size='thumbnail') m.connect('gallery', 'images/gallery/:(image_id).jpg') Well, that's generally the same trick as discussed earlier as a workaround - forcing parameter difference (here - extra param). I do

Re: Trouble with Routes

2007-08-24 Thread Marcin Kasperski
from routes import * m = Mapper() m.connect('gallery_thumb', 'images/gallery/:(image_id)_thumbnail.jpg') m.connect('gallery', 'images/gallery/:(image_id).jpg') url_for('gallery_thumb', image_id=1) '/images/gallery/1_thumbnail.jpg' url_for('gallery', image_id=1)

Re: A few questions about style...

2007-08-13 Thread Marcin Kasperski
The problem with pyLucene in my eyes is that it uses Jython (...) And the memory usage of my apache process just blasted up so much, Thanks for the warning. For me it more or less kills this path. You may take also a look into Xapian, I will take a look. IIRC moinmoin is to be (or maybe

Re: A few questions about style...

2007-08-12 Thread Marcin Kasperski
1) h.url_for is a great idiom to generate urls to dynamic pages. But what should be used to generate links to *static* resources? (...) (...) map.connect(attachments, /attachments/:rec_id/:(filename).jpg h.url_for(attachments, rec_id=5, filename=foo) = /attachments/5/foo.jpg

Page metadata?

2007-08-12 Thread Marcin Kasperski
The context: I have some textual pages, rendered by template controller. Apart from the actual text, those pages have some 'metadata-level' content. For example - page title, date of the last change, short summary. This information is used within page - in standard mako inheritance way (base

A few questions about style...

2007-08-10 Thread Marcin Kasperski
Just a few questions about pylons programming style. 1) h.url_for is a great idiom to generate urls to dynamic pages. But what should be used to generate links to *static* resources? There is h.stylesheet_link_tag, but what should I use to generate links to static HTML, images,

Re: Are my Python/Pylons concerns justified?

2007-08-09 Thread Marcin Kasperski
A lot of answers already, so just two points: a) There are plenty of cheap VPS hosting options (you get your own virtual machine where you have root and can do whatever you like). See for example http://linode.com/ (but maybe some Xen-based provider can be better as it offers better