Merge lp:~ricardokirkner/django-configglue/configglue-1.0-compatible into lp:django-configglue

Proposed by Ricardo Kirkner
Status: Merged
Approved by: Ricardo Kirkner
Approved revision: 60
Merged at revision: 58
Proposed branch: lp:~ricardokirkner/django-configglue/configglue-1.0-compatible
Merge into: lp:django-configglue
Diff against target: 295 lines (+37/-32)
16 files modified
debian/copyright (+3/-3)
django_configglue/__init__.py (+2/-2)
django_configglue/management/__init__.py (+2/-2)
django_configglue/management/commands/__init__.py (+1/-1)
django_configglue/management/commands/settings.py (+2/-2)
django_configglue/models.py (+1/-1)
django_configglue/schema.py (+2/-2)
django_configglue/tests/__init__.py (+1/-1)
django_configglue/tests/helpers.py (+2/-2)
django_configglue/tests/settings.py (+1/-1)
django_configglue/tests/test_configglue.py (+3/-3)
django_configglue/tests/test_settings.py (+10/-5)
django_configglue/utils.py (+2/-2)
doc/quickstart.rst (+2/-2)
doc/walkthrough.rst (+1/-1)
setup.py (+2/-2)
To merge this branch: bzr merge lp:~ricardokirkner/django-configglue/configglue-1.0-compatible
Reviewer Review Type Date Requested Status
Canonical ISD hackers Pending
Review via email: mp+69380@code.launchpad.net

Commit message

Updated django-configglue to make it compatible with configglue 1.0.

Description of the change

Overview
========

Updated django-configglue to make it compatible with configglue 1.0.

This essentially means replacing the configglue.pyschema namespace for the configglue namespace.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/copyright'
2--- debian/copyright 2010-08-11 17:00:02 +0000
3+++ debian/copyright 2011-07-27 00:18:29 +0000
4@@ -4,9 +4,9 @@
5 Source: https://launchpad.net/django-configglue
6
7 Files: *
8-Copyright: 2010, Canonical Ltd. (http://www.canonical.com/)
9+Copyright: 2010-2011, Canonical Ltd. (http://www.canonical.com/)
10 License: LGPL-3
11- django-configglue is Copyright 2010 Canonical Ltd.
12+ django-configglue is Copyright 2010-2011 Canonical Ltd.
13 .
14 Canonical Ltd ("Canonical") distributes the source code for the
15 django-configglue under the GNU Lesser General Public License,
16@@ -18,7 +18,7 @@
17 All rights not expressly granted are reserved.
18
19 Files: django_configglue/__init__.py
20-Copyright: 2010, Canonical Ltd. (http://www.canonical.com/)
21+Copyright: 2010-2011, Canonical Ltd. (http://www.canonical.com/)
22 2010, Django Software Foundation and individual contributors
23 License: other
24 Copyright (c) Django Software Foundation and individual contributors.
25
26=== modified file 'django_configglue/__init__.py'
27--- django_configglue/__init__.py 2011-07-10 15:16:26 +0000
28+++ django_configglue/__init__.py 2011-07-27 00:18:29 +0000
29@@ -1,7 +1,7 @@
30-# Copyright 2010 Canonical Ltd. This software is licensed under the
31+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
32 # GNU Lesser General Public License version 3 (see the file LICENSE).
33
34-__version__ = '0.5'
35+__version__ = '0.6'
36
37 # monkey-patch django's management utility
38 from . import management
39
40=== modified file 'django_configglue/management/__init__.py'
41--- django_configglue/management/__init__.py 2011-07-15 22:36:02 +0000
42+++ django_configglue/management/__init__.py 2011-07-27 00:18:29 +0000
43@@ -1,4 +1,4 @@
44-# Copyright 2010 Canonical Ltd.
45+# Copyright 2010-2011 Canonical Ltd.
46 # Copyright Django Software Foundation and individual contributors
47 # This software is licensed under the
48 # GNU Lesser General Public License version 3 (see the file LICENSE)
49@@ -9,7 +9,7 @@
50
51 import django
52 import django.core.management
53-from configglue.pyschema.glue import schemaconfigglue
54+from configglue.glue import schemaconfigglue
55 from django.core.management import ManagementUtility, LaxOptionParser
56 from django.core.management.base import BaseCommand, handle_default_options
57 from django.conf import settings
58
59=== modified file 'django_configglue/management/commands/__init__.py'
60--- django_configglue/management/commands/__init__.py 2011-07-15 02:02:55 +0000
61+++ django_configglue/management/commands/__init__.py 2011-07-27 00:18:29 +0000
62@@ -1,2 +1,2 @@
63-# Copyright 2010 Canonical Ltd. This software is licensed under the
64+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
65 # GNU Lesser General Public License version 3 (see the file LICENSE).
66
67=== modified file 'django_configglue/management/commands/settings.py'
68--- django_configglue/management/commands/settings.py 2011-07-15 02:02:55 +0000
69+++ django_configglue/management/commands/settings.py 2011-07-27 00:18:29 +0000
70@@ -1,11 +1,11 @@
71-# Copyright 2010 Canonical Ltd. This software is licensed under the
72+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
73 # GNU Lesser General Public License version 3 (see the file LICENSE).
74
75 import os
76 import sys
77 from optparse import make_option, OptionParser
78
79-from configglue.pyschema.glue import schemaconfigglue
80+from configglue.glue import schemaconfigglue
81 from django.conf import settings, global_settings
82 from django.core.management.base import BaseCommand, CommandError
83
84
85=== modified file 'django_configglue/models.py'
86--- django_configglue/models.py 2011-07-15 02:02:55 +0000
87+++ django_configglue/models.py 2011-07-27 00:18:29 +0000
88@@ -1,2 +1,2 @@
89-# Copyright 2010 Canonical Ltd. This software is licensed under the
90+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
91 # GNU Lesser General Public License version 3 (see the file LICENSE).
92
93=== modified file 'django_configglue/schema.py'
94--- django_configglue/schema.py 2011-07-15 02:02:55 +0000
95+++ django_configglue/schema.py 2011-07-27 00:18:29 +0000
96@@ -1,9 +1,9 @@
97-# Copyright 2010 Canonical Ltd. This software is licensed under the
98+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
99 # GNU Lesser General Public License version 3 (see the file LICENSE).
100 import inspect
101 import logging
102
103-from configglue.pyschema.schema import (
104+from configglue.schema import (
105 BoolOption,
106 Section,
107 DictOption,
108
109=== modified file 'django_configglue/tests/__init__.py'
110--- django_configglue/tests/__init__.py 2010-08-06 19:27:35 +0000
111+++ django_configglue/tests/__init__.py 2011-07-27 00:18:29 +0000
112@@ -1,4 +1,4 @@
113-# Copyright 2010 Canonical Ltd. This software is licensed under the
114+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
115 # GNU Lesser General Public License version 3 (see the file LICENSE).
116
117 # import all test modules to conform to Django requirements
118
119=== modified file 'django_configglue/tests/helpers.py'
120--- django_configglue/tests/helpers.py 2011-07-14 02:58:41 +0000
121+++ django_configglue/tests/helpers.py 2011-07-27 00:18:29 +0000
122@@ -1,4 +1,4 @@
123-# Copyright 2010 Canonical Ltd. This software is licensed under the
124+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
125 # GNU Lesser General Public License version 3 (see the file LICENSE).
126
127 import os
128@@ -11,7 +11,7 @@
129 from django.conf import settings
130 from django.test import TestCase
131
132-from configglue.pyschema.schema import (
133+from configglue.schema import (
134 ListOption,
135 TupleOption,
136 Schema,
137
138=== modified file 'django_configglue/tests/settings.py'
139--- django_configglue/tests/settings.py 2011-06-24 18:56:11 +0000
140+++ django_configglue/tests/settings.py 2011-07-27 00:18:29 +0000
141@@ -1,4 +1,4 @@
142-# Copyright 2010 Canonical Ltd. This software is licensed under the
143+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
144 # GNU Lesser General Public License version 3 (see the file LICENSE).
145
146 import django
147
148=== modified file 'django_configglue/tests/test_configglue.py'
149--- django_configglue/tests/test_configglue.py 2011-07-15 22:36:02 +0000
150+++ django_configglue/tests/test_configglue.py 2011-07-27 00:18:29 +0000
151@@ -1,5 +1,5 @@
152 # -*- coding: utf-8 -*-
153-# Copyright 2010 Canonical Ltd. This software is licensed under the
154+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
155 # GNU Lesser General Public License version 3 (see the file LICENSE).
156
157 import inspect
158@@ -8,7 +8,7 @@
159 from unittest import TestCase
160
161 import django
162-from configglue.pyschema.schema import (
163+from configglue.schema import (
164 BoolOption,
165 DictOption,
166 IntOption,
167@@ -18,7 +18,7 @@
168 StringOption,
169 TupleOption,
170 )
171-from configglue.pyschema.parser import (
172+from configglue.parser import (
173 CONFIG_FILE_ENCODING,
174 SchemaConfigParser,
175 )
176
177=== modified file 'django_configglue/tests/test_settings.py'
178--- django_configglue/tests/test_settings.py 2011-07-14 02:58:41 +0000
179+++ django_configglue/tests/test_settings.py 2011-07-27 00:18:29 +0000
180@@ -1,4 +1,4 @@
181-# Copyright 2010 Canonical Ltd. This software is licensed under the
182+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
183 # GNU Lesser General Public License version 3 (see the file LICENSE).
184
185 import os.path
186@@ -8,7 +8,10 @@
187 from django.conf import settings
188 from django.core.management import ManagementUtility
189
190+from mock import patch, Mock
191+
192 from django_configglue.utils import SETTINGS_ENCODING
193+from django_configglue.schema import schemas
194 from django_configglue.tests.helpers import (
195 ConfigGlueDjangoCommandTestCase,
196 SchemaHelperTestCase,
197@@ -112,9 +115,6 @@
198 class GeneratedSettingsTestCase(ConfigGlueDjangoCommandTestCase,
199 SchemaHelperTestCase):
200 def setUp(self):
201- from django_configglue.schema import schemas
202- from mock import patch, Mock
203-
204 self.expected_schema = schemas.get(
205 django.get_version(), strict=True)()
206
207@@ -129,13 +129,18 @@
208 self.patch.stop()
209 super(GeneratedSettingsTestCase, self).tearDown()
210
211- def test_generated_schema(self):
212+ @patch('django_configglue.schema.logging.warn')
213+ def test_generated_schema(self, mock_warn):
214 # import here so that the necessary modules can be mocked before
215 # being required
216 from django.conf import settings
217 schema = settings.__CONFIGGLUE_PARSER__.schema
218 self.assert_schemas_equal(schema, self.expected_schema)
219
220+ self.assertEqual(mock_warn.call_args_list,
221+ [(("No schema registered for version 'foo'",), {}),
222+ (("Dynamically creating schema for version 'foo'",), {})])
223+
224
225 class ValidateCommandTestCase(ConfigGlueDjangoCommandTestCase):
226 COMMAND = 'settings'
227
228=== modified file 'django_configglue/utils.py'
229--- django_configglue/utils.py 2011-04-12 20:13:14 +0000
230+++ django_configglue/utils.py 2011-07-27 00:18:29 +0000
231@@ -1,8 +1,8 @@
232-# Copyright 2010 Canonical Ltd. This software is licensed under the
233+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
234 # GNU Lesser General Public License version 3 (see the file LICENSE).
235 import sys
236
237-from configglue.pyschema.parser import SchemaConfigParser
238+from configglue.parser import SchemaConfigParser
239
240
241 SETTINGS_ENCODING = 'utf-8'
242
243=== modified file 'doc/quickstart.rst'
244--- doc/quickstart.rst 2010-10-13 19:01:04 +0000
245+++ doc/quickstart.rst 2011-07-27 00:18:29 +0000
246@@ -13,7 +13,7 @@
247 Start by creating a module called *schema.py*, such as ::
248
249 import django
250- from configglue.pyschema import Schema, IntConfigOption, BoolConfigOption
251+ from configglue.schema import Schema, IntOption, BoolOption
252 from django_configglue.schema import schemas
253
254
255@@ -54,7 +54,7 @@
256
257 Replace the standard *settings.py* module in your project with ::
258
259- from configglue.pyschema import SchemaConfigParser
260+ from configglue.parser import SchemaConfigParser
261 from django_configglue.utils import update_settings
262
263 from schema import MySchema
264
265=== modified file 'doc/walkthrough.rst'
266--- doc/walkthrough.rst 2010-10-13 19:01:04 +0000
267+++ doc/walkthrough.rst 2011-07-27 00:18:29 +0000
268@@ -25,7 +25,7 @@
269 Replace *settings.py* with ::
270
271 import django
272- from configglue.pyschema import SchemaConfigParser
273+ from configglue.parser import SchemaConfigParser
274 from django_configglue.utils import update_settings
275 from django_configglue.schema import schemas
276
277
278=== modified file 'setup.py'
279--- setup.py 2011-07-10 15:18:48 +0000
280+++ setup.py 2011-07-27 00:18:29 +0000
281@@ -1,4 +1,4 @@
282-# Copyright 2010 Canonical Ltd. This software is licensed under the
283+# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
284 # GNU Lesser General Public License version 3 (see the file LICENSE).
285
286 from setuptools import setup, find_packages
287@@ -38,7 +38,7 @@
288
289 # content
290 packages=find_packages(exclude=['testproject*']),
291- install_requires=['django >= 1.0.2-final', 'configglue > 0.10'],
292+ install_requires=['django >= 1.0.2-final', 'configglue >= 1.0'],
293
294 # tests
295 test_suite='testproject.testrunner.runtests',

Subscribers

People subscribed via source and target branches

to all changes: