Re: [Zope-dev] Zope 2.1.6 DateTime bug: daylight saving time not handled -- with patch

2000-05-29 Thread Steve Alexander

Dieter Maurer wrote:
 
 The Zope 2.1.6 DateTime module does not recognize daylight saving time.

You might find Shane Hathaway's revision of DateTime.py useful.

  http://www.zope.org/Members/hathawsh/DateTime.py

It corrects many rounding errors, as well as the problems with daylight
saving time.

I believe it is the version that will be in Zope 2.2

--
Steve Alexander
Software Engineer
Cat-Box limited

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Data.fs corruption (reproducable)

2000-05-29 Thread Dr. Peer Griebel

FYI: I managed to solve the problem. I simply took the third parameter
out of the parameter list and initialized the variable inside the
function:

def FormatPreis( v, n=2, thou=regex.compile(
   "\([0-9]\)\([0-9][0-9][0-9]\([,.]\|$\)\)").search)

becomes

def FormatPreis( v, n=2 )

The new code is a little bit less efficient. But this doesn't hurt us.

Special thanks to Pavlos Christoforou [EMAIL PROTECTED]!

-- 
connection reset by
  Peer

___
Dr. Peer Griebel  Tel. +49 7581 4831 23
Geschäftsführer   Fax. +49 7581 4831 11
Knoll Informationssysteme GmbH   http://www.knoll-is.de
Dreiköniggasse 17   mailto:[EMAIL PROTECTED]
88348 Saulgauprivat: mailto:[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Memory 2.1.4-2.1.6 a.k.a. how to get objects out ofthe cache

2000-05-29 Thread Stuart 'Zen' Bishop

On Sat, 27 May 2000, Eric Sattler wrote:

 I do see GenericUserFolder and SQLSession objects with the
 Control_Panel_Debug screen, and they do not seem to go away.  I wrote
 a simple python script to do nothing more than authenticate (log in)
 using the GenericUserFolder method docLogin.  The memory usage quickly
 grows out of control.  After waiting 15 minutes(my cookie timeout),
 no decrease in memory usage.  The objects are still in the cache also. 

Phillip J. Eby identified a memory leak in GenericUserFolder over the 
weekend. I'm just downloading LoginManager now to see if I can steal 
their fix :-) (Oh... thats easy. Just search for 'Waaa!')

There is also a good chance that this is also causing the SQLSession
leak - GUF is maintaining a reference to REQUEST (in a nice circular
way causing the memory leak), and REQUEST maintains a reference to
the SESSION, so the SESSION won't be freed.

I should have a patch available shortly. I would appreciate people
who know how to drive the debuggers better than I confirming that
the leak is gone.

/me hops on the 'real garbage collection for Python' bandwagon

-- 
Stuart Bishop  Work: [EMAIL PROTECTED]
Senior Systems Alchemist   Play: [EMAIL PROTECTED]
Computer Science, RMIT University





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] New GUF (1.2.3)

2000-05-29 Thread Stuart 'Zen' Bishop

I think I've fixed the memory leak identified over the weekend in GUF. 
This leak may also have caused {SQL,FS}Session to leak through no fault of
their own. Could people who are experiencing the problem try out the
new version and let me/zope-dev know the results. I'll announce the release
on zope.org soonish, giving the guinee^h^h^h^h^h^hzope-dev members a
chance to give it a poke.

-- 
Stuart Bishop  Work: [EMAIL PROTECTED]
Senior Systems Alchemist   Play: [EMAIL PROTECTED]
Computer Science, RMIT University


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Really buggy digest software

2000-05-29 Thread Dieter Maurer

Dear administrators,

the mailing list digests are really buggy.
I have reported some problems some days ago.

Today, I ran against a new problem:

  I got "Zope-Dev digest, Vol 1 #543 - 20 msgs" 6 times and 
  "Zope digest, Vol 1 #801 - 57 msgs" twice.


Maybe, you should consider replacing this software by
another mailing list management system.


Dieter


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Memory 2.1.4-2.1.6 a.k.a. how to get objects out of the cache

2000-05-29 Thread Eric Sattler

Shane Hathaway wrote:
 
 Stuart 'Zen' Bishop wrote:
  /me hops on the 'real garbage collection for Python' bandwagon
 
 Have you looked at this?
Yes, I actually built, installed and enabled it.  It doesn't seem
to have a major impact on my problems at least...neither does Zen's
latest set of fixes.  I enabled Neil Schemenauer's fixes, rebuilt 
python, and then tried tracking through chunks of the CPickleCache
code.  There did not seem to be any hanging python references.  I 
believe the problem to be circular zope references on a higher level.

I could be wrong though.  The gc code for cPickleCache.c is not trivial,
and I believe there is something wrong there, but have not proved it
yet.  This is the code that determines when things are removed from the
zope cache.

The wierd thing is that in my case, I am not really writing anything
to the Zope db.  Everything is stored externally in a postgres database.
I am using GUF, and SQLSession though.  

Could it be that connection objects are not being cleaned up properly?
As far as I understand it, connection objects are containers for zope
objects
for the duration of that request.

At least in the case of postgres 6.5.3 there was some connection memory
leaks, so I did try postgres 7.0, it solved some of postgres's problem
but not zope's.

sorry for rambling, just trying to get all of the tidbits that I know
out there, maybe someone will see something.

eric.


 
 http://www.enme.ucalgary.ca/~nascheme/python/gc.html
 
 I'd like to know how successful this project is.  I wonder whether it
 would have an issue with ExtensionClass instances (one of the
 foundations of Zope).
CPickleCache
 
 Shane
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Calling DTML methods from Python

2000-05-29 Thread Kevin Dangoor

I believe this is in the Collector... My guess is that no one has yet
figured out a good way to make the client and namespace be passed in
automatically. This may not be desirable anyhow, because there may be times
when you want to change the client... I've actually done this once or twice.

I guess there could be something like dtml-var fooMethod params="x,y,z".
This is another one of those things that trips up newbies almost
universally, so a good solution here could really help...

Kevin

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Zope-Dev Mailing List" [EMAIL PROTECTED]
Sent: Monday, May 29, 2000 12:32 PM
Subject: Re: [Zope-dev] Calling DTML methods from Python


 On more of a ranting rather than a genuine question note,

 Why does this _horrible_ syntax for calling methods with parameters
 still have to be used?

 dtml-[whatever] "someFunc(_.None,_,[parameters])"

 *blech*

 Chris



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Calling DTML methods from Python

2000-05-29 Thread Chris Withers

Kevin Dangoor wrote:
 I believe this is in the Collector... My guess is that no one has yet
 figured out a good way to make the client and namespace be passed in
 automatically. This may not be desirable anyhow, because there may be times
 when you want to change the client... I've actually done this once or twice.

Is it just me or is there a lot of confusion between the terms
namespace, self, client, and the REQUEST object (which, unlike it's name
implies, seems to contain a lot more than stuff relating to the HTTP
request, like the RESPONSE object, for example ;-)

Perhaps this could be shaken down and then, a first for the Zope
community I believe ;-), _documented_ somewhere!!!

cheers,

Chris

PS: what is the client anyway? what exactly is in _? why is the RESPONSE
object an attribute of the REQUEST object?!

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Calling DTML methods from Python

2000-05-29 Thread Andrew Wilcox

Is it just me or is there a lot of confusion between the terms
namespace, self, client, and the REQUEST object (which, unlike it's name
implies, seems to contain a lot more than stuff relating to the HTTP
request, like the RESPONSE object, for example ;-)

Perhaps this could be shaken down and then, a first for the Zope
community I believe ;-), _documented_ somewhere!!!

Well, as far as I've been able to figure out.  But everybody correct me
where I get it wrong:

When a DTML Document is called from the web, it gets itself as the client
argument and a namespace as the second argument.  Note that it gets itself
twice: first as the standard Python object oriented "self" argument and
then as the client argument.

I seem to recall there's some magic in there where the the object is
wrapped in an acquisition class so that it can do a self.REQUEST, but I'm
not sure.

Any DTML methods called by the first object get None passed in as the
client argument.  Importantly, DTML methods do not lookup variables in
themselves (i.e. from the Python "self"), but only from the namespace.  The
original object has been added to the namespace at this point so these
called methods are able to access things.

An example would be if you had a DTML method called "doit" sitting in a
folder next to "standard_html_header".  Because doit acquires from its
container, you could say "doit.standard_html_header" from Python because
standard_html_header is a property of the containing folder.  But using
"dtml-var standard_html_header" from inside doit only works if
standard_html_header is available in the namespace.

External methods add more fun :-).  As noted in the documentation, the
enclosing folder will be passed in automatically if you call the first
argument "self" (and you pass in yourself one fewer argument than the
function calls for).  Note this is NOT the standard python object oriented
"self" argument, which would be the external method sitting in the ZODB if
anything, but the enclosing folder.  You do have to call it "self" or you
don't get anything.  The "self" argument is able to acquire REQUEST so you
can say "self.REQUEST", but you don't get a namespace automatically.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Calling DTML methods from Python

2000-05-29 Thread Rik Hoekstra

Is it just me or is there a lot of confusion between the terms
namespace, self, client, and the REQUEST object (which, unlike it's name
implies, seems to contain a lot more than stuff relating to the HTTP
request, like the RESPONSE object, for example ;-)

Perhaps this could be shaken down and then, a first for the Zope
community I believe ;-), _documented_ somewhere!!!


OK, I'll set up a DTML Quick Reference on the ZDP site right now! It's link
is

http://zdp.zope.org/portals/beginners/DQR

We should be able to get this in place. Contributions sought!


Rik


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Expression syntax for sort= attribute in dtml-in .. tag.

2000-05-29 Thread Shane Hathaway

Adam Karpierz wrote:
 
 It's very, very...  great news that Ross Lazarus's multikey
 sort patch for dtml-in tag is included in current Zope CVS
 and will be included in Zope 2.2.
 
 dtml in "foo" sort=akey,anotherkey
 
 But for me one important thing is very missed.
 Possibillity of use expression syntax for sort= attribute.
 
 Maybe syntax:
 dtml in "foo" sort="expression_which_returns_sort_keys_string"
 would be possible ?
 
 eg.
 dtml in "foo" sort="fun()"
 where fun() will returns appropriate Python string
 eq. 'firstname,surname,height, width,weight'  :)

It wouldn't be very difficult to do, but I wonder whether you (Adam) may
have developed such a patch already?  It would sure speed along the
process.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Z SQL: optional isn't?

2000-05-29 Thread Dieter Maurer

Kyler B. Laird writes:
  I'd like to build a Z SQL method for *many*
  people to use to list courses that we offer.
  I don't want to require that all queries
  using it understand all of the columns, but
  I do want to be able to modify the query in
  many ways.
  
  This works only if I provide at least an empty
  string for all values.  If I don't provide a
  value at all for one of the arguments, I get
   Error, Bad Request: ['version'] 
You want to use "default values" in your SQL method argument list.

The details are described in "ZSQL/ZSQL.2.5.2.html".

You already got this advice. You failed, because you used
the wrong kind of quotes (i.e. single rather than double quotes).
Quote from "ZSQL2.5.2.html":

 See Database method input argument format: Argument name and type are
 separated by a colon. A equal sign separates the default value from
 the name and type. The default value is a string representation of the
 desired value. If the default value contains spaces, or is an empty
 string, then it must be surrounded by double quotes.)

 Pattern:name:type="default"

Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Z SQL: optional isn't?

2000-05-29 Thread Kyler B. Laird


On Mon, 29 May 2000 21:56:33 +0200 (CEST) you wrote:

  Error, Bad Request: ['version'] 
You want to use "default values" in your SQL method argument list.

The details are described in "ZSQL/ZSQL.2.5.2.html".

What's the URL for this?  I'm looking through the
pointers from the documentation page and only
finding
http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.5.2.html
I even tried a search and only came up with ZSQL
1.* hits.

Quote from "ZSQL2.5.2.html":

 See Database method input argument format: Argument name and type are
 separated by a colon. A equal sign separates the default value from
 the name and type. The default value is a string representation of the
 desired value. If the default value contains spaces, or is an empty
 string, then it must be surrounded by double quotes.)

This is not the same functionality as is provided
by the "optional" attribute.  How would I use it
with an integer, for example?  I don't want a
default value; I want the option of not having
the value set at all.

I like the optional attribute.  I'd like to see
it do more than sit idle in the code.

--kyler

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )