Re: [Zope3-Users] ZEO multi-processes client setup with WSGI

2010-06-24 Thread Jim Fulton
On Thu, Jun 24, 2010 at 6:09 AM, Thierry Florac thierry.flo...@onf.fr wrote:

 Hi,

 I'm currently going to setup a new Zope3 web site.
 I'd like to setup this site using :
  - a remote ZEO server
  - several physical web servers, each hosting a set of ZEO clients and
   using WSGI (with mod_wsgi).

 My main question is about mod_wsgi multi-processes setup, and
 actually : if defining several processes (ideally, one for each CPU
 core), can several ZEO clients processes share the same ZEO cache ??

No.

Jim

-- 
Jim Fulton
___
Zope3-users mailing list
Zope3-users@zope.org
https://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Debug quits with no error...

2008-06-24 Thread Jim Fulton


On Jun 24, 2008, at 11:44 AM, Jon Hadley wrote:


Hi all, I'm running through PVW's Zope 3 book.

I'm trying to create an object via the debug prompt using
./bin/instance debug (my zope instance is buildout based, on OSX).

However, each time I enter: from worldcookery.recipe import Recipe
the prompt just quits out, no error, nothing ...

'import urllib' works
'import worldcookery' works
'import worldcookery.recipe' doesn't work

If I mistype the name on purpose, it gives a 'proper' error.

./bin/instance fg and start both run the server fine with no errors
and I can browse the default Zope3 site.

Where am I going wrong?


Nothing.  This is a bug in the debug setup, probably in the buildout  
recipe.


You can work around this by using:

  parts/application/debugzope -C parts/instance/zope.conf

assuming that you called your application part application.

JIm

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-11 Thread Jim Fulton


On Jun 11, 2008, at 10:36 AM, rahul bhaskar wrote:


Hi,
I am facing some problem with merging two zodb file.
is it possible to open two zodb Database at a time and copy object
from one to another.



Yes, using the export/import mechanism.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-11 Thread Jim Fulton


On Jun 11, 2008, at 4:22 PM, Stephan Richter wrote:


On Wednesday 11 June 2008, Jim Fulton wrote:

On Jun 11, 2008, at 10:36 AM, rahul bhaskar wrote:

Hi,
I am facing some problem with merging two zodb file.
is it possible to open two zodb Database at a time and copy object
from one to another.


Yes, using the export/import mechanism.


Stupid question: Which one? I tried straight xmlpickle and got some  
errors

randomly.



I was referring to the binary export/import, which is the only one  
supported by ZODB, afaik, although it's been a very long time since I  
looked at that code.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-11 Thread Jim Fulton


On Jun 11, 2008, at 7:51 PM, Stephan Richter wrote:


On Wednesday 11 June 2008, Jim Fulton wrote:

Stupid question: Which one? I tried straight xmlpickle and got some
errors
randomly.


I was referring to the binary export/import, which is the only one
supported by ZODB, afaik, although it's been a very long time since I
looked at that code.


Where is the code? I could nto find anything quickly?



ZODB/ExportImport.py

This defines a class that gets mixed into ZODB.Connection.Connection.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Pure python packages for zope.component and zope.interface

2008-04-20 Thread Jim Fulton


On Apr 20, 2008, at 12:06 AM, Darryl Cousins wrote:
...

If I have understood the code correctly in zope.deferredimport the
problem which zope.proxy.ProxyBase answers is in the following snippet
from z.deferredimport.deferredmodule:initialize [1] where a  
type(module)

comparison is made.

Therefore, if I could understand fully Jim's statement:

the inspect module's assumption that a module is not a module  
unless it

subclasses the standard Python module type

Then I could attempt to substitute pure-python code for the  
type(module)

problem which appears in the `initialize` method.


I'm not sure what you mean.  The idea is to provide a pure-python  
implementation of ModuleProxy.  ModuleProxy doesn't have to be as  
complete as zope.proxy allows.  The need for a proxy is due to the  
inspect module's use of isinstance.  isinstance in turn uses an  
object's __class__ attribute, which a proxy can override.


I hope this hint helps.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Pure python packages for zope.component and zope.interface

2008-04-19 Thread Jim Fulton

Here's a high-level response to this thread.

As others have pointed out, zope.component and zope.interface should  
work fine without  the C optimizations and I'm in favor of changing  
the setup to make them installable without the optimizations.


zope.proxy is harder. :(  What's especially sad is that the dependency  
on it is rather unimportant.  It is used by zope.deferredimport.  I  
was forced to use proxies because of annoying limitations in Python's  
module implementation and the inspect module's assumption that a  
module is not a module unless it subclasses the standard Python module  
type.  I expect though that a simpler proxy implementation could be  
used by deferredimport.  This would make zope.component depend on  
zope.proxy only if the annoying zcml is used.


I'd love to see both of the above fixed, but, sadly, don't have time  
to fix them myself any time soon.


Jim

On Apr 18, 2008, at 7:43 PM, Darryl Cousins wrote:

Hi,

The ZCA framework is developed as part of the Zope 3 project. As  
noted
earlier, it is a pure Python framework, so it can be used in any  
kind of

Python application. [1]

I was hoping to try using ZCA for a googleappengine experiment. Using
Ian Bickings post [2] I set up a environment to install zca packages.

zope.interface and zope.proxy both have .so files that aren't usable  
in

a gae project. (_zope_interface_coptimizations.so and
_zope_proxy_proxy.so).

From the quote above and other mentions on the web I gather that  
there
exist pure-python ZCA packages. Could someone point me to where to  
find

them?

Best regards,
Darryl


[1] http://www.muthukadan.net/docs/zca.html
[2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] raise Redir(newurl) not working - can someone confirm this?

2008-04-19 Thread Jim Fulton


On Apr 19, 2008, at 6:20 AM, Hermann Himmelbauer wrote:

Hi,
In my application, namely for URL-Rewriting for session handling, I  
need to
stop the current request and redirect to another url (including the  
session

key).

For that reason, I issue the following statement:

from zope.publisher.interfaces import Redirect
raise Redirect('http://my.new.url')

Theoretically, this exception should be caught by the publisher and  
a redirect

should be done, unfortunately not in my case:

-
Traceback (most recent call last):
 File /local/home/dusty/Zope-3.4.0c1/lib/python/zope/publisher/ 
publish.py,

line 130, in publish
   obj = request.traverse(obj)

 File /home/dusty/prog/zope3-inst/lib/python/my_app/session.py,  
line 72, in

getClientId
   raise Redirect(redir_url)
Redirect:
Location: /++session+ 
+VLdODjCYl90YmQwdNG6hvdiT11UZS3oly5kXonWYLHdGHloxvTshQs/favicon.ico

--

I don't know why this happens, *maybe* that's due to inclusion of  
some 3rd

party packages, e.g. z3c.layer.pagelet?

To confirm this, I'd like to know if this scenario is only happening  
for me,
so, can you please simply insert the above statement in some  
arbitrary view

and tell me if it works?



This may be a bug in Zope 3.  I suspect that there needs to be an  
error view or Redirect that actually does the redirect.


I think you are going to have to register a page for the redirect  
exception that calls response.redirect.


See zope.app.exception.browser for other examples of exception views.

Jim


--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Weird behaviour of ViewPageTemplateFile()

2008-04-10 Thread Jim Fulton


On Apr 10, 2008, at 10:30 AM, Marius Gedminas wrote:


 I've got a view defined in a configure.zcml that points to this  
class:


   class MyView(BrowserView):
   def __call__(self):
   self.pt = ViewPageTemplateFile('empty.pt')
   data = self.pt()
   return data

 That works fine.


I'm actually surprised that this works.



It works because, unlike regular objects, ExtensionClass instances  
call descriptors when you get a descriptor as an attribute.  This is  
for backward compatibility with __of__ methods (which become __get__  
methods).


Jim


--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Weird behaviour of ViewPageTemplateFile()

2008-04-10 Thread Jim Fulton


On Apr 10, 2008, at 11:46 AM, Martin J.Laubach wrote:

 ViewPageTemplate must be in the view's namespace, and it magically
 fishes out the view, view's context and request, and makes them
 available in the TAL namespace.

 Ah, so there _IS_ heavy magic involved here. Thanks for
clarifying that, I was already doubting my sanity!



This is exactly the same magic that methods use.   
ViewPageTemplateFiles are, like functions, meant to be used as methods  
and to be bound to instances.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Weird behaviour of ViewPageTemplateFile()

2008-04-10 Thread Jim Fulton


On Apr 10, 2008, at 2:59 PM, Martin J. Laubach wrote:

 ViewPageTemplate must be in the view's namespace, and it magically
 fishes out the view, view's context and request, and makes them
 available in the TAL namespace.

Ah, so there _IS_ heavy magic involved here. Thanks for
clarifying that, I was already doubting my sanity!



This is exactly the same magic that methods use.  
ViewPageTemplateFiles

are, like functions, meant to be used as methods and to be bound to
instances.


 Okay, then this leads me to the strong suspicion that what I'm
(mis)using ViewPageTemplateFiles for is the wrong way to attack
the problem.

 What I'm doing is something along the lines of

class MyView(BrowserView):
def __call__(self):
	pagename = somehow_compute_new_page_name(self.request,  
self.context)

pt = ViewPageTemplateFile(pagename)
return pt.__get__(self, self.__class__)()

 but quite obviously, that's not how it's meant to be used, is it...
Perhaps I need a radically different approach?


Need is too strong. You might prefer another approach based on what  
you now know. :)


Fred suggested using a page-template class that doesn't behave as a  
method.


Another option might be to create a bunch of methods and then have  
your function dispatch to those, depending, of course, on how many  
there are.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Re: testing a meta-egg

2008-04-07 Thread Jim Fulton


On Apr 7, 2008, at 2:15 AM, Christian Zagrodnick wrote:

On 2008-04-04 14:22:06 +0200, Jim Fulton [EMAIL PROTECTED] said:


On Apr 4, 2008, at 7:14 AM, Adam GROSZER wrote:

Hello,
Is there a sane way (or recipe) out there that makes testing a
meta-eggs easier?
As I see now, I'll need to enter all dependent eggs as:
[test]
recipe = zc.recipe.testrunner
eggs = my-meta-egg [test]
 dep-egg-1 [test]
 dep-egg-2 [test]
 ...
 zope.interface [??test??]
Seems like buildout knows which eggs should be there.
This would be needed for a pre-installation test on the target  
system.
We need to make sure that all tests pass before going into  
production.

Any help is appreciated.
IMO, testing the dependent eggs isn't desirable, however, I don't   
object to providing an option to do it.


It might be better to just provide a variable containing all the  
dependent eggs like ${test:dependent-eggs}. You could do what ever  
you want then.



How would that help?

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Question about what recipe install needs to return

2008-04-06 Thread Jim Fulton


On Apr 6, 2008, at 2:10 PM, David Pratt wrote:
Hi. I have created a recipe where I am attempting to install  
multiple scripts to bin as part of an install method. As a result I  
have a few calls to zc.buildout.easy_install.scripts but am  
returning nothing from the install method.


The recipe emits a warning indicating 'A path or iterable os paths  
should be returned'. In fact I cannot return a list indicating it  
needs a string. Is it necessary to return anything from the install  
method?


Yes.  You must return an string or an iterable of strings.


Why?


Because that's the API.  :)

Returning None is almost always a bug.  If you really want to say you  
didn't install anything, return ().


If you are installing scripts, then you should return their paths so  
they get uninstalled if your part is uninstalled.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Re[2]: [Zope-dev] testing a meta-egg

2008-04-04 Thread Jim Fulton


On Apr 4, 2008, at 8:55 AM, Adam GROSZER wrote:

Hello Jim,

Friday, April 4, 2008, 2:22:06 PM, you wrote:

JF IMO, testing the dependent eggs isn't desirable, however, I don't
JF object to providing an option to do it.

How do you propose or in fact how do you do testing just before going
into production?


For individual packages, I assume that they were tested before release.

I prefer to test just the software I'm working on.

Of course, I have integration tests of my application.


Would you please give some hints how to dig that information out in he
recipe?



I wouldn't want anyone doing this who wasn't willing to spend the time  
becoming fairly familiar with the setuptools APIs.  The full set of  
packages uses is described by the working set, which is available (or  
obtainable) to the recipe.  To include tests of all dependencies, you  
would include each of the locations from the working set as test  
directories for the test t runner, being careful to avoid system  
packages -- unless you want to test all system packages on which you  
depend too.  Even then, you could get into trouble, as individual  
package tests might not be runnable without additional facilities you  
don't have. For example, some packages might have test dependencies  
that you haven't included.  There is no standard way of specifying  
test dependencies for installed distributions.


In general, I find implicitly including packages for testing is  
fraught with peril.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Jim Fulton


Let's move this discussion to zope-dev.

On Apr 2, 2008, at 5:36 AM, kevin gill wrote:
Please check in the code to the sandbox and I will have a look at  
it. The

coding looks straight-forward, but choosing how to work it into the
existing  components.

I will look at the code and come back with questions.



I just checked 2 files, session.txt and session.py, into

  http://svn.zope.org/Sandbox/J1m/

These provide several features, most of which are of particular  
interest here:


- An api to save session credentials independent of login,

- saving sha-encoded passwords,

- logout api

- having an optional additional credential of a user domain,
  (probably not of general interest)

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Jim Fulton


On Apr 2, 2008, at 7:02 PM, Darryl Cousins wrote:


Is the code already available for a look? I've played with several
credentials options and would very much like to see what you have  
here.



It is now. Thanks for the reminder. See my response to Kevin.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I automatically login a user

2008-04-01 Thread Jim Fulton


On Apr 1, 2008, at 12:33 PM, kevin gill wrote:
During my registration process I want to automatically login the  
user (in

Zope3).

I can see how to programatically logout a user using
ILogout().logout(request), but I don't see an equivalent for logging  
in.


I intend to use session cookies for tracking users.



The most straightforward way is to interact with the session- 
credentials extractor directly to get it to save credentials for you.  
Unfortunately, the session-credentials extractor doesn't provide an  
API to do this.  This would be a worthy addition.  We have an internal  
session-credential extractor that does this.  I don't have time to  
work this into the version in zope.app.authentication, but if someone  
wants to work on this, I'd be happy to check my code into the sandbox  
for someone to work from.  Note that it also stores sha-encoded  
credentials. The current credentials extractor stores plain-text  
passwords in the session data which is extremely lame.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Zope 3 on Jython - Google Summer of Code

2008-03-28 Thread Jim Fulton


On Mar 27, 2008, at 11:51 PM, Georgy Berdyshev wrote:


Hello Zope developers and Zope community!

I am applying with Zope 3 on Jython improvements to Google Summer  
of Code.


Yay!


It would be really a great help to receive some feedback on this
undertaking from
the community and also developers of Zope!


Then this is a good place to post. :)  Although I suggest limiting the  
discussion to zope-dev.




Please have a look at the following thread on the Zope GSoC  
malinglist:

http://mail.zope.org/pipermail/gsoc/2008-March/000136.html


There aren't many details there, so it's hard to comment.

Some high-level comments:

- I suggest making porting C speed-ups a very low (non-existent)  
priority.


- I expect security proxies to be one of the greatest challenges.   
Maybe you can make them a low-priority by focussing initially on Zope  
3 applications that don't use them, like grok.


- I'd be inclined to take a bottom-up approach.  So, rather than  
trying to get the Zope 3 application (a.k.a. Zope-management  
interface, a.k.a Rotterdam skin, a.k.a zope.app.zcmlfiles) working,  
focus instead on zope.interface, zope.component, and zope.publisher.  
(Notice I didn't mention ZODB. :)


Are there wsgi servers for jython?

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Attn Jim Fulton: Buildout builder

2008-03-15 Thread Jim Fulton
I replied to this privately. This has gotten so much discussion, I  
think I'd better clarify my position.


On Mar 14, 2008, at 8:27 AM, Derek Richardson wrote:

I am the Plone champion for the buildout builder. The buildout  
builder will be a web application, likely written in Grok, that will  
allow textually-challenged users to configure a buildout via a GUI  
and receive a .cfg in return.


Jim, you mentioned at PSPS-2008 that you would gladly help whoever  
championed this.



There was a misunderstanding or miscommunication.

I volunteered to help with a buildout-based installer. This is *much*  
narrower than a buildout-building GUI.  My thought was that, for a  
simple installer, there could be  GUI that asked the user some high- 
level configuration questions and then ran a buildout included with  
the software to set up instances.  This is similar to what we're doing  
for deployments at ZC where we have high-level non-buildout  
configuration files that collect options that control instance  
installs. The instance installs are actually done by running buildouts.


I have about as much interest in a GUI to help me write buildout  
configurations as I have in a GUI to help me write Python scripts. :)


I do see potential benefits of having GUIs or other automation tools  
to help people get started assuming that the scope of these tools is  
very narrow. They are only either to help people get started or for  
people who's needs will never be anything but simple.


JIm

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Stability problem of zope3

2008-03-11 Thread Jim Fulton


On Mar 11, 2008, at 11:33 AM, Yuan HOng wrote:
...

The zope.server seems to give the best result. It causes the least
failed requests due to the Competing writes/reads conflict, like:


This is simply because the cherrypy server defaults to 10 threads,  
while zope.server defaults to 4.  If you use the same number of  
threads for both, I expect you'll get about the same number of  
conflicts.  You have a hot spot that you probably need to address, or  
a bad test.


...


extends = http://download.zope.org/zope3.4/versions.cfg



Add:

  [versions]
  zope.server = 3.5.0

to your buildout. This will override the version # from 3.4.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Stability problem of zope3

2008-03-04 Thread Jim Fulton


On Mar 4, 2008, at 1:52 AM, Yuan HOng wrote:
...

So you mean I can also use the zope.server?


Yes, or the cherrypy server, which seems to be much faster.


Are there any preferred
way to set up a production environment now?


zope.server is fairly well proven.  I'd like to see people try the  
cherrypy server and let us know how it goes. :)




For the moment I switched back to the package versions used in my
development environment, which is older, but doesn't give the above
headache. However, I am interested in finding out what's wrong with my
previous installation.


I think you got lots of answers on that. I suggest following up on the  
suggestions.



Anyway, it is created by default by the most
recent version of zopeprject under Python2.5.



shrug

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Stability problem of zope3

2008-03-04 Thread Jim Fulton


On Mar 4, 2008, at 11:01 AM, Martijn Faassen wrote:


Hey,

On Tue, Mar 4, 2008 at 3:26 PM, Jim Fulton [EMAIL PROTECTED] wrote:


On Mar 4, 2008, at 1:52 AM, Yuan HOng wrote:

[snip]

Are there any preferred
way to set up a production environment now?


zope.server is fairly well proven.  I'd like to see people try the
cherrypy server and let us know how it goes. :)


Do you mean the WSGI server facility in CherryPy, or CherryPy  
itself? When

I looked a year ago they were different things, though things might
have changed.



I mean the cherrypy wsgi server.  It is included with PasteScript.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Stability problem of zope3

2008-03-03 Thread Jim Fulton


What's in your paste.ini (or whatever the past configuration file is  
named).  I'm particularly curious which server you're running and how  
it is configured.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Stability problem of zope3

2008-03-03 Thread Jim Fulton


On Mar 3, 2008, at 4:00 AM, Jodok Batlogg wrote:
...

paster opens a lot of threads.


That's odd.  That must depend on the server used.  The zope.server  
server factory uses 4 by default.  The cherrypy server uses 10.




you should limit them...
specify sth. like:

[server:main]
threadpool_workers = 4
threadpool_spawn_if_under = 0
threadpool_max_requests = 0



This appears to be incomplete.  You would need a use option to specify  
which server to use and I'm wondering what server these options are  
for and which zopeproject uses by default.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout recipe for setting up a WSGI application for Zope 3 ?

2008-03-02 Thread Jim Fulton


On Feb 21, 2008, at 11:18 AM, Baiju M wrote:


- Jim Fulton [EMAIL PROTECTED] wrote:

On Feb 21, 2008, at 7:28 AM, Baiju M wrote:


Hi,
Is there any buildout recipe for setting up a WSGI application
for Zope 3 ?  I know zopeproject is an option, but I am looking
for a recipe which does something similar.



I'm working on one very slowly.  My recent efforts to clean up
zope.server are part of this effort. There's a good chance I'll have

something by the end of the weekend.

This will be a recipe, either similar to or an addition to
zc.zope3recipes that let's you define a past-deploy based application

with a zope3 application.  My primary goal is to make it easy to
select a publication component.


This is a great news.  I would love to see it in zc.zope3recipes  
package itself,

may be zc.zope3recipes:wsgiapp or something like that.



Here's an update.  The first step is to create sane PasteDeploy app  
factories. zope.paste tries very hard to fit in with the current  
byzantine system.  I appreciate the effort that went into this. :)


I decided to go back to basics, especially since my main goal is to  
make it easier for people to control the publication component used.   
I've created application factories for zope.publisher and  
zope.app.publisher.  I've released the zope.publisher version.  It is  
very bare-bones.  It is up to users to write a full publication object  
to go with it.


Here's a simple buildout that creates a paster script:

  [buildout]
  parts = paster

  [paster]
  recipe = zc.recipe.egg
  eggs = PasteScript
   zope.publisher
   zope.server
  interpreter = py

If you try this, you can create a very simple sample web server with  
the following config file;


  [app:main]
  use = egg:zope.publisher
  publication = egg:zope.publisher#sample

  [server:main]
  use = egg:zope.server
  host = 127.0.0.1
  port = 8080

Which you can run with:

  bin/paster serve --daemon config-file start

I'm working on an application factory for zope.app.publisher.  This  
will:


- Support the request-type selection framework in zope.app.publication.

- Provide a derivative of zope.publication.browser.BrowserPublication  
that provides a hook for specifying an application root,

  other than using ZODB.

- Provides optional support for loading ZCML before calling the  
publication factory.


I've got a few details to work out and I need to write some tests.   
Maybe I'll release this next weekend, or the weekend after.


After this, I'll be ready to add recipes to support it.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: [Zope3-Users] Buildout recipe for setting up a WSGI applicationfor Zope 3 ?

2008-03-02 Thread Jim Fulton


On Mar 2, 2008, at 7:10 PM, Roger Ineichen wrote:

- Provide a derivative of zope.publication.browser.BrowserPublication
that provides a hook for specifying an application root,
  other than using ZODB.


Does this mean we can't use our existing BrowserPage implementations
because they do not inherit this IBrowserPublication (derivat)?


zope.publisher.browser.BrowserPage has nothing to do with  
zope.app.publication.browser.BrowserPublication.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout recipe for setting up a WSGI application for Zope 3 ?

2008-02-21 Thread Jim Fulton


On Feb 21, 2008, at 7:28 AM, Baiju M wrote:


Hi,
 Is there any buildout recipe for setting up a WSGI application
for Zope 3 ?  I know zopeproject is an option, but I am looking
for a recipe which does something similar.



I'm working on one very slowly.  My recent efforts to clean up  
zope.server are part of this effort. There's a good chance I'll have  
something by the end of the weekend.


This will be a recipe, either similar to or an addition to  
zc.zope3recipes that let's you define a past-deploy based application  
with a zope3 application.  My primary goal is to make it easy to  
select a publication component.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout bug?

2008-02-14 Thread Jim Fulton


On Feb 14, 2008, at 2:58 PM, David Pratt wrote:

Hi. I have done some fairly sophisticated buildouts over the past  
year but here's something I have not done with an extension before  
now that I thought ought to be possible:


[buildout]
extends = ${some-part:path}/foo/bar.cfg

[some-part]
path = /some/where/on/my/filesystem

This produces an error while initializing since it is unable to find  
the file but works correctly if the full path is provided. I use  
substitutions like this all over the place. Should they not work in  
the buildout part as well? Many thanks.



Substitutions don't work for extends because extension (assembling  
files to create a configuration database) happens before substitutions.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout bug?

2008-02-14 Thread Jim Fulton


On Feb 14, 2008, at 5:59 PM, David Pratt wrote:
One other thing that I have not yet seen is using the part name  
within the part which would be useful. Something like:


[foobar]
baz = bar
log = /some/path/${foobar:?}-${foobar:baz}.log



I don't follow the example.  I can thing of perhaps similar examples:

  log = /some/path/${name}-something.log

where ${name} refers to the part name.  I definitely want to do  
something like this.  I'm not sure what syntax should be used.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released

2008-02-01 Thread Jim Fulton


On Feb 1, 2008, at 9:42 AM, Chris McDonough wrote:


Tom Hoffman wrote:
On Fri, Feb 1, 2008 at 9:22 AM, Chris McDonough [EMAIL PROTECTED]  
wrote:

I'll take a risk by stating the obvious.

If there will continue to be a release schedule for Zope 3, the  
appserver It
would reduce confusion to new users greatly to give the appserver  
release a name

other than Zope.

Eg.

Current name  Proposed name
  -
Zope2- Zope
Zope3, the libraries - Zope libraries
Zope3 the appserver  - Frobnozz

Isn't this release sort of the last of its kind, though?  Kind of a
weird time for a name change


I've heard that rumored, but there's nothing indicating that in the  
release announcement.  There are forward looking statements in  
there: tarballs... for the last 3.4 series and probably for 3.5 as  
well.  I take this to mean that there's an intention to have a 3.5,  
3.6, 3.7 release, etc, but past 3.5, the release won't be packaged  
as a tarball.  If this is the case, even if it's just for 3.5, it  
would sure help reduce confusion to give this release of  
packages (even if it's just a buildout and the KGS for that  
release) a name other than Zope.


Or if not, it would seem like there would be a better argument for  
the

new approach having a new name than the old one.


I'm not sure which is the new approach and which is the old one?



I'm glad you brought this up.  Some observations:

- I think the goal of these releases is less to provide an application  
than to provide a possibly useful collection of some libraries.  This  
is similar to the Python standard library.  Some people see  
significant value in this.  I believe that other web frameworks, like  
TurboGears, also make releases that assemble a bunch of eggs, so  
people can use their frameworks without having to download eggs from  
PyPI.


- The new approach to making a release would be to create an egg-based  
release, probably building on zc.sourcerelease.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: how to eggify a zopeproject?

2008-01-25 Thread Jim Fulton

A passing comment:

- Eggs are great for distributing libraries.

- They aren't ideal for distributing applications, which are often  
composed of many libraries, in the form is eggs.


zc.buildout is a tool for assembling libraries and other parts to  
create working applications. (Of course, it is not the only tool.)


The zc.sourcerelease package provides a simple script that leverages  
buildout to help create self-contained source releases from working  
buildouts.  This is the tool that I use to distribute applications.


Jim


On Jan 25, 2008, at 11:25 AM, Nando Quintana wrote:


Raphael,


Either include a MANIFEST file or make the egg from a subversion/cvs
checkout. The former tells explicitly what to include the latter
implicitly (everything that's under version control basically).


This means calling zopeproject with --svn-repository ...?
Ok, I'll try it.


I'd suggest to look at buildout if you want to support
such things as well.


So, buildout is the correct approach to deploy an egg as a zope app?
Ok.

thanks,
Nando.

--
http://www.nandoquintana.com/contact
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and the Data.fs

2008-01-23 Thread Jim Fulton


On Jan 23, 2008, at 1:19 AM, Jeff Shell wrote:


When developing and/or deploying using Buildout, how do you deal with
the Data.fs? I'm particularly concerned with running on different
environments (desktop development, server development, staging,
deployment) as I don't want the Data.fs to be under source control nor
inside the application package at all, really. In some of my playing
around, I've often blown away the local Data.fs, either by doing a
'git clean' or just by tinkering with my buildout.cfg.


We use buildout-local ZEO servers in development.

In production, ZEO servers are deployed separately.

In staging, we deploy specialized ZEO servers that wrap demo storages  
around read-only file storages opened against production databases.   
(I'm finishing 2 projects, zc.demostorage2 and zc.beforestorage that  
will make this much easier, more efficient, and more flexible.)




I know that buildout supports extending other buildout.cfg files. Is
the best option to have a different buildout.cfg for every
environment?


That's what we do.  We have a buildout config that we use for  
development, once that we use in conjuction with zc.sourcerelease to  
create RPMs for deploying production software.  We also have  
production buildouts that configure instances and associated run-time  
scripts, configurations, and support files,   Stage is not really  
different from production in this regard.  The same software RPMs are  
used for both. They differ only in the instance configurations.



As a side question then, is buildout:directory relative to a config
file, or relative to where buildout is being run? I'd like to have a
base buildout.cfg in the base, but put the others in a sub-dir.



By default, it is relative to the config file. You can override it to  
be whatever you want.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-21 Thread Jim Fulton


On Dec 21, 2007, at 10:18 AM, David Pratt wrote:

Hi Benji. This is exactly what I have been doing up till now and has  
been working well for quick work on a local development machine. My  
current thinking though is to take control of as much of the  
software as possible so that development == deployment on my local  
machine to mitigate the risk of breaking things even if it means  
more disk. I am doing this in conjunction with stripping the  
deployment server to it's barest bones and bringing as much of the  
software into the buildout as possible.


I really would like to see a two stage buildout that does the python  
construction with a python.cfg and then the main buildout with  
buildout.cfg file as part of the standard fare. I'm trying a few  
things today to see if a simple event class and callback can be used  
to create the python first and have the callback's handler run the  
main buildout as an experiment.



IMO, it is much more practical to create a clean system package for  
Python.  By a clean system package, I mean one that is equivalent to  
buildoing from source and has nothing added.  This is equivalent to  
what you would build yourself but makes deployment much easier because  
you don't have to rebuild Python every time you make a new release.   
You can use this in development as well.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-21 Thread Jim Fulton


On Dec 20, 2007, at 8:58 PM, David Pratt wrote:

Right. Thanks for this, there are couple of solutions here and shell  
script is a reasonable solution but these methods seems counter to  
the simplicity of buildout. I had also seen a rebootstrap package in  
svn. I wonder if something similar could not be accomplished this  
way using python with a means of producing a callback. I really  
don't want anything too messy to accomplish this. Many thanks.



I'll note that much of the pain here (or at least in the distutils-sig  
thread)  arises from the fact that the system
Python and the custom Python have the same version but are built in  
incompatible ways. :(  Unfortunately, binary egg names don't capture  
enough information about the ways the eggs were built.


I'm pondering an option to provide different egg directories for  
different Python interpreters.  So, maybe something like:


  [buildout]
  parts = python24 ...

  [python24]
  recipe = zc.recipe.cmmi
  url = ...
  executable = ${buildout:parts-directory}/bin/python
  eggs-directory = ${buildout:directory}/eggs
  develop-eggs-directory = ${buildout:parts-directory}/develop-eggs

The idea is that egg-aware recipes would use the egg locations  
specified in the Python section.  I think this would provide a fairly  
clean way to build and use a custom Python.


Of course, it would be nice to have a recipe to build python that set  
the various variables.


I can see the benefit of building a custom Python as part of the  
buildout when you don't want users of a buildout to build a clean  
Python of their own.  However, if you can require your users to do  
this, for example, if you are your user, then life is much simpler  
when a clean Python is managed separately.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-21 Thread Jim Fulton


On Dec 20, 2007, at 8:03 PM, David Pratt wrote:

Hey Darryl. Our minds were in a similar place today. I finally had  
decided to move away from my system python starting on my mac and  
also having a spot of trouble. I put something simple together below  
to illustrate what happened in my instance.


Here the eggs built with the python would not install. I initially  
though it was the lxml I was compiling, but it was just happened to  
be the first part requiring the custom-python. Eggs were made, and I  
could see the temp folder also, but when was finalizing the install,  
it threw the error and without much verbosity, the tempfolder it was  
installing into disappeared.


Note, I did not include the custom-python as a part in the buildout.  
I tend to like the python24:location type of notation since it is  
fairly explicit when you have a number of pieces of software you are  
building.


Regards
David

[buildout]
develop = .
parts = python24
   interpreter
index = http://download.zope.org/ppix
log-level = DEBUG

[python24]
recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.4.4/Python-2.4.4.tgz

[custom-python]
executable = ${python24:location}/bin/python

[interpreter]
recipe = zc.recipe.egg
interpreter = interpreter
eggs = Cheetah==1.0
python = custom-python


Here are the highlights:


Having *just* highlights makes it difficult to follow what's going on.




Some verification it is using the right python...

Getting distribution for 'Cheetah==1.0'.
We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6c7
Running easy_install:
/Users/davidpratt/Desktop/Buildouts/osxdeploy2/parts/python24/bin/ 
python -c from setuptools.command.easy_install import main;  
main() -mUNxd /Users/davidpratt/Desktop/Buildouts/osxdeploy2/ 
eggs/tmprQq-MH -v /Users/davidpratt/Desktop/Buildouts/download- 
cache/dist/Cheetah-1.0.tar.gz
path=/Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/ 
setuptools-0.6c7-py2.4.egg


Processing Cheetah-1.0.tar.gz

Last few lines of output.. some time later.

changing mode of /Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/ 
tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/ 
top_level.txt to 755
changing mode of /Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/ 
tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/ 
cheetah to 755
changing mode of /Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/ 
tmprQq-MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg/EGG-INFO/scripts/ 
cheetah-compile to 755


Installed /Users/davidpratt/Desktop/Buildouts/osxdeploy2/eggs/tmprQq- 
MH/Cheetah-1.0-py2.4-macosx-10.3-ppc.egg


Because this distribution was installed --multi-version, before you  
can

import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to  
one of

these examples, in order to select the desired version:

   pkg_resources.require(Cheetah)  # latest installed version
   pkg_resources.require(Cheetah==1.0)  # this exact version
   pkg_resources.require(Cheetah=1.0)  # this version or higher


Note also that the installation directory must be on sys.path at  
runtime for
this to work.  (e.g. by being the application's script directory, by  
being on

PYTHONPATH, or by being added to sys.path by your code.)

While:
 Installing interpreter.
 Getting distribution for 'Cheetah==1.0'.
Error: Couldn't install: Cheetah 1.0
[mac-pg:~/Desktop/Buildouts/osxdeploy2] davidpra%


That's very odd.  It feels like something is missing in the output.

I tried reproducing this. I didn't have the contents of your  
directory, so I had to comment out develop = ..  You have a typo in  
the recipe specification for the python24 part. After fixing that, I  
ran the buildout above using the system Python on Mac OS X 10.5.1.   
Worked great. The interpreter script uses the custom Python.


The interpreter runs, but when I try to import cheeta, I get a bus  
error..  Unfortunately, there is a problem with using cmmi to install  
Python on Mac OS X 10.5.  There is a bug in Python's configure that  
causes Python to be built incorrectly. The generated pyconfig.h file  
currently requires some tweaking. :(


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and defining build order

2007-12-21 Thread Jim Fulton


On Dec 20, 2007, at 6:46 PM, Darryl Cousins wrote:


Hi Jim,

Thank you for the reply.

On Thu, 2007-12-20 at 18:23 -0500, Jim Fulton wrote:

On Dec 20, 2007, at 6:07 PM, Darryl Cousins wrote:


Hi,

Is it possible to define in which order the parts are built.


Yes, they are built in the order listed.


You must mean the order the sections are listed and not the order  
listed

in parts.


No. I meant the order listed in the parts option.


I've tried playing with both orderings but when I start the
buildout it first runs through the develop eggs


develop eggs are not parts. They are built using whatever Python is  
used to run the buildout.



then starts on with ZODB


I don't see ZODB listed in your buildout.  If it is a dependency of  
one of your recipes, that would cause it to be built with your system  
Python.



- and the custom python is not built.


That's difficult for me to believe.  I might try to reproduce your  
buildout, but I don't have the various bits it wants to build as a  
develop eggs.




1. Eggs (eg ZODB) are byte-comiled with system python.


Byte-compilation isn't really the issue. The issue is extensions.  if  
ZODB is a dependency of any recipes, then it will be build with  
whatever Python is used to run the buildout.



2. Couldn't get postgresql to build first so that psycopg2 finds those
header


Move postgresql to the front of your parts list. Your interpreter part  
lists the psycopg2 egg. The egg recipe will download this distribution  
and try to install it.  At that point, it hasn't gotten to your  
psycopg2 part yet.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and custom python

2007-12-20 Thread Jim Fulton


On Dec 20, 2007, at 6:03 PM, Darryl Cousins wrote:

I'm trying to created an isolated environment using buildout. I had
understood that defining a custom build python would ensure that all
eggs are installed and compiled with the custom python.

But when the buildout comes to install ZODB it is being compiled  
agains
the system python headers. (-I/usr/include/python2.4). Which is not  
what

I want, and at that point the custom python has not even been built.

Any thoughts.

[buildout]
python = custom-python
parts = python
custom-python


[python]
recipe = zc.recipe.cmmi
url = http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tar.bz2
extra_options = --with-threads
   --with-readline
   --enable-unicode=ucs2

[custom-python]
executable = ${buildout:parts-directory}/python/bin/python



Your buildout doesn't mention ZODB3 or anything that uses it, so it is  
hard to comment.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout and defining build order

2007-12-20 Thread Jim Fulton


On Dec 20, 2007, at 6:07 PM, Darryl Cousins wrote:


Hi,

Is it possible to define in which order the parts are built.


Yes, they are built in the order listed.



This
relates to my previous post about custom python in the build. If I  
could

ensure the custom python was built first would then eggs be compiled
using the custom python?


Well, yes, sort of. I suspect the following thread is relevent:

  http://mail.python.org/pipermail/distutils-sig/2007-November/008482.html

It's hard to say because your just showing snippets of your buildout.



The second case I have is with psycopg2 and postgresql. Their   
buildout

sections look like this:

[psycopg2]
recipe = zc.recipe.egg:custom
egg = psycopg2
find-links =
http://www.initd.org/pub/software/psycopg/psycopg2-2.0.6.tar.gz
define =
PSYCOPG_EXTENSIONS 
,PSYCOPG_DISPLAY_SIZE 
,PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM,HAVE_PQPROTOCOL3

include-dirs = ${postgresql:location}/include
library-dirs = ${postgresql:location}/lib
rpath = ${postgresql:location}/lib

[postgresql]
recipe = zc.recipe.cmmi
url =
ftp://ftp.nz.postgresql.org/postgresql/source/v8.2.5/postgresql-8.2.5.tar.bz2

But psycopg2 gets built first! And so does not find the postgresql
headers. Is there a solution to this?



It's impossible to comment because I can't see the whole buildout  
config.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] buildout and egg depedencies

2007-12-11 Thread Jim Fulton


On Dec 11, 2007, at 10:21 AM, Jeff Shell wrote:


On Dec 6, 2007 8:08 AM, Benji York [EMAIL PROTECTED] wrote:

Jim Fulton wrote:

None of the above. What is the harm of the dependencies?


One of the options included in none of the above is to not use
buildout at all.  Forget that the project in question uses buildout  
(or

setuptools) and integrate it into your project however you would have
before those tools existed (svn:externals, make a checkout,  
whatever).


That's such a disappointing answer. It's one that I've gotten a couple
of times when I've said hey, I'm trying to move to a release based
system using distutils and setuptools and I'm floundering. And I have
made our own system. And it's I don't know. I'd like to spend more
time solving customer problems than figuring out how to install our
solutions to customer problems. We're in desperate need of reliable,
repeatable distributions. DESPERATE.


I think you are misunderstanding the context of Benji's answer.

In this case, someone is running into trouble because they are trying   
to mix egg-based package management with subversion-based package  
management. The Zope 2 tree uses subversion. It obtains many Zope 3  
packages via subversion externals.  The original poster is trying to  
use some other Zope 3 packages via eggs and is  packages via egg  
dependencies that he already has via subversion.  This is at best  
annoying and at worst error provoking.


Using eggs with the current Zope 2 tree is an abuse of the setuptools- 
based packaging system.  There are two ways to fix this.  The one I  
suggested was to add egg-info directories to the Zope 2 tree to make  
it compatible with eggs.  Benji's suggestion was to use svn to get  
additional zope 3 packages, rather than eggs. Both are reasonable  
solutions in that they avoid the clash between the separate packaging  
systems.



How did it come to be that the Python tools are so bad at this?


I dunno.  I think we're making a lot of progress.  This particular  
example doesn't make me question the Python tools at all.



Setuptools is horrible when it comes to doing local
(instance-home-ish) installations, requiring virtualenv or whatever.
And I've had little success getting those to work. Maybe they just
break my way of thinking about how Python does and should work.
Whatever. Buildout looks like it tries to address many of those
issues, but again I find myself fighting against my natural instincts.
Where's some end user documentation?


http://pypi.python.org/pypi/zc.buildout
http://us.pycon.org/common/talkdata/PyCon2007/116/buildout.pdf



The doc-test is difficult to read
and speaks in generics, not about day-to-day problems.


Everyone's a critic.

...


That I'm still frustrated by these tools all this time later is
disappointing.


Yes. I'm disappointed that you're frustrated. Thanks for sharing.  I  
find this post inspires me to want to take the day off to write better  
tutorials.


...


I've gotten Buildout to work on some small components. It's great -
check out the source, run buildout, wait, wait, wait, and then have a
nice little self contained testing and development environment. But
I've never been able to get a full Zope 3 Application up and running
in that environment.


Lots of people have.   I expect that there are a number of examples.   
One example is the zc.z3monitor buildout, svn://svn.zope.org/repos/ 
main/zc.z3monitor/trunk.  This buildouts out a working ZEO server and  
a minimal Zope 3 application that uses it. Others might be able to  
suggest better examples,


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] buildout and egg depedencies

2007-12-11 Thread Jim Fulton


On Dec 11, 2007, at 1:37 PM, Christophe Combelles wrote:


Jim Fulton a écrit :
(...)
issues, but again I find myself fighting against my natural  
instincts.

Where's some end user documentation?

http://pypi.python.org/pypi/zc.buildout
http://us.pycon.org/common/talkdata/PyCon2007/116/buildout.pdf


I've started learning buildout 3 weeks ago and I've found this  
document (the latter) extremely useful, because it is not a low- 
level reference but rather a 3-feets view with opinions, some  
examples, some ideas, and it explains the 'why' and the 'when'. It  
has helped me understanding buildout quickly, to the point of using  
it for production on small projects. And I'm now saving lots of time  
installing preview and final versions.
Temporarily switching final eggs to develop-eggs to quickly fix some  
bug is another interesting idea suggested by this document and it  
will eventually help improving zope because it makes it so easy to  
test and commit even a minor issue in a particular environment,  
without interfering with anything else.
Btw, I've started a translation of this tutorial, and I was suddenly  
wondering what was its license? (I didn't find a mention)



I'm glad you found it useful. It is ZPL. Translate away.  BTW, as you  
find bugs/typos, feel free to make corrections. The source is in the  
doc directory of the buildout project.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] buildout and egg depedencies

2007-12-06 Thread Jim Fulton


On Dec 6, 2007, at 8:51 AM, Jean-François Roche wrote:


Hello,

 I am working with zope 2 and an happy user of buildout.

 But ... as soon as I am trying to use package such as z3c.sqlalchemy
or z3c.menu I get polluted by zope 3 depedencies which of course  
brake

my buildout environment.

 So question: Does someone know a way to tell to zc.buildout that he
shouldnt install the depedencies of an egg which is defined in the  
egg

= of the buildout section inside the buildout.cfg ?



There is no way to do that.  Doing so doesn't sound like a good idea  
to me.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] buildout and egg depedencies

2007-12-06 Thread Jim Fulton


On Dec 6, 2007, at 9:06 AM, Jean-François Roche wrote:


Jim Fulton a écrit :


On Dec 6, 2007, at 8:51 AM, Jean-François Roche wrote:


Hello,

I am working with zope 2 and an happy user of buildout.

But ... as soon as I am trying to use package such as z3c.sqlalchemy
or z3c.menu I get polluted by zope 3 depedencies which of course  
brake

my buildout environment.

So question: Does someone know a way to tell to zc.buildout that he
shouldnt install the depedencies of an egg which is defined in the  
egg

= of the buildout section inside the buildout.cfg ?



There is no way to do that.  Doing so doesn't sound like a good  
idea to me.


Ok :( , what should i do ?

 * Recompile my own eggs without depedencies ?
 * run my instance with a Makefile with a script which removes  
unwanted

depedencies ?
 * using/create another recipe to remove selected depedencies ?
 * try to convince you that it is a good idea ?



None of the above. What is the harm of the dependencies?

If it is because Zope 2 includes many of the same packages outside of  
eggs, then this is a Zope 2 problem, not a buildout problem.  This  
particular issue has been discussed a number of times.  The solution,  
short of eggifying Zope 2, is to add egg-info directories to Zope 2 so  
that setuptools can see that the dependencies are already satisfied.


If it's because extra dependencies annoy you, I'm unmotivated.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3, ZEO and RAMCache

2007-11-26 Thread Jim Fulton


On Nov 22, 2007, at 5:34 AM, Thierry Florac wrote:



 Hi,

I have a simple question : I'm using RAMCache with ZEO and several  
Zope

frontends ; when calling cache.invalidate(), are the selected entries
invalidated only on the Zope frontend which handled the request, or  
are

they invalidated on each frontend ??


Yes AFAIK.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: KGS Site Updated

2007-11-19 Thread Jim Fulton


On Nov 19, 2007, at 9:54 AM, Tres Seaver wrote:

It's a limitation of buildout, perhaps.  It is possible to use
setuptools with multiple indexes:  'compoze' allows spelling multiple
'-index-url' items on the command line.  E.g.::


I'm curious what API you're using.

buildout uses setuptools.package_index.PackageIndex.  This only  
accepts a single index URL.  Of course, I could create multiple index  
instances, use each one and merge the results.  Is that what you're  
doing?


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: KGS Site Updated

2007-11-19 Thread Jim Fulton


On Nov 19, 2007, at 2:52 PM, Tres Seaver wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Fulton wrote:

On Nov 19, 2007, at 9:54 AM, Tres Seaver wrote:

It's a limitation of buildout, perhaps.  It is possible to use
setuptools with multiple indexes:  'compoze' allows spelling  
multiple

'-index-url' items on the command line.  E.g.::


I'm curious what API you're using.

buildout uses setuptools.package_index.PackageIndex.  This only
accepts a single index URL.  Of course, I could create multiple index
instances, use each one and merge the results.  Is that what you're
doing?


Yes.


Hm, OK.  Does this let you search multiple indexes for the same  
package? I assume so.


I consider this to me moving beyond setuptools.  I'm not saying that  
this is necessarily bad.



I imagine it would be pretty simple to add a per-package override to
buildout.cfg which caused a separate index to be used to fetch a given
distribution.



You can already do this with the egg recipe:

  http://pypi.python.org/pypi/zc.recipe.egg#detailed-documentation

This still only lets you search a single index when looking for a  
distributions to use to satisfy a set of requirements.


buildout could be expanded to search multiple indexes, using the  
technique you seem to be using in compoze.  This makes me uneasy as it  
seem to be moving far beyond easy_install, if not setuptools. It is my  
goal that buildout be compatible with easy install, in some sense.


--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Find the zope3 instance home directory (or the /var directory)

2007-11-07 Thread Jim Fulton


On Nov 6, 2007, at 5:02 AM, Eric Bréhault wrote:


Hello,

WIth Zope2, when I need to create or read a file in the filesystem,  
I usually go in /myzopeinstance/var directory

and to find it is pretty easy:
import os
os.environ['CLIENT_HOME']

But in Zope3, CLIENT_HOME or INSTANCE_HOME are no longer provided  
in os.environ


I had a look to different source code, and apparently the solution  
is to use the path of the current file to get the instance home, so  
we have code like this:

os.path.normpath(
os.path.join (os.path.dirname(__file__),
 os.pardir, os.pardir, os.pardir, os.pardir))

Is there any easier (and cleaner) way to do it ?


Yes. If you want to have a directory like this:

- Create it (or arrange for it to be created lazily)

- Configure it in zope.conf:

product-config var
 directory /location/of/directory
product-config

- To get this information from Python:

  import zope.app.appsetup.product
  var_dir = zope.app.appsetup.product['var']['directory']

As has been pointed out, there is no equivalent of an instance home  
in Zope 3, because we don't want to impose such a restrictive model,  
but you can easily provide such a model for yourself if you wish.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Known-good-sets problem

2007-10-06 Thread Jim Fulton


On Oct 6, 2007, at 5:28 AM, Martijn Faassen wrote:


Benji York wrote:

Stephan Richter wrote:
2. How many packages should be controlled in this index? I think  
we should definitely add packages from z3c and the zc namespace.
What is the motivation to include non-controlled packages?  I  
suppose it is to let people use those packages with (in this case)  
Zope 3.4.  What if someone wants Zope 3.4 and Twisted version X  
and Plone version Y (just making those up).  Perhaps we need a way  
to refer to several KGS when constructing an application.  Or is  
one KGS supposed to define a universe of packages known to work  
together.  If so, I would think there would be no place for non- 
controlled packages.


A feature to combine lists of versions is definitely needed. I may  
be a developer of an application that uses both Grok and KSS, for  
instance. This can be solved by me maintaining my own list, but I'd  
prefer to rely on two lists that are already there.


That's the application developer's case. The framework developer's  
case requires me to publish such combined lists. If I have my own  
framework on top of Grok and KSS, I'd like to publish a list that's  
a combination of those without having to copy them.


As I mentioned in my response to Benji, it's tricky to get the  
semantics right.  IMO, you want a particular KGS to be  
authoritative.  There isn't anything in setuptools to support this  
semantic.  You can use the mirroring approach (maybe with some minor  
tweaking) to combine KGSs on the server.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] The Zope3 Collector has been moved to launchpad.

2007-03-29 Thread Jim Fulton


New bugs can be filed at:
   https://bugs.launchpad.net/zope3/+filebug

Users can view their personal bugs at:
   https://bugs.launchpad.net/~USER

Using the menu on the left, they can pick between assigned, reported  
and subscribed bug reports (in future, the page will default to  
showing all bugs related to the user).


Old URLs, such as http://www.zope.org/Collectors/Zope3-dev and http:// 
www.zope.org/Collectors/Zope3-dev/###, where ### is an old collector  
issue number redirect to the corresponding locations in Launchpad.


Much thanks to James Henstridge and the the Launchpad team for making  
this happen!


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Disabling the Zope 3 Collector today

2007-03-27 Thread Jim Fulton


Heads up!

Assuming that I can figure out how to do so, I'm going to disable the  
Zope 3 collector today in preparation for switching to Launchpad.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Logging level for transcript.log

2007-02-03 Thread Jim Fulton

Vinny wrote:

Hi,

Where can I find the configuration setting for the 
logging level used in the transcript.log file?


I have tried looking in etc/zope.conf, etc/zdaemon.conf
and came up empty handed.  I can see ERROR levels easily
enough. 


The transcript log is created by zdaemon and captures
all output from the application being run, in this case,
Zope.  It has nothing to do with the Python logging system
and has no concept of log level.

 This works and shows up in transcript.log:

 import logging

 logging.basicConfig(level=logging.DEBUG,
 format='%(asctime)s %(levelname)-8s %(message)s',
 datefmt='%a, %d %b %Y %H:%M:%S',
 
filename='/usr/local/www/Zope3/mv/lib/python/hello/utility/log',
 filemode='a')

 logging.error('Pack my box with %d dozen %s', 5, 'liquor jugs')

 But this does not show up in transcript.log:

 logging.debug('Pack my box with %d dozen %s', 5, 'liquor jugs')

 Both messages end up in my local log file.  I think I understand
 that the logging function is using mine and a logger registered
 with zope.  Where do I find out about the zope logger?

That's a good question.  Logging is controlled through ZConfig and
I'm not aware that our ZConfig setup is documented, except through
comments in sample zope.conf files.  I'm not a big fan of how we
currently do configuration.

I think you want to change the logging level by adding a level
option to the event log:

eventlog
  level debug

  logfile
path $LOGDIR/z3.log
formatter zope.exceptions.log.Formatter
  /logfile

  logfile
path STDOUT
formatter zope.exceptions.log.Formatter
  /logfile
/eventlog

In this example, I have set the logging level for the
event logger to debug, so you will see debug messages.
The default logging level is info.

Note that in the example above we are sending output to
2 places, z3.log and standard output.  Because the zdaemon
transcript log captures standard output, it is the standard
output logger that affects the transcript log.  IMO, it is
silly to log to two places. I would just log to standard
output.  (The only problem with this is that older versions
os zdaemon don't support log rotation. I have fixed this
in the latest version of zdaemon.)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: zc.buildout and unreleased eggs in svn

2007-01-28 Thread Jim Fulton

Martin Aspeli wrote:

Jim Fulton wrote:

Martin Aspeli wrote:

Hi,


I'd rather discuss questions like this on the distutils-sig list.


Okay? Is that a Zope list or a python one? 


Python:

http://mail.python.org/mailman/listinfo/distutils-sig



In Gmane?


Probably. :)


easy_install lets me specify an egg from svn, e.g.:

 $ easy_install 
http://svn.plone.org/svn/collective/ZopeSkel/trunk#egg=ZopeSkel-dev


Hm, interesting.  I thought I had seen something like that, but I've
never been able to find documentation for it.  Do you know where this
is documented?  Does this example actually work?


Hanno did some digging and found it was under-documented.


Where is it under documented? :)

 It *does* work

though (try it if you'd like).


I will when I make some time.

...

I agree that something like this would be useful.  I would like to
see the semantics spelled out.  For example, I agree that this should
lead to a develop egg.  What version should it have? Should that
be determined by the remote setup.py file?  Is the project you point
to required to have a setup.py file?  If so, then why specify a
project name after the #.


I don't know why the # is needed, this is just the way I've seen it 
spelled before.


I think the default semantic would be that the version would be ==dev 
i.e. current svn. I don't fully understand how this works though - I 
know I can do easy_install PasteScript==dev to get the current 
development version of PasteScript, but I don't know how easy_install 
actually finds that (I presume the cheeseshop tells it about 
PasteScript's svn location?)


I don't think that in this case it's actually getting it directly
from svn.  But I'm not sure.  If we were having this discussion
on the distutils-sig mailing this, Phillip Eby would have started
explaining it by now. :)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.buildout with Zope 2

2007-01-12 Thread Jim Fulton

Martin Aspeli wrote:
...
This may not be the right place for this question, but I'm wondering if 
anyone has experience or examples using zc.buildout with Zope 2.


I don't.  I'm using the immediate predecessor of zc.buildout
for zope Zope 2 projects though.

It seems a useful solution and one that will increase in importance, 
though so far I've not yet fully grasped what it does or how I use it in 
my brief encounters with it.


buildouts are about automating application assembly and installation.
They are somewhat like make in that regard, although they tend to work
at a higher level.  (In fact, our earlier buildouts were built using
make.)

A secondary benefit of zc.buildout is that it provides tools for
leveraging eggs in a much more controlled way that is allowed
by easy_install.  This will be helpful to Zope 2 in the future
especially as Zope 3 is split into eggs.

I'm wondering whether it is something I should pursue further in the 
context of Plone development (targeting primarily Zope 2.10 for now), 
but I don't know if it's even relevant to that platform or if this is 
unchartered territory.


Suggestions?


The predecessors of zc.buildout have been used for Zope 2 applications
for several years at ZC.

BTW, if you want to learn more about zc.buildout, then a good way would
be to attend the minitutorial I'll be giving at PyCon nect month:

  http://us.pycon.org/TX2007/TutorialsAM#AM7

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] getId in zope3?

2006-11-05 Thread Jim Fulton

Fred Drake wrote:

On 11/5/06, Stephan Richter [EMAIL PROTECTED] wrote:
This is officially an implementation detail; 
zope.traversing.api.getName() is

the API call.


Interesting; I'd never known it was anything other than __name__.
These APIs just keep changing...


No, the APIs haven't changed.  It's really a question of best practice
and that evolves over time.  We created a formal API, getName,
because we were queasy about exposing __name__.  In practice, there
is no other implementation and using __name__ is cleaner in a lot of
ways, IMO.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Access to persistent Zope tables/classes in ZODB

2006-10-28 Thread Jim Fulton

Rob J Goedman wrote:

Thanks Jim,

I had gotten to the following point (although you have now shown
me a better way to get there, I was using FileStorage):

ZODB.DB.DB object at 0x137e910
{'Application': zope.app.folder.folder.Folder object at 0x1377d70, 
'zope.app.generations': persistent.dict.PersistentDict object at 
0x1377db0}

zope.app.folder.folder.Folder object at 0x1377d70
OOBTreeItems object at 0x1386228

print f1[0].keys()[1]
Rob's buddies
print f1[0].values()[1]
buddydemo.buddy.BuddyFolder object at 0x1377f30
print f1[0].values()[1].__getitem__
bound method BuddyFolder.__getitem__ of 
buddydemo.buddy.BuddyFolder object at 0x1377f30


I don't know what to make of the above without any context.
That's fine, because I don't really have time to study any specifics.

This is where I get stuck. Been going over the sources to figure out how 
to iterate over these.


Understand that this has nothing to do with ZODB.  Whatever
application objects you use provide whatever api they do
indepenent of ZODB.


...

I did notice since I did this, bin/runzope acts differently (on this 
Zope/ZODB?).


Differently than what? In any case, I suggested that you use zopectl.
runzope is an internal implementation detail of zopectl.


 I created a new instance in 121

and transferred all applications and the new instance works fine:

Robs-Laptop:~/Projects/Zope/Zope3/One2One rob$ cd ../121/
Robs-Laptop:~/Projects/Zope/Zope3/121 rob$ runzope
--
2006-10-27T14:45:57 INFO root -- HTTP:localhost:9090 Server started.
Hostname: localhost
Port: 9090
--
2006-10-27T14:45:57 INFO root Startup time: 9.072 sec real, 8.710 sec CPU
^C

But the old instance in One2One now just seem to test:

Robs-Laptop:~/Projects/Zope/Zope3/121 rob$ cd ../One2One/
Robs-Laptop:~/Projects/Zope/Zope3/One2One rob$ runzope
--
2006-10-27T14:47:56 WARNING root Developer mode is enabled: this is a 
security risk and should NOT be enabled on production servers. Developer 
mode can be turned off in etc/zope.conf

Total: 0 tests, 0 failures, 0 errors
Robs-Laptop:~/Projects/Zope/Zope3/One2One rob$

Any idea what causes this?


No, I have no context to begin to understand it. I don't know what
121 and One2One are.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Access to persistent Zope tables/classes in ZODB

2006-10-27 Thread Jim Fulton

Rob J Goedman wrote:
I'm wondering if there is an easy way to get to persistent objects 
created in Zope and stored in ZODB

from a python program outside Zope.


Yup.

As an example, I would like to 
iterate over created 'buddies' in buddydemo.


The easiest way is to use zopectl, which takes care of opening the
database(s) and loading the Zope configuration for you.

Interactively, use zopectl debug.  This will give
you an interactive interpreter with an app variable set to
the top-level folder.

Use zopectl run your_script to run a script with the
same app variable set and ready for use.

Of course you can use the lower-level ZODB APIs to open the database
yourself.

Note that you'll want to use ZEO if you want to open the database while the
web application is running.

Jim


--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 database activity

2006-10-27 Thread Jim Fulton

Thierry Florac wrote:

Zope2 provided a nice tool in his control panel to view database
activity (objects loads and stores, cache usage...).


Yes. This is wildly useful for improving performance.  In
many applications, a good way to improve performance is to
allocate a larger object cache using more physical memory.
(Buying more RAM is a very cost effective hardware upgrade.)


Two questions :
 - is there any way to get access to such information with Zope3 ?


Zope3 uses the same ZODB that Zope 2 uses, so the necessary
infrastructure is there. No one has written the equivalent UI
tool AFAIK.


 - is it possible with Zope3 to setup cache size ??


Of course, using the same option in the zope.conf file.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problem with Python 2.4.4

2006-10-24 Thread Jim Fulton

Torvald Bringsvor wrote:

I guess this may be a Python problem rather than a
zope problem, but I just thought I'd check here.

I have set up Zope 3.3.0 with Python 2.4.4, and it
didn't quite work. Some operations such as adding a
content object provoked an error from cgi.py line 716,
this line reads:
  line = self.fp.readline(116)

and then Python reacts that readline should have max
one argument, but it gets two. By correcting it to
   line = self.fp.readline()

everything works well.

Have anybody else had this problem?


You should report this in the Zope 3 collector,
http://www.zope.org/Collectors/Zope3-dev.

It looks like Zope's file stream object that it passes to
the CGI module needs to grow a maximum size.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problem with Python 2.4.4

2006-10-24 Thread Jim Fulton

Marius Gedminas wrote:

On Tue, Oct 24, 2006 at 02:00:05PM +0200, Thierry Florac wrote:

Le mardi 24 octobre 2006 à 07:51 -0400, Jim Fulton a écrit :

Torvald Bringsvor wrote:

I have set up Zope 3.3.0 with Python 2.4.4, and it
didn't quite work. Some operations such as adding a
content object provoked an error from cgi.py line 716,
this line reads:
  line = self.fp.readline(116)

and then Python reacts that readline should have max
one argument, but it gets two. By correcting it to
   line = self.fp.readline()

everything works well.

Have anybody else had this problem?

You should report this in the Zope 3 collector,
http://www.zope.org/Collectors/Zope3-dev.

It looks like Zope's file stream object that it passes to
the CGI module needs to grow a maximum size.

I had the same problem on Debian GNU/Linux.
Problem is due to a security patch applied on cgi.py in Debian's
unstable release.


I've fixed this bug a couple of weeks ago.  It was
http://www.zope.org/Collectors/Zope3-dev/535

(It's not marked as resolved, because the Zope file stream object
discards the maximum size, circumventing the CGI security patch, and
that's because Twisted's file stream object doesn't accept a maximum
size).


I wonder if a newer version of twisted fixes this.

I wonder why we aren't using 2.2.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] make check [OSX v3.3.0]

2006-10-10 Thread Jim Fulton

Robert Hicks wrote:

I get the following error and it is the only one:

Error in test checkVerificationInvalidationPersists 
(ZEO.tests.testConnection.MappingStorageConnectionTests)

Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/unittest.py, 
line 260, in run

testMethod()
  File 
/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/tests/ConnectionTests.py, 
line 534, in checkVerificationInvalidationPersists

self._storage = self.openClientStorage('test')
  File 
/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/tests/ConnectionTests.py, 
line 186, in openClientStorage

realm=realm)
  File 
/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/ClientStorage.py, 
line 321, in __init__

self._wait(wait_timeout)
  File 
/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/ClientStorage.py, 
line 342, in _wait

assert self._connection.is_async()
AttributeError: 'NoneType' object has no attribute 'is_async'


Is that a big deal?


Probably not, butplease submit a collector issue at:

  http://www.zope.org/Collectors/Zope3-dev

Please include information about whether this was a PPC or intel mac
and the OS version.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] So you've just downloaded Zope 3.3....

2006-09-28 Thread Jim Fulton

Jeff Shell wrote:

... now what?

I just tried moving some work over to Zope 3.3. Already things are
blowing up.


What do you mean by blowing up?

We certainly tried to make 3.3 backward compatible.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-19 Thread Jim Fulton


On Jul 19, 2006, at 8:47 AM, Benji York wrote:


David Pratt wrote:
What about the idea of maintaining a text file in the distribution  
specific to possible security issues. Is this worth considering  
for historical purposes so they do not get lost over time or  
implicitly understood by only a handful of people.


Exactly.  Any package that needs security-related things verified  
should have a test (doctest in a text file) describing the problem  
and verifying that it has been fixed.


Of course, that, by itself, doesn't solve the problem.  docutils may  
introduce a new feature in the furture that shouldn't be exposed  
through the web.  Whenever we integrate a new version, we need to  
review it to make sure there aren't new security issues.  This is  
especially true of anything that is exposed TTW.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-18 Thread Jim Fulton


On Jul 18, 2006, at 2:55 PM, David Pratt wrote:


Hi Jim. I was noticing a 0.4.0-zope in distutils


I don't know what you mean by this.

that looks patched with  NotImplementedErrors for the offending  
code in docutils.parsers.rst.directives.misc.  Can you when this  
will land in the Zope3 trunk?


If you mean patching the docutils, then as far as I'm concerned, it  
will never land in the Zope 3 trunk.


The right solution to this problem is to write applications that use  
docutils correctly, not to patch docutils.


I can understand why this solution was used for Zope 2, at least in  
the short run.  I don't think it's a good long-ter solution.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security alert: use of Through-the-Web reStructuredText

2006-07-08 Thread Jim Fulton


On Jul 8, 2006, at 11:49 AM, David Pratt wrote:



Jim Fulton wrote:
Recently, a serious security flaw was found in Zope 2 due to it's  
improper support for allowing reStructuredText to be edited  
through-the-web.  reStructuredText has directives that allow  
inclusion of any file a Zope process could read and inclusion of  
data obtained from fetching arbitrary URLs.  In a trusted  
environment, these directives have legitimate uses.  The feature  
of including files and URL results should not be enabled for text  
entered from untrusted sources, which applies to most through-the- 
web interactions.


Hi Jim. In the case of a wiki, it is the nature of a wiki that  
folks are able to edit through the web.


But a wiki can be edited in other formats that restructured text.  
(Personally, I think
wikis should use tools like Epoz or Kupu to allow direct HTML  
editing, but

that's a different matter.


Wouldn't data validation and any necessary alterations to the  
directives some sense as opposed to removing it from the zope3 mix?


Sure, if someone is willing to do it and take responsibility.  Note  
that I'm not removing these from the release, because they've never  
been in the release.  I didn't even remove them from the repository,  
I just removed them from the Zope 3 tree.


I'm convinced that TTW reST can be safe with suitable attention to  
detail.
So far though, that hasn't happened.  No one has come forward yet and  
said
I'll maintain this and be responsible for making sure we're secure  
wrt reST.



The recent hotfix:
  http://www.zope.org/Products/Zope/Hotfix-2006-07-05/ 
Hotfix-2006-07-05

addresses the problem for Zope 2.


Perhaps. We don't know for sure. We don't have tests.  We don't know  
if it can
be defeated using a reload product.  It is also a very crude fix. It  
prevents people
from creating add-ons that make legitimate use of file-inclusion or  
the raw
directive.  It was a great fix in an emergency -- and this was a  
serious emergency,

but I don't want to use such a fix in Zope 3.


It is safe to allow reStructuredText through the web with care.   
The inclusion of files or URL results can be disabled, but the  
programmer must explicitly disable the feature.  It is not  
disabled by default. It is also critical that a developer who  
exposes through-the-web reStructuredText have tests to verify that  
the file/url inclusion feature has been disabled.
Zope 3 itself, as released, doesn't have this problem because it  
doesn't allow reST entry through the web.  There are third-party  
applications, however, including 2 packages in the Zope 3  
subversion tree that do have this problem.  I strongly urge you to  
avoid using any Zope package that allows through-the-web input of  
reStructuredText unless you can verify that file/url has been  
properly disabled.
The zwiki and bugtracker packages do not currently disable file/ 
url inclusion and should not be used in situations in which users  
who are not highly trusted have access to these applications.


Can you be explicit about the process of disabling file/url  
inclusion for zope3 (if this is the critical point you are  
making ). The use of restructured text is valuable in zope and  
obviously it is important to understand security measures that  
would allow its continued use.


The reStructuredText documentation gives instructions for disabling it.

But something this risk needs people to be responsible.  I'm not  
seeing that. I expect someone to come forward eventually.  Part of  
being responsible is writing reasonably extensive tests.


If this can be done, why remove the products from the repository  
tree? Would it not be better to apply the necessary fixes?  Many  
thanks.


Because their presence in the Zope 3 tree put people at serious  
risk.  If someone
wants to work on them, great, and they can release them as add-on  
packages.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Splitting ZODB ?

2006-06-26 Thread Jim Fulton


On Jun 26, 2006, at 6:17 AM, Chris Withers wrote:


Jim Fulton wrote:
The default Zope 3 configurations still organizes objects into a  
tree.

Path identifiers are no longer used.


How do you now uniquely identify an object?


First, you usually don't need an independent unique id for an
object, since direct object references work much better in
Zope 3 than they do in Zope 2.

If you do need a separate identifier of some kind, you can
use a key reference or use an integer id from an intid utlity,
which simply assigns integers to key references.

Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Splitting ZODB ?

2006-06-26 Thread Jim Fulton


I expect that these frameworks are documented in the Zope books.

Look at the zope.app.keyreference and zope.app.intid packages.
(Both of these should eventially be moved out of zope.app
and both, sadly, were written before we developed doctest-based
testing practices.)

Jim

On Jun 26, 2006, at 6:59 AM, David Pratt wrote:

Hi Jim. Where should this be done (separate identifier). I was  
thinking of a UUID of some sort when I read this which could be  
helpful for other things.


Regards,
David

Jim Fulton wrote:


If you do need a separate identifier of some kind, you can
use a key reference or use an integer id from an intid utlity,
which simply assigns integers to key references.


--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Splitting ZODB ?

2006-06-21 Thread Jim Fulton

Philipp von Weitershausen wrote:

Chris Withers wrote:


Thierry FLORAC wrote:


While using Zope2, I used to split my ZODB into several parts, using
the old DBTab product configuration (which was finally included into
Zope2).
Can I setup this kind of configuration with Zope3 and, if so, how ?


It's all ZODB, I would hope Zope 3's zope.conf would allow this in the
same way that Zope 2 does...



Actually, DBTab and Zope 2 used to monkey patch the ZODB to allow mount
points. The ZODB has recently grown this feature itself and IIRC Zope 2
was fixed (by Theuni?) to use this functionality now. I don't think Zope
3's zope.conf exposes it yet, though.


Yes, it does.  You can have multiple database sections
and database sections can now have a name.  The databases
are registered as utilities and participate in a ZODB multidatabase.
The first database defined is used as the root database.

Zope 3 doesn't support mounting, but the same functionality
is mostly trivially obtained using the ZODB multi-database APIs.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Splitting ZODB ?

2006-06-21 Thread Jim Fulton

Philipp von Weitershausen wrote:

Jim Fulton wrote:


Zope 3 doesn't support mounting, but the same functionality
is mostly trivially obtained using the ZODB multi-database APIs.



Well, ok, then mounting support could a nice sprint topic :)


Maybe, I'm not really sure it is necessary.

Now you can just grab an object from one database
and assign it as an attribute value of an object in another
database.

Much of the value of the Zope 3 mounting code
was in getting around the limitation that cross-database
object references weren't supported.

BTW, it might be nice to start thinking about having
some Foundation sprints. :)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Please Guido, pick me, pick me!

2006-02-03 Thread Jim Fulton

Jegenye 2001 Bt (Miklós Prisznyák) wrote:


  (how many more lame names can we come up with?)

Zope 3 / Rebirth is the lame name I'd vote for :)

Florent


Hm, Zope 3 / Renassaince  sounds posh :-) and it's also a good 
excercise  in spelling :p (except for the French-speaking like yourself)


Yeah, it's a plot to keep me from talking about releases. ;)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope 3 Capacities

2006-01-20 Thread Jim Fulton

David Johnson wrote:

We're looking at 10-100 billion tx per year stored and performed.

Partly I'm trying to gauge where the dividing line is between using the ZODB
and not, and also estimate how many server instances should be running.  


I'm not sure any transactional database will handle that sort of rate with
a single database.  We did some tests 2 years ago and with commodity
hardware, we were able to commit around 50 simple transactions per second (tps)
to a file storage over ZEO.  This is about 60 times slower than you need, 
assuming
100 billion tx per year or about 3000 tps.  I imagine you could do somewhat 
better
than that if you got beefier hardware.

A *quick* google on transaction rates yielded a fairly old article:

  http://www.wintercorp.com/rwintercolumns/ie_9903.html

At that time, most of the databases tested on Unix did less that 100 tps.
Many of them much less.  Of course that was a long time ago.
Does anyone know of more recent data?

Of course, if you can segregate your data, you can get higher
transaction rates by employing multiple database servers, ZODB
or otherwise.  I've faily confident that this is what you'll
need to do.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux

2006-01-05 Thread Jim Fulton

Marco Groppo wrote:

Il giorno mer, 04/01/2006 alle 19.07 -0500, Jim Fulton ha scritto:



Did you have the problem with beta 2?



Sorry, I'm an idiot. Yesterday I didn't read the access log, so I didn't
notice that the problem was Firefox... The problem was due to a Firefox
extension (FasterFox) which I installed sometime ago (I had even
forgotten of its existence...). This extension periodically downloads
all static pages linked by the current page; since the names of the
views usually finish in .html it thinks that they are static
pages :-( and when the browser loads the ZMI page it gets in background
/@@find.html, /@@grant.html,... and of course: /@@undo.html!
I'm really sorry, I should have read the log yesterday :-(
(the reason why I didn't notice this problem with previous versions is
that probably I didn't have FasterFox enabled...)


Of course, this doesn't explain the test failures or the Shouldn't
load state for ... when the connection is closed errors.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux

2006-01-05 Thread Jim Fulton

Marco Groppo wrote:

Il giorno gio, 05/01/2006 alle 09.01 -0500, Jim Fulton ha scritto:



Of course, this doesn't explain the test failures or the Shouldn't
load state for ... when the connection is closed errors.



I've reinstalled Zope and now the functional tests pass! And I can't
reproduce the other error (shouldn't load...) anymore, even if I
enable FasterFox and stress the db with many requests. I don't know
what I had done, but I wasn't using multiple DBs...


Strange. OK. :)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux

2006-01-04 Thread Jim Fulton

Marco Groppo wrote:

Hi!

I'm experiencing some strange problems with Zope 3.2.0b3


Did you have the problem with beta 2?

 on GNU/Linux

(Ubuntu Breezy i386, kernel 2.6.12, python 2.4.2, gcc 3.4). If I add an
object to the root folder (for example using the ZMI) and I try to see
one of its browser views Zope sends me a 404 error page. If I add more
objects and then I try to delete one of them, sometimes I can still see
the object after the deletion (even if I reload the page) and sometimes
(for example if I try to reload the page one more time) I can't.


Weird.  I haven't seen this. (obviously)

 I tried

to run the tests with 'make check' and the result was:

  Ran 8033 tests with 0 failures and 0 errors in 604.001 seconds.

If I test the installation with bin/zopetest:

+++
Running unit tests:
  Ran 7650 tests with 0 failures and 0 errors in 298.561 seconds.
Running zope.app.testing.functional.Functional tests:
  Set up zope.app.testing.functional.Functional
Traceback (most recent call last):
  File ./zopetest, line 39, in ?
sys.exit(testrunner.run(defaults))
  File /home/marco/zope3.2/lib/python/zope/testing/testrunner.py, line
238, in run
failed = run_with_options(options)
  File /home/marco/zope3.2/lib/python/zope/testing/testrunner.py, line
391, in run_with_options
setup_layers, failures, errors)
  File /home/marco/zope3.2/lib/python/zope/testing/testrunner.py, line
557, in run_layer
setup_layer(layer, setup_layers)
  File /home/marco/zope3.2/lib/python/zope/testing/testrunner.py, line
632, in setup_layer
layer.setUp()
  File /home/marco/zope3.2/lib/python/zope/app/testing/functional.py,
line 197, in setUp
FunctionalTestSetup(self.config_file)
  File /home/marco/zope3.2/lib/python/zope/app/testing/functional.py,
line 139, in __init__
self.app = Debugger(self.db, config_file)
  File /home/marco/zope3.2/lib/python/zope/app/debug/debug.py, line
35, in __init__
config(config_file)
  File /home/marco/zope3.2/lib/python/zope/app/appsetup/appsetup.py,
line 110, in config
context = xmlconfig.file(file, context=context, execute=execute)
  File /home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py,
line 554, in file
include(context, name, package)
  File /home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py,
line 483, in include
f = openInOrPlain(path)
  File /home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py,
line 394, in openInOrPlain
fp = open(filename)
IOError: [Errno 2] No such file or directory:
'/home/marco/zope3.2/bin/ftesting.zcml'
+++


This is very odd.  I can't reproduce this.


I have installed Zope 3.2 b3 on Windows also and I haven't noticed any
problem so far. 


Maybe you should try the linux installation process again.

Is anyone else seeing symptoms like these?


P.S.: sorry for my English...


It looks good to me. :)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux

2006-01-04 Thread Jim Fulton

Marco Groppo wrote:

I forgot to say that some times I get this error when I try to access a
ZODB object (it doesn't matter what kind of object):

+++
ERROR ZODB.Connection Shouldn't load state for 0x36 when the connection
is closed
Traceback (most recent call last):
  File /usr/lib/python2.4/threading.py, line 422, in run
self.__target(*self.__args, **self.__kwargs)
  File
/home/marco/apps/zope3.2/lib/python/twisted/python/threadpool.py, line
149, in _worker
context.call(ctx, function, *args, **kwargs)
  File /home/marco/apps/zope3.2/lib/python/twisted/python/context.py,
line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File /home/marco/apps/zope3.2/lib/python/twisted/python/context.py,
line 37, in callWithContext
return func(*args,**kw)
--- exception caught here ---
  File /home/marco/apps/zope3.2/lib/python/twisted/web2/wsgi.py, line
139, in run
result = self.application(self.environment, self.startWSGIResponse)
  File /home/marco/apps/zope3.2/lib/python/zope/app/wsgi/__init__.py,
line 49, in __call__
request = self.requestFactory(environ['wsgi.input'], environ)
  File
/home/marco/apps/zope3.2/lib/python/zope/app/publication/httpfactory.py, line 
62, in __call__
request_class, publication_class = chooseClasses(method, env)
  File
/home/marco/apps/zope3.2/lib/python/zope/app/publication/httpfactory.py, line 
34, in chooseClasses
request_class, publication = factory()
  File
/home/marco/apps/zope3.2/lib/python/zope/app/publication/requestpublicationfactories.py,
 line 79, in __call__
request_class = component.queryUtility(
  File /home/marco/apps/zope3.2/lib/python/zope/component/__init__.py,
line 260, in queryUtility
return getSiteManager(context).queryUtility(interface, name,
default)
  File /home/marco/apps/zope3.2/lib/python/ZODB/Connection.py, line
729, in setstate
raise ConnectionStateError(msg)
ZODB.POSException.ConnectionStateError: Shouldn't load state for 0x36
when the connection is closed
+++

...and then, if I reload the page, the problem can magically disappear,
and if I request the view another time I can get the error again, and so
on and so on... it seems to me that the behaviour is totally random.

Does anybody know what's going on?


For some reason, a database connection wasn't closed properly.

Is there anything special about your setup?  Is this a plain
Zope install?  Are you using ZEO?  Are you using a single database?

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Problems with Zope 3.2.0b3 on Linux

2006-01-04 Thread Jim Fulton

Florent Guillaume wrote:
This might, or might not, be related to a problem I discussed in the 
context of Zope 2 recently on the zodb-dev list. In the case of 
multidatabases,


That's why I asked whether he was using multiple databases.

 the initial connection to a secondary database
(mountpoints in Zope 2) isn't always joined correctly to the set of 
connections of the multidatabase, and thus not closed correctly when the 
main connection is closed. I'm still waiting for feedback about this on 
zodb-dev.


Yeah, I know I need to get to this.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope 3.2.0b3 released

2006-01-02 Thread Jim Fulton


I've made a source release of Zope 3.2.0 beta 3.  I plan to make a
Windows release tomorrow, when I have access to a windows machine with
a compiler, unless someone beats me to it.

This release was motivated by a fairly severe bug in the input buffering
used to integrate Twisted with Zope.

The release can be downloaded at:

  http://www.zope.org/Products/Zope3/3.2.0b3

I plan to make a final 3.2.0 release on Thursday or Friday.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope3-dev] Zope 3.2.0b3 released

2006-01-02 Thread Jim Fulton

Tim Peters wrote:

[Jim Fulton]


I've made a source release of Zope 3.2.0 beta 3.  I plan to make a
Windows release tomorrow, when I have access to a windows machine with
a compiler, unless someone beats me to it.



I gave it a try, but it dies near the start of the process:

$ \python24\python.exe ..\zpkg\bin\zpkg -C releases\Zope.cfg -v
3.2.0b3 -t Zope-win
'version.txt' doesn't match any files in collection
(in C:\Code\Zope3.2\src\zope\app\PACKAGE.cfg)

I _suppose_ this is because there's no file named version.txt in
src/zope/app/ under

svn+ssh://svn.zope.org/repos/main/Zope3/tags/Zope-3.2.0b3

Did you miss step #3 from

http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/MakingARelease

?  Assuming that's all there is to it, I'll add it myself ...


Yes, I followed the step, but I forgot to add the file. Sigh.
The file is actually included in the source tar ball.

Jim


--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: URGENT RFC: Is anyone using response.write in Zope 3?

2005-12-30 Thread Jim Fulton

Philipp von Weitershausen wrote:

Jim Fulton wrote:


When we refactored the Zope 3 pubisher to work more closely with WSGI,
we decided to remove the response.write method.  We should have written
a proposal for this, but we failed to do so.  Over the last few weeks
there has been much discussion of this in which I asserted many times
that I didn't think any applications outside of Zope 3 itself used this
method.  No one has disagreed with me.  I want to double check this.
Does anyone have any Zope 3 applications that are using response.write?

Assuming that the answer is no (or that no one answers today), I'm
going to
more clearly document how to return long output and I'm going to add a
method that generates a hopefully helpful error.

Note that we may add this method (or something like it) back in the future
to support chunked streaming output,



Alas, I just realized from Adam Summer's posting to zope3-users two days
ago
(http://mail.zope.org/pipermail/zope3-users/2005-December/001746.html)
that my book is using response.write(). I had totally forgotten about
it, though it isn't much of a problem. The book is about Zope X3 3.0 and
can't make guarantees about future versions. Just to be safe I've added
an entry to my errata page:

  page 204, Example 12.24, line 17: Using the ``write()`` method of
  HTTP-based responses does not provide a performance advantage in
  Zope X3 3.0 and 3.1 and is not supported anymore in Zope 3.2 and
  higher.  To effectively return large data without holding it in
  memory, it is now recommended to create a temporary file and return
  that::

import tempfile
f = tempfile.TemporaryFile()
f.write(pdf.data)
return f

  This will only work with Zope 3.2 and higher.


Yeah, this is definately a problem.  I don't want to make it
hard for people who bought the book.  I'd also rather not delay the
release any more.  Hopefully, the new error message in 3.2 will
make this clearer.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Get classes implementing Interface

2005-12-30 Thread Jim Fulton

Philipp von Weitershausen wrote:

Florian Lindner wrote:

my first use case is that I want to enhance the HomefolderManager to make it 
possible to select something else than a Folder to be created automatically. 
Right now I have forked a version of the HomefolderManager and just changed 
in the code. But I would like to have a more generic solution and I'll also 
commit it back to the trunk.
For that I want all classes implementing IContainer (and IContentType ?) and 
let the user select on in the configuration dialog of the HomefolderManager.
More use caess probably show up in my project later, but nothing fixed at this 
time.



So what you want is to create objects. Classes are just an
implementation detail to creating objects :). Factories create objects,
whether they're from a class is immaterial.

So, what you want is not a list of classes but a list of factories that
can create IContainers. This is possible by using
zapi.getUtilitiesFor(IFactory) and then checking each factory's
getInterfaces() method whether IContainer is a part of the returned
result. I would probably base an implementation of all on the
UtilityVocabulary.


I'll also note that the use case is also directly addressed through
containment constraints.  You can say that a container
should only contain objects of some given types and you will get
just those types in the add list.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Get classes implementing Interface

2005-12-30 Thread Jim Fulton

Florian Lindner wrote:

Am Freitag, 30. Dezember 2005 17:45 schrieb Jim Fulton:


Philipp von Weitershausen wrote:


Florian Lindner wrote:


my first use case is that I want to enhance the HomefolderManager to make
it possible to select something else than a Folder to be created
automatically. Right now I have forked a version of the
HomefolderManager and just changed in the code. But I would like to have
a more generic solution and I'll also commit it back to the trunk.
For that I want all classes implementing IContainer (and IContentType ?)
and let the user select on in the configuration dialog of the
HomefolderManager. More use caess probably show up in my project later,
but nothing fixed at this time.


So what you want is to create objects. Classes are just an
implementation detail to creating objects :). Factories create objects,
whether they're from a class is immaterial.

So, what you want is not a list of classes but a list of factories that
can create IContainers. This is possible by using
zapi.getUtilitiesFor(IFactory) and then checking each factory's
getInterfaces() method whether IContainer is a part of the returned
result. I would probably base an implementation of all on the
UtilityVocabulary.


I'll also note that the use case is also directly addressed through
containment constraints.  You can say that a container
should only contain objects of some given types and you will get
just those types in the add list.



But the HomeFolderManager is not a container itself it's just a utility that 
creates container upon requests. And I want to make choosable which container 
to create. Or do I misunderstand you?


I missunderstood you.  I'm not familiar with HomeFolderManager.
In any case, the approach taken for containment constraints,
which Philipp sketched above, should be applicable.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Get classes implementing Interface

2005-12-28 Thread Jim Fulton

Florian Lindner wrote:

Hello,
how can I get all classes that implement a specific interface?
What interface do I need to search for, when I want all objects that can be 
added and work as container? IContainer seem to be implemented by a lot more 
objects...


There isn't an api for that.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: ZCML, practicality, purity (was Excellent perspective...)

2005-12-22 Thread Jim Fulton

Chris McDonough wrote:


On Dec 22, 2005, at 12:05 PM, Shane Hathaway wrote:

Time and again people fail to realize that Zope 3 wants to create  
the low level framework right first, and only after that add high  
level simplifications and shortcuts to have less configuration and  
provide fastest developer exeperience.
Of course people aren't attracted to Zope 3 yet because they feel  
it's complex. And there's a reason: it *is* complex. For now.



So you don't think anyone but hard core Pythonistas should use Zope  3 
yet?



Does anyone think that code generation in the form of a starter  
package could help here?


Yes.  I'm hoping that the ArchGenXML project will produce that for
Zope 3.  I wonder how that work is progressing ...

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: ZCML, practicality, purity (was Excellent perspective...)

2005-12-22 Thread Jim Fulton

Jean-Marc Orliaguet wrote:

Shane Hathaway wrote:


...

The problem with ZCML is not the language (XML). Writing the same 
description in python would not address such issues as:


- when looking at a component, how can I know how it is wired inside the 
application without doing a grep on 100 files?
- when looking at the wires, how do I quickly get access to the 
components that they connect together?


I agree.  This is an issue with any system with lots of indirection.
It's even a hassle with lots of inheritence, although at least base classes
provide an avenue of search.


This is all I need in order to understand how an application is built. 
If it was easier to navigate between the components by following the 
wires, there wouldn't be such an issue with ZCML I think. Maybe a GUI, 
or IDE would help a lot.


Have you looked at apidoc? If not you should. It's far from perfect, but
it's a great start.  It needs more people contributing ideas.


It could also be that ZCML is cluttered with too much information that 
really doesn't belong there.


Yup.

For instance ZCML should not be used for the application setup (for 
creating menus, actions, workflows, etc.) because this has nothing to do 
with connecting components. This could be done in python or be stored in 
archives in XML (.tgz, .zip, ..).


Except that these all *are* components.

Shane Hathaway wrote:
 Chris McDonough wrote:

 I assume this means you've given up on the idea of creating a GUI
 ZCML configuration tool, the?


 No.  In fact, I've been creating the tool for the purpose of convincing
 myself that ZCML is right, even though I still believe it's wrong. :-)

 One thing I've learned from the GUI project, however, is that its
 greatest value is being able to *query* the configuration.  It lets you
 answer questions like where are all the views named update.html?.
 That's valuable independently of the format of ZCML.

This would be a good feature to add to apidoc.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] URGENT RFC: Is anyone using response.write in Zope 3?

2005-12-19 Thread Jim Fulton


When we refactored the Zope 3 pubisher to work more closely with WSGI,
we decided to remove the response.write method.  We should have written
a proposal for this, but we failed to do so.  Over the last few weeks
there has been much discussion of this in which I asserted many times
that I didn't think any applications outside of Zope 3 itself used this
method.  No one has disagreed with me.  I want to double check this.
Does anyone have any Zope 3 applications that are using response.write?

Assuming that the answer is no (or that no one answers today), I'm going to
more clearly document how to return long output and I'm going to add a
method that generates a hopefully helpful error.

Note that we may add this method (or something like it) back in the future
to support chunked streaming output,

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html

2005-12-14 Thread Jim Fulton

Chris Withers wrote:

Jim Fulton wrote:

This is a matter of policy. It is straightforward to change. Many 
people hate
@@ and the ++view++name syntax.  They will often arrange their item 
and view

names so that they don't overlap.



How hard is it to plug in different url parsing? It's often something 
people want to do their own way, and as you point out, some people don't 
like the default ;-)


This isn't really URL parsing, it's traversal.  It's easy to plug in
different traversal adapters.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 Glossary on zope.org

2005-12-14 Thread Jim Fulton

Andreas Elvers wrote:

Hi,

I really think the service stuff should be moved to a place like 
deprecated terms. Is it possible to get editing rights for this wiki 
page ?


Yup.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Get to ZODB root from global utility

2005-12-14 Thread Jim Fulton

John Smith wrote:

Hi,

Does anyone know if there any way to get to the main
ZODB root of the site other than using
zope.app.zapi.getRoot(someObject)?

Here is the background. I want to programatically
create new folders underneath the Zope root, according
to some external source which my zope instance polls
periodically.

I have made a global utility what spawns a worker
thread which creates the folder objects. My problem is
I don't seem to be able to work out how to get hold of
the Zope root as I have not get any context.


Each database defined in zope.conf is registered as
a ZODB.interfaces.IDatabase with the name given in
zope.conf.  If you you have only one database and it
doesn't have a name, then you should be able to look
up the utility without supplying a name.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Get to ZODB root from global utility

2005-12-14 Thread Jim Fulton

John Smith wrote:

Dear Jim,

I was unable to import IDatabase from ZODB.interfaces,
although I could import IDataManager and IConnection.

However, when I tried:

root = zapi.getUtility(IDataManager)

I got a componentlookuperror. (The same error happens
with IConnection).


Did you try IBuddy? ;)


Any thoughts?


I'm guessing that you are using Zope 3.0.
The registration of databases as utilities wasn't added
until 3.1.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html

2005-12-13 Thread Jim Fulton

Stephan Richter wrote:

On Tuesday 13 December 2005 08:02, Andreas Elvers wrote:


what the rationale of @@ anyway ? I've searched for a definition for
this in the Developer Handbook and elsewhere but it's hard to search
for @@ and view.

For insight or pointer to documentation or source to this matter I'd be
very happy.



It is a shortcut for the ++view++ namespace. @@ looks like two eyes. ;-)


More importantly:

- It is short

- It doesn't have any English words in it

This is the most likely place where name spaces might appear
in public URLs, so I wanted to make them as unobtrusive as
possible. (If you work hard, you can avoid them altogether,
but I don't expect most people to work that hard.)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html

2005-12-13 Thread Jim Fulton

Jeff Rush wrote:

Frank Burkhardt wrote:



On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote:


what the rationale of @@ anyway ? I've searched for a definition for
this in the Developer Handbook and elsewhere but it's hard to search
for @@ and view.



@@ marks a given path component explicitely as a view of the previous 
object.


Example:

http://zopeserver/contents.html
Could mean either The object named 'contents.html' in the root 
folder or

(if there is no such object) The 'contents.html' view (List of contained
objects) of the root folder - the object is preferred.

http://zopeserver/@@contents.html

Will always display the list of contained objects of the root folder - 
no matter

if there's a object 'contents.html' or not.



Hmm, but the '@@' is optional, as I can leave it off and still get the 
contents.html view if there is no object named contents.html in that 
folder.


This would seem to confuse developers, as if there IS an accidental 
collision of an item name with a view that is unknown to the developer, 
it will return the view out of nowhere.


No, it will return the view.


Shouldn't the '@@' should be *required* on views to avoid this ambiguity?


This is a matter of policy. It is straightforward to change. Many people hate
@@ and the ++view++name syntax.  They will often arrange their item and view
names so that they don't overlap.

It might be nice to have easily-configured alternate policies.  For example:

- require @@, as you suggest

- log a warning, or possible raise an error in development mode, if, when you
  get an item, you also find a view with the same name.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Adapting a builtin?

2005-12-07 Thread Jim Fulton

It is valid both to:

- Declare an interface for a built-in type and
  register adapters for that interface, and to

- Register adapters for builtin types directly.

I can't promise that this works now, but it ought to work.
I'm 90% sure that it does in fact work, at least in Zope 3.

Jim

Roger Ineichen wrote:

Hi Jim,
can you confirm that this is a valid concept for 
the adapter registry or do we get trouble in the future?


I didn't find any sample in the README.txt files about adapting
builtin strings like a principal_id).


Hi Michael and Mac



-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Howitz

Sent: Wednesday, December 07, 2005 8:59 AM
To: Paul Winkler
Cc: zope3-users@zope.org
Subject: Re: [Zope3-Users] Adapting a builtin?

On Tue, 2005-12-06 at 18:44 -0500, Paul Winkler wrote:


Hi,

Is it possible to register an adapter for a builtin type
such as str?  All the adapter examples I see use an 


interface for the


for attribute.

Something like:

 adapter for=str
   provides=.interfaces.IHTTPConnection
   factory=httplib.HTTPConnection
 /


Hi,

in plain Zope3 (I'm not using Five, but it may be similar there.) you
can declare an interface for the buitin: (e.g. in interfaces.py)

class interface IStr(Interface):
  # define the methods here which you need to access
  def upper():
  upper ... as an example

In configure.zcml, you declare the interface for the builtin:

class class=str
  implements interface=.interfaces.IStr /
/class

adapter
  for=.interfaces.IStr
  provides=.interfaces.IHTTPConnection
  factory=httplib.HTTPConnection
  /

Then you can do:
 IHTTPConnection('string') to get the adapter.

HTH,
mac



That's a interesting question. I do it also, but in a different 
way. It works for me like this and the adapter registry and 
persistence work well.


--
class PrincipalMessagesForPrincipalId(BaseMessages):
Base implementation for principal annotation based messages.

adapts(IAttributeAnnotatable, str)

implements(IPrincipalMessages)

messageQueueKey = 'PrincipalMessages'

def __init__(self, context, principalId):
Initialize with a context.
self.context = context
self.principalId = principalId

--

With adapts() and implements() you can use a simply registration
like:

--
  adapter factory=.adapters.PrincipalMessagesForPrincipalId /
--

Regards
Roger Ineichen

Projekt01 GmbH
www.projekt01.ch
_
END OF MESSAGE  


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Generations - a missed use case? (Evolving an application for the first time)

2005-11-20 Thread Jim Fulton
 this and perform some appropriate
action.  Note too that an application that needs to catch up from
an unmanaged generation to a current generation might prefer to
provide a direct conversion, rather than taking intermediate steps.
Assuming that the best way to catch up is by running all evolution scripts
from (before) the beggining is guessing too much.

In summary, I think that the installation script is the right way to
handle this situation.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] make check

2005-10-27 Thread Jim Fulton

Sorry, where are you looking at this.

In the release, the permissions are correct.

In an installation created with Python 2.4, the bits are not.

What version of Python are you using?

Jim

Paul Dumais wrote:

Sent this using the wrong  account:

On 10/26/05, Paul Dumais [EMAIL PROTECTED] wrote:


Hi Jim,

The execute bit seems OK:

-rwxr-xr-x  1 root root59 2005-10-02 12:48 donothing.sh

I get more errors if I run as root (the above one included). Ubuntu
does something tricky to the root account so that you cannot su root.
You have to sudo 'command' to do root tasks. I suspect this difference
is why I get more errors when I do sudo make check.

Since I am running make check as a user on the system, I though I
would try chown 'user' donothing.sh. Doing this gives the same error
when I run 'make check'.

I guess this begs the question: should I be looking to chown 'user' a
bunch of files and directories (since I plan to run everything as a
user)? Should I be looking to get rid of the su  root lockout feature
of Ubuntu? Hopefully none of this should be necessary since my 'user'
is a superuser.

I guess this is not a major problem, since Steve is safely ignoring
the error. Thanks for the quick replies! I read some posts from August
that mentioned that it may just be an issue of a slower machine (my
machine has a few other processes running on it). Increasing the error
threshold to something higher may be what's needed?

Paul


On 10/26/05, Jim Fulton [EMAIL PROTECTED] wrote:


Jim Fulton wrote:


Stephan Richter wrote:



On Wednesday 26 October 2005 16:26, Jim Fulton wrote:



AssertionError: spawned process failed to start in a minute

Is this serious? How could I get this test to pass?



Don't run the tests as root.




I see this error sporatically using a non-root user as well. I just
never worry about it. :-)



Right.  This is not what I thought it was.

This is something that I diagnosed and thought I fixed
a few weeks ago.

I'll look at it.


OK, Tim helped me remember what was going on with this.

I predict you can make this test pass by setting the execute bit on
the script donothing.sh in zdaemon/tests in the installation.
This test is trying to execute this script and can't because the
execute bits got cleared in the release process.

The test really should be rewritten to write the shell script itself
and set the permissions to whatever it wants.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: [Zope3-dev] Freeze approaching quickly

2005-10-27 Thread Jim Fulton

Julien Anguenot wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephan Richter wrote:

with October winding down, the freeze on the trunk is coming quickly. So, if 
you have any outstanding work, now is the time to get it done. During the 
last week I have monitored the proposals and branches a bit and I think most 
people are done with their work. 


[...]


Did I miss anyone? Now is the time to speak up!



yes, I'd like to see the Better XML support for PT proposal as well :

http://svn.zope.org/Zope3/branches/fdrake-anguenot_better_xml_support_for_pt/
http://www.zope.org/DevHome/Wikis/DevSite/Projects/ComponentArchitecture/BetterXMLSupportForPageTemplates

I'll take time to finish the remaining issues around this in the
following days and we'll be able to discuss it after this.

Is it ok for everybody ?


I think this is too risky for this release:

1. This change seems to be pretty controversial.  There is a lot of
   fear that this will cause browser compatability problems.  I think
   this fear can only be addressed by an alpha release and it's too
   late for that for the december Zope releases.

2. I get the impression from talking to Fred that there is still a lot
   of work required to land this and that a significant amount of
   his time would likely be required.   I'm worrid that this could
   be a major source of instability and I think we have enough of
   those already.

I suggest the following:

- You keep working on your branch and get it to the point that it is
  *stable* and ready to merge.

- Soon after the 3.2 release branch is made in early November, you
  merge your stable branch to the trunk and we'll make a 3.3 alpha release
  that people can use to try out this change.  We'll let it be known
  that the change will be included in 3.3 unless people discover serious
  client-compatibility problems created by the change.  You could use this
  release or the trunk for your xmlforms experiments.

Jim


--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] make check

2005-10-26 Thread Jim Fulton

Paul Dumais wrote:

Hi all,

I have one error:

Ran 6991 tests in 333.025s

FAILED (failures=1)

when doing make check on a Zope-3.1.0 build on Ubuntu Linux. In short it is:

Failure in test testRunIgnoresParentSignals (zdaemon.tests.testzdrun.ZDaemonTest
s)
Traceback (most recent call last):
  File /usr/lib/python2.4/unittest.py, line 260, in run
testMethod()
  File /home/paul/Zope-3.1.0/build/lib.linux-i686-2.4/zdaemon/tests/testzdrun.p
y, line 237, in testRunIgnoresParentSignals
self.assert_(is_started, spawned process failed to start in a minute)
  File /usr/lib/python2.4/unittest.py, line 309, in failUnless
if not expr: raise self.failureException, msg
AssertionError: spawned process failed to start in a minute

Is this serious? How could I get this test to pass?


Don't run the tests as root.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] object has no attribute '_SampleContainer__data'

2005-10-04 Thread Jim Fulton

Tom Dossis wrote:

Leticia Larrosa wrote:

When a try to see the view of list of Service of one of the 
ServiceList

I get the following error:


'Service' object has no attribute '_SampleContainer__data'


I'm newcomer in zope 3 and any idea will be appreciated.
Thanks in advance.

Leticia Larrosa



In addition to the previous reply; I experienced the above problem when..

I implementend a simple subclass of SampleContainer, then changed to 
subclass BTreeContainer, but forget to delete existing instances created 
in Zope.  A tell tale sign is you can no longer delete the broken 
instance(s)


This sounds like a bug.  Could you report this with a specific example?

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] querying the catalog

2005-10-03 Thread Jim Fulton

Duncan McGreggor wrote:


On Sep 30, 2005, at 11:31 PM, Alen Stanisic wrote:


Not sure if it will help but whenever I had to look up a catalog I would
only do zapi.getUtility(ICatalog) and I noticed you are also providing a
name and context.



Yeah, with or without the extra parameters, it always only returns the 
root catalog instance.



I also believe that if you are looking up a catalog by name as you seem
to be doing it is not enought for the catalog object to be named
accumac_catalog but you also have to register it as the name ('Register
As' field in New Utility Registration) during catalog creation.  I
usually leave 'Register As' blank as I only ever needed to get catalog
by ICatalog interface only - zapi.getUtility(ICatalog)



When I created it, I set register as to accumac_catalog. Based on 
the experience you shared, I deleted my catalog and did not give it a 
name upon creation. zapi.getUtility(ICatalog) now works, as it gets the 
sub-site's catalog in the accumac/++etc++site/default directory.


Very strange. If I understood this more, or if there was expert-aided 
interest, I would troubleshoot this. It may not be a bug, but there at 
least seem to be issues of an anti-intuitive nature here...


Alen, thanks again for your assistance in this matter :-)


I suspect there was a problem of some sort with your original registration.
We normally use named local catalogs and haven't had a problem.

BTW, you should not pass the context argument to the component-lookup
functions *unless* you want to find a component in a different site.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] svn problem

2005-08-01 Thread Jim Fulton

Leticia Larrosa wrote:

Thanks to Jim.
I try whith 
svn://svn.zope.org/repos/main/Zope3/branches/ZopeX3-3.0/src/zwiki too, but 
get the error:

svn: Can't connect to host 'svn.zope.org': Connection timed out

You can connect without problem?


Yup


Any have an idea about why get this error?


Nope, sorry.

Jim
--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 Product directory Problem

2005-07-15 Thread Jim Fulton

Chris Withers wrote:

And I'm pretty sure that Zope 3 needs Python 2.4 ;-)


No, Zope 3 works with Python 2.3.  Some add-ons might require 2.4.

Of course, Plone doesn't work with Zope 3.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] missing_value for Text fields

2005-06-29 Thread Jim Fulton

Andreas Reuleaux wrote:

missing_values for Text fields don't work for me (complete example
show below): The autogenerated add form is usable for me only

  * if I either make boom a TextLine instead of Text

  boom=TextLine(

title=u'Boom',
required=False,
missing_value=u'')

  * or if I drop the missing_value param

  boom=Text(
title=u'Boom',
required=False)

However, the combination Text field with missing_value (as in the
example below) causes some garbage html (the rest of the form:
morestuff) to be put in the textarea field for boom when I try to add
a foo object.


This is a bug.  Please submit it to the collector:

  http://www.zope.org/Collectors/Zope3-dev

Thanks.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] suppress menu item with zcml?

2005-06-23 Thread Jim Fulton

Dylan Reinhardt wrote:

Is there a simple/correct way to suppress a menu item using ZCML?

For example, I have a content type that implements
IAttributeAnnotatable and I want to suppress display of the Metadata
tab in zmi_views.

I expected this would work:


  menuItem
  for=foo.interfaces.IFoo
  menu=zmi_views
  title=Metadata
  action=EditMetaData.html
  filter=python:0
  /
__


This is the normal way to do it yes.


When my content interface *inherits* from an interface, this seems to
work... but when my class *implements* an interface, this appears not
to.


I don't know what you mean.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


  1   2   >