Re: [Zope3-Users] How do I find out references to objects in ZODB

2008-05-02 Thread Marius Gedminas
to take care of > this for me? Your best bet is to keep track of this yourself. Indexes and catalogs may help. Marius Gedminas -- Given enough eyeballs all bugs are shallow. -- Eric S. Raymond, "The Cathedral and the Bazaar" si

Re: [Zope3-Users] How can I determine (in code) if the instance is running in devmode or not?

2008-05-30 Thread Marius Gedminas
def is_devmode_enabled(): """Is devmode enabled in zope.conf?""" config_context = getConfigContext() return config_context.hasFeature('devmode') Regards, Marius Gedminas -- "Don't trust a statistic you haven't fa

Re: [Zope3-Users] IIntIds in test environment

2008-06-05 Thread Marius Gedminas
haven't looked deeply, but it seems that it is registering an IIntIds utility as a global utility, which is much simpler and therefore more suitable for tests. Regards, Marius Gedminas -- ... there is always a well-known solution to every human problem -- neat, plausible, and wrong.

Re: [Zope3-Users] NOTICE: zope.org server move

2008-06-11 Thread Marius Gedminas
mething like 5 minutes, and do that well in advance of the physical move (say, couple of days before), then new DNS information should propagate quickly. Regards, Marius Gedminas -- Microsoft is not the answer. Microsoft is the question. "No" is the answer. signatu

Re: [Zope3-Users] buildout recipe for ReportLab

2008-07-11 Thread Marius Gedminas
I see that they declare 'ReportLab' as an egg dependency and then mirror ReportLab-2.1.tgz in their HTTP/FTP site. Marius Gedminas -- [...] the basic "your gun, your foot, your choice" memory model. -- jtv on lkml signature.asc

Re: [Zope3-Users] Configuration Problems?

2008-08-01 Thread Marius Gedminas
I'd change it to class ATDemoDisplayForm(form.Form): """A simple display form Archetypes.""" fields = field.Fields(IArchetype).omit('__name__', '__parent__') mode = DISPLAY_MODE Marius Gedminas -- If it wasn't for C,

Re: [Zope3-Users] building zope 3 instances?

2008-08-20 Thread Marius Gedminas
get shouted at if you remove something from PyPI. Trust me. > The > response here is find-links option, I think. I heard people complaining a lot about find-links in setup.py files. find-links in your buildout.cfg might be OK. Marius Gedminas -- Bumper sticker: No radio - Already stolen.

Re: [Zope3-Users] Apache config. for skinned sites

2008-08-24 Thread Marius Gedminas
er the ++vh++ directive). IIUC it's a security measure: you don't want your users to switch to other skins that may have views that shouldn't be available to them. You can try RewriteRule ^/(.+) http://127.0.0.1:8080/++skin++skin2/mysite/++vh++http:%{HTTP_HOST}:80/++/$1 [L,P]

Re: [Zope3-Users] z3c, GET variables handling pattern

2008-09-11 Thread Marius Gedminas
cessing? > > I have used z3c.formdemo and their example (sqlmessage) but for some reason > self.request['id'] seems to work for them. That's because they do exactly what I suggested: override the page template and add a hidden field. Take a look at z3c/formdemo/sqlmes

Re: [Zope3-Users] NotFound Exceptions

2008-09-17 Thread Marius Gedminas
annotation.factory? If so, upgrade to zope.annotation 3.4.1; the fix for https://bugs.launchpad.net/zope3/+bug/261620 stops it from writing to __parent__/__name__ on every access. Marius Gedminas -- This is, or so I'm told, a classic book. I can see why. It is long and it requires a great effort to finis

Re: [Zope3-Users] z3c.formjs - global js-variables and form-content in scripts

2008-09-18 Thread Marius Gedminas
I think. The ancient Zope 3 widget for List fields is pretty bad. Marius Gedminas -- Key emulation: [ ] Intuitive [*] Emacs(Seen in an MCEdit dialog) signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users

Re: [Zope3-Users] ZCML Layout Decision?

2008-10-09 Thread Marius Gedminas
wser.zcml, security.zcml, etc.) > Another design decision is that this is a framework for application > developers and probably 99% of them will have no previous Zope > experience. So teaching them how to setup zcml for their own security > declarations etc will be an issue as well

Re: [Zope3-Users] WrongContainedType

2008-10-09 Thread Marius Gedminas
e that this may be pretty basic but I am missing something in > reading the error. I'd put a breakpoint in zope.schema._field, specifically, in Object._validate, and try to see what's wrong by single-stepping. Marius Gedminas -- We're sysadmins. To us, data is a protocol-overhead.

Re: [Zope3-Users] WrongContainedType

2008-10-10 Thread Marius Gedminas
upply some arguments (at the very least, the name of the field with the missing value) > The error (probably, not sure) means that the object you > like to store has a missing value. Can you check the > schema of this object and set required=False in all fields? > > If there is a p

Re: [Zope3-Users] WrongContainedType

2008-10-10 Thread Marius Gedminas
nitions. With > invalid I mean the default value is not a vaild value > if ou try to store them. > because of: > > required=True > default=[] > > This is a combination which is not valid and it's not possible > to store the default value again. Marius Gedminas --

Re: [Zope3-Users] Buildout seems to be broken due to missing back35.py in zope.app.component.

2008-10-15 Thread Marius Gedminas
On Wed, Oct 15, 2008 at 10:59:24AM -0400, Benji York wrote: > On Wed, Oct 15, 2008 at 10:46 AM, Hermann Himmelbauer <[EMAIL PROTECTED]> > wrote: > > Hi, > > It seems that buildout is broken: > > Are you referring to the Zope 3 trunk buildout? What's that, ex

Re: [Zope3-Users] Buildout seems to be broken due to missing back35.py in zope.app.component.

2008-10-15 Thread Marius Gedminas
On Wed, Oct 15, 2008 at 01:15:15PM -0400, Benji York wrote: > On Wed, Oct 15, 2008 at 1:07 PM, Marius Gedminas <[EMAIL PROTECTED]> wrote: > > On Wed, Oct 15, 2008 at 10:59:24AM -0400, Benji York wrote: > >> On Wed, Oct 15, 2008 at 10:46 AM, Hermann Himmelbauer <[EM

Re: [Zope3-Users] Issue with xmlrpc call to zope3 xmlrpc view hanging, until original call interupted.

2008-10-16 Thread Marius Gedminas
m not mistaken, paste.httpserver will sometimes hang forever if you send a request with a body and no Content-Type field. Can you check whether xmlrpclib sends it? > Any ideas, things I could try to diagnose the problem? Change other variables (no SSL if you have it; python 2.4 versus 2.5; zserv

Re: [Zope3-Users] i18nextract.py issue

2008-10-30 Thread Marius Gedminas
ion how to obtain it. > So the first problem will be "how to obtain the i18nextract.py script in > the standard way?". Check out lovely.recipe. Here's all the documentation I could find: http://svn.zope.org/*checkout*/lovely.recipe/trunk/src/lovely/recipe/i18n/README.txt M

Re: [Zope3-Users] "Smarter" values for values = [] in Choice schema fields?

2008-11-06 Thread Marius Gedminas
s that possible? Define a helper function def vocabulary(*terms): return SimpleVocabulary([SimpleTerm(value, token, title) for value, token, title in terms]) and use it color = Choice(title=u"Color", vocabulary=vocabulary(

Re: [Zope3-Users] Need help with an urgent problem

2009-01-08 Thread Marius Gedminas
ovideUtility(gAdapter, IZopeDatabaseAdapter, name) This looks okay-ish to me (latin-1, yuck, is this the 20th century still?). > Any help in narrowing down this problem would be greatly appreciated. It > is making my live system unworkable. Start a debug console (zopectl debug or bin/debugzope

Re: [Zope3-Users] container items

2009-01-17 Thread Marius Gedminas
s in the > container a different way? Yes. You want HTH, Marius Gedminas -- It's my understanding that although in principle TCP can handle huge throughputs in practice many stacks haven't been optimized for that case, so you have to either use a utility which opens multiple TCP sessi

Re: [Zope3-Users] Run starup code with zope 3.

2009-02-12 Thread Marius Gedminas
you're not hardcoding/want to be able to adjust the grant later through the web, you should really use the IPrincipalRoleMap adapter on the root folder that will store the grant persistently in the DB rather than in memory. Marius Gedminas -- There is an almost obvious extension of interfaces

Re: [Zope3-Users] functional doctest and testbowser with zopeproject

2009-03-31 Thread Marius Gedminas
curity is independent from containment -- you don't need your objects to provide ILocation, or have __name__'s -- the Zope 3 security mechanism looks at __parent__ attributes without checking interfaces.) Marius Gedminas -- Life begins when you can spend your spare time programming

Re: [Zope3-Users] Question about README.txt files

2009-05-05 Thread Marius Gedminas
ME.txt like > >>> import dtglobals > > where dtglobals would expose all the good > !magic, without requiring the test scaffolding. Make that 'from myglobals import *' and you've got it. (A suggestion like this would not be complete without a warning: people d

Re: [Zope3-Users] zope.testing question

2009-06-02 Thread Marius Gedminas
gt;> > >> What am I missing? > > > > That bit of documentation is appalling. > > So it would be good if I removed that section from > http://svn.zope.org/zope.testing/trunk/README.txt > ? Better rename it to make it clear it's talking about developing the zope

Re: [Zope3-Users] Persistent obj with attr hooks

2009-07-23 Thread Marius Gedminas
Test() >>> apple.color = 'green' setting color to 'green' >>> apple.color getting color 'green' Show us your code if you want more advice. Marius Gedminas -- IBM motto: "TEN vowels? Don't you know vowels are scrd?"

Re: [Zope3-Users] [ZCML] Issue with conflicting browser:page decl

2009-08-05 Thread Marius Gedminas
ides stuff by piggy-backing on the more general "parent nodes override children" mechanism. This means (counterintuitively) that even includeOverrides cannot override anything in parent or sibling nodes. What you need to do is move your overrides up in the include tree. HTH, Marius Gedmi

Re: [Zope3-Users] [ZCML] Issue with conflicting browser:page decl

2009-08-06 Thread Marius Gedminas
On Wed, Aug 05, 2009 at 04:14:49PM +0200, Andreas Jung wrote: > On 05.08.09 16:11, Marius Gedminas wrote: > > On Tue, Aug 04, 2009 at 07:22:36PM +0200, Andreas Jung wrote: > > > >> Hi there, > >> > >> I'm really puzzled about the following ZCML c

Re: [Zope3-Users] zope3.4.1

2009-09-17 Thread Marius Gedminas
e customary time taken to update announcement pages and get them in sync. > Or the information on the page is misleading. > > I am using the 3.4.1 version for over a month now. It does look as if not all the places are updated. For example, http://download.zope.org/zope3.4/ has no knowledge o

Re: [Zope3-Users] Security declarations on OOBTreeItems

2010-03-31 Thread Marius Gedminas
rom zope.security.proxy import getTestProxyItems > >>getTestProxyItems(self.context.keys()) > >>[] > > Do I have to declare them myself? shouldn't these declarations come as > default? Good question. I don't see why not. Regards, Marius Gedminas --

Re: [Zope3-Users] z3c.form: small patch

2010-10-21 Thread Marius Gedminas
. The bug tracker (launchpad) is a good place for patches, in theory. > Background: https://bugs.launchpad.net/singing-dancing/+bug/620608 Marius Gedminas -- http://pov.lt/ -- Zope 3/BlueBream consulting and development signature.asc Descripti

Re: [Zope3-Users] Zope3-users Digest, Vol 71, Issue 5

2010-10-21 Thread Marius Gedminas
t; da> src/zope/security/_proxy.c:19: fatal error: Python.h: No such file or > directory ... > da> How do I resolve this ? What OS? You need the equivalent of sudo apt-get install python-dev for your distro. Marius Gedminas -- http://pov.lt/ -- Zope 3/BlueBream consulting and development signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org https://mail.zope.org/mailman/listinfo/zope3-users

Re: [Zope3-Users] MemoryError Evolving a ZODB

2012-12-12 Thread Marius Gedminas
obj = conn.get(ZODB.utils.p64(0xX))# creates a ghost try: obj._p_activate() # tries to load it except MemoryError: import pdb; pdb.set_trace() See if you get a memory error there. If so, try do disassemble the pickle (pickletools.dis) maybe -- if you've

<    1   2