Re: [Zope-dev] Help review #181754

2010-07-21 Thread Wichert Akkerman
On 2010-7-21 07:32, Wolfgang Schnerring wrote:
 * Wichert Akkermanwich...@wiggy.net  [2010-07-20 19:28]:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it
 can't hurt to test how your application would behave given certain
 server bugs.

 I don't think it is usually a productive assumption that lower layers
 fail to uphold their end of the contract. Maybe an
 extrapolation/hyperbole illustrates my opinion: Cosmic rays might also
 flip bits in your computer's RAM or disk, but I don't think it's
 worthwile to test how your application reacts when the python
 interpreter (or whoever, really) presents it with mangled data
 structures or objects or whatnot.

And for some situations you do want to explicitly test for such things. 
It all depends on how critical your app is. I'm not sure I'm not the 
only one who has tested code with randomly broken/bit-flipped input to 
test robustness.

Wichert.

-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-21 Thread Christian Theune
On 07/21/2010 09:17 AM, Wichert Akkerman wrote:
 On 2010-7-21 07:32, Wolfgang Schnerring wrote:
 * Wichert Akkermanwich...@wiggy.net   [2010-07-20 19:28]:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it
 can't hurt to test how your application would behave given certain
 server bugs.

 I don't think it is usually a productive assumption that lower layers
 fail to uphold their end of the contract. Maybe an
 extrapolation/hyperbole illustrates my opinion: Cosmic rays might also
 flip bits in your computer's RAM or disk, but I don't think it's
 worthwile to test how your application reacts when the python
 interpreter (or whoever, really) presents it with mangled data
 structures or objects or whatnot.

 And for some situations you do want to explicitly test for such things.
 It all depends on how critical your app is. I'm not sure I'm not the
 only one who has tested code with randomly broken/bit-flipped input to
 test robustness.

That double negative confuses the hell out of me. :)

However, I don't think the request of the given bug matches that 
requirement anyway.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development

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


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Wichert Akkerman
On 2010-7-20 17:39, Christian Theune wrote:
 Hi,

 I just rejected issue
 https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754

 There might be room for different oppinions and if anyone would like to
 veto the decision, I'd welcome a discussion.

Your rejection contains an assumption that the request won't make it to 
the application. Is that assumption testable?

Wichert.


-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Christian Theune
On 07/20/2010 06:01 PM, Wichert Akkerman wrote:
 On 2010-7-20 17:39, Christian Theune wrote:
 Hi,

 I just rejected issue
 https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754

 There might be room for different oppinions and if anyone would like to
 veto the decision, I'd welcome a discussion.

 Your rejection contains an assumption that the request won't make it to
 the application. Is that assumption testable?

I guess so.

I think it's relatively clear that the application server should 
insulate the application from malignant requests.

The details probably depend on the HTTP implementation. zope.server, 
zope.app.twisted, Paster and others might deal with this differently. 
Looking at the interfaces between those parts of the application it 
makes no sense to have syntactially invalid requests end up on the 
application level.

At least, WRT this bug, I don't think it's a good idea to ask explicitly 
for bad requests to go to the application as the test layer should model 
real server behaviour as closely as possible. And again it wouldn't make 
sense anyway as you can't pass an unparsable request to the application.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Wichert Akkerman
On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

I'm not sure I agree. Like everything else servers have bugs, so it 
can't hurt to test how your application would behave given certain 
server bugs.

Wichert.


-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Christian Theune
On 07/20/2010 07:28 PM, Wichert Akkerman wrote:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it
 can't hurt to test how your application would behave given certain
 server bugs.

Right. IMHO this specific bug asked for would usually mean that the 
server breaks and can pass anything to the application. Whatever 
happens: the server needs to prepare a data structure to hand over to 
the application. If it can't do that, then there's nothing to test what 
happens with the application.

I guess this kind of test (what happens with the application if it 
receives invalid data) needs to work around server/publisher components 
and inject data directly to application methods.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Wolfgang Schnerring
* Wichert Akkerman wich...@wiggy.net [2010-07-20 19:28]:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it 
 can't hurt to test how your application would behave given certain 
 server bugs.

I don't think it is usually a productive assumption that lower layers
fail to uphold their end of the contract. Maybe an
extrapolation/hyperbole illustrates my opinion: Cosmic rays might also
flip bits in your computer's RAM or disk, but I don't think it's
worthwile to test how your application reacts when the python
interpreter (or whoever, really) presents it with mangled data
structures or objects or whatnot.

To put it differently, yes, servers have bugs, but the place to fix them
is in the server. If we can't rely on our layers/abstractions to hold,
I feel we lose most if not all benefits of having them in the first place.

Wolfgang

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


Re: [Zope-dev] Help!

2010-06-30 Thread Hanno Schlichting
On Wed, Jun 30, 2010 at 9:44 AM, Charlie Clark
charlie.cl...@clark-consulting.eu wrote:
 Well, that should be all I need to say - the help system is missing from
 Zope 2 trunk. I don't know exactly when it disappeared but I use it
 occasionally as a quick way to check on stuff and Hanno didn't mention it
 was due to be called in Zope 2.13

Ah, sorry. That's a side-effect of disabling the persistent product
installation by default. If you add enable-product-installation on
to your zope.conf, the help system should come back. I'll add that
information to the change log.

 Is it coming back?

I consider the help system definitely deprecated and it will go away
for good at some point. It's not been updated in ages. If there's any
useful information in there at all, we should move it to
http://docs.zope.org/zope2/.

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


Re: [Zope-dev] Help!

2010-06-30 Thread Charlie Clark
Am 30.06.2010, 09:57 Uhr, schrieb Hanno Schlichting ha...@hannosch.eu:

 Ah, sorry. That's a side-effect of disabling the persistent product
 installation by default. If you add enable-product-installation on
 to your zope.conf, the help system should come back. I'll add that
 information to the change log.

Thanks.

 Is it coming back?

 I consider the help system definitely deprecated and it will go away
 for good at some point. It's not been updated in ages. If there's any
 useful information in there at all, we should move it to
 http://docs.zope.org/zope2/.

It's certainly antiquated but I find it still has it's uses. And it's  
available offline. So if we could keep it, or something like it around  
that would be good, I think.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help!

2010-06-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hanno Schlichting wrote:
 On Wed, Jun 30, 2010 at 9:44 AM, Charlie Clark
 charlie.cl...@clark-consulting.eu wrote:
 Well, that should be all I need to say - the help system is missing from
 Zope 2 trunk. I don't know exactly when it disappeared but I use it
 occasionally as a quick way to check on stuff and Hanno didn't mention it
 was due to be called in Zope 2.13
 
 Ah, sorry. That's a side-effect of disabling the persistent product
 installation by default. If you add enable-product-installation on
 to your zope.conf, the help system should come back. I'll add that
 information to the change log.
 
 Is it coming back?
 
 I consider the help system definitely deprecated and it will go away
 for good at some point. It's not been updated in ages. If there's any
 useful information in there at all, we should move it to
 http://docs.zope.org/zope2/.

We should be migrating anything useful into Sphinx form in the 'docs'
subdirectory of the Zope2 tree, or the broken-out projects.  We can
populate docs.zope.org from those sources.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwrPrYACgkQ+gerLs4ltQ4bJQCgvYNGAT0/Ji3Gaf7+vqfAxHuJ
QmAAoKoJfM4RqDRJpeIeEZqyTsLDLnwA
=T0T2
-END PGP SIGNATURE-

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-04 Thread Christian Theune
On 06/03/2010 04:12 PM, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jan-Wijbrand Kolman wrote:
 On 6/3/10 8:40 AM, Christian Theune wrote:
 On 06/02/2010 05:19 PM, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jan-Wijbrand Kolman wrote:
 On 6/2/10 15:11 , Christian Theune wrote:
 Hi,

 the ZF needs to finish updating the copyright attributions to state that
 the Zope code now belongs to the foundation.

 I've prepared some scripts to help with monitoring which packages need
 to be updated and also a helper to update most cases.
 Can you point me to these scripts?
 $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\
   ~/projects/Zope/zrp
 $ cd zrp
 $ /opt/Python-2.6.5/bin/python bootstrap.pybin/buildout
 $ cd /path/to/other/project
 $ ~/projects/Zope/zrp/bin/zope-org-check-project
 ...
 $ ~/projects/Zope/zrp/bin/zope-org-fix-project
 ...
 $ ~/projects/Zope/zrp/bin/zope-org-check-project
 (should be empty)
 $ bin/test -v --all
 $ svn add LICENSE.txt COPYRIGHT.txt
 $ svn commit -m Conform to repository policy.
 How do you deal with packages that have broken tests due to broken
 dependencies?

 I had z3c.recipe.paster with failing tests. These failed both before and
 after the copyright-fix. So, assumed I could go ahead with the copyright
 fix itself.

 I do want to help out on the important copyright fixing, but I do not
 have the time right now to also fix each of the packages that I come across.

 Maybe we could/should make note of the broken packages somewhere.

 Perhaps if the package's tests are broken before the cleanup, we should
 leave the cleanup un-done.  We defeinitely want to isolate the
 abandoned projects into a separate list, so leaving them in the
 nightly nag-mail list helps keep them on the radar for that.

Hmm. With the goal of getting the copyright attributions up do date as 
soon as possible, I think running the tests is a good sanity check. If 
the same (amount of) tests fail after the fix as before, then I'd go ahead.

I agree we should track abandoned projects, though, but I'd separate 
that issue from the (C) update. This needs to get to a point where we 
can talk about the whole repository and say it's been updated.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help updating the copyright attributions

2010-06-03 Thread Christian Theune
On 06/02/2010 05:19 PM, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jan-Wijbrand Kolman wrote:
 On 6/2/10 15:11 , Christian Theune wrote:
 Hi,

 the ZF needs to finish updating the copyright attributions to state that
 the Zope code now belongs to the foundation.

 I've prepared some scripts to help with monitoring which packages need
 to be updated and also a helper to update most cases.

 Can you point me to these scripts?

   $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\
 ~/projects/Zope/zrp
   $ cd zrp
   $ /opt/Python-2.6.5/bin/python bootstrap.py  bin/buildout
   $ cd /path/to/other/project
   $ ~/projects/Zope/zrp/bin/zope-org-check-project
   ...
   $ ~/projects/Zope/zrp/bin/zope-org-fix-project
   ...
   $ ~/projects/Zope/zrp/bin/zope-org-check-project
   (should be empty)
   $ bin/test -v --all
   $ svn add LICENSE.txt COPYRIGHT.txt
   $ svn commit -m Conform to repository policy.

How do you deal with packages that have broken tests due to broken 
dependencies?

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-03 Thread Jan-Wijbrand Kolman
On 6/3/10 8:40 AM, Christian Theune wrote:
 On 06/02/2010 05:19 PM, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jan-Wijbrand Kolman wrote:
 On 6/2/10 15:11 , Christian Theune wrote:
 Hi,

 the ZF needs to finish updating the copyright attributions to state that
 the Zope code now belongs to the foundation.

 I've prepared some scripts to help with monitoring which packages need
 to be updated and also a helper to update most cases.

 Can you point me to these scripts?

$ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\
  ~/projects/Zope/zrp
$ cd zrp
$ /opt/Python-2.6.5/bin/python bootstrap.py   bin/buildout
$ cd /path/to/other/project
$ ~/projects/Zope/zrp/bin/zope-org-check-project
...
$ ~/projects/Zope/zrp/bin/zope-org-fix-project
...
$ ~/projects/Zope/zrp/bin/zope-org-check-project
(should be empty)
$ bin/test -v --all
$ svn add LICENSE.txt COPYRIGHT.txt
$ svn commit -m Conform to repository policy.

 How do you deal with packages that have broken tests due to broken
 dependencies?

I had z3c.recipe.paster with failing tests. These failed both before and 
after the copyright-fix. So, assumed I could go ahead with the copyright 
fix itself.

I do want to help out on the important copyright fixing, but I do not 
have the time right now to also fix each of the packages that I come across.

Maybe we could/should make note of the broken packages somewhere.

regards, jw

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-03 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan-Wijbrand Kolman wrote:
 On 6/3/10 8:40 AM, Christian Theune wrote:
 On 06/02/2010 05:19 PM, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jan-Wijbrand Kolman wrote:
 On 6/2/10 15:11 , Christian Theune wrote:
 Hi,

 the ZF needs to finish updating the copyright attributions to state that
 the Zope code now belongs to the foundation.

 I've prepared some scripts to help with monitoring which packages need
 to be updated and also a helper to update most cases.
 Can you point me to these scripts?
$ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\
  ~/projects/Zope/zrp
$ cd zrp
$ /opt/Python-2.6.5/bin/python bootstrap.py   bin/buildout
$ cd /path/to/other/project
$ ~/projects/Zope/zrp/bin/zope-org-check-project
...
$ ~/projects/Zope/zrp/bin/zope-org-fix-project
...
$ ~/projects/Zope/zrp/bin/zope-org-check-project
(should be empty)
$ bin/test -v --all
$ svn add LICENSE.txt COPYRIGHT.txt
$ svn commit -m Conform to repository policy.
 How do you deal with packages that have broken tests due to broken
 dependencies?
 
 I had z3c.recipe.paster with failing tests. These failed both before and 
 after the copyright-fix. So, assumed I could go ahead with the copyright 
 fix itself.
 
 I do want to help out on the important copyright fixing, but I do not 
 have the time right now to also fix each of the packages that I come across.
 
 Maybe we could/should make note of the broken packages somewhere.

Perhaps if the package's tests are broken before the cleanup, we should
leave the cleanup un-done.  We defeinitely want to isolate the
abandoned projects into a separate list, so leaving them in the
nightly nag-mail list helps keep them on the radar for that.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwHuDcACgkQ+gerLs4ltQ6QwwCgynh6OFEUr4cj8cQURihYhAAW
kjYAmwfPPpmS9EyoE2cOA+CFQZP3Q37d
=6u5f
-END PGP SIGNATURE-

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-03 Thread Adam GROSZER
Hello Tres,

Thursday, June 3, 2010, 4:12:07 PM, you wrote:


 I had z3c.recipe.paster with failing tests. These failed both before and 
 after the copyright-fix. So, assumed I could go ahead with the copyright 
 fix itself.
 
 I do want to help out on the important copyright fixing, but I do not 
 have the time right now to also fix each of the packages that I come across.
 
 Maybe we could/should make note of the broken packages somewhere.

TS Perhaps if the package's tests are broken before the cleanup, we should
TS leave the cleanup un-done.  We defeinitely want to isolate the
TS abandoned projects into a separate list, so leaving them in the
TS nightly nag-mail list helps keep them on the radar for that.

I'd say not abandoned, but buildbot missing+other packages moved under
it's ass is the case here.


-- 
Best regards,
 Adam GROSZERmailto:agros...@gmail.com
--
Quote of the day:
Fools live to regret their words, wise men to regret their silence. 
- Will Henry 

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Jan-Wijbrand Kolman
On 6/2/10 15:11 , Christian Theune wrote:
 So, I'm the first one to step up to do a hundred of them until Friday
 2010-06-11. Who else is joining me?

I'll take a batch of ten per day until 2010-06-11.

Can I just pick from the list, or will you (or someone) hand out a batch?

regards, jw

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Jan-Wijbrand Kolman
On 6/2/10 15:11 , Christian Theune wrote:
 Hi,

 the ZF needs to finish updating the copyright attributions to state that
 the Zope code now belongs to the foundation.

 I've prepared some scripts to help with monitoring which packages need
 to be updated and also a helper to update most cases.

Can you point me to these scripts?
regards, jw

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan-Wijbrand Kolman wrote:
 On 6/2/10 15:11 , Christian Theune wrote:
 Hi,

 the ZF needs to finish updating the copyright attributions to state that
 the Zope code now belongs to the foundation.

 I've prepared some scripts to help with monitoring which packages need
 to be updated and also a helper to update most cases.
 
 Can you point me to these scripts?

 $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\
   ~/projects/Zope/zrp
 $ cd zrp
 $ /opt/Python-2.6.5/bin/python bootstrap.py  bin/buildout
 $ cd /path/to/other/project
 $ ~/projects/Zope/zrp/bin/zope-org-check-project
 ...
 $ ~/projects/Zope/zrp/bin/zope-org-fix-project
 ...
 $ ~/projects/Zope/zrp/bin/zope-org-check-project
 (should be empty)
 $ bin/test -v --all
 $ svn add LICENSE.txt COPYRIGHT.txt
 $ svn commit -m Conform to repository policy.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwGdowACgkQ+gerLs4ltQ5FUQCcDAnb+4OCJCqDkDIsi1jQuEVE
DNQAoK08L77/AwL2Wg3VhAaZD1UIKJTF
=ndm8
-END PGP SIGNATURE-

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Jan-Wijbrand Kolman
Hi,

What should I do with a package such as lovely.memcached where the 
copyright is currently attributed to Lovely Systems and Contributors?

Just apply the fix script?

regards, jw

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Jan-Wijbrand Kolman
Hi,

Another one I'm not sure about:

   jquery.javascript

The zope.repositorypolicy readme instructs me to remove the files that 
are copyright to a non-committer. So in this case I should remove the 
whole 'js' directory from the package I guess?

regards, jw

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan-Wijbrand Kolman wrote:
 Hi,
 
 Another one I'm not sure about:
 
jquery.javascript
 
 The zope.repositorypolicy readme instructs me to remove the files that 
 are copyright to a non-committer. So in this case I should remove the 
 whole 'js' directory from the package I guess?

In this case, it would be best to check with the original authors:  they
may prefer to move the project to another code hosting site.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwGjNAACgkQ+gerLs4ltQ60fwCdGzw+7yR1D9G+STlEb9Sx+sJk
tv4AnR534w3DbQK1mhjqQdfNzuJYjODb
=fK12
-END PGP SIGNATURE-

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan-Wijbrand Kolman wrote:
 Hi,
 
 What should I do with a package such as lovely.memcached where the 
 copyright is currently attributed to Lovely Systems and Contributors?
 
 Just apply the fix script?

I would double-check with the original authors as found via 'svn log' /
'svn blame'.  Technically, by checking into the repository, they have
already done the assignment under the terms of the committer agreement,
but it wouldn't hurt to verify.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwGjS8ACgkQ+gerLs4ltQ45KwCgsSVER8nV6ktvS+wCZBhmJ1fa
u9kAnRoGyQ7yjdzy/KTjxs10paPcx7PK
=RrZt
-END PGP SIGNATURE-

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


Re: [Zope-dev] Help updating the copyright attributions

2010-06-02 Thread Christian Theune
On 06/02/2010 04:39 PM, Jan-Wijbrand Kolman wrote:
 On 6/2/10 15:11 , Christian Theune wrote:
 So, I'm the first one to step up to do a hundred of them until Friday
 2010-06-11. Who else is joining me?

 I'll take a batch of ten per day until 2010-06-11.

Great!

 Can I just pick from the list, or will you (or someone) hand out a batch?

I'll copy the last list of known issues over to the wiki. Mark those 
that you're going after, I'd say.

See: http://wiki.zope.org/ztk/ReposCopyrightUpdateList

Christian


-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help! Getting there, I hope ...

2006-09-01 Thread Dieter Maurer
Kris Adcock wrote at 2006-9-1 09:33 +0100:
Right, many thanks to those who have offered advice. I'm conscious that as
I've drifted from a coding topic then I'm probably in the wrong mailing list,
but everyone has been very patient up to now and I'm hoping that a fix is in
sight! :)

I have done a backup of the Dats.fs file (took three days!). I have used
fsdump and fstest to produce listings about my Data.fs file - fsdump produced
a 2.67GB textfile! I have tracked down the first entry that I believe begins
all the deletes:

tid=0367c03fc4325022 time=2006-08-26 08:31:45.983563 offset=749481328632
 user= admin description=/library/reference/manage_delObjects

You can truncate your file to the given offset.
This will remove any modifications after this time.



-- 
Dieter
___
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] Help! Need to extract files out of Data.fs!

2006-08-28 Thread Dennis Allison

Kris, 

I assume you have a backup of the Data.fs.  If you do, nothing is really
lost.

Have you compressed the Data.fs?  There is an option in the control panel
to do this.  I can be run on a live machine, but you may not want to do so
given the size of stuff.  I'd do it on a quiet machine.  This will 
remove any cruft you have in the Data.fs and will improve your speed of 
access somewhat,  Things are probably slow because of swapping.  Reducing 
the size of Data.fs may speed things up.

Take a look at the documentation for the ZODB (Google is your friend).  
You could write a program in Python to simply open the ZODB and extract
the files you need.  It might save a bit of overhead.

Remember 1.3TB is a large file and is going to take some time to process 
no matter what.   


On Mon, 28 Aug 2006, Kris Adcock wrote:

 Hiya,
 
 My company has been using a Zope server to store some reference material, but
 it has grown beyond belief, and I need to extract all the collected files
 (about 1.3 terabytes!) from the Data.fs into distinct files onto a different
 server.
 
 Unfortunately, I've run into some problems. Firstly, the FTP transfer process
 seems to be extremely slow, and if I try and transfer too large or deep a
 folder structure in one go then things grind to a halt.
 
 To beat this I've been carefully recreating the folder structure manually,
 and copying things in easier-to-digest chunks. Unfortunately, because I was a
 bit rushed over the weekend I have accidentally deleted about 130,000 files!
 
 I've tried going through the Undo procedure, but the idea of manually
 ticking 130,000 boxes (in pages of 20) and undoing them fills me with dread.
 So ...
 
 Please please /please/  does anyone happen to have the file format for
 the Data.fs file so that I could write a C program to extract and recreate
 the files and folders to another server? Or has anyone written such a program
 already? If so, I'll happily have your children if you can help me out! As it
 stands, I'm going to have to break it to the librarian (the poor man who has
 been collating all the reference material for the last six months) that I've
 lost half of his work, and blaming it on the poor FTP client in Windows seems
 a bit lame!
 
 If it helps: I'm running Zope 2.9.2 on a SuSE Linux box. I have full access
 to the Linux box ... and a large hammer, if I need it! :(
 
 Help!
 
 Many thanks in advance,
 
 Kris (considering giving up this computing job and going to live in a cave
 somewhere).
 ___
 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 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] Help! Need to extract files out of Data.fs!

2006-08-28 Thread Dennis Allison

One more thing, what does the disk where the Data.fs resides look like?  


On Mon, 28 Aug 2006, Dennis Allison wrote:

 
 Kris, 
 
 I assume you have a backup of the Data.fs.  If you do, nothing is really
 lost.
 
 Have you compressed the Data.fs?  There is an option in the control panel
 to do this.  I can be run on a live machine, but you may not want to do so
 given the size of stuff.  I'd do it on a quiet machine.  This will 
 remove any cruft you have in the Data.fs and will improve your speed of 
 access somewhat,  Things are probably slow because of swapping.  Reducing 
 the size of Data.fs may speed things up.
 
 Take a look at the documentation for the ZODB (Google is your friend).  
 You could write a program in Python to simply open the ZODB and extract
 the files you need.  It might save a bit of overhead.
 
 Remember 1.3TB is a large file and is going to take some time to process 
 no matter what.   
 
 
 On Mon, 28 Aug 2006, Kris Adcock wrote:
 
  Hiya,
  
  My company has been using a Zope server to store some reference material, 
  but
  it has grown beyond belief, and I need to extract all the collected files
  (about 1.3 terabytes!) from the Data.fs into distinct files onto a different
  server.
  
  Unfortunately, I've run into some problems. Firstly, the FTP transfer 
  process
  seems to be extremely slow, and if I try and transfer too large or deep a
  folder structure in one go then things grind to a halt.
  
  To beat this I've been carefully recreating the folder structure manually,
  and copying things in easier-to-digest chunks. Unfortunately, because I was 
  a
  bit rushed over the weekend I have accidentally deleted about 130,000 files!
  
  I've tried going through the Undo procedure, but the idea of manually
  ticking 130,000 boxes (in pages of 20) and undoing them fills me with dread.
  So ...
  
  Please please /please/  does anyone happen to have the file format for
  the Data.fs file so that I could write a C program to extract and recreate
  the files and folders to another server? Or has anyone written such a 
  program
  already? If so, I'll happily have your children if you can help me out! As 
  it
  stands, I'm going to have to break it to the librarian (the poor man who has
  been collating all the reference material for the last six months) that I've
  lost half of his work, and blaming it on the poor FTP client in Windows 
  seems
  a bit lame!
  
  If it helps: I'm running Zope 2.9.2 on a SuSE Linux box. I have full access
  to the Linux box ... and a large hammer, if I need it! :(
  
  Help!
  
  Many thanks in advance,
  
  Kris (considering giving up this computing job and going to live in a cave
  somewhere).
  ___
  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 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] Help! Need to extract files out of Data.fs!

2006-08-28 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 28 Aug 2006, at 22:33, Dennis Allison wrote:
Have you compressed the Data.fs?  There is an option in the control  
panel
to do this.  I can be run on a live machine, but you may not want  
to do so

given the size of stuff.  I'd do it on a quiet machine.  This will
remove any cruft you have in the Data.fs and will improve your  
speed of
access somewhat,  Things are probably slow because of swapping.   
Reducing

the size of Data.fs may speed things up.


Umh, packing the database is something you expressly *do not want to  
do* in this situation, because that will immediately destroy the Undo  
history which currently allows him access to the deleted items.


jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE81pMRAx5nvEhZLIRAt3KAJ4lzO25kjckhX3+WKeUqqGOXuyDWQCdF1Ya
tWJpfMlJCIdP8EfdlXr8Nio=
=mJU8
-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] Help! Need to extract files out of Data.fs!

2006-08-28 Thread Kris Adcock
--- Dennis Allison [EMAIL PROTECTED] wrote:
 
 Kris, 
 
 I assume you have a backup of the Data.fs.  If you do, nothing is really
 lost.
 
 Have you compressed the Data.fs?  There is an option in the control panel

Wouldn't this remove all the deleted files? Or is compression different to
packing?

Cheers,

Kris.
___
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] Help: __getstate__ overriding

2004-06-02 Thread Syver Enstad
Tim Peters [EMAIL PROTECTED] writes:

 That adds something to the BTree that is bound to an attribute of articleDb,
 but still doesn't set _p_changed on articleDb (mutating the BTree does not
 mutate the object containing the BTree).  So far as the *database* is
 concerned, there's still no path from the root object to the BTree your
 __setstate__() created, so the BTree never gets committed.  

So the BTree is not registered with the database until _p_changed
and a commit? After that first commit, the BTree is registered as
reachable and then when just the BTree is _p_changed I get my changes
saved. Right?

 
 Calling __setstate__ as a side effect of a persistent load does not, by
 itself, support making changes that persist.  It apparently wasn't designed
 to, either (see the other msgs in this thread, particularly from ChrisM).

I can understand the reasoning behind it, in the way that you don't
want nothing to change on disk when you logically haven't called a
mutating method on your object, just loaded it. But I do think it is
badly broken to not save the changes when I have made additional
changes to the state of the object after load time. Why not just take
the performance hit and be done with it? What do other object
databases do with schema migration issues, f.ex. GemStone?

Now well, I believe I understand why this happens and that is a very
good thing! Thanks to all who have helped me in gaining a better
understanding of ZODB.



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-06-02 Thread Dieter Maurer
Tim Peters wrote at 2004-5-31 20:49 -0400:
 ...
Perhaps we could say that if it
returns True, then the object should be considered to be in the changed
state rather than in the uptodate state.

+1

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-06-01 Thread Syver Enstad
Tim Peters [EMAIL PROTECTED] writes:

 [Syver Enstad, wants to switch an attribute of a Persitent subclass
  From PersistentList to an IOBTree]
 
 [Tim, guessing]
  Quick guess (untested, untried, ...
 ...
  Perhaps shuffling the code around would work, a la:
 
  Persistent.__setstate__(self, state)
  articleList = state.get('_articleList')
  if articleList is not None:
  # make the BTree in local oidsToArticles as above, then
  del self._articlelist
  self._oidsToArticles = oidsToArticles
 
  The thinking there is that then you've truly modified self, after self has
  been activated.
 
 Nope, sorry, not a chance.  You have truly modified self then, but
 __setstate__ is called by magic as part of activation (unghostifying), and
 the activation machinery resets self._p_changed after it calls __setstate__.
 So same result as your code:  the in-memory version of self has the BTree,
 but commit() doesn't change anything about self in the database (again
 because self._p_changed is false -- and will be no matter what you try to do
 in __setstate__()).

I was aware that __setstate__ doesn't allow me to commit my changes
after only loading the object into memory (__setstate__ is called). I
may have explained myself unclearly (not a native english
speaker/writer), the problem is that it won't save my changes when I
add more items to the _oidsToArticles BTree long after
__setstate__ time.

Example code:

# articleDb is an ArticleDb and has the __setstate__ method
articleDb = connection.root()['articledb']
for each in articleDb.articles() # loop through all article
print each
computer = Computer(1030)
articleDb.addArticle(computer) 
connection.commit() # nothing is saved 

Everything works smoothly until connection.commit(). The __setstate__
method correctly converts to using the BTree and the addArticle method
adds a new computer to ArticleDb.

If I instead create a new ArticleDb instance with the BTree instead of
using __setstate__ the new computer is saved as it should. In none of
the cases is articleDb._p_changed == True, but when the ArticleDb is
created cleanly instead of upgraded, commit works anyway.

Since this works if the object that holds _oidsToArticles is created
from scratch, it seems that ZODB isn't properly aware of the
_oidsToArticles attribute since it was created in __setstate__ instead
of in __init__. I would really like to know exactly what happens here
as the reason I am utilizing an object database is to be able to
refactor the database with a minimum of fuss, and I would expect
__setstate__ to allow me to make additional attributes in my
instances. 

 


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-06-01 Thread Tim Peters
[Syver Enstad]
 I was aware that __setstate__ doesn't allow me to commit my changes after
 only loading the object into memory (__setstate__ is called). I may have
 explained myself unclearly (not a native english speaker/writer),

I don't think that matters much:  English instead of code is always
ambiguous, even for native writers.

 the problem is that it won't save my changes when I add more items to the
 _oidsToArticles BTree long after __setstate__ time.

Right.  I tried to explain that in my first reply.  It's expected.  You have
to get _p_changed set on your *object*.  It doesn't matter how much you
mutate new objects attached *to* the object you loaded, you have to get
_p_changed set to 1 on the original object.

 Example code:

 # articleDb is an ArticleDb and has the __setstate__ method
 articleDb = connection.root()['articledb']

At this point articleDb._p_changed is not 1, and nothing you do later
changes this fact.

 for each in articleDb.articles() # loop through all article
 print each

It's obvious that this doesn't set articleDb._p_changed, right?

 computer = Computer(1030)
 articleDb.addArticle(computer)

That adds something to the BTree that is bound to an attribute of articleDb,
but still doesn't set _p_changed on articleDb (mutating the BTree does not
mutate the object containing the BTree).  So far as the *database* is
concerned, there's still no path from the root object to the BTree your
__setstate__() created, so the BTree never gets committed.  If you do

articleDb._p_changed = 1

at this point too, then your changes will get stored.

 connection.commit() # nothing is saved

Right.  As far as the persistence machinery is concerned, articleDb itself
never changed, so there was no reason to store it.  Since it didn't get
stored, the BTree you attached to it in __setstate__ doesn't get stored
either.

 Everything works smoothly until connection.commit(). The __setstate__
 method correctly converts to using the BTree and the addArticle method
 adds a new computer to ArticleDb.

The problem is that, while adding the BTree to articleDb did change (did set
_p_changed to 1) articleDb, because that happened as a side effect of
loading the object, the unghostification machinery clears _p_changed after
__setstate__ returns.  Then nothing you did after that set
articleDb._p_changed to a true value.

 If I instead create a new ArticleDb instance with the BTree instead of
 using __setstate__ the new computer is saved as it should.

Yes.  If you had called __setstate__ *directly*, it would also work
(contradicting the current minimal docs, but so it goes).  The problem is
that unghostifying by magic clears _p_changed.

 In none of the cases is articleDb._p_changed == True,

When you create an object directly, it's not associated with a Connection (a
jar), and some of the persistence machinery is sidestepped then.  New
objects only get into the database if you attach them to an object that's
already in the database, and the latter object is marked changed.  Think
about that wink, and the purpose of the root() object will become clearer.

 but when the ArticleDb is created cleanly instead of upgraded, commit
 works anyway.

Sorry, I'm not clear on what that means.  In any case, it doesn't really
matter how an object gets created, what matters is whether the persistence
machinery sees a path to it from a changed object already in the database.

 Since this works if the object that holds _oidsToArticles is created from
 scratch, it seems that ZODB isn't properly aware of the _oidsToArticles
 attribute since it was created in __setstate__ instead of in __init__.

Both ways set _p_changed *at the time* oidsToArticles is bound to the new
BTree.  The difference is that uhghostification deliberately clears
_p_changed after calling __setstate__.

 I would really like to know exactly what happens here as the reason I am
 utilizing an object database is to be able to refactor the database with
 a minimum of fuss, and I would expect __setstate__ to allow me to make
 additional attributes in my instances.

Calling __setstate__ as a side effect of a persistent load does not, by
itself, support making changes that persist.  It apparently wasn't designed
to, either (see the other msgs in this thread, particularly from ChrisM).


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-05-31 Thread Dieter Maurer
Tim Peters wrote at 2004-5-30 14:49 -0400:
[Dieter Maurer]
 I think, this is a ZODB buglet:

   It should set _p_changed = 0 before it calls __setstate__
   and not afterwards...

I don't know; Jim (or Jeremy) may know the reasoning here, but I don't.

Activation currently sets the state to changed *before* calling __setstate__
too.  A comment says this is to prevent recursively calling _PyPersist_Load,
and that makes sense to me, else unbounded recursion could occur.

I see...

 ...
On ZODB head, Jeremy also documented that __setstate__ can't affect the
persistent state (in persistent/interfaces.py's IPersistent).  Whether this
is deliberate design, or a consequence of the current implementation, I
can't say.

A potential problem: it *can* change the persistent state but
it does not do it reliably. It does precisely when the object
is later modified again: in this case modifications made
in __setstate__ become persistent, otherwise, they do not.

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-05-31 Thread Tim Peters
[Tim Peters]
 ...
 On ZODB head, Jeremy also documented that __setstate__ can't affect the
 persistent state (in persistent/interfaces.py's IPersistent).  Whether
 this is deliberate design, or a consequence of the current
 implementation, I can't say.

[Dieter Maurer]
 A potential problem: it *can* change the persistent state but it does not
 do it reliably. It does precisely when the object is later modified
 again: in this case modifications made in __setstate__ become
 persistent, otherwise, they do not.

I agree, but the docs are cryptic (because so brief) enough that I can read
them as being correct or incorrect:


def __setstate__(state):
Set the object state data

Note that this does not affect the object's persistent state.


There are enough ambiguities there to fill a whole thread wink.  It is
true that a call to __setstate__() alone doesn't affect the object's state
in the DB.  It needs more words.  OTOH, I'd rather dream up a way to make
object changes made in __setstate__() persistent, if desired.  For example,
__setstate__'s return value is ignored now.  Perhaps we could say that if it
returns True, then the object should be considered to be in the changed
state rather than in the uptodate state.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-05-30 Thread Dieter Maurer
Tim Peters wrote at 2004-5-28 14:51 -0400:
 ...
This appears to be one of those severely underdocumented minefields.  The
best older thread I found is here:

http://mail.zope.org/pipermail/zodb-dev/2002-March/002442.html

but it doesn't actually spell out something that works in the way you
want.

I think, this is a ZODB buglet:

  It should set _p_changed = 0 before it calls __setstate__
  and not afterwards...

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-05-30 Thread Tim Peters
[Dieter Maurer]
 I think, this is a ZODB buglet:

   It should set _p_changed = 0 before it calls __setstate__
   and not afterwards...

I don't know; Jim (or Jeremy) may know the reasoning here, but I don't.

Activation currently sets the state to changed *before* calling __setstate__
too.  A comment says this is to prevent recursively calling _PyPersist_Load,
and that makes sense to me, else unbounded recursion could occur.

Given this abuse of _p_changed, and that the purpose of activating a ghost
is to transition it to the up-to-date state, making mutations to the
persistent state inside __setstate__ seems hard to accommodate.

On ZODB head, Jeremy also documented that __setstate__ can't affect the
persistent state (in persistent/interfaces.py's IPersistent).  Whether this
is deliberate design, or a consequence of the current implementation, I
can't say.



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-05-28 Thread Tim Peters
[Syver Enstad]
 I have a Persistent derived class where I want to upgrade from using a
 PersistentList to a BTrees.IOBTree.IOBTree.

 _articleList is the old Persistent list
 _oidsToArticles is the new IOBTree.

 def __setstate__(self, state):
 articleList = state.get('_articleList')
 if articleList:
 oidsToArticles = self.makeBTree()
 for each in articleList:
 oidsToArticles[each.oid()] = each
 del state['_articleList']
 state['_oidsToArticles'] = oidsToArticles
 Persistent.__setstate__(self, state)

 This seems to work fine, and I am adding more objects to
 _oidsToArticles. The problem is that when I commit the transaction,
 nothing is saved.

Quick guess (untested, untried, just from eyeballing this snippet quickly):
nothing is marking self itself as being changed.  The only things getting
changed are the throw-away in-memory 'state' dict, the throw-away in-memory
self.__dict__, and a throw-away in-memory BTree.  The primary purpose of
p.__setstate__ is to activate a ghost, after which point p is in the
up-to-date state (i.e., not changed -- calling Persistent.__setstate__(self,
...) isn't going to mark self as changed, and nothing in the code above
modifies self itself).  If self doesn't look changed, its state in the DB
won't change during commit(), and the DB will still reference your old
PersistentList.

Perhaps shuffling the code around would work, a la:

Persistent.__setstate__(self, state)
articleList = state.get('_articleList')
if articleList is not None:
# make the BTree in local oidsToArticles as above, then
del self._articlelist
self._oidsToArticles = oidsToArticles

The thinking there is that then you've truly modified self, after self has
been activated.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-05-28 Thread Tim Peters
[Syver Enstad, wants to switch an attribute of a Persitent subclass
 From PersistentList to an IOBTree]

[Tim, guessing]
 Quick guess (untested, untried, ...
...
 Perhaps shuffling the code around would work, a la:

 Persistent.__setstate__(self, state)
 articleList = state.get('_articleList')
 if articleList is not None:
 # make the BTree in local oidsToArticles as above, then
 del self._articlelist
 self._oidsToArticles = oidsToArticles

 The thinking there is that then you've truly modified self, after self has
 been activated.

Nope, sorry, not a chance.  You have truly modified self then, but
__setstate__ is called by magic as part of activation (unghostifying), and
the activation machinery resets self._p_changed after it calls __setstate__.
So same result as your code:  the in-memory version of self has the BTree,
but commit() doesn't change anything about self in the database (again
because self._p_changed is false -- and will be no matter what you try to do
in __setstate__()).

This appears to be one of those severely underdocumented minefields.  The
best older thread I found is here:

http://mail.zope.org/pipermail/zodb-dev/2002-March/002442.html

but it doesn't actually spell out something that works in the way you
want.

One possibility is to use any of these __setstate__ implementations
temporarily, in a one-shot database conversion script:  load every object of
your subclass's type, and for each one obj, after loading it do

obj._p_changed = True
get_transaction().commit()

Note again that setting _p_changed *inside* __setstate__ won't do any good.

Note too that Jim Fulton has a recent proposal for Zope3 in this area:

http://tinyurl.com/ypkhk

[Zope URLs are generally so long my mailer refuses to keep them on one line]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help: __getstate__ overriding

2004-05-28 Thread Dieter Maurer
Syver Enstad wrote at 2004-5-28 12:41 +0200:
I have a Persistent derived class where I want to upgrade from using a
PersistentList to a BTrees.IOBTree.IOBTree.

_articleList is the old Persistent list
_oidsToArticles is the new IOBTree.

def __setstate__(self, state):
articleList = state.get('_articleList')
if articleList:
oidsToArticles = self.makeBTree()
for each in articleList:
oidsToArticles[each.oid()] = each
del state['_articleList']
state['_oidsToArticles'] = oidsToArticles
Persistent.__setstate__(self, state)

This seems to work fine, and I am adding more objects to
_oidsToArticles. The problem is that when I commit the transaction,
nothing is saved. I have tested the same code without __setstate__ and
then it saves just fine. What hoops does one have to jump through to
upgrade the state of a ZODB object?

This does not work as changes made in __setstate__ are not
explicitly persisted. Whether or not they become persistent
depends on whether the object is changed again outside __setstate__.

Use an explicit conversion script instead...

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help

2004-03-19 Thread Andreas Jung
You are using pyscopg directly instead of using the ZPsycopg Database 
adapter??

-aj

--On Dienstag, 16. März 2004 9:54 Uhr -0800 Vandana Bajaj 
[EMAIL PROTECTED] wrote:

Hi

I installed zope2.7.0 on SUSE Linux as a non root user(vandana) and
psycopg1.11  All steps of installation were successful, accept for
the 'make install-zope' step.
But when i try to use psycopg to connect to the database on the local
machine Zope asks me for a username and password.
Where even if i give the username and password with which i installed
zope(i.e vandana) , it does not accpet it.
The same thing happens with 'root' username and password. Can some one
please guide me how to access system resources through zope.
Thanking you in advance.
Vandana


Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help

2004-03-11 Thread Federico Di Gregorio
Il gio, 2004-03-11 alle 11:30, Vandana Bajaj ha scritto:
 /Zope-2.6.2-linux2-x86/lib/python2.1/lib-dynload/psycopgmodule.so:
 undefined symbol: PyType_IsSubtype

you probably built psycopg using python 2.2/2.3 and your zope still uses
python 2.1. see psycopg's FAQ about building with the python packaged
with zope (http://wiki.initd.org/Projects/PsycopgFaq).

-- 
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer[EMAIL PROTECTED]
INIT.D Developer   [EMAIL PROTECTED]
   Don't dream it. Be it. -- Dr. Frank'n'further


signature.asc
Description: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help

2004-03-11 Thread Chris Withers
(Learn to use better subject lines!)

Vandana Bajaj wrote:

/Zope-2.6.2-linux2-x86/lib/python2.1/lib-dynload/psycopgmodule.so:
undefined symbol: PyType_IsSubtype
Looks like you didn't manage to compile it properly, maybe you compiled it to 
the wrong python version...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help

2004-03-05 Thread Chris Withers
Vandana Bajaj wrote:
I am not able to access zope management interface through mozilla.
Could any one guide me why is it happening so.
Can i use Javascript within Zope Page Templates to embed logic
1. zope-dev is for development of Zope, not with it, move your discussion to 
[EMAIL PROTECTED]

2. Don't post in HTML to a non-html list.

3. Provide more detail. What happens when you try and access the ZMI with mozilla?

cheers,

Chris

PS: Yes of course you can put Javascript in ZPT. Using it to embed logic other 
than maybe simple form validation is siully though ;-)

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help

2004-02-24 Thread J Cameron Cooper
Vandana Bajaj wrote:

I am a software developer in SuSE
I have installed Zope in SUSE.
I want to be able to print from a html page to a printer
with measurements as per to the html page produced.
I wish to know whther printing from a web page is possoble or not.
If yes then is it possible to print accurately upto measurements
specified.
Will it depend on the type of the printer.
This has almost nothing to do with Zope. (And I say almost only 
because Zope is a web server and this asks about HTML.)

Printing of web pages is almost entirely up to the browser. Most will 
try to print something that looks very much like the page you see on 
your screen. You can, however, define CSS styles specifically for 
printing, which should allow you to have some control over sizes et al. 
Perhaps you can look at how Plone does this.

 --jcc

--
He who fights with monsters should look to it that he himself does not become a monster. 
And when you gaze long into an abyss the abyss also gazes into you.
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help with ZClasses

2004-01-20 Thread J. Cameron Cooper
Fábio Bruno wrote:

Dear Sir or Madame I'm workign with zope ZClasses in zope 2.7.0b.I 
decided to do the example given to us at this site 
http://zope.org/Members/dedalu/precosHowto/#top1.I can not do the 
question 3.1 and 3.2 for the same reason.They tell us to change 
PrecosFolder_add but when we do that it is displayed the follow error 
frase
Title Parameter List
Bound Names  context, container, script, traverse_subpath
Last Modified  2004-01-20 17:23
Errors invalid syntax (Script (Python), line 1)
html
I'm guessing you're using a Script (Python) rather than a DTML Method. 
Make sure you pay attention to the type of object you're supposed to use.

This list, btw, if for development of Zope, not with Zope. For that you 
want [EMAIL PROTECTED]

 --jcc

--
My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help with the change of URL and/or port

2004-01-17 Thread J Cameron Cooper
Fábio Bruno wrote:

Dear Sir or Madame I'm wrigting because I started to do a plone site 
in zope.I would lke to know if I can change the url and/or port where 
the plone site stays.I would like to know how to chenge this path 
http:\\localhost:8080\Plone. 
You need a VirtualHostMonster and possibly Apache. See the relevant 
chapter in the Zope Book for details, or search zope.org for VHM.

   --jcc



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help w/ LocalFS

2003-09-09 Thread Dieter Maurer
Roberto Benitez wrote at 2003-9-6 16:49 -0700:
  I am trying to use LocalFS to access a directory in my
  linux server (zope running on same suse linux server)
  
  i am able to see the directory listing, but when i try
  to access any file i get the following error message
  
  
  The object at ../../5741.RPT has an empty or missing
  docstring. Objects must have a docstring to be
  published.

What object type do you see in the directory listing
(I am not sure, that you can see the type there)?
Your files might be mapped to a somewhat broken object.

If this does not reveal easily the cause of your problem,
I would start debugging.

On

  http://www.dieter.handshake.de/pyprojects/zope

you find a small module (Interactive debugging support)
that lets you build the publishing environment in
an interactive interpreter. Build a request and
traverse to your object. Hopefully, you will get the same
error which you can now analyse with the pm (post mortem)
function of pdb (the Python debugger).


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help w/ LocalFS

2003-09-07 Thread robert
Does the user zope is run as (normaly 'zope') have all the neccessary rights 
to access the files ?
You can set the user zope is run under with the -u parameter when starting 
zope.
Robert
Am Sunday 07 September 2003 01:49 schrieb Roberto Benitez:
 I am trying to use LocalFS to access a directory in my
 linux server (zope running on same suse linux server)

 i am able to see the directory listing, but when i try
 to access any file i get the following error message

 
 The object at ../../5741.RPT has an empty or missing
 docstring. Objects must have a docstring to be
 published.

 

 i get the same error when attempting to access any
 file

 i also have a zope server runnin on a couple of other
 windows computers and it seems to work just fine. the
 LocalFS is of course treated like a local folder.

 i would appreciate any help on this issue



 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com

 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 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 )

-- 
mit freundlichen Grüssen

Robert Rottermann
www.redCOR.ch


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-09-04 Thread Exteam
Hi all,
We are facing a small issue in formulator. 
Suppose we have a fiels which is repetitve in nature
for ex name1 , name2, name 3.depending  on the
user input.
If we want to validate these name we have to create
required fields i.e name1, name2 etc..in validator in
advance.
Can we do the same using only one field in formulator
i.e name and put all the derivatives of it like name1
, name 2 as a array to name.
in that case, we can have more control in field
handling and so would not have the headache of pre
formation of the fields which may susbsequently
increase later on.
Looking forward for a reply..
Subhankar
exteam


Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-08-29 Thread Chris McDonough
Hi Todd,

This isn't the error that is preventing Zope from starting.  This is a
warning message.  Startup should proceed normally thereafter.

- c

- Original Message - 
From: Todd Loomis, (SAIC) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 12:06 PM
Subject: [Zope-dev] Help!!


 All:

 I'm getting this error message every time I try to start Zope:

 /var/www/zope/lib/python/ts_regex.py:87: DeprecationWarning: the
regex
 module is deprecated; please use the re module
   import regex, regsub #, Sync
 /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub
module is
 deprecated; please use re.sub()
   DeprecationWarning)

 What gives, it was working fine then I got a call saying the site
wasn't
 responding. So I restarted Zope and got this. Any help will be
greatly
 appreciated.


 

 Todd




--
--


 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 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 maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-08-28 Thread Todd Loomis, \(SAIC\)
Paul,

Thanks, however I've searched the mailing lists and found nothing. Also I
consider this an error when Zope will not startup!


Todd


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Winkler
Sent: Thursday, August 28, 2003 12:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] Help!!


On Thu, Aug 28, 2003 at 12:06:21PM -0400, Todd Loomis, (SAIC) wrote:
 All:
  
 I'm getting this error message every time I try to start Zope:
  
 /var/www/zope/lib/python/ts_regex.py:87: DeprecationWarning: the regex 
 module is deprecated; please use the re module
   import regex, regsub #, Sync
 /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module 
 is deprecated; please use re.sub()
   DeprecationWarning)
 
 What gives, it was working fine then I got a call saying the site 
 wasn't responding. So I restarted Zope and got this. Any help will be 
 greatly appreciated.

Please search the mailing list archives.
This is not an error.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's PYSCHOMETRIC DISGRUNTLED BIOLOGIST! (random hero
from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-08-28 Thread Paul Winkler
On Thu, Aug 28, 2003 at 12:30:11PM -0400, Todd Loomis, (SAIC) wrote:
 Paul,
 
 Thanks, however I've searched the mailing lists and found nothing.

http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=Query=DeprecationWarning

a lot of those are irrelevant - several will tell you the 
same thing I did.

 Also I
 consider this an error when Zope will not startup!

This is just a warning. It *cannot* prevent zope from starting.
Your problem is something else.  You say zope is not starting...
what happens when you try to start?  

What have you done to verify that zope isn't running?

What platform are you on?

What version of Zope?

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE BOAT!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-08-28 Thread Todd Loomis, \(SAIC\)
What have you done to verify that zope isn't running?
When I do a start it comes back with these warnings in the log files and
when I try to load the site it gives me a proxy error.

What platform are you on?
Redhat 7.2

What version of Zope?
2.4.3


Todd Loomis

Web Developer

Defense Modeling  Simulation Office (SAIC)

1901 N. Beauregard Street, Suite 500

Alexandria, VA 22311

Office: (703) 824-3407

Fax: (703) 379-3778 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Winkler
Sent: Thursday, August 28, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] Help!!


On Thu, Aug 28, 2003 at 12:30:11PM -0400, Todd Loomis, (SAIC) wrote:
 Paul,
 
 Thanks, however I've searched the mailing lists and found nothing.

http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=Query=
DeprecationWarning

a lot of those are irrelevant - several will tell you the 
same thing I did.

 Also I
 consider this an error when Zope will not startup!

This is just a warning. It *cannot* prevent zope from starting. Your problem
is something else.  You say zope is not starting... what happens when you
try to start?  

What have you done to verify that zope isn't running?

What platform are you on?

What version of Zope?

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE BOAT!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-08-28 Thread Andy McKay
 Thanks, however I've searched the mailing lists and found nothing.

Wow really?

http://www.google.ca/search?q=regsub.py%3A15%3A+DeprecationWarning+zope

Something else is causing your problem then. What that might be, we need 
more information.
--
  Andy McKay
  http://www.agmweb.ca

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-08-28 Thread Chris McDonough
This is a wild guess.

A common problem on UNIX is to run Zope initially as the root user.  In
that situation, even if you declare an effective user via the -u
switch, the log files and pid files  are written as the root user.  It
will run fine.

Then later on, someone stops the process.  You attempt to start the
process as the effective user.  Because the initial log and pid files
were written as the root user, the process cannot open them for writing
and Zope will not start.

As I said, a wild guess, but might be your problem here (especially as
you don't seem to see anything useful in your log files).

- C


On Thu, 2003-08-28 at 12:53, Todd Loomis, (SAIC) wrote:
 What have you done to verify that zope isn't running?
 When I do a start it comes back with these warnings in the log files and
 when I try to load the site it gives me a proxy error.
 
 What platform are you on?
 Redhat 7.2
 
 What version of Zope?
 2.4.3
 
 
 Todd Loomis
 
 Web Developer
 
 Defense Modeling  Simulation Office (SAIC)
 
 1901 N. Beauregard Street, Suite 500
 
 Alexandria, VA 22311
 
 Office: (703) 824-3407
 
 Fax: (703) 379-3778 
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Paul Winkler
 Sent: Thursday, August 28, 2003 12:42 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] Help!!
 
 
 On Thu, Aug 28, 2003 at 12:30:11PM -0400, Todd Loomis, (SAIC) wrote:
  Paul,
  
  Thanks, however I've searched the mailing lists and found nothing.
 
 http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=Query=
 DeprecationWarning
 
 a lot of those are irrelevant - several will tell you the 
 same thing I did.
 
  Also I
  consider this an error when Zope will not startup!
 
 This is just a warning. It *cannot* prevent zope from starting. Your problem
 is something else.  You say zope is not starting... what happens when you
 try to start?  
 
 What have you done to verify that zope isn't running?
 
 What platform are you on?
 
 What version of Zope?
-- 
Chris McDonough [EMAIL PROTECTED]
Zope Corporation


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help!!

2003-08-28 Thread robert
What you see is not an error but a warning. It is not the reason why zope does 
not start up.
What OS and what Zope Version are you using ?
Robert

Am Thursday 28 August 2003 18:30 schrieb Todd Loomis, \(SAIC\):
 Paul,

 Thanks, however I've searched the mailing lists and found nothing. Also I
 consider this an error when Zope will not startup!

 
 Todd


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Paul Winkler
 Sent: Thursday, August 28, 2003 12:18 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] Help!!

 On Thu, Aug 28, 2003 at 12:06:21PM -0400, Todd Loomis, (SAIC) wrote:
  All:
 
  I'm getting this error message every time I try to start Zope:
 
  /var/www/zope/lib/python/ts_regex.py:87: DeprecationWarning: the regex
  module is deprecated; please use the re module
import regex, regsub #, Sync
  /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module
  is deprecated; please use re.sub()
DeprecationWarning)
 
  What gives, it was working fine then I got a call saying the site
  wasn't responding. So I restarted Zope and got this. Any help will be
  greatly appreciated.

 Please search the mailing list archives.
 This is not an error.

-- 
mit freundlichen Grüssen

Robert Rottermann
www.redCOR.ch


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Help with DTML-IN statement

2002-03-13 Thread Leonardo Rochael Almeida


Hi Gary,

This question is more suited to [EMAIL PROTECTED] instead of
[EMAIL PROTECTED], and you should not send html e-mail to any of these
two lists, but since we are here...

On Wed, 2002-03-13 at 16:13, Gary Yee wrote:
 Hello,
 
 I am very new to Zope/DTML and I am a little confused with the operation of the 
DTML-IN statement. Here is the snippet of code
  
 table border=1 width=100%
 dtml-in expr=( ((1), (1,2),(4,5,6),(7,8,9)) )
  tr
  tddtml-var sequence-item/td 
   /tr
 /dtml-in
 /table
 
  
 This code displays the contents 4 cells in a table and the output is
 1
 2
 (4,5,6)
 (7,8,9)
 
 I am a litte confused because I thought it would display the contents of the list as
 (1)
 (1,2)
 (4,5,6)
 (7,8,9)
 
 I believe this is related to something I read about tuples of ( key, value) will 
handled with sequence-key and sequence-item 

That's exactly what's happening. It's a misfeature in my opinion, but it
makes it easy to iterate thru a dictionary .items() and a folder
.objectItems().

 I must be traversing the list incorrectly.

No, you're not, the feature is wrong :-)

 can anyone give me an example of how to traverse this list of tuples
 correctly. 

The workaround is to make each tuple of your sequence the second
elemento of a 2-tuple, as in '((1, (1,)), (2, (1, 2)), (3, (4, 5, 6)),
(4, (4, 5, 6)))'

Kind of like that old joke were the paranoid statician would take a bomb
with himself to the plane because the odds of there being two bombs on a
plane were so low...

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
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] Help System Searches

2002-03-11 Thread kapil thangavelu

would it make sense to make the help system still allow searching but do 
storage in a mounted zodb ? 

cheers

kapil



On Saturday 09 March 2002 10:55 am, Chris McDonough wrote:
  There is no way to fix this? What other problems are there with the
  help system?

 Not that I can think of.  Other problems with the help system are
 presentation, mostly.

  Would it somehow be possible to make the helpsystem ignore versions?

 No, unfortunately.  It uses the Catalog, which is based on ZODB, and it
 puts a Catalog instance into the main FileStorage, which is undoing and
 versioning.  It then proceeds to do writes to the database when it
 appears that all you're doing is reading a pre-existing page.  If you're
 in a version at the time, a set of objects will be written into the
 Catalog and into other places in instance space that  have version.
 This is a bad pattern, and the only way to fix it is to prevent it from
 happening, which requires some helpsystem architectural changes that
 amount (IMHO) to a rewrite.

 - C

___
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] help identifying a structure inside Zope.

2001-10-24 Thread Chris McDonough

I'd be tempted to suspect the BTrees module setstate code.

Anthony Baxter wrote:
 I'm hunting for a very very obscure python-crashing bug on
 Solaris with Zope2.4 on Python2.1.1. The structure that's 
 getting corrupted looks something like:
 
  299, (300, (301, (302, (303, ( 304, ( 3, c_o_s ) ) ) ) ) ) 
 (nested tuples)
 
 I'm wondering if anyone can think of somewhere inside Zope that
 generates this sort of structure? c_o_s is a string we use in
 our code as a property, a database column, and a REQUEST variable.
 
 As far as we can tell, it's not something being generated by
 our code...
 
 Thanks,
 Anthony
 
 
 --
 Anthony Baxter [EMAIL PROTECTED]
 It's never too late to have a happy childhood.
 
 
 ___
 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 )
 


-- 
Chris McDonoughZope Corporation
http://www.zope.org http://www.zope.com
Killing hundreds of birds with thousands of stones


___
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] help identifying a structure inside Zope.

2001-10-24 Thread Anthony Baxter


 Chris McDonough wrote
 I'd be tempted to suspect the BTrees module setstate code.

Yeah? This is something that you'd expect to see with it?

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] help identifying a structure inside Zope.

2001-10-24 Thread Chris McDonough

Maybe... it's a guess.

Anthony Baxter wrote:
Chris McDonough wrote

I'd be tempted to suspect the BTrees module setstate code.

 
 Yeah? This is something that you'd expect to see with it?
 
 Anthony
 
 


-- 
Chris McDonoughZope Corporation
http://www.zope.org http://www.zope.com
Killing hundreds of birds with thousands of stones


___
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] HELP PLEASE

2001-10-12 Thread Andre Schubert

Hi,

i don't no what the problem was, but it was not the swap.
I found out, that if i took lynx on the same machine everything works
fine and fast, but if i
connect over our network everything slows down.
This happens until my sysop was at work.
I think there was a network problem, but i dont know this.
If this error occurs a second time a know what i have to do.

thanks as

Robert Rottermann schrieb:
 
 I had this once (the slowing down) when an other process was eating up all
 memory and zope was constantly paged out.
 
 Robert
 - Original Message -
 From: Andre Schubert [EMAIL PROTECTED]
 To: zope [EMAIL PROTECTED]
 Sent: Friday, October 12, 2001 6:49 AM
 Subject: [Zope-dev] HELP PLEASE
 
  Hi all,
 
  i have serious problems with my zope.
  Last time he dies very often with error code 13,and since to today he
  slows down extremly.
  To view the Control_Panel/DebugForm it takes up to 1 minute and thats
  not acceptable.
 
  How can i track down these problems.
 
  I run Zope-2.2.4 on Immunix-RedHat 6.2
 
  thanks a lot as
 
  ___
  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 )

___
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] HELP PLEASE

2001-10-11 Thread Robert Rottermann

I had this once (the slowing down) when an other process was eating up all
memory and zope was constantly paged out.

Robert
- Original Message -
From: Andre Schubert [EMAIL PROTECTED]
To: zope [EMAIL PROTECTED]
Sent: Friday, October 12, 2001 6:49 AM
Subject: [Zope-dev] HELP PLEASE


 Hi all,

 i have serious problems with my zope.
 Last time he dies very often with error code 13,and since to today he
 slows down extremly.
 To view the Control_Panel/DebugForm it takes up to 1 minute and thats
 not acceptable.

 How can i track down these problems.

 I run Zope-2.2.4 on Immunix-RedHat 6.2

 thanks a lot as

 ___
 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] Help !!!

2001-07-11 Thread Mark McEahern



One of 
the links on that page ends in -src.tgz. That's the source to 
Zope.

Cheers,

// 
mark

-Original Message-From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of atul dedhiaSent: 
Wednesday, July 11, 2001 10:34 PMTo: 
[EMAIL PROTECTED]Subject: [Zope-dev] Help !!!
Hi,
I'm a student, doing my Masters in Clinet/Server Computing. I was interested 
in Content Server stuff, thats why I decided to do my master project on Content 
Server. 
I was going through the web, and found Zope Application server, and decided 
to work on it.Right now Zope works with any web server that supports the 
Common Gateway Interface (CGI). I want to develope some adapter that 
willenable Zopeworking with any web serverthat supports ASP. 

I downloaded the Zope source code that is available at http://www.zope.org/Products/Zope/2.3.3 

I want to play with the source code of Zope application server to have a 
better idea of this application, butcouldn't find any good documentation. 
I'm wandering whether thats the only peace of code availble for users? Is 
that full source code for Zope Application server, if not where can I get the 
full source code? Do u know any documentation which will be helpful for 
understanding and playing aound with source code??
Please respond to this mail if u have answer to my questions.
Thanks,
Atul


Do You Yahoo!?Get personalized email addresses from Yahoo! Mail - 
only $35 a year!http://personal.mail.yahoo.com/


Re: [Zope-dev] help with external method

2001-06-29 Thread Erik Enge

On Fri, 29 Jun 2001, Edgardo Zulian wrote:

 I'm just new with Zope, and I m trying to make an external method with
 python that return me the names of the files that are in an especific
 folder of the Zope i.e:the folder:  Root Folder/function_repository..

I'm not quite sure what you want to do, but you could try to add a a DTML
Method in the folder which contained this:

dtml-in objectValues()
 dtml-var id
/dtml-in

This would print all the names (I guess you ment id's) of the objects in
that folder.

HTH.


___
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] help with external method

2001-06-29 Thread Edgardo Zulian

 On Fri, 29 Jun 2001, Edgardo Zulian wrote:

  I'm just new with Zope, and I m trying to make an external method with
  python that return me the names of the files that are in an especific
  folder of the Zope i.e:the folder:  Root Folder/function_repository..

 I'm not quite sure what you want to do, but you could try to add a a DTML
 Method in the folder which contained this:

 dtml-in objectValues()
  dtml-var id
 /dtml-in

Hi, that's work pretty fine,
but the problem is that I want to get that result with an external method
because then I want to assign that result  to a text folder's property





___
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] Help !

2001-04-04 Thread Jens Vagelpohl

the zcatalog is built to search items in the ZODB, it cannot search
unrelated data storages, like databases, out of the box.

jens



on 4/4/01 22:22, Honey George at [EMAIL PROTECTED] wrote:

 Hello,
  I am not able to search a postgres database using Z
 Catalog. I am not clear of the procedure basically. If
 you could help me in this regard please reply. I am a
 programmer from India.If I get an example it will be
 great.
 
 Regards,
  Honey
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/
 
 ___
 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] Help! Can't unsubscribe!

2000-11-17 Thread Ken Manheimer

On Fri, 17 Nov 2000, T.J. Mannos wrote:

 I'm trying to unsubscribe from this list because it's filling up my mailbox
 too fast.  However, when I try to use the web interface or the e-mail
 interface to unsubscribe, it gives me an odd error message.  It says
 something to the effect of, "There's something wrong with your account.
 Please contact the postmaster."  Yet I keep getting zope-dev messages.
 Could somebody tell me how to get off this list?

I've cancelled your zope-dev subscription.  (We're running an old version
of the maillist system, which occasionally has this problem - fortunately,
we now have some people with the time and leverage to shepherd, fix, etc
an upgrade to a newer version - will be happening soon.  In the
meanwhile, sorry about the capture!)

Ken Manheimer
[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] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Steve Alexander

Stephen Simmons wrote:


 1.)  How do you magically get the DTML context from 'dtml-var A' without
 having to resort to 'dtml-var "A(_,REQUEST)"' in the templates?

Give your class a class attribute of isDocTemp=1. This tells the DTML 
method calling machinery that you want to receive the namespace as 
REQUEST as the third argument to your __call__ method.

There was a thread on this in zope-dev on and around 26 September, 
subject "more __call__ ..."

 In the __call__ methods of different classes, I've seen some code like:
 'if REQUEST is None and not kw: REQUEST=self.REQUEST' (from
 Catalog.py)

Your method will usually get called with its third argument as the 
namespace, or REQUEST. However, sometimes, it may just be called with a 
"self" argument. The code in Catalog.py is falling back on getting the 
REQUEST out of the self argument, if it is not explicitly passed a 
namespace to work with.

 I can't see any consistency in what these classes are doing, so I don't know
 what I need to do.

Most developers would like more consistency here :-)
I'm hoping that all this will be much much clearer for Zope 2.3. That 
doesn't help much for now though.

 2.)  How to convert an arbitrary text string into rendered DTML inside a
 python product method?
 How do you get the object's properties, REQUEST and acquisition context all
 in the namespace?
 
 I've been trying code like:
template = 'span class="purpose"dtml-var purpose
 fmt="structured_text"/span'
dtml = HTML(template, globals())

If all you want to do is render some Structured Text, you can import and 
use the StructuredText module directly.

 P.S.  ChrisW, searching NIP for "__call__" returns every message with 'call'
 in it, which is not quite the same thing!

For cases like that, I have downloaded the plaintext mail archives as 
available from http://www.zope.org/Resources/MailingLists

I then use unix grep on them to search for just what I need.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net



___
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] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Steve Alexander

Stephen Simmons wrote:

 
 2.)  How to convert an arbitrary text string into rendered DTML inside a
 python product method?
 How do you get the object's properties, REQUEST and acquisition context all
 in the namespace?
 
 I've been trying code like:
template = 'span class="purpose"dtml-var purpose
 fmt="structured_text"/span'
dtml = HTML(template, globals())
rendered = dtml(self, REQUEST)

Here's an except from my Python interactive interpreter:

  import DocumentTemplate
  my_dt=DocumentTemplate.HTML("""dtml-var "1+a)
  my_dt(None, {'a':4})
'5'

The object my_dt is callable, and takes the arguments (client, 
namespace). You can put a REQUEST in place of the simple dictionary I 
used above.

If you're trying this, make sure you have the PYTHONPATH environment 
variable set to /your/zope/directory/lib/python


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Evan Simpson

From: Stephen Simmons [EMAIL PROTECTED]
 1.)  How do you magically get the DTML context from 'dtml-var A' without
 having to resort to 'dtml-var "A(_,REQUEST)"' in the templates?

A.isDocTemp = 1 # or make it a shared class attribute

 2.)  How to convert an arbitrary text string into rendered DTML inside a
 python product method?

Here's what I use:

from Globals import HTML
from AccessControl import getSecurityManager

class DTML(HTML):
"""DTML objects are DocumentTemplate.HTML objects that allow
   dynamic, temporary creation of restricted DTML."""
def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
"""Render the DTML given a client object, REQUEST mapping,
Response, and key word arguments."""

security=getSecurityManager()
security.addContext(self)
try:
return apply(HTML.__call__, (self, client, REQUEST), kw)
finally: security.removeContext(self)

def validate(self, inst, parent, name, value, md):
return getSecurityManager().validate(inst, parent, name, value)

Cheers,

Evan @ digicool  4-am


___
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] Help needed: why is this DTML not working in zope 2 ?

2000-07-04 Thread Chris Withers

You could try moving stuff to the new dtml style for starters:
dtml-var standard_html_header and the like.

That might help, if not let us know..

cheers,

Chris

Gilles Lavaux wrote:
 
 Hello,
 
 I am a little bit disappointed not getting any echo from my previous
 question, so I report it.
 Maybe my dtml is wrong for zope2, but I would appreciate to have some
 explanation from more experienced peoples.
 If I can not find a solution, we will have to keep our zope1 production
 server, and it will be the end of the Zope story in my company :-(
 
 So my question was :
 
 I want to display the content of a site starting from a folder called 'Site'
 with a tree tag.
 I want also to render immediately inside the tree the documents with an
 ID=='PUBLIC_Doc'.
 In Zope 1.x I have a working dtml method like this:
 
 !--#var standard_html_header--
 !--#tree Site branches_expr="objectValues()" sort=id skip_unauthorized--
   b!--#var id--/b
   !--#if "_['id']=='PUBLIC_Doc'"--
 ##
 !--#try--
   !--#var "_[_['id']]"--
 !--#except--
   !--#var Except_Message--
 !--#/try--
 ##
   !--#/if--
 !--#/tree--
 !--#var standard_html_footer--
 
 Unfortunatly for me , with zope 2.1.6 i get an error when I try to render
 the 'PUBLIC_Doc' document:
 .
 PUBLIC_Doc !#
 Error type:AttributeError
 Error Message:
 Error Message:__call__
 Error TB:Traceback (innermost last): File
 "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Try.py", line 221, in
 render_try_except result = render_blocks(self.section, md) File
 "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 335, in
 eval return eval(code,globals,d) File "", line 0, in ? File
 "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 161, in
 careful_getitem v=mapping[key] File
 "/usr/share/zope/lib/python/OFS/DTMLMethod.py", line 146, in __call__
 r=apply(HTML.__call__, (self, client, REQUEST), kw) File
 "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py", line 502,
 in __call__ try: return render_blocks(self._v_blocks, md) AttributeError:
 __call__
 
 has someone a solution ??
 
 Thanks,
 
 Gilles
 
 ___
 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] Help needed: why is this DTML not working in zope 2 ?

2000-07-04 Thread Gilles Lavaux

Hello Lee

!--#var PUBLIC_Doc-- doesn't change anything, same error.
(you are right, I can use the name directly , but I have some other piece of
code where I have to use the _[_['']] construction, so it has to work...)


But I found something: In my 'PUBLIC_Doc' document I display image with a
!--# var image_name-- tag,  my problem disappear if I use
!--#var "image_name"--,  someone can explain this??

Thanks anyway for the replies

Gilles
-Original Message-
From: LEE, Kwan Soo [EMAIL PROTECTED]
To: Gilles Lavaux [EMAIL PROTECTED]; [EMAIL PROTECTED]
[EMAIL PROTECTED]
Date: Tuesday, July 04, 2000 12:32 PM
Subject: Re: [Zope-dev] Help needed: why is this DTML not working in zope 2
?


Not an answer, but a question.
   b!--#var id--/b
   !--#if "_['id']=='PUBLIC_Doc'"--
 ##
 !--#try--
   !--#var "_[_['id']]"--
 !--#except--
You seems to "call" PUBLIC_Doc, then why don't you just !--#var
PUBLIC_Doc--
instead of the !--#var "_[_['id']]"--?

LEE Kwan Soo

___
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] Help needed: why is this DTML not working in zope 2 ?

2000-07-04 Thread Chris Withers

Gilles Lavaux wrote:
 But I found something: In my 'PUBLIC_Doc' document I display image with a
 !--# var image_name-- tag,  my problem disappear if I use
 !--#var "image_name"--,  someone can explain this??

Are you sure the space after the # isn't your problem?

I would STRONGLY recommend moving your code to the new syntax,
especially if you are having problems.

You should be aware that plans are afoot to remove the old syntax...

cheers,

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] Help needed: why is this DTML not working in zope 2 ?

2000-07-04 Thread Gilles Lavaux

Argh!!!

no, I made a typo error : it was !--#var image_name--.the syntax was good.
Ok, I will use the new syntax in my new sites. But for my old site, I will
not modify my ~500 dtml methods, except if there is a way to automate the
change.

Gilles

-Original Message-
From: Chris Withers [EMAIL PROTECTED]
To: Gilles Lavaux [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tuesday, July 04, 2000 1:33 PM
Subject: Re: [Zope-dev] Help needed: why is this DTML not working in zope 2
?


Gilles Lavaux wrote:
 But I found something: In my 'PUBLIC_Doc' document I display image with a
 !--# var image_name-- tag,  my problem disappear if I use
 !--#var "image_name"--,  someone can explain this??

Are you sure the space after the # isn't your problem?

I would STRONGLY recommend moving your code to the new syntax,
especially if you are having problems.

You should be aware that plans are afoot to remove the old syntax...

cheers,

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 )




___
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] Help needed: why is this DTML not working in zope 2 ?

2000-07-04 Thread Steve Alexander

Steve Alexander wrote:
 
 Gilles Lavaux wrote:
 
  Argh!!!
 
  no, I made a typo error : it was !--#var image_name--.the syntax was good.
  Ok, I will use the new syntax in my new sites. But for my old site, I will
  not modify my ~500 dtml methods, except if there is a way to automate the
  change.
 
 You can write a pretty simple external method to walk your Zope object
 heirarchy looking for DTML Methods and DTML documents, then altering the
 syntax. Shouldn't take more than an hour to write and debug and test and
 document, if you've written stuff in Python before.
 
 I'm off to a meeting for a few hours, but harrass me later and I'll send
 to the list a proof-of-concept external method to get you started.

An external method for automated change from old syntax to new syntax
follows.

 * Use at your own risk
 * No warranty implied or given
 * Use on a copy of your main Zope site
 * Back up data.fs three times before starting
 * Not guarenteed not to spin your processor and never terminate
 * Run on a copy of Zope in debug mode (-D) to see the print statements
 * Barely tested, if at all



import re

def convert_dtml(self):
"""Convert DTML Methods and DTML Documents from old syntax to 
   new syntax.
   Warning: recursive! Might just eat all your stack.
   Does not work on subclasses of DTML Method and DTML Document.
   Preserves normal comments, and handles instances of "--" in 
   quotes.
"""
print 'convert_dtml: id=%s' % self.title_and_id()
if hasattr(self, 'meta_type') and \
  (self.meta_type == 'DTML Method' or \
   self.meta_type == 'DTML Document'):
convert(self)

# should this be "isPrincipiaFolderish"?
if hasattr(self, 'isAnObjectManager') and self.isAnObjectManager:
for v in self.objectValues():
v.convert_dtml()

_convert_regex = re.compile('!--#(/?)(([^"-]+?|"[^"]*?"|-[^-])+?)--')

def convert(dtml_item):
print 'converting...'
title = dtml_item.title
   # like document_src, but doesn't require RESPONSE
data = dtml_item.PrincipiaSearchSource()
print 'data'
print data
newdata = _convert_regex.sub('\g1dtml-\g2', data)
print 'newdata'
print newdata
print 'end'
dtml_item.manage_edit(newdata, title)




--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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] Help needed: why is this DTML not working in zope 2 ?

2000-07-04 Thread Steve Alexander

Steve Alexander wrote:
 
 
 An external method for automated change from old syntax to new syntax
 follows.
 
  * Use at your own risk
  * No warranty implied or given
  * Use on a copy of your main Zope site
  * Back up data.fs three times before starting
  * Not guarenteed not to spin your processor and never terminate
  * Run on a copy of Zope in debug mode (-D) to see the print statements
  * Barely tested, if at all
 
 _convert_regex = re.compile('!--#(/?)(([^"-]+?|"[^"]*?"|-[^-])+?)--')

Actually, I missed something in the original regex, above. (Funny how I
noticed just after I pressed the 'send' button!)

It should read like this:

_convert_regex =
re.compile('''!--#(/?)(([^"-]+?|"[^"]*?"|'[^']*?'|-[^-])+?)--''')


The whole thing again -- same disclaimers apply, only more so :-)



import re

def convert_dtml(self):
"""Convert DTML Methods and DTML Documents from old syntax to 
   new syntax.
   Warning: recursive!
   This assumes that DTML Method and DTML Document haven't been
   subclassed.
"""
print 'convert_dtml: id=%s' % self.title_and_id()
if hasattr(self, 'meta_type') and \
  (self.meta_type == 'DTML Method' or \
   self.meta_type == 'DTML Document'):
convert(self)

# should this be "isPrincipiaFolderish"?
if hasattr(self, 'isAnObjectManager') and self.isAnObjectManager:
for v in self.objectValues():
v.convert_dtml()

_convert_regex =
re.compile('''!--#(/?)(([^"-]+?|"[^"]*?"|'[^']*?'|-[^-])+?)--''')

def convert(dtml_item):
print 'converting...'
title = dtml_item.title
   # like document_src, but doesn't require RESPONSE
data = dtml_item.PrincipiaSearchSource()
print 'data'
print data
newdata = _convert_regex.sub('\g1dtml-\g2', data)
print 'newdata'
print newdata
print 'end'
dtml_item.manage_edit(newdata, title)




--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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 )