Re: [Repoze-dev] [r.what] What adapter would be faster for you? (Testers needed)

2009-06-08 Thread Kless
Here you have the commands to get all installed and so run the tests:

http://dpaste.com/hold/52771/


On 1 jun, 16:05, Gustavo Narea m...@gustavonarea.net wrote:
 Hi, everyone.

 The next version of repoze.what will ship benchmarking tools for its source
 adapters, so you could find what would be the fastest adapter for your
 environment.

 Believe it or not, the fastest adapter could change from one computer to
 another. I've even found that on one computer, adapter A is ~20x faster than
 adapter B, but on another computer, the difference lowers to ~9x. So you could
 also use this to keep your adapters, but optimize them if possible.

 However, before releasing it, I'd love to get some feedback, and that's why
 I'm writing. Here you'll learn how it 
 works:http://what.repoze.org/docs/1.x/Manual/ManagingSources.html#module-
 repoze.what.adapters.benchmark

 To install the latest revision:
 $ svn cohttp://svn.repoze.org/repoze.what/branches/1.X/repoze.what
 $ cd repoze.what
 $ python setup.py develop

 I wrote a benchmarking script which you can try too; it's available in the
 /scripts/ folder and there's a README if you want to use it. I'll run it on
 several computers and publish the results after the release, so people could
 get an idea on what would be the faster adapter.

 Thanks in advance!
 --
 Gustavo Narea xri://=Gustavo.
 | Tech blog: =Gustavo/(+blog)/tech  ~  About me: =Gustavo/about |
 ___
 Repoze-dev mailing list
 repoze-...@lists.repoze.orghttp://lists.repoze.org/listinfo/repoze-dev
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [r.what] What adapter would be faster for you? (Testers needed)

2009-06-08 Thread Kless
* Benchmark results *
Group results:
 * Results for action #1, starting by the fastest adapters:
   1.- xml: 0.00114917755127 seconds average; total: 0.0114917755127
seconds.
   2.- sqlite_memory: 0.00331170558929 seconds average; total:
0.0331170558929 seconds.
   3.- sqlite_file: 0.00339241027832 seconds average; total:
0.0339241027832 seconds.
   4.- mysql_innodb: 0.0041825056076 seconds average; total:
0.041825056076 seconds.
   5.- mysql_myisam: 0.00430059432983 seconds average; total:
0.0430059432983 seconds.
   6.- redis: 0.0083105802536 seconds average; total: 0.083105802536
seconds.

Permission results:
 * Results for action #1, starting by the fastest adapters:
   1.- xml: 0.000550293922424 seconds average; total: 0.00550293922424
seconds.
   2.- sqlite_memory: 0.00292103290558 seconds average; total:
0.0292103290558 seconds.
   3.- sqlite_file: 0.00318250656128 seconds average; total:
0.0318250656128 seconds.
   4.- mysql_innodb: 0.00400106906891 seconds average; total:
0.0400106906891 seconds.
   5.- mysql_myisam: 0.00495734214783 seconds average; total:
0.0495734214783 seconds.
   6.- redis: 0.00885336399078 seconds average; total: 0.0885336399078
seconds.
*

$ sudo lshw -short
processor   AMD Athlon(tm) 64 X2 Dual Core Proces
memory  2GiB System Memory
disk250GB ST3250620AS Non-Raid-5 SATA


On 8 jun, 13:06, Kless jonas@googlemail.com wrote:
 Here you have the commands to get all installed and so run the tests:

 http://dpaste.com/hold/52771/

 On 1 jun, 16:05, Gustavo Narea m...@gustavonarea.net wrote:

  Hi, everyone.

  The next version of repoze.what will ship benchmarking tools for its source
  adapters, so you could find what would be the fastest adapter for your
  environment.

  Believe it or not, the fastest adapter could change from one computer to
  another. I've even found that on one computer, adapter A is ~20x faster than
  adapter B, but on another computer, the difference lowers to ~9x. So you 
  could
  also use this to keep your adapters, but optimize them if possible.

  However, before releasing it, I'd love to get some feedback, and that's why
  I'm writing. Here you'll learn how it 
  works:http://what.repoze.org/docs/1.x/Manual/ManagingSources.html#module-
  repoze.what.adapters.benchmark

  To install the latest revision:
  $ svn cohttp://svn.repoze.org/repoze.what/branches/1.X/repoze.what
  $ cd repoze.what
  $ python setup.py develop

  I wrote a benchmarking script which you can try too; it's available in the
  /scripts/ folder and there's a README if you want to use it. I'll run it on
  several computers and publish the results after the release, so people could
  get an idea on what would be the faster adapter.

  Thanks in advance!
  --
  Gustavo Narea xri://=Gustavo.
  | Tech blog: =Gustavo/(+blog)/tech  ~  About me: =Gustavo/about |
  ___
  Repoze-dev mailing list
  repoze-...@lists.repoze.orghttp://lists.repoze.org/listinfo/repoze-dev

 ___
 Repoze-dev mailing list
 repoze-...@lists.repoze.orghttp://lists.repoze.org/listinfo/repoze-dev
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [r.what] What adapter would be faster for you? (Testers needed)

2009-06-08 Thread Gustavo Narea
Thanks for the commands summary, Jonás!

By the way, I have to say that the results for Redis should be better:
http://groups.google.com/group/redis-db/browse_thread/thread/de8839d8fa1eecc8

Cheers,

  - Gustavo.


Kless said:
 Here you have the commands to get all installed and so run the tests:

 http://dpaste.com/hold/52771/

 On 1 jun, 16:05, Gustavo Narea m...@gustavonarea.net wrote:
  Hi, everyone.
 
  The next version of repoze.what will ship benchmarking tools for its
  source adapters, so you could find what would be the fastest adapter for
  your environment.
 
  Believe it or not, the fastest adapter could change from one computer
  to another. I've even found that on one computer, adapter A is ~20x
  faster than adapter B, but on another computer, the difference lowers to
  ~9x. So you could also use this to keep your adapters, but optimize them
  if possible.
 
  However, before releasing it, I'd love to get some feedback, and that's
  why I'm writing. Here you'll learn how it
  works:http://what.repoze.org/docs/1.x/Manual/ManagingSources.html#module-
  repoze.what.adapters.benchmark
 
  To install the latest revision:
  $ svn cohttp://svn.repoze.org/repoze.what/branches/1.X/repoze.what
  $ cd repoze.what
  $ python setup.py develop
 
  I wrote a benchmarking script which you can try too; it's available in
  the /scripts/ folder and there's a README if you want to use it. I'll run
  it on several computers and publish the results after the release, so
  people could get an idea on what would be the faster adapter.
 
  Thanks in advance!
  --
  Gustavo Narea xri://=Gustavo.
 
  | Tech blog: =Gustavo/(+blog)/tech  ~  About me: =Gustavo/about |
 
  ___
  Repoze-dev mailing list
  repoze-...@lists.repoze.orghttp://lists.repoze.org/listinfo/repoze-dev

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev
-- 
Gustavo Narea xri://=Gustavo.
| Tech blog: =Gustavo/(+blog)/tech  ~  About me: =Gustavo/about |
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-08 Thread Stephan Altmueller
I have solely focused on a routes-based app, so I don't know how much
changes are involved when using traversal.

But the proposed changes really clean up that part of the API.

IMHO the needed changes are mostly superficial in that one has to
change the signature of functions and maybe some ZCML.
The underlying logic remains the same.
As long as they are not fault silent it should be straight forward.

I would also like to throw in my suggestion for a function signature
(based on Chris Rossi's):

def context_factory(request, routes_match=None):
environ = request.environ
# blah blah blah that uses environ

The benefit would be that the same signature works for traversal and
URL dispatch. By using this signature:

def context_factory(request, routes_match):
environ = request.environ
# blah blah blah that uses environ

one could immediately indicate that this is a routes based context factory.

In any case, if/when this moves forward I can make time to test and/or
implement stuff.


 -- Stephan


Chris McDonough wrote:
 On 6/5/09 12:37 PM, Chris Rossi wrote:

 On Fri, Jun 5, 2009 at 12:01 PM, Tres Seaver tsea...@palladion.com
 mailto:tsea...@palladion.com wrote:

I'm assuming that we would fix anything in our repository;  it
 should even be possible to do so in a BBB-compatible way, e.g.::

def context_factory(environ=None, **kw):
match_dict = kw.copy()
if environ is not None: # called as root factory
   match_dict.update(environ['repoze.bfg.matchdict'])


 Ah, right.  Cool.  Making environ a kw arg preserves backwards
 compatability for context factories.  So tweaking my suggestion a little
 bit:

 class UnifiedFactory(Interface):
  def __call__(self, environ=None, **routes_match):
 
  Replaces concepts of root factory used for traversal and context
  factory used for routes, into a single concept.  environ is the
  WSGI environment, and the match dict from routes matching, if
  applicable, is passed in as kw args.
 

 I'm sure Chris M will come up with something completely different.
 
 FWIW, the original **kw interface for passing names into a context factory is 
 a 
 little awkward already.  For instance, routes match dicts have unicode 
 *keys*. 
 This is because the names matched in the PATH_INFO by a pattern might 
 actually 
 be themselves encoded; I didn't understand that this was by design until 
 recently.  Currently the urldispatch code encodes the keys from Unicode to 
 UTF-8 
 just so they can be passed as **kw to the context factory (using Unicode keys 
 doesn't work when using **kw as function args).  If I had understood that the 
 keys were *supposed* to be Unicode from the beginning (instead of strings), 
 context factories would have had an interface that looked like this:
 
 def context_factory(match_dict).
  ...
 
 ... which isn't really too far off from:
 
 def context_factory(environ):
  match_dict = environ['wgsiorg.routing_args'][1]
 
 What I *should* have done from the very start was to pass the request object 
 in 
 to both root factories and context factories.  But it's too late for that 
 now; 
 we'd break too many people's apps.
 
 Anyway, I don't really mind changing the urldispatch stuff radically at this 
 point; I'll fix the docs and our code and help anyone who needs it change 
 their 
 stuff.   If I can make it bwcompat, great, but I'd rather break it now than 
 have 
 to live with it forever.
 
 - C

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-08 Thread Chris Rossi
On Mon, Jun 8, 2009 at 10:19 AM, Stephan Altmueller step...@klaravision.com
 wrote:


 I would also like to throw in my suggestion for a function signature
 (based on Chris Rossi's):

 def context_factory(request, routes_match=None):


I like that one.  +1

Chris
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] Timeouts for AuthTktCookie

2009-06-08 Thread Paul Johnston
Hi,

I've put a patch on the ticket http://bugs.repoze.org/issue83

To avoid the issue of the default to set, and for 
backward-compatibility, this patch defaults to no timeout.

Paul
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Problem of creating the BFG template

2009-06-08 Thread Chris McDonough
Please try to keep it on the list; thank you.


On 6/8/09 3:47 AM, george hu wrote:
 I'm still getting errors, when I try to run

 ../bin/paster bfgshell .ini main

 I got Command'bfgshell'  not known (you may need to run setup.py egg_info).
 The error persists after running setup.py egg_info.

Did you run setup.py develop?

Under http://docs.repoze.org/bfg/narr/project.html#the-interactive-shell


If that command fails because paster claims it knows nothing about the 
“bfgshell” command (this happens under certain conditions that are not yet 
well-understood) try passing the flag --plugin=repoze.bfg before the filename:

   [chr...@vitaminf bfgshellenv]$ ../bin/paster --plugin=repoze.bfg bfgshell \
   MyProject.ini main





 and when I run

 ../bin/paster serve .ini, it shows

 pkg_resources.DistributionNotFound:repoze.tm  http://repoze.tm

I think you need to run setup.py develop.

- C





 On Tue, Jun 2, 2009 at 11:49 AM, Chris McDonough chr...@plope.com
 mailto:chr...@plope.com wrote:

 Hi George,

 0.9.1 has now been released with a fix for this problem.

 You can upgrade to it by doing:

 bin/easy_install -U -i http://dist.repoze.org/bfg/current/simple
 repoze.bfg


 On 6/1/09 5:31 PM, george hu wrote:

 When I run paster create -t bfg_alchemy  as per the documentation
 instructed, it shows an error:

 LookupError: Template by name 'bfg_alchemy' not found

 The BFG version is 0.9, it failed both in Linux(Ubuntu) and
 windows. And
 I tried reinstall the python and the problem persists

 Any one can give me a clue?


 
 

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org mailto:Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev




___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Timeouts for AuthTktCookie

2009-06-08 Thread Chris McDonough
Thanks Paul, I applied this patch.

- C


On 6/8/09 10:56 AM, Paul Johnston wrote:
 Hi,

 I've put a patch on the ticket http://bugs.repoze.org/issue83

 To avoid the issue of the default to set, and for
 backward-compatibility, this patch defaults to no timeout.

 Paul
 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev


___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Problem of creating the BFG template

2009-06-08 Thread george hu
I'm still having problem of using bfg_alchemy template. Now I'm able to run
the project creating command (paster create -t bfg_alchemy). And then I
switch to project directory and run

python setup.py develop

and it runs without issue.  Then I run

paster --plugin=repoze.bfg bfgshell MyProject.ini main , it shows the
following error:

pkg_resources.DistributionNotFound: repoze.tm

I get the same error message for running paster serve myproject.ini


On Mon, Jun 1, 2009 at 2:31 PM, george hu geo...@gmail.com wrote:

 When I run paster create -t bfg_alchemy  as per the documentation
 instructed, it shows an error:

 LookupError: Template by name 'bfg_alchemy' not found

 The BFG version is 0.9, it failed both in Linux(Ubuntu) and windows. And I
 tried reinstall the python and the problem persists

 Any one can give me a clue?

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue88] Autoreloading for repoze.bfg.jinja2

2009-06-08 Thread Sean Gillies

New submission from Sean Gillies sean.gill...@gmail.com:

Autoreloading isn't supported in repoze.bfg.jinja2, but adding it was easy
enough. Test included.

--
messages: 235
nosy: sgillies
priority: feature
status: unread
title: Autoreloading for repoze.bfg.jinja2
topic: repoze.bfg

__
Repoze Bugs b...@bugs.repoze.org
http://bugs.repoze.org/issue88
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue88] Autoreloading for repoze.bfg.jinja2

2009-06-08 Thread Sean Gillies

Sean Gillies sean.gill...@gmail.com added the comment:

New patch including loader which implements the mtime based reloading suggested
in jinja2.loaders. And doctests.

__
Repoze Bugs b...@bugs.repoze.org
http://bugs.repoze.org/issue88
__

autoreload.patch
Description: Binary data
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] repoze.bitblt trims leading slash when transforming HTML

2009-06-08 Thread Damien Baty

Hello,

  I am trying to use repoze.bitblt and could not make it work when my 
HTML pages use absolute URLs _without_ FQDN, like /pics/23. For 
example, the following tag:


img src=/pics/23 ...

is transformed into:

img src=pics/bitblt-.../23 ...

Note that the leading slash has disappeared. Of course, the image may 
not be found.


This issue comes from these lines of code in 
transform.rewrite_image_tags():


parts = path.split('/')
parts.insert(-1, 'bitblt-%sx%s-%s' % (width, height, signature))
path = '/'.join(filter(None, parts))

The first split() returns a list whose first item is the empty string. 
Consequentially, the call to filter() removes it and we end up 
swallowing the leading slash in the transformed path.


This seems a pretty obvious bug to me, so I am willing to suppose that 
it is actually some kind of feature. ;) Is it? Or perhaps nobody noticed 
because everyone uses full URLs with an FQDN. If the behaviour is 
however not intended, I have attached a patch that contains a very 
simple fix and an additional test. I just remove the call to filter(), 
but it may not be the best solution: this call was surely here for a 
good reason, but I do not know why.


Regards,

N.B.: perhaps I should have reported this in the the issue tracker. I'll 
be glad to do, should it be the case.


--
Damien Baty
Index: repoze/bitblt/transform.py
===
--- repoze/bitblt/transform.py  (révision 5222)
+++ repoze/bitblt/transform.py  (copie de travail)
@@ -35,7 +35,7 @@
 parts = path.split('/')
 parts.insert(-1, 'bitblt-%sx%s-%s' % (width, height, signature))
 
-path = '/'.join(filter(None, parts))
+path = '/'.join(parts)
 
 img.attrib['src'] = urlparse.urlunparse(
 (scheme, netloc, path, params, query, fragment))
Index: repoze/bitblt/tests.py
===
--- repoze/bitblt/tests.py  (révision 5222)
+++ repoze/bitblt/tests.py  (copie de travail)
@@ -87,6 +87,7 @@
 html
   body
 img src=foo.png width=640 height=480 /
+img src=/foo.png width=640 height=480 /
 img src=http://host/bar.png; width=640 height=480 /
 img src=http://host/path/hat.png; width=640 height=480 /
 img src=blubb.png /
@@ -113,6 +114,7 @@
 directive = bitblt-%sx%s-%s % (width, height, signature)
 body = .join(result)
 self.failUnless(%s/foo.png % directive in body)
+self.failUnless(/%s/foo.png % directive in body)
 self.failUnless(http://host/%s/bar.png; % directive in body)
 self.failUnless(http://host/path/%s/hat.png; % directive in body)
 self.failUnless('img src=blubb.png' in body)
@@ -122,7 +124,7 @@
 self.failUnless(%s/blah.png % directive in body)
 self.assertEqual(response, [
 '200 OK', [('Content-Type', 'text/html; charset=UTF-8'),
-   ('Content-Length', '478')]])
+   ('Content-Length', '579')]])
 
 def test_rewrite_html_limited_to_application_url(self):
 body = '''\
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Problem of creating the BFG template

2009-06-08 Thread Chris McDonough
On 6/8/09 1:12 PM, george hu wrote:

 And
 then I switch to project directory and run

 python setup.py develop

 and it runs without issue.  Then I run

 paster --plugin=repoze.bfg bfgshell MyProject.ini main , it shows the
 following error:

 pkg_resources.DistributionNotFound: repoze.tm http://repoze.tm

 I get the same error message for running paster serve myproject.ini

Please try changing this line in your project's .ini file from:
 egg:repoze.tm#tm

to:

 egg:repoze.tm2#tm

Then invoke:

paster --plugin=repoze.bfg bfgshell stuff.ini alchemy

- C




 On Mon, Jun 1, 2009 at 2:31 PM, george hu geo...@gmail.com
 mailto:geo...@gmail.com wrote:

 When I run paster create -t bfg_alchemy  as per the documentation
 instructed, it shows an error:

 LookupError: Template by name 'bfg_alchemy' not found

 The BFG version is 0.9, it failed both in Linux(Ubuntu) and windows.
 And I tried reinstall the python and the problem persists

 Any one can give me a clue?



 

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Problem of creating the BFG template

2009-06-08 Thread george hu
Now the problem is gone. One question, the bfgshell command has changed to

..\scripts\paster --plugin=repoze.bfg bfgshell .ini alchemy

what is the difference between main and alchemy parameter?

On Mon, Jun 1, 2009 at 2:31 PM, george hu geo...@gmail.com wrote:

 When I run paster create -t bfg_alchemy  as per the documentation
 instructed, it shows an error:

 LookupError: Template by name 'bfg_alchemy' not found

 The BFG version is 0.9, it failed both in Linux(Ubuntu) and windows. And I
 tried reinstall the python and the problem persists

 Any one can give me a clue?

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Problem of creating the BFG template

2009-06-08 Thread Chris McDonough
On 6/8/09 4:51 PM, george hu wrote:
 Now the problem is gone.

Good, sorry about that.  It was another bug. :-(  I've fixed it in SVN.

 One question, the bfgshell command has changed to

 ..\scripts\paster --plugin=repoze.bfg bfgshell .ini alchemy

 what is the difference between main and alchemy parameter?

Please read the last paragraph in the section at 
http://docs.repoze.org/bfg/narr/project.html#the-interactive-shell (You should 
always use a section name argument that refers to the actual app section...)

- C



 On Mon, Jun 1, 2009 at 2:31 PM, george hu geo...@gmail.com
 mailto:geo...@gmail.com wrote:

 When I run paster create -t bfg_alchemy  as per the documentation
 instructed, it shows an error:

 LookupError: Template by name 'bfg_alchemy' not found

 The BFG version is 0.9, it failed both in Linux(Ubuntu) and windows.
 And I tried reinstall the python and the problem persists

 Any one can give me a clue?



 

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] BFG 0.9.1 / chameleon: render() takes exactly 1 non-keyword argument

2009-06-08 Thread Chris Shenton
I've been plugging along with a routes and SQL based app, with BFG
0.8.0.  I just changed my buildout.cfg to get BFG 0.9.1 -- and any new
versions of other packages -- but it's now throwing exceptions when
trying to render. I've removed any *.py, *.pyc and *.cache files from my
templates/ dir, but no help.

Paster starts up but when I try to access the top page, it bombs with
this excerpt:

  Exception happened during processing of request from ('127.0.0.1', 57115)
...
File 
/usr/local/cshenton/Projects/koansys/accounting-0.4/accounting/accounting/views.py,
 line 30, in home
  master=get_template('templates/master.pt'),
...
File 
/usr/local/cshenton/Projects/koansys/accounting-0.4/eggs/chameleon.core-1.0b34-py2.6.egg/chameleon/core/template.py,
 line 305, in cook_and_render
  args, slots, macro, global_scope)
File 
/usr/local/cshenton/Projects/koansys/accounting-0.4/eggs/chameleon.core-1.0b34-py2.6.egg/chameleon/core/template.py,
 line 182, in cook_and_render
  return func(econtext, rcontext)
File 
/usr/local/cshenton/Projects/koansys/accounting-0.4/accounting/accounting/templates/home.pt.py,
 line 33, in render
  _metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, 
econtext=econtext)
  TypeError: render() takes exactly 1 non-keyword argument (2 given)



Maybe I'm getting incompatible versions of various packages with my buildout:

  [buildout]
  find-links = http://dist.repoze.org/bfg/current/simple
   http://pypi.python.org/packages/source/z/zope.sqlalchemy/
   http://pypi.python.org/packages/source/t/transaction/
   http://pypi.python.org/packages/source/S/SQLAlchemy/
   http://pypi.python.org/packages/source/r/repoze.who/
   http://formalchemy.googlecode.com/files/FormAlchemy-1.2.tar.gz

  parts = bfg
  develop = accounting

  [bfg]
  recipe  = zc.recipe.egg
  index   = http://dist.repoze.org/bfg/current/simple
  dependent-scripts = true
  eggs= repoze.bfg
accounting
formalchemy
  interpreter = python-bfg


Any suggestions? 
Thanks!
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] BFG 0.9.1 / chameleon: render() takes exactly 1 non-keyword argument

2009-06-08 Thread Chris McDonough
On 6/8/09 7:10 PM, Chris Shenton wrote:
 I've been plugging along with a routes and SQL based app, with BFG
 0.8.0.  I just changed my buildout.cfg to get BFG 0.9.1 -- and any new
 versions of other packages -- but it's now throwing exceptions when
 trying to render. I've removed any *.py, *.pyc and *.cache files from my
 templates/ dir, but no help.

Hmm.  Are you sure?  Ala at the top level of your package:

find . -name *.cache|xargs rm -f
find . -name *.pt.py|xargs rm -f

- C



 Paster starts up but when I try to access the top page, it bombs with
 this excerpt:

Exception happened during processing of request from ('127.0.0.1', 57115)
  ...
  File 
 /usr/local/cshenton/Projects/koansys/accounting-0.4/accounting/accounting/views.py,
  line 30, in home
master=get_template('templates/master.pt'),
  ...
  File 
 /usr/local/cshenton/Projects/koansys/accounting-0.4/eggs/chameleon.core-1.0b34-py2.6.egg/chameleon/core/template.py,
  line 305, in cook_and_render
args, slots, macro, global_scope)
  File 
 /usr/local/cshenton/Projects/koansys/accounting-0.4/eggs/chameleon.core-1.0b34-py2.6.egg/chameleon/core/template.py,
  line 182, in cook_and_render
return func(econtext, rcontext)
  File 
 /usr/local/cshenton/Projects/koansys/accounting-0.4/accounting/accounting/templates/home.pt.py,
  line 33, in render
_metal.render(_tmp, _out=_out, _write=_write, _domain=_domain, 
 econtext=econtext)
TypeError: render() takes exactly 1 non-keyword argument (2 given)



 Maybe I'm getting incompatible versions of various packages with my buildout:

[buildout]
find-links = http://dist.repoze.org/bfg/current/simple
 http://pypi.python.org/packages/source/z/zope.sqlalchemy/
 http://pypi.python.org/packages/source/t/transaction/
 http://pypi.python.org/packages/source/S/SQLAlchemy/
 http://pypi.python.org/packages/source/r/repoze.who/
 http://formalchemy.googlecode.com/files/FormAlchemy-1.2.tar.gz

parts = bfg
develop = accounting

[bfg]
recipe  = zc.recipe.egg
index   = http://dist.repoze.org/bfg/current/simple
dependent-scripts = true
eggs= repoze.bfg
  accounting
  formalchemy
interpreter = python-bfg


 Any suggestions?
 Thanks!
 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev


___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue88] Autoreloading for repoze.bfg.jinja2

2009-06-08 Thread admin

System message:


__
Repoze Bugs b...@bugs.repoze.org
http://bugs.repoze.org/issue88
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue88] Autoreloading for repoze.bfg.jinja2

2009-06-08 Thread Sean Gillies

Sean Gillies sean.gill...@gmail.com added the comment:

Okay, here's the latest patch. 100% test coverage and *much* less code. It works
with the jinja2 environment, adjusting its auto_reload attribute to match the
settings whenever get_source is called.

__
Repoze Bugs b...@bugs.repoze.org
http://bugs.repoze.org/issue88
__

autoreload.patch
Description: Binary data
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue88] Autoreloading for repoze.bfg.jinja2

2009-06-08 Thread Chris McDonough

Chris McDonough chr...@plope.com added the comment:

I merged a modified version of your patch to the trunk, thanks Sean!

--
status: chatting - resolved

__
Repoze Bugs b...@bugs.repoze.org
http://bugs.repoze.org/issue88
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev