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
88a1abe6
Commit
88a1abe6
authored
Oct 24, 2003
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support Python 2.3 BooleanType in ZTUtils.
parent
cd2bdf3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/ZPublisher/Converters.py
lib/python/ZPublisher/Converters.py
+3
-2
lib/python/ZTUtils/Zope.py
lib/python/ZTUtils/Zope.py
+10
-2
No files found.
doc/CHANGES.txt
View file @
88a1abe6
...
...
@@ -15,6 +15,9 @@ Zope Changes
(such as storages, databases, or logging handlers) to be used.
Bugs fixed
- Python 2.3 BooleanType wasn't handled properly by ZTUtils
marshalling and ZPublisher's converters.
- Collector #1065: bin/ scripts didn't export HOME envars.
- Collector #572: WebDAV GET protected by 'FTP Access' permission.
...
...
lib/python/ZPublisher/Converters.py
View file @
88a1abe6
...
...
@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__version__
=
'$Revision: 1.2
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
4
$'
[
11
:
-
2
]
import
re
from
types
import
ListType
,
TupleType
,
UnicodeType
...
...
@@ -101,7 +101,6 @@ def field2lines(v):
return
field2text
(
v
).
split
(
'
\
n
'
)
def
field2date
(
v
):
v
=
field2string
(
v
)
try
:
v
=
DateTime
(
v
)
...
...
@@ -118,6 +117,8 @@ def field2date_international(v):
return
v
def
field2boolean
(
v
):
if
v
==
'False'
:
return
not
1
return
not
not
v
class
_unicode_converter
:
...
...
lib/python/ZTUtils/Zope.py
View file @
88a1abe6
...
...
@@ -12,8 +12,8 @@
##############################################################################
__doc__
=
'''Zope-specific versions of ZTUTils classes
$Id: Zope.py,v 1.1
2 2003/07/03 21:44:59 casem
an Exp $'''
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
$Id: Zope.py,v 1.1
3 2003/10/24 20:16:08 ev
an Exp $'''
__version__
=
'$Revision: 1.1
3
$'
[
11
:
-
2
]
import
sys
,
cgi
,
urllib
,
cgi
from
Tree
import
encodeExpansion
,
decodeExpansion
,
TreeMaker
...
...
@@ -36,6 +36,12 @@ except ImportError:
else
:
from
AccessControl
import
Unauthorized
# Support pre-Python 2.3 :-(
try
:
from
types
import
BooleanType
except
ImportError
:
BooleanType
=
None
class
LazyFilter
(
Lazy
):
# A LazyFilter that checks with the security policy
...
...
@@ -255,6 +261,8 @@ def complex_marshal(pairs):
def
simple_marshal
(
v
):
if
isinstance
(
v
,
StringType
):
return
''
if
BooleanType
and
isinstance
(
v
,
BooleanType
):
return
':boolean'
if
isinstance
(
v
,
IntType
):
return
':int'
if
isinstance
(
v
,
FloatType
):
...
...
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