Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
9c0bd8ee
Commit
9c0bd8ee
authored
Apr 26, 2009
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Caught up with the latest and greatest from the Zope Toolkit again
parent
a7556c1e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
100 additions
and
59 deletions
+100
-59
alltests.cfg
alltests.cfg
+0
-2
dependencies.cfg
dependencies.cfg
+14
-0
src/Products/Five/browser/configure.zcml
src/Products/Five/browser/configure.zcml
+0
-4
src/Products/Five/browser/tests/test_recurse.py
src/Products/Five/browser/tests/test_recurse.py
+1
-1
src/Products/Five/configure.zcml
src/Products/Five/configure.zcml
+1
-0
src/Products/Five/publisher.zcml
src/Products/Five/publisher.zcml
+23
-0
src/ZPublisher/BaseRequest.py
src/ZPublisher/BaseRequest.py
+3
-6
src/ZPublisher/Publish.py
src/ZPublisher/Publish.py
+7
-3
src/ZPublisher/Test.py
src/ZPublisher/Test.py
+4
-2
src/ZPublisher/tests/testBaseRequest.py
src/ZPublisher/tests/testBaseRequest.py
+1
-1
src/ZPublisher/tests/testPublish.py
src/ZPublisher/tests/testPublish.py
+5
-1
src/Zope2/App/tests/testExceptionHook.py
src/Zope2/App/tests/testExceptionHook.py
+3
-4
versions.cfg
versions.cfg
+38
-35
No files found.
alltests.cfg
View file @
9c0bd8ee
...
...
@@ -25,7 +25,6 @@ eggs =
zope.container
zope.contentprovider
zope.contenttype
zope.copypastemove
zope.datetime
zope.deferredimport
zope.deprecation
...
...
@@ -49,7 +48,6 @@ eggs =
zope.publisher
zope.schema
zope.security
zope.securitypolicy
zope.sendmail
zope.sequencesort
zope.session
...
...
dependencies.cfg
0 → 100644
View file @
9c0bd8ee
[buildout]
extends = alltests.cfg
parts += dependencies
[dependencies]
recipe = z3c.recipe.depgraph
eggs = ${alltests:eggs}
variants = base tred
exclude =
ClientForm
docutils
mechanize
src/Products/Five/browser/configure.zcml
View file @
9c0bd8ee
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser">
<interface
interface="zope.publisher.interfaces.browser.IBrowserSkinType"
/>
<interface
interface="zope.app.publisher.interfaces.browser.IMenuItemType"
/>
...
...
src/Products/Five/browser/tests/test_recurse.py
View file @
9c0bd8ee
...
...
@@ -43,7 +43,7 @@ def test_recursion():
>>> from zope.component import provideAdapter
>>> from zope.publisher.interfaces.browser import IBrowserRequest
>>> from zope.
component
.interfaces import IDefaultViewName
>>> from zope.
publisher
.interfaces import IDefaultViewName
>>> provideAdapter(u'view', (IRecurse, IBrowserRequest), IDefaultViewName)
Here comes the actual test:
...
...
src/Products/Five/configure.zcml
View file @
9c0bd8ee
...
...
@@ -6,6 +6,7 @@
<include file="i18n.zcml" />
<include file="event.zcml"/>
<include file="deprecated.zcml"/>
<include file="publisher.zcml"/>
<include file="traversing.zcml"/>
<include package=".component" />
<include package=".browser" />
...
...
src/Products/Five/publisher.zcml
0 → 100644
View file @
9c0bd8ee
<configure xmlns="http://namespaces.zope.org/zope">
<interface interface="zope.publisher.interfaces.browser.IBrowserSkinType" />
<interface
interface="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
type="zope.publisher.interfaces.browser.IBrowserSkinType"
/>
<class class="ZPublisher.HTTPRequest.HTTPRequest">
<implements
interface="zope.annotation.interfaces.IAttributeAnnotatable"
/>
</class>
<adapter
name="default"
factory="zope.publisher.browser.getDefaultSkin"
for="zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.publisher.interfaces.IDefaultSkin"
/>
</configure>
src/ZPublisher/BaseRequest.py
View file @
9c0bd8ee
...
...
@@ -16,21 +16,17 @@ $Id$
"""
from
urllib
import
quote
as
urllib_quote
import
xmlrpc
from
zExceptions
import
Forbidden
,
Unauthorized
,
NotFound
from
zExceptions
import
Forbidden
,
NotFound
from
Acquisition
import
aq_base
from
Acquisition.interfaces
import
IAcquirer
from
zope.interface
import
implements
,
providedBy
,
Interface
from
zope.interface
import
implements
,
Interface
from
zope.component
import
queryMultiAdapter
from
zope.component
import
getSiteManager
from
zope.component.interfaces
import
ComponentLookupError
from
zope.event
import
notify
from
zope.app.publication.interfaces
import
EndRequestEvent
from
zope.app.publisher.browser
import
queryDefaultViewName
from
zope.publisher.interfaces
import
IPublishTraverse
from
zope.component.interfaces
import
IDefaultViewName
from
zope.publisher.interfaces.browser
import
IBrowserPublisher
from
zope.publisher.interfaces.browser
import
IBrowserRequest
from
zope.traversing.interfaces
import
TraversalError
from
zope.traversing.namespace
import
nsParse
,
namespaceLookup
...
...
@@ -42,6 +38,7 @@ def quote(text):
try
:
from
ExtensionClass
import
Base
from
ZPublisher.Converters
import
type_converters
class
RequestContainer
(
Base
):
__roles__
=
None
def
__init__
(
self
,
**
kw
):
...
...
src/ZPublisher/Publish.py
View file @
9c0bd8ee
...
...
@@ -21,7 +21,8 @@ from Request import Request
from
maybe_lock
import
allocate_lock
from
mapply
import
mapply
from
zExceptions
import
Redirect
from
zope.publisher.browser
import
setDefaultSkin
from
zope.publisher.interfaces
import
ISkinnable
from
zope.publisher.skinnable
import
setDefaultSkin
from
zope.security.management
import
newInteraction
,
endInteraction
class
Retry
(
Exception
):
...
...
@@ -164,8 +165,10 @@ def publish(request, module_name, after_list, debug=0,
# Only reachable if Retry is raised and request supports retry.
newrequest
=
request
.
retry
()
request
.
close
()
# Free resources held by the request.
# Set the default layer/skin on the newly generated request
setDefaultSkin
(
newrequest
)
if
ISkinnable
.
providedBy
(
newrequest
):
setDefaultSkin
(
newrequest
)
try
:
return
publish
(
newrequest
,
module_name
,
after_list
,
debug
)
finally
:
...
...
@@ -199,7 +202,8 @@ def publish_module_standard(module_name,
# make sure that the request we hand over has the
# default layer/skin set on it; subsequent code that
# wants to look up views will likely depend on it
setDefaultSkin
(
request
)
if
ISkinnable
.
providedBy
(
request
):
setDefaultSkin
(
request
)
response
=
publish
(
request
,
module_name
,
after_list
,
debug
=
debug
)
except
SystemExit
,
v
:
...
...
src/ZPublisher/Test.py
View file @
9c0bd8ee
...
...
@@ -195,8 +195,10 @@ def publish_module(module_name,
# make sure that the request we hand over has the
# default layer/skin set on it; subsequent code that
# wants to look up views will likely depend on it
from
zope.publisher.browser
import
setDefaultSkin
setDefaultSkin
(
request
)
from
zope.publisher.interfaces
import
ISkinnable
from
zope.publisher.skinnable
import
setDefaultSkin
if
ISkinnable
.
providedBy
(
request
):
setDefaultSkin
(
request
)
for
k
,
v
in
extra
.
items
():
request
[
k
]
=
v
response
=
publish
(
request
,
module_name
,
after_list
,
debug
=
debug
)
...
...
src/ZPublisher/tests/testBaseRequest.py
View file @
9c0bd8ee
...
...
@@ -518,7 +518,7 @@ class TestBaseRequestZope3Views(unittest.TestCase, BaseRequest_factory):
def
_setDefaultViewName
(
self
,
name
):
from
zope.component
import
getGlobalSiteManager
from
zope.
component
.interfaces
import
IDefaultViewName
from
zope.
publisher
.interfaces
import
IDefaultViewName
from
zope.publisher.browser
import
IBrowserRequest
gsm
=
getGlobalSiteManager
()
gsm
.
registerAdapter
(
name
,
(
self
.
_dummyInterface
(),
IBrowserRequest
),
...
...
src/ZPublisher/tests/testPublish.py
View file @
9c0bd8ee
from
zope.
publisher.browser
import
setDefaultSkin
from
zope.
interface
import
implements
from
zope.publisher.interfaces.browser
import
IDefaultBrowserLayer
from
zope.publisher.interfaces.browser
import
IBrowserRequest
from
zope.publisher.skinnable
import
setDefaultSkin
from
ZPublisher
import
Retry
from
ZODB.POSException
import
ConflictError
...
...
@@ -89,6 +91,8 @@ class Request:
"""Mock Request to replace ZPublisher.HTTPRequest.HTTPRequest.
"""
implements
(
IBrowserRequest
)
args
=
()
def
__init__
(
self
):
...
...
src/Zope2/App/tests/testExceptionHook.py
View file @
9c0bd8ee
...
...
@@ -16,14 +16,15 @@ import sys
import
unittest
import
logging
from
zope.interface.common.interfaces
import
IException
from
zope.publisher.skinnable
import
setDefaultSkin
from
zope.publisher.interfaces
import
INotFound
from
zope.security.interfaces
import
IUnauthorized
from
zope.security.interfaces
import
IForbidden
from
zope.interface.common.interfaces
import
IException
from
zope.app.testing
import
ztapi
from
zope.app.testing.placelesssetup
import
PlacelessSetup
from
zope.publisher.browser
import
setDefaultSkin
class
ExceptionHookTestCase
(
unittest
.
TestCase
):
...
...
@@ -162,7 +163,6 @@ class ExceptionHookTest(ExceptionHookTestCase):
getConfiguration
().
conflict_error_log_level
=
old_value
def
testConflictErrorCount
(
self
):
from
ZPublisher
import
Retry
from
ZODB.POSException
import
ConflictError
def
f
():
raise
ConflictError
...
...
@@ -397,7 +397,6 @@ class ExceptionViewsTest(PlacelessSetup, ExceptionHookTestCase):
self
.
failUnless
(
"Exception View: InternalError"
in
str
(
v
),
v
)
def
testRedirectNoExceptionView
(
self
):
from
ZPublisher.HTTPResponse
import
HTTPResponse
from
zExceptions
import
Redirect
ztapi
.
browserView
(
IException
,
u'index.html'
,
CustomExceptionView
)
def
f
():
...
...
versions.cfg
View file @
9c0bd8ee
...
...
@@ -24,62 +24,63 @@ transaction = 1.0a1
zc.buildout = 1.2.1
zc.lockfile = 1.0.0
zc.recipe.egg = 1.2.2
zc.recipe.testrunner = 1.
1
.0
zc.recipe.testrunner = 1.
2
.0
zdaemon = 2.0.4
zodbcode = 3.4.0
zope.annotation = 3.4.
1
zope.app.apidoc = 3.6.
1
zope.annotation = 3.4.
2
zope.app.apidoc = 3.6.
2
zope.app.applicationcontrol = 3.4.3
zope.app.appsetup = 3.9.0
zope.app.authentication = 3.5.0a2
zope.app.appsetup = 3.10.1
zope.app.basicskin = 3.4.0
zope.app.broken = 3.5.0
zope.app.cache = 3.5.0
zope.app.catalog = 3.8.0
zope.app.component = 3.
6
.0
zope.app.container = 3.7.
1
zope.app.component = 3.
7
.0
zope.app.container = 3.7.
2
zope.app.content = 3.4.0
zope.app.dav = 3.5.0
zope.app.debug = 3.4.1
zope.app.dependable = 3.4.0
zope.app.dtmlpage = 3.5.0
zope.app.error = 3.5.2
zope.app.exception = 3.
4.2
zope.app.exception = 3.
5.0
zope.app.file = 3.5.0
zope.app.folder = 3.5.
0
zope.app.form = 3.7.
1
zope.app.generations = 3.
4.2
zope.app.http = 3.5.
0
zope.app.i18n = 3.
5
.0
zope.app.folder = 3.5.
1
zope.app.form = 3.7.
2
zope.app.generations = 3.
5.0
zope.app.http = 3.5.
2
zope.app.i18n = 3.
6
.0
zope.app.interface = 3.4.0
zope.app.intid = 3.7.0
zope.app.locales = 3.5.1
zope.app.localpermission = 3.7.0
zope.app.pagetemplate = 3.5.0
zope.app.principalannotation = 3.
5.0
zope.app.publication = 3.5.
1
zope.app.publisher = 3.6.
0
zope.app.principalannotation = 3.
6.1
zope.app.publication = 3.5.
3
zope.app.publisher = 3.6.
2
zope.app.renderer = 3.5.0
zope.app.schema = 3.5.0
zope.app.security = 3.
6
.0
zope.app.security = 3.
7
.0
zope.app.securitypolicy = 3.5.1
zope.app.server = 3.4.2
zope.app.session = 3.6.0
zope.app.testing = 3.6.
0
zope.app.testing = 3.6.
2
zope.app.traversing = 3.4.0
zope.app.undo = 3.5.0
zope.app.wsgi = 3.
4.1
zope.app.wsgi = 3.
5.2
zope.app.zapi = 3.4.0
zope.app.zcmlfiles = 3.5.
2
zope.app.zopeappgenerations = 3.
4
.0
zope.app.zcmlfiles = 3.5.
3
zope.app.zopeappgenerations = 3.
5
.0
zope.app.zptpage = 3.5.0
zope.authentication = 3.7.0
zope.broken = 3.5.0
zope.browser = 0.5.0
zope.cachedescriptors = 3.
4.1
zope.cachedescriptors = 3.
5.0
zope.catalog = 3.8.0
zope.component = 3.
5.1
zope.component = 3.
6.0
zope.configuration = 3.6.0
zope.container = 3.
7
.1
zope.contentprovider = 3.
4
.0
zope.container = 3.
8
.1
zope.contentprovider = 3.
5
.0
zope.contenttype = 3.4.1
zope.copy = 3.5.0
zope.copypastemove = 3.5.1
...
...
@@ -91,26 +92,28 @@ zope.documenttemplate = 3.4.2
zope.dottedname = 3.4.5
zope.dublincore = 3.4.2
zope.error = 3.6.0
zope.event = 3.4.
0
zope.event = 3.4.
1
zope.exceptions = 3.5.2
zope.filerepresentation = 3.5.0
zope.formlib = 3.5.2
zope.hookable = 3.4.1
zope.i18n = 3.
6
.0
zope.i18n = 3.
7
.0
zope.i18nmessageid = 3.4.3
zope.index = 3.5.1
zope.interface = 3.5.
0
zope.interface = 3.5.
1
zope.intid = 3.7.0
zope.keyreference = 3.6.1
zope.lifecycleevent = 3.5.
0
zope.lifecycleevent = 3.5.
1
zope.location = 3.5.3
zope.minmax = 1.1.0
zope.pagetemplate = 3.4.1
zope.password = 3.5.1
zope.pagetemplate = 3.4.2
zope.principalannotation = 3.6.0
zope.proxy = 3.5.0
zope.publisher = 3.
5.7
zope.schema = 3.5.
2
zope.publisher = 3.
6.4
zope.schema = 3.5.
4
zope.security = 3.6.3
zope.securitypolicy = 3.
5
.0
zope.securitypolicy = 3.
6
.0
zope.sendmail = 3.5.1
zope.sequencesort = 3.4.0
zope.server = 3.5.0
...
...
@@ -121,6 +124,6 @@ zope.structuredtext = 3.4.0
zope.tal = 3.5.1
zope.tales = 3.4.0
zope.testbrowser = 3.6.0a2
zope.testing = 3.7.
1
zope.traversing = 3.
5.2
zope.testing = 3.7.
3
zope.traversing = 3.
6.0
zope.viewlet = 3.5.0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment