Changeset 52566
- Timestamp:
- 02/15/08 01:05:04 (8 months ago)
- Files:
-
- vendor/zasync/branches/1.1-nux/CHANGES (modified) (1 diff)
- vendor/zasync/branches/1.1-nux/bucketqueue.py (modified) (2 diffs)
- vendor/zasync/branches/1.1-nux/client/zasync/config.py (modified) (4 diffs)
- vendor/zasync/branches/1.1-nux/client/zasync/schema.xml (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/zasync/branches/1.1-nux/CHANGES
r51972 r52566 4 4 New features: 5 5 ~~~~~~~~~~~~~ 6 - 6 - Works with Zope2.9.x now 7 7 Bug fixes: 8 8 ~~~~~~~~~~ vendor/zasync/branches/1.1-nux/bucketqueue.py
r52565 r52566 7 7 from time import time as _time, sleep as _sleep 8 8 import sets 9 import sys 9 10 try: 10 11 import thread … … 21 22 """ 22 23 def __init__(self, maxsize=0): 24 Queue.__init__(self, maxsize) 25 self._bucketsema = {} # bucket name to bucket semaphore 26 self._threadbucket = {} # thread id to bucket name 23 27 # in Queue, fsema presumably stands for (not) full semaphore, and esema 24 28 # stands for (not) empty semaphore. For us, esema will mean "primed" 25 29 # or "available" semaphore. 26 Queue.__init__(self, maxsize) 27 self._bucketsema = {} # bucket name to bucket semaphore 28 self._threadbucket = {} # thread id to bucket name 30 # Handle change in Queue.py module 31 if sys.version_info[:2] >= (2, 4): 32 self.fsema = thread.allocate_lock() 33 self.esema = thread.allocate_lock() 34 self.esema.acquire() 29 35 30 36 def primed(self): vendor/zasync/branches/1.1-nux/client/zasync/config.py
r52560 r52566 20 20 21 21 specified_version = None 22 23 try: 24 # Zope-2.9.x 25 from Zope2.Startup.handlers import * 26 except ImportError: 27 pass 22 28 23 29 def root_handler(config): … … 230 236 name, point)) 231 237 mount_points[point] = name 232 from DBTab.DBTab import DBTab 238 239 try: 240 # Zope-2.9.x 241 from Zope2.Startup.datatypes import DBTab 242 except ImportError: 243 # <= Zope-2.8.x 244 from DBTab.DBTab import DBTab 245 233 246 section.dbtab = DBTab(mount_factories, mount_points) 234 247 … … 289 302 # a rush, I might try, but an explicit version argument will do the trick. 290 303 global specified_version 291 if version < 2.7 or version >= 2.9: 292 raise RuntimeError('zasync only supports Zope 2.7.x and Zope 2.8.x') 304 if version < 2.7 or version > 2.9: 305 raise RuntimeError('zasync only supports Zope 2.7.x, 2.8.x and 2.9.x') 306 293 307 mydir = os.path.dirname(__file__) 294 308 specified_version = version 295 309 if version < 2.8: 296 310 schema = 'schema27.xml' 311 elif version == 2.8: 312 schema = 'schema28.xml' 297 313 else: 298 314 schema = 'schema.xml' … … 306 322 if conffile is None: conffile = sys.argv[1] 307 323 conf, handler = ZConfig.loadConfig(schema, conffile) 308 handler({'root_handler':root_handler}) 324 handlers = {'root_handler':root_handler} 325 if version == 2.9: 326 handlers['rest_output_encoding'] = rest_output_encoding 327 handlers['rest_input_encoding'] = rest_input_encoding 328 handlers['rest_header_level'] = rest_header_level 329 handlers['rest_language_code'] = rest_language_code 330 handler(handlers) 309 331 return conf vendor/zasync/branches/1.1-nux/client/zasync/schema.xml
r33161 r52566 20 20 <import package="ZODB"/> 21 21 <import package="tempstorage" /> 22 23 <!-- for Zope 2.9 --> 24 22 25 23 26 <sectiontype name="plugin" datatype="zasync.config.plugin"> … … 111 114 <description> 112 115 The mount point is the slash-separated path to which this database 113 will be mounted within the Zope application server. 116 will be mounted within the Zope application server. If the path 117 on the ZEO server is different from the path of the mount point then 118 you can use a notation "path_on_client:path_on_zeo_server". 114 119 </description> 115 120 </multikey> … … 124 129 125 130 <key name="class-factory" datatype=".importable_name" 126 default=" DBTab.ClassFactories.autoClassFactory">131 default="Zope2.Startup.datatypes.zopeClassFactory"> 127 132 <description> 128 133 Change the class factory function a database uses on a … … 141 146 142 147 </sectiontype> 148 143 149 144 150 <!-- end sectiontype defs, begin section and key defs --> … … 254 260 </key> 255 261 262 <!-- For Zope-2.9 --> 263 264 <key name="rest-output-encoding" handler="rest_output_encoding"> 265 <description> 266 Specifies the output encoding of re-StructuredText documents 267 (e.g. 'utf-8', 'iso-8859' or any other valid encoding recognized 268 by Python). The default is your Python's default encoding. 269 </description> 270 <metadefault>unset</metadefault> 271 </key> 272 <key name="rest-input-encoding" handler="rest_input_encoding"> 273 <description> 274 Specifies the input encoding of re-StructuredText documents 275 (e.g. 'utf-8', 'iso-8859' or any other valid encoding recognized 276 by Python). The default is your Python's default encoding. 277 </description> 278 <metadefault>unset</metadefault> 279 </key> 280 <key name="rest-header-level" datatype="integer" default="3" 281 handler="rest_header_level"> 282 <description> 283 Set the default starting HTML header level for restructured text 284 documents. The default is 3, which implies that top-level headers 285 will be created with an H3 HTML tag. 286 </description> 287 <metadefault>3</metadefault> 288 </key> 289 <key name="rest-language-code" handler="rest_language_code" default="en"> 290 <description> 291 Language code used for some internal translations inside of the docutils 292 package and for DTD bibliographic elements mapping. See 293 lib/python/docutils/languages/ for a list of supported language codes. 294 </description> 295 <metadefault>en</metadefault> 296 </key> 297 298 <!-- End for Zope-2.9 --> 299 300 256 301 <multisection type="ZODB.Database" name="+" attribute="databases"> 257 302 <description>
