Re: [Zope3-Users] So, there is going to be no Zope4... how to handle maintenance a couple of years from now?

2014-09-07 Thread Jim Fulton
On Sun, Sep 7, 2014 at 4:44 AM, Milind Khadilkar  wrote:
> Thanks, Thierry.
> I think the real problem with ZCA and ZCML is "bad press". We did not face
> any ZCML problem when we worked on the Zope3 projects. It was later,
> thankfully, that we came across the negative opinion. ZCA did require a
> mindset change for some, but more often than not it has helped them in their
> future work on other platforms too.
> But that was 10 years ago... Don't know about now.

I'm proud of the ZCA in many ways, but:

- ZCA was designed for problems that most people don't or shouldn't have,
  which is making a complex application pluggable.

  If your application is complex, that's a problem

  http://legacy.python.org/dev/peps/pep-0020/

- In the Zope 3 project, we used the CA way more than we should
  have. Initially, this was to prove that we could.  Once we were
  convinced that every (damn) thing could be pluggable we should
  have stopped and simplified, using the ZCA only where needed.
  Instead, we'd established a culture of crazy levels of indirection.

- Outrageous indirection in the base system made starting new projects
  either super difficult, an exercise in cargo-cult-programming, or both.

  I've come to the conclusion that any framework that requires or
  encourages its users to use project-templates or project-setup
  wizards isn't something I want to use.

I stopped using Zope 3 several years ago when I realized that the
weight of the framework wasn't justified by it's benefits, at least for
me.

I've decided that I'd rather use decoupled frameworks that, ideally,
are simple to learn and use individually.  That's why I use bobo now,
http://bobo.digicool.com. A more conventional choice along the same
lines would be Flask, although I think bobo is simpler. (Of course, I'm
biased. :)

I still use the ZCA, especially zope.event, but in a wildly lighter-weight
fashion than I did in Zope 3.

Part of the reason I prefer simpler server frameworks today is that
Web applications are far more client centered today than they were
when I worked on Zope 2 and even Zope 3.  Today, for applications
(as opposed to content *sites*), UI logic, including templating, mostly
happens on the client, and web servers are largely REST/RPC/Database
servers.

Jim

P.S. If you find the ZCA interesting, you should check out Scala and it's
   implicits and type-level programming. It does many of the same
       things as the ZCA at compile time. It's crazy beautiful and evil all
   at the same time. :)

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope3-users mailing list
Zope3-users@zope.org
https://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] So, there is going to be no Zope4... how to handle maintenance a couple of years from now?

2014-09-07 Thread Jim Fulton
On Sun, Sep 7, 2014 at 5:37 AM, Thierry Florac  wrote:
>
> Hi,
>
> I think ZCA doesn't do "so much more" than implement a few object design
> patterns and provide a very flexible components registry framework.
> I'm working mainly on developing new framework-like packages and I just
> can't work without it except by re-inventing it!
>
> Many users blame ZCML just because it's XML !

As well they should! 0.5 ;)

> But it's just configuration, and separating configuration from
> Python code is one of the greatest benefits of ZCML, mainly while
> working on huge projects. The XML format is just a detail and is
> probably not so worse than many INI-like or text based configuration
> format; and at least it's a de-facto standard.

When I started working on zcml, it used a very light-weight but custom
syntax.  I was talked in to using XML by someone who later complained
about it. :)  I regret not sticking with the lighter weight syntax.

Jim

P.S. ZCML uses a pretty lightweight style of XML, relying more on
   attributes than on nested elements. Ironically/typically I was
   criticized for this by XML purists.

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope3-users mailing list
Zope3-users@zope.org
https://mail.zope.org/mailman/listinfo/zope3-users


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

2010-06-24 Thread Jim Fulton
On Thu, Jun 24, 2010 at 9:14 AM, Thierry Florac  wrote:
> So as processes setup is defined via WSGI, how can I define such a
> "zope.conf" setup with several ZEO clients sharing the same
> configuration file ?

I typically set up sgi apps with paste deploy.  You can use either
repoze.zodbconn or zc.zodbwsgi to configure wsgi ZEO clients with
paste deploy.

> Is there a simple setup so that each process use it's own ZEO cache ??

If you you don't use persistent caches, then each client (process)
will get its own cache automatically.

I'm not aware of any mechanism for managing persistent caches whe
there can be a more or less arbitrary number of forked processes.

Jim

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


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  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] threads, pool size and cache recommendations (quad core)

2009-12-16 Thread Jim Fulton
On Wed, Dec 16, 2009 at 8:26 AM, Roy Mathew  wrote:
> Folks, I am looking for some configuration advice.
> I am running a zope3 application that uses the ZODB. I expect a peak load of
> a 100 concurrent users, and am on a *quad* core Intel Xeon Linux box. Am I
> better off running 2 or 3 ZEO clients talking to the app-server (I am
> assuming that the OS will load balance so that all processors are utilized
> well). Or should I not use ZEO at all, and simply assign a large cache, a
> large connection pool and lots of threads to a single process. I am sure
> that this is an issue many of you have had to contend with. I would
> appreciate some rough idea of what the numbers should be for each of the 2
> scenarios I outline.

Assuming that your application ends up being CPU bound, you should use
4 single-threaded processes. (One per core.)  Python can't (generally) make
use of more than one processor.

If you're not CPU bound, then  you can increase the number of threads until
you are.  That's broad-brush advice. Keep in mind that the more
threads/processes you have, the more  memory you'll use for a given
cache size.  The optimum cache size will depend a lot on your app.

Jim

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


Re: [Zope3-Users] classProvides and inheritance

2009-08-15 Thread Jim Fulton
On Sat, Aug 15, 2009 at 5:06 PM, Iain Duncan wrote:
> On Sat, 2009-08-15 at 16:57 -0400, Jim Fulton wrote:
>> On Sat, Aug 15, 2009 at 4:49 PM, Iain Duncan wrote:
...
> I understood that, I just phrased my question poorly.

np

> So given the
> clarification, is there a straightforward way for me to make it so,

No.

> or
> will I need to make a metaclass that enforces my desired behaviour?

I don't think a meta class would help you.  You would need to
implement an alternative __provides__ descriptor.  At that point,
you'd be depending on an internal implementation detail, but you
wouldn't be the first. :/

Jim

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


Re: [Zope3-Users] classProvides and inheritance

2009-08-15 Thread Jim Fulton
On Sat, Aug 15, 2009 at 4:49 PM, Iain Duncan wrote:
> Hi, I'm new here so please tell me if this is the wrong list.
>
> I have a case where I want a class, ( the class object itself, not an
> instantiated class ) to provide an interface so that a utility look up
> can get me the class itself. This is working ok with:
>
> class IPet(PersistentResource):
>  implements(Pet)
>  classProvides(IResourceClass)
>
> but, all classes that inherit from PersistentResource should provide
> this too,

That's a matter of opinion.

> and this does not get inherited just by using classProvides in
> the definitiation of PersistentResource.
>
> Before I go making metaclasses and stuff, thought I should check if I am
> missing something simple!

No.  Class provides isn't inherited by design.

Jim

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


Re: [Zope3-Users] ZODB and unique values

2009-08-04 Thread Jim Fulton
On Mon, Aug 3, 2009 at 9:09 PM, Gary Poster wrote:
>
> On Aug 3, 2009, at 3:00 PM, Gustavo Rahal wrote:
...
> Practically, using the BTrees that the ZODB provides will typically
> have the behavior you want for the first and third gotcha.  For the
> second gotcha, we typically give each connection to the ZODB its own
> random starting point stored on a volatile (disposable) attribute for
> the index, and each connection increments that point.  Look at the
> code in zope.intid, for instance: _generateId in 
> http://svn.zope.org/zope.intid/trunk/src/zope/intid/__init__.py?rev=100049&view=auto


Gustavo,

Note that a simpler variation on this is to assign the values
randomly.  Assigning them sequentially from a random starting point is
an optimization to reduce the number of BTree nodes read and updated
by a particular client.

Jim



-- 
Jim Fulton
___
Zope3-users mailing list
Zope3-users@zope.org
http://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 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] 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 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] 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] "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] 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] Authentication without cookies

2008-04-14 Thread Jim Fulton
All you need to do is to get non-cookie based sessions, and then you  
can use the existing session-authentication machinery.


Look at the client id framework in zope.session, 
http://svn.zope.org/zope.session/trunk/src/zope/session/http.py?view=auto

I assume you "just" need to implement a URL client id manager.  (BTW,  
I would leverage the namespace machinery, so you'd end up with URLs  
with http://foo.com/++session++42/foo/bar.)


I'm sure if you come up with anything, others would be interested. :)

Jim

On Apr 14, 2008, at 12:47 PM, Hermann Himmelbauer wrote:

Hi,
I'm developing a Zope3-based application which is used on mobile  
phones. The

problem here is that cookies don't always work with mobile browsers.
Therefore it seems, the way to go is to put a session key in the URL.

Therefore I need some authentication system that first tries to set  
a cookie,
and if it does not work, inserts somehow a key into every URL,  
whereas a

credentials plugin retrieves this key.

However, I assume I'm not the only one with such a scenario,  
therefore I'd

like to know if somebody solved this problem already?

If not, is there some suggested scenario how to find out if the  
browser

supports cookies?

Best Regards,
Hermann

--
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
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] 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


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 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


[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


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

2008-04-04 Thread Jim Fulton


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.


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-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-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 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-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.





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] 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: 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-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: [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] Dynamic __providedBy__

2008-02-15 Thread Jim Fulton


On Feb 14, 2008, at 6:22 PM, Martin Aspeli wrote:


Hi!

I may have a use case where I need an instance to provide marker
interfaces dynamically. That is, under certain conditions I want the
type to say it provides a particular marker interface, and otherwise  
it

doesn't. It still needs to support the usual by-class and
directly-provided idioms for providing interfaces, including
directlyProvides()/alsoProvides().

Is such a thing possible?


Yes.


Perhaps one could make __providedBy__ a
dynamic property or something?


Yes, although the ability to do so has led to memory leaks in some  
cases.



Or is this a very bad idea?  :)



I think it's a bad idea.  I'm not sure it is a "very" bad idea. :)

This falls in the category of deep magic.  If you can find a way to  
solve your problem that doesn't involve deep magic, I would go with  
that. :)


FWIW, someday, I'm going to look at Python 3 ABCs. It appeared to me  
(the last time I paid attention) that Guido tried to accommodate  
zope.interface ideas to some degree.  It appeared to me at the time  
that it would be possible to provide zope.interface in Python 3  
building on ABCs in a way that preserved the most important semantics  
of zope.interface. I really need to do some prototyping to verify this  
-- but haven't been able to find time.  ABC's wouldn't accommodate  
instance-specific declarations.  If I could get most of what I want  
within the preferred Python architecture, I *think* I'd be willing to  
give up some of the dynamism we have now.


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


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] Zope eggification - impressions

2008-02-05 Thread Jim Fulton


On Feb 5, 2008, at 9:49 AM, Hermann Himmelbauer wrote:


Hi,
At first, thanks to the newest Zope-3.4.0c1 release. I just  
installed it from

the tarball and it seems to work.

However, I'm still somehow technically overwhelmed by installing  
Zope3 the
egg-style way - maybe it's not that hard, but I can't really find a  
good
entry point to that topic. It would probably also be a good thing to  
outline
this at the zope.org website (btw., the releases listed there are  
quite old).


For a beginner like me, I'm confronted with a lot of technical (and
complicated) things, where I don't know what I need or what to choose
(buildout, zopeproject, Egg, PyPi, SVN, grok, setuptools etc.), so  
something
like a "Howto install Zope3 the Egg-style way" would be very, very  
handy.



+1

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 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-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 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 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 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 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-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-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] 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] 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 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] 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] 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:


 directory /location/of/directory


- 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] Buildout fails with zope.recipe.egg 1.0.0 vs 1.0.0b6 conflict

2007-11-05 Thread Jim Fulton


Did zopepy previously specify "zc.recipe.egg ==1.0.0b6" as it's recipe?

Does zopepy have an uninstall recipe? I'd be interested in seeing  
your existing .installed.cfg and buildout.cfg.  You can send them to  
me privately. No need to inflict it on everybody else. :)


To work around this, I suggest adding:

  versions = versions

to your buildout section and adding the section:

  [versions]
  zc.recipe.egg = 1.0.0b6

This will force the buiodout to use 1.0.0b6 of zc.recipe.egg.

Jim

On Nov 5, 2007, at 11:24 AM, Derek Richardson wrote:

zc.recipe.egg was released 2 days ago. Now, when trying to re-run a  
buildout that was done before the z.r.e release, I get a  
VersionConflict:


#

[EMAIL PROTECTED] share-it]$ bin/buildout
Develop: '/srv/share-it/quills.remoteblogging'
Develop: '/srv/share-it/quills.core'
Develop: '/srv/share-it/quills.app'
Develop: '/srv/share-it/plone.marquis'
Uninstalling zopepy.
While:
  Installing.
  Uninstalling zopepy.
  Loading recipe 'zc.recipe.egg==1.0.0b6'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:

VersionConflict:
(zc.recipe.egg 1.0.0 (/srv/share-it/eggs/zc.recipe.egg-1.0.0- 
py2.4.egg), Requirement.parse('zc.recipe.egg==1.0.0b6'))


#

I tried to remove the zopepy from the buildout, but it still tried  
to uninstall it and I get the error above. I also tried 'bin/ 
buildout -n' to not get the new egg, but no luck.


I can post my buildout.cfg if it is necessary to debug the problem  
- i.e., other people in a similar situation aren't having the same  
problem. I've pinned all my recipes, so I guess the problem might  
be there - but I thought this is exactly the kind of problem that  
pinning is supposed to solve. :(


Thanks!

Derek

___
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] 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] Re: [Zope3-dev] Known-good-sets problem

2007-10-06 Thread Jim Fulton


On Oct 5, 2007, at 10:45 PM, 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.


Yes

  What if someone wants Zope 3.4 and Twisted version X and Plone  
version Y (just making those up).


That's why the KGS index is a PyPI mirror of all uncontrolled packages.

  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.


The semantics I think we want are kind of tricky. A KGS index needs  
to be authoritative for the projects it controls.  If we looked in  
multiple KGSs, there would need to be semantics for deciding which  
was authoritative.  setuptools lets you define a single index and  
multiple find-link servers.  The highest version found on any server  
is authoritative.  I think supporting multiple KGSs with the right  
semantics would be useful, but there isn't a way to do it in  
setuptools. We can achieve the  same effect on the server.  For  
example, with this software, you could chain several KGSs together.


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:


  level debug

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

  
path STDOUT
formatter zope.exceptions.log.Formatter
  


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 and unreleased eggs in svn

2007-01-28 Thread Jim Fulton

Martin Aspeli wrote:

Hi,


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



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?


I have a zc.buildout recipie that specifies a number of eggs that should 
always be fetched from svn.


I wonder what that should mean.


> These are not (yet) in the cheeseshop.


Is there some way of specifying such eggs, e.g.

[buildout]
parts = ...

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

Of course, that doesn't work :)

I suppose this is somewhat similar to develop-eggs, but (as far as I 
know) these have to be in the src/ directory, and can't be fetched from 
svn and kept up to date automatically. We currently do this with svn 
externals to fetch them into src/ but I'd like to be able to distribute 
a standalone buildout.cfg that could get these eggs.


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 #.

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):


{'Application': , 
'zope.app.generations': 0x1377db0>}




print f1[0].keys()[1]
Rob's buddies
print f1[0].values()[1]

print f1[0].values()[1].__getitem__
>


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] 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] 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 " 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, site-packages and easy_install

2006-10-27 Thread Jim Fulton

Fred Drake wrote:
...

what to do in deployment environment ?
- using zope3 deploment with its very own python interpreter
- you never now when anyone will add another piece to site-packages


Yep.  Every deployment gets a private interpreter.  The system
interpreter can't be trusted since we don't know what patches may be
been installed, or what might change in updates applied by a sysadmin.


Lets not forget: or what might have been left out by the system packager.

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(1<<16)

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] 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(1<<16)

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] 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] Re: Editing a Page on zope.org

2006-08-17 Thread Jim Fulton




On Aug 11, 2006, at 11:34 AM, Philipp von Weitershausen wrote:




FB wrote:

I wrote some some howtos and receipes about Zope3 and would like
a link on

 http://www.zope.org/DevHome/Wikis/DevSite/Projects/ 
ComponentArchitecture/FrontPage


to point to those pages. I got an account for zope.org, I logged  
in but I

don't know how to edit this page. Is this a permission problem?


Yes. This wiki isn't open to everyone with a zope.org account, due to
spam problems in the past I believe.


Yes, but access is pretty easy to get. Just ask me. :)

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-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-19 Thread Jim Fulton


On Jul 19, 2006, at 8:35 AM, David Pratt wrote:


Benji York wrote:

David Pratt wrote:
You are probably right but just the same I'd rather see the  
patched version for z3 also since I am certain this will become  
less obvious over time if it is left the way it is.
Instead of maintaining a fork of docutils, Zope 3 should (and may  
already, I haven't been keeping up with this issue) include tests  
to make sure we're using docutils appropriately.  Best of both  
worlds: we have continued assurance we don't regress, and we don't  
have to maintain a fork/patches.


Hi Benji. Fair enough. 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. Many thanks.


Docutils already provides such a document.  It's there documenation.   
Whoever made reST available TTW didn't read it.  Providing another  
document that people won't read  won't help the situation.  Whenever  
we reuse 3rd-party code or write, we need be aware of security issues.


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


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

2006-07-08 Thread Jim Fulton
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.


The recent hotfix:

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

addresses the problem for Zope 2.

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.  If you are  
using a Zope 3 checkout, these packages are currently included and  
enabled.  I plan to remove these packages from the Zope 3 repository  
tree within the next few hours.  If you are using a checkout-based  
Zope 3 installation that exposes these packages to untrusted users,  
you are strongly urged to disable these packages by removing the  
following files from your package-includes directory:


  zwiki-configure.zcml
  bugtracker-configure.zcml

Removing these files will also avoid problems when you update your  
checkout later, as these will refer to non-existent 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


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-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-22 Thread Jim Fulton


On Jun 22, 2006, at 2:35 AM, Chris Withers wrote:


Jim Fulton wrote:

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


Does Zope 3 still have the idea of "one big tree" of object with  
path-like unique identifiers? If so, then mounting will probably  
still be very useful...


The default Zope 3 configurations still organizes objects into a tree.

Path identifiers are no longer used.

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-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: 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: 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] Re: Zope 3 Capacities

2006-01-22 Thread Jim Fulton

Jeff Rush wrote:
...
I've always wondered why ZODB didn't offer an option of storing the 
object index in a BTREE, but I guess its the performance issue of 
potential additional disk accesses.


This was one of the benefits of the Berkeley DB storage.  Sadly,
we put a lot of work into the BDB storage and people didn't seem
to care that much.  That, and the grief we got from Berkeley DB
itself made us drop the effort.  I do still think it has a lot
of potential.

We could make the file-storage index management more sophisticated,
but I'd really rather find something like the Berkeley database that
we could build on.

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] Zope 3 Ready for Production? Really?

2006-01-14 Thread Jim Fulton

Stephan Richter wrote:

On Saturday 14 January 2006 12:27, David Johnson wrote:


It has been claimed that Zope 3 is ready for production.  I would like to
politely disagree, and maybe even suggest that the claim be remoked.  I
feel bad for people who want to use Zope 3, later finding out that they
cannot do what they want, or putting up sites which are unstable, and
giving the project a bad reputation.  Overall, it's really just a standards
thing.



Okay, so that's you opinion. Several companies use Zoep 3 very successfully in 
production, so they clearly have a different opinion. I doubt that you can 
change the developers' minds about that.


To be fair, "ready for producton" is not exactly crisp.  People with sufficient
knowledge are running it in production, and therefore it's fair to say it is 
ready.
It is still a new and somewhat immature system.

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-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] 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


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)
---  ---
  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] 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


[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 
(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] 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


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] 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


[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


  1   2   >