Merge lp:~logan/ubuntu/quantal/zconfig/new-upstream into lp:ubuntu/quantal/zconfig

Proposed by Logan Rosen
Status: Merged
Merged at revision: 9
Proposed branch: lp:~logan/ubuntu/quantal/zconfig/new-upstream
Merge into: lp:ubuntu/quantal/zconfig
Diff against target: 1219 lines (+557/-189)
24 files modified
NEWS.txt (+26/-0)
PKG-INFO (+28/-2)
ZConfig.egg-info/PKG-INFO (+28/-2)
ZConfig/cfgparser.py (+2/-1)
ZConfig/components/basic/tests/test_mapping.py (+4/-3)
ZConfig/components/logger/loghandler.py (+6/-2)
ZConfig/components/logger/tests/test_logger.py (+112/-93)
ZConfig/datatypes.py (+37/-6)
ZConfig/tests/support.py (+4/-2)
ZConfig/tests/test_cfgimports.py (+2/-1)
ZConfig/tests/test_cmdline.py (+4/-4)
ZConfig/tests/test_config.py (+3/-1)
ZConfig/tests/test_cookbook.py (+2/-3)
ZConfig/tests/test_datatypes.py (+12/-1)
ZConfig/tests/test_loader.py (+2/-2)
ZConfig/tests/test_readme.py (+12/-10)
ZConfig/tests/test_schema.py (+2/-2)
ZConfig/tests/test_schemaless.py (+1/-4)
bootstrap.py (+237/-29)
buildout.cfg (+8/-3)
debian/changelog (+7/-0)
debian/control (+1/-1)
doc/zconfig.tex (+7/-5)
setup.py (+10/-12)
To merge this branch: bzr merge lp:~logan/ubuntu/quantal/zconfig/new-upstream
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Ubuntu branches Pending
Review via email: mp+115046@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Looks good, thanks! I will sponsor it. Please submit a bug in Debian for them to update to the latest version, and then create a bug in Launchpad that links to it. This way, we can resync to Debian when the new version is available there.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS.txt'
--- NEWS.txt 2011-03-24 18:29:45 +0000
+++ NEWS.txt 2012-07-15 23:54:18 +0000
@@ -3,6 +3,32 @@
3==========================3==========================
44
55
6ZConfig 2.9.3 (2012-06-25)
7--------------------------
8
9- Fixed: port values of 0 weren't allowed. Port 0 is used to request
10 an ephemeral port.
11
12ZConfig 2.9.2 (2012-02-11)
13--------------------------
14
15- Adjust test classes to avoid base classes being considered separate
16 test cases by (at least) the "nose" test runner.
17
18
19ZConfig 2.9.1 (2012-02-11)
20--------------------------
21
22- Make FileHandler.reopen thread safe.
23
24
25ZConfig 2.9.0 (2011-03-22)
26--------------------------
27
28- Allow identical redefinition of ``%define`` names.
29- Added support for IPv6 addresses.
30
31
6ZConfig 2.8.0 (2010-04-13)32ZConfig 2.8.0 (2010-04-13)
7--------------------------33--------------------------
834
935
=== modified file 'PKG-INFO'
--- PKG-INFO 2011-03-24 18:29:45 +0000
+++ PKG-INFO 2012-07-15 23:54:18 +0000
@@ -1,6 +1,6 @@
1Metadata-Version: 1.01Metadata-Version: 1.0
2Name: ZConfig2Name: ZConfig
3Version: 2.8.03Version: 2.9.3
4Summary: Structured Configuration Library4Summary: Structured Configuration Library
5Home-page: http://www.zope.org/Members/fdrake/zconfig/5Home-page: http://www.zope.org/Members/fdrake/zconfig/
6Author: Zope Foundation and Contributors6Author: Zope Foundation and Contributors
@@ -107,6 +107,32 @@
107 ==========================107 ==========================
108 108
109 109
110 ZConfig 2.9.3 (2012-06-25)
111 --------------------------
112
113 - Fixed: port values of 0 weren't allowed. Port 0 is used to request
114 an ephemeral port.
115
116 ZConfig 2.9.2 (2012-02-11)
117 --------------------------
118
119 - Adjust test classes to avoid base classes being considered separate
120 test cases by (at least) the "nose" test runner.
121
122
123 ZConfig 2.9.1 (2012-02-11)
124 --------------------------
125
126 - Make FileHandler.reopen thread safe.
127
128
129 ZConfig 2.9.0 (2011-03-22)
130 --------------------------
131
132 - Allow identical redefinition of ``%define`` names.
133 - Added support for IPv6 addresses.
134
135
110 ZConfig 2.8.0 (2010-04-13)136 ZConfig 2.8.0 (2010-04-13)
111 --------------------------137 --------------------------
112 138
@@ -320,4 +346,4 @@
320Classifier: Programming Language :: Python :: 2.4346Classifier: Programming Language :: Python :: 2.4
321Classifier: Programming Language :: Python :: 2.5347Classifier: Programming Language :: Python :: 2.5
322Classifier: Programming Language :: Python :: 2.6348Classifier: Programming Language :: Python :: 2.6
323Classifier: Topic :: Software Development :: Libraries :: Python Modules349Classifier: Programming Language :: Python :: 2.7
324350
=== modified file 'ZConfig.egg-info/PKG-INFO'
--- ZConfig.egg-info/PKG-INFO 2011-03-24 18:29:45 +0000
+++ ZConfig.egg-info/PKG-INFO 2012-07-15 23:54:18 +0000
@@ -1,6 +1,6 @@
1Metadata-Version: 1.01Metadata-Version: 1.0
2Name: ZConfig2Name: ZConfig
3Version: 2.8.03Version: 2.9.3
4Summary: Structured Configuration Library4Summary: Structured Configuration Library
5Home-page: http://www.zope.org/Members/fdrake/zconfig/5Home-page: http://www.zope.org/Members/fdrake/zconfig/
6Author: Zope Foundation and Contributors6Author: Zope Foundation and Contributors
@@ -107,6 +107,32 @@
107 ==========================107 ==========================
108 108
109 109
110 ZConfig 2.9.3 (2012-06-25)
111 --------------------------
112
113 - Fixed: port values of 0 weren't allowed. Port 0 is used to request
114 an ephemeral port.
115
116 ZConfig 2.9.2 (2012-02-11)
117 --------------------------
118
119 - Adjust test classes to avoid base classes being considered separate
120 test cases by (at least) the "nose" test runner.
121
122
123 ZConfig 2.9.1 (2012-02-11)
124 --------------------------
125
126 - Make FileHandler.reopen thread safe.
127
128
129 ZConfig 2.9.0 (2011-03-22)
130 --------------------------
131
132 - Allow identical redefinition of ``%define`` names.
133 - Added support for IPv6 addresses.
134
135
110 ZConfig 2.8.0 (2010-04-13)136 ZConfig 2.8.0 (2010-04-13)
111 --------------------------137 --------------------------
112 138
@@ -320,4 +346,4 @@
320Classifier: Programming Language :: Python :: 2.4346Classifier: Programming Language :: Python :: 2.4
321Classifier: Programming Language :: Python :: 2.5347Classifier: Programming Language :: Python :: 2.5
322Classifier: Programming Language :: Python :: 2.6348Classifier: Programming Language :: Python :: 2.6
323Classifier: Topic :: Software Development :: Libraries :: Python Modules349Classifier: Programming Language :: Python :: 2.7
324350
=== modified file 'ZConfig/cfgparser.py'
--- ZConfig/cfgparser.py 2011-03-24 18:29:45 +0000
+++ ZConfig/cfgparser.py 2012-07-15 23:54:18 +0000
@@ -160,7 +160,8 @@
160 if len(parts) == 2:160 if len(parts) == 2:
161 defvalue = parts[1]161 defvalue = parts[1]
162 if self.defines.has_key(defname):162 if self.defines.has_key(defname):
163 self.error("cannot redefine " + `defname`)163 if self.defines[defname] != defvalue:
164 self.error("cannot redefine " + `defname`)
164 if not isname(defname):165 if not isname(defname):
165 self.error("not a substitution legal name: " + `defname`)166 self.error("not a substitution legal name: " + `defname`)
166 self.defines[defname] = self.replace(defvalue)167 self.defines[defname] = self.replace(defvalue)
167168
=== modified file 'ZConfig/components/basic/tests/test_mapping.py'
--- ZConfig/components/basic/tests/test_mapping.py 2011-03-24 18:29:45 +0000
+++ ZConfig/components/basic/tests/test_mapping.py 2012-07-15 23:54:18 +0000
@@ -15,10 +15,9 @@
15"""Tests of the 'basic' section types provided as part of15"""Tests of the 'basic' section types provided as part of
16ZConfig.components.basic."""16ZConfig.components.basic."""
1717
18import ZConfig.tests.support
18import unittest19import unittest
1920
20from ZConfig.tests import support
21
2221
23SIMPLE_SCHEMA = '''\22SIMPLE_SCHEMA = '''\
24<schema>23<schema>
@@ -43,7 +42,9 @@
43'''42'''
4443
4544
46class BasicSectionTypeTestCase(support.TestBase):45class BasicSectionTypeTestCase(
46 ZConfig.tests.support.TestHelper, unittest.TestCase):
47
47 schema = None48 schema = None
4849
49 def setUp(self):50 def setUp(self):
5051
=== modified file 'ZConfig/components/logger/loghandler.py'
--- ZConfig/components/logger/loghandler.py 2011-03-24 18:29:45 +0000
+++ ZConfig/components/logger/loghandler.py 2012-07-15 23:54:18 +0000
@@ -84,8 +84,12 @@
84 _remove_from_reopenable(self._wr)84 _remove_from_reopenable(self._wr)
8585
86 def reopen(self):86 def reopen(self):
87 self.stream.close()87 self.acquire()
88 self.stream = open(self.baseFilename, self.mode)88 try:
89 self.stream.close()
90 self.stream = open(self.baseFilename, self.mode)
91 finally:
92 self.release()
8993
9094
91class Win32FileHandler(FileHandler):95class Win32FileHandler(FileHandler):
9296
=== modified file 'ZConfig/components/logger/tests/test_logger.py'
--- ZConfig/components/logger/tests/test_logger.py 2011-03-24 18:29:45 +0000
+++ ZConfig/components/logger/tests/test_logger.py 2012-07-15 23:54:18 +0000
@@ -41,7 +41,10 @@
41 return sio.getvalue() + "... Don't panic!"41 return sio.getvalue() + "... Don't panic!"
4242
4343
44class LoggingTestBase(unittest.TestCase):44class LoggingTestHelper:
45
46 # Not derived from unittest.TestCase; some test runners seem to
47 # think that means this class contains tests.
4548
46 # XXX This tries to save and restore the state of logging around49 # XXX This tries to save and restore the state of logging around
47 # the test. Somewhat surgical; there may be a better way.50 # the test. Somewhat surgical; there may be a better way.
@@ -100,7 +103,7 @@
100 return conf103 return conf
101104
102105
103class TestConfig(LoggingTestBase):106class TestConfig(LoggingTestHelper, unittest.TestCase):
104107
105 _schematext = """108 _schematext = """
106 <schema>109 <schema>
@@ -404,10 +407,12 @@
404 return logger407 return logger
405408
406409
407class TestReopeningLogfilesBase(LoggingTestBase):410class TestReopeningRotatingLogfiles(LoggingTestHelper, unittest.TestCase):
408411
409 # These tests should not be run on Windows.412 # These tests should not be run on Windows.
410413
414 handler_factory = loghandler.RotatingFileHandler
415
411 _schematext = """416 _schematext = """
412 <schema>417 <schema>
413 <import package='ZConfig.components.logger'/>418 <import package='ZConfig.components.logger'/>
@@ -415,6 +420,40 @@
415 </schema>420 </schema>
416 """421 """
417422
423 _sampleconfig_template = """
424 <logger>
425 name foo.bar
426 <logfile>
427 path %(path0)s
428 level debug
429 max-size 1mb
430 old-files 10
431 </logfile>
432 <logfile>
433 path %(path1)s
434 level info
435 max-size 1mb
436 old-files 3
437 </logfile>
438 <logfile>
439 path %(path1)s
440 level info
441 when D
442 old-files 3
443 </logfile>
444 </logger>
445
446 <logger>
447 name bar.foo
448 <logfile>
449 path %(path2)s
450 level info
451 max-size 10mb
452 old-files 10
453 </logfile>
454 </logger>
455 """
456
418 def test_filehandler_reopen(self):457 def test_filehandler_reopen(self):
419458
420 def mkrecord(msg):459 def mkrecord(msg):
@@ -458,7 +497,59 @@
458 self.assert_("message 4" in text2)497 self.assert_("message 4" in text2)
459 self.assert_("message 5" in text3)498 self.assert_("message 5" in text3)
460499
461class TestReopeningLogfiles(TestReopeningLogfilesBase):500 def test_logfile_reopening(self):
501 #
502 # This test only applies to the simple logfile reopening; it
503 # doesn't work the same way as the rotating logfile handler.
504 #
505 paths = self.mktemp(), self.mktemp(), self.mktemp()
506 d = {
507 "path0": paths[0],
508 "path1": paths[1],
509 "path2": paths[2],
510 }
511 text = self._sampleconfig_template % d
512 conf = self.get_config(text)
513 self.assertEqual(len(conf.loggers), 2)
514 # Build the loggers from the configuration, and write to them:
515 conf.loggers[0]().info("message 1")
516 conf.loggers[1]().info("message 2")
517 #
518 # We expect this to re-open the original filenames, so we'll
519 # have six files instead of three.
520 #
521 loghandler.reopenFiles()
522 #
523 # Write to them again:
524 conf.loggers[0]().info("message 3")
525 conf.loggers[1]().info("message 4")
526 #
527 # We expect this to re-open the original filenames, so we'll
528 # have nine files instead of six.
529 #
530 loghandler.reopenFiles()
531 #
532 # Write to them again:
533 conf.loggers[0]().info("message 5")
534 conf.loggers[1]().info("message 6")
535 #
536 # We should now have all nine files:
537 for fn in paths:
538 fn1 = fn + ".1"
539 fn2 = fn + ".2"
540 self.assert_(os.path.isfile(fn), "%r must exist" % fn)
541 self.assert_(os.path.isfile(fn1), "%r must exist" % fn1)
542 self.assert_(os.path.isfile(fn2), "%r must exist" % fn2)
543 #
544 # Clean up:
545 for logger in conf.loggers:
546 logger = logger()
547 for handler in logger.handlers[:]:
548 logger.removeHandler(handler)
549 handler.close()
550
551
552class TestReopeningLogfiles(TestReopeningRotatingLogfiles):
462553
463 handler_factory = loghandler.FileHandler554 handler_factory = loghandler.FileHandler
464555
@@ -537,95 +628,23 @@
537 logger.removeHandler(handler)628 logger.removeHandler(handler)
538 handler.close()629 handler.close()
539630
540631 def test_filehandler_reopen_thread_safety(self):
541class TestReopeningRotatingLogfiles(TestReopeningLogfilesBase):632 # The reopen method needs to do locking to avoid a race condition
542633 # with emit calls. For simplicity we replace the "acquire" and
543 _sampleconfig_template = """634 # "release" methods with dummies that record calls to them.
544 <logger>635
545 name foo.bar636 fn = self.mktemp()
546 <logfile>637 h = self.handler_factory(fn)
547 path %(path0)s638
548 level debug639 calls = []
549 max-size 1mb640 h.acquire = lambda: calls.append("acquire")
550 old-files 10641 h.release = lambda: calls.append("release")
551 </logfile>642
552 <logfile>643 h.reopen()
553 path %(path1)s644 h.close()
554 level info645
555 max-size 1mb646 self.assertEqual(calls, ["acquire", "release"])
556 old-files 3647
557 </logfile>
558 <logfile>
559 path %(path1)s
560 level info
561 when D
562 old-files 3
563 </logfile>
564 </logger>
565
566 <logger>
567 name bar.foo
568 <logfile>
569 path %(path2)s
570 level info
571 max-size 10mb
572 old-files 10
573 </logfile>
574 </logger>
575 """
576
577 handler_factory = loghandler.RotatingFileHandler
578
579 def test_logfile_reopening(self):
580 #
581 # This test only applies to the simple logfile reopening; it
582 # doesn't work the same way as the rotating logfile handler.
583 #
584 paths = self.mktemp(), self.mktemp(), self.mktemp()
585 d = {
586 "path0": paths[0],
587 "path1": paths[1],
588 "path2": paths[2],
589 }
590 text = self._sampleconfig_template % d
591 conf = self.get_config(text)
592 self.assertEqual(len(conf.loggers), 2)
593 # Build the loggers from the configuration, and write to them:
594 conf.loggers[0]().info("message 1")
595 conf.loggers[1]().info("message 2")
596 #
597 # We expect this to re-open the original filenames, so we'll
598 # have six files instead of three.
599 #
600 loghandler.reopenFiles()
601 #
602 # Write to them again:
603 conf.loggers[0]().info("message 3")
604 conf.loggers[1]().info("message 4")
605 #
606 # We expect this to re-open the original filenames, so we'll
607 # have nine files instead of six.
608 #
609 loghandler.reopenFiles()
610 #
611 # Write to them again:
612 conf.loggers[0]().info("message 5")
613 conf.loggers[1]().info("message 6")
614 #
615 # We should now have all nine files:
616 for fn in paths:
617 fn1 = fn + ".1"
618 fn2 = fn + ".2"
619 self.assert_(os.path.isfile(fn), "%r must exist" % fn)
620 self.assert_(os.path.isfile(fn1), "%r must exist" % fn1)
621 self.assert_(os.path.isfile(fn2), "%r must exist" % fn2)
622 #
623 # Clean up:
624 for logger in conf.loggers:
625 logger = logger()
626 for handler in logger.handlers[:]:
627 logger.removeHandler(handler)
628 handler.close()
629648
630def test_logger_convenience_function_and_ommiting_name_to_get_root_logger():649def test_logger_convenience_function_and_ommiting_name_to_get_root_logger():
631 """650 """
632651
=== modified file 'ZConfig/datatypes.py'
--- ZConfig/datatypes.py 2011-03-24 18:29:45 +0000
+++ ZConfig/datatypes.py 2012-07-15 23:54:18 +0000
@@ -164,7 +164,7 @@
164 return s.split()164 return s.split()
165165
166166
167port_number = RangeCheckedConversion(integer, min=1, max=0xffff).__call__167port_number = RangeCheckedConversion(integer, min=0, max=0xffff).__call__
168168
169169
170class InetAddress:170class InetAddress:
@@ -177,9 +177,17 @@
177 host = ''177 host = ''
178 port = None178 port = None
179 if ":" in s:179 if ":" in s:
180 host, s = s.split(":", 1)180 host, p = s.rsplit(":", 1)
181 if s:181 if host.startswith('[') and host.endswith(']'):
182 port = port_number(s)182 # [IPv6]:port
183 host = host[1:-1]
184 elif ':' in host:
185 # Unbracketed IPv6 address;
186 # last part is not the port number
187 host = s
188 p = None
189 if p: # else leave port at None
190 port = port_number(p)
183 host = host.lower()191 host = host.lower()
184 else:192 else:
185 try:193 try:
@@ -203,6 +211,14 @@
203inet_binding_address = InetAddress("")211inet_binding_address = InetAddress("")
204212
205class SocketAddress:213class SocketAddress:
214 # Parsing results in family and address
215 # Family can be AF_UNIX (for addresses that are path names)
216 # or AF_INET6 (for inet addresses with colons in them)
217 # or AF_INET (for all other inet addresses);
218 # An inet address is a (host, port) pair
219 # Notice that no DNS lookup is performed, so if the host
220 # is a DNS name, DNS lookup may end up with either IPv4 or
221 # IPv6 addresses, or both
206 def __init__(self, s):222 def __init__(self, s):
207 import socket223 import socket
208 if "/" in s or s.find(os.sep) >= 0:224 if "/" in s or s.find(os.sep) >= 0:
@@ -211,6 +227,8 @@
211 else:227 else:
212 self.family = socket.AF_INET228 self.family = socket.AF_INET
213 self.address = self._parse_address(s)229 self.address = self._parse_address(s)
230 if ':' in self.address[0]:
231 self.family = socket.AF_INET6
214232
215 def _parse_address(self, s):233 def _parse_address(self, s):
216 return inet_address(s)234 return inet_address(s)
@@ -237,15 +255,28 @@
237 # IP address regex from the Perl Cookbook, Recipe 6.23 (revised ed.)255 # IP address regex from the Perl Cookbook, Recipe 6.23 (revised ed.)
238 # We allow underscores in hostnames although this is considered256 # We allow underscores in hostnames although this is considered
239 # illegal according to RFC1034.257 # illegal according to RFC1034.
258 # Addition: IPv6 addresses are now also accepted
240 expr = (r"(^(\d|[01]?\d\d|2[0-4]\d|25[0-5])\." #ipaddr259 expr = (r"(^(\d|[01]?\d\d|2[0-4]\d|25[0-5])\." #ipaddr
241 r"(\d|[01]?\d\d|2[0-4]\d|25[0-5])\." #ipaddr cont'd260 r"(\d|[01]?\d\d|2[0-4]\d|25[0-5])\." #ipaddr cont'd
242 r"(\d|[01]?\d\d|2[0-4]\d|25[0-5])\." #ipaddr cont'd261 r"(\d|[01]?\d\d|2[0-4]\d|25[0-5])\." #ipaddr cont'd
243 r"(\d|[01]?\d\d|2[0-4]\d|25[0-5])$)" #ipaddr cont'd262 r"(\d|[01]?\d\d|2[0-4]\d|25[0-5])$)" #ipaddr cont'd
244 r"|([A-Za-z_][-A-Za-z0-9_.]*[-A-Za-z0-9_])") # or hostname263 r"|([A-Za-z_][-A-Za-z0-9_.]*[-A-Za-z0-9_])" # or hostname
264 r"|([0-9A-Fa-f:.]+:[0-9A-Fa-f:.]*)" # or superset of IPv6 addresses
265 # (requiring at least one colon)
266 )
245 RegularExpressionConversion.__init__(self, expr)267 RegularExpressionConversion.__init__(self, expr)
246268
247 def __call__(self, value):269 def __call__(self, value):
248 return RegularExpressionConversion.__call__(self, value).lower()270 result = RegularExpressionConversion.__call__(self, value).lower()
271 # Use C library to validate IPv6 addresses, in particular wrt.
272 # number of colons and number of digits per group
273 if ':' in result:
274 import socket
275 try:
276 socket.inet_pton(socket.AF_INET6, result)
277 except socket.error:
278 raise ValueError('%r is not a valid IPv6 address' % value)
279 return result
249280
250def existing_directory(v):281def existing_directory(v):
251 nv = os.path.expanduser(v)282 nv = os.path.expanduser(v)
252283
=== modified file 'ZConfig/tests/support.py'
--- ZConfig/tests/support.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/support.py 2012-07-15 23:54:18 +0000
@@ -16,7 +16,6 @@
1616
17import os17import os
18import StringIO18import StringIO
19import unittest
20import urllib19import urllib
2120
22import ZConfig21import ZConfig
@@ -35,9 +34,12 @@
35CONFIG_BASE = "file://%s/" % urllib.pathname2url(d)34CONFIG_BASE = "file://%s/" % urllib.pathname2url(d)
3635
3736
38class TestBase(unittest.TestCase):37class TestHelper:
39 """Utility methods which can be used with the schema support."""38 """Utility methods which can be used with the schema support."""
4039
40 # Not derived from unittest.TestCase; some test runners seem to
41 # think that means this class contains tests.
42
41 def load_both(self, schema_url, conf_url):43 def load_both(self, schema_url, conf_url):
42 schema = self.load_schema(schema_url)44 schema = self.load_schema(schema_url)
43 conf = self.load_config(schema, conf_url)45 conf = self.load_config(schema, conf_url)
4446
=== modified file 'ZConfig/tests/test_cfgimports.py'
--- ZConfig/tests/test_cfgimports.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_cfgimports.py 2012-07-15 23:54:18 +0000
@@ -24,7 +24,8 @@
24import ZConfig.tests.support24import ZConfig.tests.support
2525
2626
27class TestImportFromConfiguration(ZConfig.tests.support.TestBase):27class TestImportFromConfiguration(
28 ZConfig.tests.support.TestHelper, unittest.TestCase):
2829
29 def test_simple_import(self):30 def test_simple_import(self):
30 schema = self.load_schema_text("<schema/>")31 schema = self.load_schema_text("<schema/>")
3132
=== modified file 'ZConfig/tests/test_cmdline.py'
--- ZConfig/tests/test_cmdline.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_cmdline.py 2012-07-15 23:54:18 +0000
@@ -17,12 +17,12 @@
17import unittest17import unittest
1818
19import ZConfig19import ZConfig
20import ZConfig.tests.support
2021
21from ZConfig.cmdline import ExtendedConfigLoader22from ZConfig.cmdline import ExtendedConfigLoader
22from ZConfig.tests.support import TestBase23
2324
2425class CommandLineTest(ZConfig.tests.support.TestHelper, unittest.TestCase):
25class CommandLineTest(TestBase):
2626
27 def create_config_loader(self, schema):27 def create_config_loader(self, schema):
28 loader = ExtendedConfigLoader(schema)28 loader = ExtendedConfigLoader(schema)
2929
=== modified file 'ZConfig/tests/test_config.py'
--- ZConfig/tests/test_config.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_config.py 2012-07-15 23:54:18 +0000
@@ -133,7 +133,9 @@
133 self.assertRaises(ZConfig.ConfigurationSyntaxError,133 self.assertRaises(ZConfig.ConfigurationSyntaxError,
134 self.loadtext, "%define abc-def\n")134 self.loadtext, "%define abc-def\n")
135 self.assertRaises(ZConfig.ConfigurationSyntaxError,135 self.assertRaises(ZConfig.ConfigurationSyntaxError,
136 self.loadtext, "%define a value\n%define a value\n")136 self.loadtext, "%define a value\n%define a other\n")
137 # doesn't raise if value is equal
138 self.loadtext("%define a value\n%define a value\n")
137139
138 def test_fragment_ident_disallowed(self):140 def test_fragment_ident_disallowed(self):
139 self.assertRaises(ZConfig.ConfigurationError,141 self.assertRaises(ZConfig.ConfigurationError,
140142
=== modified file 'ZConfig/tests/test_cookbook.py'
--- ZConfig/tests/test_cookbook.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_cookbook.py 2012-07-15 23:54:18 +0000
@@ -20,10 +20,9 @@
2020
21"""21"""
2222
23import ZConfig.tests.support
23import unittest24import unittest
2425
25from ZConfig.tests.support import TestBase
26
2726
28def basic_key_mapping_password_to_passwd(key):27def basic_key_mapping_password_to_passwd(key):
29 # Lower-case the key since that's what basic-key does:28 # Lower-case the key since that's what basic-key does:
@@ -37,7 +36,7 @@
37 return section36 return section
3837
3938
40class CookbookTestCase(TestBase):39class CookbookTestCase(ZConfig.tests.support.TestHelper, unittest.TestCase):
4140
42 def test_rewriting_key_names(self):41 def test_rewriting_key_names(self):
43 schema = self.load_schema_text("""42 schema = self.load_schema_text("""
4443
=== modified file 'ZConfig/tests/test_datatypes.py'
--- ZConfig/tests/test_datatypes.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_datatypes.py 2012-07-15 23:54:18 +0000
@@ -183,9 +183,12 @@
183 eq = self.assertEqual183 eq = self.assertEqual
184 defhost = ZConfig.datatypes.DEFAULT_HOST184 defhost = ZConfig.datatypes.DEFAULT_HOST
185 eq(convert("Host.Example.Com:80"), ("host.example.com", 80))185 eq(convert("Host.Example.Com:80"), ("host.example.com", 80))
186 eq(convert("Host.Example.Com:0"), ("host.example.com", 0))
186 eq(convert(":80"), (defhost, 80))187 eq(convert(":80"), (defhost, 80))
187 eq(convert("80"), (defhost, 80))188 eq(convert("80"), (defhost, 80))
189 eq(convert("[::1]:80"), ("::1", 80))
188 eq(convert("host.EXAMPLE.com"), ("host.example.com", None))190 eq(convert("host.EXAMPLE.com"), ("host.example.com", None))
191 eq(convert("2001::ABCD"), ("2001::abcd", None))
189 self.assertRaises(ValueError, convert, "40 # foo")192 self.assertRaises(ValueError, convert, "40 # foo")
190193
191 def test_datatype_inet_binding_address(self):194 def test_datatype_inet_binding_address(self):
@@ -245,7 +248,7 @@
245 raises = self.assertRaises248 raises = self.assertRaises
246249
247 raises(ValueError, convert, '-1')250 raises(ValueError, convert, '-1')
248 raises(ValueError, convert, '0')251 eq(convert('0'), 0)
249 eq(convert('1'), 1)252 eq(convert('1'), 1)
250 eq(convert('80'), 80)253 eq(convert('80'), 80)
251 eq(convert('1023'), 1023)254 eq(convert('1023'), 1023)
@@ -258,6 +261,7 @@
258 convert = self.types.get("socket-address")261 convert = self.types.get("socket-address")
259 eq = self.assertEqual262 eq = self.assertEqual
260 AF_INET = socket.AF_INET263 AF_INET = socket.AF_INET
264 AF_INET6 = socket.AF_INET6
261 defhost = ZConfig.datatypes.DEFAULT_HOST265 defhost = ZConfig.datatypes.DEFAULT_HOST
262266
263 def check(value, family, address, self=self, convert=convert):267 def check(value, family, address, self=self, convert=convert):
@@ -269,6 +273,8 @@
269 check(":80", AF_INET, (defhost, 80))273 check(":80", AF_INET, (defhost, 80))
270 check("80", AF_INET, (defhost, 80))274 check("80", AF_INET, (defhost, 80))
271 check("host.EXAMPLE.com", AF_INET, ("host.example.com",None))275 check("host.EXAMPLE.com", AF_INET, ("host.example.com",None))
276 check("::1", AF_INET6,("::1", None))
277 check("[::]:80", AF_INET6,("::", 80))
272 a1 = convert("/tmp/var/@345.4")278 a1 = convert("/tmp/var/@345.4")
273 a2 = convert("/tmp/var/@345.4:80")279 a2 = convert("/tmp/var/@345.4:80")
274 self.assertEqual(a1.address, "/tmp/var/@345.4")280 self.assertEqual(a1.address, "/tmp/var/@345.4")
@@ -291,11 +297,16 @@
291 eq(convert('HOSTNAME.COM'), 'hostname.com')297 eq(convert('HOSTNAME.COM'), 'hostname.com')
292 eq(convert('WWW.HOSTNAME.COM'), 'www.hostname.com')298 eq(convert('WWW.HOSTNAME.COM'), 'www.hostname.com')
293 eq(convert('127.0.0.1'), '127.0.0.1')299 eq(convert('127.0.0.1'), '127.0.0.1')
300 eq(convert('::1'), '::1')
301 eq(convert('2001:DB8:1234:4567:89AB:cdef:0:1'), '2001:db8:1234:4567:89ab:cdef:0:1')
302 eq(convert('2001:DB8:1234:4567::10.11.12.13'), '2001:db8:1234:4567::10.11.12.13')
294 raises(ValueError, convert, '1hostnamewithleadingnumeric')303 raises(ValueError, convert, '1hostnamewithleadingnumeric')
295 raises(ValueError, convert, '255.255')304 raises(ValueError, convert, '255.255')
296 raises(ValueError, convert, '12345678')305 raises(ValueError, convert, '12345678')
297 raises(ValueError, convert, '999.999.999.999')306 raises(ValueError, convert, '999.999.999.999')
298 raises(ValueError, convert, 'a!badhostname')307 raises(ValueError, convert, 'a!badhostname')
308 raises(ValueError, convert, '2001:DB8:0123:4567:89AB:cdef:0:1:2')
309 raises(ValueError, convert, '2001:DB8:0123:4567::10.11.12.13.14')
299310
300 def test_existing_directory(self):311 def test_existing_directory(self):
301 convert = self.types.get('existing-directory')312 convert = self.types.get('existing-directory')
302313
=== modified file 'ZConfig/tests/test_loader.py'
--- ZConfig/tests/test_loader.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_loader.py 2012-07-15 23:54:18 +0000
@@ -25,7 +25,7 @@
25import ZConfig.loader25import ZConfig.loader
26import ZConfig.url26import ZConfig.url
2727
28from ZConfig.tests.support import CONFIG_BASE, TestBase28from ZConfig.tests.support import CONFIG_BASE, TestHelper
2929
3030
31try:31try:
@@ -37,7 +37,7 @@
37LIBRARY_DIR = os.path.join(os.path.dirname(myfile), "library")37LIBRARY_DIR = os.path.join(os.path.dirname(myfile), "library")
3838
3939
40class LoaderTestCase(TestBase):40class LoaderTestCase(TestHelper, unittest.TestCase):
4141
42 def test_schema_caching(self):42 def test_schema_caching(self):
43 loader = ZConfig.loader.SchemaLoader()43 loader = ZConfig.loader.SchemaLoader()
4444
=== modified file 'ZConfig/tests/test_readme.py'
--- ZConfig/tests/test_readme.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_readme.py 2012-07-15 23:54:18 +0000
@@ -11,16 +11,17 @@
11# FOR A PARTICULAR PURPOSE.11# FOR A PARTICULAR PURPOSE.
12#12#
13##############################################################################13##############################################################################
14import logging,os,unittest14import doctest
15from zope.testing.doctest import DocFileSuite, REPORT_NDIFF,ELLIPSIS15import logging
1616
17options = REPORT_NDIFF|ELLIPSIS17
18options = doctest.REPORT_NDIFF | doctest.ELLIPSIS
1819
19old = {}20old = {}
20def setUp(test):21def setUp(test):
21 global old22 global old
22 logger=logging.getLogger()23 logger = logging.getLogger()
23 old['level']=logger.level24 old['level'] = logger.level
24 old['handlers'] = logger.handlers[:]25 old['handlers'] = logger.handlers[:]
2526
26def tearDown(test):27def tearDown(test):
@@ -29,7 +30,8 @@
29 logger.handlers = old['handlers']30 logger.handlers = old['handlers']
3031
31def test_suite():32def test_suite():
32 return unittest.TestSuite((33 return doctest.DocFileSuite(
33 DocFileSuite('../../README.txt', optionflags=options,34 '../../README.txt',
34 setUp=setUp,tearDown=tearDown),35 optionflags=options,
35 ))36 setUp=setUp, tearDown=tearDown,
37 )
3638
=== modified file 'ZConfig/tests/test_schema.py'
--- ZConfig/tests/test_schema.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_schema.py 2012-07-15 23:54:18 +0000
@@ -17,7 +17,7 @@
1717
18import ZConfig18import ZConfig
1919
20from ZConfig.tests.support import TestBase, CONFIG_BASE20from ZConfig.tests.support import TestHelper, CONFIG_BASE
2121
2222
23def uppercase(value):23def uppercase(value):
@@ -40,7 +40,7 @@
40 return L40 return L
4141
4242
43class SchemaTestCase(TestBase):43class SchemaTestCase(TestHelper, unittest.TestCase):
44 """Tests of the basic schema support itself."""44 """Tests of the basic schema support itself."""
4545
46 def test_minimal_schema(self):46 def test_minimal_schema(self):
4747
=== modified file 'ZConfig/tests/test_schemaless.py'
--- ZConfig/tests/test_schemaless.py 2011-03-24 18:29:45 +0000
+++ ZConfig/tests/test_schemaless.py 2012-07-15 23:54:18 +0000
@@ -17,10 +17,7 @@
17"""17"""
18__docformat__ = "reStructuredText"18__docformat__ = "reStructuredText"
1919
20try:20import doctest
21 from zope.testing import doctest
22except ImportError:
23 import doctest
2421
2522
26def test_suite():23def test_suite():
2724
=== modified file 'bootstrap.py'
--- bootstrap.py 2011-03-24 18:29:45 +0000
+++ bootstrap.py 2012-07-15 23:54:18 +0000
@@ -16,37 +16,245 @@
16Simply run this script in a directory containing a buildout.cfg.16Simply run this script in a directory containing a buildout.cfg.
17The script accepts buildout command-line options, so you can17The script accepts buildout command-line options, so you can
18use the -c option to specify an alternate configuration file.18use the -c option to specify an alternate configuration file.
19
20$Id: bootstrap.py 72703 2007-02-20 11:49:26Z jim $
21"""19"""
2220
23import os, shutil, sys, tempfile, urllib221import os, shutil, sys, tempfile, textwrap, urllib, urllib2, subprocess
2422from optparse import OptionParser
25tmpeggs = tempfile.mkdtemp()23
26
27ez = {}
28exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
29 ).read() in ez
30ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
31
32import pkg_resources
33
34cmd = 'from setuptools.command.easy_install import main; main()'
35if sys.platform == 'win32':24if sys.platform == 'win32':
36 cmd = '"%s"' % cmd # work around spawn lamosity on windows25 def quote(c):
3726 if ' ' in c:
27 return '"%s"' % c # work around spawn lamosity on windows
28 else:
29 return c
30else:
31 quote = str
32
33# See zc.buildout.easy_install._has_broken_dash_S for motivation and comments.
34stdout, stderr = subprocess.Popen(
35 [sys.executable, '-Sc',
36 'try:\n'
37 ' import ConfigParser\n'
38 'except ImportError:\n'
39 ' print 1\n'
40 'else:\n'
41 ' print 0\n'],
42 stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
43has_broken_dash_S = bool(int(stdout.strip()))
44
45# In order to be more robust in the face of system Pythons, we want to
46# run without site-packages loaded. This is somewhat tricky, in
47# particular because Python 2.6's distutils imports site, so starting
48# with the -S flag is not sufficient. However, we'll start with that:
49if not has_broken_dash_S and 'site' in sys.modules:
50 # We will restart with python -S.
51 args = sys.argv[:]
52 args[0:0] = [sys.executable, '-S']
53 args = map(quote, args)
54 os.execv(sys.executable, args)
55# Now we are running with -S. We'll get the clean sys.path, import site
56# because distutils will do it later, and then reset the path and clean
57# out any namespace packages from site-packages that might have been
58# loaded by .pth files.
59clean_path = sys.path[:]
60import site
61sys.path[:] = clean_path
62for k, v in sys.modules.items():
63 if k in ('setuptools', 'pkg_resources') or (
64 hasattr(v, '__path__') and
65 len(v.__path__)==1 and
66 not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))):
67 # This is a namespace package. Remove it.
68 sys.modules.pop(k)
69
70is_jython = sys.platform.startswith('java')
71
72setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py'
73distribute_source = 'http://python-distribute.org/distribute_setup.py'
74
75# parsing arguments
76def normalize_to_url(option, opt_str, value, parser):
77 if value:
78 if '://' not in value: # It doesn't smell like a URL.
79 value = 'file://%s' % (
80 urllib.pathname2url(
81 os.path.abspath(os.path.expanduser(value))),)
82 if opt_str == '--download-base' and not value.endswith('/'):
83 # Download base needs a trailing slash to make the world happy.
84 value += '/'
85 else:
86 value = None
87 name = opt_str[2:].replace('-', '_')
88 setattr(parser.values, name, value)
89
90usage = '''\
91[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
92
93Bootstraps a buildout-based project.
94
95Simply run this script in a directory containing a buildout.cfg, using the
96Python that you want bin/buildout to use.
97
98Note that by using --setup-source and --download-base to point to
99local resources, you can keep this script from going over the network.
100'''
101
102parser = OptionParser(usage=usage)
103parser.add_option("-v", "--version", dest="version",
104 help="use a specific zc.buildout version")
105parser.add_option("-d", "--distribute",
106 action="store_true", dest="use_distribute", default=False,
107 help="Use Distribute rather than Setuptools.")
108parser.add_option("--setup-source", action="callback", dest="setup_source",
109 callback=normalize_to_url, nargs=1, type="string",
110 help=("Specify a URL or file location for the setup file. "
111 "If you use Setuptools, this will default to " +
112 setuptools_source + "; if you use Distribute, this "
113 "will default to " + distribute_source +"."))
114parser.add_option("--download-base", action="callback", dest="download_base",
115 callback=normalize_to_url, nargs=1, type="string",
116 help=("Specify a URL or directory for downloading "
117 "zc.buildout and either Setuptools or Distribute. "
118 "Defaults to PyPI."))
119parser.add_option("--eggs",
120 help=("Specify a directory for storing eggs. Defaults to "
121 "a temporary directory that is deleted when the "
122 "bootstrap script completes."))
123parser.add_option("-t", "--accept-buildout-test-releases",
124 dest='accept_buildout_test_releases',
125 action="store_true", default=False,
126 help=("Normally, if you do not specify a --version, the "
127 "bootstrap script and buildout gets the newest "
128 "*final* versions of zc.buildout and its recipes and "
129 "extensions for you. If you use this flag, "
130 "bootstrap and buildout will get the newest releases "
131 "even if they are alphas or betas."))
132parser.add_option("-c", None, action="store", dest="config_file",
133 help=("Specify the path to the buildout configuration "
134 "file to be used."))
135
136options, args = parser.parse_args()
137
138# if -c was provided, we push it back into args for buildout's main function
139if options.config_file is not None:
140 args += ['-c', options.config_file]
141
142if options.eggs:
143 eggs_dir = os.path.abspath(os.path.expanduser(options.eggs))
144else:
145 eggs_dir = tempfile.mkdtemp()
146
147if options.setup_source is None:
148 if options.use_distribute:
149 options.setup_source = distribute_source
150 else:
151 options.setup_source = setuptools_source
152
153if options.accept_buildout_test_releases:
154 args.append('buildout:accept-buildout-test-releases=true')
155args.append('bootstrap')
156
157try:
158 import pkg_resources
159 import setuptools # A flag. Sometimes pkg_resources is installed alone.
160 if not hasattr(pkg_resources, '_distribute'):
161 raise ImportError
162except ImportError:
163 ez_code = urllib2.urlopen(
164 options.setup_source).read().replace('\r\n', '\n')
165 ez = {}
166 exec ez_code in ez
167 setup_args = dict(to_dir=eggs_dir, download_delay=0)
168 if options.download_base:
169 setup_args['download_base'] = options.download_base
170 if options.use_distribute:
171 setup_args['no_fake'] = True
172 ez['use_setuptools'](**setup_args)
173 if 'pkg_resources' in sys.modules:
174 reload(sys.modules['pkg_resources'])
175 import pkg_resources
176 # This does not (always?) update the default working set. We will
177 # do it.
178 for path in sys.path:
179 if path not in pkg_resources.working_set.entries:
180 pkg_resources.working_set.add_entry(path)
181
182cmd = [quote(sys.executable),
183 '-c',
184 quote('from setuptools.command.easy_install import main; main()'),
185 '-mqNxd',
186 quote(eggs_dir)]
187
188if not has_broken_dash_S:
189 cmd.insert(1, '-S')
190
191find_links = options.download_base
192if not find_links:
193 find_links = os.environ.get('bootstrap-testing-find-links')
194if find_links:
195 cmd.extend(['-f', quote(find_links)])
196
197if options.use_distribute:
198 setup_requirement = 'distribute'
199else:
200 setup_requirement = 'setuptools'
38ws = pkg_resources.working_set201ws = pkg_resources.working_set
39assert os.spawnle(202setup_requirement_path = ws.find(
40 os.P_WAIT, sys.executable, sys.executable,203 pkg_resources.Requirement.parse(setup_requirement)).location
41 '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',204env = dict(
42 dict(os.environ,205 os.environ,
43 PYTHONPATH=206 PYTHONPATH=setup_requirement_path)
44 ws.find(pkg_resources.Requirement.parse('setuptools')).location207
45 ),208requirement = 'zc.buildout'
46 ) == 0209version = options.version
47210if version is None and not options.accept_buildout_test_releases:
48ws.add_entry(tmpeggs)211 # Figure out the most recent final version of zc.buildout.
49ws.require('zc.buildout')212 import setuptools.package_index
213 _final_parts = '*final-', '*final'
214 def _final_version(parsed_version):
215 for part in parsed_version:
216 if (part[:1] == '*') and (part not in _final_parts):
217 return False
218 return True
219 index = setuptools.package_index.PackageIndex(
220 search_path=[setup_requirement_path])
221 if find_links:
222 index.add_find_links((find_links,))
223 req = pkg_resources.Requirement.parse(requirement)
224 if index.obtain(req) is not None:
225 best = []
226 bestv = None
227 for dist in index[req.project_name]:
228 distv = dist.parsed_version
229 if _final_version(distv):
230 if bestv is None or distv > bestv:
231 best = [dist]
232 bestv = distv
233 elif distv == bestv:
234 best.append(dist)
235 if best:
236 best.sort()
237 version = best[-1].version
238if version:
239 requirement = '=='.join((requirement, version))
240cmd.append(requirement)
241
242if is_jython:
243 import subprocess
244 exitcode = subprocess.Popen(cmd, env=env).wait()
245else: # Windows prefers this, apparently; otherwise we would prefer subprocess
246 exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env]))
247if exitcode != 0:
248 sys.stdout.flush()
249 sys.stderr.flush()
250 print ("An error occurred when trying to install zc.buildout. "
251 "Look above this message for any errors that "
252 "were output by easy_install.")
253 sys.exit(exitcode)
254
255ws.add_entry(eggs_dir)
256ws.require(requirement)
50import zc.buildout.buildout257import zc.buildout.buildout
51zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])258zc.buildout.buildout.main(args)
52shutil.rmtree(tmpeggs)259if not options.eggs: # clean up temporary egg directory
260 shutil.rmtree(eggs_dir)
53261
=== modified file 'buildout.cfg'
--- buildout.cfg 2009-06-18 17:30:22 +0000
+++ buildout.cfg 2012-07-15 23:54:18 +0000
@@ -1,9 +1,14 @@
1[buildout]1[buildout]
2develop = .2develop = .
3find-links = http://download.zope.org/distribution/3parts = nosetests test
4parts = test4prefer-final = true
5
6[nosetests]
7recipe = zc.recipe.egg
8eggs = nose
9scripts = nosetests
510
6[test]11[test]
7recipe = zc.recipe.testrunner12recipe = zc.recipe.testrunner
8eggs = ZConfig13eggs = ZConfig
9defaults = '--exit-with-status -1'.split()14defaults = ['-1']
1015
=== modified file 'debian/changelog'
--- debian/changelog 2011-12-31 08:17:16 +0000
+++ debian/changelog 2012-07-15 23:54:18 +0000
@@ -1,3 +1,10 @@
1zconfig (2.9.3-0ubuntu1) quantal; urgency=low
2
3 * New upstream release.
4 * Bump Standards-Version to 3.9.3.
5
6 -- Logan Rosen <logatronico@gmail.com> Sun, 15 Jul 2012 19:48:02 -0400
7
1zconfig (2.8.0-1build1) precise; urgency=low8zconfig (2.8.0-1build1) precise; urgency=low
29
3 * Rebuild to drop python2.6 dependencies.10 * Rebuild to drop python2.6 dependencies.
411
=== modified file 'debian/control'
--- debian/control 2011-05-06 22:36:13 +0000
+++ debian/control 2012-07-15 23:54:18 +0000
@@ -8,7 +8,7 @@
8 python-all (>= 2.6.6-3~),8 python-all (>= 2.6.6-3~),
9 python-setuptools,9 python-setuptools,
10 python-van.pydeb (>= 1.3.0-4)10 python-van.pydeb (>= 1.3.0-4)
11Standards-Version: 3.9.211Standards-Version: 3.9.3
12X-Python-Version: >= 2.412X-Python-Version: >= 2.4
13Homepage: http://www.zope.org/Members/fdrake/zconfig13Homepage: http://www.zope.org/Members/fdrake/zconfig
14Vcs-Svn: svn://svn.debian.org/pkg-zope/zconfig/trunk14Vcs-Svn: svn://svn.debian.org/pkg-zope/zconfig/trunk
1515
=== modified file 'doc/zconfig.tex'
--- doc/zconfig.tex 2011-03-24 18:29:45 +0000
+++ doc/zconfig.tex 2012-07-15 23:54:18 +0000
@@ -272,9 +272,8 @@
272pairs.272pairs.
273273
274Names must be defined before they are used, and may not be274Names must be defined before they are used, and may not be
275re-defined. All resources being parsed as part of a configuration275re-defined with a different value. All resources being parsed as part of
276share a single namespace for defined names. This means that resources276a configuration share a single namespace for defined names.
277which may be included more than once should not define any names.
278277
279References to defined names from configuration values use the syntax278References to defined names from configuration values use the syntax
280described for the \refmodule{ZConfig.substitution} module.279described for the \refmodule{ZConfig.substitution} module.
@@ -906,7 +905,9 @@
906 will be returned for \var{hostname}. The default host is905 will be returned for \var{hostname}. The default host is
907 \code{localhost} on Windows and the empty string on all other906 \code{localhost} on Windows and the empty string on all other
908 platforms. If the port is omitted, \code{None} will be returned for907 platforms. If the port is omitted, \code{None} will be returned for
909 \var{port}.908 \var{port}. IPv6 addresses can be specified in colon-separated notation;
909 if both host and port need to be specified, the bracketed form
910 (\code{[addr]:port}) must be used.
910911
911\term{\datatype{inet-binding-address}}912\term{\datatype{inet-binding-address}}
912 An Internet address expressed as a \code{(\var{hostname},913 An Internet address expressed as a \code{(\var{hostname},
@@ -932,7 +933,8 @@
932 Validates a valid IP address or hostname. If the first 933 Validates a valid IP address or hostname. If the first
933 character is a digit, the value is assumed to be an IP 934 character is a digit, the value is assumed to be an IP
934 address. If the first character is not a digit, the value 935 address. If the first character is not a digit, the value
935 is assumed to be a hostname. Hostnames are converted to lower936 is assumed to be a hostname. Strings containing colons are
937 considered IPv6 address. Hostnames are converted to lower
936 case.938 case.
937939
938\term{\datatype{locale}}940\term{\datatype{locale}}
939941
=== modified file 'setup.py'
--- setup.py 2011-03-24 18:29:45 +0000
+++ setup.py 2012-07-15 23:54:18 +0000
@@ -4,23 +4,21 @@
4def alltests():4def alltests():
5 import os5 import os
6 import sys6 import sys
7 from unittest import TestSuite7 import unittest
8 # use the zope.testing testrunner machinery to find all the8 # use the zope.testrunner machinery to find all the
9 # test suites we've put under ourselves9 # test suites we've put under ourselves
10 from zope.testing.testrunner import get_options10 import zope.testrunner.find
11 from zope.testing.testrunner import find_suites11 import zope.testrunner.options
12 from zope.testing.testrunner import configure_logging
13 configure_logging()
14 here = os.path.abspath(os.path.dirname(sys.argv[0]))12 here = os.path.abspath(os.path.dirname(sys.argv[0]))
15 args = sys.argv[:]13 args = sys.argv[:]
16 defaults = ["--test-path", here]14 defaults = ["--test-path", here]
17 options = get_options(args, defaults)15 options = zope.testrunner.options.get_options(args, defaults)
18 suites = list(find_suites(options))16 suites = list(zope.testrunner.find.find_suites(options))
19 return TestSuite(suites)17 return unittest.TestSuite(suites)
2018
21options = dict(19options = dict(
22 name="ZConfig",20 name="ZConfig",
23 version="2.8.0",21 version="2.9.3",
24 author="Fred L. Drake, Jr.",22 author="Fred L. Drake, Jr.",
25 author_email="fred@zope.com",23 author_email="fred@zope.com",
26 maintainer="Zope Foundation and Contributors",24 maintainer="Zope Foundation and Contributors",
@@ -53,12 +51,12 @@
53 "Programming Language :: Python :: 2.4",51 "Programming Language :: Python :: 2.4",
54 "Programming Language :: Python :: 2.5",52 "Programming Language :: Python :: 2.5",
55 "Programming Language :: Python :: 2.6",53 "Programming Language :: Python :: 2.6",
56 "Topic :: Software Development :: Libraries :: Python Modules",54 "Programming Language :: Python :: 2.7",
57 ],55 ],
58 # Support for 'setup.py test' when setuptools is available:56 # Support for 'setup.py test' when setuptools is available:
59 test_suite="__main__.alltests",57 test_suite="__main__.alltests",
60 tests_require=[58 tests_require=[
61 "zope.testing",59 "zope.testrunner",
62 ],60 ],
63 )61 )
6462

Subscribers

People subscribed via source and target branches

to all changes: