Import lazr.config_2.1.orig.tar.gz
Barry Warsaw
9 years ago
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: lazr.config |
2 | Version: 2.0.1 | |
2 | Version: 2.1 | |
3 | 3 | Summary: Create configuration schemas, and process and validate configurations. |
4 | 4 | Home-page: https://launchpad.net/lazr.config |
5 | 5 | Author: LAZR Developers |
41 | 41 | |
42 | 42 | # General information about the project. |
43 | 43 | project = u'lazr.config' |
44 | copyright = u'2013-2014, LAZR developers' | |
44 | copyright = u'2013-2015, LAZR developers' | |
45 | 45 | |
46 | 46 | # The version info for the project you're documenting, acts as replacement for |
47 | 47 | # |version| and |release|, also used in various other places throughout the |
0 | # Copyright 2008-2014 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2008-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.config. |
3 | 3 | # |
13 | 13 | # You should have received a copy of the GNU Lesser General Public License |
14 | 14 | # along with lazr.config. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | # This is a namespace package, however under >= Python 3.3, let it be a true | |
17 | # namespace package (i.e. this cruft isn't necessary). | |
18 | import sys | |
19 | ||
20 | if sys.hexversion < 0x30300f0: | |
21 | try: | |
22 | import pkg_resources | |
23 | pkg_resources.declare_namespace(__name__) | |
24 | except ImportError: | |
25 | import pkgutil | |
26 | __path__ = pkgutil.extend_path(__path__, __name__) | |
16 | # This is a namespace package. | |
17 | try: | |
18 | import pkg_resources | |
19 | pkg_resources.declare_namespace(__name__) | |
20 | except ImportError: | |
21 | import pkgutil | |
22 | __path__ = pkgutil.extend_path(__path__, __name__) |
0 | # Copyright 2007-2009 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2007-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.config |
3 | 3 | # |
0 | # Copyright 2008-2014 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2008-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.config. |
3 | 3 | # |
40 | 40 | import os |
41 | 41 | import pwd |
42 | 42 | import re |
43 | import sys | |
43 | 44 | |
44 | 45 | from os.path import abspath, basename, dirname |
45 | 46 | from textwrap import dedent |
571 | 572 | if confs is None: |
572 | 573 | confs = [] |
573 | 574 | encoding_errors = self._verifyEncoding(conf_data) |
574 | parser = RawConfigParser() | |
575 | # LP: #1397779. In Python 3, RawConfigParser grew a `strict` keyword | |
576 | # option and in Python 3.2, this argument changed its default from | |
577 | # False to True. This breaks behavior compatibility with Python 2, so | |
578 | # under Python 3, always force strict=False. | |
579 | kws = {} | |
580 | if sys.version_info >= (3,): | |
581 | kws['strict'] = False | |
582 | parser = RawConfigParser(**kws) | |
575 | 583 | parser.readfp(StringIO(conf_data), conf_filename) |
576 | 584 | confs.append((conf_filename, parser, encoding_errors)) |
577 | 585 | if parser.has_option('meta', 'extends'): |
1 | 1 | NEWS for lazr.config |
2 | 2 | ==================== |
3 | 3 | |
4 | 2.1 (2015-01-05) | |
5 | ================ | |
6 | - Always use old-style namespace package registration in ``lazr/__init__.py`` | |
7 | since the mere presence of this file subverts PEP 420 style namespace | |
8 | packages. (LP: #1407816) | |
9 | - For behavioral compatibility between Python 2 and 3, `strict=False` must be | |
10 | passed to the underlying `RawConfigParser` under Python 3. (LP: #1397779) | |
4 | 11 | |
5 | 12 | 2.0.1 (2014-08-22) |
6 | 13 | ================== |
7 | 14 | - Drop the use of `distribute` in favor of `setuptools`. (LP: #1359926) |
8 | 15 | - Run the test suite with `tox`. |
9 | ||
10 | 16 | |
11 | 17 | 2.0 (2013-01-10) |
12 | 18 | ================ |
14 | 20 | - Now more strict in its requirement of ASCII in config files. |
15 | 21 | - Category names are now sorted by default. |
16 | 22 | |
17 | ||
18 | 23 | 1.1.3 (2009-08-25) |
19 | 24 | ================== |
20 | ||
21 | 25 | - Fixed a build problem. |
22 | 26 | |
23 | 27 | 1.1.2 (2009-08-25) |
24 | 28 | ================== |
25 | ||
26 | 29 | - Got rid of a sys.path hack. |
27 | ||
28 | 30 | |
29 | 31 | 1.1.1 (2009-03-24) |
30 | 32 | ================== |
31 | ||
32 | 33 | - License clarification: only v3 of the LGPL is offered at this time, not |
33 | 34 | subsequent versions. |
34 | ||
35 | 35 | - Build is updated to support Sphinx docs and other small changes. |
36 | 36 | |
37 | 37 | 1.1 (2009-01-05) |
38 | 38 | ================ |
39 | ||
40 | 39 | - Support for adding arbitrary sections in a configuration file, based on a |
41 | 40 | .master section in the schema. The .master section allows admins to define |
42 | 41 | configurations for an arbitrary number of processes. If the schema defines |
44 | 43 | .master section. These are like categories with templates except that the |
45 | 44 | section names extending .master need not be named in the schema file. |
46 | 45 | [Bug 310619] |
47 | ||
48 | 46 | - ConfigSchema now provides an interface for constructing the schema from a |
49 | 47 | string. [Bug 309859] |
50 | ||
51 | 48 | - Added as_boolean() and as_log_level() type converters. [Bug 310782] |
52 | ||
53 | 49 | - getByCategory() accepts a default argument. If the category is missing, the |
54 | 50 | default argument is returned. If the category is missing and no default |
55 | 51 | argument is given, a NoCategoryError is raised, as before. [Bug 309988] |
56 | 52 | |
57 | ||
58 | 53 | 1.0 (2008-12-19) |
59 | 54 | ================ |
60 | ||
61 | 55 | - Initial release |
0 | # Copyright 2009-2014 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2009-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.smtptest |
3 | 3 | # |
1337 | 1337 | :glob: |
1338 | 1338 | |
1339 | 1339 | * |
1340 | docs/* | |
1341 | 1340 | |
1342 | 1341 | .. _timedelta: http://docs.python.org/3/library/datetime.html#timedelta-objects |
0 | # Copyright 2009-2014 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2009-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.smtptest |
3 | 3 | # |
0 | # Copyright 2007-2014 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2007-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.config |
3 | 3 | # |
0 | # Copyright 2008-2014 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2008-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.config. |
3 | 3 | # |
202 | 202 | self.meq(config['section_33'].key2, """\ |
203 | 203 | multiline value 1 |
204 | 204 | multiline value 2""") |
205 | ||
206 | def test_lp1397779(self): | |
207 | # Fix DuplicateSectionErrors when you .push() a config that has a | |
208 | # section already defined in the config. | |
209 | schema = ConfigSchema(self._testfile('base.conf')) | |
210 | config = schema.load(self._testfile('local.conf')) | |
211 | self.assertEqual(config['section_1']['key1'], 'foo') | |
212 | config.push('dupsec', """\ | |
213 | [section_1] | |
214 | key1: baz | |
215 | [section_1] | |
216 | key1: qux | |
217 | """) | |
218 | self.assertEqual(config['section_1']['key1'], 'qux') |
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: lazr.config |
2 | Version: 2.0.1 | |
2 | Version: 2.1 | |
3 | 3 | Summary: Create configuration schemas, and process and validate configurations. |
4 | 4 | Home-page: https://launchpad.net/lazr.config |
5 | 5 | Author: LAZR Developers |
0 | # Copyright 2008-2014 Canonical Ltd. All rights reserved. | |
0 | # Copyright 2008-2015 Canonical Ltd. All rights reserved. | |
1 | 1 | # |
2 | 2 | # This file is part of lazr.config. |
3 | 3 | # |
56 | 56 | 'Programming Language :: Python :: 2.7', |
57 | 57 | 'Programming Language :: Python :: 3', |
58 | 58 | ], |
59 | # nose plugins don't really work with `python setup.py test` so use | |
60 | # `python setup.py nosetests` instead, or just `tox`. Gosh, we really | |
61 | # should switch to nose2. :/ - BAW 2014-08-20 | |
62 | #test_suite='nose.collector', | |
63 | 59 | ) |