Re: [Zope3-dev] z3c.widget(.tiny) widget available to easy_install anywhere?

2007-04-20 Thread Sidnei da Silva

P.S. Visibility of Zope 3 extensions would be increased greatly if we
could have an overview page per extension on zope.org somewhere. It
would of course include the canonical download link as well. I think we
can accomplish this relatively quickly with a fairly low-tech project,
but we need a volunteer. Anyone?


Sort of like cheeseshop? BTW, why aren't the Zope packages on
cheeseshop to start with?

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3.4, eggs and windows

2007-04-21 Thread Sidnei da Silva

On 4/21/07, Martijn Faassen <[EMAIL PROTECTED]> wrote:

It is therefore important that binary Windows
eggs are indeed available for the appropriate Zope 3 and ZODB packages.
Is there a plan for providing these? I'm hoping Sidnei will pop up and
say, oh, yeah, all taken care of. :)


Jim has been building eggs for Windows himself. So, yeah, all taken
care of I guess. :)

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: AW: relying on win32api in windows support ofzc.zope3recipes

2007-08-17 Thread Sidnei da Silva
On 8/17/07, Martijn Faassen <[EMAIL PROTECTED]> wrote:
> I am fine with requiring win32api, though it'd be better if it were
> indeed installable from the python package index. Otherwise you need to
> tell people to install two things (Python and win32api) instead of one
> thing on Windows in order to be able to install Zope 3. Who will
> volunteer to bug Mark Hammond? Perhaps Sidnei can, he's a Windows native. :)

I would say pywin32 is a requirement for anyone that wants to do
anything useful on Windows.

If an egg is the only way to install dependencies, then I would say
that buildout needs more work. From what I understand it would be
extremely hard to eggify pywin32.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: AW: relying on win32api in windows support ofzc.zope3recipes

2007-08-17 Thread Sidnei da Silva
On 8/17/07, Martijn Faassen <[EMAIL PROTECTED]> wrote:
> > If an egg is the only way to install dependencies, then I would say
> > that buildout needs more work. From what I understand it would be
> > extremely hard to eggify pywin32.
>
> It's not the only way, but it's definitely the preferred way. A
> click-through windows installer is definitely *not* the preferred way.

My guess is that you don't have much of a clue about how distutils
work, more below. :)

> Is there way to install pywin32 by grabbing some .dlls online and them
> in the right place? (wherever that would be, I guess we'd have a
> custom part). We can write a recipe that does that.

PyWin32 does use distutils, but it has a ton custom code. I haven't
tried to build an egg, but my guess is that it might work
out-of-the-box actually.

As for the result of distutils 'bdist_wininst' which is what PyWin32
and many other things out there that provide a installer for Windows
use, it is basically a ZIP file with a executable header, just like
those self-extracting files created by WinZip and similar apps. So you
can unzip the PyWin32 installer and copy the binary files and .py
files to the right locations, then it should Just Work (TM).

> Why is it extremely hard to eggify pywin32? I guess it doesn't use
> distutils? If it's such a useful if not essential requirement on
> windows, why doesn't it work with the python installation
> infrastructure?

The python installation infrastructure is still distutils, not eggs.

PyWin32 creates entries in the Start Menu for the documentation and
PythonWin for example. I don't think that would work with eggs. But in
the case of just getting the binaries in place, then an egg might
actually be feasible.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Splitting 'Signals' into an egg?

2007-10-04 Thread Sidnei da Silva
Not sure what Zope 3 is using these days (haven't checked), but Zope 2
had a 'Signals' package that handled signaling events on both Windows
and *nix in a somewhat transparent way. Has anyone thought of
packaging that as an egg?

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] psycopgda egg

2007-10-10 Thread Sidnei da Silva
Has anyone eggified psycopgda? I can't find mention of an egg for it
anywere. I would be pretty surprised that no-one did this so far.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Better default namechooser

2007-10-11 Thread Sidnei da Silva
On 10/11/07, Christian Zagrodnick <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I constantly run into the fact that the default namechooser in Zope 3
> is too dumb.
>
> Does anybody object in making it a little more smart? That is:
>
> * replace all non us-ascii and otherwise harmful chars by something
> useful (base-form or alike)
> * replace spaces by - or _

I suggest looking (and using!) at plone.i18n.normalizer, just an
'easy_install' away:

http://api.plone.org/Plone/3.0/public/src/plone.i18n/plone/i18n/plone.i18n.normalizer.tests.test_normalizer-module.html

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] MANIFEST.in and .svn files

2005-03-31 Thread Sidnei da Silva
On Thu, Mar 31, 2005 at 01:27:58PM -0500, Andy Dustman wrote:
| It seems to me that MANIFEST.in should have a line like this:
| 
| exclude .svn

It's actually not MANIFEST.in, but the crawler in setup.py. I fixed it
in Zope2 but forgot to fix in Zope3. Will be checkin in a fix in a few
minutes.

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

After 14 non-maintainer releases, I'm the S-Lang non-maintainer.
-- Ray Dassen
___
Zope3-dev mailing list
[EMAIL PROTECTED]
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/branches/srichter-twisted-integration/

2005-04-14 Thread Sidnei da Silva
On Thu, Apr 14, 2005 at 01:22:53PM -0400, Stephan Richter wrote:
| On Thursday 14 April 2005 13:00, Florent Guillaume wrote:
| > > +    def __init__(self, stream):
| > > +        self.stream = stream
| > > +        self.cacheStream = cStringIO.StringIO()
| >
| > Won't a memory cache be a problem for multi-megabytes POSTs ?
| 
| Maybe, but we have no choice here. The only other option is to make it a 
| temporary file.

Maybe!?! Please, give it some thought. It has caused lots of pain in
Zope 2, which just recently got fixed. That means a 'temp hack' can
live as much as 8 (?) years.

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

 how are the jails in israel?
 well, the one I was in was pretty nice
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/branches/srichter-twisted-integration/

2005-04-14 Thread Sidnei da Silva
On Thu, Apr 14, 2005 at 02:04:06PM -0400, Stephan Richter wrote:
| Any constructive input? Will a temporary file be better? Will it work easily 
| cross-platform? How was this solved in Zope 2?

So, in Zope 2, what we did recently was to introduce a LARGE_FILE_THRESHOLD
ZConfig variable. If the file is larger than that, we use a temporary
file. I don't see a reason for a temporaryfile (using the module
tempfile?) not be cross-platform. Certainly Tim would know if there's
any issue.

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

Little known fact about Middle Earth: The Hobbits had a very sophisticated
computer network!  It was a Tolkien Ring...
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Zope3-dev collector notifications ?

2005-05-24 Thread Sidnei da Silva
| - -10 for Bugzilla;  it has got to be the most unfriendly developer tool I
| have ever used, and it is a nightmare to admin, as well.

C'mon is not that bad. It has improved a *whole lot* in the last 6 months.

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

I cannot conceive that anybody will require multiplications at the rate
of 40,000 or even 4,000 per hour ...
-- F. H. Wales (1936)
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Making Zope3 more (newbie) developer friendly

2005-05-31 Thread Sidnei da Silva
On Tue, May 31, 2005 at 09:05:42AM -0600, Shane Hathaway wrote:
| > I had started a similar editor using a Web UI. It was very functional and 
did 
| > all the hard parts already. I only had some wizard-like functionality left 
to 
| > do. I could send you the code, if you want.
| 
| Thanks, but I think a GUI environment is going to be much more
| comfortable for both development and users.

Shane,

I would like to try out making a PyGTK frontend as well. Would be a
nice challenge to make the code as independent of the UI as possible.

Do you have any code right now or only plans?

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

 I created it. but I'm not *responsible* :)
 it started lurching around by itself..
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Making Zope3 more (newbie) developer friendly

2005-05-31 Thread Sidnei da Silva
On Tue, May 31, 2005 at 09:37:32AM -0600, Shane Hathaway wrote:
| I have only GUI code so far, because in this project, I want the UI to
| drive the requirements.  I'm thinking about the code behind it now.

Ok. What are you using for drawing the UI? I just googled for wxGlade
but it seems like it just generates code and doesn't save in glade's
xml format (which would allow for sharing the UI design between
wxpython and pygtk).

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

 Java is the tell me when I've been bad language ;)
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Interviews with people involved in Zope 3 projects

2005-06-02 Thread Sidnei da Silva
On Wed, Jun 01, 2005 at 09:11:40AM -0400, Stephan Richter wrote:
| Hello everyone,

Hi,

We should be making a release of our Zope3+SQLObject application which
was finished humm, last year *wink*. It's just a matter of merging a
branch and cutting a tarball, really.

Also, here's a Press Release about Oxfam America, the first real-life
(and tsunami-proven :) Five deployment, which went live less than two
weeks before the tsunami hit asia last December. It stood bravely up
taking the equivalent of 1/3 of a year's traffic in the course of ten
days after the disaster.

http://www.enfoldsystems.com/About/News/oxfam

We can provide more specific details about it if needed.

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

Q: What's the big deal about rm, I have been deleting stuff for years?  And 
   never lost anything.. oops!
A: ...
-- From the Frequently Unasked Questions
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] DAV locking

2005-06-04 Thread Sidnei da Silva
On Sat, Jun 04, 2005 at 09:46:39AM -0400, Jim Fulton wrote:
| 
| A few months ago, we gained a locking framework.  We still need to provide
| a DAV interface to it.  Are there any DAV-knowledgeable volunteers that can 
| do this
| quickly?  It would allow us to include external editor in the 3.1 release.

Me! Me! :)

- Are there examples of using the locking framework?
- What's the deadline for this?

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

* vegai wears his reading bra.
 umm, I mean glasses
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] DAV locking

2005-06-05 Thread Sidnei da Silva
On Sun, Jun 05, 2005 at 10:08:40AM -0400, Jim Fulton wrote:
| >No, that would be a feature. So we either have the choice of waiting a 
| >week or making an alpha release. I am for the first option, since I would 
| >like to have all packages included in the release.
| 
| +1

Sorry, it won't be possible for me to work on it this week, we are
starting new projects. With some luck I can do it on my free time, but
can't promise anything.

-- 
Sidnei da Silva <[EMAIL PROTECTED]>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

Mais feio que indigest�de torresmo.
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: XML header and TAL interpretor

2005-09-01 Thread Sidnei da Silva
On Thu, Sep 01, 2005 at 11:56:59AM -0400, Derrick Hudson wrote:
| The ZPT processor/renderer shouldn't dictate this as it is clear that
| ZPTs can be used to create a wide variety of types of content.
| 
| I think the content-type sent to the browser should be controlled by
| the  directive.  The HTTP content-type is really part of
| the browser interaction and not necessarily part of the template
| processing.   could default to text/html or text/xml or
| whatever people decide is the most commonly desired type and include
| an attribute to override it.
| 
| Hypothetically speaking, because I don't have any relevant experience
| to support this, a different type of view may want to use the same ZPT
| with a different content-type.  Maybe the XML-RPC or WebDAV publishers
| have different constraints and want to send application/xhtml+xml for
| a given template while the browser publisher must degrade it to
| text/html for IE.

That smells to me like we need a mime-type negotiator or something,
pretty much like we have a language negotiator for deciding which
language to use for translations.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com


signature.asc
Description: Digital signature
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] [Fwd: Mail delivery failed: returning message to sender]

2005-09-06 Thread Sidnei da Silva
On Tue, Sep 06, 2005 at 09:08:02AM +0100, Chris Withers wrote:
| Sidnei appears to be broken :-(
| 
| Any idea how to reach him?

Odd. I've been receiving email normally.

| Sidnei da Silva wrote:
| > 
| > That smells to me like we need a mime-type negotiator or something,
| > pretty much like we have a language negotiator for deciding which
| > language to use for translations.
| 
| No really, all this thread seems to have really uncovered so far is that 
| macros in different ZPT modes are currently reported as incompatible.

Correct, but the mime-type issue is a real issue too.

| Are they really? Should they be?
| 
| mime-type negotiation and the like seems like an app level thing, or at 
| the very least the responsibility of a different component. Page 
| Templates should be kept as clean and simple as possible, that way 
| they'll be much mroe generically useful...

Yes, it's an app-level thing. I've never said in my email that it
should be at the page template level.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Sidnei da Silva
On Mon, Dec 05, 2005 at 01:24:54PM -0500, Paul Winkler wrote:
| On Mon, Dec 05, 2005 at 11:13:31AM -0500, Jim Fulton wrote:
| > BTW, your implementation also doesn't work because it doesn't
| > set the content length.
| 
| Speaking of which, I'd love to see a way to make this work for
| situations where you can't precompute a correct content length because
| e.g. you're building a lot of data on the fly but you still want to
| start streaming it as early as possible.
| In this case, the HTTP spec says that you should NOT set the
| content-length header but you must close the channel to signal "end of
| data".  Or at least that's what Dieter says it says :-)
| http://mail.zope.org/pipermail/zope/2005-November/162714.html
| 
| Apparently, according to Dieter, Zope 2 doesn't let you use this idiom;
| does zope 3?  (I've very briefly looked at the Zope 2 code in medusa,
| and I can't quite tell if Dieter is correct - there seems to be some
| support for the "chunked" transfer coding, which should do the job, but
| I'm not sure if/how one can currently take advantage of it.)

There are a couple conditions that must be met for 'chunked' to work
with Zope 2.

1. A Content-Length header must not be set.
2. The request must be HTTP 1.1
3. You must be streaming
4. No 'Connection: close' header has been set during the request

If all of that is met, then it works just fine. The signal for 'end of
data' in chunked mode is '0\r\n\r\n', which Zope properly inserts when
appropriate.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Sidnei da Silva
On Mon, Dec 05, 2005 at 01:58:21PM -0500, Paul Winkler wrote:
| On Mon, Dec 05, 2005 at 04:31:03PM -0200, Sidnei da Silva wrote:
| > There are a couple conditions that must be met for 'chunked' to work
| > with Zope 2.
| 
| Cool. Does Z3 behave the same way?

Dunno.

| > 1. A Content-Length header must not be set.
| > 2. The request must be HTTP 1.1
| > 3. You must be streaming
| > 4. No 'Connection: close' header has been set during the request
| 
| Does "be streaming" mean something that isn't covered by the
| other requirements?
| ... hmmm, (reading more code), do you mean that RESPONSE._streaming must
| be true?  Aha, I see that RESPONSE.write() implicitly sets that flag.

That's right.

| > If all of that is met, then it works just fine. The signal for 'end of
| > data' in chunked mode is '0\r\n\r\n', which Zope properly inserts when
| > appropriate.
| 
| OK. Aha, I'm now looking at medusa/producers.py and I see that happens in
| chunked_producer.  
| 
| Thanks for the info.

Np.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Sidnei da Silva
On Tue, Dec 06, 2005 at 08:55:56AM -0500, Jim Fulton wrote:
| Interesting.  I wasn't aware of this in Z2.  Zope 3 definately
| doesn't have this.  Sindnei, have you verified that this actially
| works in Z2?  I didn't think the Zope 2 publisher actually started
| propducing output until the request was finished.

Yes, I can confirm it works like I described. I've been using and
relying on this (where this == chunked response producing output
before the request is finished) on Enfold Desktop for a while.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Twisted Publisher and Zope 2

2005-12-06 Thread Sidnei da Silva
Hi there,

There's a couple of mad brazilian pythoneers that might hang out
together early in January in some hidden beach somewhere, and one of
the proposed tasks for working on (of course, powered by caipirinha)
was to take a stab at replacing Zope 2's ZServer/ZPublisher by Zope
3's Twisted/Publisher.

I know the brave folks involved in the Zope 3 move-away from ZServer
might have some interesting tips to share, so I hereby invite you to
share your experience.

Best I can tell, it should be pretty doable no?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-08 Thread Sidnei da Silva
On Thu, Dec 08, 2005 at 09:38:32AM +, Chris Withers wrote:
| Stephan Richter wrote:
| >I wonder whether a similar approach as the one taken for the Twisted 
| >server migration is possible. There, if you have an instance running on 
| >ZServer an upgrade will not cause the switch to Twisted, since your 
| >startup script still refers to the old server code. You explicitely have 
| >to change your startup script to start using Twisted.
| 
| I think this is the way to go and a zope.conf option would be an ideal 
| way of making the choice...

Just one thing that struck me right now. ZServer uses medusa/asyncore
and twisted has it's own 'main loop'. How do they play together in
Zope 3? Or they dont?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-08 Thread Sidnei da Silva
On Thu, Dec 08, 2005 at 08:18:49AM -0500, Stephan Richter wrote:
| On Thursday 08 December 2005 07:06, Sidnei da Silva wrote:
| > Just one thing that struck me right now. ZServer uses medusa/asyncore
| > and twisted has it's own 'main loop'. How do they play together in
| > Zope 3? Or they dont?
| 
| They don't. Either you use ZServer or you use Twisted, but not both. So if 
you 
| want to use Twisted-specific packages, like the scheduler, you have to use 
| twisted, otherwise you are out of luck. I think this is totally fine.

What's the situation with ZEO then? The ZEO 'zrpc.client' uses
ThreadedAsync.register_loop_callback(), which is a evil monkeypatch to
asyncore. I haven't seen that change recently, so I assume this has
been ignored?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] logout patterns: a small proposal

2005-12-08 Thread Sidnei da Silva
On Thu, Dec 08, 2005 at 10:11:46AM -0500, Gary Poster wrote:
| There are a surprising number of components in zope.app designed to  
| help with logging out.  They are all trying to solve the problem that  
| some authentication can't log out, so you shouldn't show logout links  
| then.
| 
| I only care about the pluggable auth in zope.app.authentication.   
| Therefore what I want is a way to determine whether the credentials  
| plugin used supports logout.  I want this to be dynamic, responding  
| to TTW configuration of the pluggable auth, which the current  
| zope.app solutions are not.
| 
| Jim suggested that a subscriber to principal creation event might  
| scribble an attribute on the (transient) principal object that  
| indicated that the credentials plugin used to create the principal  
| supported logout.  This would be easy to do, light-weight, robust  
| (i.e., even in the face of multiple active credentials plugins),  
| something that I could do without committing the zope project to the  
| solution, and easy to use (my tal could do something like  
| """tal:condition="request/principal/canLogout|nothing""").
| 
| The problem is that the principal creation event does not include the  
| credentials plugin used by the authentication.
| 
| The easiest way to approach this, given the current pluggable auth  
| design, is to add a 'credentialsPlugin' attribute on the info object  
| passed to the principal creation factory.  The 'credentialsPlugin'  
| attribute would have a reference to the credentialsPlugin used, and  
| would be assigned by the authentication utility.  This is a solution  
| because the event fired already includes the info object.
| 
| Pros:
| - It enables a more dynamic and much simpler story for determining  
| whether an app can support logging out than the current pertinent  
| zope.app code (as long as you only use pluggable auth).
| - It's a one-line change to the code itself (not including interface  
| and test changes).  No grand architecture changes.
| - the 'info' object seems to be a reasonable place to add information  
| about the process used to create the principal.
| - It's ignorable, for those that wish to ignore it.
| 
| Cons:
| - This is the only use case I know of for the behavior, so it has a  
| small feel of 'scratch an itch'.  Maybe that's not too bad here.

Sounds good to me.

Only one issue that you should have in mind, and that has bitten me
several times with the Zope 2 PluggableAuthService is the following:

If you use the 'HTTPBasicAuthHelper' for login, that doesn't mean you
can use it for logout. That is specially true if you happen to use the
'CookieAuthHelper', which translates cookie-based credentials to http
basic.

What happens is that it in PAS, if you call logout() it will call all
the 'ICredentialsReset', however if the HTTPBasicHelper happens
to be one of those, it will raise a 'Unauthorized' exception, because
that's how you log someone out using http basic auth, and then two
things happen:

1. The cookie credentials don't get erased because of the Unathorized
2. Any plugins that happened to be enabled for ICredentialsReset won't
   fire.

Hope that helps,

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-12 Thread Sidnei da Silva
On Tue, Dec 06, 2005 at 07:56:00PM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| >Best I can tell, it should be pretty doable no?
| 
| The key is to move to WSGI.  Zope 3's publisher now uses
| WSGI and so does twisted. For HTTP, the Zope 3 pubisher isn't
| based on twisted, it is based on WSGI.  There is twisted-specific
| glue for FTP.

So, if I'm understanding this correctly, we need to turn the Z2
publisher into a WSGI app that can be used with the twisted server?

Should a version of the Z2 ZServer that supports WSGI apps exist?

| The most important project here, IMO, is to rewire Zope 2
| to use the Zope 3 publisher.  And, of course, to update the
| Zope 3 publisher with features from the Zope 2 publisher that
| are missing from the Zope 3 publisher (e.g. streaming).

Yes, this is very important.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-12 Thread Sidnei da Silva
On Mon, Dec 12, 2005 at 07:18:05AM -0500, Jim Fulton wrote:
| We should proceed by getting Z2 and Z3 to use a common
| publisher, presumingly based on the Z3 publisher.  This common
| publisher should:
| 
| - Be well documented and tested.
| 
| - Use WSGI for HTTP
| 
| - Be backward compatible with Both Z2 and Z3
| 
| - Should be highly customizable through components.  This will
|   hopefully allow z2-stype and z3-style publication to coexist in
|   a single app server.
| 
| Again, I expect that the Z3 publisher will be the best starting point.
| 
| Note that the Z3 publication framework splits functionality
| currently provided by the Z2 publisher into a publisher and a
| publication object.  An initial step might be top come up with
| a Z2 publication object that works with the Z3 publisher.

You haven't said anything about the server. I assume this Z3/Z2
publication object hybrid would run with with the Z3 server instead of
the Z2 ZServer.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-12 Thread Sidnei da Silva
On Mon, Dec 12, 2005 at 09:19:39AM -0500, Jim Fulton wrote:
| >| Note that the Z3 publication framework splits functionality
| >| currently provided by the Z2 publisher into a publisher and a
| >| publication object.  An initial step might be top come up with
| >| a Z2 publication object that works with the Z3 publisher.

Here's a status report:

I've started a Z2 publication object in the 'publication-refactor'
branch of Zope 2.

I am not 100% sure this is what you had in mind, but basically i've
broke down the 'publish' method from ZPublisher.Publish into the
methods of IPublication, and it seems to have mapped quite well with
some minor exceptions.

I haven't gotten around to implementing the traverseName method, which
will need some deep surgery on ZPublisher.BaseRequest.

Now, what I have in mind moving forward is to replace the code in
ZPublisher.Publish and ZPublisher.BaseRequest to use the Zope 2
IPublication instead of duplicating code once I'm done with
implementing the interface.

My only fear so far is that there might be some issues with the
request object itself being not 100% backwards compatible, but I think
we can have backwards compatibility implemented as an adapter from the
Zope 3 request to Zope 2 request.

How does that sound?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-12 Thread Sidnei da Silva
Another update:

On Mon, Dec 12, 2005 at 04:18:48PM -0200, Sidnei da Silva wrote:
| I haven't gotten around to implementing the traverseName method, which
| will need some deep surgery on ZPublisher.BaseRequest.

This is done now.

| Now, what I have in mind moving forward is to replace the code in
| ZPublisher.Publish and ZPublisher.BaseRequest to use the Zope 2
| IPublication instead of duplicating code once I'm done with
| implementing the interface.

This is done too.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-12 Thread Sidnei da Silva
On Mon, Dec 12, 2005 at 04:53:11PM -0500, Jim Fulton wrote:
| >I am not 100% sure this is what you had in mind, but basically i've
| >broke down the 'publish' method from ZPublisher.Publish into the
| >methods of IPublication, and it seems to have mapped quite well with
| >some minor exceptions.
| 
| Cool. It should.  IPublication was designed by insoecting all
| the odd hooks in Zope 2.

Yeah, the biggest difference seems to be exception handling from what
I can tell.

| >My only fear so far is that there might be some issues with the
| >request object itself being not 100% backwards compatible, but I think
| >we can have backwards compatibility implemented as an adapter from the
| >Zope 3 request to Zope 2 request.
| 
| Possibly.  Note that the request itself is pluggable.  Zope 3 has a
| notion of request factories.  When you set up a particular server,
| you can specify which request factory is used.  It would be nice though
| of Zope 2 and Zope 3 requests could be handled by the same server
| (host/port).
| 
| Adaptation may be a good way to start, although arranging for the
| adaptation to happen could get interesting.
| 
| It might be better to see if we can come up with a request that provides
| both Z2 and Z3 request APIs, if possible and then start a process of
| deprecation of features we don't want in the future.  This might
| be easier and simpler than adaptation.

Sounds good to me. By quickly looking Zope 3's requests have mostly
the same methods and features from Zope2's. However sems like most
methods were renamed for consistency (eg: supports_retry ->
supportsRetry).

The greatest lacking functionality in Zope 3 seems to be the lack of a
'lazy' namespace, which is used primariliy for the 'SESSION' object in
Zope 2. How do people feel about adding that to Zope 3?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-12 Thread Sidnei da Silva
On Mon, Dec 12, 2005 at 06:25:53PM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| ...
| >Sounds good to me. By quickly looking Zope 3's requests have mostly
| >the same methods and features from Zope2's. However sems like most
| >methods were renamed for consistency (eg: supports_retry ->
| >supportsRetry).
| 
| There are a number of things I can think of off the top of my head:
| 
| - getting request-based URLs.  For example request/URL/1 vs request/URL1

Uh, Zope 3 has the first I guess?

| - Z2's equivalence of item and attribute access :(

Yeah, just stumbled on that.

| - Z2's request.__setitem__, other, and a general tendency to try to
|   colapse namespaces.

:(

| >The greatest lacking functionality in Zope 3 seems to be the lack of a
| >'lazy' namespace, which is used primariliy for the 'SESSION' object in
| >Zope 2. How do people feel about adding that to Zope 3?
| 
| I'm not familar with this. Where is it documented?

Here's what is in the docstring for HTTPRequest:

  - Lazy Data

These are callables which are deferred until explicitly
referenced, at which point they are resolved and stored as
application data.

Haven't found much else documentation.

There's a 'set_lazy' method in HTTPRequest, and that's what the
session machinery uses to bind 'getSessionData' as 'SESSION'. This
specific case sucks though, because as 'SESSION' appears when doing
request.keys() is pretty common to create sessions implicitly by
iterating through the request.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-12 Thread Sidnei da Silva
On Mon, Dec 12, 2005 at 07:14:08PM -0500, Jim Fulton wrote:
| >Here's what is in the docstring for HTTPRequest:
| >
| >  - Lazy Data
| >
| >These are callables which are deferred until explicitly
| >referenced, at which point they are resolved and stored as
| >application data.
| >
| >Haven't found much else documentation.
| 
| Are these basically lazy computed request keys/attributes then?

Yes.

| >There's a 'set_lazy' method in HTTPRequest, and that's what the
| >session machinery uses to bind 'getSessionData' as 'SESSION'. This
| >specific case sucks though, because as 'SESSION' appears when doing
| >request.keys() is pretty common to create sessions implicitly by
| >iterating through the request.
| 
| Yeah, explicit is better than implicit.
| 
| I don't want to add this to Z3, but it should be included in the
| new combined z2/z3 request.  We really need to take a look at the
| combined API and decide what we want in the long run.

So we are shooting for a z2 request implemented in terms of a z3
request. Sounds like an adapter to me :)

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Twisted Publisher and Zope 2

2005-12-13 Thread Sidnei da Silva
On Tue, Dec 13, 2005 at 07:28:09AM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| >So we are shooting for a z2 request implemented in terms of a z3
| >request. Sounds like an adapter to me :)
| 
| Maybe, however, if it is, it should happen as part of the request
| factory.

That's what I had in mind, yes.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Making schema configuration more modular

2005-12-13 Thread Sidnei da Silva
Here's one thing that I would like to see fixed.

In Zope 3 trunk right now, the schema for the server is defined in
zope/app/twisted/schema.xml. However, if I'm not mistaken, you can't
import that directly from another schema. Instead, the type
definitions should be in a separate component.xml which then you can
import.

Also, the type names should be prefixed. Eg: instead of  use .

This is all so we can reuse the sectiontype definition in
zopeschema.xml on Zope 2 without having to re-define them.

Would anyone be against those changes?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-20 Thread Sidnei da Silva
On Tue, Dec 20, 2005 at 07:33:13AM -0500, Jim Fulton wrote:
| >There are a couple conditions that must be met for 'chunked' to work
| >with Zope 2.
| >
| >1. A Content-Length header must not be set.
| >2. The request must be HTTP 1.1
| >3. You must be streaming
| >4. No 'Connection: close' header has been set during the request
| >
| >If all of that is met, then it works just fine. The signal for 'end of
| >data' in chunked mode is '0\r\n\r\n', which Zope properly inserts when
| >appropriate.
| 
| Is this documented anywhere?

In this email and on the source only it seems :( Could write a doctest
for sure.

| I'd really like us to think about how we *want* this to work in Zope (2 and 
| 3).
| 
| I'm uncomfortable with the subtle cues that seem to change the behavior of
| request.write from non-streaming to streaming.  I'd like to see
| a proposal for a clean API that supports:
| 
| - Simple traditional output (ie pages)
| 
| - Non-streaming large-file output.
| 
|   o Don't hold application thread to do I/O
| 
|   o Don't consume a lot of memory
| 
| - Streaming output
| 
|   o For applications that tale a lot of time to generate
| output.
| 
|   o Output is generated over a long period of time.
| 
|   o Perhaps extends life of application thread.
| 
| (Maybe there are other alternatives.)

If I understand correctly the newly introduced one would be the second
bullet? I don't have an idea of how that can be achieved.

FWIW, I could live with returning a generator instead of using
request.write for all applications where I use request.write today.

One thing that I had in mind for long-running streaming output is that
99% of the time it just needs a constant, read-only view of the
database at the time the streaming started so instead of using a
connection from the zodb connection pool, it could open a new,
read-only connection and use that for delivering the content.

| Note that there are some serious issues being discussed
| on the Python Web SIG wrt threading and WSGI that have a bearing on
| this discussion.  I'm worried that we won't get adequate threading
| support from WSGI.  I hope that isn't the case.

Me too.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-20 Thread Sidnei da Silva
On Tue, Dec 20, 2005 at 09:52:09AM -0500, Jim Fulton wrote:
| >One thing that I had in mind for long-running streaming output is that
| >99% of the time it just needs a constant, read-only view of the
| >database at the time the streaming started so instead of using a
| >connection from the zodb connection pool, it could open a new,
| >read-only connection and use that for delivering the content.
| 
| I don't see how that helps. Avoiding writes doesn't substantially
| (if at all) reduce resource consumption.

I was thinking that it would free a database connection back to the
connection pool and use a new, read-only connection with a 'delivery
thread', freeing the application thread. But maybe that doesn't really
help at all.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] zopectl in linux-ha environment

2006-01-10 Thread Sidnei da Silva
| In zopectl:
| [...]
| if __name__ == '__main__':
| run()
| [...]
| 
| What kind of return-statement/exception i have to use?

You should add a 'sys.exit()' somewhere. Where to add it is
the question.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] December release post-mortem

2006-01-18 Thread Sidnei da Silva
On Wed, Jan 18, 2006 at 07:36:35AM -0500, Jim Fulton wrote:
| And then there are the Windows releases.  Making Zope 2 windows releases
| is very painful and there don't seem to be many people willing to help.
| We've avoided the pain for Zope 3 by being less ambitious.  We let distutils
| do most of the work.  The result is that making a windows release takes 
| minutes
| and is highly automated, but the experience for the end user is less than
| ideal,  Many would rightfully argue that it is inadequate.  What we need
| is a release process that is as easy as the Zope 3 windows release process
| and produces a result as usable as the Zope 2 windows release.  I'm not sure
| exactly what the answer is, but I am sure we need to take a fresh approach.
| Whatever approach we take needs to be highly automated and must not require
| a lot of specialized Windows expertise.

The installers do not require much Windows expertise. In fact, they
require a lot of 'makefile' expertise right now, and some Inno Setup
expertise, not much else.

At Enfold Systems we are using our own home-grown python-based process
to cobble together all the dependencies for building installers. We
haven't switched to Zope 2.9 though.

When the time comes around for a switch, our goal is to switch from
Inno Setup to Wix [1], at which point we hope to contribute this work
to Zope. That might take another 6 months though and sure we don't
want to hold back the Zope Windows installers that long.

[1] http://blogs.msdn.com/robmen/archive/2004/04/05/107709.aspx

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] December release post-mortem

2006-01-18 Thread Sidnei da Silva
On Wed, Jan 18, 2006 at 10:27:25AM -0500, Jim Fulton wrote:
| >The installers do not require much Windows expertise. In fact, they
| >require a lot of 'makefile' expertise right now, and some Inno Setup
| >expertise, not much else.
| 
| Sorry, Inno Setup is a windows installation builder.  I consider this
| windows expertise.

You don't have to know how to operate Inno Setup for building a
installer though. It pretty much boils down to editing the makefiles
to contain the proper version number and typing 'make'. I would
consider that automated enough. What about adding a target that does
this into the buildbot so we get nightly installers?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] December release post-mortem

2006-01-18 Thread Sidnei da Silva
On Wed, Jan 18, 2006 at 10:45:20AM -0500, Jim Fulton wrote:
| People up to now have come up with systems like this that they thought were
| automated enough.  That's why we don't have a 2.9 release for windows.

What about we turn that around. How would you describe a 'automated
enough' build environment? I suspect you consider:

  python setup.py bdist_wininst

to be pretty close to that. How does it differ from:

  make installer

once all dependencies are in place?

I agree that the procedure for building the current Windows installer,
though documented (yes, it is documented), has more steps than
required. One place where it could be streamlined is that it expects
you to download the Python 2.3 Windows Installer and tarball manually
and put them into a specific directory. That could certainly be done
by the makefile.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope-dev] December release post-mortem

2006-01-18 Thread Sidnei da Silva
On Wed, Jan 18, 2006 at 04:37:12PM +0100, Andreas Jung wrote:
| >I'll repeat or emphasis that the windows release process needs to
| >be simple enough that *I* can do it.
| 
| Well, that's a perfect goal :-) But my experience with doing slightly 
| simple programming tasks on Windows is that Windows will slap you wherever 
| possible - even when you're trying to solve simple problems. I stopped 
| dreaming that anything on Windows works as it should.

I'll add to that that I used to think this way, too, but Mark Hammond
slowly convinced me otherwise.

Today I have the opinion that no matter what other people say, Windows
is actually superior to *anything* I've seen in Linux or OS X, except
for the networking stack and process management. COM, for example, is
very cool stuff.

You should see some of the stuff Mark has done that allows one to call
pretty much any Python object via COM from any language that supports
COM as long as the Python object has a interface declaration using
'zope.interface'. I'm still waiting to see something like COM on the
Linux world.

Over with the bashing, back to the topic now.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com


signature.asc
Description: Digital signature
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] December release post-mortem

2006-01-18 Thread Sidnei da Silva
On Wed, Jan 18, 2006 at 11:24:20AM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| >On Wed, Jan 18, 2006 at 10:45:20AM -0500, Jim Fulton wrote:
| >| People up to now have come up with systems like this that they thought 
| >were
| >| automated enough.  That's why we don't have a 2.9 release for windows.
| >
| >What about we turn that around. How would you describe a 'automated
| >enough' build environment? I suspect you consider:
| >
| >  python setup.py bdist_wininst
| >
| >to be pretty close to that.
| 
| I think
| 
| 
http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZopeWindowsRelease
| 
| Is pretty close.  Note that this has a number os steps, but there are few
| and they are well documented, so I don't have to think.

Not that much different from what already exists for Zope 2:

http://svn.zope.org/Zope/trunk/inst/WinBuilders/README.txt?rev=39675&view=auto

| As I said before, the fact that we don't have a windows release
| is proof that the process isn't automated enough.

That's not a proof that the process is not automated enough. The
transition from python2.3 to 2.4 *is* non-trivial because python
changed from distutils to MSI.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] December release post-mortem

2006-01-18 Thread Sidnei da Silva
On Wed, Jan 18, 2006 at 11:46:33AM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| ...
| >| As I said before, the fact that we don't have a windows release
| >| is proof that the process isn't automated enough.
| >
| >That's not a proof that the process is not automated enough. The
| >transition from python2.3 to 2.4 *is* non-trivial because python
| >changed from distutils to MSI.
| 
| Except that the same sort of problems occurred with 2.8.

I would describe the problems with the Windows installers as lack of
interest by the developers, not problems with installer building
automation.

One way or another, the best I can propose right now is to integrate
the building of the Windows installer into a buildbot, either ZC's or
Enfold Systems'.

We already build the nightly Windows Installer for Plone, so it
wouldn't be a big deal to do the same for Zope.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-23 Thread Sidnei da Silva
On Mon, Jan 23, 2006 at 04:26:05PM +0100, Lennart Regebro wrote:
| 
| But
| 
| 
| xmas hohoho
| easter bunny
| 
| 
| Where is the logic in that format? It starts out looking like
| somethingML, but then isn't.

I suspect ZConfig was designed after the apache config format. I also
suspect you haven't configured much Apache yourself.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Sidnei da Silva
On Tue, Jan 24, 2006 at 10:13:33AM +, Chris Withers wrote:
| Zope 3 then introduced ZCML, which 
| no other web server on the planet uses ;-)

I think you are mistaken. If ZCML is a variant of XML, then Zope 3 is
not alone. I've been told that IIS 7 does use XML for it's
configuration.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Deploying WSGI Apps with Zope 3.2+

2006-01-24 Thread Sidnei da Silva
Hello,

I'm refactoring a application developed for Zope 3.0, and in the
proccess of doing that, one of the things I wanted to do is to remove
some hardcoded xslt pipeline and instead use a WSGI 'middleware' or
'filter'.

So.. I was planning to use paste.deploy to put this together. However
it seems like currently I would have to define a different IServerType
utility just to hook up a different WSGI application up to Zope 3.

Has anyone put some thought about how to do this? Ideally, I would
like to see the WSGI application to be used to be given as a parameter
to the  directive of zope.conf, maybe that does deserve a new
 directive.

Any thoughts?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Missing environment and configuration

2006-01-25 Thread Sidnei da Silva
In Zope 2, we had excess of configuration options and environment
variables.

In Zope 3, there seems to be no environment variables used, and worse,
ZConfig options object seems to be discarded after initial
configuration, so there's no way to find out simple stuff like
'where is my INSTANCE_HOME'.

Is that by design or just an oversight?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+

2006-01-25 Thread Sidnei da Silva
On Tue, Jan 24, 2006 at 05:15:43PM -0500, Jim Fulton wrote:
| >Any thoughts?
| 
| I think that the way the server and app are integrated needs to be 
| rethought.
| 
| I think we need to look at how to leverage Paste Deploy in Zope.
| 
| I hate to mention this with all of the discussion about ZConfig, but we 
| should
| probably consider using PasteDeploy as an alternative to ZConfig. (Jim 
| ducks.)
| Alternative, we should redo the Zope 3 ZConfig schema to work with the 
| Paste Deploy
| APIs. Obviously, if we do the later, I'd prefer to do so after we've 
| decided how
| we're going to reimplement ZConfig.
| 
| In the short term, you might try teasing out the app and server from Zope
| and see if you could wire them up with Paste Deploy.

Alright, I had a first stab at it, and managed to get Zope 3's
WSGIPublisherApplication wired as a WSGI application using Paste
Deploy.

The result of this has been imported into:
http://svn.zope.org/zope.paste/trunk/

There are a bunch of issues to be resolved, like the fact that it's
not possible to access the initial ZConfig options object because it's
thrown away, so, in order of priority:

1. It's not possible to find where the  is.
2. It's not possible to access the configured root database, I've
   worked around this by using a event subscriber and some sort of
   monkeypatching.
3. Zope's servers assume that all 'IServerType' utilities accept a
   'db' argument. It should be optional.

Other than that, I will be experimenting with hooking additional
filters to be applied, for example:
http://www.decafbad.com/2005/07/xmlwiki/lib/xmlwiki/xslfilter.py

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/branches/3.2/ - Declare the zope top-level package as a namespace package if

2006-01-25 Thread Sidnei da Silva
On Wed, Jan 25, 2006 at 01:30:41PM -0500, Stephan Richter wrote:
| Please revert this revision. As you admit yourself in CHANGES.txt, this is a 
| new feature. You cannot add new features to a dot release branch.

Well, I would go as far as calling it a bugfix. Will revert it then we
can discuss.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+

2006-01-25 Thread Sidnei da Silva
On Wed, Jan 25, 2006 at 05:28:14PM -0500, Jim Fulton wrote:
| >There are a bunch of issues to be resolved, like the fact that it's
| >not possible to access the initial ZConfig options object because it's
| >thrown away, so, in order of priority:
| >
| >1. It's not possible to find where the  is.
| 
| Why is this necessary?

So the config file for paste.deploy can be in /etc/paste.ini

| >2. It's not possible to access the configured root database, I've
| >   worked around this by using a event subscriber and some sort of
| >   monkeypatching.
| 
| In a normal Zope install, the defined databases are registered as utilities.

Humm.. couldn't find that. Will try looking harder.

| 
| >3. Zope's servers assume that all 'IServerType' utilities accept a
| >   'db' argument. It should be optional.
| 
| This whole mechanism needs to be rethought in light of WSGI and Paste 
| Deploy.

I believe you :)

| >Other than that, I will be experimenting with hooking additional
| >filters to be applied, for example:
| >http://www.decafbad.com/2005/07/xmlwiki/lib/xmlwiki/xslfilter.py
| 
| Cool.

Oh, btw. I've got that to work. It's neat.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: SVN: zope.paste/trunk/README.txt - More explicit

2006-01-25 Thread Sidnei da Silva
On Wed, Jan 25, 2006 at 05:13:35PM -0500, Tres Seaver wrote:
| Interesting.  Can you extend the README to show a sample of configuring
| it "end-to-end" (e.g., how to set up a simple WSGI server and configure
| it to use the WSGI application)?

Yeah. Will do.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+

2006-01-26 Thread Sidnei da Silva
On Thu, Jan 26, 2006 at 06:30:02AM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| >On Wed, Jan 25, 2006 at 05:28:14PM -0500, Jim Fulton wrote:
| >| >There are a bunch of issues to be resolved, like the fact that it's
| >| >not possible to access the initial ZConfig options object because it's
| >| >thrown away, so, in order of priority:
| >| >
| >| >1. It's not possible to find where the  is.
| >| 
| >| Why is this necessary?
| >
| >So the config file for paste.deploy can be in /etc/paste.ini
| 
| Hm. I don't have the time to think hard about this right now,
| but I suspect the model you are following isn't quite right.  Rather than
| implicitly looking for a paste file in a magic location, I suspect that you
| should name the paste file in your ZConfig file or possibly extend the 
| ZConfig
| schema with components that reproduce what's normally found in a paste 
| config
| file (app definitions, server definitions, etc.).  Of course, either of 
| these
| options requires updating the ZConfig schema which is a real pain, so I can
| understand why you wouldn't want to do that.

And you're right to the point.

My original intention was to put the config file location in the
ZConfig schema, but that's *wy* too painful right now.

OTOH, it does seem to work pretty reasonably right now to serve as a
prototype. I have other concerns than if the config file location is
magic or not at the moment. I mean, it's probably better that it's
hardcoded to '/etc/paste.ini' than configurable at this
point. I don't think one would need *more than one* paste.deploy
configuration file anyway, so changing it's name would be pretty
pointless.

I think we can slowly progress from here, solving the ZConfig problem,
then the server-type-always-takes-db-argument and eventually end up
with zope.paste in the main tree and having the default wsgi server be
configured using paste.deploy.

BTW, I've updated the README.txt to include a more extensive
description of how to use it right now:

http://svn.zope.org/zope.paste/trunk/README.txt?rev=41449&view=markup

Thoughts?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/branches/3.2/ - Declare the zope top-level package as a namespace package if

2006-01-26 Thread Sidnei da Silva
On Wed, Jan 25, 2006 at 04:37:45PM -0200, Sidnei da Silva wrote:
| On Wed, Jan 25, 2006 at 01:30:41PM -0500, Stephan Richter wrote:
| | Please revert this revision. As you admit yourself in CHANGES.txt, this is 
a 
| | new feature. You cannot add new features to a dot release branch.
| 
| Well, I would go as far as calling it a bugfix. Will revert it then we
| can discuss.

Sorry, I've removed some context from this email, so I guess nobody
understood what it is about.

I had added a call to pkg_resource.declare_namespace() to Zope 3's
zope/__init__.py, which enables one to have sub packages of 'zope'
distributed as eggs.

Stephan complained that this is not a 'bugfix' but a 'new feature' and
asked me to revert, which I promptly did.

I suspect that no new Zope 3.2.x release will come out soon anyway, so
maybe it doesn't make sense to add it there really, but it would be
really nice to have this feature available before the 3.3 release.

Does anybody care about using eggs with Zope 3.2?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+

2006-01-26 Thread Sidnei da Silva
On Thu, Jan 26, 2006 at 02:02:19PM +, Chris Withers wrote:
| Sidnei da Silva wrote:
| >
| >My original intention was to put the config file location in the
| >ZConfig schema, but that's *wy* too painful right now.
| 
| What's the specific problem here? I find adding to ZConfig schemas 
| pretty easy...

Yet you find ZCML declaring namespaces in ZCML files
annoying *wink*. Sometimes I don't understand you :)

Tres' ZConfig products extension thing just enables you to use
key-value pairs, without being able to specify what the datatypes for
those values are, if I'm not mistaken. Also, AFAICT it's not present
in Zope 3 yet.

What I think is that the Zope ZConfig schema should have something
just like 'package-includes' is for ZCML. A place where you can drop a
snippet of ZConfig schema and it will get picked up at boot time.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Correction to RFC

2006-01-27 Thread Sidnei da Silva
On Fri, Jan 27, 2006 at 09:37:03PM +0100, Christian Theune wrote:
| Is it intentional that there is a distinction? It took me quite a while
| to actually notice that minore difference and come to the conclusion
| that there are two different mechanisms used.

There's a proposal from Shane Hathaway to remove this distinction, as
I understand it. It might have been accepted already, and he had code
ready to checkin.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com


signature.asc
Description: Digital signature
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] WebDAV

2006-02-09 Thread Sidnei da Silva
On Thu, Feb 09, 2006 at 06:20:46AM -0500, Stephan Richter wrote:
| Michael,
| 
| this is also an excellent proposal. I really like it! I think with this and 
| the other proposal, the Zope 3 WebDAV story will look really good.

By all means! From the POV of having implemented the current webdav
namespace support, I really enjoy the proposals. They make use of some
features that were not present/too obscure when the initial
implementation was done and solve the major glitches that I've found.

+1.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 web root

2006-02-10 Thread Sidnei da Silva
On Thu, Feb 09, 2006 at 09:43:30PM -0500, Gary Poster wrote:
| Come to think of it, maybe it would also be an interesting approach  
| to a "baked web site" delivery system.

Indeed, that's an idea. In fact, this is just what we are doing here
at Enfold.

We have created 'Entransit' [1] which receives data from a Zope 2 site
and semi-bakes it to the filesystem. And then this semi-baked data can
be served by any frontend (we've got working frontends in Java, PHP,
ASP.NET and Zope 3).

More specifically, the Zope 3 frontend uses 'zope.paste' to bind
together the Zope 3 WSGI application and a XSLT filter.

To serve content from the filesystem we use a custom Publication
object that returns a different root 'application' object and from
there we use custom IBrowserPublisher and ITraversable adapters that
lookup files on the filesystem and construct simple stub objects to
represent those.

Some advantages are:

a) you can control all aspects of traversal, you're not tied to the
   filesystem hierarchy

b) you work with the stub objects instead of with the files directly
   so it all works just like the object had come from the ZODB (except
   for persistence, the system doesn't write back to the fs)

This Zope 3 frontend might be released soon, even under ZPL if there's
interest.

[1] www.enfoldsystems.com/Products/Entransit

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Zope 3 web root

2006-02-10 Thread Sidnei da Silva
On Fri, Feb 10, 2006 at 11:30:29PM -, Martin Aspeli wrote:
| So, I'm serving static content like Apache, I'm interpreting file types  
| like Apache and I'm using .htaccess files like Apache. But I'm using Zope.
| 
| Why am I not just using Apache?
| Would I be learning this beast that is Zope?

Because you want to use adapters? :)

One idea I want to try some time is making Zope 3 WSGI application
work on Apache or IIS.

http://isapi-wsgi.python-hosting.com/


-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: One namespace for ZCML

2006-02-13 Thread Sidnei da Silva
On Mon, Feb 13, 2006 at 03:31:49PM -0500, Tres Seaver wrote:
| This is why Python has namespaces, too:
| 
|  >>> import this
|  ...
|  Namespaces are one honking great idea -- let's do more of those!

Someone argued in the python-brasil list that "let's do more of those"
actually refers to 'one honking great idea', thus meaning "let's do
more of those great ideas (like namespaces)".

Now whether that's that's the correct interpretation is up to the
original author (Tim Peters?) to clarify :)

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Zope 3 web root

2006-02-14 Thread Sidnei da Silva
On Tue, Feb 14, 2006 at 08:17:04AM +0100, Dario Lopez-Kästen wrote:
| Shaun Cutts said the following on 2006-02-14 07:37:
| I have seriously considered trying out Django and similar tools to see 
| if they would fit better with the kind of applications I need to do, but 
| I really like the power that Zope as a platform offers, even in Zope 2.

Then comes a question. Did anyone try reusing parts of Django inside
Zope 3?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope-dev] Two visions

2006-03-01 Thread Sidnei da Silva
On Wed, Mar 01, 2006 at 09:12:08AM -0500, Stephan Richter wrote:
| On Tuesday 28 February 2006 11:00, Jim Fulton wrote:
| > Zope 2 is more mature than Zope 3 in a lot of areas.  WebDAV
| > and process management are a couple of examples that occur to me
| > off the top of my head.
| 
| Except that Michael Kerrins recent WebDAV work will shaddow Zope 2's support. 
| If I understand his improved implementation correctly, then it is very, very 
| cool!

Did you run the litmus tests against it? :)

BTW, I'm working on converting the full set of the litmus tests to a
functional doctest, will check that in soon.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope-dev] Two visions

2006-03-01 Thread Sidnei da Silva
On Wed, Mar 01, 2006 at 09:29:05AM -0500, Stephan Richter wrote:
| On Wednesday 01 March 2006 09:24, Sidnei da Silva wrote:
| > | Except that Michael Kerrins recent WebDAV work will shaddow Zope 2's
| > | support. If I understand his improved implementation correctly, then it
| > | is very, very cool!
| >
| > Did you run the litmus tests against it? :)
| 
| I don't know what that is, of course. :-) I think talking to Michael is the 
| better choice here. :-)

First hit:
http://www.google.com/search?q=webdav+litmus+tests

What you think about turning those into functional doctests?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope-dev] Two visions

2006-03-01 Thread Sidnei da Silva
On Wed, Mar 01, 2006 at 03:13:29PM +, Michael Kerrin wrote:
| so it doesn't get to the locking tests (which will fail) but this is good 
| thing to aim at :-)

You can run it with '-k' (for 'keep going').

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] keeping attributes abstract

2006-03-09 Thread Sidnei da Silva
On Thu, Mar 09, 2006 at 07:11:20AM -0500, Stephan Richter wrote:
| On Wednesday 08 March 2006 23:52, Sam Stainsby wrote:
| > No 'bar' attribute needed!
| 
| I'll note that in the Python community we consider it an advantage of using 
| attributes/properties versus accessor and mutator methods. This distinction 
| between an attribute- versus method-centric object oriented programming 
| language has been discussed in many articles.
| 
| Note that we provide several other mechanisms to extend functionality; for 
| example, the event system. Overall Zope (like most other Python code) is 
| optimized to work with attributes/properties. We just like them too much! :-)

Not to mention that you can still use accessors/mutators with plain
attributes, and then store the actual value under a different name to
avoid the clash:

class FooX(Persistent):
implements(IFooB)

_bar = None

def setBar(self, bar):
doSomething()
self._bar = bar


def getBar(self):
doSomethingElse()
return self._bar

bar = property(getBar, setBar)

-- 
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] what is ZCML?

2006-03-13 Thread Sidnei da Silva
On Mon, Mar 13, 2006 at 02:16:17PM -0700, Jeff Shell wrote:
| And I think it's
| very important for the Python code to say what it does, so when I come
| back to a module five months later I'm not staring at MyFactory going
| "yeah, but what is it?"

One thing that must not pass by unnoticed is that one of the points of
'Why ZCML' is that it allows you to 'do stuff' (configuration?) with
plain python code that wasn't written for, nor depends on, Zope 3
directly.

That is, to me, a very important feature. To be able to write some
python module that does not depend on Zope 3 at import time, but is
'hooked into' Zope 3 externally, with ZCML, at 'configuration time'.

As I understand, no other framework out there gives you this.

-- 
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] what is ZCML?

2006-03-13 Thread Sidnei da Silva
On Mon, Mar 13, 2006 at 04:40:09PM -0700, Shane Hathaway wrote:
| I would suggest that is a component architecture feature, not a ZCML 
| feature.  If Zope were a hardware device, the CA would be the wiring and 
| ZCML would be the schematic diagram.

Great point!

-- 
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: a plan for widgets?

2006-03-16 Thread Sidnei da Silva
On Thu, Mar 16, 2006 at 08:06:11PM -0700, Jeff Shell wrote:
| By the way, isn't it pretty easy to provide straight up values anyways
| for those quick drop-down situations?
| 
| trip_type = zope.schema.Choice(
| title=_(u"Trip Type"),
| description=_(u"Trip Type"),
| default=u"Business",
| required=True,
| values=(u"Business", u"Personal"),
| )
| 
| replacementOptions = SimpleVocabulary((
| SimpleTerm(value='none', title='No - keep all current articles'),
| SimpleTerm(value='matching', title='Only replace matching IDs'),
| SimpleTerm(value='all', title='Yes - replace all existing articles'),
| ))
| class ImportSchema(Interface):
| importfile = zope.schema.Bytes(
| title=u"Import Zip File",
| description=u"Zipe file of items to import.",
| required=True,
| )
| 
| replace = zope.schema.Choice(
| title=u"Replace existing articles?",
| vocabulary=replacementOptions,
| default='none',
| )

Yum Yum. That reminds me of Archetypes-Hum.

-- 
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Re: a plan for widgets?

2006-03-17 Thread Sidnei da Silva
On Fri, Mar 17, 2006 at 09:08:14AM -, Martin Aspeli wrote:
| On Fri, 17 Mar 2006 03:31:59 -, Sidnei da Silva  
| <[EMAIL PROTECTED]> wrote:
| 
| >Yum Yum. That reminds me of Archetypes-Hum.
| 
| Was that an endorsement or criticism? :)

A endorsement I guess, since Mr. Shell seems to think that's the Right
Way (tm).

-- 
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] eggs for Zope 3 extensions

2006-04-04 Thread Sidnei da Silva
On Tue, Apr 04, 2006 at 02:51:37PM +0200, Martijn Faassen wrote:
| where 'make' creates a Zope 3 installation, and downloads all the eggs 
| listed as requirements for this project from the net, and installs them 
| so that the Zope 3 instance actually picks them up.

I think you would give a argument to easy_install to install the eggs
in `INSTANCE_HOME/lib/python`.

| In particular, are there any ideas of how the -configure.zcml and 
| -meta.zcml files would end up being generated and installed in 
| package-includes? Eggs do not provide for this directly, but perhaps 
| there are some ideas about Zope 3 specific eggs that do?

I think those would be handled by 'entry points'.

-- 
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] eggs for Zope 3 extensions

2006-04-04 Thread Sidnei da Silva
On Tue, Apr 04, 2006 at 03:14:15PM +0200, Martijn Faassen wrote:
| Sidnei da Silva wrote:
| >On Tue, Apr 04, 2006 at 02:51:37PM +0200, Martijn Faassen wrote:
| >| where 'make' creates a Zope 3 installation, and downloads all the eggs 
| >| listed as requirements for this project from the net, and installs them 
| >| so that the Zope 3 instance actually picks them up.
| >
| >I think you would give a argument to easy_install to install the eggs
| >in `INSTANCE_HOME/lib/python`.
| 
| Right, I can make it work, I just wondered if there was some canonical 
| way. :)

Look at the parameters for easy_install? If I recall it was almost
there but not quite :)

| >| In particular, are there any ideas of how the -configure.zcml and 
| >| -meta.zcml files would end up being generated and installed in 
| >| package-includes? Eggs do not provide for this directly, but perhaps 
| >| there are some ideas about Zope 3 specific eggs that do?
| >
| >I think those would be handled by 'entry points'.
| 
| Looking them up... As far as I understand them, Zope 3 would need to be 
| able to understand entry points before I could use these in a project 
| that uses Zope 3, right?

That is my understanding too.

-- 
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] [EMAIL PROTECTED]: [Zope3-checkins] SVN: Zope3/trunk/src/zope/app/file/ file an image views now set the Last-Modified header and handle If-Modified-Since if the context is adaptable to IZo

2006-04-28 Thread Sidnei da Silva
After looking at this checkin, and related to my experiments with
python and gnome-vfs [1], I'm left wondering if Zope shouldn't have a
interface that specifies a structure similar to what a os.stat() call
returns.

That would make the overhead of implementing stuff that needs only
creation/modification time or stuff related to filesystems etc much
easier.

[1] http://awkly.org/archive/nautilus-plone-backend

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
--- Begin Message ---
Log message for revision 67711:
  file an  image views now set the Last-Modified header and handle 
If-Modified-Since if the context is adaptable to IZopeDublinCore. This adds a 
dependency to zope.dublincore.
  
  
  

Changed:
  U   Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg
  U   Zope3/trunk/src/zope/app/file/browser/file.py
  U   Zope3/trunk/src/zope/app/file/browser/file.txt
  U   Zope3/trunk/src/zope/app/file/browser/image.py

-=-
Modified: Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg
===
--- Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg  2006-04-28 10:45:24 UTC 
(rev 67710)
+++ Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg  2006-04-28 11:01:55 UTC 
(rev 67711)
@@ -7,3 +7,4 @@
 zope.publisher
 zope.schema
 zope.testing
+zope.dublincore

Modified: Zope3/trunk/src/zope/app/file/browser/file.py
===
--- Zope3/trunk/src/zope/app/file/browser/file.py   2006-04-28 10:45:24 UTC 
(rev 67710)
+++ Zope3/trunk/src/zope/app/file/browser/file.py   2006-04-28 11:01:55 UTC 
(rev 67711)
@@ -15,8 +15,6 @@
 
 $Id$
 """
-from datetime import datetime
-
 import zope.event
 from zope import lifecycleevent
 from zope.contenttype import guess_content_type
@@ -27,21 +25,101 @@
 from zope.app.file.file import File
 from zope.app.file.interfaces import IFile
 from zope.app.i18n import ZopeMessageFactory as _
+from zope.dublincore.interfaces import IZopeDublinCore
+import zope.datetime 
 
+import time
+from datetime import datetime
+
 __docformat__ = 'restructuredtext'
 
-
 class FileView(object):
 
 def show(self):
-"""Call the File"""
-request = self.request
-if request is not None:
-request.response.setHeader('Content-Type',
-   self.context.contentType)
-request.response.setHeader('Content-Length',
-   self.context.getSize())
 
+"""Sets various headers if the request is present and returns the
+data of the file. If the "If-Modified-Since" header is set and
+the context implements IZopeDublinCore, data is only returned if
+the modification date of the context is new than the date in the
+"If-Modified-Since" header
+>>> from zope.publisher.browser import BrowserView, TestRequest
+>>> class FileTestView(FileView, BrowserView): pass
+>>> import pytz
+>>> class MyFile(object):
+... contentType='text/plain'
+... data="data of file"
+... modified = datetime(2006,1,1,tzinfo=pytz.utc)
+... def getSize(self):
+... return len(self.data)
+
+>>> aFile = MyFile()
+>>> request = TestRequest()
+>>> view = FileTestView(aFile,request)
+>>> view.show()
+'data of file'
+>>> request.response.getHeader('Content-Type')
+'text/plain'
+>>> request.response.getHeader('Content-Length')
+'12'
+
+If the file is adaptable to IZopeDublinCore the
+"Last-Modified" header is also set.
+
+>>> request.response.getHeader('Last-Modified') is None
+True
+
+For the test we just declare that our file provides
+IZopeDublinCore
+>>> from zope.interface import directlyProvides
+>>> directlyProvides(aFile,IZopeDublinCore)
+>>> request = TestRequest()
+>>> view = FileTestView(aFile,request)
+>>> view.show()
+'data of file'
+>>> datetime.fromtimestamp(zope.datetime.time(
+... request.response.getHeader('Last-Modified')))
+datetime.datetime(2006, 1, 1, 0, 0)
+
+If the "If-Modified-Since" header is set and is newer a 304
+status is returned and the value is empty.
+
+>>> modified = datetime.now()
+>>>

Re: [Zope3-dev] Preview - gzipping (improved) as wsgi middleware

2006-05-04 Thread Sidnei da Silva
On Thu, May 04, 2006 at 12:48:08PM -0400, Jim Washington wrote:
| Back in March, there was a (tiny) bit of discussion here about using
| wsgi middleware for gzipping zope3 responses.
| 
| I have now had time to take a look at the concept, and it seems good.
| 
| So, for a preview of another gzipping implementation for zope3, please
| take a look at http://zif.hill-street.net/gzipper
| 
| For use with zope3, it requires zope.paste (Thanks, Sidnei!)
| 
| features:
| iterable-friendly - outputs as iterable at the same time it receives
| from the application iterable
| memory-friendly? - can use a tempfile buffer to perhaps reduce
| memory usage
| configurable excludes - easily exclude any content-types you want
| from gzipping
| 
| At the same URL, I'm also previewing a similar package to minimize
| javascript.
| 
| As usual, installation and configuration instructions are in the README
| (http://zif.hill-street.net/gzipper/README.txt).

What can I say?? NEAT! Thanks for doing this!

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] doctest, functional doctests and pep263 encoding

2006-06-22 Thread Sidnei da Silva
Looks like Jim added support for pep263 coding to doctest.py at some point.

However, that doesn't quite play with functional doctests it seems.

The issue is that functional doctests usually do:

  >>> print http(r"

... and when the response value is printed it's converted to a
string. But if you set coding in your functional doctest file then the
expected value is a unicode string. If you have a non-ascii char in
your response value, *bang*, it bombs with a unicode error.

Anyone else experienced this?

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] doctest, functional doctests and pep263 encoding

2006-06-22 Thread Sidnei da Silva
On Thu, Jun 22, 2006 at 02:50:42PM -0400, Benji York wrote:
| Warning: This comment is totally OT from your actual question, sorry.
| 
| Sidnei da Silva wrote:
| >The issue is that functional doctests usually do:
| >
| >  >>> print http(r"
| 
| Most people prefer zope.testbrowser functional tests over "old-style" 
| functional tests (when applicable), so I'm curious as to why you're 
| using them here.

It's an old test written almost 2 years ago that started failing in
Zope 2.9 due to the changes and the inclusion of a newer zope.testing.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Subversion 1.4 breaks mkzopeinstance.py

2006-09-23 Thread Sidnei da Silva
On Sat, Sep 23, 2006 at 11:21:38AM +0200, Philipp von Weitershausen wrote:
| Wichert Akkerman wrote:
| >Previously Philipp von Weitershausen wrote:
| >>Jim Fulton wrote:
| >>>Uh, why are we parsing the entries file?
| >>To get the current revision of the Zope 3 checkout...
| >
| >Why not use svn info --xml?
| 
| or even just "svn info"...

Or svnversion!

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [ZF] Re: Use launchpad ! (was Re: [Zope3-dev] the maintenance of change logs)

2006-10-01 Thread Sidnei da Silva
| This worries me a bit.  Integration with svn seems to be a major
| selling point of track, but you haven't done that.  I'd like to see
| a prototype that is actually integrated with our subversion repository.
| What would be necesary to make that happen?  Do you need actual access
| to the local subversion files? Or can you access them remotely?

Last I checked trac needed direct access to the local repository. It
*might* be able to do remote access these days, but I wouldn't count
on that.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [ZF] Re: Use launchpad ! (was Re: [Zope3-dev] the maintenance of change logs)

2006-10-01 Thread Sidnei da Silva
On Sun, Oct 01, 2006 at 09:38:21AM -0400, Jim Fulton wrote:
| 
| Here are some quick Trac questions.  My impression is that track projects
| need to be set up as separate applications and that separate projects
| can't be set up through the web. Is this right?

All of that is true AFAICT.

| Does trac have any notion
| of sub-projects that would allow smallter efforts (e.g. zope.interface)
| to have their own collectors without creating separate trac installations?

Not that I know of. You also can't move issues between trac
installations.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Format/pretty print ZCML files

2006-10-03 Thread Sidnei da Silva
On Tue, Oct 03, 2006 at 05:21:36PM +0100, Peter Bengtsson wrote:
| Are there any (python or linux) tools for formatting a ZCML file?
| ...hopefully according to the ZCML style guide.

Emacs 'nxml-mode' follows the style guide pretty closely with regards
to aligning attributes.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] zope3 instance with no zodb

2006-12-06 Thread Sidnei da Silva

On 12/5/06, Chris Withers <[EMAIL PROTECTED]> wrote:

Jim Fulton wrote:
>
> Yes.  You have to configure an alternate publication object.

Okay, any clues how to do that? Where's the default configuration done?
What interfaces do I need to implement?


I have some example code here that can help you. I've been meaning to
release this for more than one year now, and maybe it's time.

 http://cheeseshop.python.org/pypi/snap/0.5

Hope that's of any help. The interesting bits are in configure.zcml
( directive) and publisher.py

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: Need to get more involved in Web SIG (was Re: [Zope3-dev] Fixing ZServer bugs?)

2006-12-19 Thread Sidnei da Silva

Anyone played with Nuxeo's 'funkload'? That's probably one of the most
interesting stress/benchmark tools out there. There are other
non-Python options too, like 'JMeter' (I believe that's the name) and
Microsoft Web Capacity Analisys Tool (free download I believe).
--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [SpringCleaning07]

2006-12-20 Thread Sidnei da Silva

On 12/20/06, Tres Seaver <[EMAIL PROTECTED]> wrote:

I'm actually -1 on "getting out of the server business" as well, at
least in terms of the Zope2 ZServer:  I don't see it as requiring much
maintenance, and there *are* folks in the community (I can think of five
or six, at least) who know Medusa / ZServer well enough to go forward.



From looking at the ZServer from Zope 3, I had the impression that it

had significant improvements over the version from Zope 2, in that
it's not so much of a complete rewrite than it's a cleanup/reorg.

The few issues I have with the Zope 2 ZServer could be easily fixed by
someone with a bit of time and Medusa knowledge.

They are mainly due to the fact that handling 'streams' and 'gzip
compression' are done inside the ZServer with some not so nice
workarounds, instead of using the producers that medusa provides which
would simplify ZServer a lot.

The impression I had was that the person that added streaming and gzip
did not know about the medusa producers.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Idea: Failure to lookup adapters

2007-01-15 Thread Sidnei da Silva

One of the most common issues that I've faced, and watched several
people struggle with, during Zope 3 development is to figure why a
certain adapter is not found, or why a certain other adapter is found
instead of the one you are expecting.

I was wondering if there is something that could be done to help
pinpoint this kind of issue, since adapters are really a key part of
the component architecture.

One of the ideas that occurred me was that in debug mode we could
create a wrapper around the to-be-returned adapter and stuff some
trace information in there to help diagnose possible issues. Or maybe
we could just use the logging framework to output some information.

The kind of info I'm looking for is something along the lines:

 'We've tried to look up an adapter for (ISomething, ITheOther) but
none was found'
 'Found an adapter for IFoo, which is a base class for the IBar
interface requested. No adapter has been found for the most-specific
interface IBar'

Comments?

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Idea: Failure to lookup adapters

2007-01-16 Thread Sidnei da Silva

Zope 3 has that as well. However, this only gives you the information of
the stack. It doesn't give you information created during the run of
e.g. loops, which I imagine would be interesting to create a trail of
"what did you do?" information.


Well, you could set a list into __traceback_info__ and append to it
during each loop, instead of assigning.

Anyway, that would only be seen in the case of an exception. Unless we
could expose a view that shows the stack without having an exception.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 without ZODB

2007-01-21 Thread Sidnei da Silva

On 1/21/07, Jim Fulton <[EMAIL PROTECTED]> wrote:

Alan Runyan and Sidnei Da Silva created one of the earliest Zope 3
applications using SQL Objects. I don't remember the name of their
application or what it's status is.  Maybe they'll chime in or you
can ask them.


That was the SIP (Sample Inventory Application). It's available from
here: http://sourceforge.net/projects/sampleinventory. It gave life to
'sqlos' (http://codespeak.net/z3/sqlos/), which is a bridge between
Zope 3 and SQLObject. Namely, it provides some custom adapters for
implementing folderish views into a database and coordinates the
SQLObject transaction with the default Transaction Manager in Zope 3.

It actually used the ZODB just to store a root object that was
persistent and implemented a dummy interface, so that we could
register a custom traverser and then delegate to the application from
there. Since the root object was dummy, the ZODB could be easily
thrown away.

Then there is a second one called Snap, which is available from the
cheeseshop (http://cheeseshop.python.org/pypi/snap/0.5). This one uses
most of the approaches discussed here (abusing the 'db' argument,
registering a custom publisher), except using a different 'main'
script. It also uses zope.paste
(http://cheeseshop.python.org/pypi/zope.paste) so that the application
could be configured with Paste.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Zope 3.3.1

2007-02-13 Thread Sidnei da Silva

On 2/12/07, Benji York <[EMAIL PROTECTED]> wrote:

Short-term: I've restarted those slaves, as the particular version of
buildbot we use is flaky on Windows and will "go purple" (the color the
waterfall view shows for the builder status) and never come back.

Long-term: attempt to upgrade to the current version of buildbot that
(hopefully) is more stable on Windows.


FWIW, under 'heavy load' the master might kick out the slave [1] [2]
because it doesn't get a ping response in time. Not sure if that's
what you are experiencing. The workaround is to disable the ping.

http://comments.gmane.org/gmane.comp.python.buildbot.devel/914
http://sourceforge.net/tracker/index.php?func=detail&aid=1500669&group_id=73177&atid=537001


--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Persistent declarations, dead interfaces and a TypeError

2007-02-22 Thread Sidnei da Silva

Hi there,

I'm consistently having issues with 'directlyProvides' and interfaces
that are moved or removed. The symptom is that when the persisted
declaration is unghostified a TypeError happens.

This is specially bad since in this case the 'directlyProvides' is
being used on a PAS plugin, and the TypeError prevents the user from
even going into the ZMI to delete the object!

Here's a snippet of the traceback. In the list of interfaces below,
the ones prefixed by Products.Five.bbb do not exist anymore:

 Module ZODB.Connection, line 732, in setstate
 Module ZODB.Connection, line 786, in _setstate
 Module ZODB.serialize, line 604, in setGhostState
 Module ZODB.serialize, line 597, in getState
 Module zope.interface.declarations, line 766, in Provides
 Module zope.interface.declarations, line 669, in __init__
 Module zope.interface.declarations, line 47, in __init__
 Module zope.interface.declarations, line 1363, in _normalizeargs
 Module zope.interface.declarations, line 1362, in _normalizeargs
TypeError: ('iteration over non-sequence', , (,
, , , , , , , , , , , , , ,
, , , , , , ,
))

I believe that _normalizeargs in zope.interface.declarations should be
changed to cope with this, by ignoring those 'broken' references.

Thoughts?
--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Persistent declarations, dead interfaces and a TypeError

2007-02-23 Thread Sidnei da Silva

On 2/23/07, Jim Fulton <[EMAIL PROTECTED]> wrote:

I think this should be handled in the declaration serialization code.
We should arrange that when a declaration is unpickled we:

- catch interfaces that can't be loaded,


Apparently when the interface "can't be loaded" it turns from a
InterfaceClass to a 'class', which doesn't conform to the iteration
protocol expected by the 'for v in sequence' in _normalizeargs. Would
detecting a standard 'class' vs 'InterfaceClass' be enough?


- issue a warning


Not too fond of that. :)


- replace the wayward interface with some kind of placeholder.


Like a BrokenInterfacleClass?


This may require checking for broken objects rather than catching
errors.

This is largely hand waving, but I think the overall approach is
sound. :)


It sounds good to me. In fact it's pretty much what I had in mind,
except for the warning.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Persistent declarations, dead interfaces and a TypeError

2007-02-23 Thread Sidnei da Silva

FWIW, this is already a BrokenClass instance, thanks to ZODB:

(Pdb) p sequence

(Pdb) p sequence.__mro__
(, , , , , , , , , , , , , , , , , )

Wonder if we can just check for that? And then how to avoid a
dependency of zope.interface on OFS.Uninstalled.BrokenClass.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Persistent declarations, dead interfaces and a TypeError

2007-02-23 Thread Sidnei da Silva

On 2/23/07, Dieter Maurer <[EMAIL PROTECTED]> wrote:

Sidnei da Silva wrote at 2007-2-23 12:08 -0300:
> ...
>Wonder if we can just check for that? And then how to avoid a
>dependency of zope.interface on OFS.Uninstalled.BrokenClass.

You can positively check that the object is an "Interface" subclass.


Well, the correct check there is 'Interface' subclass *or* iterable.
In fact it blindly assumes that if it's not an 'Interface' subclass
then it's an iterable. That's actually the issue. I don't think
there's an easy 'isiterable' check other than catching TypeError?

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Google Summer of Code

2007-03-04 Thread Sidnei da Silva

I wouldn't mind mentoring someone, though I could also participate as
student. I'm still undergraduate. :)

I would like to see something happening on the field of having Zope 2
and 3 more easily runnable under WSGI. I'm highly interested in trying
to run them as WSGI under IIS with isapi_wsgi, maybe even improving
isapi_wsgi if needed.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva

On 3/7/07, Christian Theune <[EMAIL PROTECTED]> wrote:

This is how the dance looks like to do the link():

 >>> import tempfile, os
 >>> d = tempfile.NamedTemporaryFile()
 >>> os.path.exists(d.name)
 True
 >>> d.write('Test')
 >>> os.path.exists('/tmp/asdf')
 False
 >>> os.link(d.name, '/tmp/asdf')
 >>> d.close()
 >>> os.path.exists(d.name)
 False
 >>> os.path.exists('/tmp/asdf')
 True
 >>> open('/tmp/asdf').read()
 'Test'



Ok, this is how it looks on Windows. :)


import os
import win32file
f = open('test.txt', 'wb')
f.write('hello world')
f.close()
win32file.CreateHardLink('hello.txt', 'test.txt')
os.listdir(os.getcwd())

['hello.txt', 'test.txt']

f = open('hello.txt', 'wb')
f.write('hello there')
f.close()
print open('hello.txt').read()

hello there

print open('test.txt').read()

hello there

os.remove('test.txt')
print open('hello.txt').read()

hello there

print open('test.txt').read()

Traceback (most recent call last):
 File "", line 1, in ?
IOError: [Errno 2] No such file or directory: 'test.txt'

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva

On 3/7/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote:

Am I the only person here who immediately associated "link" with the
POSIX? Also, am I the only one who read "when possible" as "when on a
POSIX system where link is available", in other words, "when not on
Windows"? One starts to wonder...


NTFS does support hard links since version 5, which means Windows
2000+. It does not support hard links to directories though, only soft
links (which are called junctions or junction points). The version of
NTFS shipped with Vista supports hard links for directories I believe.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva

On 3/7/07, Christian Theune <[EMAIL PROTECTED]> wrote:

I propose to create a small subclass to override the `make_file` method
to use `NamedTemporaryFile` instead of `TemporaryFile` to allow the file
being accessible from a filename so I can apply a `link` operation.

Notice: The FieldStorage explicitly provides the `make_file` method to
allow overriding in this sense.


Since you're proposing to replace TemporaryFile anyway, and your
'os.link()' proposal requires that both the file and the hard link are
on the same 'drive' or 'partition' or whatever, why not create the
temporary file on a temp directory that is close (hopefully a sibling)
of the final destination blob directory, then you can be sure that
'os.link()' will work and will be 'O(1)' without any extra effort.

Is there any reason not to do that?

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva

On 3/7/07, Benji York <[EMAIL PROTECTED]> wrote:

Dieter Maurer wrote:
> Python's "os.link" creates a hard link which will only work
> if source and destination are on the same file system.

...and is also not available on Windows.


os.link() isn't, but hard links are as long as you use NTFS [1].

[1] http://msdn2.microsoft.com/en-us/library/aa363860.aspx
--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com