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



[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



[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



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



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



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] 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
class 'Products.Five.bbb.OFS_interfaces.IFolder'
(Pdb) p sequence.__mro__
(class 'Products.Five.bbb.OFS_interfaces.IFolder', class
'OFS.Uninstalled.BrokenClass', type 'ExplicitAcquirer', class
'OFS.SimpleItem.Item', class 'webdav.Resource.Resource', class
webdav.Lockable.LockableItem at 0x014C6630, class
webdav.EtagSupport.EtagSupport at 0x014C6600, class
'OFS.CopySupport.CopySource', class 'App.Management.Tabs', class
OFS.Traversable.Traversable at 0x01431120, class OFS.ZDOM.Element at
0x014D7330, class OFS.ZDOM.Node at 0x014D7270, class
'AccessControl.Owned.Owned', class 'App.Undo.UndoSupport', type
'Persistence.Persistent', type 'persistent.Persistent', type
'ExtensionClass.Base', type 'object')

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



[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', function Provides at
0x009A6F70, (class
'Products.PluggableAuthService.plugins.ScriptablePlugin.ScriptablePlugin',
InterfaceClass persistent.interfaces.IPersistent, class
'Products.Five.bbb.OFS_interfaces.IFolder', class
'Products.Five.bbb.OFS_interfaces.IObjectManager', InterfaceClass
zope.app.container.interfaces.IContainer, class
'Products.Five.bbb.OFS_interfaces.ICopyContainer', class
'Products.Five.bbb.App_interfaces.INavigation', class
'Products.Five.bbb.Acquisition_interfaces.IAcquirer', class
'Products.Five.bbb.webdav_interfaces.IDAVCollection', class
'Products.Five.bbb.webdav_interfaces.IDAVResource', class
'Products.Five.bbb.webdav_interfaces.IWriteLock', class
'Products.Five.bbb.OFS_interfaces.ITraversable', class
'Products.Five.bbb.OFS_interfaces.IPropertyManager', class
'Products.Five.bbb.AccessControl_interfaces.IRoleManager', class
'Products.Five.bbb.AccessControl_interfaces.IPermissionMappingSupport',
class 'Products.Five.bbb.OFS_interfaces.IItem', class
'Products.Five.bbb.OFS_interfaces.ICopySource', class
'Products.Five.bbb.AccessControl_interfaces.IOwned', class
'Products.Five.bbb.App_interfaces.IUndoSupport', class
'Products.Five.bbb.OFS_interfaces.IFindSupport', class
'Products.Five.bbb.OFS_interfaces.ISimpleItem', InterfaceClass
Products.PluggableAuthService.interfaces.plugins.IAuthenticationPlugin,
InterfaceClass
Products.PluggableAuthService.interfaces.plugins.IExtractionPlugin))

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] 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=detailaid=1500669group_id=73177atid=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



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



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



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] 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
(publisher / 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: [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: [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] 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



[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



[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
---BeginMessage---
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()
+ modHeader = 
zope.datetime.rfc1123_date(time.mktime(modified.timetuple()))
+ request = TestRequest(IF_MODIFIED_SINCE=modHeader)
+
+ view = FileTestView(aFile,request)
+ view.show()
+''
+ request.response.getStatus()
+304
+
+
+
+if self.request is not None:
+self.request.response.setHeader('Content-Type',
+self.context.contentType)
+self.request.response.setHeader('Content-Length

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] 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=_(uTrip Type),
| description=_(uTrip Type),
| default=uBusiness,
| required=True,
| values=(uBusiness, uPersonal),
| )
| 
| 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=uImport Zip File,
| description=uZipe file of items to import.,
| required=True,
| )
| 
| replace = zope.schema.Choice(
| title=uReplace 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] 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] 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] 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] 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] 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] 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 INSTANCE_HOME is.
| | 
| | Why is this necessary?
| 
| So the config file for paste.deploy can be in INSTANCE_HOME/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 'INSTANCE/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=41449view=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



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



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 INSTANCE_HOME is.
| 
| Why is this necessary?

So the config file for paste.deploy can be in INSTANCE_HOME/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: 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



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
| 
| yadayada
| xmas hohoho
| easter bunny
| /yadayada
| 
| 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] 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] 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=39675view=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] 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(exit-code)' 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] 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] 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 sectiontype
name=server use sectiontype name=zope.app.twisted.server.

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



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] [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] 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.
vegai 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] 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