[Zope-Checkins] SVN: Zope/trunk/utilities/zpasswd.py better error message for unsupport encoding

2005-08-07 Thread Andreas Jung
Log message for revision 37766:
  better error message for unsupport encoding
  

Changed:
  U   Zope/trunk/utilities/zpasswd.py

-=-
Modified: Zope/trunk/utilities/zpasswd.py
===
--- Zope/trunk/utilities/zpasswd.py 2005-08-07 09:48:42 UTC (rev 37765)
+++ Zope/trunk/utilities/zpasswd.py 2005-08-07 12:40:19 UTC (rev 37766)
@@ -65,6 +65,8 @@
 pw = '{CRYPT}' + crypt(password, generate_salt())
 elif encoding == 'CLEARTEXT':
 pw = password
+else:
+raise ValueError('Unsupported encoding: %s' % encoding)
 
 return pw
 

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/StructuredText/ some more tests for link/links with images

2005-08-07 Thread Andreas Jung
Log message for revision 37768:
  some more tests for link/links with images
  

Changed:
  U   Zope/trunk/lib/python/StructuredText/DocumentWithImages.py
  U   Zope/trunk/lib/python/StructuredText/tests/testStructuredText.py

-=-
Modified: Zope/trunk/lib/python/StructuredText/DocumentWithImages.py
===
--- Zope/trunk/lib/python/StructuredText/DocumentWithImages.py  2005-08-07 
12:49:54 UTC (rev 37767)
+++ Zope/trunk/lib/python/StructuredText/DocumentWithImages.py  2005-08-07 
13:16:15 UTC (rev 37768)
@@ -27,7 +27,7 @@
 
 def doc_img(
 self, s,
-expr1=re.compile('\([ 
_a-zA-Z0-9*.:/;,\-\n\~]+)\:img:([a-zA-Z0-9%\_\-.:/\?=;,\n\~]+)').search,
+expr1=re.compile('\([ 
_a-zA-Z0-9*.:/;,\[\]\'\-\n\~]+)\:img:([a-zA-Z0-9%\_\-.:/\?=;,\n\~]+)').search,
 ):
 
 

Modified: Zope/trunk/lib/python/StructuredText/tests/testStructuredText.py
===
--- Zope/trunk/lib/python/StructuredText/tests/testStructuredText.py
2005-08-07 12:49:54 UTC (rev 37767)
+++ Zope/trunk/lib/python/StructuredText/tests/testStructuredText.py
2005-08-07 13:16:15 UTC (rev 37768)
@@ -211,6 +211,16 @@
 
 self._test('foo:http://www.zope.org/foo/bar?arg1=1arg2=2',
'pa 
href=http://www.zope.org/foo/bar?arg1=1arg2=2;foo/a/p')
+
+self._test('foo bar:http://www.zope.org/foo/bar',
+   'pa href=http://www.zope.org/foo/bar;foo bar/a/p')
+
+self._test('[link goes here]:http://www.zope.org/foo/bar',
+   'pa href=http://www.zope.org/foo/bar;[link goes 
here]/a/p')
+
+self._test('[Dad\'s car]:http://www.zope.org/foo/bar',
+   'pa href=http://www.zope.org/foo/bar;[Dad\'s 
car]/a/p')
+
  
 def testImgLink(self):
 self._test('foo:img:http://www.zope.org/bar.gif',
@@ -225,7 +235,15 @@
 self._test('foo:img:http://www.zope.org:8080/foo/b%20ar?arg=1',
'img src=http://www.zope.org:8080/foo/b%20ar?arg=1; 
alt=foo /')
 
+self._test('foo bar:img:http://www.zope.org:8080/foo/bar',
+   'img src=http://www.zope.org:8080/foo/bar; alt=foo bar 
/')
 
+self._test('[link goes here]:img:http://www.zope.org:8080/foo/bar',
+   'img src=http://www.zope.org:8080/foo/bar; alt=[link 
goes here] /')
+
+self._test('[Dad\'s new car]:img:http://www.zope.org:8080/foo/bar',
+   'img src=http://www.zope.org:8080/foo/bar; alt=[Dad\'s 
new car] /')
+
 def XXXtestUnicodeContent(self):
 # This fails because ST uses the default locale to get letters
 # whereas it should use \w+ and re.U if the string is Unicode.

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


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/StructuredText/ some more tests for links and links with images

2005-08-07 Thread Andreas Jung
Log message for revision 37769:
  some more tests for links and links with images
  

Changed:
  U   
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/DocumentWithImages.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/tests/testStructuredText.py

-=-
Modified: 
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/DocumentWithImages.py
===
--- 
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/DocumentWithImages.py   
2005-08-07 13:16:15 UTC (rev 37768)
+++ 
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/DocumentWithImages.py   
2005-08-07 13:21:29 UTC (rev 37769)
@@ -27,7 +27,7 @@
 
 def doc_img(
 self, s,
-expr1=re.compile('\([ 
_a-zA-Z0-9*.:/;,\-\n\~]+)\:img:([a-zA-Z0-9%\_\-.:/\?=;,\n\~]+)').search,
+expr1=re.compile('\([ 
_a-zA-Z0-9*.:/;,\[\]\'\-\n\~]+)\:img:([a-zA-Z0-9%\_\-.:/\?=;,\n\~]+)').search,
 ):
 
 

Modified: 
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/tests/testStructuredText.py
===
--- 
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/tests/testStructuredText.py
 2005-08-07 13:16:15 UTC (rev 37768)
+++ 
Zope/branches/Zope-2_8-branch/lib/python/StructuredText/tests/testStructuredText.py
 2005-08-07 13:21:29 UTC (rev 37769)
@@ -211,6 +211,16 @@
 
 self._test('foo:http://www.zope.org/foo/bar?arg1=1arg2=2',
'pa 
href=http://www.zope.org/foo/bar?arg1=1arg2=2;foo/a/p')
+
+self._test('foo bar:http://www.zope.org/foo/bar',
+   'pa href=http://www.zope.org/foo/bar;foo bar/a/p')
+
+self._test('[link goes here]:http://www.zope.org/foo/bar',
+   'pa href=http://www.zope.org/foo/bar;[link goes 
here]/a/p')
+
+self._test('[Dad\'s car]:http://www.zope.org/foo/bar',
+   'pa href=http://www.zope.org/foo/bar;[Dad\'s 
car]/a/p')
+
  
 def testImgLink(self):
 self._test('foo:img:http://www.zope.org/bar.gif',
@@ -225,7 +235,15 @@
 self._test('foo:img:http://www.zope.org:8080/foo/b%20ar?arg=1',
'img src=http://www.zope.org:8080/foo/b%20ar?arg=1; 
alt=foo /')
 
+self._test('foo bar:img:http://www.zope.org:8080/foo/bar',
+   'img src=http://www.zope.org:8080/foo/bar; alt=foo bar 
/')
 
+self._test('[link goes here]:img:http://www.zope.org:8080/foo/bar',
+   'img src=http://www.zope.org:8080/foo/bar; alt=[link 
goes here] /')
+
+self._test('[Dad\'s new car]:img:http://www.zope.org:8080/foo/bar',
+   'img src=http://www.zope.org:8080/foo/bar; alt=[Dad\'s 
new car] /')
+
 def XXXtestUnicodeContent(self):
 # This fails because ST uses the default locale to get letters
 # whereas it should use \w+ and re.U if the string is Unicode.

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


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ backported r33270 from trunk:

2005-08-07 Thread Yvo Schubbe
Log message for revision 37774:
  backported r33270 from trunk:
  - added z3 - z2 interface bridge

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
  A   Zope/branches/Zope-2_8-branch/lib/python/Interface/bridge.py
  A   Zope/branches/Zope-2_8-branch/lib/python/Interface/tests/bridge.txt
  A   Zope/branches/Zope-2_8-branch/lib/python/Interface/tests/framework.py
  A   Zope/branches/Zope-2_8-branch/lib/python/Interface/tests/test_bridge.py

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-08-07 17:01:41 UTC 
(rev 37773)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-08-07 18:07:31 UTC 
(rev 37774)
@@ -24,6 +24,12 @@
 
   after Zope 2.8.1 b1 
 
+Features added
+
+  - Interface: Added Z3 - Z2 bridge utilities.
+This allows to migrate interfaces to Zope 3 style interfaces and
+bridge them back to oldstyle interfaces for backwards compatibility.
+
 Bugs Fixed
 
   - Zope2.Startup.zopectl: fork before execv when running unit tests

Copied: Zope/branches/Zope-2_8-branch/lib/python/Interface/bridge.py (from rev 
33270, Zope/trunk/lib/python/Interface/bridge.py)

Copied: Zope/branches/Zope-2_8-branch/lib/python/Interface/tests/bridge.txt 
(from rev 33270, Zope/trunk/lib/python/Interface/tests/bridge.txt)

Copied: Zope/branches/Zope-2_8-branch/lib/python/Interface/tests/framework.py 
(from rev 33270, Zope/trunk/lib/python/Interface/tests/framework.py)

Copied: Zope/branches/Zope-2_8-branch/lib/python/Interface/tests/test_bridge.py 
(from rev 33270, Zope/trunk/lib/python/Interface/tests/test_bridge.py)

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


[Zope-Checkins] SVN: Zope/trunk/doc/CHANGES.txt after backporting to the Zope-2_8-branch (r37774) this is no longer 'Trunk only'

2005-08-07 Thread Yvo Schubbe
Log message for revision 37775:
  after backporting to the Zope-2_8-branch (r37774) this is no longer 'Trunk 
only'

Changed:
  U   Zope/trunk/doc/CHANGES.txt

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2005-08-07 18:07:31 UTC (rev 37774)
+++ Zope/trunk/doc/CHANGES.txt  2005-08-07 18:11:00 UTC (rev 37775)
@@ -30,10 +30,6 @@
 and ZCTextIndex: Added some Zope 3 style interfaces.
 This makes the bridged interfaces shipped with Five obsolete.
 
-  - Interface: Added Z3 - Z2 bridge utilities.
-This allows to migrate interfaces to Zope 3 style interfaces and
-bridge them back to oldstyle interfaces for backwards compatibility.
-
   - ZConfig extension, address now also accepts symbolic port names
 from etc/services (unix) or etc\services (win32)
 

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


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ Collector 1860: use an optimistic savepoint in CopySupport._getCopy

2005-08-07 Thread Tim Peters
Log message for revision 37781:
  Collector 1860:  use an optimistic savepoint in CopySupport._getCopy
  (there's no possiblity of rollback here, so no need to insist that the
  data manager support rollbacks).
  
  The other part of this change is in ZODB 3.4.1b4, also stitched in
  by this checkin.
  

Changed:
  _U  Zope/branches/Zope-2_8-branch/doc/
  _U  Zope/branches/Zope-2_8-branch/lib/python/
  U   Zope/branches/Zope-2_8-branch/lib/python/OFS/CopySupport.py
  _U  Zope/branches/Zope-2_8-branch/utilities/

-=-

Property changes on: Zope/branches/Zope-2_8-branch/doc
___
Name: svn:externals
   - ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/doc/ZEO

   + ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/doc/ZEO



Property changes on: Zope/branches/Zope-2_8-branch/lib/python
___
Name: svn:externals
   - zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1

   + zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1


Modified: Zope/branches/Zope-2_8-branch/lib/python/OFS/CopySupport.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/OFS/CopySupport.py 2005-08-07 
21:42:33 UTC (rev 37780)
+++ Zope/branches/Zope-2_8-branch/lib/python/OFS/CopySupport.py 2005-08-07 
23:00:21 UTC (rev 37781)
@@ -461,7 +461,7 @@
 # 1) Make sure the data about to be exported is current
 # 2) Ensure self._p_jar and container._p_jar are set even if
 #either one is a new object
-transaction.savepoint()
+transaction.savepoint(optimistic=True)
 
 if self._p_jar is None:
 raise CopyError, (


Property changes on: Zope/branches/Zope-2_8-branch/utilities
___
Name: svn:externals
   - ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/scripts

   + ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/scripts


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


[Zope-Checkins] SVN: Zope/trunk/ Merge rev 37781 from 2.8 branch.

2005-08-07 Thread Tim Peters
Log message for revision 37782:
  Merge rev 37781 from 2.8 branch.
  
  Collector 1860:  use an optimistic savepoint in CopySupport._getCopy
  (there's no possiblity of rollback here, so no need to insist that the
  data manager support rollbacks).
  
  The other part of this change is in ZODB 3.4.1b4, also stitched in
  by this checkin.
  

Changed:
  _U  Zope/trunk/doc/
  _U  Zope/trunk/lib/python/
  U   Zope/trunk/lib/python/OFS/CopySupport.py
  _U  Zope/trunk/utilities/

-=-

Property changes on: Zope/trunk/doc
___
Name: svn:externals
   - ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/doc/ZEO

   + ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/doc/ZEO



Property changes on: Zope/trunk/lib/python
___
Name: svn:externals
   - zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1

   + zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1


Modified: Zope/trunk/lib/python/OFS/CopySupport.py
===
--- Zope/trunk/lib/python/OFS/CopySupport.py2005-08-07 23:00:21 UTC (rev 
37781)
+++ Zope/trunk/lib/python/OFS/CopySupport.py2005-08-07 23:40:23 UTC (rev 
37782)
@@ -466,7 +466,7 @@
 # 1) Make sure the data about to be exported is current
 # 2) Ensure self._p_jar and container._p_jar are set even if
 #either one is a new object
-transaction.commit(1)
+transaction.savepoint(optimistic=True)
 
 if self._p_jar is None:
 raise CopyError, (


Property changes on: Zope/trunk/utilities
___
Name: svn:externals
   - ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b3/src/scripts

   + ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.1b4/src/scripts


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


Re: [Zope-PAS] auth fallback with cookies

2005-08-07 Thread Kapil Thangavelu
make the cookie auth plugin push form credentials into the the request 
as basic auth headers ala cookie crumbler.

-k

On Jul 26, 2005, at 4:09 PM, J Cameron Cooper wrote:

Say I have a user in a root acl_users folder (call it 'admin'). I also 
have a PAS user folder in a sub-object of the root. This PAS is 
configured to do cookie auth, and users will typically login using a 
form.


Now, if I try to log in as 'admin' in that form, it doesn't work. I 
think this is why:


 - credentials are supplied via a form to the PAS cookie auth plugin

 - there is no such user, so it fails

 - 'validate' returns None, so Zope goes to the next user folder 
(which the basic in the root where 'admin' lives)


 - that one tries to validate but gets nothing: it looks for HTTP 
basic credentials, but finds nothing, since login is form based


Does this sound about right? Anybody have a strategy to get around 
this?


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

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


[Zope] CMF 1.5.3 released

2005-08-07 Thread Jens Vagelpohl

The CMF developer community and Zope Corporation are pleased to
announce the release of version 1.5.3 of the Zope Content Management
Framework (CMF). This release marks the latest stable release in the
CMF 1.5 series and should be suitable for production use.

What is the CMF?

The Zope Content Management Framework provides a set of
services and content objects useful for building highly
dynamic, content-oriented portal sites.  As packaged, the
CMF generates a site much like the Zope.org site.  The CMF is
intended to be easily customizable, in terms of both the
types of content used and the policies and services it
provides.

Where do I get it?

Download it from http://zope.org/Products/CMF/CMF-1.5.3

Points of interest include:

- Windows ZIP file,
  http://zope.org/Products/CMF/CMF-1.5.3/CMF-1.5.3.zip

- Unix tar/gzip archive,
  http://zope.org/Products/CMF/CMF-1.5.3/CMF-1.5.3.tar.gz

- Release notes,
  http://zope.org/Products/CMF/CMF-1.5.3/README.txt

- Change history,
  http://zope.org/Products/CMF/CMF-1.5.3/CHANGES.txt

- Installation instructions,
  http://zope.org/Products/CMF/CMF-1.5.3/INSTALL.txt

Where do I go to learn more?

The CMF mailing list:mailto:[EMAIL PROTECTED] has many
participants who are active in supporting the CMF.

...to report bugs?

The CMF Collector:http://zope.org/Collectors/CMF
is ths place to report bugs (please search for existing
reports of your issue first!)


-
Jens Vagelpohl
[EMAIL PROTECTED]

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

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


[Zope] Metaclasses in ZOPE Products

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

What do I need to do to derive a new base class for my products from
item that defines its own meta class? There's a whole mess of code in
the Zope source code that deals with meta classes, but nothing I can
actually identify as the thing to do.

I am deriving from SimpleItem at the moment. Currently, I use a meta
class derived from type, but this doesn't work:

  File E:\Python23\lib\fliwas\ccitem.py, line 54, in ?
class CCItem(SimpleItem):
  File E:\Python23\lib\fliwas\ccmethods.py, line 38, in __new__
return type.__new__(cls, name, bases, classdict)
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-s
trict) subclass of the metaclasses of all its bases

I'm guessing that using a certain base class for my meta class should
work, but the documentation doesn't say (as far as I can find out).

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


Re: [Zope] Metaclasses in ZOPE Products

2005-08-07 Thread Andreas Jung



--On 7. August 2005 19:02:51 +0200 Jan-Ole Esleben [EMAIL PROTECTED] 
wrote:



Hi!

What do I need to do to derive a new base class for my products from
item that defines its own meta class? There's a whole mess of code in
the Zope source code that deals with meta classes, but nothing I can
actually identify as the thing to do.

I am deriving from SimpleItem at the moment. Currently, I use a meta
class derived from type, but this doesn't work:

  File E:\Python23\lib\fliwas\ccitem.py, line 54, in ?
class CCItem(SimpleItem):
  File E:\Python23\lib\fliwas\ccmethods.py, line 38, in __new__
return type.__new__(cls, name, bases, classdict)
TypeError: metaclass conflict: the metaclass of a derived class must be a
(non-s trict) subclass of the metaclasses of all its bases



I don't know much about meta-classes but I think you require new-style 
classes for working with meta-classes. This implies that you need at least 
Zope 2.8 since new-style classes conflict with Zope ExtensionClasses in 
pre-Zope 2.8 versions.


-aj

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


[Zope] REStructuredText and Title

2005-08-07 Thread Justin Fletcher




I am adding ReStructuredText documents through the ZMI and I noticed that I am unable to set the 'Title' attribute. Am I missing something? When adding a document the 'ID' also shows up in the 'Title' section, and I can't find a way through the interface to change the 'Title'.

Perhaps there is a way to hack it in?

Any help, tips, or pointers would be appreciated.

Platform: (Zope 2.7.5-final, python 2.3.5, freebsd5)

Thanks,
-Justin


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


Re: [Zope] Pluggable Brains

2005-08-07 Thread Dieter Maurer
David H wrote at 2005-8-6 13:12 -0700:
I've been using pluggable brains in some zSQL classes.  I have some 
questions!

a)  It seems if I initialize a variable in the __init__ method that 
variable, say self.callCount = 1 is not retained across calls, eg

For efficiency reasons, the result row objects of Z SQL methods
do not have a dict. Therefore, you cannot create new attributes
for them.

Your brain classes derive from such objects and therefore, too, lack
a dict.

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


Re: [Zope] AttributeError in DocFinder 1.0.3

2005-08-07 Thread Dieter Maurer
Kate Legere wrote at 2005-8-5 15:04 -0400:
I've installed DocFinder 1.0.3 but I'm getting an error when I try to
instantiate.
 ...
Exception Type AttributeError
Exception Valuestandard_template.pt

standard_template.pt is one of the standard objects you should
find in your Zope Root Folder (in the ZMI).
Its companions are standard_error_message, standard_html_footer
and standard_html_header.

Maybe, your Zope instance is very old (from a time when
standard_template.pt was not yet created).

standard_template.pt is a Page Template with the following
content:

html metal:define-macro=page
  head
   metal:block define-slot=head
   title tal:content=template/titleThe Title/title
   /metal:block
  /head
  body 
div metal:define-slot=body
This is where the page's body text goes. abc
/div
  /body
/html


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


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Dieter Maurer
Maciej Wisniowski wrote at 2005-8-5 23:37 +0200:
 Do you see a reason why your requests modify Procedure instances?
 I find this strange: I would expect that they are rarely modified
 (just once to set them up).
It's possibly because of _connect method in DCOracle2 SP.py. It 
assigns to self _v_proc, connection, and errors count.

Assignments to _v_ attributes (they are so called volatile
attributes) do not change the persistent state and cannot cause
conflicts.

There must be some other modification to the procedure objects.

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


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Tim Peters
[Maciej Wisniowski, wrestling with  _p_resolveConflict]
 Because of errors like:

 ConflictError: database conflict error (oid 0x0299de, class
 Products.DCOracle2.DA.Procedure, serial this txn started with
  0x035f0726c7bfca88 2005-08-01 08:38:46.816215, serial currently
 committed 0x035f072fed78ebee 2005-08-01 08:47:55.657582)
 
 and according to:
 http://www.upfrontsystems.co.za/Members/jean/conflicterrors-explained
 I've added:
 
 def _p_resolveConflict(self, old, saved, new):
print 'old:', old
print 'saved:', saved
print 'new:', new
return new
 
 to SP.py into procedure class (DA.Procedure extends this),
 
 I've started Zope with runzope and there are no 'old':?, 'new':?,
 'saved:?' statements at all on the console although other print
 statements from SP.Procedure are visible.

 Maybe these conflict errors I'm dealing with are different kind and
 are not falling into the correct piece of code or maybe this kind
 of test (print 'something') is too stupid to see if _p_resolveConflict
 is executed?

Offhand it looks OK to me, but I don't have any of the code you're
using.  If you want to dig deeper, look into what happens inside

lib/python/ZODB/ConflictResolution.py

in function tryToResolveConflict().  If your _p_resolveConflict() were
getting called, you would see the print output you coded.  Therefore
it's not getting called.  tryToResolveConflict() is what _tries_ to
call it (assuming that for an instance `object` of this type,
getattr(object, _p_resolveConflict, None) returns a non-None value
to begin with, which I can't tell for sure from what you've said).
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Need to find RSS product

2005-08-07 Thread Leticia Larrosa
Hi all:

Any recommendation for a RSS product. Indeed what i want is a client to 
obtain information from a RSS server and present this in a page.

Thanks in advanced !!!




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


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Maciej Wisniowski



Assignments to _v_ attributes (they are so called volatile
attributes) do not change the persistent state and cannot cause
conflicts.

There must be some other modification to the procedure objects.

 


I should have written:

It's possibly because of _connect method in DCOracle2 SP.py.
It assigns values to self._v_proc, self.connection
and self.errors. So except '_v_proc' there are 'connection' 
and 'errors' variables that are being assigned to. 
Maybe this it's because of them.


--
Maciej Wisniowski


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

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


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Maciej Wisniowski



Offhand it looks OK to me, but I don't have any of the code you're
using.  


I think that it's not my code problem but rather something with
DCOracle2 and to reproduce this error it is enough to call
any 'DCOracle2 StoredProcedure' object simultaneously
by a lot of users (50 is enough for my Zope (ZEO) to cause these
errors).


If you want to dig deeper, look into what happens inside
   lib/python/ZODB/ConflictResolution.py


I'll try to check this, thanks for the hint. :)

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

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


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Tim Peters
[Tim Peters]
 Offhand it looks OK to me, but I don't have any of the code you're
 using.

[Maciej Wisniowski]
 I think that it's not my code problem but rather something with
 DCOracle2 and to reproduce this error it is enough to call
 any 'DCOracle2 StoredProcedure' object simultaneously
 by a lot of users (50 is enough for my Zope (ZEO) to cause these
 errors).

Sorry, I'm not making myself clear:  I don't have _any_ of the code
you're using, including DCOracle2.  I don't use it -- and I don't have
time to try to figure out how to use it.  But I know the code paths in
ZODB on the way toward calling _p_resolveConflict, and if I did have
the code you were using, this is what I'd do:

 If you want to dig deeper, look into what happens inside
lib/python/ZODB/ConflictResolution.py
 
 I'll try to check this, thanks for the hint. :)

It's the only way you'll figure it out ;-)
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )