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
eaf92072
Commit
eaf92072
authored
Mar 04, 2011
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- made sure getConfiguration().default_zpublisher_encoding is set correctly
parent
a904f4f1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
doc/CHANGES.rst
doc/CHANGES.rst
+3
-1
src/Zope2/Startup/datatypes.py
src/Zope2/Startup/datatypes.py
+2
-2
src/Zope2/Startup/tests/test_schema.py
src/Zope2/Startup/tests/test_schema.py
+13
-1
src/Zope2/Startup/zopeschema.xml
src/Zope2/Startup/zopeschema.xml
+3
-2
No files found.
doc/CHANGES.rst
View file @
eaf92072
...
@@ -10,7 +10,9 @@ http://docs.zope.org/zope2/releases/.
...
@@ -10,7 +10,9 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
Bugs Fixed
++++++++++
++++++++++
- Made sure getConfiguration().default_zpublisher_encoding is set correctly.
- LP #713253: Prevent publication of acquired attributes, where the acquired
- LP #713253: Prevent publication of acquired attributes, where the acquired
object does not have a docstring.
object does not have a docstring.
...
...
src/Zope2/Startup/datatypes.py
View file @
eaf92072
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
# FOR A PARTICULAR PURPOSE.
# FOR A PARTICULAR PURPOSE.
#
#
##############################################################################
##############################################################################
"""Datatypes for the Zope schema for use with ZConfig."""
"""Datatypes for the Zope schema for use with ZConfig."""
import
os
import
os
...
@@ -228,7 +227,7 @@ class ZopeDatabase(ZODBDatabase):
...
@@ -228,7 +227,7 @@ class ZopeDatabase(ZODBDatabase):
container_class
=
'OFS.Folder.Folder'
container_class
=
'OFS.Folder.Folder'
return
(
real_root
,
real_path
,
container_class
)
return
(
real_root
,
real_path
,
container_class
)
raise
LookupError
(
'Nothing known about mount path %s'
%
mount_path
)
raise
LookupError
(
'Nothing known about mount path %s'
%
mount_path
)
def
default_zpublisher_encoding
(
value
):
def
default_zpublisher_encoding
(
value
):
# This is a bit clunky but necessary :-(
# This is a bit clunky but necessary :-(
# These modules are imported during the configuration process
# These modules are imported during the configuration process
...
@@ -239,6 +238,7 @@ def default_zpublisher_encoding(value):
...
@@ -239,6 +238,7 @@ def default_zpublisher_encoding(value):
Converters
.
default_encoding
=
value
Converters
.
default_encoding
=
value
HTTPRequest
.
default_encoding
=
value
HTTPRequest
.
default_encoding
=
value
HTTPResponse
.
default_encoding
=
value
HTTPResponse
.
default_encoding
=
value
return
value
class
DBTab
:
class
DBTab
:
"""A Zope database configuration, similar in purpose to /etc/fstab.
"""A Zope database configuration, similar in purpose to /etc/fstab.
...
...
src/Zope2/Startup/tests/test_schema.py
View file @
eaf92072
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
# FOR A PARTICULAR PURPOSE.
# FOR A PARTICULAR PURPOSE.
#
#
##############################################################################
##############################################################################
"""Test that the Zope schema can be loaded."""
"""Test that the Zope schema can be loaded."""
import
os
import
os
...
@@ -221,5 +220,18 @@ class StartupTestCase(unittest.TestCase):
...
@@ -221,5 +220,18 @@ class StartupTestCase(unittest.TestCase):
"""
)
"""
)
self
.
assertEqual
(
conf
.
max_conflict_retries
,
15
)
self
.
assertEqual
(
conf
.
max_conflict_retries
,
15
)
def
test_default_zpublisher_encoding
(
self
):
conf
,
dummy
=
self
.
load_config_text
(
"""
\
instancehome <<INSTANCE_HOME>>
"""
)
self
.
assertEqual
(
conf
.
default_zpublisher_encoding
,
'iso-8859-15'
)
conf
,
dummy
=
self
.
load_config_text
(
"""
\
instancehome <<INSTANCE_HOME>>
default-zpublisher-encoding utf-8
"""
)
self
.
assertEqual
(
conf
.
default_zpublisher_encoding
,
'utf-8'
)
def
test_suite
():
def
test_suite
():
return
unittest
.
makeSuite
(
StartupTestCase
)
return
unittest
.
makeSuite
(
StartupTestCase
)
src/Zope2/Startup/zopeschema.xml
View file @
eaf92072
...
@@ -877,12 +877,13 @@
...
@@ -877,12 +877,13 @@
<section
type=
"zoperunner"
name=
"*"
attribute=
"runner"
/>
<section
type=
"zoperunner"
name=
"*"
attribute=
"runner"
/>
<key
name=
"default-zpublisher-encoding"
datatype=
".default_zpublisher_encoding"
>
<key
name=
"default-zpublisher-encoding"
datatype=
".default_zpublisher_encoding"
default=
"iso-8859-15"
>
<description>
<description>
This key controls what character set is used to encode unicode
This key controls what character set is used to encode unicode
data that reaches ZPublisher without any other specified encoding.
data that reaches ZPublisher without any other specified encoding.
</description>
</description>
<metadefault>
iso-8859-15
</metadefault>
</key>
</key>
<abstracttype
name=
"zope.product.base"
>
<abstracttype
name=
"zope.product.base"
>
...
...
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