[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml - replaced url_quote by html_quote for add list values (pushing the add button escapes the value again)

2005-10-27 Thread Yvo Schubbe
Log message for revision 39667:
  - replaced url_quote by html_quote for add list values (pushing the add 
button escapes the value again)

Changed:
  U   Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml

-=-
Modified: Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml
===
--- Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml 2005-10-27 
07:58:59 UTC (rev 39666)
+++ Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml 2005-10-27 
11:05:37 UTC (rev 39667)
@@ -40,7 +40,7 @@
  
onChange=location.href='dtml-URL1;/'+this.options[this.selectedIndex].value
 option value=manage_workspace disabledSelect type to add.../option
 dtml-in filtered_meta_types mapping sort=name
-option value=dtml.url_quote-action;dtml-name;/option
+option value=dtml.html_quote-action;dtml-name;/option
 /dtml-in
 /select
 input class=form-element type=submit name=submit value= Add  /

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/dtml/main.dtml - replaced url_quote by html_quote for add list values (pushing the add button escapes the value again)

2005-10-27 Thread Yvo Schubbe
Log message for revision 39668:
  - replaced url_quote by html_quote for add list values (pushing the add 
button escapes the value again)

Changed:
  U   Zope/trunk/lib/python/OFS/dtml/main.dtml

-=-
Modified: Zope/trunk/lib/python/OFS/dtml/main.dtml
===
--- Zope/trunk/lib/python/OFS/dtml/main.dtml2005-10-27 11:05:37 UTC (rev 
39667)
+++ Zope/trunk/lib/python/OFS/dtml/main.dtml2005-10-27 11:05:58 UTC (rev 
39668)
@@ -40,7 +40,7 @@
  
onChange=location.href='dtml-URL1;/'+this.options[this.selectedIndex].value
 option value=manage_workspace disabledSelect type to add.../option
 dtml-in filtered_meta_types mapping sort=name
-option value=dtml.url_quote-action;dtml-name;/option
+option value=dtml.html_quote-action;dtml-name;/option
 /dtml-in
 /select
 input class=form-element type=submit name=submit value= Add  /

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/inst/WinBuilders/mk/python.mk A one-character change to move to pywin32 build 205.

2005-10-27 Thread Tim Peters
Log message for revision 39672:
  A one-character change to move to pywin32 build 205.
  
  This should repair PySECURITY_ATTRIBUTES problems that
  (mostly) Plone users report using recent Zopes on
  Windows.
  
  This change is in the 2.8.4 Windows installer I just
  published on zope.org.  Alas, the 2.8.4 tarball there
  (and the 2.8.4 tag) differs from the source used to build
  the 2.8.4 Windows installer (by this one character,
  bumping W32ALLVERSION in inst/WinBuilders/mk/python.mk).
  

Changed:
  U   Zope/branches/Zope-2_8-branch/inst/WinBuilders/mk/python.mk

-=-
Modified: Zope/branches/Zope-2_8-branch/inst/WinBuilders/mk/python.mk
===
--- Zope/branches/Zope-2_8-branch/inst/WinBuilders/mk/python.mk 2005-10-27 
14:05:04 UTC (rev 39671)
+++ Zope/branches/Zope-2_8-branch/inst/WinBuilders/mk/python.mk 2005-10-27 
16:46:31 UTC (rev 39672)
@@ -6,7 +6,7 @@
 PYVERSION_MINOR=3
 PYVERSION_PATCH=5
 PYVERSION=$(PYVERSION_MAJOR).$(PYVERSION_MINOR).$(PYVERSION_PATCH)
-W32ALLVERSION=204
+W32ALLVERSION=205
 
 # CAUTION:  Extracting files from Wise installers doesn't really do what
 # you expect.  While a Wise installer is a zip file, the zip file

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/inst/WinBuilders/README.txt Merge rev 39674 from Zope-2_8-branch.

2005-10-27 Thread Tim Peters
Log message for revision 39675:
  Merge rev 39674 from Zope-2_8-branch.
  
  Record switch to pywin32 build 205.
  

Changed:
  U   Zope/trunk/inst/WinBuilders/README.txt

-=-
Modified: Zope/trunk/inst/WinBuilders/README.txt
===
--- Zope/trunk/inst/WinBuilders/README.txt  2005-10-27 16:50:36 UTC (rev 
39674)
+++ Zope/trunk/inst/WinBuilders/README.txt  2005-10-27 16:52:14 UTC (rev 
39675)
@@ -27,7 +27,7 @@
 
   - Python-2.3.5.tgz
   - Python-2.3.5.exe (used for binary modules)
-  - pywin32-204.win32-py2.3.exe (extracts binaries and sources)
+  - pywin32-205.win32-py2.3.exe (extracts binaries and sources)
   - Zope.tgz
 
 As time marches on, these version numbers will obviously change.  See/edit

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/inst/WinBuilders - README.txt:1.1.2.3

2005-10-27 Thread Tim Peters
Update of /cvs-repository/Zope/inst/WinBuilders
In directory cvs.zope.org:/tmp/cvs-serv14861/inst/WinBuilders

Modified Files:
  Tag: Zope-2_7-branch
README.txt 
Log Message:
Backport revs 39672 and 39674 from Zope-2_8-branch.

Move to pywin32 build 205.

This should repair PySECURITY_ATTRIBUTES problems that
(mostly) Plone users report using recent Zopes on Windows.

The Windows installer for Zope 2.8.4 includes this change (although
the _tag_ for 2.8.4 does not!).  No release in the 2.7 line
includes this change yet.


=== Zope/inst/WinBuilders/README.txt 1.1.2.2 = 1.1.2.3 ===
--- Zope/inst/WinBuilders/README.txt:1.1.2.2Mon May 16 19:10:55 2005
+++ Zope/inst/WinBuilders/README.txtThu Oct 27 12:56:01 2005
@@ -23,7 +23,7 @@
 
   - Python-2.3.5.tgz
   - Python-2.3.5.exe (used for binary modules)
-  - pywin32-204.win32-py2.3.exe (extracts binaries and sources)
+  - pywin32-205.win32-py2.3.exe (extracts binaries and sources)
   - Zope.tgz
 
 As time marches on, these version numbers will obviously change.  See

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] RFC: product initialization cleanup and improvements

2005-10-27 Thread yuppie

Hi!


Working on the five:registerClass directive for Five 1.2 and Zope 2.9 I 
had a closer look at the product initialization code.


I propose the following modifications for the dicts in 
Products.meta_types (set by registerClass):



1.) 'action' key:
-

I'd like to give empty 'action' values a special meaning: The meta_type 
is not visible in the add drop down in the ZMI.


The five:registerClass directive allows to set empty 'action' values.

This would resolve http://www.zope.org/Collectors/Zope/1885 .

Filtering out meta_types with empty 'action' values is a two line change 
in main.dtml. I'd like to make that change also on the 2.8 branch to 
enable that feature for 2.8.5 with Five 1.2.



2.) 'interfaces' key:
-

Does currently only contain oldstyle interfaces. The code in 
OFS.ObjectManager that uses that key works also with z3 interfaces. I'd 
like to add z3 interfaces to the value of that key. That would e.g. 
allow to set only new style interfaces on catalog index classes.



3.) 'product' key:
--

AFAICS it isn't used in Zope itself. I'd like to add a note that it 
might be removed in a future version.



4.) related cleanup:


Application.install_product has some backwards compatibility code for 
products that have initialization code outside the 'initialize' method 
of their __init__.py. This is deprecated at least for 5 years. I'd like 
to add explicit deprecation warnings on the 2.8 branch and to remove 
that code for Zope 2.9.



This isn't much work, it can all be done in time for the Zope 2.9 beta.

Any feedback is welcome. If there are no objections, I'll make the 
changes as proposed.



Cheers,

Yuppie

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

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


Re: [Zope-dev] Re: New testrunner on the Zope 2 trunk.

2005-10-27 Thread Jim Fulton

Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Fulton wrote:


Weird. I can't reproduce this.  Is anyone else seeing this?



For the benefit of those playing along at home:

Jim and I discovered this evening that we were running on
mostly-identical platforms (Ubuntu Breezy 5.10, Python 2.3.5 compiled
from source).

The only difference we could find was that I had rebuilt my Pythnon
using GCC 4.0, while Jim's was one built under GCC 3.3.

Go figure,


Sigh.

I rebuilt Python 2.3.5:

[EMAIL PROTECTED]:~/p/z2/2$ /usr/local/python/2.3.5b/bin/python
Python 2.3.5 (#1, Oct 27 2005, 10:22:20)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)] on linux2
Type help, copyright, credits or license for more information.


I don't get a test failure with this Python:

cd ~/p/z2/2/
/usr/local/python/2.3.5b/bin/python test.py -szope.testing
Running tests at level 1
Running unit tests:
  Running:
..
...
  Ran 89 tests with 0 failures and 0 errors in 32.003 seconds.

Compilation finished at Thu Oct 27 11:04:40

Is anyone else getting this test failure?

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


[Zope-dev] Re: RFC: product initialization cleanup and improvements

2005-10-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yuppie wrote:

 Working on the five:registerClass directive for Five 1.2 and Zope 2.9 I
 had a closer look at the product initialization code.
 
 I propose the following modifications for the dicts in
 Products.meta_types (set by registerClass):
 
 
 1.) 'action' key:
 -
 
 I'd like to give empty 'action' values a special meaning: The meta_type
 is not visible in the add drop down in the ZMI.
 
 The five:registerClass directive allows to set empty 'action' values.
 
 This would resolve http://www.zope.org/Collectors/Zope/1885 .
 
 Filtering out meta_types with empty 'action' values is a two line change
 in main.dtml. I'd like to make that change also on the 2.8 branch to
 enable that feature for 2.8.5 with Five 1.2.

+1.

 2.) 'interfaces' key:
 -
 
 Does currently only contain oldstyle interfaces. The code in
 OFS.ObjectManager that uses that key works also with z3 interfaces. I'd
 like to add z3 interfaces to the value of that key. That would e.g.
 allow to set only new style interfaces on catalog index classes.

I'd just as soon rip old-style interfaces out by the roots.  +1 for
allowing new-style ones in 2.8.x;  -1 for continuing to support
old-style ones on the trunk (anybody clever enough to use the old ones
back in the day is clever enough, and should be motivated enough, to
convert).

 3.) 'product' key:
 --
 
 AFAICS it isn't used in Zope itself. I'd like to add a note that it
 might be removed in a future version.

+1.

 4.) related cleanup:
 
 
 Application.install_product has some backwards compatibility code for
 products that have initialization code outside the 'initialize' method
 of their __init__.py. This is deprecated at least for 5 years. I'd like
 to add explicit deprecation warnings on the 2.8 branch and to remove
 that code for Zope 2.9.

+1.

 This isn't much work, it can all be done in time for the Zope 2.9 beta.
 
 Any feedback is welcome. If there are no objections, I'll make the
 changes as proposed.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDYPhi+gerLs4ltQ4RAjqAAKCa3BqERqXAC/uYPQp5n9Y8ZZL33QCeJ65o
rKUDm17Qy3x+iNa1+5HxYnU=
=e0ZF
-END PGP SIGNATURE-

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


[Zope-dev] Re: New testrunner on the Zope 2 trunk.

2005-10-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Fulton wrote:

 Sigh.
 
 I rebuilt Python 2.3.5:
 
 [EMAIL PROTECTED]:~/p/z2/2$ /usr/local/python/2.3.5b/bin/python
 Python 2.3.5 (#1, Oct 27 2005, 10:22:20)
 [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)] on linux2
 Type help, copyright, credits or license for more information.

 
 I don't get a test failure with this Python:
 
 cd ~/p/z2/2/
 /usr/local/python/2.3.5b/bin/python test.py -szope.testing
 Running tests at level 1
 Running unit tests:
   Running:
 ..
 ...
   Ran 89 tests with 0 failures and 0 errors in 32.003 seconds.
 
 Compilation finished at Thu Oct 27 11:04:40
 
 Is anyone else getting this test failure?

Just to note that the tests aren't running cleanly on Stefan Holek's
box, either (but they fail differently):

 http://mail.zope.org/pipermail/zope-tests/2005-October/003421.html

 http://mail.zope.org/pipermail/zope-tests/2005-October/003422.html


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDYPj0+gerLs4ltQ4RAv6bAJ4jZvj3unZ2mupaMKFVK0886+iuvgCgvi3I
ka6+lOBnQ9l34slY+oD7kR8=
=b/x2
-END PGP SIGNATURE-

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


[Zope-dev] Re: New testrunner on the Zope 2 trunk.

2005-10-27 Thread Jim Fulton

Tres Seaver wrote:
...


Just to note that the tests aren't running cleanly on Stefan Holek's
box, either (but they fail differently):

 http://mail.zope.org/pipermail/zope-tests/2005-October/003421.html

 http://mail.zope.org/pipermail/zope-tests/2005-October/003422.html


These are not failures.  They are also not complete output.

I'm hoping that Stefan will look at this.

We also plan to add zope 2 to the buildbot config.

It would be nice is someone would address the deprecation
warning by getting rid of the whrandom reference. :)

Jim


--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
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] Removing whrandom in Zope 2.9 (was Re: New testrunner on the Zope 2 trunk.)

2005-10-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Fulton wrote:
 Tres Seaver wrote:
 ...
 

 Just to note that the tests aren't running cleanly on Stefan Holek's
 box, either (but they fail differently):

  http://mail.zope.org/pipermail/zope-tests/2005-October/003421.html

  http://mail.zope.org/pipermail/zope-tests/2005-October/003422.html
 
 
 These are not failures.  They are also not complete output.
 
 I'm hoping that Stefan will look at this.
 
 We also plan to add zope 2 to the buildbot config.
 
 It would be nice is someone would address the deprecation
 warning by getting rid of the whrandom reference. :)
 
 Jim
 
 

FWIW:

$ pwd
/home/tseaver/projects/Zope-CVS/Zope-2_8-branch
$ find . -name *.py | grep -v build-base | xargs grep -l whrandom
./lib/python/AccessControl/DTML.py
./lib/python/Products/PythonScripts/help/PythonScript.py
./lib/python/Products/ZCatalog/regressiontests/regressionCatalog.py
./lib/python/Products/ZCatalog/regressiontests/loadmail.py
./lib/python/RestrictedPython/Utilities.py
./lib/python/DocumentTemplate/DT_Util.py
./lib/python/zope/security/examples/sandbox.py
./lib/python/zope/security/examples/sandbox_security.py

The 'regressiontest' cases have been ripped out on the trunk already.
For 2.8, we can't rip out the 'AccessControl/DTML.py' version without
breaking third-party code which uses it in DTML.  Here is what it does:

  import SecurityManagement, string, math, whrandom, random
  ...
  whrandom.__allow_access_to_unprotected_subobjects__=1
  random.__allow_access_to_unprotected_subobjects__=1

Likewise RestrictedPython/Utilities.py:

  import string, math, random, whrandom
  ...
  utility_builtins = {}
  ...
  utility_builtins['random'] = random
  utility_builtins['whrandom'] = whrandom

The Zope3 stuff could likely be replaced (e.g. for a 3.0.2 release), and
should be gone for 2.9 / 3.2.

Hmm, I see that RestrictedPython/Utilities.py on the Z3 trunk aliases
'random' as 'whrandom' -- could we use that strategy for 2.8 etc.?

We could remove them for 2.9, I guess, and just make people fix their
applications.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDYRtT+gerLs4ltQ4RAtvdAKDMKwFPaRysMkNa6c/k1f70YkWYNgCfRvcu
xqLrTdDlDHrY41PhmyFPIiI=
=zd+o
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Removing whrandom in Zope 2.9 (was Re: New testrunner on the Zope 2 trunk.)

2005-10-27 Thread Jim Fulton

Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-



FWIW:


Alot. :)


$ pwd
/home/tseaver/projects/Zope-CVS/Zope-2_8-branch
$ find . -name *.py | grep -v build-base | xargs grep -l whrandom
./lib/python/AccessControl/DTML.py
./lib/python/Products/PythonScripts/help/PythonScript.py
./lib/python/Products/ZCatalog/regressiontests/regressionCatalog.py
./lib/python/Products/ZCatalog/regressiontests/loadmail.py
./lib/python/RestrictedPython/Utilities.py
./lib/python/DocumentTemplate/DT_Util.py




./lib/python/zope/security/examples/sandbox.py
./lib/python/zope/security/examples/sandbox_security.py


Sigh.

...


Hmm, I see that RestrictedPython/Utilities.py on the Z3 trunk aliases
'random' as 'whrandom' -- could we use that strategy for 2.8 etc.?


Yes.  random has the same documented functions and signatures as whrandon.


We could remove them for 2.9, I guess, and just make people fix their
applications.


I suggest we make aliases and generate deprecation warnings if
whrandom is used. (The later may be tricky, I realize.)

Maybe for now, just make aliases and move on. :)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
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] Experiencing TypeError: The object is not a PySECURITY_ATTRIBUTES object

2005-10-27 Thread Tim Peters
The bad news is that I don't think I'll ever put in enough time to
fully understand what went wrong here.

The good news is that the newly-released Zope 2.8.4 Windows installer, at

http://www.zope.org/Products/Zope/2.8.4

includes pywin32 build 205.  If that doesn't fix PySECURITY_ATTRIBUTES
problems for Plone users, you know which Mark Hammond to contact ;-)

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


[Zope-dev] Re: RFC: product initialization cleanup and improvements

2005-10-27 Thread yuppie

Hi Tres!


Tres Seaver wrote:

yuppie wrote:


1.) 'action' key:
-

I'd like to give empty 'action' values a special meaning: The meta_type
is not visible in the add drop down in the ZMI.

The five:registerClass directive allows to set empty 'action' values.

This would resolve http://www.zope.org/Collectors/Zope/1885 .

Filtering out meta_types with empty 'action' values is a two line change
in main.dtml. I'd like to make that change also on the 2.8 branch to
enable that feature for 2.8.5 with Five 1.2.


+1.


Ouch! I thought everything is in place for that feature, but an 
important piece of the puzzle is missing: The fix for checkPermission.


http://www.zope.org/Collectors/Zope/1774

_verifyObjectPaste uses a hack to work around that checkPermission 
issue, making 'action' required.


Tres: You did have a look at issue #1774 a while ago. What do you think: 
How much work would it be to resolve this issue? I'm not a C programmer 
so I can't do it myself...



2.) 'interfaces' key:
-

Does currently only contain oldstyle interfaces. The code in
OFS.ObjectManager that uses that key works also with z3 interfaces. I'd
like to add z3 interfaces to the value of that key. That would e.g.
allow to set only new style interfaces on catalog index classes.


I'd just as soon rip old-style interfaces out by the roots.  +1 for
allowing new-style ones in 2.8.x;  -1 for continuing to support
old-style ones on the trunk (anybody clever enough to use the old ones
back in the day is clever enough, and should be motivated enough, to
convert).


My goal is to make it possible to run products on Zope 2.9 without 
implementing any old-style interfaces. I think that's doable.


But I can't see a need to break all products that use old-style interfaces.


Cheers,

Yuppie

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

2005-10-27 Thread Chris McDonough
FWIW, I know a couple of people are depending on this, so here's an  
update.


I am working on merging multidatabase support, but I'm having some  
merge/update troubles (if you're interested in the symptoms, see  
http://www.plope.com/Members/chrism/heres_to_cvs).  I suspect I'll  
work it out, but I've got my nose in Subversion documentation at the  
moment.



On Oct 27, 2005, at 1:09 AM, Chris McDonough wrote:


I lied.  Due to completely preventable circumstances, this merge won't
be done tonight; instead, it will be done tomorrow evening.

- C


On Mon, 2005-10-24 at 16:41 -0400, Tim Peters wrote:


[Chris McDonough]


Thanks for this!



Not required, so long as I get to thank you for finishing it ;-)



Looks like that test failure is incidental and not symptomatic of
changes made to ZODB.  I think Tres may have said that it can be
fixed by merging in a fix from the Five HEAD, but I don't know this
for fact first-hand.



I'm sure that failure will go away by itself when you're working on
the trunk instead of the branch.  What I'd do now:

- Check out Zope trunk.

- Merge the branch into your trunk sandbox, and forget the branch.

- Fix merge conflicts.  I got one, in datatypes.py, and I didn't know
  immediately what to do about it so stopped there.  You'll have
  better luck ;-).  Note that, under SVN, after you fix a  
conflict, you

  have to do svn resolved path/to/conflicted/file; that's a gimmick
  to make sure you don't forget about conflicts.

- svn up to make sure you've got all the externals the merged
  files point at.

- svn up from time to time thereafter, to suck in other trunk  
changes

  as they get made.

- Check it in when it's stable.

- If it takes longer than expected, make a _new_ branch _from_
  your merged-into-trunk local trunk sandbox.  (That's easy:  make a
  branch directory, svn switch to it from your local merged trunk
  sandbox, and svn commit -- all done).



It's encouraging that most of the tests pass but there are a paucity
of tests that specifically test Zope 2 multidatabase-based mount
points.  There are a few convincing-looking decoys in
Products.ZODBMountPoint.tests but I think I'll need to create a few
more to get the warm and fuzzies before doing the merge.



As above, you can do a _local_ merge right away.  This would save you
from other decoys (like the DeprecationWarnings that would no longer
exist if you were using the trunk instead of the brach, and the
failing-on-branch-but-not-trunk Five test).

I recall that, historically, the Zope tests never failed when Zope
mounting was in fact broken, so a fat +1 to beefing test coverage
there.



I have this on my plate for Wednesday evening.



Understood; there really isn't any good TV on Wednesdays anymore ;-)





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

2005-10-27 Thread Tim Peters
[Tim, trying to comfort a suffering Chris]
 ...
 End of story.  Unless you feel you need to make another branch.  In
 that case, still do the two steps above first.  Then create a new
 branch from Zope trunk, svn switch your merged sandbox to that new
 branch, then svn checkin.

That last part should have said svn commit.  If it had, you'd
already be done ;-)
___
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] Mountpoints

2005-10-27 Thread Chris McDonough


Jim redid the way Zope trunk stitches in Zope3 since you last looked
at this, and that can create some mechanical problems (of the kinds
you're seeing, in fact).  The svn docs probably won't help.
Suggestion (which is repetition of what I suggested before this
happened, but we'll gracefully let that pass ;-)):

Check out a fresh, new copy of Zope trunk.

Merge your branch into that.


Thank you!

Eagds.  I *thought* I had done just that.  I had even printed out  
your previous handholding email about this before starting.  But no.   
I did not.  Instead, to my horror, I realized had *copied* a trunk  
working copy (of an unknown vintage, although up-to-date according to  
svn status after an svn up) and then I'd merged the branch into that.


So about a minute ago, I followed your instructions literally,  
figuring that I'd be able to sheepishly move on afterwards, but  
unfortunately it comes out the same.  Literally, here are the commands:


$ svn co svn+ssh://svn.zope.org/repos/main/Zope/trunk
$ cd trunk
$ svn merge -r 38624:HEAD svn+ssh://svn.zope.org/repos/main/Zope/ 
branches/zodb-blobs-branch

$ svn up

... which comes out with 



Fetching external item into 'lib/python/zope/thread'
External at revision 39684.


Fetching external item into 'doc/ZEO'
A  doc/ZEO/cache.txt
A  doc/ZEO/ZopeREADME.txt
A  doc/ZEO/README.txt
A  doc/ZEO/trace.txt
A  doc/ZEO/howto.txt
Updated external to revision 39684.


Fetching external item into 'lib/python/zope'
svn: Working copy 'lib/python/zope' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for  
details)


I am reasonably confident that drinking just one more Yuengling will  
solve this problem in one way or another.


- C

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

2005-10-27 Thread Tim Peters
[Chris McDonough]
 FWIW, I know a couple of people are depending on this, so here's an
 update.

 I am working on merging multidatabase support, but I'm having some
 merge/update troubles (if you're interested in the symptoms, see
 http://www.plope.com/Members/chrism/heres_to_cvs).  I suspect I'll
 work it out, but I've got my nose in Subversion documentation at the
 moment.

Jim redid the way Zope trunk stitches in Zope3 since you last looked
at this, and that can create some mechanical problems (of the kinds
you're seeing, in fact).  The svn docs probably won't help. 
Suggestion (which is repetition of what I suggested before this
happened, but we'll gracefully let that pass ;-)):

Check out a fresh, new copy of Zope trunk.

Merge your branch into that.

End of story.  Unless you feel you need to make another branch.  In
that case, still do the two steps above first.  Then create a new
branch from Zope trunk, svn switch your merged sandbox to that new
branch, then svn checkin.

This way you shouldn't have any of the problems you've been seeing. 
If you do, double your money back ;-)
___
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] passing the parameters to zsql method

2005-10-27 Thread Denis V. Gudtsov

Hello!

I'm trying to pass the form parameters from page template to zsql method.

A piece of code follows:

form action=clients_add_sql
input type=text name=name
input type=text name=account
input type=submit
/form

clients_add_sql:
insert into table(name,account) values (dtml-sqlvar name type=string, 
dtml-sqlvar account type=string);

the problem is when i click the 'submit' button, the form
clients_add_sql Input Data Enter query parameters: appears.

Does someone know how i can pass the form parameters to zsql method
directly?
-- 


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


Re: [Zope] passing the parameters to zsql method

2005-10-27 Thread Dario Lopez-Kästen

Denis V. Gudtsov wrote:


form action=clients_add_sql
input type=text name=name
input type=text name=account
input type=submit
/form

clients_add_sql:
insert into table(name,account) values (dtml-sqlvar name type=string, 
dtml-sqlvar account type=string);

the problem is when i click the 'submit' button, the form
clients_add_sql Input Data Enter query parameters: appears.

Does someone know how i can pass the form parameters to zsql method
directly?
 



use an intermediary Script (Python), ie:
---
# extract data from form and put into zsql-method.
request = continer.REQUEST

name = request.form.get('name', None)
account = request.form.get('account', None)

# Sanity check - do we have values?
if name and account:
 # assume that the zsql-method is in the same folder as this script
 container.clients_add_sql(name=name, account=account)

 # if the zsql is not in the same folder as this script, use aquisition
 #context.clients_add_sql(name=name, account=account)
---

As you can see, introducing a script in between has other benefits as 
well, such as allowing for data verification etc.


to call the script change:

form action=clients_add_sql

to 
form action=the_name_of_your_script_goes_here



hope this helps.

/dario

--
-- ---
Dario Lopez-Kästen, IT Systems  Services Chalmers University of Tech.
Lyrics applied to programming  application design:
emancipate yourself from mental slavery - redemption song, b. marley


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

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


[Zope] [Solved] Zope/Editor problems

2005-10-27 Thread Håkan Johansson


OK, use bin/runzope or zopectl fg, and you will surely get the error
message. I'm a bit surprised it doens't end up in the logs as well,
but maybe that's expected.



I found out why it wouldn't work and I feel ashamed of myself.
The trick with 'zopectl fg' showed me the errors of my way. I am 
running Zope as the user 'zope' but forgot to chown the installed 
products after installing them.


Thanks for your help.

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

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Jens Vagelpohl


On 26 Oct 2005, at 21:43, HaraldFinnås wrote:
I've also seen comments that running Zope on RHEL/CentOS might not  
be wise. My test env. is using FC4, but I'm planning to install  
CenOS 4.2 on the production server. Unwise choice?


I'd be curious to find out who says something like that. It's BS.  
Zope runs perfectly fine on all RHEL-based distributions.


The only issues you might ever run into would be problems with the  
Python that comes with the OS. But then again if you run Zope in  
production you should never ever use the system Python and build your  
own instead. The system Python tends to be compiled with weird flags  
on RH-based distros to suit their own needs for the many Python-based  
scripts they have in the OS. Don't use it, build your own.


jens

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Dario Lopez-Kästen

Jens Vagelpohl wrote:



On 26 Oct 2005, at 21:43, HaraldFinnås wrote:

I've also seen comments that running Zope on RHEL/CentOS might not  
be wise. My test env. is using FC4, but I'm planning to install  
CenOS 4.2 on the production server. Unwise choice?



I'd be curious to find out who says something like that. It's BS.  
Zope runs perfectly fine on all RHEL-based distributions.


The only issues you might ever run into would be problems with the  
Python that comes with the OS. But then again if you run Zope in  
production you should never ever use the system Python and build your  
own instead. The system Python tends to be compiled with weird flags  
on RH-based distros to suit their own needs for the many Python-based  
scripts they have in the OS. Don't use it, build your own.



well, on larger shops like ours, the sysadms always want to know why we 
introduce Yet Another Non-Standard Component to the system setup that 
cannot be RPM'ed like the rest. And I am not talking across pythoin 
versions, but oin the same release series (ie. 2.3, etc)


I know it is more convenient to self.compile()  the python, but it is 
always hard to argue with the sysadms on this issue. Our current 
solution is to provide a precomipiled rpm with the pythons we want to use.


Why is that the standard os-distributed pythons do not work with zope? 
They seem to work with other python sw...


/dario - being curious...

--
-- ---
Dario Lopez-Kästen, IT Systems  Services Chalmers University of Tech.
Lyrics applied to programming  application design:
emancipate yourself from mental slavery - redemption song, b. marley


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

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Jens Vagelpohl


On 27 Oct 2005, at 08:58, Dario Lopez-Kästen wrote:
well, on larger shops like ours, the sysadms always want to know  
why we introduce Yet Another Non-Standard Component to the system  
setup that cannot be RPM'ed like the rest. And I am not talking  
across pythoin versions, but oin the same release series (ie. 2.3,  
etc)


I know it is more convenient to self.compile()  the python, but it  
is always hard to argue with the sysadms on this issue. Our current  
solution is to provide a precomipiled rpm with the pythons we want  
to use.


Why is that the standard os-distributed pythons do not work with  
zope? They seem to work with other python sw...


For the Zope setups the pattern that I have seen most often in larger  
shops is buildout scripts that create self-contained full instances  
with Python, Zope and the instance home. These are easy to set up and  
update with one simple buildout script or Makefile or whatever  
strikes your fancy. This is exactly the same level of  
convenience (and maintainability) as saying rpm -Uvh foo.rpm.  
Obviously this self-contained ZEO client with its own Python could be  
done as a RPM or set of RPMs as well.


The main idea is that you isolate Zope and Python from the rest of  
the system. You can then use simple auto-upgrading schemes like yum  
or even the redhat network to keep everything up to date, while never  
running the risk of influencing or bringing down Zope by making  
unforeseen changes to the Python in use, as could happen with the  
system Python. The same is true for any add-ons you might install  
into the Python used for Zope.


jens

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


Re: [Zope] passing the parameters to zsql method

2005-10-27 Thread Dario Lopez-Kästen

Denis V. Gudtsov wrote:


DLK use an intermediary Script (Python), ie:
[..skipped..]

Thank you. But, can i do this without using python? From zpt - to
zsql?

 


[cc-ing: [EMAIL PROTECTED]

well, yes in a way.

ZSQL methods have to be called like other metods, but AFAIK, they cannot 
be traversed like, for instance, scripts. As I understand it, this is  
for security reasons (I myself would never allow a zsql to be exposed 
without some scripts in between, but that's just me...)


Anyway, one way to do what you want is to do more in the zpt than may be 
advisable: exactly how to do it, I leave up to you, becasue there are 
several different ways of achieving this, but I give general directions. 
Also, there are probably other ways than what I describe below.


You can make the form post to iself, and use calls inside the form to 
prepare the input to the zsql.


lets say your zpt is called entry_form and looks something like this 
(pseudo zpt):


span tal:define=name request/form/name;
 account request/form/account;
 unused python: clients_add_sql(name=name, account=account); 
 tal:omit-tag= /


form action=entry_form
input type=text name=name
input type=text name=account
input type=submit
/form

Not sure if this works, but that is the general idea. This was inspired from

http://www.plope.com/Books/2_7Edition/AdvZPT.stx#2-9

section: Form Processing

Good luck!

/dario


--
-- ---
Dario Lopez-Kästen, IT Systems  Services Chalmers University of Tech.
Lyrics applied to programming  application design:
emancipate yourself from mental slavery - redemption song, b. marley


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

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Lennart Regebro
On 10/26/05, HaraldFinnås [EMAIL PROTECTED] wrote:

 I'm new to Zope, and I've been playing with 2.8.1, but I really haven't done
 any real work with it yet. Now I expect to get my new decicated Zope
 hardware tomorrow, so I have to decide if I should go for 2.8.4 or 3.1.0.
 Any tips if I should go for the latest and greatest or stick with 2.8?

Depends on what you are going to use it for. So, tell us! :-)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread HaraldFinnås

 Depends on what you are going to use it for.
So, tell us! :-)

Not sure myself yet. :) There will certainly be a
couple of Plone sites, and I plan on writing a simple application for tracking
Non-Conformaties, Incident Reports etc (QA related).

But based on the responses until now, I've already
decided to go with 2.8.

I also want to thank everyone who's responded to this
thread, especially the OS related comments. :)

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Sascha Ottolski
Am Donnerstag, 27. Oktober 2005 09:37 schrieb Jens Vagelpohl:
 The only issues you might ever run into would be problems with the  
 Python that comes with the OS. But then again if you run Zope in  
 production you should never ever use the system Python and build your  
 own instead. The system Python tends to be compiled with weird flags  
 on RH-based distros to suit their own needs for the many Python-based  
 scripts they have in the OS. Don't use it, build your own.

I'd be very curious to hear about what real life problems people have 
observed. The advice is mention so often here, without any proof (at least 
thats my impression). Does it run slow? Does product xy behave strange? Does 
it crash?

We have some well loaded (2.8.x ZEO setup) servers up and running, using the 
standard python install that comes with fedora 3 (or their official updates), 
and that seems not to have any obvious disadvantages (beside the fact, that 
they still offer 2.3.4 only).


Cheers,

Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope hangs with 'idle in transaction'

2005-10-27 Thread Yuan HOng
Hi, list,

I have a site running with Zope 2.7.6 under Linux. The site access a
PostgreSQL database through ZSQL and psycopg 1.1.18. Only read access
is used, nothing is written to the database.

The one thing that annoys me very much is, with time passing, Zope
will eventually hang and has to be restarted. When I use ps -Af to
view the data connection status, I discovered that whenever Zope
hangs, I can found all zope database connection in the status 'idle in
transaction', like below:

postgres 13605   799  0 16:22 ?00:00:07 postgres: zopeapp
backupdb 127.0.0.1 idle in transaction
postgres 13611   799  0 16:22 ?00:00:06 postgres: zopeapp
backupdb 127.0.0.1 idle in transaction
postgres 13614   799  0 16:22 ?00:00:00 postgres: zopeapp
backupdb 127.0.0.1 idle in transaction
postgres 14078   799  0 16:26 ?00:00:05 postgres: zopeapp
backupdb 127.0.0.1 idle in transaction

It seems zope is initiating some database transactions even though my
site only access the database for reading. And those transaction
somehow get into deadlock status and finally used up the maximun db
connection allowed for zope.

But why? How do I find out what zope is doing and why the connection
are locked up?

Any clue and direction pointing are heartily appreciated.

Regards,

--
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Jens Vagelpohl


On 27 Oct 2005, at 10:22, Sascha Ottolski wrote:


Am Donnerstag, 27. Oktober 2005 09:37 schrieb Jens Vagelpohl:


The only issues you might ever run into would be problems with the
Python that comes with the OS. But then again if you run Zope in
production you should never ever use the system Python and build your
own instead. The system Python tends to be compiled with weird flags
on RH-based distros to suit their own needs for the many Python-based
scripts they have in the OS. Don't use it, build your own.



I'd be very curious to hear about what real life problems people have
observed. The advice is mention so often here, without any proof  
(at least
thats my impression). Does it run slow? Does product xy behave  
strange? Does

it crash?

We have some well loaded (2.8.x ZEO setup) servers up and running,  
using the
standard python install that comes with fedora 3 (or their official  
updates),
and that seems not to have any obvious disadvantages (beside the  
fact, that

they still offer 2.3.4 only).


You just noted one more disadvantage yourself: The system Python is  
likely to be out of step with what Zope wants. Furthermore, updates  
to the system Python or to add-on packages might have unintended  
consequences for your Zope setup.


jens

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

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Sascha Ottolski
Am Donnerstag, 27. Oktober 2005 13:20 schrieb Jens Vagelpohl:
 You just noted one more disadvantage yourself: The system Python is  
 likely to be out of step with what Zope wants. Furthermore, updates  
 to the system Python or to add-on packages might have unintended  
 consequences for your Zope setup.

well, might have is one thing, really experiencing problems is quite 
different...


-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] passing the parameters to zsql method

2005-10-27 Thread Dario Lopez-Kästen

Jean-Marc Orliaguet wrote:


Dario Lopez-Kästen wrote:

 


Denis V. Gudtsov wrote:

   


DLK use an intermediary Script (Python), ie:
[..skipped..]

Thank you. But, can i do this without using python? From zpt - to
zsql?



 




Just curious too: isn't there an easier way of doing this using schemas
/ widgets / SQL adapters?

or are the zsql scripts so very specific that they do more than simple
schema mappings?

 


all of this sound way more complex that 1 script, 1 zpt and 1 zsql...


also you might want to put that logic in a tool and protect the methods?
(scripts and ZPTs are not protected as far as I know)
 



se above...

of course, IMHO, my 2 eurocents worth, YMMV, Standard Disclaimers Apply, 
etc.


/dario

--
-- ---
Dario Lopez-Kästen, IT Systems  Services Chalmers University of Tech.
Lyrics applied to programming  application design:
emancipate yourself from mental slavery - redemption song, b. marley


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

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Jens Vagelpohl


On 27 Oct 2005, at 12:55, Sascha Ottolski wrote:


Am Donnerstag, 27. Oktober 2005 13:20 schrieb Jens Vagelpohl:


You just noted one more disadvantage yourself: The system Python is
likely to be out of step with what Zope wants. Furthermore, updates
to the system Python or to add-on packages might have unintended
consequences for your Zope setup.



well, might have is one thing, really experiencing problems is quite
different...


Look, it's all about how much risk you are willing to carry. I don't  
like playing Russian Roulette with services that are supposed to be  
highly available. And I don't want to have to waste a single thought  
on problems that *might* develop if RedHat or their packagers decide  
to do something to their Python or to Python add-ons I use. I also  
prefer to do upgrades to these components on my own schedule, not  
when someone else who has no idea about my various usage scenarios  
thinks so.


jens

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

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Sascha Ottolski
Am Donnerstag, 27. Oktober 2005 14:17 schrieb Jens Vagelpohl:
  well, might have is one thing, really experiencing problems is quite
  different...

 Look, it's all about how much risk you are willing to carry. I don't
 like playing Russian Roulette with services that are supposed to be
 highly available. And I don't want to have to waste a single thought
 on problems that *might* develop if RedHat or their packagers decide
 to do something to their Python or to Python add-ons I use. I also
 prefer to do upgrades to these components on my own schedule, not
 when someone else who has no idea about my various usage scenarios
 thinks so.

hey, no offence, I absolutely see your point. it's just that I'm really 
curious about what practical problems people have seen, as we seem not to 
have any...and in my point of view, it's less to think about when I simply 
stick to the packages that come with the OS :-)

cheers, Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Jens Vagelpohl


On 27 Oct 2005, at 13:30, Sascha Ottolski wrote:

Look, it's all about how much risk you are willing to carry. I don't
like playing Russian Roulette with services that are supposed to be
highly available. And I don't want to have to waste a single thought
on problems that *might* develop if RedHat or their packagers decide
to do something to their Python or to Python add-ons I use. I also
prefer to do upgrades to these components on my own schedule, not
when someone else who has no idea about my various usage scenarios
thinks so.



hey, no offence, I absolutely see your point. it's just that I'm  
really
curious about what practical problems people have seen, as we seem  
not to
have any...and in my point of view, it's less to think about when I  
simply

stick to the packages that come with the OS :-)


For me that's true with pretty much every single package - apart from  
Zope and the Python that runs it. I would never advocate any strategy  
that leans heavily on the build myself side. That's just insane  
maintenance.


System packages should be used wherever possible (like Apache, etc).  
In cases where you have a better (or purpose-built) replacement for a  
system package then build a package that meshes with your system  
packaging and replaces the original. I've been building my own Squid  
and sometimes Postfix RPMs on many occasions.


jens

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

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


Re: [Zope] passing the parameters to zsql method

2005-10-27 Thread Maurits van Rees
On Thu, Oct 27, 2005 at 10:23:52AM +0200, Dario Lopez-Kästen wrote:
 Not sure if this works, but that is the general idea. This was inspired from
 
 http://www.plope.com/Books/2_7Edition/AdvZPT.stx#2-9
 
 section: Form Processing

I would suggest to give it a try with a Z Search Interface.  See the
same book, in the chapter on Relational Databases:
http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx#1-11

This assists you in making two pages, at your choice as either DTML
Methods or Page Templates.  Like most people here I would suggest
going for the Page Templates.  One is a form in which you can enter
the values for your Z SQL Method.  This then passes control to the
second page, which is a report that gets its input by calling the Z
SQL Method.

The form basically is:

form action=id of your report page method=get
...
input type=SUBMIT name=SUBMIT value=Submit Query

The report basically starts with:

html
  body tal:define=results  here/id of your Z SQL Method


Note that when your Z SQL Method only has an update or insert or
delete it will usually not return a lot of results, so the report will
be basically empty.  I would say it is nice if the user gets some
feedback, so put some related select statement after your normal
query, even if it is just: SELECT * from your_table.  This gives the
report something to present to the user as visual feedback, instead of
leaving him in the dark on whether the submission of the form actually
had any permanent results.

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
It can seem like you're doing just fine,
but the creep's creeping into your mind. - Neal Morse


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


[Zope] Job Vacancy - Swindon, UK - Closing date 11th November 2005

2005-10-27 Thread Davis Mr MR
Title: Job Vacancy - Swindon, UK - Closing date 11th November 2005






Cranfield University, Defence College of Management  Technology, Information Services Department is seeking a Web Projects Officer 

Location: Shrivenham, Wiltshire

Salary: £23,575- £32,938


An opportunity has arisen for an experienced and enthusiastic developer to work in the Information Services Department on knowledge products and services being developed in Zope Management Systems.

The role will involve developing a range of portals, repositories and associated services for academic and marketing purposes, delivered through campus websites and intranets. The role involves developing Open Source products and working in the Open Source community.

The successful candidate will be educated to degree level or equivalent in an appropriate discipline and will contribute to overall Knowledge Management Strategy and the integration of web systems and applications throughout the University and the Defence Academy.

The required attributes of the position include experience of CMS, Zope, Python, Plone, HTML, Webmaster, project management, IA, problem solving, communication and team skills.

The Working Context


Cranfield University is one of Western Europes largest academic centres for strategic and applied research, development and design. The Shrivenham Campus of the University is based at the Defence College of Management and Technology, in the Vale of the White Horse, and the College is a constituent part of the Defence Academy of the United Kingdom. Cranfield University at Shrivenham delivers a wide range of courses to military and civilian students in science, technology and management related areas to the defence sector.

Application form and further details may be obtained from:

HR Department

Cranfield University, DCMT

Shrivenham, Wiltshire

SN6 8LA

Tel: 01793 785758

www.cranfield.ac.uk/admin/personnel/

Quote Reference Number: R/IS84



-- 
This message has been scanned for viruses and
dangerous content by the Cranfield MailScanner, and is
believed to be clean.

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Lennart Regebro
On 10/27/05, HaraldFinnås [EMAIL PROTECTED] wrote:

  Depends on what you are going to use it for. So, tell us! :-)

 Not sure myself yet. :) There will certainly be a couple of Plone sites

Well, Plone doesn't run on Zope 3, so there ya go. :)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] passing the parameters to zsql method

2005-10-27 Thread Jean-Marc Orliaguet
Dario Lopez-Kästen wrote:

 Jean-Marc Orliaguet wrote:

 Dario Lopez-Kästen wrote:

  

 Denis V. Gudtsov wrote:

   

 DLK use an intermediary Script (Python), ie:
 [..skipped..]

 Thank you. But, can i do this without using python? From zpt - to
 zsql?



 



 Just curious too: isn't there an easier way of doing this using schemas
 / widgets / SQL adapters?

 or are the zsql scripts so very specific that they do more than simple
 schema mappings?

  

 all of this sound way more complex that 1 script, 1 zpt and 1 zsql...


sure, but I meant to avoid duplicating code. The 1 script, 1 zpt and 1
zsql guys are really one-trick ponies.

/JM

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


[Zope] Cannot get zCommerce to work...

2005-10-27 Thread news.hol.gr
Hello all,
i am giving zCommerce a try and i have problem to get it to work with the
sample database.
I am using Plone 2.0.5 witch comes with zope 2.7.0 and Python 2.3.3
I tried to install the products (Session 0.3, zCommerce 0.2).
The i create a Session from ZMI inside a folder under Plone. Then i create
a  Z Gadfly Database Connection inside Session using the sample database
tha comes with zCommerce 0.2. Then i create a  zShop into Session using
the Z Gadfly Database Connection i created before and chosing to import the
demo shop.
The manual (INSTALL FILE) says :

In the manage interface, browse to the zShop, click on the Catalogs tab
and, if
you're using our sample gadfly database, add a new Catalog called sample.
Otherwise, create a new catalog.  Click on your newly created Catalog and
start
adding products and categories

The problem is i do not see any Catalogs tab and the only thing that works
is testing the connection by giving select * from  productstorage witch
retrieves the table's lines and shows them ok.

I tried the above by intsalling the products both in the Plone
2\Data\Products and the Plone 2\Zope\lib\python\Products paths and the
sample Gadfly database both in Plone 2\Data\var\gadfly and the Plone
2\Zope\var\gadfly paths respeactively.

As the manual says : zCommerce *REQUIRES* Zope 2.2.  If it works with Zope
2.1, then it's a fluke
and we can't really help you if you have problems.
Is there a possibility that it is not compatible with NEWER version of
Zope-Plone?
If so, have you tried any other product on this category (e-shop, cart...)
that works with Plone 2.0.5-Zope 2.7.0-Python 2.3.3 and above?

Thank you very much in advance.




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


[Zope] Re: Zope 2.8 or 3.1?

2005-10-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sascha Ottolski wrote:
 Am Donnerstag, 27. Oktober 2005 13:20 schrieb Jens Vagelpohl:
 
You just noted one more disadvantage yourself: The system Python is  
likely to be out of step with what Zope wants. Furthermore, updates  
to the system Python or to add-on packages might have unintended  
consequences for your Zope setup.
 
 
 well, might have is one thing, really experiencing problems is quite 
 different...

It *has* happened to Real Zope Users (TM) in the past, and it *will*
happen again.

One unintended consequence of using /usr/bin/python on RHEL / Fedora
boxen, for instance, is that they compile Python with UCS-4 unicode
(four bytes for every unicode character!).  This setting doesn't matter
for short-lived scripts or GUI utils, and may even be superior.  For a
long-running, memory-intensive Python process, it is grossly nefficient.

WRT maintenance of the system:  while at ZC, I actually maintained a
separate 'zc-python' RPM which installed itself in '/opt/zc';  all the
Zope RPMs I maintained depended on 'zc-python' rather than 'python'.

Users whose pagers / cell phones go off if Zope crashes (this is my
definitino of enterprise user, BTW) should install a separate Python.
 Non-enterprise users can likely get away without it.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDYPch+gerLs4ltQ4RAjBwAKDJVAl/igH7hnSeYNRzceXyC8qvHgCgkKIK
5zjZgfdq6bCnOPMuGxPqozc=
=E9Fl
-END PGP SIGNATURE-

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


Re: [Zope] Re: Zope 2.8 or 3.1?

2005-10-27 Thread HaraldFinnås

 WRT maintenance of the system: while at
ZC, I actually maintained a
 separate 'zc-python' RPM which installed itself in '/opt/zc'; all
the
 Zope RPMs I maintained depended on 'zc-python' rather than 'python'.

What's the recommended way of maintaining an extra
Python installation for Zope? Is changing the path enough or should one
run the instance in a chroot'ed environment?

And what's supposed to be the correct
Python version for 2.8.4 btw?

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


Re: [Zope] database connections from external method

2005-10-27 Thread Chris Withers

Vangelis Mihalopoulos wrote:
Well, i am running zope under root privileges in read-only mode. 



What does this mean?


I am opening the ZODB in read-only, using the appropriate parameter in 
the conf file.


How odd, do you do that with your relational database too?


What are you seeking to do or prevent?


I want a number of external methods to run with root privileges for 
performing specific tasks (older thread, root privileges required, 
27/7/2004)


If there is a Zope break-in, 



What does that mean?


I think of it as a break-in in the ZMI.


You are lacking sanity to worry about any of the stuff in the above 
chunk in the way that you are...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] database connections from external method

2005-10-27 Thread Chris Withers

Vangelis Mihalopoulos wrote:


I don't really. But when i present my security assessment report saying 
Zope has never had a compomising security issue. i'll get the 
(expected) answer Sooner or later, everything gets broken. and i will 
have to additionally demonstrate why compomising zope (in term of 
accessing the ZMI) will have minimum effect on the overall system 
operation.


This is a totally lame argument. Go home, unplug all your electrical 
devices, and never switch them back on. That's the only way you'll get 
the security you're asking for. Seriously, just get over it...


I really hope i don't! :-)   As Dieter said, my application is not a 
conventional Zope application.

I could say that, for this project, i am using Zope:
- as a much safer alternative to CGI
- for its templating machinery
- because it is built on Python and the project is based on Python
- i like Zope :-)


You should take a look at Zope 3.

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] database connections from external method

2005-10-27 Thread Chris Withers

Vangelis Mihalopoulos wrote:
- A Zope security hole comes up, which gives you all permissions within 
Zope.


Yeah, so you patch Zope pronto. What you're doing doesn't really 
mitigate anything. Do  you worry about SSH vulnerabilities? What are you 
doing to mitigate them? mounting all your file systems as read only?


sheesh,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Re: implicit vs. explicit ownership?

2005-10-27 Thread Chris Withers

Tres Seaver wrote:

The Owner role is something of a dead chicken. Don't rely on it and
ignore it as best you can unless you're really sure what you're doing...


I don't know why you would say that.  The Owner local role (as opposed
to executable ownership) is widely used to allow creators of content to
edit it in places where they would otherwise be unable to do so.


Indeed, but people alwys get it mixed up with executable ownership, or 
some other kind of voodoo, and so are scared to treat it just like any 
other role, which is wha tthey should do ;-)



It *is* possible to hijack the role computation here;  getting it right
is tricky, however, and when it is wrong, your error messages are going
to be inscrutable.  The right place to do this might be in a custom
user folder, rather than in content.  PAS, for instance, has the concept
of making the role computation for the *user* pluggable.


My gut feeling is he doesn't really want to do any of that though...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Zope 2.8 or 3.1?

2005-10-27 Thread Bill Campbell
On Thu, Oct 27, 2005, Jens Vagelpohl wrote:

On 27 Oct 2005, at 08:58, Dario Lopez-Kästen wrote:
well, on larger shops like ours, the sysadms always want to know  
why we introduce Yet Another Non-Standard Component to the system  
setup that cannot be RPM'ed like the rest. And I am not talking  
across pythoin versions, but oin the same release series (ie. 2.3,  
etc)

I know it is more convenient to self.compile()  the python, but it  
is always hard to argue with the sysadms on this issue. Our current  
solution is to provide a precomipiled rpm with the pythons we want  
to use.

Why is that the standard os-distributed pythons do not work with  
zope? They seem to work with other python sw...

For the Zope setups the pattern that I have seen most often in larger  
shops is buildout scripts that create self-contained full instances  
with Python, Zope and the instance home. These are easy to set up and  
update with one simple buildout script or Makefile or whatever  
strikes your fancy. This is exactly the same level of  
convenience (and maintainability) as saying rpm -Uvh foo.rpm.  
Obviously this self-contained ZEO client with its own Python could be  
done as a RPM or set of RPMs as well.

The main idea is that you isolate Zope and Python from the rest of  
the system. You can then use simple auto-upgrading schemes like yum  
or even the redhat network to keep everything up to date, while never  
running the risk of influencing or bringing down Zope by making  
unforeseen changes to the Python in use, as could happen with the  
system Python. The same is true for any add-ons you might install  
into the Python used for Zope.

We've been running Zope and Plone built under the OpenPKG.org
portable packaging system for a couple of years now.  The OpenPKG
system avoids problems with vendor python and other packages.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``The best we can hope for concerning the people at large is that they be
properly armed.''
-- Alexander Hamilton, The Federalist Papers at 184-188
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: use Data.fs from mountpoint B to populate mountpoint A - how?

2005-10-27 Thread Chris Withers

Dieter Maurer wrote:

Actually, the mount-point syntax is much more complex than the form
you use above. Among others, it supports

   mount-point  mount-path:storage-path

mount-path describes how you reach the mount point
in the mounting application and storage-path how you
find the mounted object from the storage root.


Wow, I never knew this :-S Where's it documented?

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Cannot show blob image from sql server

2005-10-27 Thread Chris Withers

Thomas G. Apostolou wrote:

i have made an external method to connect and get data from an sql
server 2000, and then show them in a table. All works fine but one of
the columns i retrieve is a BLOB image witch makes my external method
to crash. So i used z SQL Method (witch is not prefared because there
is a lot of customization and that's why i used External Method with
Python from the begining) and it goes fine with retrieving and showing
the data. But still i cannot show the BLOB image as image. It shows as
a very very long string.


You will need to do at least one query for the data and one request for 
each of the images.


eg, you main method returns html like:

table
  tr
   th
 Name
   /th
   th
 Picture
   /th
  /tr
  tr
   td
 Test User
   /td
   td
 img src=http://localhost:8080/myproject/getImage?id=1231/
   /td
  /tr
/table

You then need to implement getImage to:
- do the SQL select to get the image data based on the id
- write this data to the RESPONSE object
 (see lib/python/OFS/Image.py's index_html method for an example)
- set a content-disposition header so that the browser does the right
  thing

Hopefully soon you'll realise the fundamental issue with http that 
you're bumping into: you don't return a fully rendered page, you return 
a page with references in it to css/javascript/image files that are used 
to render the final page, and that storing binary data in relational 
databases is evil ;-)


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Zope/Editor problems

2005-10-27 Thread Chris Withers

J Cameron Cooper wrote:
Not logging errors on startup failures (in debug mode) is a problem that 
causes a lot of consternation. I recall hearing once why it is that way, 
but don't quite recall. I'm sure I could search the archives and find out.


Something to do with security. The goat that usually gets waved to scare 
people when something is dumb and barely justifiable ;-)


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


[Zope] Re: Zope 2.8 or 3.1?

2005-10-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

HaraldFinnås wrote:
WRT maintenance of the system:  while at ZC, I actually maintained a
separate 'zc-python' RPM which installed itself in '/opt/zc';  all the
Zope RPMs I maintained depended on 'zc-python' rather than 'python'.
 
 
 What's the recommended way of maintaining an extra Python installation for 
 Zope? Is changing the path enough or should one run the instance in a 
 chroot'ed environment?

I never set Zope up in a chroot (not that that is necessarily wrong, it
just didn't seem worthwhile on the boxes I helped admin).

 And what's supposed to be the correct Python version for 2.8.4 btw?

Python 2.3.5.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDYQHZ+gerLs4ltQ4RAqmuAJ4wTTN+NDxjCyE6jmAW0+fyFI0wlwCfWljy
YmLhqxr5AUIsM0sIVhYQMV4=
=zp61
-END PGP SIGNATURE-

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


Re: [Zope] question about stopping acquisition in VHM sites?

2005-10-27 Thread Chris Withers

Gary wrote:

How do I stop acquisition at the root of my website?
If I have two websites in zope, and I set the virtual host mapping to
www.sitea.com/websites/SiteA http://www.sitea.com/websites/SiteA
www.siteb.com/websites/SiteB http://www.siteb.com/websites/SiteB

I don't want my users to get to SiteB from http://www.sitea.com/SiteB


Why not? How would they find a URL like that?

You can't do anything from the Zope side to stop this.
An Apache rewrite rule maybe? You'll need ot be clever mind...

http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc

...will still work.

Best bet? Don't sweat it, onyl worry about it if it really proves to be 
a problem ,which it shouldn't be...


cheers,

Chris

PS: There's always Zope 3 ;-)

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Permissions and Instances of ZClasses

2005-10-27 Thread Chris Withers

Dave Case wrote:

I'm trying to build a  product through the  ZMI (like the example in
The Zope Book), 


For the love of god, please don't ;-)

I have some DTML methods 


waaghhh...

in a ZClass 


ow, ow, stop hurting me...


were I want to be
able to do a SecurityCheckPermission() on a permission that I have
defined in the containing product.  


Why?


The call to SecurityCheckPermission() looks like this...

dtml-if expr=_.SecurityCheckPermission('Manage Diary',this())


*schniff*


I'm thinking maybe I'm calling SecurityCheckPermission in the wrong
context?  Making a product certainly can be confusing at times.  :)


Yes, don't do it, at least not like this. Look at building a filesystem 
absed prdocut which is marginally saner...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Cannot get zCommerce to work...

2005-10-27 Thread Chris Withers

news.hol.gr wrote:

As the manual says : zCommerce *REQUIRES* Zope 2.2.  If it works with Zope
2.1, then it's a fluke
and we can't really help you if you have problems.


The fact that we're now on Zope 2.8 should give you a clue that this 
software is way to old and likely unmaintained to be working...


I'd suggest finding something else...

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Re: use Data.fs from mountpoint B to populate mountpoint A - how?

2005-10-27 Thread Christoph Berendes

Chris Withers wrote:


Dieter Maurer wrote:


Actually, the mount-point syntax is much more complex than the form
you use above. Among others, it supports

   mount-pointmount-path:storage-path

mount-path describes how you reach the mount point
in the mounting application and storage-path how you
find the mounted object from the storage root.



Wow, I never knew this :-S Where's it documented?


In Dieter's reply, and here:
http://mail.zope.org/pipermail/zope/2004-September/152882.html
kinda sorta. ;-)
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Permissions and Instances of ZClasses

2005-10-27 Thread Dave Case
On 10/27/05, Chris Withers [EMAIL PROTECTED] wrote:
 Dave Case wrote:
  I'm trying to build a  product through the  ZMI (like the example in
  The Zope Book),

 For the love of god, please don't ;-)

Look, I know what I'm doing is not cool, but since cool has no
documentation, I'm doing what I can.


  I have some DTML methods

 waaghhh...

Ditto


  in a ZClass

 ow, ow, stop hurting me...

Aha, so I've awakened the local Troll, my apologies to the rest of the
list for setting him off.


  were I want to be
  able to do a SecurityCheckPermission() on a permission that I have
  defined in the containing product.

 Why?

Because there are links to management interfaces  I don't want an
unauthenticated user to see.


  The call to SecurityCheckPermission() looks like this...
 
  dtml-if expr=_.SecurityCheckPermission('Manage Diary',this())

 *schniff*

Granted this is a standard cookbook call to SecurityCheckPermission,
but I thought maybe I was calling it wrong from within the product, so
I thought I would ask.


 Yes, don't do it, at least not like this. Look at building a filesystem
 absed prdocut which is marginally saner...

It was the first thing I tried; but since (once again) I couldn't find
much documentation I tried something else (the example in the Zope
book...).




--
David Case
[EMAIL PROTECTED]
www.builddiary.net
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] question about stopping acquisition in VHM sites?

2005-10-27 Thread Gary
On 10/27/05, Chris Withers [EMAIL PROTECTED] wrote:
Gary wrote: How do I stop acquisition at the root of my website? If I have two websites in zope, and I set the virtual host mapping to www.sitea.com/websites/SiteA
 http://www.sitea.com/websites/SiteA www.siteb.com/websites/SiteB 
http://www.siteb.com/websites/SiteB I don't want my users to get to SiteB from http://www.sitea.com/SiteBWhy not? How would they find a URL like that?
You can't do anything from the Zope side to stop this.An Apache rewrite rule maybe? You'll need ot be clever mind...http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc
...will still work.Best bet? Don't sweat it, onyl worry about it if it really proves to bea problem ,which it shouldn't be...cheers,ChrisPS: There's always Zope 3 ;-)

Thanks Chris,

I don't know how the URL got out. But the web-bots are having so
much fun with my website right now. :(
They are indexing everything for the wrong virtual host. Maybe
robot.txt will stop them.

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


Re: [Zope] question about stopping acquisition in VHM sites?

2005-10-27 Thread David H




Gary wrote:
On 10/27/05, Chris Withers
[EMAIL PROTECTED]
wrote:
  
  Gary
wrote:
 How do I stop acquisition at the root of my website?
 If I have two websites in zope, and I set the virtual host mapping
to
 www.sitea.com/websites/SiteA
 http://www.sitea.com/websites/SiteA
 www.siteb.com/websites/SiteB

http://www.siteb.com/websites/SiteB

 I don't want my users to get to SiteB from http://www.sitea.com/SiteB

Why not? How would they find a URL like that?


You can't do anything from the Zope side to stop this.
An Apache rewrite rule maybe? You'll need ot be clever mind...

http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc


...will still work.

Best bet? Don't sweat it, onyl worry about it if it really proves to be
a problem ,which it shouldn't be...

cheers,

Chris

PS: There's always Zope 3 ;-)

  
  
  
Thanks Chris,
  
I don't know how the URL got out. But the web-bots are having so
much fun with my website right now. :(
They are indexing everything for the wrong virtual host. Maybe
robot.txt will stop them.
  
--
Gary
  


Gary,
Are these anonymous access sites? If not then where are your users
defined? BTW, im curious - how does Zope 3 otherwise solve this?
David





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


[Zope] Debugging security settings in .metadata files

2005-10-27 Thread Floyd May
I have a set of files - page templates, python scripts, and zsql
methods - that are set up as filesystem objects.  I'm having trouble
getting the security set the way I want it to be with the .metadata
files.  Here is the content of my .metadata files:
--8-
[security]
View = 0:Manager
Access contents information = 0:Manager
Access Contents Cnformation = 0:Manager
-8--

However, I can still access my content through an anonymous context. 
Can anyone give me some ideas about debugging my situation?  Thanks!

Zope 2.7.7-final, python 2.3.5, freebsd5
CMF 1.4.8

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


[Zope] help - my zope build exits with compile errors :-(

2005-10-27 Thread Thomas Wolf

Hi,

 I'm trying to build Zope-2.7.4-0 from source (I can't use a different 
version because of the releas of Plone we're

using.)  I ran
./configure --with-python=/usr/local/zope/python/bin/python 
--prefix=/usr/local/zope
and that reported no issues.  BTW, I'm using python 2.3.5 - that's why I had 
to use the --use-python argument.


Then I ran make.  No reported problems for quite a bit into the build - then I 
get:


gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC 
-I/usr/local/zope/python/include/python2.3 -c 
Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c 
-o 
/usr/local/zope/Zope-2.7.4-0/build-base/python-2.3/build-temp/Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.o
gcc: 
Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c: 
No such file or directory

gcc: no input files

Sure enough, there's no ISO_8859_1_Splitter.c file - but I haven't got a clue 
why not.  IS this generated by an earlier
part of the build and just didn't?  Or was there something missing from the 
tar ball (I got it off www.zope.org!)


Any help/suggestion would be much appreciated,
Tom

P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] help - my zope build exits with compile errors :-(

2005-10-27 Thread Jens Vagelpohl


On 27 Oct 2005, at 21:26, Thomas Wolf wrote:

P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.


Solaris, there's your problem.

First of all, use GNU tar for unpacking the tarball. The standard  
Solaris tar is buggy.


Second of all, don't expect any good performance on Solaris. There's  
nothing you can do to alleviate that problem, apart from using a more  
suitable OS, such as Linux.


jens

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

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


Re: [Zope] help - my zope build exits with compile errors :-(

2005-10-27 Thread Thomas Wolf
Thanks a bunch Jens!  It was the buggy tar that got me :-(  Now that I think 
about it, I did see a blurb
about avoiding solaris' tar - just thought that I'd give it a try and since I 
didn't see any error messages,

I figured it succeeded...that was stupid.

Anyway, it builds now.  Many thanks again.
tom


Jens Vagelpohl wrote:


On 27 Oct 2005, at 21:26, Thomas Wolf wrote:


P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.



Solaris, there's your problem.

First of all, use GNU tar for unpacking the tarball. The standard  
Solaris tar is buggy.


Second of all, don't expect any good performance on Solaris. There's  
nothing you can do to alleviate that problem, apart from using a more  
suitable OS, such as Linux.


jens

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

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

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


Re: [Zope] question about stopping acquisition in VHM sites?

2005-10-27 Thread Gary
On 10/27/05, David H [EMAIL PROTECTED] wrote:



  
  


Gary wrote:
On 10/27/05, Chris Withers
[EMAIL PROTECTED]
wrote:
  
  Gary
wrote:
 How do I stop acquisition at the root of my website?
 If I have two websites in zope, and I set the virtual host mapping
to
 www.sitea.com/websites/SiteA
 http://www.sitea.com/websites/SiteA
 www.siteb.com/websites/SiteB

http://www.siteb.com/websites/SiteB

 I don't want my users to get to SiteB from http://www.sitea.com/SiteB

Why not? How would they find a URL like that?


You can't do anything from the Zope side to stop this.
An Apache rewrite rule maybe? You'll need ot be clever mind...

http://www.sitea.com/somefolder/somesubfolder/SiteB/somesitebfolder/etc


...will still work.

Best bet? Don't sweat it, onyl worry about it if it really proves to be
a problem ,which it shouldn't be...

cheers,

Chris

PS: There's always Zope 3 ;-)

  
  
  
Thanks Chris,
  
I don't know how the URL got out. But the web-bots are having so
much fun with my website right now. :(
They are indexing everything for the wrong virtual host. Maybe
robot.txt will stop them.
  
--
Gary
  

Gary,
Are these anonymous access sites? If not then where are your users
defined? BTW, im curious - how does Zope 3 otherwise solve this?
David

Yes David, it's anonymous access. 
--
Gary

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


Re: [Zope] help - my zope build exits with compile errors :-(

2005-10-27 Thread David H

Thomas Wolf wrote:


Hi,

 I'm trying to build Zope-2.7.4-0 from source (I can't use a different 
version because of the releas of Plone we're

using.)  I ran
./configure --with-python=/usr/local/zope/python/bin/python 
--prefix=/usr/local/zope
and that reported no issues.  BTW, I'm using python 2.3.5 - that's why 
I had to use the --use-python argument.


Then I ran make.  No reported problems for quite a bit into the build 
- then I get:


gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
-fPIC -I/usr/local/zope/python/include/python2.3 -c 
Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c 
-o 
/usr/local/zope/Zope-2.7.4-0/build-base/python-2.3/build-temp/Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.o 

gcc: 
Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c: 
No such file or directory

gcc: no input files

Sure enough, there's no ISO_8859_1_Splitter.c file - but I haven't got 
a clue why not.  IS this generated by an earlier
part of the build and just didn't?  Or was there something missing 
from the tar ball (I got it off www.zope.org!)


Any help/suggestion would be much appreciated,
Tom

P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.


Thomas,

I seem to recall something like this.  I think the path + file name for 
sISO_8859_1_Splitter.o is *too long* for the extractor.


David

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

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


Re: [Zope] question about stopping acquisition in VHM sites?

2005-10-27 Thread J Cameron Cooper

Gary wrote:


Hi,

How do I stop acquisition at the root of my website?
If I have two websites in zope, and I set the virtual host mapping to
www.sitea.com/websites/SiteA http://www.sitea.com/websites/SiteA
www.siteb.com/websites/SiteB http://www.siteb.com/websites/SiteB

I don't want my users to get to SiteB from http://www.sitea.com/SiteB

I am using Zope 2.7 


You can create in each site an empty Python script or something named 
like the other site(s). This is not the best solution in the world, 
since if you have more than a handful of sites, you get a combinatorial 
explosion. But, it will work.


Perhaps someone who is bothered by this problem and has time will do 
some magic in VHM (or a new type of object) to stop such traversals.


   --jcc


--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com

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

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


Re: [Zope] Debugging security settings in .metadata files

2005-10-27 Thread J Cameron Cooper

Floyd May wrote:

I have a set of files - page templates, python scripts, and zsql
methods - that are set up as filesystem objects.  I'm having trouble
getting the security set the way I want it to be with the .metadata
files.  Here is the content of my .metadata files:
--8-
[security]
View = 0:Manager
Access contents information = 0:Manager
Access Contents Cnformation = 0:Manager
-8--

However, I can still access my content through an anonymous context. 
Can anyone give me some ideas about debugging my situation?  Thanks!


Zope 2.7.7-final, python 2.3.5, freebsd5
CMF 1.4.8


Looks okay to me, though I don't know what you're doing with the third line.

Check what it looks like in the ZMI. This will tell you whether or not 
the problem is in getting the permissions set like you expect.


--jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] Debugging security settings in .metadata files

2005-10-27 Thread Floyd May
 I don't know what you're doing with the third line...
Me neither, typo.

 Check what it looks like in the ZMI. This will tell you whether or not
 the problem is in getting the permissions set like you expect.

Filesystem objects don't have a security tab in the ZMI (or at least,
these don't).  Should one be there?

fm


On 10/27/05, J Cameron Cooper [EMAIL PROTECTED] wrote:
 Floyd May wrote:
  I have a set of files - page templates, python scripts, and zsql
  methods - that are set up as filesystem objects.  I'm having trouble
  getting the security set the way I want it to be with the .metadata
  files.  Here is the content of my .metadata files:
  --8-
  [security]
  View = 0:Manager
  Access contents information = 0:Manager
  Access Contents Cnformation = 0:Manager
  -8--
 
  However, I can still access my content through an anonymous context.
  Can anyone give me some ideas about debugging my situation?  Thanks!
 
  Zope 2.7.7-final, python 2.3.5, freebsd5
  CMF 1.4.8

 Looks okay to me, though I don't know what you're doing with the third line.

 Check what it looks like in the ZMI. This will tell you whether or not
 the problem is in getting the permissions set like you expect.

 --jcc
 --
 Building Websites with Plone
 http://plonebook.packtpub.com/

 Enfold Systems, LLC
 http://www.enfoldsystems.com

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


Re: [Zope] Debugging security settings in .metadata files

2005-10-27 Thread J Cameron Cooper

Floyd May wrote:

I don't know what you're doing with the third line...


Me neither, typo.



Check what it looks like in the ZMI. This will tell you whether or not
the problem is in getting the permissions set like you expect.



Filesystem objects don't have a security tab in the ZMI (or at least,
these don't).  Should one be there?


Hm. Seems they don't.

Customize it and look at the security tab of that.

--jcc


On 10/27/05, J Cameron Cooper [EMAIL PROTECTED] wrote:


Floyd May wrote:


I have a set of files - page templates, python scripts, and zsql
methods - that are set up as filesystem objects.  I'm having trouble
getting the security set the way I want it to be with the .metadata
files.  Here is the content of my .metadata files:
--8-
[security]
View = 0:Manager
Access contents information = 0:Manager
Access Contents Cnformation = 0:Manager
-8--

However, I can still access my content through an anonymous context.
Can anyone give me some ideas about debugging my situation?  Thanks!

Zope 2.7.7-final, python 2.3.5, freebsd5
CMF 1.4.8


Looks okay to me, though I don't know what you're doing with the third line.

Check what it looks like in the ZMI. This will tell you whether or not
the problem is in getting the permissions set like you expect.

   --jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com



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

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





--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope] help - my zope build exits with compile errors :-(

2005-10-27 Thread Chris McDonough

Use gnutar to unpack the Zope source tarball.

On Oct 27, 2005, at 4:50 PM, David H wrote:


Thomas Wolf wrote:



Hi,

 I'm trying to build Zope-2.7.4-0 from source (I can't use a  
different version because of the releas of Plone we're

using.)  I ran
./configure --with-python=/usr/local/zope/python/bin/python -- 
prefix=/usr/local/zope
and that reported no issues.  BTW, I'm using python 2.3.5 - that's  
why I had to use the --use-python argument.


Then I ran make.  No reported problems for quite a bit into the  
build - then I get:


gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  
-fPIC -I/usr/local/zope/python/include/python2.3 -c Products/ 
PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ 
ISO_8859_1_Splitter.c -o /usr/local/zope/Zope-2.7.4-0/build-base/ 
python-2.3/build-temp/Products/PluginIndexes/TextIndex/Splitter/ 
ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.o
gcc: Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/ 
src/ISO_8859_1_Splitter.c: No such file or directory

gcc: no input files

Sure enough, there's no ISO_8859_1_Splitter.c file - but I haven't  
got a clue why not.  IS this generated by an earlier
part of the build and just didn't?  Or was there something missing  
from the tar ball (I got it off www.zope.org!)


Any help/suggestion would be much appreciated,
Tom

P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.



Thomas,

I seem to recall something like this.  I think the path + file name  
for sISO_8859_1_Splitter.o is *too long* for the extractor.


David

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




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

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


[Zope] Re: Debugging security settings in .metadata files

2005-10-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

J Cameron Cooper wrote:
 Floyd May wrote:

I think Floyd is barking up the wrong tree:  skins are not supposed to
be the primary mechanism for protecting content.  Rather, work out how
to get the security settings right on the *content*, and the problem
will solve itself.  Workflow exists to solve primarily this problem.

This qustion belongs on the zope-cmf list, BTW.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDYVwa+gerLs4ltQ4RAuP4AJ43F3VKcFgzyrjhV7nQdp2chFgYfACfTPKA
omVMDzN6drh3TfWKU8iBPtg=
=L2Bt
-END PGP SIGNATURE-

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


[Zope] Problem after upgrade zope from 2.6.0 - 2.8.4

2005-10-27 Thread Zhi-Wei Lu

Hi Zope Gurus,

After I upgraded the zope from 2.6.0 - 2.8.4 on a Redhat EL3 server,
with python 2.4.2 (and I also tested with python 2.3.5),  the gif  
pictures are

now slightly misaligned a little bit, these graphics are in a TABLE with
BORDER=0, CELLPADDING=0, and CELLSPACING=0.  The graphics
looked fine with Zope 2.6.0.

Does anyone see similar behavior with Zope 2.8.4?

Thank you for help.

Zhi-Wei Lu
Institue for Data Analysis and Visualization (IDAV)
UC Davis Phone:(530) 752-0494
Davis, CA 95616Fax: (530) 752-8894


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

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


Re: [Zope-DB] Managing Connections with SQL Methods

2005-10-27 Thread Chris Withers

Why don't you just use ZSQL Methods?!

Chris

Seth Gottlieb wrote:
The problem seemed to be that Zope.app() was returning a new root object 
instance every time a new DAO (data access object) was initialized. 
After 3, boom.


The work around is to pass the context of the calling object with syntax 
like __of__(self) when you call methods of the DAO.  You can also pass 
in a reference to the calling object in the method call dao = 
getDAO(self,).  Then the method on the DAO you can use


setattr(self, CONNECTION_NAME, getattr(context,CONNECTION_NAME))

Where CONNECTION_NAME is a string with the same name as the Z SQL 
Connection object that the calling object acquired.




Seth Gottlieb wrote:


Thanks Michele,

I was thinking of doing that as well.  Did you point the DA to 
SQLRelay?  Or
did you have your Python code connect directly to SQLRelay?  My 
application
needs to be able to roll back transactions when told to by the 
transaction
manager.  Do you know if going around Zope's DB Connectivity would 
cause a

problem?

--Seth

Michele Marcionelli ([EMAIL PROTECTED]) wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Seth,

I ran exactly in the same problem and I installed SQL Relay
(http://sqlrelay.sourceforge.net/) that manage better (i.e. good) the
connections than ZMySQLDA. If someone has a solution to the problem...
;-))

Regards,
Michele

On 25.10.2005, at 23:12, Seth Gottlieb wrote:



Hi,

I have a Python class that my Zope application uses to talk to a
relational database (MySQL for now).  I am using a Z SQL Connection
(ZMySQLDA) object to handle DB connectivity.  When I initialize, I get
a handle of the connection object like this:

import Zope
setattr(self, CONNECTION_NAME, getattr(Zope.app(),CONNECTION_NAME))

Where CONNECTION_NAME is a string that matches the ID of the
connection object that I have in the Root folder of Zope.

Then I run queries like this:

from Products.ZSQLMethods.SQL import SQL

setattr(self, '_selectProperties',
   SQL('_selectProperties', '', CONNECTION_NAME, 'schemaId',
   'SELECT * FROM ' + TABLE_NAME[self._context.id] + ' WHERE
 SCHEMA_ID = dtml-sqlvar schemaId type=int'))

The life of this class should be Zope transaction (I am hooking into
Shared.DC.ZRDB.TM.TM to manage these objects).

The problem I am running into is I seem to be running out of
connections.   Everytime I inititialize and run show processlist;
within MySQL, the number of connections increases.  I get to a maximum
of 3 and then my Zope instance hangs.

Is there any reason why these DB connections do not get reused or
destroyed after queries are made?

Any ideas?

Thanks,

Seth



- --
[EMAIL PROTECTED] / phone: +41 44 632 6193
eth zentrum / hg g 14 / raemistrasse 101 - ch-8092 zurich

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

iD8DBQFDXqPbqnOUmIjQmOYRAnAjAJ4stbSaa4Psqb+V2jblDiJQc6MMFQCgwt3n
wiIJXXEf4+H+021jDqzPSY8=
=SYIz
-END PGP SIGNATURE-





___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db





--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db