[Zope3-checkins] CVS: Zope3/src/zope/app/http - interfaces.py:1.1 configure.zcml:1.8 put.py:1.10

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Mar 13 18:34:59 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/http
In directory cvs.zope.org:/tmp/cvs-serv1277/src/zope/app/http

Modified Files:
	configure.zcml put.py 
Added Files:
	interfaces.py 
Log Message:


Moved a few HTTP-related interfaces to zope.app.http.interfaces, where they
belong.




=== Added File Zope3/src/zope/app/http/interfaces.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
# 
##############################################################################
"""
$Id: interfaces.py,v 1.1 2004/03/13 23:34:28 srichter Exp $
"""

from zope.interface import Interface, Attribute

class INullResource(Interface):
    """Placeholder objects for new container items to be created via PUT
    """

    container = Attribute("The container of the future resource")
    name = Attribute("The name of the object to be created.")

class IHTTPException(Interface):
    """Marker interface for http exceptions views
    """
    pass



=== Zope3/src/zope/app/http/configure.zcml 1.7 => 1.8 ===
--- Zope3/src/zope/app/http/configure.zcml:1.7	Wed Mar  3 05:38:44 2004
+++ Zope3/src/zope/app/http/configure.zcml	Sat Mar 13 18:34:28 2004
@@ -1,7 +1,7 @@
-<configure xmlns='http://namespaces.zope.org/zope'>
+<configure xmlns="http://namespaces.zope.org/zope">
 
 <content class=".put.NullResource">
-  <allow interface="zope.app.interfaces.http.INullResource" />
+  <allow interface="zope.app.http.interfaces.INullResource" />
 </content>
 
 <view
@@ -23,7 +23,7 @@
   />
 
 <view
-  for="zope.app.interfaces.http.INullResource"
+  for="zope.app.http.interfaces.INullResource"
   name="PUT"
   type="zope.publisher.interfaces.http.IHTTPRequest"
   factory=".put.NullPUT"


=== Zope3/src/zope/app/http/put.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/http/put.py:1.9	Sat Mar  6 12:48:50 2004
+++ Zope3/src/zope/app/http/put.py	Sat Mar 13 18:34:28 2004
@@ -9,22 +9,18 @@
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
 ##############################################################################
-"""XXX short summary goes here.
-
-XXX longer description goes here.
+"""HTTP PUT verb
 
 $Id$
 """
-__metaclass__ = type
-
 from zope.component import queryNamedAdapter
-from zope.app.interfaces.http import INullResource
+from zope.app.http.interfaces import INullResource
 from zope.app.interfaces.file import IWriteFile, IWriteDirectory, IFileFactory
 from zope.app.event import publish
 from zope.app.event.objectevent import ObjectCreatedEvent
 from zope.interface import implements
 
-class NullResource:
+class NullResource(object):
     """Object representing objects to be created by a PUT.
     """
 
@@ -35,7 +31,7 @@
         self.name = name
 
 
-class NullPUT:
+class NullPUT(object):
     """Put handler for null resources (new file-like things)
 
     This view creates new objects in containers.
@@ -86,7 +82,7 @@
         request.response.setStatus(201)
         return ''
 
-class FilePUT:
+class FilePUT(object):
     """Put handler for existing file-like things
     """
 




More information about the Zope3-Checkins mailing list