[Zope3-checkins] CVS: Zope3/src/zope/schema - __init__.py:1.16 _field.py:1.26 interfaces.py:1.35

sree sree at mahiti.org
Wed Dec 17 05:48:52 EST 2003


Update of /cvs-repository/Zope3/src/zope/schema
In directory cvs.zope.org:/tmp/cvs-serv6990/src/zope/schema

Modified Files:
	__init__.py _field.py interfaces.py 
Log Message:
uploading changes to schema/__init__.py


=== Zope3/src/zope/schema/__init__.py 1.15 => 1.16 ===
--- Zope3/src/zope/schema/__init__.py:1.15	Fri Nov  7 17:35:10 2003
+++ Zope3/src/zope/schema/__init__.py	Wed Dec 17 05:48:51 2003
@@ -18,7 +18,7 @@
 
 from zope.schema._field import Field, Container, Iterable, Orderable
 from zope.schema._field import MinMaxLen, Enumerated, Sequence
-from zope.schema._field import Bytes, BytesLine
+from zope.schema._field import Bytes, ASCII, BytesLine
 from zope.schema._field import Text, TextLine, Bool, Int, Float, Tuple, List
 from zope.schema._field import Password, Dict, Datetime, Date, SourceText
 from zope.schema._field import Object, URI, Id, DottedName


=== Zope3/src/zope/schema/_field.py 1.25 => 1.26 ===
--- Zope3/src/zope/schema/_field.py:1.25	Wed Dec 17 04:51:42 2003
+++ Zope3/src/zope/schema/_field.py	Wed Dec 17 05:48:51 2003
@@ -32,7 +32,7 @@
 from zope.schema.interfaces import IMinMaxLen, IText, ITextLine
 from zope.schema.interfaces import ISourceText
 from zope.schema.interfaces import IInterfaceField
-from zope.schema.interfaces import IBool, IInt, IBytes, IBytesLine, IFloat
+from zope.schema.interfaces import IBool, IInt, IBytes, IASCII, IBytesLine, IFloat
 from zope.schema.interfaces import IDatetime, ISequence, ITuple, IList, IDict
 from zope.schema.interfaces import IPassword, IObject, IDate
 from zope.schema.interfaces import IEnumeratedDatetime, IEnumeratedTextLine
@@ -92,6 +92,11 @@
         v = str(u)
         self.validate(v)
         return v
+
+class ASCII(Bytes):
+    __doc__ = IASCII.__doc__
+    implements(IASCII)
+    
 
 class BytesLine(Bytes):
     """A Text field with no newlines."""


=== Zope3/src/zope/schema/interfaces.py 1.34 => 1.35 ===
--- Zope3/src/zope/schema/interfaces.py:1.34	Wed Oct 15 16:28:22 2003
+++ Zope3/src/zope/schema/interfaces.py	Wed Dec 17 05:48:51 2003
@@ -262,6 +262,18 @@
 
     The value might be contrained to be with length limits.
     """
+class IBytes(IMinMaxLen, IEnumerated, IIterable, IField):
+    # XXX IEnumerated will be removed in the future.
+    u"""Field containing a byte data(binary!).
+
+    The value might be contrained to be with length limits.
+    """
+class IASCII(IMinMaxLen, IEnumerated, IIterable, IField):
+    # XXX IEnumerated will be removed in the future.
+    u"""Field containing a byte string (like the python str).
+
+    The value might be contrained to be with length limits.
+    """
 
 class IBytesLine(IBytes):
     u"""Field containing a byte string without newlines."""




More information about the Zope3-Checkins mailing list