[Zope] Zwiki contributor policy update

2005-12-11 Thread Simon Michael




Hi all!


I'm slightly burned out and bored with certain areas of Zope 2 Zwiki
development. I think the product will provide some value for a while
yet, and it's not too late to shake things up and make a bigger splash.
If we don't do this during the period of Zwiki  Zope 2's
relevance, our good work will bring less benefit than it might have. So
I'm putting out a call for help. I'd really like to see more people
take on development of Zwiki.

What are the roadblocks - of my making, and otherwise - to a more
active Zwiki developer community ?
For one thing I needed to nail down some copyright/license issues more
explicitly, to make contributing and accepting contributions more of a
no-brainer. Here's my latest thinking:
LICENSE
Much Zope code uses the ZPL. We want to maximize code sharing and
participation with the whole Zope community. Much of the rest of the
FOSS world uses the GPL, and the same goes for them. Dual GPL/ZPL
licensing may seem a good option, but I'm convinced it's not worth the
added complexity, legal uncertainty and fragmentation; either straight
GPL or straight ZPL is preferable.
GPL is the mainstream license for the future IMHO, I think it's still
the best option, and I have no plan to leave it. Also I think we
should adopt GPLv3? when it's ready. That said, there's now
clear policy allowing non-GPL code to be added
to Zwiki if necessary (below). Also I remain open to license
exemption requests from Zope developers.
COPYRIGHT
I no longer think the single copyright holder policy is best for
this
project, and I'm going to drop it. I am changing the main repo's
policy to multiple copyright holders ( allowing multiple
licenses),
with the simple condition that the overall project manager is assigned
the right to relicense to newer license versions. The powerful darcs
revision control system (together with new CONTRIBUTORS list) should
help us to keep track of copyright  licensing status and even
remove
problematic commits later if needed.
CONTRIBUTOR'S AGREEMENT
To ensure that everyone gets proper credit for their work; a clear
audit trail and legal status for the project; and that the project can
remain license-compatible with other free  open-source software in
future, I have added a very simple contributor agreement/contributor
list: http://zwiki.org/repos/ZWiki/CONTRIBUTORS.txt
. All Zwiki contributors should read and consider signing this file, to
help us meet these goals. You can follow this easy procedure to add
your name to the glorious list:

 (install darcs if needed, see http://darcs.net/DarcsWiki/CategoryBinaries)
 darcs get --partial http://zwiki.org/repos/ZWiki
 cd ZWiki
 echo "- Your Name [EMAIL PROTECTED]" CONTRIBUTORS.txt
 darcs record -a -m"signed it" CONTRIBUTORS.txt
 (enter your name  email address again)
 darcs send 



This will become the authoritative list of code committers (at least),
and I'll be working to make sure all of you are listed properly. Many
have donated their time and creativity over the years - this list will
make that clearer.

All comments, help and other ideas welcome. And I hope to see some of
you online or off. Happy holidays, and thanks 

-Simon


___
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] XML-RPC within ZOPE

2005-12-11 Thread Jan-Ole Esleben
Hi!

Is it at all impossible to use XML-RPC _within_ a ZOPE architecture?

What I mean is:
I have a nested call structure:

1. Python script calls a method from a ZODB object
2. That method calls a Python module function
3. That module function dispatches an XML-RPC call to the same ZODB
object called in step 1
4. This last call, which is rather complex, returns, and all the calls
leading up to it return, sometimes doing some minor work

When I use the same code _without_ any XML-RPC (the Zope server's self
instead of the XML-RPC server object for that server), it works just
fine. When I use XML-RPC, I get a ConflictError during the final
return (from step 1), and I get it if I commit manually beforehand, so
it must be the commit triggering it.

The tricky thing is: nothing in my ZODB changes. I have several
mutable _arguments_ that are passed on, but they are not default
arguments and they don't get written to the ZODB.

Is what I'm trying to do impossible for some reason? Or can I just
make the whole call take place outside any transactions?

Thanks in advance for any pointers, I'm really a little desparate at this point.
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 )


[Zope] Re: live dtml updating?

2005-12-11 Thread Rich Harley
On Sunday 11 December 2005 22:30, you wrote:
  Hi all
 
  Sorry if this is not a specific zope question but I'm confident someone
  will be able to help me with the following.
 
  I have an input form on a webpage and below it a table which pulls out of
  a database. The column headers in the table relate to the input form in
  that I want whatever the user types into the input box for the correct
  column to be highlighted in bold. So say, for example I had two columns A
  and B I want column B to be highlighted bold when the user types 'b' into
  the input box

 at

  the top. How can I do this?

 Rich

-- 
www.horsey.tk

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


Re: [Zope] Re: live dtml updating?

2005-12-11 Thread Jonathan
This is client side processing (could be done via repetitive calls to the 
server, but very inefficient), so you want a javascript-type of solution. 
Not a zope solution.


Trying googling 'javascript dynamic lists'... it should get you going in the 
right direction.


Jonathan


- Original Message - 
From: Rich Harley [EMAIL PROTECTED]

To: zope@zope.org
Sent: Sunday, December 11, 2005 5:31 PM
Subject: [Zope] Re: live dtml updating?



On Sunday 11 December 2005 22:30, you wrote:

 Hi all

 Sorry if this is not a specific zope question but I'm confident someone
 will be able to help me with the following.

 I have an input form on a webpage and below it a table which pulls out 
 of

 a database. The column headers in the table relate to the input form in
 that I want whatever the user types into the input box for the correct
 column to be highlighted in bold. So say, for example I had two columns 
 A
 and B I want column B to be highlighted bold when the user types 'b' 
 into

 the input box

at

 the top. How can I do this?

Rich


--
www.horsey.tk

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




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

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


Re: [Zope] Re: live dtml updating?

2005-12-11 Thread David H

Jonathan wrote:

This is client side processing (could be done via repetitive calls to 
the server, but very inefficient), so you want a javascript-type of 
solution. Not a zope solution.


Trying googling 'javascript dynamic lists'... it should get you going 
in the right direction.


Jonathan


- Original Message - From: Rich Harley [EMAIL PROTECTED]
To: zope@zope.org
Sent: Sunday, December 11, 2005 5:31 PM
Subject: [Zope] Re: live dtml updating?



On Sunday 11 December 2005 22:30, you wrote:


 Hi all

 Sorry if this is not a specific zope question but I'm confident 
someone

 will be able to help me with the following.

 I have an input form on a webpage and below it a table which pulls 
out  of
 a database. The column headers in the table relate to the input 
form in
 that I want whatever the user types into the input box for the 
correct
 column to be highlighted in bold. So say, for example I had two 
columns  A
 and B I want column B to be highlighted bold when the user types 
'b'  into

 the input box

at

 the top. How can I do this?

Rich



--
www.horsey.tk


Rich,

Or you can try using CSS  + (javascript and DOM object style 
attributes).  Where you use javascript to give a 
document.someform.someInput.style the ID of an existing CSS style maybe 
onBlur  Not sure if it will do it all but its a place to look as well.

David

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

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


Re: [Zope] Re: live dtml updating?

2005-12-11 Thread David H

David H wrote:


Jonathan wrote:

This is client side processing (could be done via repetitive calls to 
the server, but very inefficient), so you want a javascript-type of 
solution. Not a zope solution.


Trying googling 'javascript dynamic lists'... it should get you going 
in the right direction.


Jonathan


- Original Message - From: Rich Harley 
[EMAIL PROTECTED]

To: zope@zope.org
Sent: Sunday, December 11, 2005 5:31 PM
Subject: [Zope] Re: live dtml updating?



On Sunday 11 December 2005 22:30, you wrote:


 Hi all

 Sorry if this is not a specific zope question but I'm confident 
someone

 will be able to help me with the following.

 I have an input form on a webpage and below it a table which 
pulls out  of
 a database. The column headers in the table relate to the input 
form in
 that I want whatever the user types into the input box for the 
correct
 column to be highlighted in bold. So say, for example I had two 
columns  A
 and B I want column B to be highlighted bold when the user types 
'b'  into

 the input box

at

 the top. How can I do this?

Rich




--
www.horsey.tk


Rich,

Or you can try using CSS  + (javascript and DOM object style 
attributes).  Where you use javascript to give a 
document.someform.someInput.style the ID of an existing CSS style 
maybe onBlur  Not sure if it will do it all but its a place to look 
as well.

David

Let me correct myself -  use onBlur to trigger JS + CSS and object 
style manipulation -

If interested or this sounds like what you want to do then go to:

http://www.quirksmode.org/

And check out the JavaScript/DHTML section.

Best,
David


re something like:
style type=text/css
#
David

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

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


Re: [Zope] XML-RPC within ZOPE

2005-12-11 Thread Jan-Ole Esleben
 It really *is* in your interests to ensure a single request completes
 all your functional requirements ;)

That's not possible unfortunately. The design of the system is rather
complex, and unalterable in this respect. However, it is not true that
it is usually possible to fulfil this requirement. What of programs
running on an operating system that call other programs via that
operating system?

Given that that is a requirement that needs to be met, do I have any options?

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] XML-RPC within ZOPE

2005-12-11 Thread Jan-Ole Esleben
OK, the following is the case:

The setup is for functions dispatching either locally or via XML-RPC.
At the moment, the mechanism I use is to detect locality is flawed and
thus doesn't work well. So I have local XML-RPC calls where I could
have global ones. But.

1. I need that possibility for testing the XML-RPC setup. I cannot set
up multiple instances for every cheap test. At least I shouldn't have
to. The very important reason, however, is:
2. This is a generic call dispatcher. It is used, for example, for
object name resolution in a widely deployed system. So, what could
happen and couldn't happen locally is this:

1. Server1 dispatcher calls, via XML-RPC, Server2.
2. Server2 dispatcher calls Server1, which does something locally
(same communication management object as the dispatcher, maybe another
local call) and then returns

This is the same problem spread out over two servers, where locality
isn't possible anymore. The call from Server1 to Server2 must be made
via XML-RPC and I cannot exclude Server2 calling Server1 back.

Does this make it a little more of a real problem?

Ole


2005/12/12, Alan Milligan [EMAIL PROTECTED]:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jan-Ole Esleben wrote:
 It really *is* in your interests to ensure a single request completes
 all your functional requirements ;)
 
 
  That's not possible unfortunately. The design of the system is rather
  complex, and unalterable in this respect. However, it is not true that
  it is usually possible to fulfil this requirement. What of programs
  running on an operating system that call other programs via that
  operating system?
 

 I don't believe you.

 You have a client application calling your Zope server's  bla()
 function.  It can do this either by HTTP or XML-RPC by choosing the
 appropriate Content-Type.

 You've chosen to implement this interface by making other XML-RPC calls
 to the same server to complete the task.  This is both unnecessary and
 bad.  Unnecessary because you're doing an RPC when you've got all you
 need in local memory.  This is bad because you're introducing the
 additional overhead of setting up said RPC.  Worse, you're now
 responsible for your own transaction management because you've split the
 task across multiple ZODB connections.

 You need to think about the *correct* way to write your bla() function.
  In doing this, you want to be able to take advantage of the automatic
 rollback facilities of Zope by keeping all of this in one transaction,
 which will also avoid your initial problem of conflict errors.

 Alan

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.6 (GNU/Linux)
 Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

 iD8DBQFDnNZcCfroLk4EZpkRArTDAJ96TGwDy047D09jkmRNbGyD7e+3QgCg0aNZ
 lLo0znXi4qvXr5j4SseH2k8=
 =hu4V
 -END PGP SIGNATURE-

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


[Zope-Checkins] SVN: Zope/trunk/doc/CHANGES.txt

2005-12-11 Thread Andreas Jung
Log message for revision 40687:
  

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

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2005-12-11 08:42:50 UTC (rev 40686)
+++ Zope/trunk/doc/CHANGES.txt  2005-12-11 08:44:31 UTC (rev 40687)
@@ -26,6 +26,9 @@
 
 Features added
 
+  - OFS.content_types: moved code to zope.app.content_types and added
+method aliases
+
   - ObjectManager now has an hasObject method to test presence. This
 brings it in line with BTreeFolder.
 

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/zope/ updated to latest Z3 trunk

2005-12-11 Thread Andreas Jung
Log message for revision 40688:
  updated to latest Z3 trunk
  

Changed:
  _U  Zope/trunk/lib/python/zope/

-=-

Property changes on: Zope/trunk/lib/python/zope
___
Name: svn:externals
   - app  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app
cachedescriptors -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/cachedescriptors
component-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/component
configuration-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/configuration
documenttemplate -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/documenttemplate
event-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/event
exceptions   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/exceptions
hookable -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/hookable
i18n -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18n
i18nmessageid-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18nmessageid
interface-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/interface
modulealias  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/modulealias
pagetemplate -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/pagetemplate
proxy-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy
publisher-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/publisher
schema   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/schema
security -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/security
server   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/server
structuredtext   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/structuredtext
tal  -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tal
tales-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tales
testing  -r 39830 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
thread   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/thread
deprecation  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/deprecation
dottedname   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/dottedname
formlib  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/formlib
index-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/index
testbrowser  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/testbrowser

   + app  -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app
cachedescriptors -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/cachedescriptors
component-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/component
configuration-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/configuration
documenttemplate -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/documenttemplate
event-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/event
exceptions   -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/exceptions
hookable -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/hookable
i18n -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18n
i18nmessageid-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18nmessageid
interface-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/interface
modulealias  -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/modulealias
pagetemplate -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/pagetemplate
proxy-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy
publisher-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/publisher
schema   -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/schema
security -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/security
server   -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/server
structuredtext   -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/structuredtext
tal  -r 40659 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tal
tales-r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tales
testing  -r 39830 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
thread   -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/thread
deprecation  -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/deprecation
dottedname   -r 40659 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/dottedname
formlib  -r 40659 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/zope/ updated Z3 trunk

2005-12-11 Thread Andreas Jung
Log message for revision 40690:
  updated Z3 trunk
  

Changed:
  _U  Zope/branches/ajung-zpt-integration/lib/python/zope/

-=-

Property changes on: Zope/branches/ajung-zpt-integration/lib/python/zope
___
Name: svn:externals
   - app  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app
cachedescriptors -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/cachedescriptors
component-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/component
configuration-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/configuration
documenttemplate -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/documenttemplate
event-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/event
exceptions   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/exceptions
hookable -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/hookable
i18n -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18n
i18nmessageid-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18nmessageid
interface-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/interface
modulealias  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/modulealias
pagetemplate -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/pagetemplate
proxy-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy
publisher-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/publisher
schema   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/schema
security -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/security
server   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/server
structuredtext   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/structuredtext
tal  -r 40549 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tal
tales-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tales
testing  -r 39830 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
thread   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/thread
deprecation  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/deprecation
dottedname   -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/dottedname
formlib  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/formlib
index-r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/index
testbrowser  -r 40549 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/testbrowser

   + app  -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app
cachedescriptors -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/cachedescriptors
component-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/component
configuration-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/configuration
documenttemplate -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/documenttemplate
event-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/event
exceptions   -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/exceptions
hookable -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/hookable
i18n -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18n
i18nmessageid-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18nmessageid
interface-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/interface
modulealias  -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/modulealias
pagetemplate -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/pagetemplate
proxy-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy
publisher-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/publisher
schema   -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/schema
security -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/security
server   -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/server
structuredtext   -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/structuredtext
tal  -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tal
tales-r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tales
testing  -r 39830 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
thread   -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/thread
deprecation  -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/deprecation
dottedname   -r 40688 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/dottedname
formlib  -r 40688 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/__init__.py cleanup

2005-12-11 Thread Andreas Jung
Log message for revision 40691:
  cleanup
  

Changed:
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/__init__.py

-=-
Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/__init__.py
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/__init__.py 
2005-12-11 09:40:24 UTC (rev 40690)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/__init__.py 
2005-12-11 09:47:00 UTC (rev 40691)
@@ -11,14 +11,10 @@
 #
 ##
 
-__doc__='''Package wrapper for Page Templates
+__doc__=  Zope Page Templates (mostly a wrapper around the Zope 3
+ ZPT implementation.
+ 
 
-This wrapper allows the Page Template modules to be segregated in a
-separate package.
-
-$Id: __init__.py 40218 2005-11-18 14:39:19Z andreasjung $'''
-__version__='$$'[11:-2]
-
 # Placeholder for Zope Product data
 misc_ = {}
 

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


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py.scary added

2005-12-11 Thread Andreas Jung
Log message for revision 40693:
  added
  

Changed:
  A   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py.scary

-=-
Added: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py.scary
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py.scary
2005-12-11 09:48:04 UTC (rev 40692)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py.scary
2005-12-11 11:06:41 UTC (rev 40693)
@@ -0,0 +1,446 @@
+##
+#
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
+##
+
+ Zope Page Template module (wrapper for the Zope 3 ZPT implementation) 
+
+__version__='$Revision: 1.48 $'[11:-2]
+
+import re
+from urllib import quote
+import os, AccessControl, Acquisition 
+from Globals import ImageFile, package_home, InitializeClass
+from OFS.SimpleItem import SimpleItem
+from OFS.content_types import guess_content_type
+from DateTime.DateTime import DateTime
+from Shared.DC.Scripts.Script import Script 
+from Shared.DC.Scripts.Signature import FuncCode
+from AccessControl import getSecurityManager
+
+from OFS.History import Historical, html_diff
+from OFS.Cache import Cacheable
+from OFS.Traversable import Traversable
+from OFS.PropertyManager import PropertyManager
+
+from Products.PageTemplates.Expressions import SecureModuleImporter
+
+from AccessControl import Unauthorized
+from AccessControl.Permissions import view, ftp_access, change_page_templates, 
view_management_screens
+
+from webdav.Lockable import ResourceLockedError
+from webdav.WriteLockInterface import WriteLockInterface
+from zope.pagetemplate.pagetemplate import PageTemplate 
+
+# regular expression to extract the encoding from the XML preamble
+encoding_reg= re.compile('\?xml.*?encoding=(.*?).*?\?', re.M)
+
+class Src(Acquisition.Explicit):
+ I am scary code 
+
+index_html = None
+PUT = document_src = Acquisition.Acquired
+
+def __before_publishing_traverse__(self, ob, request):
+if getattr(request, '_hacked_path', 0):
+request._hacked_path = 0
+
+def __call__(self, REQUEST, RESPONSE):
+ 
+return self.document_src(REQUEST)
+
+
+def sniffEncoding(text, default_encoding='utf-8'):
+ try to determine the encoding from html or xml 
+
+# XXX: look at pagetemplates.py (BOM!!!)
+if text.startswith('?xml'):
+mo = encoding_reg.search(text)
+if mo:
+return mo.group(1)
+return default_encoding
+
+_default_content_fn = os.path.join(package_home(globals()), 'pt', 
'default.html')
+
+
+class ZPT(Script, PageTemplate, Historical, Cacheable,
+   Traversable, PropertyManager):
+ Z2 wrapper class for Zope 3 page templates 
+
+__implements__ = (WriteLockInterface,)
+
+meta_type = 'ZPT'
+
+func_defaults = None
+func_code = FuncCode((), 0)
+
+_default_bindings = {'name_subpath': 'traverse_subpath'}
+
+manage_options = (
+{'label':'Edit', 'action':'pt_editForm',
+ 'help': ('PageTemplates', 'PageTemplate_Edit.stx')},
+{'label':'Test', 'action':'ZScriptHTML_tryForm'},
+) + PropertyManager.manage_options \
++ Historical.manage_options \
++ SimpleItem.manage_options \
++ Cacheable.manage_options
+
+
+_properties=({'id':'title', 'type': 'ustring', 'mode': 'w'},
+ {'id':'content_type', 'type':'string', 'mode': 'w'},
+ {'id':'expand', 'type':'boolean', 'mode': 'w'},
+ )
+
+security = AccessControl.ClassSecurityInfo()
+security.declareObjectProtected(view)
+security.declareProtected(view, '__call__')
+
+def __init__(self, id, text=None, content_type=None, encoding='utf-8'):
+self.id = id
+self.ZBindings_edit(self._default_bindings)
+self.pt_edit(text, content_type, encoding)
+
+security.declareProtected(change_page_templates, 'pt_encoding')
+def pt_encoding(self):
+encoding = sniffEncoding(self.read())
+return encoding
+
+# Use the encoding of the document as encoding for the ZMI to 
+# avoid any kind of encoding troubles
+from ComputedAttribute import ComputedAttribute
+management_page_charset = ComputedAttribute(pt_encoding, 1)
+
+security.declareProtected(change_page_templates, 'pt_edit')
+def pt_edit(self, text, content_type, 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py This version is now fully functional and without dependencies from Products.PageTemplates

2005-12-11 Thread Andreas Jung
Log message for revision 40698:
  This version is now fully functional and without dependencies from 
Products.PageTemplates
  

Changed:
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
  D   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py.scary

-=-
Modified: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-11 11:21:09 UTC (rev 40697)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-11 12:02:36 UTC (rev 40698)
@@ -16,36 +16,41 @@
 __version__='$Revision: 1.48 $'[11:-2]
 
 import re
-from urllib import quote
-import os, AccessControl, Acquisition 
+import os
+import Acquisition 
 from Globals import ImageFile, package_home, InitializeClass
 from OFS.SimpleItem import SimpleItem
 from OFS.content_types import guess_content_type
 from DateTime.DateTime import DateTime
 from Shared.DC.Scripts.Script import Script 
 from Shared.DC.Scripts.Signature import FuncCode
-from AccessControl import getSecurityManager
 
 from OFS.History import Historical, html_diff
 from OFS.Cache import Cacheable
 from OFS.Traversable import Traversable
 from OFS.PropertyManager import PropertyManager
 
-from Products.PageTemplates.Expressions import SecureModuleImporter
-from Products.PageTemplates.PageTemplateFile import PageTemplateFile
-
-from AccessControl import Unauthorized
+from AccessControl import getSecurityManager, safe_builtins, ClassSecurityInfo
 from AccessControl.Permissions import view, ftp_access, change_page_templates, 
view_management_screens
 
 from webdav.Lockable import ResourceLockedError
 from webdav.WriteLockInterface import WriteLockInterface
-
 from zope.pagetemplate.pagetemplate import PageTemplate 
-#from zope.pagetemplate.pagetemplatefile import PageTemplateFile
 
 # regular expression to extract the encoding from the XML preamble
 encoding_reg= re.compile('\?xml.*?encoding=(.*?).*?\?', re.M)
 
+
+class SecureModuleImporter:
+__allow_access_to_unprotected_subobjects__ = 1
+def __getitem__(self, module):
+mod = safe_builtins['__import__'](module)
+path = module.split('.')
+for name in path[1:]:
+mod = getattr(mod, name)
+return mod
+
+
 class Src(Acquisition.Explicit):
  I am scary code 
 
@@ -64,6 +69,7 @@
 def sniffEncoding(text, default_encoding='utf-8'):
  try to determine the encoding from html or xml 
 
+# XXX: look at pagetemplates.py (BOM!!!)
 if text.startswith('?xml'):
 mo = encoding_reg.search(text)
 if mo:
@@ -101,12 +107,13 @@
  {'id':'expand', 'type':'boolean', 'mode': 'w'},
  )
 
-security = AccessControl.ClassSecurityInfo()
+security = ClassSecurityInfo()
 security.declareObjectProtected(view)
 security.declareProtected(view, '__call__')
 
 def __init__(self, id, text=None, content_type=None, encoding='utf-8'):
 self.id = id
+self.expand = 0
 self.ZBindings_edit(self._default_bindings)
 self.pt_edit(text, content_type, encoding)
 
@@ -124,15 +131,8 @@
 def pt_edit(self, text, content_type, encoding='utf-8'):
 
 text = text.strip()
-#if content_type == 'text/html':
-#if not text.startswith('?xml'):
-## not XHTML - convert it to unicode
-#text = unicode(text, encoding)
-
 if not isinstance(text, unicode):
 text = unicode(text, encoding)
-
-print content_type, type(text),repr(text)
 self.ZCacheable_invalidate()
 PageTemplate.pt_edit(self, text, content_type)
 
@@ -238,7 +238,7 @@
  'options': {},
  'root': root,
  'request': getattr(root, 'REQUEST', None),
- 'modules': SecureModuleImporter,
+ 'modules': SecureModuleImporter(),
  }
 return c
 
@@ -258,7 +258,7 @@
 except AttributeError:
 pass
 
-security=getSecurityManager()
+security = AccessControl.getSecurityManager()
 bound_names['user'] = security.getUser()
 
 # Retrieve the value from the cache.
@@ -332,6 +332,9 @@
 def document_src(self, REQUEST=None, RESPONSE=None):
 Return expanded document source.
 
+print 'src', self.read()
+
+
 if RESPONSE is not None:
 RESPONSE.setHeader('Content-Type', 'text/plain')
 if REQUEST is not None and REQUEST.get('raw'):
@@ -363,15 +366,10 @@
 def wl_isLocked(self):
 return 0
 
-security.declareProtected(view_management_screens, 'source_dot_xml')
+security.declareProtected(view_management_screens, 'getSource')
+getSource = Src()
 source_dot_xml = Src()
 
-security.declareProtected(view_management_screens, 'pt_editForm')
-pt_editForm = PageTemplateFile('pt/ptEdit.pt', globals())
-   

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py added

2005-12-11 Thread Andreas Jung
Log message for revision 40700:
  added
  

Changed:
  A   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py

-=-
Added: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py
   2005-12-11 12:53:04 UTC (rev 40699)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py
   2005-12-11 13:08:03 UTC (rev 40700)
@@ -0,0 +1,31 @@
+
+import os
+
+from Globals import package_home, InitializeClass
+from ZopePageTemplate import ZopePageTemplate
+
+class PageTemplateFile(ZopePageTemplate):
+
+def __init__(self, filename, _prefix=None, **kw):
+self.ZBindings_edit(self._default_bindings)
+if _prefix is None:
+_prefix = getConfiguration().softwarehome
+elif not isinstance(_prefix, str):
+_prefix = package_home(_prefix)
+name = kw.get('__name__')
+basepath, ext = os.path.splitext(filename)
+if name:
+self._need__name__ = 0
+self.__name__ = name
+else:
+self.__name__ = os.path.basename(basepath)
+if not ext:
+# XXX This is pretty bogus, but can't be removed since
+# it's been released this way.
+filename = filename + '.zpt'
+self.filename = os.path.join(_prefix, filename)
+
+ZopePageTemplate.__init__(self, os.path.basename(self.filename), 
open(self.filename).read(), 'text/html')
+
+
+InitializeClass(PageTemplateFile)

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


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/P removed

2005-12-11 Thread Andreas Jung
Log message for revision 40701:
  removed
  

Changed:
  D   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PathIterator.py
  D   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PythonExpr.py

-=-
Deleted: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PathIterator.py
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PathIterator.py
   2005-12-11 13:08:03 UTC (rev 40700)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PathIterator.py
   2005-12-11 13:09:25 UTC (rev 40701)
@@ -1,46 +0,0 @@
-##
-#
-# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##
-
-Path Iterator
-
-A TALES Iterator with the ability to use first() and last() on
-subpaths of elements.
-
-
-__version__='$Revision: 1.4 $'[11:-2]
-
-import TALES
-from Expressions import restrictedTraverse, Undefs, getSecurityManager
-
-class Iterator(TALES.Iterator):
-def __bobo_traverse__(self, REQUEST, name):
-if name in ('first', 'last'):
-path = REQUEST['TraversalRequestNameStack']
-names = list(path)
-names.reverse()
-path[:] = [tuple(names)]
-return getattr(self, name)
-
-def same_part(self, name, ob1, ob2):
-if name is None:
-return ob1 == ob2
-if isinstance(name, type('')):
-name = name.split('/')
-name = filter(None, name)
-securityManager = getSecurityManager()
-try:
-ob1 = restrictedTraverse(ob1, name, securityManager)
-ob2 = restrictedTraverse(ob2, name, securityManager)
-except Undefs:
-return 0
-return ob1 == ob2

Deleted: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PythonExpr.py
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PythonExpr.py
 2005-12-11 13:08:03 UTC (rev 40700)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PythonExpr.py
 2005-12-11 13:09:25 UTC (rev 40701)
@@ -1,86 +0,0 @@
-##
-#
-# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##
-
-Generic Python Expression Handler
-
-
-__version__='$Revision: 1.13 $'[11:-2]
-
-from TALES import CompilerError
-from sys import exc_info
-from DeferExpr import DeferWrapper
-
-class getSecurityManager:
-'''Null security manager'''
-def validate(self, *args, **kwargs):
-return 1
-addContext = removeContext = validate
-
-class PythonExpr:
-def __init__(self, name, expr, engine):
-self.expr = expr = expr.strip().replace('\n', ' ')
-try:
-d = {}
-exec 'def f():\n return %s\n' % expr.strip() in d
-self._f = d['f']
-except:
-raise CompilerError, ('Python expression error:\n'
-  '%s: %s') % exc_info()[:2]
-self._get_used_names()
-
-def _get_used_names(self):
-self._f_varnames = vnames = []
-for vname in self._f.func_code.co_names:
-if vname[0] not in '$_':
-vnames.append(vname)
-
-def _bind_used_names(self, econtext, _marker=[]):
-# Bind template variables
-names = {'CONTEXTS': econtext.contexts}
-vars = econtext.vars
-getType = econtext.getCompiler().getTypes().get
-for vname in self._f_varnames:
-val = vars.get(vname, _marker)
-if val is _marker:
-has = val = getType(vname)
-if has:
-val = ExprTypeProxy(vname, val, econtext)
-names[vname] = val
-else:
-names[vname] = val
-for 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/ cleanup

2005-12-11 Thread Andreas Jung
Log message for revision 40703:
  cleanup
  

Changed:
  D   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/CHANGES.txt
  D   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/examples/

-=-
Deleted: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/CHANGES.txt
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/CHANGES.txt
   2005-12-11 13:22:40 UTC (rev 40702)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/CHANGES.txt
   2005-12-11 13:23:19 UTC (rev 40703)
@@ -1,27 +0,0 @@
-Page Template changes
-
-  This file contains change information for the current release. 
-  Change information for previous versions can be found in the
-  file HISTORY.txt.
-
-Version 1.5.0
-
-  Features Added
-
-- Error reporting is improved, with line numbers added.
-
-- In the ZMI, errors are separated from the text and highlighted.
-
-- A template can be marked explicitly as XML or HTML by giving
-it a boolean 'is_html' property.
-
-- New icon, provided by Michael R. Bernstein.
-
-  Bugs Fixed
-
-- The starting properties could be deleted.  This is only
-fixed for new templates.
-
-- Collector 596 fixed; manage_addPageTemplate can now be
-  called with a text argument but no REQUEST.form['file'].
-  E.g. when called via ZPublisher.Client.

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


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/TAL/ you're time has come, no longer needed for Z3 ZPTs

2005-12-11 Thread Andreas Jung
Log message for revision 40704:
  you're time has come, no longer needed for Z3 ZPTs
  

Changed:
  D   Zope/branches/ajung-zpt-integration/lib/python/TAL/

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


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ removed

2005-12-11 Thread Andreas Jung
Log message for revision 40705:
  removed
  

Changed:
  D   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/

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


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/ made unittests pass

2005-12-11 Thread Andreas Jung
Log message for revision 40706:
  made unittests pass
  

Changed:
  U   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/ZopePageTemplate.py
  U   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/pt/ptEdit.pt
  U   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py

-=-
Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/ZopePageTemplate.py
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/ZopePageTemplate.py
   2005-12-11 13:56:10 UTC (rev 40705)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/ZopePageTemplate.py
   2005-12-11 14:46:00 UTC (rev 40706)
@@ -214,7 +214,7 @@
 setCookie(dtpref_rows, rows, path='/', expires=e)
 setCookie(dtpref_cols, cols, path='/', expires=e)
 REQUEST.other.update({dtpref_cols:cols, dtpref_rows:rows})
-return self.manage_main()
+return self.pt_editForm()
 
 def ZScriptHTML_tryParams(self):
 Parameters to test the script with.
@@ -242,7 +242,7 @@
  }
 return c
 
-security.declareProtected(view_management_screens, 'manage_main', 'read',
+security.declareProtected(view_management_screens, 'read',
   'ZScriptHTML_tryForm')
 
 def _exec(self, bound_names, args, kw):
@@ -331,10 +331,6 @@
 security.declareProtected(view_management_screens, 'document_src')
 def document_src(self, REQUEST=None, RESPONSE=None):
 Return expanded document source.
-
-print 'src', self.read()
-
-
 if RESPONSE is not None:
 RESPONSE.setHeader('Content-Type', 'text/plain')
 if REQUEST is not None and REQUEST.get('raw'):
@@ -399,11 +395,11 @@
 
 ZopePageTemplate.pt_editForm = FSZPT('pt_editForm', 
os.path.join(package_home(globals()),'pt', 'ptEdit.pt'))
 # this is scary, do we need this?
-ZopePageTemplate.manage = ZopePageTemplate.manage_main = 
ZopePageTemplate.pt_editForm
+ZopePageTemplate.manage = ZopePageTemplate.pt_editForm
 
 manage_addPageTemplateForm= FSZPT('manage_addPageTemplateForm', 
os.path.join(package_home(globals()), 'pt', 'ptAdd.pt'))
 
-def manage_addPageTemplate(self, id, title='', file=None, encoding='utf-8', 
submit=None, RESPONSE=None):
+def manage_addPageTemplate(self, id, title='', text=None, file=None, 
encoding='utf-8', submit=None, REQUEST=None, RESPONSE=None):
 Add a Page Template with optional file content.
 
 if file:
@@ -411,8 +407,23 @@
 text = file.read()
 encoding = sniffEncoding(text)
 content_type, dummy = guess_content_type(filename, text) 
+elif REQUEST and REQUEST.has_key('file'):
+f = REQUEST['file']
+filename = f.filename
+text = f.read()
+encoding = sniffEncoding(text)
+headers = getattr(f, 'headers')
+if headers.has_key('content_type'):
+content_type = headers['content_type']
+else:
+content_type, dummy = guess_content_type(filename, text) 
+
 else:
-text = open(_default_content_fn).read()
+if hasattr(text, 'read'):  # assume file
+text= text.read()
+if text is None:
+text = ''
+text = text or open(_default_content_fn).read()
 encoding = 'utf-8'
 content_type = 'text/html'
 
@@ -423,7 +434,7 @@
 
 if RESPONSE:
 if submit ==  Add and Edit :
-RESPONSE.redirect(zpt.absolute_url() + '/manage_main')
+RESPONSE.redirect(zpt.absolute_url() + '/pt_editForm')
 else:
 RESPONSE.redirect(self.absolute_url() + '/manage_main')
 else:

Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/pt/ptEdit.pt
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/pt/ptEdit.pt
  2005-12-11 13:56:10 UTC (rev 40705)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/pt/ptEdit.pt
  2005-12-11 14:46:00 UTC (rev 40706)
@@ -53,7 +53,7 @@
   tr 
 td align=left valign=middle class=form-labelEncoding/td
 td
-  input type=text readonly name=encoding tal:attributes=value 
context/pt_encoding/
+  input type=text readonly name=encoding tal:attributes=value 
context/pt_encoding style=background-color: #bb; /
 /td
   /tr
 

Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
 2005-12-11 13:56:10 UTC (rev 40705)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
 2005-12-11 14:46:00 UTC (rev 40706)
@@ -12,6 +12,7 @@
 import 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py some more comments

2005-12-11 Thread Andreas Jung
Log message for revision 40707:
  some more comments
  

Changed:
  U   
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py

-=-
Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py
===
--- 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py
   2005-12-11 14:46:00 UTC (rev 40706)
+++ 
Zope/branches/ajung-zpt-integration/lib/python/Products/PageTemplates/PageTemplateFile.py
   2005-12-11 15:03:29 UTC (rev 40707)
@@ -1,3 +1,15 @@
+##
+#
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
+##
 
 import os
 
@@ -2,4 +14,9 @@
 from Globals import package_home, InitializeClass
+from App.config import getConfiguration
 from ZopePageTemplate import ZopePageTemplate
 
+# XXX: this needs some more work..this class is *not* used by the
+# ZopePageTemplate implementation but most likely only for class
+# using PTs for edit/add forms etc. Also the tests don't pass
+
 class PageTemplateFile(ZopePageTemplate):

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


[Zope-dev] buildbot failure in Zope trunk 2.4 Linux zc-buildbot

2005-12-11 Thread buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Linux zc-buildbot.

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

Build Reason: changes
Build Source Stamp: 2134
Blamelist: andreasjung,gregweb,jens,oestermeier

BUILD FAILED: failed test

sincerely,
 -The Buildbot

___
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 tests: 7 OK, 1 Failed

2005-12-11 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Sat Dec 10 12:01:01 2005 UTC to Sun Dec 11 12:01:01 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Test failures
-

Subject: FAILED : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 22:07:55 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003769.html


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 21:57:24 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003762.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 21:58:54 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003763.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 22:00:25 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003764.html

Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 22:01:55 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003765.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 22:03:25 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003766.html

Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 22:04:55 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003767.html

Subject: OK : Zope-2_9-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Sat Dec 10 22:06:25 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003768.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 )


[Zope-dev] Zope.org Developer Home cleanup

2005-12-11 Thread Christian Theune
(Sorry for X-post)

Hi,

I proposed to clean up the developer zone a bit.

I'll do that without a lot of fuss as I have to goals:

- get information up to date
- reduce the amount of false / out-of-date information
- structure it in small steps so important stuff is found easier

I'll make an archive area that holds stuff that is out-of-date and will
not delete stuff except it's obvious to me that it isn't needed anymore.

I'll not make this a large-effort-project but want to move that what is
there to a more usable form. I'll try to gather a couple of points that
can then be tackled subsequently.

Regards,
Christian

-- 
gocept gmbh  co. kg - schalaunische str. 6 - 06366 koethen - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 -
fax +49 3496 30 99 118 - zope and plone consulting and development


signature.asc
Description: This is a digitally signed message part
___
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] [ZPT] Zope 3 ZPTs in Zope 2

2005-12-11 Thread Andreas Jung

Hi,

I have a working implementation for Zope 3 ZPTs within Zope 2. It is 
currently implemented through a new class ZPT which implements the same 
functionality as Products.PageTemplates.ZopePageTemplate. I am currently

thinking about the migration to the new implementation. Would it be possible
to perform an in-place migration using setstate() when replacing the 
ZopePageTemplate implementation with the prototype code from my ZPT class?


Andreas

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


Re: [Zope-dev] [ZPT] Zope 3 ZPTs in Zope 2

2005-12-11 Thread Tino Wildenhain
Am Sonntag, den 11.12.2005, 13:16 +0100 schrieb Andreas Jung:
 Hi,
 
 I have a working implementation for Zope 3 ZPTs within Zope 2. It is 
 currently implemented through a new class ZPT which implements the same 
 functionality as Products.PageTemplates.ZopePageTemplate. I am currently
 thinking about the migration to the new implementation. Would it be possible
 to perform an in-place migration using setstate() when replacing the 
 ZopePageTemplate implementation with the prototype code from my ZPT class?

Are there different object-attributes in both classes?
If not, you could simple replace with the same old
class name. 

If there are (you would have to know them
anyway to do the __setstate__ approach)
I'd like an approach with an upgrade
script (similar to 'stale Python Scripts')
better. Buts just me ;-)

Regards
Tino

___
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 3 ZPTs in Zope 2

2005-12-11 Thread Andreas Jung



--On 11. Dezember 2005 13:42:58 +0100 Tino Wildenhain [EMAIL PROTECTED] 
wrote:


Are there different object-attributes in both classes?
If not, you could simple replace with the same old
class name.



The Z3 ZPT implementation seems to use the same attrs. So I could just
replace the class implementation. Some first quick tests show that there is
no further need for a migration..it just works :-)

-aj

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


Re: [Zope-dev] [ZPT] Zope 3 ZPTs in Zope 2

2005-12-11 Thread Tino Wildenhain
Am Sonntag, den 11.12.2005, 15:03 +0100 schrieb Andreas Jung:
 
...
 
 The Z3 ZPT implementation seems to use the same attrs. So I could just
 replace the class implementation. Some first quick tests show that there is
 no further need for a migration..it just works :-)

Lets praise the wonderful world of pickle ;))

++Tino

___
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 Jim Fulton

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?


import transaction
...

transaction.commit()
transaction.abort()

Although I think the old way should still work.  If it doesn't,
please report a bug.

Jim

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

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


Re: [Zope-dev] 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] New ways of getting transactions?

2005-12-11 Thread Jim Fulton

Stefan H. Holek wrote:

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.


I'm dispayed to hear this. :(  The old use of __builtins__.get_transaction
should be deprecated and supported for a period of time.  If it isn't, then this
is *definately* a bug.

Jim

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

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


Re: [Zope-dev] New ways of getting transactions?

2005-12-11 Thread Morten W. Petersen
 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.
 
 
 I'm dispayed to hear this. :(  The old use of __builtins__.get_transaction
 should be deprecated and supported for a period of time.  If it isn't,
 then this is *definately* a bug.

I agree.  I've reported it as a bug:

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

-- 
Morten W. Petersen

Email: [EMAIL PROTECTED]
Phone: +47 45 44 00 69
Title: Project manager

Nidelven IT (http://www.nidelven-it.no)
We provide Zope/Plone hosting and consulting
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

___
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 Andreas Jung



--On 11. Dezember 2005 17:01:56 +0100 Morten W. Petersen 
[EMAIL PROTECTED] 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?




See doc/ZODB.txt. Of course the new API will not work in Zope 2.7/2.8.

-aj

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


[Zope-dev] Re: New ways of getting transactions?

2005-12-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
 
 
 --On 11. Dezember 2005 17:01:56 +0100 Morten W. Petersen
 [EMAIL PROTECTED] 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?


 
 See doc/ZODB.txt. Of course the new API will not work in Zope 2.7/2.8.

The 'transaction' module is present in Zope 2.8.x / ZODB 3.4.x.  Forward
compatibility for third-party produccts which need to work on both 2.7.x
and 2.8.x+ usually looks like this:


try:
import transaction
except ImportError:
   class transaction:
Forward-compatibility for Zope 2.7.x
   
   def begin(self):
   get_transaction().begin()

   def commit(self, sub=False):
   get_transaction().commit(sub)

   def abort(self, sub=False):
   get_transaction().abort(sub)

   def savepoint(self, optimistic=None):
   get_transaction().commit(optimistic and 1 or 0)

   def get(self):
   return get_transaction()

transaction = transaction()

I'll agree with Jim and Morten that the deprecated 'get_transaction()'
pattern should *not* have been ripped out in Zope 2.9b1 (2.10 is the
earliest feasible point, I think).


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

iD8DBQFDnG5W+gerLs4ltQ4RAlDCAJ9n1owUWja8VUoYfOA3qXQEwKK/AwCffWDG
YbnO+f8tnKilCYQHVnPeYNk=
=7HJy
-END PGP SIGNATURE-

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


Re: [Zope-dev] New ways of getting transactions?

2005-12-11 Thread Andreas Jung



--On 11. Dezember 2005 12:28:04 -0500 Jim Fulton [EMAIL PROTECTED] wrote:


Stefan H. Holek wrote:

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.


I'm dispayed to hear this. :(  The old use of __builtins__.get_transaction
should be deprecated and supported for a period of time.  If it isn't,
then this


The deprecation warning in Zope 2.8 says:

-c:1: DeprecationWarning: This will be removed in ZODB 3.6:
  use transaction.get() instead of get_transaction().
  transaction.commit() is a shortcut spelling of 
transaction.get().commit(),

  and transaction.abort() of transaction.get().abort().

Zope 2.9 comes with ZODB 3.6. So the behaviour is correct in some way but I 
agree that the deprecation should continue longer. It would be save to 
remove it in Zope 2.10.


-aj


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


Re: [Zope-dev] New ways of getting transactions?

2005-12-11 Thread Tim Peters
A number of ZODB gimmicks were officially deprecated in ZODB 3.4, and
removed in ZODB 3.6.  Zope 2.9 uses the latter.  From the ZODB NEWS
file for 3.6:


Removal of Features Deprecated in ZODB 3.4
--

(3.6b2) ZODB 3.6 no longer contains features officially deprecated in the
ZODB 3.4 release.  These include:

- ``get_transaction()``.  Use ``transaction.get()`` instead.
  ``transaction.commit()`` is a shortcut spelling of
  ``transaction.get().commit()``, and ``transaction.abort()``
  of ``transaction.get().abort()``.  Note that importing ZODB no longer
  installs ``get_transaction`` as a name in Python's ``__builtin__``
  module either.

- The ``begin()`` method of ``Transaction`` objects.  Use the ``begin()``
  method of a transaction manager instead.  ``transaction.begin()`` is
  a shortcut spelling to call the default transaction manager's ``begin()``
  method.

- The ``dt`` argument to ``Connection.cacheMinimize()``.

- The ``Connection.cacheFullSweep()`` method.  Use ``cacheMinimize()``
  instead.

- The ``Connection.getTransaction()`` method.  Pass a transaction manager
  to ``DB.open()`` instead.

- The ``Connection.getLocalTransaction()`` method.  Pass a transaction
  manager to ``DB.open()`` instead.

- The ``cache_deactivate_after`` and ``version_cache_deactivate_after``
  arguments to the ``DB`` constructor.

- The ``temporary``, ``force``, and ``waitflag`` arguments
  to ``DB.open()``.  ``DB.open()`` no longer blocks (there's no longer
  a fixed limit on the number of open connections).

- The ``transaction`` and ``txn_mgr``arguments to ``DB.open()``.  Use
  the ``transaction_manager`` argument instead.

- The ``getCacheDeactivateAfter``, ``setCacheDeactivateAfter``,
  ``getVersionCacheDeactivateAfter`` and ``setVersionCacheDeactivateAfter``
  methods of ``DB``.

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

2005-12-11 Thread buildbot
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: The web-page 'force build' button was pressed by '': 

Build Source Stamp: None
Blamelist: 

BUILD FAILED: failed test

sincerely,
 -The Buildbot

___
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 Jim Fulton

Andreas Jung wrote:



--On 11. Dezember 2005 12:28:04 -0500 Jim Fulton [EMAIL PROTECTED] wrote:


Stefan H. Holek wrote:


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.



I'm dispayed to hear this. :(  The old use of 
__builtins__.get_transaction

should be deprecated and supported for a period of time.  If it isn't,
then this



The deprecation warning in Zope 2.8 says:

-c:1: DeprecationWarning: This will be removed in ZODB 3.6:
  use transaction.get() instead of get_transaction().
  transaction.commit() is a shortcut spelling of 
transaction.get().commit(),

  and transaction.abort() of transaction.get().abort().

Zope 2.9 comes with ZODB 3.6. So the behaviour is correct in some way 
but I agree that the deprecation should continue longer. It would be 
save to remove it in Zope 2.10.


Yup.

BTW, This is a good example for why I want to start using time-based
deprecation.

Jim

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

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


Re: [Zope-dev] New ways of getting transactions?

2005-12-11 Thread Tim Peters
[Jim Fulton]
...
 BTW, This is a good example for why I want to start using time-based
 deprecation.

In a world with time-based releases, is there a difference?
___
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 Jim Fulton

Tim Peters wrote:

[Jim Fulton]
...


BTW, This is a good example for why I want to start using time-based
deprecation.



In a world with time-based releases, is there a difference?


Yes, because release numbers aren't very helpful when software
is used by many applications.  For example, I could imagine
bumping ZODB (or some other packages) release numbers more often than
is needed by Zope. For example, zope.interface has separate releases.
We might someday decide to make a release to meet Twisted's needs.
We wouldn't want such an incedental event to cause a feature to
be deprecated more quickly.

Jim

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

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


[Zope-dev] make test fails on 2.9.0-b1?

2005-12-11 Thread Paul Winkler
Sorry for redundancy if this is a known problem, but
I just now grabbed the 2.9.0-b1 tarball and noticed this:

[EMAIL PROTECTED] Zope-2.9.0b1 $ ./configure
--prefix=/home/pw/Zope-2.9.0b1-SoftwareHome 
Configuring Zope installation

Testing for an acceptable Python interpreter...

Python version 2.4.2 found at /usr/bin/python

The optimum Python version (2.4.2) was found at /usr/bin/python.

[EMAIL PROTECTED] Zope-2.9.0b1 $ less Makefile
[EMAIL PROTECTED] Zope-2.9.0b1 $ make  make test  make install
/usr/bin/python install.py -q build
/usr/bin/python install.py -q build
/usr/bin/python test.py -v
Traceback (most recent call last):
  File test.py, line 32, in ?
import zope.app.testing.test
ImportError: No module named test
make: *** [test] Error 1


Is make test expected to work currently? 

-- 

Paul Winkler
http://www.slinkp.com
___
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] Imports broken on 2.9.0-b1?

2005-12-11 Thread Tino Wildenhain
Am Sonntag, den 11.12.2005, 23:19 -0500 schrieb Paul Winkler:
 Another quickie problem report - no time to investigate further right
 now, but can anybody else reproduce?  If so, I'll try to fix tomorrow...
 
 In a fresh 2.9.0-b1 instance, made via bin/mkzopeinstance, I get this
 when I click the Import/Export button in the ZMI:
 
 Site Error
 
 An error was encountered while publishing this resource.
 
 Error Type: OSError
 Error Value: [Errno 2] No such file or directory:
 '/home/pw/Zope-2.9.0b1-SoftwareHome/import'
 
 And the traceback is:
...
 OSError: [Errno 2] No such file or directory:
 '/home/pw/Zope-2.9.0b1-SoftwareHome/import'
 
 
 Well, err, why are you looking there? That's not my instance home :-\

I suspect its the feature which got introduced in 2.8? or so which
has a browser for packets to import so you dont have to
guess and type the name correctly. And to not have to
copy the exaples to every instance home, it
looks in Software-home too. 

2 questions araise, though:

1) why is Softwarehome/import not there?
2) why is the test not skipping the non existant
   directory.

Either case a bug report :)

++Tino


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