Re: [Zope-dev] Re: post publishing hook

2005-04-03 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

Dieter Maurer wrote:
> Christian Heimes wrote at 2005-4-1 22:28 +0200:
> 
>>...
>>You want to bind some actions to the transaction system because you want 
>>to execute some code at the end of the first phase of the 2 phase 
>>commit.
> 
> 
> I do not think that Florent wants to execute things at the end
> or in the first commit phase. Instead, he wants to execute something
> *BEFORE* this phase.
>

That was the initial idea in our case.

> 
>>Hooking into the transaction machinery of ZODB is very easy. Write 
>>your own DateManager implementing the IDateManager interface and 
>>register it into the current transaction using get_transaction.register(DM).
>>
>>For your use case overwrite the tpc_vote() method of the data manager to 
>>do the indexing at the boundary between the two phases.
> 
> 
> This will not work for Florent's use case,
> at least not in the current ZODB (for Zope 2.7).
> 
> Reason:
> 
>   The transaction freezes the set of objects it processes
>   in the commit *BEFORE* the first commit phase.
> 
>   Therefore, no "tpc_vote" is allowed to modify any persistent
>   object. Failure to do so leads to extremely nasty
>   persistency errors (the object is marked changed but
>   no transaction knows about it -- no change to this object in the future
>   will get persisted until a restart).
> 
> 

I've been implementing a IndexationManager hook doing the job for CPS
but I get the error your talking about...

Thanks Dieter for the explanation. Your mail just arrived when I was
trying to understand the persistency problems :(

I got POSKeyError, Unauthorized (at catalog level while indexing and
trying to get object attributs) or KeyError (Connection.setState())
exceptions randomly as well.

Is there a way to hook before the first transaction commit phase ?

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Plateform : http://www.cps-project.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFCUFReGhoG8MxZ/pIRAi2jAJ4hXTAJhqJB8czSkQpVCCBEKzWXtACfXA/m
S4JfeBF+TWweLWPSoxobPEE=
=8zPL
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] [Zope3 / ECM] : Project launched !

2005-05-16 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paris, 16 May 2005

Dear Zope community,

On behalf of Nuxeo, I'm pleased to announce that the Zope3 / ECM project
is launched !

The main goal of this project is to build the next-generation Open
Source ECM Platform on top of Zope3 able to compete with the major
ECM solutions on the market such as Documentum, OpenText, etc...

It's been discussed seriously since last year's Castle sprint, and
some events occurred such as the Zope3 / ECM sprint [1]_ in March in
Paris this year where people from the major Zope2 CMS projects were
represented.  (Plone, Silva, CPS and Zope Corporation people were
there) showing everybody's interests in working together on a common
project as a first commitment in this effort.

.. [1]_
http://blogs.nuxeo.com/sections/blogs/fermigier/2005_03_18_paris_zope3_ecm_five

We believe the first iteration for such a project is to :

 - discuss together and share our respective experiences
 - come up with an architecture that everybody feels good with
 - write specifications
 - validate the specifications.

For now we set up :

 1. a mailing list [2]_

 2. the project's resources repository.  All interested parties are
   welcome / expected to subscribe to the mailing-list and join the
   portal.  The website will soon (in next 2 days) contains
   documentation about some collaboration rules (that will be
   discussed on the mailing- list). For now, it contains a few
   document like some braindumps about the global infrastructure and
   some arcticles. [3]_

 3. Repository with the existing component started during last sprint
plus some new ones [4]_

.. _[2] http://lists.nuxeo.com/mailman/listinfo/z3lab
.. _[3] http://www.z3lab.org
.. _[4] http://svn.nuxeo.org/trac/pub/browser/z3lab/

The project started under the name of z3lab.

What is z3lab ?
===

Z3Lab aims at building a strong community leveraging the experiences
of both individuals and companies that are involved in the Zope ECM/
CMS market nowadays to create the best ECM platform on the market and
offer high-value professional services to customers.

ECM Platform
==

The project's main goals are :

 - to unify the whole Zope/CMS-involved community to drastically reduce
   waste of resources (doing twice or more equivalent components /
   features).

 - to spread Zope3 technology on the market by providing a world class
   ECM Platform with companies providing consulting worldwide and backing
   the project.

Open issues :
==

They are still some open issues that needs to be discussed and fixed :

 - For the moment, Nuxeo is hosting alpha code in its repository but
   this is not intended to be definitive. We just need to agree on a
   place where to put the code.  codespeak.net is an option that will
   be considered seriously. If you want to take part of the discussion
   you may join the z3lab mailing list. But please, do not make it the
   main point of the discussion. There is a lot of work to do even
   before writing a useful single line of code (design / architecture specs
   for example).

 - Licensing : we consider using the ZPL.  Same as above. We would
   really like to avoid all sterile flamewars :-) We have time to
   discuss these point *zenly*

 - Copyright Assignment. Until now the copyright assignment is on
   the contributor.

Though, all the tools we need to start working are in place now and
available on _[3].

To help the project bootstrap, 2 core developers of Nuxeo (Florent
and Me) are staffed full-time on this project.


On of the short term goal is to present some of the components to our
community at EP this year.

All the community has been waiting for a Zope3 based ECM far too long.
It's the right time to move on *together*.

Get involved now ! :)

Best regards,

 J.
- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Plateform : http://www.cps-project.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFCiT5LGhoG8MxZ/pIRAg5VAJ48oT5ikeMJYLniT+ogTfn2KYcyfwCgih+2
FW9LgXjRH3T/BZyayyfSSj8=
=pnJS
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Zope3-dev] Re: Speed win in Python's urllib.quote

2005-09-13 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Actually, this is public :

http://public.dev.nuxeo.com/~ben/funkload/

:)

J.

Martijn Pieters wrote:
> Martijn Pieters wrote:
> 
>>Is this site ment to be public? The name doesn't resolve for me. Is the
>>head from http://svn.nuxeo.org/trac/pub/browser/funkload/ sufficient?
> 
> 
> Reply to self: in the zope3 list the answer to the above question has
> been found; it was "Yes".
> 
> Martijn Pieters
> 
> 
> ___
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )


- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDJqEDGhoG8MxZ/pIRAgCfAJ9yNblBWJ9s9iTYHWGqsObcXZHP1gCfR2Xh
/nLeoaYhJazqtKi2ELStO04=
=Wod1
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] PAS tests failures

2005-11-02 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I got tests failing with the following configuration :

FC4
Zope-2.8.4
Python 2.3.5 / 2.4.2
PAS trunk

as below :

==
FAIL: Doctest: ChallengeProtocolChooser.txt
- --
Traceback (most recent call last):
  File "/opt/Zope-2.8.4/lib/python/zope/testing/doctest.py", line 2102,
in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for ChallengeProtocolChooser.txt
  File
"/home/zopes/zope2.8.4/Products/PluggableAuthService/plugins/tests/ChallengeProtocolChooser.txt",
line 0

and all the failures within this doctest look like this one :

- --
File
"/home/zopes/zope2.8.4/Products/PluggableAuthService/plugins/tests/ChallengeProtocolChooser.txt",
line 260, in ChallengeProtocolChooser.txt
Failed example:
print http(r"""
POST /%s HTTP/1.1
Content-Type: text/xml; charset="utf-8"


test_script

""" % (folder_name), handle_errors=False)
Exception raised:
Traceback (most recent call last):
  File "/opt/Zope-2.8.4/lib/python/zope/testing/doctest.py", line
1315, in __run
compileflags, 1) in test.globs
  File "", line 1, in ?
print http(r"""
  File
"/opt/Zope-2.8.4/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py",
line 180, in http
debug=not handle_errors,
  File "/opt/Zope-2.8.4/lib/python/ZPublisher/Test.py", line 193, in
publish_module
response = publish(request, module_name, after_list, debug=debug)
  File "/opt/Zope-2.8.4/lib/python/ZPublisher/Publish.py", line 144,
in publish
sys.exc_info()[2],
  File "/opt/Zope-2.8.4/lib/python/ZPublisher/Publish.py", line 104,
in publish
object=request.traverse(path, validated_hook=validated_hook)
  File "/opt/Zope-2.8.4/lib/python/ZPublisher/BaseRequest.py", line
461, in traverse
response.unauthorized()
  File "/opt/Zope-2.8.4/lib/python/ZPublisher/HTTPResponse.py", line
684, in unauthorized
raise Unauthorized, m
Unauthorized: You are not authorized to access this
resource.

With Zope-2.7.8 the tests pass just fine.

Any idea about the problem ?

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDaXQHGhoG8MxZ/pIRAkYLAJ4upanns7PRDyYHNgSxHXkJk476IACdFfMy
U6mOq7W8VdrXr0EEcCENIoU=
=JMU+
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] PT preprocessing in XML mode

2005-11-09 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi there,

I'm stuck with a PT behavior I wasn't expecting at all.

Let's say I got this PT sample :


http://namespace.zope.org/tal/";>
  


Then when I render this sample I get the exact above document. The 'tal'
instruction has not been processed !

The exact equivalent in dtml would gimme what I was expecting. (i.e : a
preprocessing of the dtml tags)

The behavior is the same with Zope2 and Zope3 PTs.

Can I consider this as a bug that needs to be fixed ? Or am I missing
something here because it's pretty late :)

J.
- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDcq2cGhoG8MxZ/pIRAjVZAJ0T+jkvXEAsP9bhUTVf79uu467WxwCfeqnQ
534B0KOCT45rLR6qDNWmL1w=
=KNDR
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: PT preprocessing in XML mode

2005-11-09 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tres Seaver wrote:
> Julien Anguenot wrote:
> 
>>> I'm stuck with a PT behavior I wasn't expecting at all.
>>>
>>> Let's say I got this PT sample :
>>>
>>> 
>>> http://namespace.zope.org/tal/";>
>>>   
>>> 
>>>
>>> Then when I render this sample I get the exact above document. The 'tal'
>>> instruction has not been processed !
>>>
>>> The exact equivalent in dtml would gimme what I was expecting. (i.e : a
>>> preprocessing of the dtml tags)
>>>
>>> The behavior is the same with Zope2 and Zope3 PTs.
>>>
>>> Can I consider this as a bug that needs to be fixed ? Or am I missing
>>> something here because it's pretty late :)
> 
> The namespace URI is incorrect;  it should be
> http://xml.zope.org/namespaces/tal
> (see TAL/TALDefs.py).
> 

Thank you Tres ! :) Great !

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDcr8fGhoG8MxZ/pIRAucyAKCChnLiXJ0jgevGIhH0GZpAXAVB/QCgiGY8
rgupRgCV/SGRRngBBHOcKJk=
=uqK+
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] RFC: Reunite Zope 2 and Zope 3 in the source code repository

2005-11-23 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Philipp von Weitershausen wrote:
> Sounds crazy, I know. But I'm serious. Looking for your comments at:
> http://dev.zope.org/Zope3/ReuniteZope2AndZope3InTheSourceCodeRepository
>

I'm -1 on this as well.

Some Zope3 developers don't care about Zope2 and this is fair enough in
my point of view. Zope2 starts to get old and appears to be really a
mess compared to Zope3 in *2005*, plus it's not such an attractive
platform as it used to be couple of years ago. (Don't get me wrong on
this. Time just changed. I'm using Zope2 much more than Zope3 nowadays
and still I like it even if I'm *dreaming* about only using a modern
platform "à la" Zope3) I would fear that some new folks might find the
Zope3 project much more confusing and less attractive because of the
Zope2 mess around. (common mailing list, common repository etc...)

Please, let's not mess up Zope3...

Cheers,

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDhMNqGhoG8MxZ/pIRArjpAJwImKaJLnGO9URfgakS6njnzWzwPwCggHnY
KHhFGbndADW7GLL2UFv33Sw=
=Yppy
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] RFC: Reunite Zope 2 and Zope 3 in the source code repository

2005-11-23 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Philipp von Weitershausen wrote:
> Julien Anguenot wrote:
>> Some Zope3 developers don't care about Zope2 and this is fair enough in
>> my point of view. Zope2 starts to get old and appears to be really a
>> mess compared to Zope3 in *2005*, plus it's not such an attractive
>> platform as it used to be couple of years ago. (Don't get me wrong on
>> this. Time just changed. I'm using Zope2 much more than Zope3 nowadays
>> and still I like it even if I'm *dreaming* about only using a modern
>> platform "à la" Zope3) I would fear that some new folks might find the
>> Zope3 project much more confusing and less attractive because of the
>> Zope2 mess around. (common mailing list, common repository etc...)
>>
>> Please, let's not mess up Zope3...
> 

[...]

> 
> You state correctly that "some Zope 3 developers don't care about Zope2". 
> This might seem
> like a suitable point of view, but as Martijn pointed out very well, it's 
> also a foolish
> one. It limits the acceptance of Zope 3 within the Zope community.

And what about the acceptance of Zope3 *outside* the Zope community ?
Zope3 will look like more complicated and confusing doing a merge. I'm
more concerned about the acceptance of Zope3 outside the Zope community
because Zope2 developers will have to move to Zope3 at a certain time.
It's juste much more easier than for the first people.

> 
> Zope 2 is a mess, I give you that. I'm not asking any Zope 3 developer to 
> re-embrace it,
> though. In fact, the idea of this proposal is not that Zope 2 is going to 
> stay with us
> forever. It is about speeding up the convergence process! 

I understand your motivations Philipp. I just think this is too early.
When Zope2 will look like a Zope3 'configuration' then maybe it could be
of interest.

> There are a good amount of
> people, Martijn and me included, who are working towards improving Zope 2 and 
> we simply
> want to attract more people to help us. 

I still believe Zope2 developers will come on Zope3 pretty easily. The
challenge is people outside the Zope community and I'm more worried
about them.

> Zope 2's architecture might be shitty, but its
> community is bigger, don't forget that. 

I never said shitty. Take it easy on the interpretation. I'm using Zope2
for years and it's with what I'm working daily. I said *old* and it's
different. It's not as attractive as it used to be couple of years ago.
This is a fact. This is why Zope3 exists.

I still believe your proposal would be a mistake at this point for Zope3.

Cheers,

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDhTLOGhoG8MxZ/pIRAmSwAJ0e8d2S/lyXgeTm3dAQgqBh50eJzwCeONEC
52QuaUKLeFESP+Ytar3NkDE=
=bc5x
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Zope3-dev] RFC: Reunite Zope 2 and Zope 3 in the source coderepository

2005-11-24 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lennart Regebro wrote:
> I think this change can possibly make sense when we have replaced Zope
> 2 authentication with Zope 3s, and when we have replaces Zope 2
> publisher with Zope 3s and when we have replaced the Zope 2 traversal
> with Zope3s, and maybe a couple of other things.

Exactly. In this case Zope2 will be a more a 'configuration' of Zope3.
Well, I'm repeating my self here ...

> 
> At that point, Zope2 will more or less be Zope3 + App, DateTime, OFS,
> Products and some other stuff. Then something more of a merge might
> make sense.
> 

yup. This is my impression. This is too early...

> Up until then, we have a functioning system now, and I'm guessing the
> benefits will not outweigh the work.

I can only agree with this on this.

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDhbZWGhoG8MxZ/pIRAjA5AJ9NdWa0lfhoPrngxVK7CV6ttSPqpACeM9Pk
IXBQi5KCZotRxRoO+uJp/j0=
=mZRW
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Please vote about conflict errors logging

2005-12-05 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Florent Guillaume wrote:
> Please vote for the level at which you want to log retried conflict
> errors. These are the ConflictErrors that aren't returned to the user
> but automatically retried by the Zope publisher.
> 
> 1. Do you want these ConflictErrors retried logs to be at level:
> - INFO
> - BLATHER
> - DEBUG
> - not logged
> - other
> 

BLATHER.

> 2. In addition, please specify if you feel those retried ConflictErrors
> should have their full traceback logged?
> - Yes, with traceback
> - No, without traceback

with traceback because of the BLATHER mode above.

> 
> 3. Finally, please tell us if the ConflictErrors that *can't* be retried
> (and are returned to the user as an error, and are also logged to the
> error_log) should be additionally explicitely logged to the event log,
> and at which level:
> - ERROR
> - not logged
> - other
> 

ERROR

> (Also, if you feel the logging should be different between 2.8 and 2.9,
> please say so.)
> 

Of course the same...

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDlNhcGhoG8MxZ/pIRAsg4AJkBPnW4zGrl4GdZxEXXEZCpwcCdswCfU3hE
41XwD/GgOGRNAEC0nYh7lKM=
=qNsx
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] zasync : svn repo and Zope-2.9 branch

2006-02-09 Thread Julien Anguenot
Hi there,

I worked on a Zope-2.9 branch of off the CVS HEAD for zasync this week.
It over there:
http://svn.nuxeo.org/trac/pub/browser/vendor/zasync/branches/z29-nux/

The customer is currently testing out an application using it so it's
supposed to work.
What remains to be done is porting the tests (which sounds like a big
deal looking at the non standard tests there...)

Note, this branch is using an "in house" persistent queue replacing the
BTrees within the zasync manager.

Of course, I'd like to put this branch back to the zope.org repository
but please not in CVS... I don't feel courageous enough to branch and
merge with CVS anymore... Would it be possible to migrate the zasync
component from the cvs.zope.org to svn.zope.org ? I don't know who can
do that ? (Hopefully, we'll have a ZF soon...)

Gary, it would be an occasion to check you persistent queue and see how
we could add this to ZODB and make zasync use it.

Other question : how people would feel about an integration of zasync,
or another implementation, into the Zope core ?

Cheers,

J.

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: zasync : svn repo and Zope-2.9 branch

2006-02-09 Thread Julien Anguenot
Gary Poster wrote:
>> I worked on a Zope-2.9 branch of off the CVS HEAD for zasync this week.
>> It over there:
>> http://svn.nuxeo.org/trac/pub/browser/vendor/zasync/branches/z29-nux/
> 
> awesome!
> 
>>
>> The customer is currently testing out an application using it so it's
>> supposed to work.
>> What remains to be done is porting the tests (which sounds like a big
>> deal looking at the non standard tests there...)
> 
> I don't know.  I was definitely experimenting. :-/  And the "tests" of
> the client don't deserve the name.  I plan to do much better with the
> new version.
> 
>> Note, this branch is using an "in house" persistent queue replacing the
>> BTrees within the zasync manager.
> 
> Cool.
> 
>> Of course, I'd like to put this branch back to the zope.org repository
>> but please not in CVS... I don't feel courageous enough to branch and
>> merge with CVS anymore...
> 
> :-)
> 
>> Would it be possible to migrate the zasync
>> component from the cvs.zope.org to svn.zope.org ? I don't know who can
>> do that ? (Hopefully, we'll have a ZF soon...)
> 
> I don't care about migrating the history, so if noone else does either I
> could try doing a migration.
> 

ok go ahead then. I'll fix the tests just before.

>> Gary, it would be an occasion to check you persistent queue and see how
>> we could add this to ZODB and make zasync use it.
> 
> Cool.  Yes, I'll try to get the persistent queue in ASAP.  I have a few
> small changes, and then I need to make the test changes that Florent
> suggested.
> 

great.


>> Other question : how people would feel about an integration of zasync,
>> or another implementation, into the Zope core ?
> 
> The functionality is certainly very, very useful for large sites (and
> for any site that needs big work done on demand, I guess).  I wonder if
> the configuration approach I took makes it too heavy for the core,
> though.  Certainly, this was a first generation, and there are a number
> of things I wish I had done differently, beyond better tests: I started
> writing them down here, in the beginning of what I plan to be a
> Zope3-based rewrite (largely ZODB-based, hopefully, rather than too many
> dependencies on Zope 3; we'll see):
> http://svn.zope.org/Sandbox/poster/zope.zasync/README.txt?view=auto
> 
> Zope 2 isn't WSGI/Twisted yet, is it?  

nope not yet.

> The zasync rewrite (which I'm
> working on occasionally personally now, and will need at work in a
> couple of months) might work pretty well in Five if the Twisted reactor
> is used in Zope 2.  If not, maybe someone knowledgeable in Medusa could
> write an equivalent.  Finally, maybe others have a zasync approach that
> would be a better choice.
> 
> Within a month or so I hope to put up a proposal for the zasync rewrite
> so folks can comment on it and see if it's going a direction they like
> (or see if they can push me in a direction they like :-).  I am hopeful
> that it will feel "lighter" than the current implementation.
> 
> Alternatively, if there's an effort by other folks to write another
> approach entirely, cool!
>

ok let's wait for your proposal to discuss about it. Sounds great.  You
can expect us to get involved since we're having a huge need of zasync
for a while now. zasync works fine for now on our side (and deeply
overloaded here on production instances ;) Apart from the BTrees
conflicts errors we had, that are fixed now with the persistent queue.

Cheers,

J.
-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Python warnings behavior and stacklevel=2

2006-02-10 Thread Julien Anguenot
Hi there,

I'm having some problems with the warnings module behavior.
(Python-2.4.2 and Zope-2.9 trunk)

[... traceback ... ]

   - Line 71
  Module zLOG, line 140, in LOG
  Module warnings, line 61, in warn
  Module warnings, line 67, in warn_explicit
TypeError: unsubscriptable object

It seems to be referenced on the Python tracker since Python-2.3.3. Has
been fixed and closed but has been updated in January this year.

https://sourceforge.net/tracker/?func=detail&atid=105470&aid=890010&group_id=5470

Specifying a stacklevel of  a workaround, instead of 2 within the
zLOG/__init__.py for instance1, as works fine. (and this seems to appear
within the Python but report)

I actually get the same error and behavior within CPS code using the
warnings module with a stacklevel of 2.

Has someone a proper way to fix this from Zope and / or Python or can we
simply change the StackLevel of the deprecation warnings to 1 waiting
for a proper fix in Python ?

Cheers,

    J.

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Python warnings behavior and stacklevel=2

2006-02-11 Thread Julien Anguenot
Tim Peters wrote:
> [Julien Anguenot]
>> I'm having some problems with the warnings module behavior.
>> (Python-2.4.2 and Zope-2.9 trunk)
>>
>> [... traceback ... ]
>>
>>- Line 71
>>   Module zLOG, line 140, in LOG
>>   Module warnings, line 61, in warn
>>   Module warnings, line 67, in warn_explicit
>> TypeError: unsubscriptable object
>>
>> It seems to be referenced on the Python tracker since Python-2.3.3. Has
>> been fixed and closed but has been updated in January this year.
>>
>> https://sourceforge.net/tracker/?func=detail&atid=105470&aid=890010&group_id=5470
> 
> I expect that referencing that bug report is just misleading here: 
> none of the bad behaviors listed in that bug report occur under Python
> 2.4.2 (I just tried all of 'em).
> 
>> Specifying a stacklevel of  a workaround, instead of 2 within the
>> zLOG/__init__.py for instance1, as works fine. (and this seems to appear
>> within the Python but report)
> 
> None of the provoking code in the bug report used stacklevel.  There's
> a line of _output_ in the bug report, from a pdb session, where pdb
> showed the first line of the warnings.warn() function, showing that
> `stacklevel` is a formal argument of `warn()`, and that it defaults to
> 1:
> 

Right. It should be a message originating the bug report that mentioned
this information. My mistake...

I guess I did read this before :
http://mail.zope.org/pipermail/zope-dev/2004-February/021622.html

> (Pdb) s
> --Call--
>> /usr/lib/python2.3/warnings.py(24)warn()
> -> def warn(message, category=None, stacklevel=1):  # this is pdb
> output, not input
> 
> There's no other mention of `stacklevel` in the report.
> 
>> I actually get the same error and behavior within CPS code using the
>> warnings module with a stacklevel of 2.
>>
>> Has someone a proper way to fix this from Zope and / or Python or can we
>> simply change the StackLevel of the deprecation warnings to 1 waiting
>> for a proper fix in Python ?
> 
> All the symptoms in the bug report are already fixed.  In the absence
> of a new bug report, nothing else _will_ be fixed in Python related to
> this.
> 

right. I'll try to reproduce this on 'pure' Python code.

> The _cause_ of those bugs in the first place was an internal Python
> error:  one of the internal functions didn't propagate exceptions
> properly back to the eval loop.
> 
> It's possible that other cases like that exist, in Python itself or in
> a C extension module (it's actually a pretty common error in extension
> modules).  Progress requires a small test case demonstrating the
> problem; the bug report contained several small test cases
> illustrating symtpoms, but all of those have been repaired, so if
> there's another bug it requires another test case to track it down.

I feel it's related to Zope Python scripts but that's only suspicions
right now since all the errors we are having are in this context.

I'll dig more in it and see if I can get more information.

Thank you for the reply Tim.

J.


-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Python warnings behavior and stacklevel=2

2006-02-11 Thread Julien Anguenot
Tres Seaver wrote:
> Tim Peters wrote:
>>> [Julien Anguenot]
>>>
>>>> I'm having some problems with the warnings module behavior.
>>>> (Python-2.4.2 and Zope-2.9 trunk)
>>>>
>>>> [... traceback ... ]
>>>>
>>>>   - Line 71
>>>>  Module zLOG, line 140, in LOG
>>>>  Module warnings, line 61, in warn
>>>>  Module warnings, line 67, in warn_explicit
>>>> TypeError: unsubscriptable object
>>>>
>>>> It seems to be referenced on the Python tracker since Python-2.3.3. Has
>>>> been fixed and closed but has been updated in January this year.
>>>>
>>>> https://sourceforge.net/tracker/?func=detail&atid=105470&aid=890010&group_id=5470
>>>
>>> I expect that referencing that bug report is just misleading here: 
>>> none of the bad behaviors listed in that bug report occur under Python
>>> 2.4.2 (I just tried all of 'em).
>>>
>>>
>>>> Specifying a stacklevel of  a workaround, instead of 2 within the
>>>> zLOG/__init__.py for instance1, as works fine. (and this seems to appear
>>>> within the Python but report)
>>>
>>> None of the provoking code in the bug report used stacklevel.  There's
>>> a line of _output_ in the bug report, from a pdb session, where pdb
>>> showed the first line of the warnings.warn() function, showing that
>>> `stacklevel` is a formal argument of `warn()`, and that it defaults to
>>> 1:
>>>
>>> (Pdb) s
>>> --Call--
>>>
>>>> /usr/lib/python2.3/warnings.py(24)warn()
>>> -> def warn(message, category=None, stacklevel=1):  # this is pdb
>>> output, not input
>>>
>>> There's no other mention of `stacklevel` in the report.
>>>
>>>
>>>> I actually get the same error and behavior within CPS code using the
>>>> warnings module with a stacklevel of 2.
>>>>
>>>> Has someone a proper way to fix this from Zope and / or Python or can we
>>>> simply change the StackLevel of the deprecation warnings to 1 waiting
>>>> for a proper fix in Python ?
>>>
>>> All the symptoms in the bug report are already fixed.  In the absence
>>> of a new bug report, nothing else _will_ be fixed in Python related to
>>> this.
>>>
>>> The _cause_ of those bugs in the first place was an internal Python
>>> error:  one of the internal functions didn't propagate exceptions
>>> properly back to the eval loop.
>>>
>>> It's possible that other cases like that exist, in Python itself or in
>>> a C extension module (it's actually a pretty common error in extension
>>> modules).  Progress requires a small test case demonstrating the
>>> problem; the bug report contained several small test cases
>>> illustrating symtpoms, but all of those have been repaired, so if
>>> there's another bug it requires another test case to track it down.
> 
> I wonder if Julian's problem stems from using the 'threadframe'
> extension, which is a prerequisite for the DeadlockDebugger;  I think I
> recall seeing an odd symptom like that in a sandbox where I had
> DeadlockDebugger running.
> 

Nope not in this case.

J.


-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Python warnings behavior and stacklevel=2

2006-02-13 Thread Julien Anguenot
Florent Guillaume wrote:
> Julien Anguenot wrote:
>> Tim Peters wrote:
>>> [Julien Anguenot]
>>>> I'm having some problems with the warnings module behavior.
>>>> (Python-2.4.2 and Zope-2.9 trunk)
>>>>
>>>> [... traceback ... ]
>>>>
>>>>- Line 71
>>>>   Module zLOG, line 140, in LOG
>>>>   Module warnings, line 61, in warn
>>>>   Module warnings, line 67, in warn_explicit
>>>> TypeError: unsubscriptable object
>>>>
> 
> I've had this too, and I believe it appears if you have a frame
> referencing a python script (or maybe an external method) in the stack.
> 

You'll get the error if you run the CPSDefaul tests against a Zope-2.9
branch, for instance.

J.

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Python warnings behavior and stacklevel=2

2006-02-17 Thread Julien Anguenot
Stefan H. Holek wrote:
> This turned out to be a bug in FSPythonScripts (no __file__ in script
> globals). Fixed on all branches of CMF >= 1.5.
> 

Great ! Thanks.

J.

> 
> On 13. Feb 2006, at 16:48, Julien Anguenot wrote:
> 
>> Florent Guillaume wrote:
>>> Julien Anguenot wrote:
>>>> Tim Peters wrote:
>>>>> [Julien Anguenot]
>>>>>> I'm having some problems with the warnings module behavior.
>>>>>> (Python-2.4.2 and Zope-2.9 trunk)
>>>>>>
>>>>>> [... traceback ... ]
>>>>>>
>>>>>>- Line 71
>>>>>>   Module zLOG, line 140, in LOG
>>>>>>   Module warnings, line 61, in warn
>>>>>>   Module warnings, line 67, in warn_explicit
>>>>>> TypeError: unsubscriptable object
>>>>>>
>>>
>>> I've had this too, and I believe it appears if you have a frame
>>> referencing a python script (or maybe an external method) in the stack.
>>>
>>
>> You'll get the error if you run the CPSDefaul tests against a Zope-2.9
>> branch, for instance.
>>
> -- 
> Anything that happens, happens.  --Douglas Adams
> 
> 


-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Can logreopen restarts Zope ?

2006-06-30 Thread Julien Anguenot
Hi there,

I observed a strange behavior yesterday night on one of our ZEO cluster.

We got 4 ZEO servers on the cluster. We are rotating the ZEO logs once
every night using logreopen. Until now, we didn't observe any
misbehavior. Meaning, logs were rotated and then reopened ok on the four
of them every night since couple of weeks now.

Yesterday night, we were having a long nightly running process (several
hours) on one of the ZEO node. (Around 500 Mo logs on this one). The
reopen occurred while the Zope server was still working. The reopen went
ok but it restarted the Zope server at the same time which of course
stopped the actual running operation of ours.

Did someone experienced this ?

Any feedbacks appreciated.

Thanks.

J.

P.S : Python-2.4.2, Zope-2.9.0

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
Open Source ECM - www.nuxeo.com
CPS Platform - http://www.cps-project.org
Mobile: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Can logreopen restarts Zope ?

2006-06-30 Thread Julien Anguenot
Jens Vagelpohl wrote:
> 
> On 30 Jun 2006, at 13:40, Julien Anguenot wrote:
>>> Yesterday night, we were having a long nightly running process (several
>>> hours) on one of the ZEO node. (Around 500 Mo logs on this one). The
>>> reopen occurred while the Zope server was still working. The reopen went
>>> ok but it restarted the Zope server at the same time which of course
>>> stopped the actual running operation of ours.
>>>
>>> Did someone experienced this ?
>>>
>>> Any feedbacks appreciated.
> 
> For maximum reliability I tend to forego the built-in log reopening in
> favor of using the logrotate utility in "copytruncate" mode. This will
> not require any log file reopening, logrotate will simply make a copy of
> the existing log and then truncate the logfile that continues to be in
> use to zero length. Zope or the ZEO server won't have to know or care at
> all at that point.

Thank you Jens for the quick reply.

I think I'm going to send these instructions, to be on the safe side, to
the administrators taking care of the cluster.

Do you have any idea about the "zopectl logreopen" misbehavior as
someone who's avoiding using it explicitly ;) ?

Cheers,

J.

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
Open Source ECM - www.nuxeo.com
CPS Platform - http://www.cps-project.org
Mobile: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Can logreopen restarts Zope ?

2006-06-30 Thread Julien Anguenot
Jens Vagelpohl wrote:
> 
> On 30 Jun 2006, at 14:30, Julien Anguenot wrote:
>>>> For maximum reliability I tend to forego the built-in log reopening in
>>>> favor of using the logrotate utility in "copytruncate" mode. This will
>>>> not require any log file reopening, logrotate will simply make a copy of
>>>> the existing log and then truncate the logfile that continues to be in
>>>> use to zero length. Zope or the ZEO server won't have to know or care at
>>>> all at that point.
>>>
>>> Thank you Jens for the quick reply.
>>>
>>> I think I'm going to send these instructions, to be on the safe side, to
>>> the administrators taking care of the cluster.
>>>
>>> Do you have any idea about the "zopectl logreopen" misbehavior as
>>> someone who's avoiding using it explicitly ;) ?
> 
> I'm afraid I don't. I have seen issues myself where the server would
> just die and not come up again, but never investigated it. The logreopen
> solution offers a safe and lasting fix and it even simplifies log
> rotation configuration.
> 
> Here's a very simple one that rotates ZEO server and client logs for a
> simple one-client ZEO setup, we use it for www.zope.de:
> 
> [EMAIL PROTECTED] ~]$ cat /etc/logrotate.d/zope.de
> /home/zope/zope.de/log/*.log {
> weekly
> rotate 10
> missingok
> compress
> copytruncate
> }

Alright. Thank you for the configuration script.

J.

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
Open Source ECM - www.nuxeo.com
CPS Platform - http://www.cps-project.org
Mobile: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )