[Checkins] SVN: zopyx.smartprintng.server/trunk/ merged svn+ssh://andreasjung at svn.zope.org/repos/main/zopyx.smartprintng.server/branches/pyramid
Andreas Jung
andreas at andreas-jung.com
Sat Dec 11 10:26:55 EST 2010
Log message for revision 118805:
merged svn+ssh://andreasjung@svn.zope.org/repos/main/zopyx.smartprintng.server/branches/pyramid
Changed:
U zopyx.smartprintng.server/trunk/README.txt
U zopyx.smartprintng.server/trunk/buildout.cfg
U zopyx.smartprintng.server/trunk/docs/HISTORY.txt
U zopyx.smartprintng.server/trunk/setup.py
U zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/__init__.py
U zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/configure.zcml
U zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/run.py
U zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/templates/index.pt
U zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/tests.py
U zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/views.py
-=-
Modified: zopyx.smartprintng.server/trunk/README.txt
===================================================================
--- zopyx.smartprintng.server/trunk/README.txt 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/README.txt 2010-12-11 15:26:55 UTC (rev 118805)
@@ -1,7 +1,7 @@
zopyx.smartprintng.server
=========================
-A repoze.bfg based server implementation for the SmartPrintNG framework.
+A Pyramid based server implementation for the SmartPrintNG framework.
The SmartPrintNG server is part of the SmartPrintNG web-to-print solution
of ZOPYX.
@@ -24,11 +24,11 @@
virtualenv --no-site-packages smartprintng
-- install ``repoze.bfg``
+- install ``Pyramid``
as a dependency) ::
- bin/easy_install repoze.bfg
- bin/easy_install repoze.bfg.xmlrpc
+ bin/easy_install pyramid
+ bin/easy_install pyramid_xmlrpc
- install the SmartPrintNG server::
Modified: zopyx.smartprintng.server/trunk/buildout.cfg
===================================================================
--- zopyx.smartprintng.server/trunk/buildout.cfg 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/buildout.cfg 2010-12-11 15:26:55 UTC (rev 118805)
@@ -20,6 +20,7 @@
dependent-scripts = true
eggs =
zopyx.smartprintng.server
- repoze.bfg.xmlrpc
+ pyramid
+ pyramid_xmlrpc
interpreter = py
Modified: zopyx.smartprintng.server/trunk/docs/HISTORY.txt
===================================================================
--- zopyx.smartprintng.server/trunk/docs/HISTORY.txt 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/docs/HISTORY.txt 2010-12-11 15:26:55 UTC (rev 118805)
@@ -1,6 +1,10 @@
Changelog
=========
+0.7.0 (unreleased)
+------------------
+* converted to Pyramid
+
0.6.7 (2010/07/18)
------------------
* adjusted company name
Modified: zopyx.smartprintng.server/trunk/setup.py
===================================================================
--- zopyx.smartprintng.server/trunk/setup.py 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/setup.py 2010-12-11 15:26:55 UTC (rev 118805)
@@ -10,7 +10,7 @@
if sys.version_info < (2,6):
raise RuntimeError('Please use Python 2.6.X')
-version = '0.6.7'
+version = '0.7.0-dev'
setup(name='zopyx.smartprintng.server',
version=version,
@@ -33,7 +33,8 @@
zip_safe=False,
install_requires=[
'setuptools',
- 'repoze.bfg',
+ 'pyramid',
+ 'pyramid_xmlrpc',
'uuid',
'zopyx.convert2',
'zope.sendmail',
Modified: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/__init__.py
===================================================================
--- zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/__init__.py 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/__init__.py 2010-12-11 15:26:55 UTC (rev 118805)
@@ -11,8 +11,8 @@
params, method = xmlrpclib.loads(request.body)
return params, method
-import repoze.bfg.xmlrpc
-repoze.bfg.xmlrpc.parse_xmlrpc_request = parse_xmlrpc_request
+import pyramid_xmlrpc
+pyramid_xmlrpc.parse_xmlrpc_request = parse_xmlrpc_request
# initialize mimetypes on our own to avoid stupid
# recursion error in guess_type()
Modified: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/configure.zcml
===================================================================
--- zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/configure.zcml 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/configure.zcml 2010-12-11 15:26:55 UTC (rev 118805)
@@ -1,8 +1,8 @@
-<configure xmlns="http://namespaces.repoze.org/bfg"
+<configure xmlns="http://pylonshq.com/pyramid"
xmlns:mail="http://namespaces.repoze.org/mail">
<!-- this must be included for the view declarations to work -->
- <include package="repoze.bfg.includes" />
+ <include package="pyramid.includes" />
<scan package="."/>
Modified: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/run.py
===================================================================
--- zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/run.py 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/run.py 2010-12-11 15:26:55 UTC (rev 118805)
@@ -4,12 +4,12 @@
##########################################################################
import os
-from repoze.bfg.router import make_app
+from pyramid.router import make_app
import mail_util
from views import have_authentication
def app(global_config, **kw):
- """ This function returns a repoze.bfg.router.Router object. It
+ """ This function returns a pyramid.router.Router object. It
is usually called by the PasteDeploy framework during ``paster
serve``"""
Modified: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/templates/index.pt
===================================================================
--- zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/templates/index.pt 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/templates/index.pt 2010-12-11 15:26:55 UTC (rev 118805)
@@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${project} Application</title>
<meta name="keywords" content="python web application" />
- <meta name="description" content="repoze.bfg web application" />
+ <meta name="description" content="Pyramid web application" />
<link href="${request.application_url}/static/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
Modified: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/tests.py
===================================================================
--- zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/tests.py 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/tests.py 2010-12-11 15:26:55 UTC (rev 118805)
@@ -9,7 +9,7 @@
import unittest
import zipfile
import tempfile
-from repoze.bfg import testing
+from pyramid import testing
from models import Server
xml = """<?xml version="1.0"?>
@@ -35,7 +35,7 @@
""" These tests are unit tests for the view. They test the
functionality of *only* the view. They register and use dummy
- implementations of repoze.bfg functionality to allow you to avoid
+ implementations of pyramid functionality to allow you to avoid
testing 'too much'"""
def setUp(self):
@@ -62,21 +62,21 @@
class ViewIntegrationTests(unittest.TestCase):
""" These tests are integration tests for the view. These test
the functionality the view *and* its integration with the rest of
- the repoze.bfg framework. They cause the entire environment to be
+ the pyramid framework. They cause the entire environment to be
set up and torn down as if your application was running 'for
real'. This is a heavy-hammer way of making sure that your tests
have enough context to run properly, and it tests your view's
- integration with the rest of BFG. You should not use this style
+ integration with the rest of Pyramid. You should not use this style
of test to perform 'true' unit testing as tests will run faster
and will be easier to write if you use the testing facilities
- provided by bfg and only the registrations you need, as in the
+ provided by Pyramid and only the registrations you need, as in the
above ViewTests.
"""
def setUp(self):
""" This sets up the application registry with the
registrations your application declares in its configure.zcml
- (including dependent registrations for repoze.bfg itself).
+ (including dependent registrations for pyramid itself).
"""
testing.cleanUp()
import zopyx.smartprintng.server
Modified: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/views.py
===================================================================
--- zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/views.py 2010-12-11 15:18:12 UTC (rev 118804)
+++ zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/views.py 2010-12-11 15:26:55 UTC (rev 118805)
@@ -11,10 +11,10 @@
import xmlrpclib
import pkg_resources
from stat import ST_CTIME
-from repoze.bfg.chameleon_zpt import render_template_to_response
-from repoze.bfg.view import static
-from repoze.bfg.view import bfg_view
-from repoze.bfg.xmlrpc import xmlrpc_view
+from pyramid.chameleon_zpt import render_template_to_response
+from pyramid.view import static
+from pyramid.view import view_config
+from pyramid_xmlrpc import xmlrpc_view
from webob import Response
from models import Server
from logger import LOG
@@ -33,7 +33,7 @@
# HTTP views
##################
- at bfg_view(for_=Server, request_method='GET', permission='read')
+ at view_config(for_=Server, request_method='GET', permission='read')
class index(object):
""" The default view providing some system information """
@@ -51,7 +51,7 @@
version=version,
project='zopyx.smartprintng.server')
- at bfg_view(for_=Server, request_method='GET', permission='read', name='selftest')
+ at view_config(for_=Server, request_method='GET', permission='read', name='selftest')
class selftest(object):
""" Server selftest """
@@ -76,7 +76,7 @@
raise RuntimeError
- at bfg_view(for_=Server, name='deliver')
+ at view_config(for_=Server, name='deliver')
def deliver(context, request):
""" Send out a generated output file """
@@ -110,7 +110,7 @@
# XMLRPC views
##################
- at bfg_view(name='authenticate', for_=Server)
+ at view_config(name='authenticate', for_=Server)
@xmlrpc_view
def authenticate(context, username, password):
@@ -124,7 +124,7 @@
LOG.error(msg, exc_info=True)
return xmlrpclib.Fault(123, msg)
- at bfg_view(name='convertZIP', for_=Server)
+ at view_config(name='convertZIP', for_=Server)
@xmlrpc_view
def convertZIP(context, auth_token, zip_archive, converter_name='pdf-prince'):
@@ -141,7 +141,7 @@
return xmlrpclib.Fault(123, msg)
- at bfg_view(name='convertZIPEmail', for_=Server)
+ at view_config(name='convertZIPEmail', for_=Server)
@xmlrpc_view
def convertZIPEmail(context, auth_token, zip_archive, converter_name='pdf-prince', sender=None, recipient=None, subject=None, body=None):
@@ -158,7 +158,7 @@
return xmlrpclib.Fault(123, msg)
- at bfg_view(name='convertZIPandRedirect', for_=Server)
+ at view_config(name='convertZIPandRedirect', for_=Server)
@xmlrpc_view
def convertZIPandRedirect(context, auth_token, zip_archive, converter_name='prince-pdf', prefix=None):
""" This view appects a ZIP archive through a POST request containing all
@@ -198,13 +198,13 @@
return xmlrpclib.Fault(123, msg)
- at bfg_view(name='availableConverters', for_=Server)
+ at view_config(name='availableConverters', for_=Server)
@xmlrpc_view
def availableConverters(context):
return context.availableConverters()
- at bfg_view(name='ping', for_=Server)
+ at view_config(name='ping', for_=Server)
@xmlrpc_view
def ping(context):
return 'zopyx.smartprintng.server'
More information about the checkins
mailing list