Tres Seaver wrote:
What would be helpful is to have somebody try to get a minimal BFG app
run on top of Kapil's forked packages probably using the GAE-emulation
environment, and tell us what breaks. Once we know it is possible, then
packaging BFG and its full dependency set into a ZIP file
Shane Hathaway wrote:
To make tasks like these easier, I would like to add to repoze.zodbconn
a WSGI framework component that opens a ZODB connection, puts that
connection in the WSGI environment, calls the next WSGI app in the
chain, then closes the same ZODB connection on the way out. I
Hey All,
Just been reading http://docs.repoze.org/bfg/narr/install.html and I
notice a conspicuous absence of zc.buildout...
Do you guys recommend not using buildout?
If not, are there docs anywhere for using BFG in a buildout context?
cheers,
Chris
--
Simplistix - Content Management, Zope
Hi All,
I see BFG uses the tests_require parameter to setuptools' setup function
rather than the normal zope way of an extra_requires dict with a
'test' key.
What's the difference between these two from your perspective and what
made you guys choose tests_require over extra_requires?
Also,
Jens W. Klein wrote:
-
[buildout]
extensions = buildout.dumppickedversions
parts = instance
eggs-directory = ${buildout:directory}/eggs
find-links =
http://dist.repoze.org/bfg/1.0/
[instance]
recipe = repoze.recipe.egg:scripts
eggs =
repoze.bfg
Chris Rossi wrote:
On Wed, Jun 24, 2009 at 9:16 AM, Chris Withers ch...@simplistix.co.uk
mailto:ch...@simplistix.co.uk wrote:
Also, how do you wire running tests, particularly running them with
nose, into this?
bin/nosetests path/to/src
...having added nosetests as a dependent
Chris Rossi wrote:
(karl3)ch...@opportunity:~/proj/karl3/src/karl$ cat test
../../bin/nosetests $*
So, we just do:
$ cd src/karl
$ ./test
Hackish, but I guess functional. Sadly not cross platform.
I wonder if a little buildout recipe is in order?
I see:
Shane Hathaway wrote:
I'm not very familiar with pip, but I don't think that's an issue for
Buildout. Buildout also has the ability to pin the version of all
packages, but I don't think that's what Jens and I want in this case.
yep, the only thing buildout is missing is a command to dump
Chris McDonough wrote:
Also, how come you put response attributes on the request when using a
renderer?
How about a RenderResponse object:
class RenderResponse(dict):
def __init__(self):
super(dict,self).__init__()
self.content_type = 'the default'
self.header_list = []
self.status =
Hi All,
I'd like to plug in my own decorator (as a way of wiring a method to
recieve stomp messages from a particular queue as it happens) to the
config.scan() machinery.
Are there docs or a recommended way to do this?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing
Chris McDonough wrote:
On 4/13/10 4:15 AM, Chris Withers wrote:
Hi All,
I'd like to plug in my own decorator (as a way of wiring a method to
recieve stomp messages from a particular queue as it happens) to the
config.scan() machinery.
Are there docs or a recommended way to do
Tres Seaver wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
Hanno Schlichting wrote:
The confusion surrounding PIL almost makes me want to write some sort of
über
document listing the orginal problem along with all the various
hack-arounds.
Both of these show
Chris McDonough wrote:
Monkeypatchable or should I avoid trying to do that...
The trunk now uses venusian instead of hardcoded decorator scanning.
See the repoze.bfg.view.bfg_view class for an example decorator that
registers a callback that will be called at config.scan() time. See
Hi All,
The attached buildout should generate a versions.cfg file suitable for
running a particular version of BFG in a buildout.
I've attached its output for version 1.2, and the current development
index as of writing.
Could anyone who knows please check that it has picked the right
Hi Again,
Have any patterns emerged for using a BFG-ish configuration, transaction
and data stack to perform batch jobs triggered by cron?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
Chris Withers wrote:
You would be wrong, as you would know if you had tried running the
effbot's packages inside an eggified environment: he is actively
hostile to changes which would make this all go away, which leaves us
with the necessity of forking his release.
I don't believe
Hi All,
19.3 in the book covers writing integration tests by loading zcml.
In a rare lack of symetry for the book, it doesn't cover the same for
imperative configuration.
Where can I find integration testing examples when using imperative
configuration?
cheers,
Chris
King Simon-NFHD78 wrote:
Have you read
http://www.sqlalchemy.org/docs/session.html#lifespan-of-a-contextual-ses
sion - it describes typical usage of a scoped session in a web
application.
I have now ;-)
In your traditional structure, you could get an exception during
session.commit() which
Hi All,
Is there anything akin to Django's form generation and handling stuff
that's recommended for use with BFG?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
___
Hi All,
In the BFG book their are copious references to the fact that using
imperative configuration (or the decorators, my preferred choice) is
bad if you plan to write apps that might be extended by others.
Am I right in understanding that this is because that method of
configuration
Final one of my trio for this evening...
Is there anything like the ol' CMFMembership for BFG?
(important bits for me:
- where to store/get user info from
- cookie authentication
- login and logout forms
- password reminder and reset forms and functionality)
If there is such a beastie,
Chris McDonough wrote:
No. You can always override an individual registration (obtained via
imperative configuration, a scan, or via ZCML) with a subsequent
imperative registration.
Okay, but how would I override a decorator with another decorator?
What happens if a scan finds two
Charlie Clark wrote:
Decorators are a little harder 'cos you can't safely rely on the last
one wins philosophy so you end up needing some kind of ordering, or
raising an exception if something is defined more than once, which
precludes one package customising stuff from another if they both
Laurence Rowe wrote:
On Apr 28, 4:38 pm, Chris Withers ch...@simplistix.co.uk wrote:
Laurence Rowe wrote:
Chris,
This is what the combination of repoze.tm2/transaction and
zope.sqlalchemy does for you. You don't have to do anything special
other than that.
It doesn't do the .remove().
BFG
Hi All,
What's the correct way to provide utilities in BFG imperatively?
My guess would be:
from repoze.bfg.configuration import Configurator
from somewhere import ISomething
from zope.component import provideUtility
def factory():
return ...yada...
def app(global_config, **settings):
Chris McDonough wrote:
As far as I know this is unnecessary. It's not in the repoze.cluegun
app, nor in the app I worked on at Jarn. Are there any problems when
you remove it?
No idea. Withers, can you confirm?
With the current setup, we end up doing both a .remove() in the
subscriber and
Not strictly speaking a repoze question, but the people who live here
have likely bumped into this, and I value your wise opinions :-)
So, SQLAlchemy takes care of having one session per thread and a
connection pool for you, however what about resources where that's not
the case.
For me, it's
Chris Rossi wrote:
This currently lives in a specific project but I have considered
pulling it out and making it more general:
http://bfg.repoze.org/pastebin/715
Any reason you don't just use SQLAlchemy?
Chris
___
Repoze-dev mailing list
Chris McDonough wrote:
You could do:
def app(global_config, **settings):
config = Configurator(settings=settings)
config.begin()
config.registry.provideUtility(factory(), ISomething)
config.scan()
config.end()
return config.make_wsgi_app()
...or do I have to do
Hi All,
Because I need to use the Twisted WSGI server for my app and so can't
use Paste, I'm running into some issues. Here's my run.py, adapted from
the routes alchemy template:
from repoze.bfg.configuration import Configurator
from repoze.tm import make_tm
from twisted.web.wsgi import
Hi All,
I assume the docs about methodName being ignored at:
http://docs.repoze.org/xmlrpc/#repoze-bfg-xmlrpc-usage
...are still correct?
If so, what needs to happen for methodName to work?
(I might be able to get the time to do any work that needs doing...)
Chris
Chris McDonough wrote:
On 04/29/2010 07:32 AM, Chris Withers wrote:
Chris McDonough wrote:
No. You can always override an individual registration (obtained via
imperative configuration, a scan, or via ZCML) with a subsequent
imperative registration.
Okay, but how would I override
Chris McDonough wrote:
On Fri, 2010-04-30 at 19:13 +0100, Chris Withers wrote:
Hi All,
Because I need to use the Twisted WSGI server for my app and so can't
use Paste,
While it's obviously useful to not require PasteDeploy, this itself is
not true. You can use something like:
from
Chris Rossi wrote:
FWIW, I can imagine something spelled sort of like:
@bfg_view(name='something', overrides='baseapp.views.someview')
def my_view(request):
+lots
Yeah, I hadn't replied 'cos I couldn't think of how to spell what I was
after.
This is spot on, and would, in theory, allow an
Chris McDonough wrote:
app = get_app('some_config_file.ini', 'myapp')
Fair enough, but it's the .ini that the powers that be don't want here ;-)
Why not?
Believe it or not, they're fairly allergic to anything other than Python
and Genshi, even for config, which is a little distressing...
Chris McDonough wrote:
Please keep correspondence on the list.
On Sun, 2010-05-09 at 22:59 +0800, Litao Wei wrote:
Does BFG have other cache solution except Beaker?
Sorry, the question doesn't make much sense if asked literally.
Caching isn't a problem that only BFG has, and BFG doesn't
Hi All,
I mistakenly thought that genshi was a first class option as a
templating language for BFG.
Chris disuaded me of that belief, but I'd like to know what needs to be
written for Genshi to be settable as the default template language for
a BFG app.
What components need to be written?
Jim Fulton wrote:
I plan to implement A soon if there are no objections.
Unless someone somehow convinced me to do D, I'll also add an
assertion in the Transaction.join method to raise an error if a
data manager joins more than once.
Option A sounds sensible. It also means I won't have to
Chris McDonough wrote:
Sure. If you provide a reproducible test case, I can try to look at it.
Where can I find tests in the same area already?
(ie: what file(s) would you like me to provide a patch against)
Just create a tarball of an app that fails and attach it to a bug at
Hi All,
I'm attempting to get the attached .genshi template working with
repoze.bfg.chameleon_genshi.
The problem appears to be the ?python block at the top.
Yes, I know, that code should be in view methods, and that's what I'll
do as a work around. However, should it work? Works with
Chris McDonough wrote:
mcdonc ChrisW: i think you're going to need to drop down a level on
the r.b.chameleon_genshi and replicate the problem in terms of raw
chameleon
I'm actually so far from being a Genshi expert its not funny ;-)
[11:50] mcdonc i don't know whether it should be possible
So, in an effort to create some tests for the chameleon.genshi problems
I'm having, I thought I'd run the current tests.
On MacOSX this appears to fail for trunk right now.
What am I doing wrong?
Chris
serato:chameleon chris$ svn info
Path: .
URL: http://svn.repoze.org/chameleon/trunk
Hi All,
With the reference implementation of genshi you can do the following:
from genshi.template import MarkupTemplate
tmp = MarkupTemplate(\
... div xmlns=http://www.w3.org/1999/xhtml;
... xmlns:py=http://genshi.edgewall.org/;
... py:choose test=
... span py:when=0 == 10/span
...
Hi All,
With the reference implementation of genshi you can do the following:
from genshi.template import MarkupTemplate
tmp = MarkupTemplate(\
... ?python
... title = A Genshi Template
... ?
... html xmlns:py=http://genshi.edgewall.org/;
... head
... title py:content=titleThis is
Wichert Akkerman wrote:
On 2010-6-2 20:38, Chris Withers wrote:
What tracker should I put this in?
Please see http://chameleon.repoze.org/docs/latest/ which documents this.
Documents what? I see no reference to ?python or its lack.
On the off chance you meant a bug tracker, I'll post both
Chris Withers wrote:
On the off chance you meant a bug tracker, I'll post both of these bugs
there.
And the docs for the bug tracker are wrong...
https://code.launchpad.net/chameleon is a ruby-based blogging project...
Chris
--
Simplistix - Content Management, Batch Processing Python
Wichert Akkerman wrote:
On 2010-6-2 23:02, Chris Withers wrote:
Chris Withers wrote:
On the off chance you meant a bug tracker, I'll post both of these
bugs there.
And the docs for the bug tracker are wrong...
https://code.launchpad.net/chameleon is a ruby-based blogging project...
A 5
Malthe Borch wrote:
This has to do with lxml; it currently worksforme, but I don't know
why. Try Stephan's static build and see if it fares any better,
possibly using otool -L to confirm bindings.
Actually, the tests only run if you have *all* the stuff in the
test_require ;-)
...its' a
Malthe Borch wrote:
Really that's odd;
How do you run the tests?
we can definitely add a [test] on next release; or
please go ahead and commit it if you can.
Hmm, it occurs to me that even if the [test] extra_requires was there, I
don't know how to feed that into:
python setup.py develop
Chris McDonough wrote:
If so, what needs to happen for methodName to work?
(I might be able to get the time to do any work that needs doing...)
The task involves answering that question, I don't know.
Okay, so I've done a:
Hi All,
How can I get config.scan() to exclude my test folders?
My tests have package dependencies not normally needed, so the scan
fails with ImportErrors for those packages that are *only* test
dependencies...
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
Chris McDonough wrote:
On Thu, 2010-06-24 at 08:04 +0100, Chris Withers wrote:
Hi All,
How can I get config.scan() to exclude my test folders?
My tests have package dependencies not normally needed, so the scan
fails with ImportErrors for those packages that are *only* test
dependencies
Paul Everitt wrote:
I can't remember seeing any use of @@ in BFG docs. Where did you see that?
http://docs.repoze.org/bfg/current/narr/traversal.html#traversal-chapter
The traversal algorithm exposes two special cases:
[snip[
Yep, and in my case, I can to this from the warning box at
Hi All,
I have a view that starts like this:
@bfg_view(renderer='templates/control.pt')
class Control:
def __init__(self,request):
self.request = request
def __call__(self):
...
return dict(
...
)
I'd like to do a functional
Chris McDonough wrote:
In any case, I *think* if a person buys it from a particular localized
Amazon site, they actually ship the local warehouse N copies of the
book, so that the shipping times aren't quite so bad. So buy one to
seed the paper torrent wouldja? ;-)
How about cutting a new
Alex Marandon wrote:
On 29 June 2010 04:44, Chris Withers ch...@simplistix.co.uk
mailto:ch...@simplistix.co.uk wrote:
But now what's the right way to actually get the to render the html,
preferably also testing the path dispatch to '/' at the same time?
I'm not sure if it's
Hi All,
I asked previously whether there was any way to make views non-public by
default. The answer was no.
So, I was wondering, if I came up with a patch, would it get applied?
I was thinking of adding a method to the configurator, something like:
configurator.set_default_permission('view')
Chris McDonough wrote:
Calling getLogger results in an *atexit* hook related to a handler being
registered for the current Python process. It might also, depending on
its mood, print to stdout. These things make it miserable to actually
unit test any application which calls getLogger. See
Chris McDonough wrote:
You want LogCapture:
http://packages.python.org/testfixtures/logging.html
That looks useful for things that do use getLogger and for people who
have problems mocking up loggers.
I just wrote it as an easy way to check what messages were logged...
Admittedly, I
Hey All,
Anyone know of any good error-ish middlewear for production use that:
- gives good traceback output
- logs the exception to the python logging framework
cheers,
Chris
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
Hi All,
I hope this is the right list, if not, what's the right list for
Chameleon questions?
Anyway, the following:
div class=batcher
tal:content=pager/
...doesn't appear to quote the html in the pager variable.
This is different from normal zpt, why the change?
Also, as a corollary,
On 01/03/2011 13:13, Malthe Borch wrote:
On 1 March 2011 12:00, Chris Withersch...@simplistix.co.uk wrote:
div class=batcher
tal:content=pager/
...doesn't appear to quote the html in the pager variable.
This is different from normal zpt, why the change?
It should definitely escape it
On 01/03/2011 13:48, Malthe Borch wrote:
On 1 March 2011 14:19, Chris Withersch...@simplistix.co.uk wrote:
So, it's quoting the tags but not the entities. Bug, no?
Yes, it certainly seems so.
Which version is this?
1.3.0-rc1
div class=batcher
tal:content=structure pager/
That
On 01/03/2011 13:52, Malthe Borch wrote:
On 1 March 2011 14:49, Chris Withersch...@simplistix.co.uk wrote:
Which version is this?
1.3.0-rc1
If you have the time, can you try the same thing in 2.0-rc2?
Exactly the same behaviour.
cheers,
Chris
--
Simplistix - Content Management, Batch
On 02/03/2011 02:36, Shane Hathaway wrote:
Can we expect a 1.3.x release that fixes this, or is 2.0 the only way
forward? I'm seeing some regressions in 2.0, like the fact that | in
expressions doesn't seem to be supported anymore. (I need to replace
those anyway, so I'm not complaining--they
Hi All,
Apologies for the cross post, but this problem is occurring with a
repoze.bfg app running on apache using mod_wsgi, and the exception is
suggesting something zope.interface related...
So, firstly, it only happens intermittently, and I haven't been able to
figure out any pattern to
On 27/06/2011 17:31, Tres Seaver wrote:
Let me google that for you:
- - http://mail.zope.org/pipermail/zodb-dev/2009-June/012607.html
- -
http://mediacore.com/blog/hosting-multiple-wsgi-applications-with-apache/
- - http://trac.edgewall.org/ticket/3371
Adding:
WSGIApplicationGroup
On 09/11/2012 23:02, Tres Seaver wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/09/2012 10:11 AM, Chris Withers wrote:
spam much? ;-)
That was a huge pile of attachment spam on the bug tracker: we need to
clean that crap out, and figure out how to defeat it. Anybody know how
68 matches
Mail list logo