[Zope-Coders] Zope tests: 8 OK

2005-07-16 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Fri Jul 15 11:01:02 2005 UTC to Sat Jul 16 11:01:02 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:26:06 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002599.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:27:37 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002600.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:29:07 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002601.html

Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:30:37 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002602.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:32:07 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002603.html

Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:33:37 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002604.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:35:07 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002605.html

Subject: OK : Zope-trunk Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Fri Jul 15 23:36:37 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-July/002606.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope-Coders] Upcoming 2.8.1 release

2005-07-16 Thread Tim Peters
[Andreas Jung]
 Just the usual reminder from the release management :-) Zope 2.8.1 b1 will
 be released next Wednesday

Is this correct?  Please confirm.

http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/MilestonePlan

still says

2.8.1 b1: 2005/7/27 
2.8.1 final: 2005/08/10

and next Wednesday is a week earlier than what that says.

 and 2.8.1 final two weeks later.

Which would be 8/3, again a week earlier than the published 8/10.

 Please commit any pending fixes for 2.8.1 before the beta 1 release
 and not between beta and final release.

This gets difficult for me (read ZODB) if I've got only 2 days now
instead of the 9 I planned on.
___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope-Coders] Upcoming 2.8.1 release

2005-07-16 Thread Andreas Jung



--On 16. Juli 2005 14:57:01 -0400 Tim Peters [EMAIL PROTECTED] wrote:


[Andreas Jung]

Just the usual reminder from the release management :-) Zope 2.8.1 b1
will be released next Wednesday


Is this correct?  Please confirm.

http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/MilestonePlan

still says

2.8.1 b1: 2005/7/27
2.8.1 final: 2005/08/10



Argh...you're right again...I wonder why my Ical has all release dates one 
week earlier. I was not my goal to annoy or anger you :-) The milestone 
plan is correct.


Never-plan-release-while-having-a-glass-of-wine-or-two,
Andreas


pgpItc790j2Yd.pgp
Description: PGP signature
___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-dev] Upcoming 2.8.1 release

2005-07-16 Thread Andreas Jung
Just the usual reminder from the release management :-) Zope 2.8.1 b1 will 
be released next Wednesday and 2.8.1 final two weeks later. Please commit 
any pending fixes for 2.8.1 before the beta 1 release and not between beta 
and final release.


Thanks,
Andreas

pgpRkuCGSACG7.pgp
Description: 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: [Zope-Coders] Upcoming 2.8.1 release

2005-07-16 Thread Tim Peters
[Andreas Jung]
 Just the usual reminder from the release management :-) Zope 2.8.1 b1 will
 be released next Wednesday

Is this correct?  Please confirm.

http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/MilestonePlan

still says

2.8.1 b1: 2005/7/27 
2.8.1 final: 2005/08/10

and next Wednesday is a week earlier than what that says.

 and 2.8.1 final two weeks later.

Which would be 8/3, again a week earlier than the published 8/10.

 Please commit any pending fixes for 2.8.1 before the beta 1 release
 and not between beta and final release.

This gets difficult for me (read ZODB) if I've got only 2 days now
instead of the 9 I planned on.
___
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: [Zope-Coders] Upcoming 2.8.1 release

2005-07-16 Thread Andreas Jung



--On 16. Juli 2005 14:57:01 -0400 Tim Peters [EMAIL PROTECTED] wrote:


[Andreas Jung]

Just the usual reminder from the release management :-) Zope 2.8.1 b1
will be released next Wednesday


Is this correct?  Please confirm.

http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/MilestonePlan

still says

2.8.1 b1: 2005/7/27
2.8.1 final: 2005/08/10



Argh...you're right again...I wonder why my Ical has all release dates one 
week earlier. I was not my goal to annoy or anger you :-) The milestone 
plan is correct.


Never-plan-release-while-having-a-glass-of-wine-or-two,
Andreas


pgp1kB7jXknVb.pgp
Description: 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] Cool monkey patch to make tracebacks more useful :-)

2005-07-16 Thread Chris Withers

Dieter Maurer wrote:

I had a similar experience but solved it by modifying
zLOG.EventLogger.log in the following way:

# DM 2005-06-27: Zope style tracebacks
from zExceptions.ExceptionFormatter import format_exception

# DM 2005-06-27: we now use Zope's traceback format because
#  it is more informative
#self.logger.log(level, msg, exc_info=(error is not None))
exc_class = sys.exc_info()[0]
if error and exc_class is not None: # Note: error is a boolean!
msg += '\n' + ''.join(format_exception(*sys.exc_info()))
self.logger.log(level, msg)


I like this one too :-)

That just leaves the traceback printed by pdb, anyone reckon they can 
get that to use the sensible formatter? ;-)



Maybe, code like this should move into the Zope core?


*shrugs* I'm quite happy with it as a product that I can add and remove 
as required...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Cool monkey patch to make tracebacks more useful :-)

2005-07-16 Thread Chris Withers

Lennart Regebro wrote:

This bugged me, so I had a dig, and just discovered this cool monkey
patch, to be inserted in any module that gets imported before an
exception is raised:


So, could this be in the unit test module itself, for example?


Well, like I said, I'm gonna roll up a load of these type patches into a 
little product and release it :-)
(the benefits of this product would only be missed if an error occurred 
before it was imported, and the benefits aren't likely to be very 
beneficial at that stage ;-)



Ever noticed how it's near impossible to figure out what actually
causes an error when you run functional tests? Can you fix that too?
:-)


Depends what you mean by functional tests!


I used to do this in all my functional test cases:

def getTraceback(self, response):
return getattr(response._response, '_text_traceback', None)

def assertResponse(self, response, status, message=''):
if not response.getStatus() == status:
tb = self.getTraceback(response)
if tb is not None:
raise self.failureException, tb
else:
raise ValueError, Response had status %s, expected %s. %s % (
response.getStatus(), status, message)



Hmm, if something failed, I'd just consult the event log, which I always 
copy all errors to.



And then end all my tests with:
self.assertResponse(response, 200)


Sounds good, but we use Zelenium ;-)


And that _used_ to print out any exception that had occurred, but in
newer version of Zope this never happens. There sinmply never is and
_text_exception on the response anymore. Any ideas on how to get a
useable exception report on unit tests?


Ugh? on unit tests? my patch works exactly as I want on unit tests. 
What, specifically, are you referring to?


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] servlet filter like behaviour

2005-07-16 Thread Chris Withers

Laurian Gridinoc wrote:


How it is possible to wrap the response of a subtree?
For example, for the path /foo/bar/baz, a script located at
/foo/wrapper would catch the output of the rest of the request path
(./bar/baz) and do a transformation upon it (gzip, xslt, etc).


Well, if you make 'foo' a python script or page template, /bar/baz will 
be available in the traverse_subpath variable and you can do whatever 
you want with them :-)


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] XUF and Postgres

2005-07-16 Thread David Pratt
Hi Garth. Yes, it is very compact compared to XUF for sure. Thank you 
for this feedback. I will be evaluating this option as well.  There are 
differences in licensing that may be a factor in what I decide to use 
after some evaluation.  BSD with XUF compared to MIT with 
SimpleUserFolder.  I have tended to stick with ZPL and BSD only 
sources. I try to learn from GPL-like sources as opposed to using them 
in my code. This may be a factor in my decision despite the fact that 
SimpleUserFolder may be smaller and simpler to implement.


Regards,
David

On Friday, July 15, 2005, at 08:57 PM, Garth B. wrote:


For what it's worth, I recently used the SimpleUserFolder for an
application that uses Postgres as the backend.  It was terrifically
easy to implement authentication through Postgres via the
SimpleUserFolder.  It does exactly what I want without unnecessary
frill or complications.

Garth


On 7/15/05, Dieter Maurer [EMAIL PROTECTED] wrote:

David Pratt wrote at 2005-7-14 20:30 -0300:

Thanks Dieter. I was really hoping it is a good solution since it is
the only User Folder product for Postgres that I have seen thus far.


Chris Withers would tell you, that Simple User Folder can do this
as well :-)

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


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


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Change user (pythonic)

2005-07-16 Thread Jan-Ole Esleben
Hi!

I can't seem to figure out from the documentation or through web
research how it is possible to change the currently logged in user
pythonically (e.g. in an fs product or extension method).

Can anybody give me a hint?

TIA,
Ole
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change user (pythonic)

2005-07-16 Thread Andreas Jung



--On 16. Juli 2005 19:54:52 +0200 Jan-Ole Esleben [EMAIL PROTECTED] wrote:


Hi!

I can't seem to figure out from the documentation or through web
research how it is possible to change the currently logged in user
pythonically (e.g. in an fs product or extension method).

Can anybody give me a hint?



Something like this should work (taken from zopewiki.org):

In [10]?: from AccessControl?.SecurityManagement? import 
newSecurityManager, getSecurityManager

In [11]?: user = app.acl_users.getUser('jean').__of__(app.portal.acl_users)
In [12]?: newSecurityManager(None, user)
In [13]?: getSecurityManager().getUser() # just to verify it.
Out[13]?: jean
In [14]?: app.fab.materials.invokeFactory('Material', 'test11')
In [15]?: mat = getattr(app.fab.materials, 'test11')
In [16]?: mat
Out[16]?: Material at /fab/materials/test11

-aj


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


Re: [Zope] Cool monkey patch to make tracebacks more useful :-)

2005-07-16 Thread Dieter Maurer
Chris Withers wrote at 2005-7-15 20:33 +0100:
 ...
That just leaves the traceback printed by pdb, anyone reckon they can 
get that to use the sensible formatter? ;-)

Do you get a traceback by pdb?

   I only get information of the form
   *** TypeError: exceptions.TypeError instance at 0x405e0cac

This is even more stupid than Microsoft error messages.


Today, I have been so annoyed by this that I decided to
improve pdb in this respect and donate the patch
as a feature for the Python core...


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


Re: [Zope] emergency user account does not work

2005-07-16 Thread Dieter Maurer
Tim Suter wrote at 2005-7-15 15:55 -0500:
After logging out of the ZMI, I have tried to log in as the emergency
user by filling in the proper credentials.  The page never loads.  Could
there be a tick

I am not aware of any such trick.

Usually, it simply works


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


[Zope] Creating Photo object from an Image object

2005-07-16 Thread Thomas Adams

Hi,

I have a problem with the Photo product. I want to create a Photo 
object from an existing Image object.
I have a form with id and title input tags which are initialized with 
appropriate values from a special folder where

the Image objects resides
.
Now I have written a PythonSript to handle the creation of a new Photo 
object

#id1,title1  image id and  tile
def doAddPhoto(id1, title1):
   # some comments
   
  
   img = context.getObjectById(id1) # this returns the object part of 
object item array from context.objectItems
   s=ph +str(id1)   
   context.manage_addPhoto(id=s, file=img.data,title=title1, 
displays=None, precondition='', content_type='image/jpeg') (line 12)



If I submit the form, an error occurs:

Traceback (innermost last):
 Module ZPublisher.Publish, line 101, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 39, in call_object
 Module Shared.DC.Scripts.Bindings, line 306, in __call__
 Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
 Module Products.PythonScripts.PythonScript, line 323, in _exec
 Module None, line 12, in doAddPhoto
  - PythonScript at /www.ecommerce.de/doAddPhoto
  - Line 12
AttributeError: manage_addPhoto


When I try it with context.manage_addImage everything works fine.

I can't figure out why the above Exception is thrown, the source code
of Photo's manage_addPhoto function looks as similar as the
manage_addImage function of the Image class (from which Photo is derived)
and i have no clue where the pitfall is.

Does anybody have an idea or a hint?

Help would be appreciate.

Thanks in advance

Thomas Adams




begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 54 03 28 96
version:2.1
end:vcard

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


[Zope] numeric formatting

2005-07-16 Thread David H

Hi List,

I will have to format numbers based on country and currency types.

I understand the locale module can do this.  I've done some googling on 
this but cant seem to get anything definitive.  I've read that the local 
module is not thread-safe but I do not know how this would impact my 
Zope app.  I do know that I would want to be able to change from one 
currency format to another depending on which currency conversation the 
user may want.


Really my question is, what approach is recommended for a Zope 
application to format numbers according to currency type? 


David



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Folder property with dtml

2005-07-16 Thread David Pratt
I want to test for a value of a folder property to conditionally 
include css in a css.dtml
instead of putting a condition on the whole css file in zpt or adding 
additional css

to unstyle and restyle in some classes in same skin.

Something like this...

dtml-if 'here.my_property == some_value'
some css here ...
dtml-if 

Can someone advise of a way of getting property for comparison directly 
without having to
write a script python to return context.my_property. I have to say I 
really only use
dtml for zsql so it is a bit foreign compared to ZPT. I could not find 
anything
in Zope book about getting a folder property without knowing the folder 
name first.


Regards
David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )