Re: [Zope-dev] zope-tests - FAILED: 21, OK: 19

2012-09-06 Thread Stefan H. Holek
On 06.09.2012, at 10:58, Marius Gedminas wrote:

 How do you redirect the stderr of a process spawned with
 suprocess.Popen(shell=False) to /dev/null in a cross-platform manner?

os.devnull perhaps? Or rather, what about subprocess.Popen(cmd, 
stderr=subprocess.PIPE)?

Stefan

-- 
Stefan H. Holek
ste...@epy.co.at

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


Re: [Zope-dev] [Checkins] SVN: Zope/trunk/ `setHeader('Set-Cookie', ...)` special-casing can die

2011-10-17 Thread Stefan H. Holek
Hi Martijn,

There are test failures on Zope trunk which look to be connected to your 
changes.
https://mail.zope.org/pipermail/zope-tests/2011-October/051224.html

Please investigate,

Stefan


On 13.10.2011, at 15:18, Martijn Pieters wrote:

 Log message for revision 123087:
  `setHeader('Set-Cookie', ...)` special-casing can die
 
  Use the cookie APIs or addHeader instead.
 
 
 Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/ZPublisher/HTTPResponse.py
 
 -=-
 Modified: Zope/trunk/doc/CHANGES.rst
 ===
 --- Zope/trunk/doc/CHANGES.rst2011-10-13 09:46:28 UTC (rev 123086)
 +++ Zope/trunk/doc/CHANGES.rst2011-10-13 13:18:32 UTC (rev 123087)
 @@ -50,6 +50,11 @@
 Restructuring
 +
 
 +- Removed the special handling of `Set-Cookie` headers in
 +  `HTTPResponse.setHeader`. Use the `setCookie`/`appendCookie`/`expireCookie`
 +  methods instead, or if low-level control is needed, use `addHeader` instead
 +  to get the exact same effect.
 +
 - Removed the `App.version_txt.getZopeVersion` API, you can use
   ``pkg_resources.get_distribution('Zope2').version`` instead.
 
 
 Modified: Zope/trunk/src/ZPublisher/HTTPResponse.py
 ===
 --- Zope/trunk/src/ZPublisher/HTTPResponse.py 2011-10-13 09:46:28 UTC (rev 
 123086)
 +++ Zope/trunk/src/ZPublisher/HTTPResponse.py 2011-10-13 13:18:32 UTC (rev 
 123087)
 @@ -330,13 +330,8 @@
 if not scrubbed:
 name, value = _scrubHeader(name, value)
 key = name.lower()
 -# The following is crazy, given that we have APIs for cookies.
 -# Special behavior will go away in Zope 2.13
 -if key == 'set-cookie':  
 -self.accumulated_headers.append((name, value))
 -else:
 -name = literal and name or key
 -self.headers[name] = value
 +name = literal and name or key
 +self.headers[name] = value
 
 def appendHeader(self, name, value, delimiter=, ):
  Append a value to an HTTP return header.
 
 ___
 checkins mailing list
 check...@zope.org
 https://mail.zope.org/mailman/listinfo/checkins

-- 
Stefan H. Holek
ste...@epy.co.at





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


Re: [Zope-dev] Zope Tests: No messages

2010-03-28 Thread Stefan H. Holek
Daylight Saving Time switch-over in Europe. Let's see what tomorrow  
brings. ;-)

Stefan


On 28.03.2010, at 14:43, Christian Theune wrote:

 On 03/28/2010 12:59 PM, Zope Tests Summarizer wrote:
 Summary of messages to the zope-tests list.
 Period Sat Mar 27 11:00:00 2010 UTC to Sun Mar 28 11:00:00 2010 UTC.
 There were no messages.

 Eeek. Something broken?

-- 
Stefan H. Holek
ste...@epy.co.at





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


[Zope-dev] Automated Acceptance Test

2009-11-11 Thread Stefan H. Holek
You may have more luck on zope-dev (cc'd). :-)

Stefan


On 11.11.2009, at 18:37, Carlos.Solis wrote:

 Dear all,



 I’m trying to find an open source project that in the current  
 version uses automated acceptance tests, but that in previous  
 versions it did not. I think that this is the case between Zope 3  
 and Zope 2, but I’m not sure. I would like to know if  
 Zope.testbrowser was used for automated acceptance test in the  
 creation of Zope 3. In addition, I would like to know if this was  
 included in the evolution of Zope 2 that use Zope 3 technology.



 Best regards

 Carlos Solis


--
Stefan H. Holek
ste...@epy.co.at




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


Re: [Zope-dev] Zope Tests: 6 OK, 2 Failed

2009-11-03 Thread Stefan H. Holek
FWIW, Martijn is correct. Python 2.4 does not like values  2**31-1  
for list indexes, slices, e.a. even on 64 bit systems. I have disabled  
the respective test runs.

Stefan


On 01.11.2009, at 14:43, Martijn Pieters wrote:

 2009/10/31 Tres Seaver tsea...@palladion.com:
 I can't reproduce this failure when running the Acquisition 2.12.4  
 tests
 with Python 2.4 on my machine.

 This is python 2.4 on 64-bit linux. I bet it's because of:

  typedef int Py_ssize_t;

 and sys.maxint overflows to -1 with that definition. I suspect that
 all open-ended slicing ops in Python C extensions are borken in python
 2.4, because it doesn't have Py_ssize_t.

--
Stefan H. Holek
ste...@epy.co.at




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


[Zope-dev] Linux x86_64 [Was: Zope Tests: 3 OK, 5 Failed]

2009-07-18 Thread Stefan H. Holek
All failures appear to be due to the new box running Linux x86_64.  
Tests still pass fine on the Mac.

Any experience with this? MemoryError in Acquisition? WTH?

Stefan


On 18.07.2009, at 14:00, Zope Tests Summarizer wrote:

 Summary of messages to the zope-tests list.
 Period Fri Jul 17 12:00:00 2009 UTC to Sat Jul 18 12:00:00 2009 UTC.
 There were 8 messages: 8 from Zope Tests.


 Test failures
 -

 Subject: FAILED (failures=1) : Zope-2.12 Python-2.6.2 : Linux
 From: Zope Tests
 Date: Fri Jul 17 20:50:00 EDT 2009
 URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012082.html

 Subject: FAILED (failures=1) : Zope-2.12-alltests Python-2.4.6 : Linux
 From: Zope Tests
 Date: Fri Jul 17 20:52:00 EDT 2009
 URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012083.html

 Subject: FAILED (failures=7) : Zope-2.12-alltests Python-2.6.2 : Linux
 From: Zope Tests
 Date: Fri Jul 17 20:54:01 EDT 2009
 URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012084.html

 Subject: FAILED (failures=1) : Zope-trunk Python-2.6.2 : Linux
 From: Zope Tests
 Date: Fri Jul 17 20:56:01 EDT 2009
 URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012085.html

 Subject: FAILED (failures=7) : Zope-trunk-alltests Python-2.6.2 :  
 Linux
 From: Zope Tests
 Date: Fri Jul 17 20:58:01 EDT 2009
 URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012086.html


--
Stefan H. Holek
ste...@epy.co.at




___
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] [cmf-tests] UNKNOWN : CMF-trunk Zope-trunk Python-2.6.1 : Linux

2009-04-27 Thread Stefan H. Holek
What's the reason zope.component.interfaces has no BBB for this  
import? The Zope Toolkit is full of 'deprecated()', so why not in this  
case?

Stefan


On 27.04.2009, at 03:28, CMF Tests wrote:

 CMF Tests : UNKNOWN
 CMF-trunk Zope-trunk Python-2.6.1 : Linux

 Running /usr/local/python2.6/bin/python ./bin/test
 Test-module import failures:

 Module: Products.CMFCore.tests.test_DynamicType

 Traceback (most recent call last):
  File /home/stefan/autotest/temp/python26-zope212-cmf22/src/ 
 Products.CMFCore/Products/CMFCore/tests/test_DynamicType.py, line  
 26, in module
from zope.component.interfaces import IDefaultViewName
 ImportError: cannot import name IDefaultViewName

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


[Zope-dev] Python 2.4 + Zope 2.12 [Was: Zope Tests: 7 OK, 1 Failed]

2009-04-20 Thread Stefan H. Holek
Do we still care about Python 2.4 + Zope 2.12? Do we go Python 2.6 only?

Thanks,
Stefan


On 20.04.2009, at 14:00, Zope Tests Summarizer wrote:

 Summary of messages to the zope-tests list.
 Period Sun Apr 19 12:00:00 2009 UTC to Mon Apr 20 12:00:00 2009 UTC.
 There were 8 messages: 8 from Zope Tests.


 Test failures
 -

 Subject: FAILED (failures=8) : Zope-trunk-alltests Python-2.4.6 :  
 Linux
 From: Zope Tests
 Date: Sun Apr 19 20:55:05 EDT 2009
 URL: http://mail.zope.org/pipermail/zope-tests/2009-April/011512.html

___
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] Zope 2 from buildout?

2009-02-13 Thread Stefan H. Holek
For the time being Zope2 must be used as a develop egg. Like e.g. so:
http://svn.zope.org/CMF.buildout/trunk/

Stefan


On 13.02.2009, at 13:49, Chris Withers wrote:

 I guess this equates to what does a Zope 2 instance look like now  
 that
 we're buildout-based?

___
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] Retiring the Zope SVN trunk? was: Re: Zope Tests: 6 OK, 2 Failed

2009-02-03 Thread Stefan H. Holek
I don't think you faired that badly. ;-)

One obvious problem is the removal of the 'defaultSkin' directive,  
which is still in use by CMFDefault. The rest looks harmless.

I am not opposed to ditching the trunk, but I don't think keeping it  
in sync (if only for a transition period) is impossible either.

Stefan


On 03.02.2009, at 13:56, Hanno Schlichting wrote:

 It becomes somewhat hard and annoying to keep the old full Zope trunk
 tree based on externals in sync with the Zope2 buildout and its KGS
 definition and it seems I failed yesterday.

 I'd suggest we reorganize the Zope trunk and replace it by the current
 buildout. As part of that we can move the code that has been moved to
 its own projects like Acquisition and DateTime out of the main tree.

 I'd volunteer to do this work if nobody objects.

___
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] Plans for Zope 2.12

2009-01-22 Thread Stefan H. Holek
While we are at it...

The biggest offender is the zodbcode package, which does not appear to  
pass its tests at all under Python 2.6. Not having investigated this  
further I can imagine three courses of action:

   1) Fix zodbcode (me shrugs)

   2) Exclude zodbcode tests from the test suite

   3) Remove zodbcode from Zope 2 (who's using it anyway?)

Stefan


On 21.01.2009, at 14:55, Andreas Jung wrote:

 - focus on Python 2.6 support for the final release (although there  
 are
  still some tests failing - more than with Python 2.5). Possibly
  focus on Python 2.5 support for the alpha phase. Not sure if
  we want to support Python 2.5 and 2.6 officially at the same time.
  With the current classification of Python versions within the
 configure script I would suggest:

  TARGET=Python 2.6.X
  ACCEPTABLE=Python 2.5
  Python 2.4.X would be basically not acceptable but could be used
  at your own risk using the --with-python option.

___
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] [Zope-tests] UNKNOWN : Zope[2.buildout]-trunk Python-2.5.2 : Linux

2009-01-19 Thread Stefan H. Holek
Enough!

I have put a copy of docutils-0.4.tar.gz on the test server and point  
buildout at it via ~/.buildout/default.cfg.

Stefan


On 19.01.2009, at 02:55, Zope Tests wrote:

 Zope Tests : UNKNOWN
 Zope[2.buildout]-trunk Python-2.5.2 : Linux

 Running /usr/local/python2.5/bin/python ./bin/test --all
 /usr/local/python2.5/bin/python: can't open file './bin/test':  
 [Errno 2] No such file or directory

 UNKNOWN


[snip]

 Getting distribution for 'docutils==0.4'.
 While:
  Installing test.
  Getting distribution for 'docutils==0.4'.
 Error: Can't download 
 http://prdownloads.sourceforge.net/docutils/docutils-0.4.tar.gz?download 
 : 404 Not Found
___
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] Zope Tests: 7 OK, 1 Unknown

2009-01-17 Thread Stefan H . Holek

 That test seems to be timing out both yesterday and today trying to
 download docutils:  do you think having the buildout use a
 download_cache would help?


 Tres.

It certainly would. I am however reluctant to enable the download  
cache because it may mask incomplete buildout configurations.

When a suitable find-links location is missing in buildout.cfg, but  
the requested egg is already in the download cache, buildout will  
happily use it and not flag the broken configuration.

Stefan

___
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] svn.zope.org up again?

2008-11-11 Thread Stefan H. Holek
Up it may be, working it is not. E.g.:


Fetching external item into 'python24-zope210/lib/python/zope/testing'
svn: Reference to non-existent node 'd2u.9gw.r70272/0' in filesystem  
'/svn/repos/main/db'


Fetching external item into 'python24-zope211/lib/python/zope/decorator'
Apython24-zope211/lib/python/zope/decorator
svn: Can't open file '/svn/repos/main/db/revs/70320': No such file or  
directory



On 11. Nov 2008, at 08:51, Adam GROSZER wrote:

 svn: Can't open file '/svn/repos/main/db/revs/70320': No such file  
 or directory
 program finished with exit code 1

 Seems that one revision did not get restored.
 It breaks also on show log, where other folders with older revisions
 seem to work.

--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] Failing Zope 2.8 / Python 2.3 tests on your box

2008-08-29 Thread Stefan H. Holek
The Python 2.3 on that box hasn't changed in a while, and the  
encodings module works, at least interactively.

$ /usr/local/python2.3/bin/python
Python 2.3.6 (#1, Nov 11 2006, 11:08:56)
[GCC 4.0.2 (Debian 4.0.2-2)] on linux2
Type help, copyright, credits or license for more information.
  import encodings
  encodings.aliases.aliases
{'iso_ir_6': 'ascii', 'maccyrillic': 'mac_cyrillic', 'iso_celtic':  
'iso8859_14', 'ebcdic_cp_wt': 'cp037', ...



On 20. Aug 2008, at 19:57, Tres Seaver wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Stefan,

 Tests are blowing up on that box becaues the 'encodings' module has no
 attribute 'aliases':  AFAICT, that doesn't happen on a standard  
 build
 of Python:  is there something weird about your setup?


 Tres.

--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] Failing Zope 2.8 / Python 2.3 tests on your box

2008-08-29 Thread Stefan H. Holek
What I have found out now is that in my Python 2.3.6 encodings/ 
__init__.py does not contain 'import aliases' at module level,  
whereas the Python 2.4 lib has this import. The patch does this:

import encodings
encodings._aliases = encoding.aliases.aliases

which does therefore not work in 2.3. So, now I am curious how your  
Python 2.3 differs, and why you don't see the error locally :-)

Cheers,
Stefan

--
It doesn't necessarily do it in chronological order, though.
   --Douglas Adams


___
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] Failing Zope 2.8 / Python 2.3 tests on your box

2008-08-21 Thread Stefan H. Holek
It is a hand-compiled Python 2.3, not the one coming with the  
distro. I'll have to look into it, maybe ./configure missed something...

Stefan

On 20. Aug 2008, at 19:57, Tres Seaver wrote:

 Tests are blowing up on that box becaues the 'encodings' module has no
 attribute 'aliases':  AFAICT, that doesn't happen on a standard  
 build
 of Python:  is there something weird about your setup?

--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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: [Checkins] SVN: zc.buildout/branches/plus-minus-option-syntax-for-review/src/zc/buildout/buildout. A patch contributed by Mustapha Benali that provide - and + prefix operators for build

2008-06-09 Thread Stefan H. Holek

Shouldn't this read .. += and -= operators.?

Stefan


On 05.06.2008, at 19:58, Malthe Borch wrote:


+Adding and removing options
+---
+
+We can append and remove values to an option by using the + and -
+operators.
+
+This is illustrated below; first we define a base configuration.


--
Stefan H. Holek
[EMAIL PROTECTED]




___
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] fast_listen - fast-listen for 2.11

2008-06-05 Thread Stefan H. Holek
I'd like to sneak the following patch into 2.11 before final. The  
idea is that zope.conf option names should use dashes and not  
underscores. The downside is that it will break all zope.conf files  
that already use this option.


Objections?

Stefan


+Bugs Fixed
+
+  - Fixed against-the-rules zope.conf option 'fast_listen' to read
+'fast-listen' (dash, not underscore).
+
   Zope 2.11 rc 1 (2008/05/08)

 Bugs Fixed
Index: skel/etc/zope.conf.in
===
--- skel/etc/zope.conf.in   (revision 84838)
+++ skel/etc/zope.conf.in   (working copy)
@@ -975,8 +975,7 @@
   #
   # To defer the opening of the HTTP socket until the end of the
   # startup phase:
-  # fast_listen false
-  #
+  # fast-listen off
 /http-server

 # Examples:
Index: lib/python/ZServer/component.xml
===
--- lib/python/ZServer/component.xml(revision 84838)
+++ lib/python/ZServer/component.xml(working copy)
@@ -19,10 +19,10 @@
  receive WebDAV source responses to GET requests.
/description
  /key
- key name=fast_listen datatype=boolean default=on
+ key name=fast-listen datatype=boolean default=on
description
- Defines wether the http server should listen to requests  
immediately

- or only after zope is ready to run
+ Defines whether the HTTP server should listen for requests
+ immediately or only after Zope is ready to run.
/description
  /key
  key name=use-wsgi datatype=boolean default=off /


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] Zope Tests: 4 OK, 1 Failed

2008-05-28 Thread Stefan H. Holek

This looks like another case of borken zope.testbrowser. Benji?

Stefan


On 28.05.2008, at 13:00, Zope Tests Summarizer wrote:


Test failures
-

Subject: FAILED (failures=1) : Zope-trunk Python-2.4.4 : Linux
From: Zope Tests
Date: Tue May 27 21:10:39 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-May/009619.html


--
Stefan H. Holek
[EMAIL PROTECTED]




___
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] Zope2 interfaces delenda est!

2008-04-25 Thread Stefan H. Holek

+1 for trunk
-1 for 2.11 branch

Stefan


On 25. Apr 2008, at 20:49, Tres Seaver wrote:


I'd like to rip out the old Interface module from the 2.11 branch and
the trunk, along with all the useless decoys which import it.


--
Anything that happens, happens.  --Douglas Adams


___
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] Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Stefan H. Holek

On 17.04.2008, at 12:27, Hanno Schlichting wrote:

Opinions, votes?



+1

--
Stefan H. Holek
[EMAIL PROTECTED]




___
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: Zope without Zope

2007-11-17 Thread Stefan H. Holek

On 17. Nov 2007, at 02:15, Martin Aspeli wrote:

I understand the historical reasons behind these dependencies, but  
I genuinely think we should pick a few libraries that are useful  
to the outside world (zope.interface, zope.component,  
zope.configuration, zope.annotation, zope.event come to mind) and  
work to make these have clean dependencies.


+1

and zope.schema.

Stefan


--
Anything that happens, happens.  --Douglas Adams

___
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] [ANN] ZopeTestCase now on a layer

2007-10-13 Thread Stefan H. Holek
I have put all of ZopeTestCase on a test layer, making it possible to  
mix ZTC and non-ZTC tests more freely. The layer is currently  
available on the Zope 2 trunk (2.11) only.


You can read more here:
http://www.zope.org/Members/shh/ZopeTestCaseWiki/ZopeLiteLayer

Stefan

--
Anything that happens, happens.  --Douglas Adams

___
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] Fix for request must be post at Take Ownership

2007-07-05 Thread Stefan H. Holek
I may be missing something here, but the fact that you have to use  
POST is fully intentional and not a bug.


Stefan


On 5. Jul 2007, at 11:27, Jonas Meurer wrote:


When do you plan to add the fix for request must be post at Take
Ownership to a stable zope 2.10 release? It seems like this bug has
been introduced with zope 2.10.2 or 2.10.3.

An example of the bug can be found at http://zope.pastey.net/56726


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] [SVN] Zope trunk - merged stuff for Zope 2.11 released

2007-06-27 Thread Stefan H. Holek
I plan to land the ZopeLite* layer work for 2.11. It's already  
running fine in my sandbox but has some implications for existing  
tests in both Zope and CMF, which I at least need to document. Do you  
have a target date for 2.11?


Stefan

(*) ZopeTestCase magic deferred to layer setup time instead of import  
time




On 26. Jun 2007, at 16:43, Andreas Jung wrote:


Are any major developments pending for Zope 2.11? I only know of some
Five exception work (Martijn Faasen).


--
Anything that happens, happens.  --Douglas Adams


___
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] problem with the last commit of Five branches 1.4 for Collector #2307

2007-06-21 Thread Stefan H. Holek
FWIW, I have parked the fix on a branch [1][2] and will wait for Zope  
2.9.8 [3].


Stefan


[1] http://svn.zope.org/Products.Five/?rev=76908view=rev
[2] http://svn.zope.org/Products.Five/?rev=76909view=rev
[3] http://mail.zope.org/pipermail/zope-dev/2007-June/029454.html


On 21. Jun 2007, at 17:15, Lucie Lejard wrote:


I am using Zope 2.9.7, python 2.4.4 and plone 2.5.3.
I am also using Five-branch 1.4. Everything was working with no  
problem until this happen:
-- 
--

r76829 | shh | 2007-06-20 05:57:27 -0400 (Wed, 20 Jun 2007) | 2 lines

Collector #2307: ObjectCopiedEvent not dispatched to sublocations.


--
Anything that happens, happens.  --Douglas Adams


___
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: SVN: Zope/branches/2.10/ Collector #2307: ObjectCopiedEvent not dispatched to sublocations.

2007-06-20 Thread Stefan H. Holek
I took my cues from how ObjectModifiedEvent is handled. I figured  
copied and moved should be treated the same. Also, there is this  
comment in OFS/subscribers.py:


# The following subscribers should really be defined in ZCML
# but we don't have enough control over subscriber ordering for
# that to work exactly right.
# (Sometimes IItem comes before IObjectManager, sometimes after,
# depending on some of Zope's classes.)
# This code can be simplified when Zope is completely rid of
# manage_afterAdd  co, then IItem wouldn't be relevant anymore and we
# could have a simple subscriber for IObjectManager that directly calls
# dispatchToSublocations.

Cheers,
Stefan


On 20. Jun 2007, at 12:25, Philipp von Weitershausen wrote:


Stefan H. Holek wrote:

Log message for revision 76597:
  Collector #2307: ObjectCopiedEvent not dispatched to sublocations.


...


@@ -130,7 +131,15 @@
 if OFS.interfaces.IObjectManager.providedBy(ob):
 dispatchToSublocations(ob, event)
 [EMAIL PROTECTED](OFS.interfaces.IItem, IObjectCopiedEvent)
+def dispatchObjectCopiedEvent(ob, event):
+Multi-subscriber for IItem + IObjectCopiedEvent.
+
+# Dispatch to sublocations
+if OFS.interfaces.IObjectManager.providedBy(ob):
+dispatchToSublocations(ob, event)


Why are you subscribing to IItem if you really want to work only  
with IObjectManagers?


--
Anything that, in happening, causes itself to happen again,
happens again.  --Douglas Adams


___
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: SVN: Zope/branches/2.10/ Collector #2307: ObjectCopiedEvent not dispatched to sublocations.

2007-06-20 Thread Stefan H. Holek
This should of course have read: I took my cues from how  
*ObjectMovedEvent* is handled.


On 20. Jun 2007, at 13:16, Stefan H. Holek wrote:

I took my cues from how ObjectModifiedEvent is handled. I figured  
copied and moved should be treated the same. Also, there is this  
comment in OFS/subscribers.py:


--
It doesn't necessarily do it in chronological order, though.
  --Douglas Adams



___
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] What's the deal with sublocations?

2007-04-10 Thread Stefan H. Holek
Most ObjectEvents are dispatched to sublocations. I was wondering  
whether it is ok for me to expect a certain dispatch order, i.e. top- 
down (container before sublocation) or bottom-up (sublocation before  
container)?


What I find is that this order depends on things like the exact  
interface a handler is registered for and, in Zope 2.9 (+3.2), even  
on the way I run tests (!).


I can only conclude that there is no guaranteed dispatch order. Now,  
should there be? Where can I learn about this contract?


Also see http://www.zope.org/Collectors/Zope/2308

Thanks,
Stefan

--
It doesn't necessarily do it in chronological order, though.
  --Douglas Adams


___
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: What's the deal with sublocations?

2007-04-10 Thread Stefan H. Holek

Thanks!

On 10. Apr 2007, at 18:34, Philipp von Weitershausen wrote:

No. The dispatch to sublocations is an event handler itself. One  
should not depend on the execution order of event handlers,  
therefore you should not depend on this dispatch happening before  
or after your own event handler(s) for IObjectMovedEvent.


--
Anything that, in happening, causes itself to happen again,
happens again.  --Douglas Adams


___
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] buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot

2007-03-24 Thread Stefan H. Holek
The buildbot for Zope 2 won't ever complete successfully unless  
ZODB.tests.testZODB.checkResetCachesAPI is excluded from the test  
run. The bot's command line should look something like:


python2.4 test.py -vv -m '!^(ZEO|zope[.]app[.])' -t '! 
checkResetCachesAPI' --all


Also see http://mail.zope.org/pipermail/zope-dev/2006-September/ 
028238.html


Stefan


On 24. Mär 2007, at 19:33, [EMAIL PROTECTED] wrote:

The Buildbot has detected a failed build of Zope branches 2.9 2.4  
Linux zc-buildbot.


Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 356
Blamelist: dobe,fdrake,philikon,shh

BUILD FAILED: failed test

sincerely,
 -The Buildbot



--
Anything that happens, happens.  --Douglas Adams


___
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: [Checkins] SVN: Zope/branches/Zope-2_8-branch/ - Backport a postonly decorator from Zope trunk's requestmethod decorator factory.

2007-03-21 Thread Stefan H. Holek

Python 2.3 does not support the @decorator syntax.

Cheers,
Stefan


On 20. Mär 2007, at 10:05, Martijn Pieters wrote:


Log message for revision 73390:
  - Backport a postonly decorator from Zope trunk's requestmethod  
decorator factory.

  - Protect various security-setting-mutators with this decorator.


Modified: Zope/branches/Zope-2_8-branch/lib/python/AccessControl/ 
PermissionMapping.py

===
--- Zope/branches/Zope-2_8-branch/lib/python/AccessControl/ 
PermissionMapping.py	2007-03-20 09:03:57 UTC (rev 73389)
+++ Zope/branches/Zope-2_8-branch/lib/python/AccessControl/ 
PermissionMapping.py	2007-03-20 09:05:56 UTC (rev 73390)

@@ -26,10 +26,13 @@

 from Owned import UnownableOwner
 from Permission import pname
+from requestmethod import postonly


 class RoleManager:

+# XXX: No security declarations?
+
 def manage_getPermissionMapping(self):
 Return the permission mapping for the object

@@ -54,6 +57,7 @@
 a({'permission_name': ac_perms[0], 'class_permission':  
p})

 return r

+@postonly
 def manage_setPermissionMapping(self,
 permission_names=[],
 class_permissions=[],  
REQUEST=None):




--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] Early processing of request body (was: Proposal for optimized Blob handling)

2007-03-08 Thread Stefan H. Holek
This use-case is already covered by implementing  
ZPublisher.Iterators.IStreamIterator. You can return a stream  
iterator to Medusa and free the worker thread immediately.


Stefan


On 8. Mär 2007, at 05:40, Sidnei da Silva wrote:


Hopefully something similar could be done for files being sent *out*
of the application when they don't need any application processing
anymore (ie, Blobs!).


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] Zope Tests: 7 OK

2007-03-08 Thread Stefan H. Holek

Care to share a test result?

FWIW, the nightlies basically do

svn co svn://svn.zope.org/repos/main/Zope/trunk Zope
cd Zope
./configure
make inplace
python2.4 test.py -q --all

Which leaves little room for errors, IMO ;-)

Stefan


On 8. Mär 2007, at 01:27, Christian Theune wrote:


I'm questioning those tests. I have two tests failing on a fresh
checkout of the Zope 2 trunk on my machine in this setting (Linux/ 
Python

2.4.4)

Christian


--
It doesn't necessarily do it in chronological order, though.
  --Douglas Adams


___
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] [ZPT/Zope 2.10] Unicode fixes backported

2006-12-29 Thread Stefan H. Holek

Andreas,

The changes are not backward compatible, apparently.
http://mail.zope.org/pipermail/cmf-tests/2006-December/003656.html
http://mail.zope.org/pipermail/cmf-tests/2006-December/003657.html

Stefan


On 28. Dez 2006, at 14:58, Andreas Jung wrote:

I know that this migration is a big hammer (for a minor release)  
however I
have not found another solution to deal with the outstanding issues  
in a

reasonable and sane way. Therefore this migration must be tested. I am
thinking about a beta release for 2.10.2 in order to get the stuff  
tested

(I am also aware of the fact that most people don't test betas :-))


--
Anything that happens, happens.  --Douglas Adams


___
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] [ZPT/Zope 2.10] Unicode fixes backported

2006-12-29 Thread Stefan H. Holek

In fact, the Zope trunk is a bit of a mess as well.
http://mail.zope.org/pipermail/cmf-tests/2006-December/003658.html

Stefan


--
Anything that, in happening, causes itself to happen again,
happens again.  --Douglas Adams


___
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] Cannot access Zope Management Interface through lighttpd proxy

2006-10-12 Thread Stefan H. Holek
I haven't used lighttpd but the below rewrite rules doesn't specify  
the port, it should.


Stefan


On 12. Okt 2006, at 19:33, yegor wrote:


url.rewrite-once = (
  ^/plone/(.*)$ =
/VirtualHostBase/http/rio.sci.ccny.cuny.edu/VirtualHostRoot/ 
_vh_plone/$1

)


--
Anything that happens, happens.  --Douglas Adams


___
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: WebDAV PUT factory tests failing on 2.10 branch

2006-09-18 Thread Stefan H. Holek
Yes, this is a blocker IMO as it breaks FTP for a whole class of  
virtual hosting scenarios. No, I don't know how to fix, maybe Lennart?


Stefan


On 17. Sep 2006, at 12:52, Andreas Jung wrote:

--On 17. September 2006 12:38:11 +0200 Philipp von Weitershausen  
[EMAIL PROTECTED] wrote:


AFAIK, Stefan Hollek checked it in to demonstrate an  
incompatibility of

Zope 2.10 vs. 2.9. See http://www.zope.org/Collectors/Zope/2187.




Ahh..I remember.

@Stefan: is this a blocker? Any chance to get this fixed?

Andreas


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] Serving large files

2006-09-18 Thread Stefan H. Holek
FileCacheManager does the copy-to-file-and-serve-as-iterator dance  
for you.


http://www.dataflake.org/software/filecachemanager

Stefan


On 17. Sep 2006, at 21:09, Sidnei da Silva wrote:


One thing that is problematic today is serving large files
from the ZODB (ignoring the upcoming blob support).

a) You can't return an iterator that reads from the ZODB, because by
   the time the iterator is consumed the connection has already been
   closed. I believe the iterator is not consumed in the same thread,
   which can cause yet more issues.

b) If you dump the data to a temp file and return that as a file
   iterator, it can potentially take twice the time.


--
It doesn't necessarily do it in chronological order,
though.  --Douglas Adams


___
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] ZODB.tests.testZODB.checkResetCachesAPI definitely bad

2006-09-12 Thread Stefan H. Holek
These errors are *also* due to  
ZODB.tests.testZODB.checkResetCachesAPI. The cache reset appears to  
leave the Application object and/or transactions in a borked state.


All is well when I suppress checkResetCachesAPI:

$ python2.4 test.py -q -m '!^(ZEO|zope[.]app[.])' -t '! 
checkResetCachesAPI' --all

Running unit tests:
  Ran 7062 tests with 0 failures and 0 errors in 494.930 seconds.
Running  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer tests:
  Set up  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.005 seconds.

  Running:
..
  Ran 2 tests with 0 failures and 0 errors in 0.025 seconds.
Tearing down left over layers:
  Tear down  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.003 seconds.

Total: 7064 tests, 0 failures, 0 errors

Stefan


testInsideOutVirtualHosting  
(webdav.tests.testPUT_factory.TestPUTFactory)

testNoVirtualHosting (webdav.tests.testPUT_factory.TestPUTFactory)

Error in test testNoVirtualHosting  
(webdav.tests.testPUT_factory.TestPUTFactory)

Traceback (most recent call last):
  File /usr/lib/python2.4/unittest.py, line 251, in run
self.setUp()
  File /home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
branches---2.9--2.4/build/lib/python/webdav/tests/ 
testPUT_factory.py, line 22, in setUp

self.app.manage_addFolder('folder', '')
  File /home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
branches---2.9--2.4/build/lib/python/OFS/Folder.py, line 49, in  
manage_addFolder

self._setObject(id, ob)
  File /home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
branches---2.9--2.4/build/lib/python/OFS/ObjectManager.py, line 300,  
in _setObject

v = self._checkId(id)
  File /home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
branches---2.9--2.4/build/lib/python/OFS/ObjectManager.py, line 95,  
in checkValidId

raise BadRequest, (
BadRequest: The id folder is invalid - it is already in use.



On 12. Sep 2006, at 02:52, [EMAIL PROTECTED] wrote:

The Buildbot has detected a failed build of Zope branches 2.9 2.4  
Linux zc-buildbot.


Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7595
Blamelist: adamg,ctheune,flindner,flox,jim,tseaver

BUILD FAILED: failed test

sincerely,
 -The Buildbot


--
It doesn't necessarily do it in chronological order,
though.  --Douglas Adams


___
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] PUT_factory broken in 2.10+

2006-09-10 Thread Stefan H. Holek

Hi Lennart,

Philipp tells me you are responsible for the traversal integration.  
Any ideas re http://www.zope.org/Collectors/Zope/2187?


Thanks,
Stefan


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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: buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot

2006-09-10 Thread Stefan H. Holek
So it looks like I have identified the bad test. It is  
ZODB.tests.testZODB.checkResetCachesAPI. When I suppress that test  
all goes well:


$ python2.4 test.py -q -m '!^(ZEO|zope[.]app[.])' -t '! 
checkResetCachesAPI' --all

Running unit tests:
The following test left new threads behind:
testABOR (zope.server.ftp.tests.test_ftpserver.Tests)
New thread(s): [_DummyThread(Dummy-117, started daemon)]
  Ran 7970 tests with 0 failures and 0 errors in 492.328 seconds.
Running  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer tests:
  Set up  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.004 seconds.

  Ran 2 tests with 0 failures and 0 errors in 0.022 seconds.
Tearing down left over layers:
  Tear down  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.003 seconds.

Total: 7972 tests, 0 failures, 0 errors

Stefan


On 8. Sep 2006, at 22:44, Stefan H. Holek wrote:

/me scratches head. I only see the error when I use the bot's  
command line, a normal test run works fine.


$ python2.4 test.py -q --all
Running unit tests:
The following test left new threads behind:
testABOR (zope.server.ftp.tests.test_ftpserver.Tests)
New thread(s): [_DummyThread(Dummy-36, started daemon)]
  Ran 5869 tests with 0 failures and 0 errors in 223.199 seconds.
Running  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer tests:
  Set up  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.004 seconds.

  Ran 2 tests with 0 failures and 0 errors in 0.087 seconds.
Tearing down left over layers:
  Tear down  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.004 seconds.

Total: 5871 tests, 0 failures, 0 errors

Stefan


On 8. Sep 2006, at 20:00, Tres Seaver wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
The Buildbot has detected a failed build of Zope branches 2.9 2.4  
Linux zc-buildbot.


Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7559
Blamelist: flox,jinty,shh

BUILD FAILED: failed test

sincerely,
 -The Buildbot


This set of failures appears to be due to the layer extraction tests
Whit added, and Stefan modified:

Traceback (most recent call last):
  File test.py, line 112, in ?
sys.exit(testrunner.run(defaults))
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 245, in run
failed = run_with_options(options)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 395, in run_with_options
setup_layers, failures, errors)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 566, in run_layer
setup_layer(layer, setup_layers)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 650, in setup_layer
layer.setUp()
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/Testing/ZopeTestCase/zopedoctest/ 
testLayerExtraction.py,

line 38, in setUp
transaction.commit()
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/transaction/_manager.py,

line 96, in commit
return self.get().commit(sub, deprecation_wng=False)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/transaction/_transaction.py,

line 395, in commit
self._commitResources()
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/transaction/_transaction.py,

line 495, in _commitResources
rm.commit(self)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/ZODB/Connection.py,

line 484, in commit
self._commit(transaction)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/ZODB/Connection.py,

line 526, in _commit
self._store_objects(ObjectWriter(obj), transaction)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/ZODB/Connection.py,

line 560, in _store_objects
self._cache[oid] = obj
ValueError: Cache values may only be in one cache.



--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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: buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot

2006-09-08 Thread Stefan H. Holek
/me scratches head. I only see the error when I use the bot's command  
line, a normal test run works fine.


$ python2.4 test.py -q --all
Running unit tests:
The following test left new threads behind:
testABOR (zope.server.ftp.tests.test_ftpserver.Tests)
New thread(s): [_DummyThread(Dummy-36, started daemon)]
  Ran 5869 tests with 0 failures and 0 errors in 223.199 seconds.
Running  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer tests:
  Set up  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.004 seconds.

  Ran 2 tests with 0 failures and 0 errors in 0.087 seconds.
Tearing down left over layers:
  Tear down  
Testing.ZopeTestCase.zopedoctest.testLayerExtraction.TestLayer in  
0.004 seconds.

Total: 5871 tests, 0 failures, 0 errors

Stefan


On 8. Sep 2006, at 20:00, Tres Seaver wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
The Buildbot has detected a failed build of Zope branches 2.9 2.4  
Linux zc-buildbot.


Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7559
Blamelist: flox,jinty,shh

BUILD FAILED: failed test

sincerely,
 -The Buildbot


This set of failures appears to be due to the layer extraction tests
Whit added, and Stefan modified:

Traceback (most recent call last):
  File test.py, line 112, in ?
sys.exit(testrunner.run(defaults))
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 245, in run
failed = run_with_options(options)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 395, in run_with_options
setup_layers, failures, errors)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 566, in run_layer
setup_layer(layer, setup_layers)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/zope/testing/testrunner.py,

line 650, in setup_layer
layer.setUp()
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/Testing/ZopeTestCase/zopedoctest/ 
testLayerExtraction.py,

line 38, in setUp
transaction.commit()
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/transaction/_manager.py,

line 96, in commit
return self.get().commit(sub, deprecation_wng=False)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/transaction/_transaction.py,

line 395, in commit
self._commitResources()
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/transaction/_transaction.py,

line 495, in _commitResources
rm.commit(self)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/ZODB/Connection.py,

line 484, in commit
self._commit(transaction)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/ZODB/Connection.py,

line 526, in _commit
self._store_objects(ObjectWriter(obj), transaction)
  File
/home/buildbot/slave-zope.org/zc-buildbot--Linux--Zope--- 
trunk--2.4/build/lib/python/ZODB/Connection.py,

line 560, in _store_objects
self._cache[oid] = obj
ValueError: Cache values may only be in one cache.



--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2

2006-08-22 Thread Stefan H. Holek

The Windows bot is borked, don't blame me ;-)

http://buildbot.zope.org/Zope%20branches%202.9%202.4%20Windows% 
202000%20zc-bbwin2/builds/160/compile/0


Stefan


On 22. Aug 2006, at 12:47, [EMAIL PROTECTED] wrote:

The Buildbot has detected a failed build of Zope branches 2.9 2.4  
Windows 2000 zc-bbwin2.


Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 7215
Blamelist: shh

BUILD FAILED: failed compile

sincerely,
 -The Buildbot



--
It doesn't necessarily do it in chronological order, though.
  --Douglas Adams


___
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] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

2006-07-22 Thread Stefan H. Holek
zope.pagetemplate.pagetemplatefile.PageTemplateFile reads an eventual  
meta http-equiv=Content-Type ... header, or defaults to UTF-8.


Stefan


On 21. Jul 2006, at 16:53, Chris Withers wrote:


I wonder how Zope 3's filesystem-based ZPT's deal with this?


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
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] Unittests with different zope configuration?

2006-06-07 Thread Stefan H. Holek

I use this to set debug-mode off:

# Switch off debug mode
import App.config
config = App.config.getConfiguration()
config.debug_mode = 0
App.config.setConfiguration(config)

Stefan


On 5. Jun 2006, at 11:50, Andreas Jung wrote:

Does anyone know how to write unittests that have to deal with  
different configurations in zope.conf? In my particular case I need  
write some tests for sequence.sort() that deal with the 'locale'  
configuration in zope.conf.

So how do I setup a different configurations in a unit test?

Andreas


--
Anything that happens, happens.  --Douglas Adams


___
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] zeo server conflict resolving

2006-06-02 Thread Stefan H. Holek
You have to copy or symlink your Products directory into the ZEO  
instance. At least those Products it tries to load for conflict  
resolution.


HTH,
Stefan

On 2. Jun 2006, at 10:21, M. Krainer wrote:

How can I teach the zeo server to lookup my Products dir to resolve  
the

conflict?


--
Anything that happens, happens.  --Douglas Adams


___
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: zope2 requests VS zope3 requests

2006-06-02 Thread Stefan H. Holek

-1

The whole point of sticking with Zope2 is backward compatibility,  
isn't it? If I wanted something that doesn't run my old products and  
applications anymore I would go to Zope3 directly, why thank you.


Please keep this in mind in your spree to make Zope2 look like Zope3.  
Backward compatibility is paramount. Next thing you are going to  
remove implicit acquisition ;-).


Stefan

On 28. Mai 2006, at 12:53, Philipp von Weitershausen wrote:

That's true. However, we really want the Zope 2 request to  
(eventually)

become like the Zope 3 browser request. In fact, in many places we
already assume that the Zope 2 request is like a Zope 3 browser  
request.

We stick IBrowserRequest on it and hand it over to lots of Zope 3
machinery. So far this has worked relatively well, but there are
problems coming up with certain API subtleties.

I think the biggest challenge will be to deprecate __getattr__ access
for request variables and only allow __getitem__ for this. Then, the
getattr protocol will be used to access the request API only. For
example, IBrowserRequest demands that requests have a 'debug'  
attribute.

In Zope 2, we have the problem that request.debug is an alternate
spelling of request.form['debug']. If that alternate spelling wasn't
there, request.debug was free for the IBrowserRequest API. Right now
we're doing a frame hack to see where the caller is coming from and
either yield request.debug or request.form['debug'].


--
Anything that happens, happens.  --Douglas Adams


___
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: [Checkins] SVN: Zope/trunk/lib/python/App/FactoryDispatcher.py External methods can now live outside of Products based python packages.

2006-05-04 Thread Stefan H. Holek
Note that Zope2.app() opens a new ZODB connection which you need to  
close at some point. I suggest something along the lines of:


app = Zope2.app()
try:
products = app.Control_Panel.Products
...
finally:
app._p_jar.close()

I am also wondering if this code would break if a product was removed  
from the file system, but still had its persistent part hanging  
around in Control_Panel.Products.


Stefan


On 2. Mai 2006, at 22:59, Rocky Burt wrote:


Log message for revision 67869:
  External methods can now live outside of Products based python  
packages.


Changed:
  U   Zope/trunk/lib/python/App/FactoryDispatcher.py

-=-
Modified: Zope/trunk/lib/python/App/FactoryDispatcher.py
===
--- Zope/trunk/lib/python/App/FactoryDispatcher.py	2006-05-02  
20:57:53 UTC (rev 67868)
+++ Zope/trunk/lib/python/App/FactoryDispatcher.py	2006-05-02  
20:59:07 UTC (rev 67869)

@@ -13,12 +13,36 @@


 # Implement the manage_addProduct method of object managers
+import types
 import Acquisition, sys, Products
 from Globals import InitializeClass
 from AccessControl import ClassSecurityInfo
 from AccessControl.PermissionMapping import aqwrap
 from AccessControl.Owned import UnownableOwner
+import Zope2

+def _product_packages():
+Returns all product packages including the regularly defined
+zope2 packages and those without the Products namespace package.
+
+
+old_product_packages = {}
+for x in dir(Products):
+m = getattr(Products, x)
+if isinstance(m, types.ModuleType):
+old_product_packages[x] = m
+
+packages = {}
+products = Zope2.app().Control_Panel.Products
+for product_id in products.objectIds():
+product = products[product_id]
+if hasattr(product, 'package_name'):
+packages[product_id] = __import__(product.package_name)
+elif old_product_packages.has_key(product_id):
+packages[product_id] = old_product_packages[product_id]
+
+return packages
+
 class ProductDispatcher(Acquisition.Implicit):
  
 # Allow access to factory dispatchers
@@ -32,7 +56,7 @@

 # Try to get a custom dispatcher from a Python product
 dispatcher_class=getattr(
-getattr(Products, name, None),
+_product_packages().get(name, None),
 '__FactoryDispatcher__',
 FactoryDispatcher)


___
Checkins mailing list
[EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/checkins


--
Anything that happens, happens.  --Douglas Adams


___
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] Debugging spinning Zope?

2006-04-18 Thread Stefan H. Holek

http://www.zope.org/Members/4am/debugspinningzope

On 18. Apr 2006, at 16:45, Morten W. Petersen wrote:


Hi,

I have a problem with a Zope that hangs eating up 99.9% of the CPU.
I've tried to debug the problem by using DeadlockDebugger but that
doesn't even return when accessing it.

I guess the next step is to use pdb og gdb - are there perhaps any
documents out there describing the process?

TIA,

Morten


--
Anything that happens, happens.  --Douglas Adams


___
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] Zope Test Summaries 2006-04-05

2006-04-06 Thread Stefan H. Holek
[We seem to have lost Steve Alexander's test summarizer. I will  
contact him in a separate mail.]


The switch to Python 2.3.4 caused tests for Zope 2.7 and 2.8 to  
experience a funny problem with the logging module. Anybody want to  
take a guess what's up here? I know these are not a truly supported  
configurations, but still.


http://mail.zope.org/pipermail/zope-tests/2006-April/004645.html
http://mail.zope.org/pipermail/zope-tests/2006-April/004647.html

The VHM tests in Zope 2.9 and trunk broke last night:

http://mail.zope.org/pipermail/zope-tests/2006-April/004648.html
http://mail.zope.org/pipermail/zope-tests/2006-April/004649.html

Stefan

--
Anything that happens, happens.  --Douglas Adams


___
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: [Checkins] SVN: Zope/trunk/ Fixed collector 2057: Testing.makequest broke getPhysicalPath()

2006-04-06 Thread Stefan H. Holek
For the record: I am still opposed to this change. It basically  
endows the request (as in self.REQUEST) with a getPhysicalPath  
method, and I have no idea what kind of side-effects this may have.


AFAICS your test suite is the only suite around that wants to request- 
wrap non-root objects. There's nothing wrong with using your own  
makerequest for your own test suite, if this is what you want. But I  
don't think your use-case warrants changing Zope.


Stefan


On 5. Apr 2006, at 22:51, Paul Winkler wrote:


Log message for revision 66581:
  Fixed collector 2057: Testing.makequest broke getPhysicalPath()
  when used on anything other than an app object.
  Also added an 'environ' argument if you want to use something
  other than os.environ, and added a couple trivial tweaks from
  ZopeTestCase.makereqeust.
  Added unit tests for this stuff.



Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Testing/makerequest.py
  A   Zope/trunk/lib/python/Testing/tests/
  A   Zope/trunk/lib/python/Testing/tests/__init__.py
  A   Zope/trunk/lib/python/Testing/tests/test_makerequest.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2006-04-05 20:04:59 UTC (rev 66580)
+++ Zope/trunk/doc/CHANGES.txt  2006-04-05 20:51:21 UTC (rev 66581)
@@ -46,6 +46,9 @@

 Features added

+  - Testing.makerequest: Added an 'environ' argument so
+clients can use mappings other than os.environ.
+
   - Updated to Docutils 0.4.0

   - reStructuredText: The default value for the 'stylesheet'
@@ -202,6 +205,10 @@

 Bugs Fixed

+  - Collector #2057: Allow Testing.makerequest to work with
+   any acquisition-supporting root object, not just Zope2.app.
+Formerly, if you did that, getPhysicalPath() was broken.
+
   - Collector #2051: Applied patch by Yoshinori Okuji to fix some
 XML export/import problems, including tests for that feature.


Modified: Zope/trunk/lib/python/Testing/makerequest.py
===
--- Zope/trunk/lib/python/Testing/makerequest.py	2006-04-05  
20:04:59 UTC (rev 66580)
+++ Zope/trunk/lib/python/Testing/makerequest.py	2006-04-05  
20:51:21 UTC (rev 66581)

@@ -19,27 +19,50 @@
 import makerequest
 app = makerequest.makerequest(Zope2.app())

+You can optionally pass stdout to be used by the response,
+and an environ mapping to be used in the request.
+Defaults are sys.stdout and os.environ.
+
+If you don't want to start a zope app in your test, you can wrap  
other

+objects, but they must support acquisition and you should only wrap
+your root object.
+
+
 $Id$

 

 import os
-from os import environ
 from sys import stdin, stdout
 from ZPublisher.HTTPRequest import HTTPRequest
 from ZPublisher.HTTPResponse import HTTPResponse
 from ZPublisher.BaseRequest import RequestContainer

-def makerequest(app, stdout=stdout):
+def makerequest(app, stdout=stdout, environ=None):
 resp = HTTPResponse(stdout=stdout)
-environ['SERVER_NAME']='foo'
-environ['SERVER_PORT']='80'
-environ['REQUEST_METHOD'] = 'GET'
+if environ is None:
+environ = os.environ
+environ.setdefault('SERVER_NAME', 'foo')
+environ.setdefault('SERVER_PORT', '80')
+environ.setdefault('REQUEST_METHOD',  'GET')
 req = HTTPRequest(stdin, environ, resp)
-
+req._steps = ['noobject']  # Fake a published object.
+req['ACTUAL_URL'] = req.get('URL') # Zope 2.7.4
+
 # set Zope3-style default skin so that the request is usable for
-# Zope3-style view look-ups
+# Zope3-style view look-ups.
 from zope.app.publication.browser import setDefaultSkin
 setDefaultSkin(req)

-return app.__of__(RequestContainer(REQUEST = req))
+requestcontainer = RequestContainer(REQUEST = req)
+# Workaround for collector 2057: ensure that we don't break
+# getPhysicalPath if app has that method.
+# We could instead fix Traversable.getPhysicalPath() to check for
+# existence of p.getPhysicalPath before calling it; but it's such
+# a commonly called method that I don't want to impact  
performance

+# for something that AFAICT only affects makerequest() in
+# practice.
+if getattr(app, 'getPhysicalPath', None) is not None:
+requestcontainer.getPhysicalPath = lambda: ()
+
+return app.__of__(requestcontainer)

Added: Zope/trunk/lib/python/Testing/tests/__init__.py
===
--- Zope/trunk/lib/python/Testing/tests/__init__.py	2006-04-05  
20:04:59 UTC (rev 66580)
+++ Zope/trunk/lib/python/Testing/tests/__init__.py	2006-04-05  
20:51:21 UTC (rev 66581)

@@ -0,0 +1 @@
+#


Property changes on: Zope/trunk/lib/python/Testing/tests/__init__.py
___
Name: svn:keywords
   + Author Date Revision

Added: 

Re: [Zope-dev] makerequest issues

2006-04-05 Thread Stefan H. Holek

On 4. Apr 2006, at 22:08, Paul Winkler wrote:


On Tue, Apr 04, 2006 at 08:09:05PM +0200, Stefan H. Holek wrote:

This looks fine to me because the world ends at parent. Your earlier
example wrapped an object that was in the middle of an acquisition
chain (IIRC),


no, I think you invented that :)



Ok, I retract ;-)


which I am not sure I like. You are safe to wrap the
top-most object, be it a true app or not.


OK. In that case, 2057 really *is* a bug.
http://www.zope.org/Collectors/Zope/2057


Well, thing is that getPhysicalPath of Traversable looks like this:

def getPhysicalPath(self):
path = (self.getId(),)
p = aq_parent(aq_inner(self))
if p is not None:
path = p.getPhysicalPath() + path
return path

whereas getPhysicalPath of Application looks like this:

def getPhysicalPath(self):
# We're at the base of the path.
return ('',)

As you can see Application is designed to terminate the lookup  
recursion. With safe I meant with regard to acquiring the REQUEST,  
granted getPhysicalPath breaks (time for another half-retraction it  
seems).


Regarding your patch, why do you use lambda: () and not lambda: ('',)?

Stefan

--
Anything that happens, happens.  --Douglas Adams

___
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] makerequest issues

2006-04-05 Thread Stefan H. Holek
Out of curiosity, you know that SimpleItem does not have a  
constructor? You just inherit the one from ExtensionClass.Base, which  
accepts everything and subsequently ignores it. So your item will  
have an empty id. This *may* be what you want so your physical path  
starts with '' instead of 'blah', but I'm not sure...


On 5. Apr 2006, at 17:21, Paul Winkler wrote:


item = SimpleItem(id='blah')


--
Anything that happens, happens.  --Douglas Adams


___
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] makerequest issues

2006-04-04 Thread Stefan H. Holek

On 4. Apr 2006, at 16:53, Paul Winkler wrote:

Hmmm, but unit tests very often don't reflect reality -  
deliberately!

Because reality is Too Much Stuff.



True enough.


Any other opinions on this?  Do we really need to require an App at
the root any time we want to acquire REQUEST? That seems kind of
arbitrary to me when any acquisition-enabled object would do. I've
inherited a test suite that has a lot of stuff like:

parent = makerequest(Folder())

... and I don't see anything wrong with that in principle,
but if the concensus is that Stefan's right, I'll bow to that.


This looks fine to me because the world ends at parent. Your earlier  
example wrapped an object that was in the middle of an acquisition  
chain (IIRC), which I am not sure I like. You are safe to wrap the  
top-most object, be it a true app or not.


Stefan

--
Anything that happens, happens.  --Douglas Adams


___
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] makerequest issues

2006-04-04 Thread Stefan H. Holek
The one in ZopeTestCase.utils is also meant to play with startZServer  
(same module). I agree that the one in Testing.makerequest could  
probably gain ACTUAL_URL, and maybe even the request._steps hack to  
make URL1 and friends available...


However, I have not seen these URL vars used anywhere but templates  
and DTML. ZTC adds them because it's used quite heavily for  
integration and functional testing(*). Also note that the values are  
faked, i.e. they are present but contain dummy values. In real-life  
they would be maintained by traversal, and no traversal takes place  
in unit tests.


If you use ZTC you will automatically get an app object wrapped by  
utils.makerequest. If you don't use ZTC, I guess it depends on  
whether you think you will need ACTUAL_URL often enough to warrant  
adding it to Testing.makerequest. I don't think that's the case but  
YMMV.


Stefan

(*) To be honest they where likely added for Plone, now shoot me.


On 4. Apr 2006, at 17:37, Paul Winkler wrote:


Stefan, do you have any insight into my first question?
I wrote:


1) there is a makerequest function in both Testing/makerequest.py
and Testing/ZopeTestCase/utils.py.  They are subtly different.
Is there a deliberate reason for this?  I notice that ... (snip)
the one in makerequest.py lacks an ACTUAL_URL.


If there's no reason for the implementations to differ,
I can delete one definition and just import the other in its place.


--
Anything that happens, happens.  --Douglas Adams


___
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] Bug in Zope 2.9?

2006-04-03 Thread Stefan H. Holek

This is an old ZODB, right?

ZGlobals is used by ZClasses. There used to be a time when ZGlobals  
was still a BTree when it should have been a BTrees.BTree. Then some  
migration code was added. I suppose the error comes from the fact  
that BTree.so is now finally no longer part of Zope and your ZODB is  
old. Or something along these lines ;-)


Anyway, as long as you don't use ZClasses (and I seem to remember  
you, err, are pretty explicit about your dislike) forget about it.


Stefan


On 3. Apr 2006, at 12:18, Chris Withers wrote:

I see the following the first time a Zope instance is started under  
2.9:


2006-04-03T10:59:30 ERROR Zope A problem was found when checking  
the global product registry.  This is probably due to a Product  
being uninstalled or renamed.  The traceback follows.

Traceback (most recent call last):
  File C:\Zope\2.9.2\lib\python\OFS\Application.py, line 260, in  
checkGlobalRegistry

keys=list(self._p_jar.root()['ZGlobals'].keys())
  File C:\Zope\2.9.2\lib\python\OFS\Uninstalled.py, line 46, in  
__getattr__

raise AttributeError, escape(name)
AttributeError: keys

Seems odd. What does it mean? Should I expect it? How come it no  
longer happens on subsequent startups?

--
Anything that happens, happens.  --Douglas Adams


___
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] makerequest issues

2006-04-01 Thread Stefan H. Holek
I don't think makerequest is intended for wrapping anything but the  
root application object. Putting the RequestContainer on arbitrary  
objects doesn't feel right and certainly isn't how Zope does it, i.e.  
you get a test fixture that doesn't reflect reality.


NotABug/WontFix ;-)

Stefan


On 31. Mär 2006, at 19:31, Paul Winkler wrote:


2) re. the bug which I just posted at
http://www.zope.org/Collectors/Zope/2057
the issue is that if you have something that inherits
Traversable, and wrap it with makerequest(), its
getPhysicalPath() method is broken, because getPhysicalPath()
tries to call getPhysicalPath() on all non-None aq_parents,
and an HTTPRequest isn't Traversable.


--
Anything that happens, happens.  --Douglas Adams


___
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] [Zope2.8.7] with Five 1.0 or Five 1.2

2006-03-27 Thread Stefan H. Holek

+1

On 27. Mär 2006, at 07:35, Andreas Jung wrote:


Zope 2.8 ships/shipped with Five 1.0 which is very old and no longer
actively maintained. Most ppl doing currently development with Zope  
2.8
are using Five 1.2. Should we upgrade the Five version in Zope 2.8  
to Five 1.2 to make their lives a bit easier?


--
Anything that happens, happens.  --Douglas Adams


___
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] IMO ZClasses should stay

2006-03-25 Thread Stefan H. Holek

+1

I have handed systems with a thin ZClass layer on top to semi- 
developers and they were *easily* able to take it from there. These  
are people who would never have grokked (and bothered with) disk- 
based Python development and all the mumbo-jumbo it entails.


No other system has anything even remotely like this. People are  
*blown away* by the power of building objects TTW (define some  
properties, write a few scripts and templates, done!). Take that RoR,  
Django, Vignette, Broadvision, ... ;-)


Of course ZClasses have their limitations, but I fully agree that  
this is first and foremost a documentation problem.


Stefan


On 24. Mär 2006, at 17:25, Jim Fulton wrote:


On the subject of deprecation, for the record, I think removing
ZClasses is a mistake.  They have legitimate uses.  They have major
flaws too.  It would help if we would more clearly document their
limitations and pitfalls, rather than get rid of them, at least
until we have something better,


--
Anything that happens, happens.  --Douglas Adams


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


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

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


Cheers,
Stefan


On 13. Feb 2006, at 16:48, Julien Anguenot wrote:


Florent Guillaume wrote:

Julien Anguenot wrote:

Tim Peters wrote:

[Julien Anguenot]

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

[... traceback ... ]

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



I've had this too, and I believe it appears if you have a frame
referencing a python script (or maybe an external method) in the  
stack.




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


--
Anything that happens, happens.  --Douglas Adams


___
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: Zope tests: 6 OK, 2 Failed

2006-01-15 Thread Stefan H. Holek
AFAIK the default configuration used by tests does not have a dbtab. 
See lib/python/App/config.py.


Stefan


On Jan 14, 2006, at 16:45, Florent Guillaume wrote:



I'll look at it.

Florent

Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
This failure is tie up with Florent's recent checkin:

Log message for revision 41303:
 When a database is created by hand from a custom_zodb.py during
 startup, we still want to put it in the dbtab multidatabases dict.
  This happens when unit tests call Zope2.startup(), because Testing 
has a

 specific custom_zodb.py loaded at startup that uses a DemoStorage.


Zope tests summarizer wrote:

Summary of messages to the zope-tests list.
Period Fri Jan 13 12:01:01 2006 UTC to Sat Jan 14 12:01:01 2006 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Test failures
-

Subject: FAILED : Zope-2_9-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Fri Jan 13 21:10:37 EST 2006
URL: 
http://mail.zope.org/pipermail/zope-tests/2006-January/004008.html


Subject: FAILED : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Fri Jan 13 21:12:07 EST 2006
URL: 
http://mail.zope.org/pipermail/zope-tests/2006-January/004009.html


--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/

___
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] zope-2.9 r40780 make install doesn't finish, files missing from bin

2005-12-20 Thread Stefan H. Holek

On 18. Dez 2005, at 17:58, Tim Peters wrote:


Nobody should be installing from a checkout to begin with, right?


Ok, so that's probably where we disagree then ;-)

I almost exclusively work with checkouts, and I would think many  
developers (as opposed to users) do. Is there really no way to  
allow make install to work from a sandbox?


Stefan

--
Anything that happens, happens.  --Douglas Adams


___
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] zope-2.9 r40780 make install doesn't finish, files missing from bin

2005-12-18 Thread Stefan H. Holek
make install does currently not work on 2.9 branch and trunk. I am  
told that this is because zpkg cannot do it. I am also told that  
the tarball would support make install, just not the checkout. I  
never use tarballs, so I don't know for sure.


I'd very much like to see the canonical ./configure; make; make  
install continue to work as it did in 2.7 and 2.8. Sysadmins go  
crazy if Zope's installation procedure changes with every other release.


Stefan


On 17. Dez 2005, at 20:46, Jeff Kowalczyk wrote:


I'm having some trouble with the 'make install' stage of Zope-2.9 svn.
Using python-2.4.2 on Gentoo linux. Zope-2.9.0b1 installed fine, but I
needed the fix for get_transaction() ASAP.

URL: svn://svn.zope.org/repos/main/Zope/branches/2.9
Revision: 40853

# ./configure --prefix=/usr/lib/zope-2.9.0
# make
# make install


--
Anything that happens, happens.  --Douglas Adams


___
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] Zope tests: 5 OK, 3 Failed

2005-12-15 Thread Stefan H. Holek
Yup, that box is slowly dying on me. I will take down the nightlies  
until I find a new machine to run them on.


Stefan


On 14. Dez 2005, at 15:35, Chris McDonough wrote:

FYI:  These tests appear to be failing due to a race in the tests  
they're exercising that could be exposed if the machine was under  
heavy load or just particularly slow.


--
Anything that happens, happens.  --Douglas Adams


___
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] New ways of getting transactions?

2005-12-11 Thread Stefan H. Holek

import transaction
transaction.get()
transaction.commit()
transaction.abort()
transaction.savepoint()

This works since 2.8, but not in 2.7. Nearly every project has come  
up with its own backward compatibility module though. See for example  
CMFCore.utils.transaction or CMFPlone.transaction.


Stefan


On 11. Dez 2005, at 17:01, Morten W. Petersen wrote:


Hi,

I'm having some code that bombs out trying to commit a transaction;  I
believe it's because of new ways of doing things in Zope 2.9..  how do
you call the equivalents of get_transaction().commit() and abort() in
Zope 2.9?  Will those new ways work with Zope 2.7/2.8?

Thanks.

--
Morten W. Petersen


--
Anything that happens, happens.  --Douglas Adams


___
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] ZSQL method and LIMIT clause

2005-11-02 Thread Stefan H. Holek
*Everything* you can do in the ZMI can be done from code. The ZMI is  
not a magic entity, it uses the same APIs as everybody else. With  
FSZSQLMethods you can stick max_rows: 0 into the lead-in comment, BTW.


Stefan


On 3. Nov 2005, at 03:37, Thanh Hải, Hà wrote:

 My problem is I don't know to prevent Zope from adding LIMIT  
1000 to the
end of each of my ZSQL method (*.zsql). I am developing a  
filesystem-based
product so I can not disable it by setting Maximum Rows to  
Retrieve to

zero in the ZMI interface.


--
Anything that happens, happens.  --Douglas Adams


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


[Zope-dev] Re: [Zope-Checkins] SVN: Zope/trunk/lib/python/Shared/DC/ZRDB/ Collector #556: sqlvar now returns 'null' rather than 'None'.

2005-10-08 Thread Stefan H. Holek
This change breaks Gadfly which doesn't seem to like 'null' at all. I  
poked around in ZGadflyDA/gadfly a bit, but it's not obvious to me  
how to fix the parser (*.mar files anyone?).


Stefan


[snip]
  File /usr/local/Zope-2_8-branch/lib/python/Products/ZGadflyDA/ 
gadfly/kjParser.py, line 826, in ParseError

raise SyntaxError, 'unexpected token sequence.' + data
SyntaxError: unexpected token sequence.near ::
dca437824c3b0',* null,  '',   '
***
current state = 252
expects:
'?', 'numeric_literal', 'character_string_literal', '-', '+',
('nomatch1',)
current token = ((-8, 'user_defined_name'), 'NULL')



On 3. Sep 2005, at 01:20, Tres Seaver wrote:


Log message for revision 38276:
  Collector #556:  sqlvar now returns 'null' rather than 'None'.


Changed:
  U   Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py
  A   Zope/trunk/lib/python/Shared/DC/ZRDB/tests/test_sqlvar.py

-=-
Modified: Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py
===
--- Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py2005-09-02  
23:15:46 UTC (rev 38275)
+++ Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py2005-09-02  
23:20:49 UTC (rev 38276)

@@ -98,6 +98,9 @@
 raise
 raise ValueError, 'Missing input variable, em%s/ 
em' % name


+if v is None:
+return 'null'
+
 if t=='int':
 try:
 if type(v) is StringType:



--
Anything that happens, happens.  --Douglas Adams


___
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] OSX: zopectl test results in Interrupted system call

2005-08-20 Thread Stefan H. Holek
Since r37701 zopectl test forks off a child process [1]. On OSX I  
now reliably get a traceback tacked onto the end of every test report:


Traceback (most recent call last):
  File /Zope8/lib/python/Zope2/Startup/zopectl.py, line 312, in ?
main()
  File /Zope8/lib/python/Zope2/Startup/zopectl.py, line 281, in main
c.onecmd( .join(options.args))
  File /usr/local/python2.3/lib/python2.3/cmd.py, line 210, in onecmd
return func(arg)
  File /Zope8/lib/python/Zope2/Startup/zopectl.py, line 266, in  
do_test

os.waitpid(pid, 0)
OSError: [Errno 4] Interrupted system call

Tested on two OSX machines. Appears to work fine on Linux. Anybody  
else seeing this? Ideas?


Thanks,
Stefan


[1] http://svn.zope.org/Zope/branches/Zope-2_8-branch/lib/python/ 
Zope2/Startup/zopectl.py?rev=37701r1=30475r2=37701


--
Anything that happens, happens.  --Douglas Adams


___
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] RAMcache and container vs. context

2005-05-27 Thread Stefan H. Holek
A TALES expression may be prohibitively expensive in any case, no  
matter how simple it is kept. Please make sure to do some comparative  
profiling. Cache keys are recomputed on every call of the script,  
AFAICS. The thought of doing this in restricted Python makes my skin  
crawl.


Stefan


On 26. Mai 2005, at 09:12, Chris Withers wrote:


Paul Winkler wrote:


I kinda wish the RAMCache manager allowed other things than
REQUEST variables for differentiation. Arbitrary TALES expressions
would be nice. Then we could get rid of this hard-coded gunk and
get the same effect by having context/getPhysicalPath as one
of the expressions.
But of course then you'd have the opportunity to kill your
cache performance by making the expressions too expensive.
Ah well, TANSTAAFL and all that. I'll probably just drop the idea.



I still think it's worth it. Crippling everyone on the basis that  
stupid people can hurt themselves is not good logic in my books ;-)


If you could chuck this as a feature request in the collector and  
assign it to me, I'd love to work on it if I ever find the time...


cheers,

Chris


--
Software Engineering is Programming when you can't. --E. W. Dijkstra


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

___
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] RAMcache and container vs. context

2005-04-21 Thread Stefan H. Holek
This is due to how Python Scripts compute their cache keys. The 
relevant snippet from PythonScript._exec() is:

asgns = self.getBindingAssignments()
name_context = asgns.getAssignedName('name_context', None)
if name_context:
keyset[name_context] = aq_parent(self).getPhysicalPath()
Note that aq_parent() gives you the URL parent, not the container. I 
see no way around that as the return value of a script may well depend 
on its context.

HTH,
Stefan
On 21. Apr 2005, at 22:26, Paul Winkler wrote:
It's not obvious to me from the code why this is happening
(or why it might be desirable).  The cache manager stores and looks
up items by their getPhysicalPath(), so I don't see why context vs.
container is relevant.  If I'd wanted the URL to be relevant,
I would have put that in the REQUEST Variables configuration.
--
Software Engineering is Programming when you can't. --E. W. Dijkstra
___
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: guarded_getattr

2005-02-17 Thread Stefan H. Holek
Oops, I just noticed there is a CMFCore test failing now, all  
branches...

==
ERROR: test_move_cant_create_target_metatype_not_allowed  
(CMFCore.tests.test_PortalFolder.PortalFolderCopySupportTests)
--
Traceback (most recent call last):
  File  
/Users/stefan/autotest/temp/python23-zope27-cmf15/Products/CMFCore/ 
tests/test_PortalFolder.py, line 1021, in  
test_move_cant_create_target_metatype_not_allowed
, ce_regex='Insufficient Privileges'
  File  
/Users/stefan/autotest/temp/python23-zope27-cmf15/Products/CMFCore/ 
tests/test_PortalFolder.py, line 855, in _assertCopyErrorUnauth
callable( *args, **kw )
  File  
/Users/stefan/autotest/temp/python23-zope27/lib/python/OFS/ 
CopySupport.py, line 160, in manage_pasteObjects
self._verifyObjectPaste(ob, validate_src=op+1)
  File  
/Users/stefan/autotest/temp/python23-zope27-cmf15/Products/CMFCore/ 
PortalFolder.py, line 533, in _verifyObjectPaste
PortalFolder.inheritedAttribute(
  File  
/Users/stefan/autotest/temp/python23-zope27/lib/python/OFS/ 
CopySupport.py, line 358, in _verifyObjectPaste
method = self.restrictedTraverse(method_name)
  File  
/Users/stefan/autotest/temp/python23-zope27/lib/python/OFS/ 
Traversable.py, line 204, in restrictedTraverse
return self.unrestrictedTraverse(path, default, restricted=1)
  File  
/Users/stefan/autotest/temp/python23-zope27/lib/python/OFS/ 
Traversable.py, line 180, in unrestrictedTraverse
o = guarded_getattr(object, name, M)
AttributeError: manage_addFile

On 15. Feb 2005, at 21:29, Stefan H. Holek wrote:
Most excellent fix, thanks!
Stefan
On 14. Feb 2005, at 20:24, Jim Fulton wrote:
Tres Seaver wrote:
Jim and I worked on an alternative fix today -- he will be checking  
it
in to your branch shortly, including modifying cAccessControl.
Done.
Jim
--
Software Engineering is Programming when you can't.  --E. W. Dykstra
___
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: guarded_getattr

2005-02-15 Thread Stefan H. Holek
Most excellent fix, thanks!
Stefan
On 14. Feb 2005, at 20:24, Jim Fulton wrote:
Tres Seaver wrote:
Jim and I worked on an alternative fix today -- he will be checking it
in to your branch shortly, including modifying cAccessControl.
Done.
Jim
--
Software Engineering is Programming when you can't.  --E. W. Dykstra
___
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] guarded_getattr

2005-02-11 Thread Stefan H. Holek
Tres,
I'd very much appreciate your opinion on
http://mail.zope.org/pipermail/zope-dev/2005-January/024237.html
http://mail.zope.org/pipermail/zope-dev/2005-January/024242.html
Plone is breaking left and right and I gotta do something about it...
Thanks,
Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
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] More on [Removal of aq_acquire from guarded_getattr]

2005-01-24 Thread Stefan H. Holek
The failing AccessControl tests can now be found on shh-aqtests-branch 
in zope.org CVS.

Observations:
a) guarded_getattr checks object security of the acquiree if the 
container denies access (at least that's my assessment).

b) The tests pass when either
  - running Zope  2.7.3, or
  - declaring object security on the acquiree via 
declareObjectProtected(foo)

c) Unauthorized errors pop up in CMF-based applications, typically when 
trying to access a portal tool from a Python Script. E.g. the tests for 
http://zope.org/Collectors/CMF/318 fail on 1.4 branch because 
'portal_membership' can not be acquired.

d) Current Zope objects are ill-prepared for these checks as many do 
not bother to declare object security in the first place (User Folder, 
Mail Host, 50% of CMF tools, ...).

e) Plone and Archetypes exponentially increase the likelihood of 
encountering these errors. I have seen several variations in our 
customer projects, all reliably fixed by b)

f) I think this is serious. It certainly is a problem for Plone.
g) 
http://mail.zope.org/pipermail/zope-checkins/2004-August/028152.html

h) If g) really is THE fix for http://zope.org/Collectors/CMF/259 all 
existing Zope software must be reviewed, IMO.

i) Unit tests + VerboseSecurity = useful.
Please advise,
Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
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] Removal of aq_acquire from guarded_getattr

2005-01-21 Thread Stefan H. Holek
The bug:
http://zope.org/Collectors/CMF/259
The fix:
http://mail.zope.org/pipermail/zope-checkins/2004-August/028152.html
This effectively changes how acquisition works in restricted Python. I 
understand this may well be the point wink.

The consequences:
Zope sites experiencing seemingly random Unauthorized errors. [1]
I have added tests to the AccessControl suite on 2.7 branch that 
demonstrate the new behavior. Note that all of them pass in Zope 2.7.2.

What it _appears_ to mean is that when a container denies access, the 
object security of the acquiree is checked. Therefore, a potential 
acquiree (read: _any_ object) must make sure to declareObjectProtected 
or it may end up not being acquirable. This is not always the case in 
current Zope/CMF/Plone which would explain the Unauthorized errors we 
see.

Tres, I am happy to discuss this further once you had a look at the 
tests. I also have tests for the CMF in case you want them.

Stefan
[1]
http://zope.org/Collectors/CMF/318
http://zope.org/Collectors/Zope/1654
http://zope.org/Collectors/Zope/1669
http://plone.org/collector/3682
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
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] FYI: test.py changes rolled back

2005-01-13 Thread Stefan H. Holek
I have restored test.py to the version shipping with Zope 2.7.3. The 
changes made to accommodate Florent's use-case (adjacent symlinks) 
broke some of mine. In particular, without calling realpath (or 
abspath) on libdir, trailing slashes caused no tests to be found, as 
did some combinations of '.' and '..'. [1]

I am confident we can find a way to solve this, but wanted to avoid 
releasing a challenged test runner with Zope 2.7.4.

Florent, in the meantime I am hoping you can run your tests by using a 
combination of --libdir and --dir flags. Sorry for the inconvenience.

Stefan
[1] The real issue in PathInit IMO is the return value of os.getcwd(), 
which is realpath'd one some systems and abspath'd on others...

--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
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] roman.py missing on 2.7 branch?

2005-01-13 Thread Stefan H. Holek
Seems docutils is not there just yet. I have added a test to 
reStructuredText that tries to import the rst parser and it - gasp - 
fails.

Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
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] Why third_party/docutils?

2004-12-16 Thread Stefan H. Holek
*sound of me protesting noisily*
Let me remind you of the Pope's decree:
http://mail.zope.org/pipermail/zope-dev/2004-November/024073.html
Stefan
On 16. Dez 2004, at 20:14, Andreas Jung wrote:

--On Donnerstag, 16. Dezember 2004 19:28 Uhr +0100 Christian Theune 
[EMAIL PROTECTED] wrote:

Just for a note: This just made me spend more than two very annoying
hours debugging and fixing the zopeservice.py. Those changes are not
meant to be done on a stable branch ...
I disagree because maintaining Docutils in the state as they were in 
former version
was a real pain. Cleaning up the mess was therefore a valid option and 
since this change
happened during two final releases things (zopeservice) were only 
broken in beta 1 and 2
(that's why we have betas *wink*). Also no one came up so far with a 
better solution so I regard
the reorganization as a suitable solution. But I am of course further 
improvements are very welcome :-)
Any volunteers? .-)

Andreas
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] getUserById

2004-12-13 Thread Stefan H. Holek
Hm, I'd rather not raise exceptions.
getUserById was introduced in Zope 2.2 and since then has never raised 
anything. From what I can see it is used as a kind of alias for 
getUser, expected to return None if the user does not exist.

So, my intention is to make 'default' work, not to make it raise. I see 
that raising may seem like a more consistent idea (think dict.get) but 
it may also break existing code [1].

My secret agenda is to unify the behavior of getUserById across user 
folders. As it is now, LDAPUserFolder, GRUF, etc all implement their 
own little variations because the default is so strange.

Stefan
[1] getUserById is not used by Zope, only in a safe way (with 
default=None) by CMF, and only twice by Plone. But it is used by e.g. 
CMFMember and, somewhat unfortunately, is all over ZTC-based unit 
tests.

On 13. Dez 2004, at 17:15, Florent Guillaume wrote:
Can we have instead:
def getUserById(self, id, default=_marker):
Return the user corresponding to the given id.
Raises a KeyError if the user does not exist and no default
is provided.

user = self.getUser(id)
if user is not None:
return user
if default is not _marker:
return default
raise KeyError(id)
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] getUserById

2004-12-12 Thread Stefan H. Holek
In User.py the method is defined as
def getUserById(self, id, default=_marker):
try:
return self.getUser(id)
except:
if default is _marker: raise
return default
I am wondering whether anybody actually depends on the fact that 
getUser is supposed to raise an exception. I know of no user folder 
implementation that actually does that.

Rather, I'd like to change it to the way it's done in LDAPUserFolder 
where the method looks (more or less) like:

def getUserById(self, id, default=_marker):
user = self.getUser(id)
if user is None and default is not _marker:
return default
return user
Any objections?
Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Why third_party/docutils?

2004-11-29 Thread Stefan H. Holek
[docutils was moved from lib/python/docutils to 
lib/python/third_party/docutils/docutils and an ugly sys.path hack 
employed]

Why oh why do we always have to make it harder to start up Zope 
(instead of making it simpler, for once)?

Extending the path in lib/python/sitecustomize only works if lib/python 
is on the PYTHONPATH at the time the interpreter is started. This is 
fine in case of ./bin/zopectl, but not anywhere else. For example it 
breaks basically all test runners. Yes, I have seen that test.py got 
hacked to append third_party/docutils to the sys.path, this is however 
not a solution IMO, but plain cheating around a code layout error. 
test.py is *not* the only test runner around, nor is ./bin/zopectl the 
only way to start up Zope!

Many a sysadmin will curse at having to fix a whole bunch of scripts. 
We have been very careful in the past to accommodate them, let me 
remind you of the ZOPE_CONFIG hack we added just for legacy scripts.

What is the reason for third_party? Is is absolutely required, and if 
yes, why? Why not keep it simple (well, as simple as possible given the 
already tricky Z2 startup sequence)?

I'd be very happy if this decision could be reconsidered. Thoughts?
Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope-Checkins] CVS: Zope - test.py:1.2.2.16

2004-11-22 Thread Stefan H. Holek
Sorry Florent, I missed your warning mail.
I have two issues with the patch:
a) Trailing slash no longer works (--libdir Products/)
b) Some combinations of --libdir and --dir and symlinks no longer work 
on Mac OS X (HFS)

Unfortunately os.getcwd() returns different paths in the presence of 
symlinks on Mac and Linux (already realpath'd vs not). I don't have a 
good solution for this either. You have a Mac haven't you? Does it work 
for you across all platforms?

Thanks,
Stefan
On 19. Nov 2004, at 14:49, Florent Guillaume wrote:
Update of /cvs-repository/Zope
In directory cvs.zope.org:/tmp/cvs-serv20719
Modified Files:
  Tag: Zope-2_7-branch
	test.py
Log Message:
Fixed to work in the presence of symliked products or Products 
directory.

=== Zope/test.py 1.2.2.15 = 1.2.2.16 ===
--- Zope/test.py:1.2.2.15	Sat Oct 30 04:29:22 2004
+++ Zope/test.py	Fri Nov 19 08:48:59 2004
@@ -380,11 +380,12 @@
 self.cwd = os.path.realpath(os.getcwd())
 # Hack again for external products.
 if libdir:
-self.libdir = os.path.realpath(os.path.join(self.cwd, 
libdir))
+self.libdir = os.path.join(self.cwd, libdir)
 else:
-self.libdir = os.path.realpath(os.path.join(self.cwd, 
self.libdir))
-if self.libdir not in sys.path:
-sys.path.insert(0, self.libdir)
+self.libdir = os.path.join(self.cwd, self.libdir)
+real_libdir = os.path.realpath(self.libdir)
+if real_libdir not in sys.path:
+sys.path.insert(0, real_libdir)
 # Determine where to look for tests
 if test_dir:
 self.testdir = os.path.abspath(os.path.join(self.cwd, 
test_dir))

___
Zope-Checkins maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-checkins
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope-Checkins] CVS: Zope - test.py:1.2.2.16

2004-11-22 Thread Stefan H. Holek
This one does not even need symlinks (note that I run the tests from 
Products):

localhost:/Users/zope/plone27/Products$ \
 /Zope/bin/test.py -v -C ../etc/zope.conf --libdir . --dir CMFPlone
Running unit tests at level 1
Running unit tests from /Users/zope/plone27/Products/CMFPlone
Parsing /Users/zope/plone27/etc/zope.conf
--
Ran 0 tests in 0.000s
OK
I think you may at least want to abspath the libdir. Also, it seems 
that TestFileFinder uses libdir whereas you add real_libdir to the 
sys.path...

Stefan
On 22. Nov 2004, at 18:32, Florent Guillaume wrote:
b) Some combinations of --libdir and --dir and symlinks no longer 
work on Mac OS X (HFS)
Could you give detail so I can reproduce it ?
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] tests with CMF 1.4 and Zope 2.7.3

2004-11-18 Thread Stefan H. Holek
There is no bug, IMO. In CVS/SVN test.py lives in the root of Zope. 
It just stays there when you make inplace or make instance (or make 
anything for that matter). Removing it would break the checkout.

Stefan
On 18. Nov 2004, at 12:57, Lennart Regebro wrote:
Stefan H. Holek wrote:
+1 here too
Btw, Lennart, when you make install your Zope only bin/test.py will 
be installed.
OK, is the test.py in the root an artifact of make instance, or has 
that bug been fixed completely very recently? It's still there in Zope 
2.7.3, and it was still in Zope-trunk last week.

--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Was: Re: 2.7.3 beta attribute permission problems

2004-10-23 Thread Stefan H. Holek
Hi Tres!
On 22.10.2004, at 14:38, Tres Seaver wrote:
Given that the change was required to implement a security fix, and 
without a reproducible test case for the reported breakage, I don't 
think we can credit the rumors.  We *definitely* don't want to defer 
the security fix.
I still don't know what the security fix actually fixes, but that may 
well be my ignorance ;-). Your checkin message just mentions the 
removal of DWIMy code...

There is a test in CMFDefault of CMF-1_4-branch that works in 2.7.2 but 
breaks in 2_7-branch, btw. I had no luck reproducing anything like it 
with plain Zope yet, unfortunately. Let me reiterate that many a Plone 
site will likely break with 2.7.3, something I am not exactly looking 
forward to.

A clear description of the issue would certainly help, so people can at 
least scan their sources for the things that worked fine but no longer 
do. E.g. consistently using getToolByName instead of relying on 
acquisition appears to go a long way. There are pathological cases 
though, like when restrictedTraverse fails due to the new access 
control.

Thanks,
Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Product doesn't work in zope 2.7 that was working in 2.6

2004-10-14 Thread Stefan H. Holek
Note that 2.6.4 contains massive changes to the security 
implementation. I'd imagine the product you use has not been updated 
accordingly.

Stefan
On 13.10.2004, at 17:24, Nagarjuna G. wrote:
This product works perfectly till 2.6.3, starting from 2.6.4 and
upwards this problem appears.  Looking at the release notes did not
indicate any changes to the API of catalogue product.
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Bad interaction between Zope 2.7.3 and CMF 1.4

2004-10-13 Thread Stefan H. Holek
Note that I found it to be relevant which object I want to acquire 
(don't ask me why, though).

E.g. going back to my CMFDefault examples, I *can* acquire 
portal_workflow and portal_url, but I can *not* acquire 
portal_membership and acl_users from a denied context. Go figure.

If I change the test below to app.wanted = 
PartlyProtectedSimpleItem3() the test fails on current 2_7-branch ...

Stefan
On 12.10.2004, at 19:14, Tres Seaver wrote:
+def test_no_acquisition_through_paranoid(self):
+
+#  Check that acquisition through a paranoid object is not 
allowed.
+app = App()
+app.wanted = UnprotectedSimpleItem()
+app.enabling = UnprotectedSimpleItem()
+app.blocking = RestrictedSimpleItem()
+self.assertPolicyAllows(app.enabling, 'wanted')
+self.assertPolicyDenies(app.blocking, 'wanted')
+

--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Bad interaction between Zope 2.7.3 and CMF 1.4

2004-10-09 Thread Stefan H. Holek
While testing a large-ish customer project under Zope 2.7.3 we found 
that
when an object with setDefaultAccess('deny') is used as the context for
a PythonScript, the script can no longer aquire tools from the portal
root.

Because a test says more than a thousand words, I added one to 
CMFDefault.

To reproduce:
- get Zope-2_7-branch
- get CMF-1_4-branch
- run tests of CMFDefault, notably test_RestrictedAcquisition.py
Rolling back this checkin restores functionality:
http://mail.zope.org/pipermail/zope-checkins/2004-August/028152.html
Note that I was unable to reproduce the issue with CMF 1.5 (or plain 
Zope, for
that matter). What has changed? Beats me! Note that this issue has the 
potential
to break each and every Plone site out there.

Ultimately, I feel that unless there is a *very* good reason for 
removing the
aq_acquire call from cAccessControl/ImplPython it should be restored.

Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Bad interaction between Zope 2.7.3 and CMF 1.4

2004-10-09 Thread Stefan H. Holek
On 09.10.2004, at 18:04, Tres Seaver wrote:
*By definition*, anybody who has declared 'setDefaultAccess('deny') 
*wants* the behavior you describe:  that declaration says, unless I 
give you explicit permission for using a name, refuse.

If Plone has classes which make such assertions, then either the 
authors *meant* them, or they need to be removed.  This is (literally) 
the same thing as declaring 
'__allow_access_to_unprotected_subobjects__ = 0' in your class.

Plone itself doesn't AFAICS. Third party applications may, like the one 
I was talking about. The unfortunate coincidence is that these apps 
work fine with Zope up to 2.7.2.

I am of the impression that using aq_acquire in guarded_getattr does 
the right thing (by accident?). I certainly lack the Fu though.

Your test doesn't really belong in CMF, as you are arguing that the 
current implemtation in Zope is broken.

Please *don't* check such a test in on the HEAD (or branch head) until 
after this discussion is resolved.

Right, but I couldn't make it break anyplace else. Sorry. Feel free to 
remove it.

Thank you for making the case reproducible;  Richard Jones had 
reported this issue earlier, but couldn't cut it down to a simple 
case.  I will work on adding tests to AccessControl which make the 
intent clear (we can still argue about whether to keep the change).
Thank you!
Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Conditional imports in ZTUtils/__init__.py

2004-10-05 Thread Stefan H. Holek
ZTUtils/__init__.py contains code like this:
  if sys.modules.has_key('Zope'):
  # import things
This is causing me repeated headaches when writing tests, because it 
assumes/dictates a certain module import order. Can this go away, 
please? I mean we know we are running Zope, don't we?

If there are no objections I will remove the condition on 2_7-branch 
and trunk. Tests pass just fine without it.

Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Weird AssertionError on History Compare in Zope 2.7.1 PythonScript

2004-06-30 Thread Stefan H. Holek
Did you try to recompile the PythonScripts?
Stefan
On Mittwoch, Jun 30, 2004, at 18:52 Europe/Vienna, Chris Withers wrote:
I upgraded a Zope 2.6.2 site to 2.7.1.
Since then, the history tab of all my old Script(Python)'s is broken.
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Arbitrary Arguments?

2004-06-06 Thread Stefan H. Holek
ZPublisher can only fill in arguments it knows about, i.e. that are 
mentioned in the script's signature.

Stefan
On Sonntag, Jun 6, 2004, at 01:16 Europe/Vienna, Marshall Powers wrote:
So what is the deal?
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Remove BDBStorage from 2.7 branch as well?

2004-06-04 Thread Stefan H. Holek
As BDBStorage has been removed from HEAD quite some time ago, I was 
wondering whether it would be possible/advisable to remove it from 2.7 
branch as well. Would it?

Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] When is the configuration read in Zope 2.7?

2004-05-14 Thread Stefan H. Holek
I am under the impression that the ZOPE_CONFIG patch broke 2.7 branch.
Please see http://zope.org/Collectors/Zope/1233
Configuration is used very early, that's why I suggested to put the 
logic into getConfiguration.

Zope tests fail for me, unfortunately Andreas cannot reproduce this.
Stefan
On Samstag, Mai 15, 2004, at 00:54 Europe/Vienna, Chris McDonough wrote:
I've got no suggestions.  Is it broken in the 2.7 branch at the moment?
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Demonstration subversion repository created

2004-04-28 Thread Stefan H. Holek
Me too! :(

Strangely, it worked fine earlier today...

Stefan



On Mittwoch, Apr 28, 2004, at 21:01 Europe/Vienna, Jim Fulton wrote:

Hm, I can get to it from a machine outside of ZC or Zope.org.

Is anyone else haveing troubles getting to it?

Jim


--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope and zope

2004-04-15 Thread Stefan H. Holek
+0, not a problem. -1 for renaming 'Zope'.

I endorse the 'src/zope' idea.

Stefan

On Mittwoch, Apr 14, 2004, at 15:00 Europe/Vienna, Jim Fulton wrote:

Perhaps we can get more input on whether there's a problem.

A response with a positive sign (e.g. +1, +0, +2, ...) indicates
agreement that this is a probelm. :)
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] test.py + INSTANCE_HOME (proposed solution)

2004-03-29 Thread Stefan H. Holek
I have made some small modifications to test.py to allow testing in 
INSTANCE_HOMEs.
Please see: http://zope.org/Collectors/Zope/1279

An already patched version of test.py is available from here:
http://zope.org/Members/shh/TestRunner/test.py
Stefan

--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Stop Testing from changing INSTANCE_HOME (proposed solution)

2004-03-17 Thread Stefan H. Holek
I believe I have found an elegant way to stop 'import Testing' from 
changing the INSTANCE_HOME.
Please see: http://zope.org/Collectors/Zope/1260

Stefan

--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


  1   2   >