From 0a2ea908f35f245b1c4750d8d97ffe645ce29a57 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Wed, 13 Nov 2013 17:36:35 -0800 Subject: tox.ini: Add py34 Useful for testing with the new Python 3.4 alpha versions. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index b50e56544..2bf213ca4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py26,py27,py32,py33,pypy,cover + py26,py27,py32,py33,py34,pypy,cover [testenv] commands = -- cgit v1.2.3 From 69b613db258d71caa925f0165030b9974a1610ca Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 21 Feb 2014 21:51:53 -0600 Subject: test cases to reproduce #1246 --- pyramid/tests/test_session.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pyramid/tests/test_session.py b/pyramid/tests/test_session.py index 1ad0729b3..6bce764ca 100644 --- a/pyramid/tests/test_session.py +++ b/pyramid/tests/test_session.py @@ -519,7 +519,7 @@ def serialize(data, secret): from pyramid.compat import native_ from pyramid.compat import pickle pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL) - sig = hmac.new(bytes_(secret), pickled, sha1).hexdigest() + sig = hmac.new(bytes_(secret, 'utf-8'), pickled, sha1).hexdigest() return sig + native_(base64.b64encode(pickled)) class Test_signed_serialize(unittest.TestCase): @@ -531,6 +531,12 @@ class Test_signed_serialize(unittest.TestCase): expected = serialize('123', 'secret') result = self._callFUT('123', 'secret') self.assertEqual(result, expected) + + def test_it_with_highorder_secret(self): + secret = b'La Pe\xc3\xb1a'.decode('utf-8') + expected = serialize('123', secret) + result = self._callFUT('123', secret) + self.assertEqual(result, expected) class Test_signed_deserialize(unittest.TestCase): def _callFUT(self, serialized, secret, hmac=None): @@ -562,6 +568,12 @@ class Test_signed_deserialize(unittest.TestCase): serialized = 'bad' + serialize('123', 'secret') self.assertRaises(ValueError, self._callFUT, serialized, 'secret') + def test_it_with_highorder_secret(self): + secret = b'La Pe\xc3\xb1a'.decode('utf-8') + serialized = serialize('123', secret) + result = self._callFUT(serialized, secret) + self.assertEqual(result, '123') + class Test_check_csrf_token(unittest.TestCase): def _callFUT(self, *args, **kwargs): from ..session import check_csrf_token -- cgit v1.2.3 From adcacf48dbf6eb84a1c1661918f3fb093a929bc2 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 21 Feb 2014 21:52:14 -0600 Subject: support high-order characters in UnencryptedCookieSessionFactoryConfig secrets --- CHANGES.txt | 3 +++ pyramid/session.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 84d0694e3..6372c904d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Unreleased - Avoid crash in ``pserve --reload`` under Py3k, when iterating over posiibly mutated ``sys.modules``. +- ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained + higher order characters. See https://github.com/Pylons/pyramid/issues/1246 + 1.5b1 (2014-02-08) ================== diff --git a/pyramid/session.py b/pyramid/session.py index 3a045b91b..d1964c43e 100644 --- a/pyramid/session.py +++ b/pyramid/session.py @@ -57,7 +57,7 @@ def signed_serialize(data, secret): response.set_cookie('signed_cookie', cookieval) """ pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL) - sig = hmac.new(bytes_(secret), pickled, hashlib.sha1).hexdigest() + sig = hmac.new(bytes_(secret, 'utf-8'), pickled, hashlib.sha1).hexdigest() return sig + native_(base64.b64encode(pickled)) def signed_deserialize(serialized, secret, hmac=hmac): @@ -81,7 +81,9 @@ def signed_deserialize(serialized, secret, hmac=hmac): # Badly formed data can make base64 die raise ValueError('Badly formed base64 data: %s' % e) - sig = bytes_(hmac.new(bytes_(secret), pickled, hashlib.sha1).hexdigest()) + sig = bytes_(hmac.new( + bytes_(secret, 'utf-8'), pickled, hashlib.sha1, + ).hexdigest()) # Avoid timing attacks (see # http://seb.dbzteam.org/crypto/python-oauth-timing-hmac.pdf) -- cgit v1.2.3 From cf026e2cd8704a679dd83760907d8847deabb18e Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 21 Feb 2014 22:33:33 -0600 Subject: fix regression with code expecting secrets to be encoded with latin-1 --- pyramid/session.py | 16 ++++++++++++---- pyramid/tests/test_session.py | 17 +++++++++++++++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/pyramid/session.py b/pyramid/session.py index d1964c43e..4dc7bda74 100644 --- a/pyramid/session.py +++ b/pyramid/session.py @@ -57,7 +57,12 @@ def signed_serialize(data, secret): response.set_cookie('signed_cookie', cookieval) """ pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL) - sig = hmac.new(bytes_(secret, 'utf-8'), pickled, hashlib.sha1).hexdigest() + try: + # bw-compat with pyramid <= 1.5b1 where latin1 is the default + secret = bytes_(secret) + except UnicodeEncodeError: + secret = bytes_(secret, 'utf-8') + sig = hmac.new(secret, pickled, hashlib.sha1).hexdigest() return sig + native_(base64.b64encode(pickled)) def signed_deserialize(serialized, secret, hmac=hmac): @@ -81,9 +86,12 @@ def signed_deserialize(serialized, secret, hmac=hmac): # Badly formed data can make base64 die raise ValueError('Badly formed base64 data: %s' % e) - sig = bytes_(hmac.new( - bytes_(secret, 'utf-8'), pickled, hashlib.sha1, - ).hexdigest()) + try: + # bw-compat with pyramid <= 1.5b1 where latin1 is the default + secret = bytes_(secret) + except UnicodeEncodeError: + secret = bytes_(secret, 'utf-8') + sig = bytes_(hmac.new(secret, pickled, hashlib.sha1).hexdigest()) # Avoid timing attacks (see # http://seb.dbzteam.org/crypto/python-oauth-timing-hmac.pdf) diff --git a/pyramid/tests/test_session.py b/pyramid/tests/test_session.py index 6bce764ca..f1b1e2296 100644 --- a/pyramid/tests/test_session.py +++ b/pyramid/tests/test_session.py @@ -533,10 +533,16 @@ class Test_signed_serialize(unittest.TestCase): self.assertEqual(result, expected) def test_it_with_highorder_secret(self): - secret = b'La Pe\xc3\xb1a'.decode('utf-8') + secret = b'\xce\xb1\xce\xb2\xce\xb3\xce\xb4'.decode('utf-8') expected = serialize('123', secret) result = self._callFUT('123', secret) self.assertEqual(result, expected) + + def test_it_with_latin1_secret(self): + secret = b'La Pe\xc3\xb1a' + expected = serialize('123', secret) + result = self._callFUT('123', secret.decode('latin-1')) + self.assertEqual(result, expected) class Test_signed_deserialize(unittest.TestCase): def _callFUT(self, serialized, secret, hmac=None): @@ -569,11 +575,18 @@ class Test_signed_deserialize(unittest.TestCase): self.assertRaises(ValueError, self._callFUT, serialized, 'secret') def test_it_with_highorder_secret(self): - secret = b'La Pe\xc3\xb1a'.decode('utf-8') + secret = b'\xce\xb1\xce\xb2\xce\xb3\xce\xb4'.decode('utf-8') serialized = serialize('123', secret) result = self._callFUT(serialized, secret) self.assertEqual(result, '123') + # bwcompat with pyramid <= 1.5b1 where latin1 is the default + def test_it_with_latin1_secret(self): + secret = b'La Pe\xc3\xb1a' + serialized = serialize('123', secret) + result = self._callFUT(serialized, secret.decode('latin-1')) + self.assertEqual(result, '123') + class Test_check_csrf_token(unittest.TestCase): def _callFUT(self, *args, **kwargs): from ..session import check_csrf_token -- cgit v1.2.3 From 1bd3157143c7ae6e0a35fa07e4f0888ddd347ab5 Mon Sep 17 00:00:00 2001 From: Robert Buchholz Date: Mon, 3 Mar 2014 16:24:31 +0100 Subject: Hand RepozeWho1AuthenticationPolicy.remember kwargs to repoze.who #1249 Documentation for pyramid.security.remember supports keyword arguments to hand over to the authentication policy. However, when using RepozeWho1AuthenticationPolicy, all of the kw were dropped in remember. It is my understanding that with repoze.who, additional configuration parameters shall be stored in the identity dictionary. In our case, setting the max_age parameter to the authtkt identifier, would be done using an identity {'repoze.who.userid':principal, 'max_age': 23}. It seems sensible just to hand over kw through the identity dictionary and all users to specify max_age or other parameters such as userdata. --- pyramid/authentication.py | 11 +++++++++-- pyramid/tests/test_authentication.py | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pyramid/authentication.py b/pyramid/authentication.py index ba7b864f9..b84981bbc 100644 --- a/pyramid/authentication.py +++ b/pyramid/authentication.py @@ -336,12 +336,19 @@ class RepozeWho1AuthenticationPolicy(CallbackAuthenticationPolicy): return effective_principals def remember(self, request, principal, **kw): - """ Store the ``principal`` as ``repoze.who.userid``.""" + """ Store the ``principal`` as ``repoze.who.userid``. + + The identity to authenticated to :mod:`repoze.who` + will contain the given principal as ``userid``, and + provide all keyword arguments as additional identity + keys. Useful keys could be ``max_age`` or ``userdata``. + """ identifier = self._get_identifier(request) if identifier is None: return [] environ = request.environ - identity = {'repoze.who.userid':principal} + identity = kw + identity['repoze.who.userid'] = principal return identifier.remember(environ, identity) def forget(self, request): diff --git a/pyramid/tests/test_authentication.py b/pyramid/tests/test_authentication.py index 79d2a5923..e25e9faa1 100644 --- a/pyramid/tests/test_authentication.py +++ b/pyramid/tests/test_authentication.py @@ -350,6 +350,14 @@ class TestRepozeWho1AuthenticationPolicy(unittest.TestCase): self.assertEqual(result[0], request.environ) self.assertEqual(result[1], {'repoze.who.userid':'fred'}) + def test_remember_kwargs(self): + authtkt = DummyWhoPlugin() + request = DummyRequest( + {'repoze.who.plugins':{'auth_tkt':authtkt}}) + policy = self._makeOne() + result = policy.remember(request, 'fred', max_age=23) + self.assertEqual(result[1], {'repoze.who.userid':'fred', 'max_age': 23}) + def test_forget_no_plugins(self): request = DummyRequest({}) policy = self._makeOne() -- cgit v1.2.3 From 49bcc8e86ded6785c3bddd6972f870b2d2d858a8 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Mon, 10 Mar 2014 09:15:08 -0700 Subject: Add integration tests for Unicode in URL --- pyramid/tests/test_integration.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pyramid/tests/test_integration.py b/pyramid/tests/test_integration.py index 9d3a9e004..bc22c2e54 100644 --- a/pyramid/tests/test_integration.py +++ b/pyramid/tests/test_integration.py @@ -640,6 +640,44 @@ class RendererScanAppTest(IntegrationBase, unittest.TestCase): res = testapp.get('/two', status=200) self.assertTrue(b'Two!' in res.body) +class UnicodeInURLTest(unittest.TestCase): + def _makeConfig(self): + from pyramid.config import Configurator + config = Configurator() + return config + + def _makeTestApp(self, config): + from webtest import TestApp + app = config.make_wsgi_app() + return TestApp(app) + + def test_unicode_in_url_404(self): + request_path = b'/avalia%C3%A7%C3%A3o_participante/' + request_path_unicode = u'/avalia\xe7\xe3o_participante/' + + config = self._makeConfig() + testapp = self._makeTestApp(config) + + res = testapp.get(request_path, status=404) + self.assertTrue(request_path_unicode in res.text) + + def test_unicode_in_url_200(self): + request_path = b'/avalia%C3%A7%C3%A3o_participante' + request_path_unicode = u'/avalia\xe7\xe3o_participante' + + def myview(request): + return 'XXX' + + config = self._makeConfig() + config.add_route('myroute', request_path_unicode) + config.add_view(myview, route_name='myroute', renderer='json') + testapp = self._makeTestApp(config) + + res = testapp.get(request_path, status=200) + + self.assertEqual(res.text, '"XXX"') + + class AcceptContentTypeTest(unittest.TestCase): def setUp(self): def hello_view(request): -- cgit v1.2.3 From 0c425da09d966bafd2f4043fa8919f3da4d8abc4 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Tue, 11 Mar 2014 08:27:56 -0700 Subject: Remove 'b'; WebTest or WebOb doesn't like Python 3 bytes for URLs --- pyramid/tests/test_integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyramid/tests/test_integration.py b/pyramid/tests/test_integration.py index bc22c2e54..48199c419 100644 --- a/pyramid/tests/test_integration.py +++ b/pyramid/tests/test_integration.py @@ -652,7 +652,7 @@ class UnicodeInURLTest(unittest.TestCase): return TestApp(app) def test_unicode_in_url_404(self): - request_path = b'/avalia%C3%A7%C3%A3o_participante/' + request_path = '/avalia%C3%A7%C3%A3o_participante/' request_path_unicode = u'/avalia\xe7\xe3o_participante/' config = self._makeConfig() @@ -662,7 +662,7 @@ class UnicodeInURLTest(unittest.TestCase): self.assertTrue(request_path_unicode in res.text) def test_unicode_in_url_200(self): - request_path = b'/avalia%C3%A7%C3%A3o_participante' + request_path = '/avalia%C3%A7%C3%A3o_participante' request_path_unicode = u'/avalia\xe7\xe3o_participante' def myview(request): -- cgit v1.2.3 From bc87edd3d8df7c5bd4c8d267c626f4fd22ef7443 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Tue, 11 Mar 2014 10:10:10 -0700 Subject: Convert from u prefix to byte string and decode because the u prefix is not supported in Python 3.2 --- pyramid/tests/test_integration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyramid/tests/test_integration.py b/pyramid/tests/test_integration.py index 48199c419..0ab18de7a 100644 --- a/pyramid/tests/test_integration.py +++ b/pyramid/tests/test_integration.py @@ -652,8 +652,8 @@ class UnicodeInURLTest(unittest.TestCase): return TestApp(app) def test_unicode_in_url_404(self): - request_path = '/avalia%C3%A7%C3%A3o_participante/' - request_path_unicode = u'/avalia\xe7\xe3o_participante/' + request_path = '/avalia%C3%A7%C3%A3o_participante' + request_path_unicode = b'/avalia\xc3\xa7\xc3\xa3o_participante'.decode('utf-8') config = self._makeConfig() testapp = self._makeTestApp(config) @@ -663,7 +663,7 @@ class UnicodeInURLTest(unittest.TestCase): def test_unicode_in_url_200(self): request_path = '/avalia%C3%A7%C3%A3o_participante' - request_path_unicode = u'/avalia\xe7\xe3o_participante' + request_path_unicode = b'/avalia\xc3\xa7\xc3\xa3o_participante'.decode('utf-8') def myview(request): return 'XXX' -- cgit v1.2.3 From a99abf808a15fbc02da4c27ab7d46d03668b62ed Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Tue, 11 Mar 2014 11:12:13 -0700 Subject: test_unicode_in_url_404: Add comment to clarify why request_path_unicode is expected to be in res.txt --- pyramid/tests/test_integration.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyramid/tests/test_integration.py b/pyramid/tests/test_integration.py index 0ab18de7a..35648ed38 100644 --- a/pyramid/tests/test_integration.py +++ b/pyramid/tests/test_integration.py @@ -659,6 +659,10 @@ class UnicodeInURLTest(unittest.TestCase): testapp = self._makeTestApp(config) res = testapp.get(request_path, status=404) + + # Pyramid default 404 handler outputs: + # u'404 Not Found\n\nThe resource could not be found.\n\n\n' + # u'/avalia\xe7\xe3o_participante\n\n' self.assertTrue(request_path_unicode in res.text) def test_unicode_in_url_200(self): -- cgit v1.2.3 From ee824a80bab0b30f7f8f466a9c93765b35c1c677 Mon Sep 17 00:00:00 2001 From: thapar Date: Mon, 17 Mar 2014 20:16:44 -0400 Subject: Added note to place login/logout route definitions before `/{pagename}` route Resolves https://github.com/Pylons/pyramid/issues/1274 --- docs/tutorials/wiki2/authorization.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index 1e5d0dcbf..1417dbdd8 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -207,6 +207,19 @@ routes: :linenos: :language: python +.. note:: These lines must be added `before` this ``view_page`` route + definition: + .. literalinclude:: src/authorization/tutorial/__init__.py + :lines: 32 + :linenos: + :language: python + This is because ``view_page``'s route definition uses a catch-all + "replacement marker" ``/{pagename}`` (see :ref:_route_pattern_syntax ) + which will catch any route that was not already caught by any + route listed above it in ``__init__.py``. Hence, for ``login`` and + ``logout`` views to have the opportunity of being matched + (or "caught"), they must be above ``/{pagename}``. + Add Login and Logout Views ~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From b6d8cf9c2eb8f7dd03fa3487b8e401940c314fb4 Mon Sep 17 00:00:00 2001 From: thapar Date: Mon, 17 Mar 2014 21:26:01 -0400 Subject: Corrected inline markup to use * for italics --- docs/tutorials/wiki2/authorization.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index 1417dbdd8..e3811b338 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -207,7 +207,7 @@ routes: :linenos: :language: python -.. note:: These lines must be added `before` this ``view_page`` route +.. note:: These lines must be added *before* this ``view_page`` route definition: .. literalinclude:: src/authorization/tutorial/__init__.py :lines: 32 -- cgit v1.2.3 From cf4023ad25637720ed5ccd1e7cdffd24da4c47cb Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 21 Mar 2014 06:19:27 -0700 Subject: - correct bad .rst syntax --- docs/tutorials/wiki2/authorization.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index e3811b338..2e35574fd 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -207,14 +207,16 @@ routes: :linenos: :language: python -.. note:: These lines must be added *before* this ``view_page`` route - definition: +.. note:: The preceding lines must be added *before* the following + ``view_page`` route definition: + .. literalinclude:: src/authorization/tutorial/__init__.py :lines: 32 :linenos: :language: python + This is because ``view_page``'s route definition uses a catch-all - "replacement marker" ``/{pagename}`` (see :ref:_route_pattern_syntax ) + "replacement marker" ``/{pagename}`` (see :ref:`route_pattern_syntax`) which will catch any route that was not already caught by any route listed above it in ``__init__.py``. Hence, for ``login`` and ``logout`` views to have the opportunity of being matched -- cgit v1.2.3 From 49923dbf430fc6becc92133ba7672e93f1bc955e Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 21 Mar 2014 06:47:55 -0700 Subject: - fix indentation of code block --- docs/quick_tutorial/scaffolds.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/quick_tutorial/scaffolds.rst b/docs/quick_tutorial/scaffolds.rst index 8ca2d27df..4f2694100 100644 --- a/docs/quick_tutorial/scaffolds.rst +++ b/docs/quick_tutorial/scaffolds.rst @@ -63,11 +63,11 @@ Steps On startup, ``pserve`` logs some output: - .. code-block:: bash + .. code-block:: bash - Starting subprocess with file monitor - Starting server in PID 72213. - Starting HTTP server on http://0.0.0.0:6543 + Starting subprocess with file monitor + Starting server in PID 72213. + Starting HTTP server on http://0.0.0.0:6543 #. Open http://localhost:6543/ in your browser. -- cgit v1.2.3 From 71c979fb9a89cffdc57a9533a61101483c23b93b Mon Sep 17 00:00:00 2001 From: Daniel Haaker Date: Wed, 26 Mar 2014 09:56:15 +0100 Subject: Remove whitespace before the open parenthesis --- docs/quick_tutorial/hello_world/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/quick_tutorial/hello_world/app.py b/docs/quick_tutorial/hello_world/app.py index 210075023..0a95f9ad3 100644 --- a/docs/quick_tutorial/hello_world/app.py +++ b/docs/quick_tutorial/hello_world/app.py @@ -4,7 +4,7 @@ from pyramid.response import Response def hello_world(request): - print ('Incoming request') + print('Incoming request') return Response('

Hello World!

') @@ -14,4 +14,4 @@ if __name__ == '__main__': config.add_view(hello_world, route_name='hello') app = config.make_wsgi_app() server = make_server('0.0.0.0', 6543, app) - server.serve_forever() \ No newline at end of file + server.serve_forever() -- cgit v1.2.3 From 92b27dc06a4a73ea4ff0649855a5a84cd30b458c Mon Sep 17 00:00:00 2001 From: Daniel Haaker Date: Wed, 26 Mar 2014 10:10:54 +0100 Subject: Update hello_world.rst Modify 'Extra Credit' to reflect code example --- docs/quick_tutorial/hello_world.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/quick_tutorial/hello_world.rst b/docs/quick_tutorial/hello_world.rst index 86e1319f0..1a9ba4c9d 100644 --- a/docs/quick_tutorial/hello_world.rst +++ b/docs/quick_tutorial/hello_world.rst @@ -96,13 +96,13 @@ Extra Credit .. code-block:: python - print ('Starting up server on http://localhost:6547') + print('Incoming request') ...instead of: .. code-block:: python - print 'Starting up server on http://localhost:6547' + print 'Incoming request' #. What happens if you return a string of HTML? A sequence of integers? -- cgit v1.2.3 From 32200c3af84c352c066eb2c402496305375912e4 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 27 Mar 2014 22:03:59 -0500 Subject: broadcast 3.4 support --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 3c17af20d..bb443330d 100644 --- a/setup.py +++ b/setup.py @@ -79,6 +79,7 @@ setup(name='pyramid', "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: Pyramid", -- cgit v1.2.3 From e4dc7443ddf8e5e3d861c66e0cef565a6d907789 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 20:07:59 +0200 Subject: Update documentation for Lingua 2 --- docs/narr/i18n.rst | 182 ++++++++----------------------- pyramid/scaffolds/alchemy/setup.cfg_tmpl | 21 ---- pyramid/scaffolds/starter/setup.cfg_tmpl | 21 ---- pyramid/scaffolds/zodb/setup.cfg_tmpl | 21 ---- 4 files changed, 48 insertions(+), 197 deletions(-) diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 5f50ca212..31b63664b 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -245,88 +245,69 @@ GNU gettext uses three types of files in the translation framework, A ``.po`` file is turned into a machine-readable binary file, which is the ``.mo`` file. Compiling the translations to machine code - makes the localized program run faster. + makes the localized program start faster. The tools for working with :term:`gettext` translation files related to a -:app:`Pyramid` application is :term:`Babel` and :term:`Lingua`. Lingua is a -Babel extension that provides support for scraping i18n references out of -Python and Chameleon files. +:app:`Pyramid` application are :term:`Lingua` and :term:`Gettext`. Lingua +can scrape i18n references out of Python and Chameleon files and create +the ``.pot`` file. Gettext includes tools to update a ``.po`` file from +an updated ``.pot`` file and to compile ``.po`` files to ``.mo`` files. .. index:: - single: Babel + single: Gettext single: Lingua .. _installing_babel: -Installing Babel and Lingua -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Installing Lingua and Gettext +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order for the commands related to working with ``gettext`` translation -files to work properly, you will need to have :term:`Babel` and -:term:`Lingua` installed into the same environment in which :app:`Pyramid` is +files to work properly, you will need to have :term:`Lingua` and +:term:`Gettext` installed into the same environment in which :app:`Pyramid` is installed. Installation on UNIX ++++++++++++++++++++ -If the :term:`virtualenv` into which you've installed your :app:`Pyramid` -application lives in ``/my/virtualenv``, you can install Babel and Lingua -like so: +Gettext is often already installed on UNIX systems. You can check if it is +installed by testing if the ``msgfmt`` command is available. If it is not +available you can install it through the packaging system from your OS; +the package name is almost always ``gettext``. For example on a Debian or +Ubuntu system run this command: .. code-block:: text - $ cd /my/virtualenv - $ $VENV/bin/easy_install Babel lingua + $ sudo apt-get install gettext -Installation on Windows -+++++++++++++++++++++++ - -If the :term:`virtualenv` into which you've installed your :app:`Pyramid` -application lives in ``C:\my\virtualenv``, you can install Babel and Lingua +Installing Lingua is done with the Python packaging tools. If the +:term:`virtualenv` into which you've installed your :app:`Pyramid` application +lives in ``/my/virtualenv``, you can install Lingua like so: .. code-block:: text - C> %VENV%\Scripts\easy_install Babel lingua + $ cd /my/virtualenv + $ $VENV/bin/pip install lingua -.. index:: - single: Babel; message extractors - single: Lingua +Installation on Windows ++++++++++++++++++++++++ -Changing the ``setup.py`` -+++++++++++++++++++++++++ +There are several ways to install Gettext on Windows: it is included in the +`Cygwin `_ collection, or you can use the `installer +from the GnuWin32 `_ +or compile it yourself. Make sure the installation path is added to your +``$PATH``. -You need to add a few boilerplate lines to your application's ``setup.py`` -file in order to properly generate :term:`gettext` files from your -application. -.. note:: See :ref:`project_narr` to learn about the - composition of an application's ``setup.py`` file. +Installing Lingua is done with the Python packaging tools. If the +:term:`virtualenv` into which you've installed your :app:`Pyramid` application +lives in ``C:\my\virtualenv``, you can install Lingua like so: -In particular, add the ``Babel`` and ``lingua`` distributions to the -``install_requires`` list and insert a set of references to :term:`Babel` -*message extractors* within the call to :func:`setuptools.setup` inside your -application's ``setup.py`` file: +.. code-block:: text -.. code-block:: python - :linenos: + C> %VENV%\Scripts\pip install lingua - setup(name="mypackage", - # ... - install_requires = [ - # ... - 'Babel', - 'lingua', - ], - message_extractors = { '.': [ - ('**.py', 'lingua_python', None ), - ('**.pt', 'lingua_xml', None ), - ]}, - ) - -The ``message_extractors`` stanza placed into the ``setup.py`` file causes -the :term:`Babel` message catalog extraction machinery to also consider -``*.pt`` files when doing message id extraction. .. index:: pair: extracting; messages @@ -336,90 +317,20 @@ the :term:`Babel` message catalog extraction machinery to also consider Extracting Messages from Code and Templates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once Babel and Lingua are installed and your application's ``setup.py`` file -has the correct message extractor references, you may extract a message -catalog template from the code and :term:`Chameleon` templates which reside -in your :app:`Pyramid` application. You run a ``setup.py`` command to -extract the messages: +Once Lingua is installed you may extract a message catalog template from the +code and :term:`Chameleon` templates which reside in your :app:`Pyramid` +application. You run a ``pot-create`` command to extract the messages: .. code-block:: text $ cd /place/where/myapplication/setup.py/lives $ mkdir -p myapplication/locale - $ $VENV/bin/python setup.py extract_messages + $ $VENT/bin/pot-create src > myapplication/locale/myapplication.pot The message catalog ``.pot`` template will end up in: ``myapplication/locale/myapplication.pot``. -.. index:: - single: translation domains - -Translation Domains -+++++++++++++++++++ - -The name ``myapplication`` above in the filename ``myapplication.pot`` -denotes the :term:`translation domain` of the translations that must -be performed to localize your application. By default, the -translation domain is the :term:`project` name of your -:app:`Pyramid` application. - -To change the translation domain of the extracted messages in your project, -edit the ``setup.cfg`` file of your application, The default ``setup.cfg`` -file of a ``pcreate`` -generated :app:`Pyramid` application has stanzas in it -that look something like the following: - -.. code-block:: ini - :linenos: - - [compile_catalog] - directory = myproject/locale - domain = MyProject - statistics = true - - [extract_messages] - add_comments = TRANSLATORS: - output_file = myproject/locale/MyProject.pot - width = 80 - - [init_catalog] - domain = MyProject - input_file = myproject/locale/MyProject.pot - output_dir = myproject/locale - - [update_catalog] - domain = MyProject - input_file = myproject/locale/MyProject.pot - output_dir = myproject/locale - previous = true - -In the above example, the project name is ``MyProject``. To indicate -that you'd like the domain of your translations to be ``mydomain`` -instead, change the ``setup.cfg`` file stanzas to look like so: - -.. code-block:: ini - :linenos: - - [compile_catalog] - directory = myproject/locale - domain = mydomain - statistics = true - - [extract_messages] - add_comments = TRANSLATORS: - output_file = myproject/locale/mydomain.pot - width = 80 - - [init_catalog] - domain = mydomain - input_file = myproject/locale/mydomain.pot - output_dir = myproject/locale - - [update_catalog] - domain = mydomain - input_file = myproject/locale/mydomain.pot - output_dir = myproject/locale - previous = true .. index:: pair: initializing; message catalog @@ -432,15 +343,17 @@ Once you've extracted messages into a ``.pot`` file (see in the ``.pot`` file, you need to generate at least one ``.po`` file. A ``.po`` file represents translations of a particular set of messages to a particular locale. Initialize a ``.po`` file for a specific -locale from a pre-generated ``.pot`` template by using the ``setup.py -init_catalog`` command: +locale from a pre-generated ``.pot`` template by using the ``msginit`` +command: .. code-block:: text $ cd /place/where/myapplication/setup.py/lives - $ $VENV/bin/python setup.py init_catalog -l es + $ cd myapplication/locale + $ mkdir -p es/LC_MESSAGES + $ msginit -l es es/LC_MESSAGES/myapplication.po -By default, the message catalog ``.po`` file will end up in: +This will create a new the message catalog ``.po`` file will in: ``myapplication/locale/es/LC_MESSAGES/myapplication.po``. @@ -465,12 +378,13 @@ files based on changes to the ``.pot`` file, so that the new and changed messages can also be translated or re-translated. First, regenerate the ``.pot`` file as per :ref:`extracting_messages`. -Then use the ``setup.py update_catalog`` command. +Then use the ``msgmerge`` command. .. code-block:: text $ cd /place/where/myapplication/setup.py/lives - $ $VENV/bin/python setup.py update_catalog + $ cd myapplication/locale + $ msgmerge --update es/LC_MESSAGES/myapplication.po myapplication.pot .. index:: pair: compiling; message catalog @@ -481,12 +395,12 @@ Compiling a Message Catalog File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Finally, to prepare an application for performing actual runtime -translations, compile ``.po`` files to ``.mo`` files: +translations, compile ``.po`` files to ``.mo`` files use the ``msgfmt``: .. code-block:: text $ cd /place/where/myapplication/setup.py/lives - $ $VENV/bin/python setup.py compile_catalog + $ msgfmt myapplication/locale/*/LC_MESSAGES/*.po This will create a ``.mo`` file for each ``.po`` file in your application. As long as the :term:`translation directory` in which diff --git a/pyramid/scaffolds/alchemy/setup.cfg_tmpl b/pyramid/scaffolds/alchemy/setup.cfg_tmpl index 5bec29823..8bf5d22c1 100644 --- a/pyramid/scaffolds/alchemy/setup.cfg_tmpl +++ b/pyramid/scaffolds/alchemy/setup.cfg_tmpl @@ -4,24 +4,3 @@ nocapture=1 cover-package={{package}} with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = {{package}}/locale -domain = {{project}} -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = {{package}}/locale/{{project}}.pot -width = 80 - -[init_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale - -[update_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale -previous = true diff --git a/pyramid/scaffolds/starter/setup.cfg_tmpl b/pyramid/scaffolds/starter/setup.cfg_tmpl index 04c738049..1bc9ec437 100644 --- a/pyramid/scaffolds/starter/setup.cfg_tmpl +++ b/pyramid/scaffolds/starter/setup.cfg_tmpl @@ -4,24 +4,3 @@ nocapture = 1 cover-package = {{package}} with-coverage = 1 cover-erase = 1 - -[compile_catalog] -directory = {{package}}/locale -domain = {{project}} -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = {{package}}/locale/{{project}}.pot -width = 80 - -[init_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale - -[update_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale -previous = true diff --git a/pyramid/scaffolds/zodb/setup.cfg_tmpl b/pyramid/scaffolds/zodb/setup.cfg_tmpl index 5bec29823..8bf5d22c1 100644 --- a/pyramid/scaffolds/zodb/setup.cfg_tmpl +++ b/pyramid/scaffolds/zodb/setup.cfg_tmpl @@ -4,24 +4,3 @@ nocapture=1 cover-package={{package}} with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = {{package}}/locale -domain = {{project}} -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = {{package}}/locale/{{project}}.pot -width = 80 - -[init_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale - -[update_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale -previous = true -- cgit v1.2.3 From 98a99d726f8892376f69fba0fa6b99752972f1c8 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 20:11:37 +0200 Subject: Update Lingua glossary item. --- docs/glossary.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/glossary.rst b/docs/glossary.rst index 0e340491b..2cc461a77 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -801,8 +801,9 @@ Glossary application. Lingua - A package by Wichert Akkerman which provides :term:`Babel` message - extractors for Python source files and Chameleon ZPT template files. + A package by Wichert Akkerman which provides the ``pot-create`` + command to extract translateable messages from Python sources + and Chameleon ZPT template files. Message Identifier A string used as a translation lookup key during localization. -- cgit v1.2.3 From cfaec8b63b271e141789244ad276d3045e00a2a8 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 21:01:43 +0200 Subject: Keep using easy_install. --- docs/narr/i18n.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 31b63664b..122f33130 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -288,7 +288,7 @@ like so: .. code-block:: text $ cd /my/virtualenv - $ $VENV/bin/pip install lingua + $ $VENV/bin/easy_install lingua Installation on Windows +++++++++++++++++++++++ @@ -306,7 +306,7 @@ lives in ``C:\my\virtualenv``, you can install Lingua like so: .. code-block:: text - C> %VENV%\Scripts\pip install lingua + C> %VENV%\Scripts\easy_install lingua .. index:: -- cgit v1.2.3 From d3a70e5e656eea3f527b56e9f03b6f754731dc4a Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 21:04:57 +0200 Subject: Fix $VENT typo --- docs/narr/i18n.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 122f33130..50e5a6817 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -325,7 +325,7 @@ application. You run a ``pot-create`` command to extract the messages: $ cd /place/where/myapplication/setup.py/lives $ mkdir -p myapplication/locale - $ $VENT/bin/pot-create src > myapplication/locale/myapplication.pot + $ $VENV/bin/pot-create src > myapplication/locale/myapplication.pot The message catalog ``.pot`` template will end up in: -- cgit v1.2.3 From c1cbf085fbf4e0280481acfbf1e9b6b0f8692cbd Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 21:07:24 +0200 Subject: Remove lingua references from setup.cfg description. --- docs/narr/project.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 62b91de0e..3631a9782 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -760,8 +760,8 @@ Our generated ``setup.cfg`` looks like this: :language: guess :linenos: -The values in the default setup file allow various commonly-used -internationalization commands and testing commands to work more smoothly. +The values in the default setup file make the testing commands to work more +smoothly. .. index:: single: package -- cgit v1.2.3 From 0a4433df3711755170396090d8daa69bfaef76f9 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 21:09:34 +0200 Subject: Always mention the msg* commands come from Gettext --- docs/narr/i18n.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 50e5a6817..1de2c8941 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -250,8 +250,9 @@ GNU gettext uses three types of files in the translation framework, The tools for working with :term:`gettext` translation files related to a :app:`Pyramid` application are :term:`Lingua` and :term:`Gettext`. Lingua can scrape i18n references out of Python and Chameleon files and create -the ``.pot`` file. Gettext includes tools to update a ``.po`` file from -an updated ``.pot`` file and to compile ``.po`` files to ``.mo`` files. +the ``.pot`` file. Gettext includes ``msgmerge`` tool to update a ``.po`` file +from an updated ``.pot`` file and ``msgfmt`` to compile ``.po`` files to +``.mo`` files. .. index:: single: Gettext @@ -344,7 +345,7 @@ in the ``.pot`` file, you need to generate at least one ``.po`` file. A ``.po`` file represents translations of a particular set of messages to a particular locale. Initialize a ``.po`` file for a specific locale from a pre-generated ``.pot`` template by using the ``msginit`` -command: +command from Gettext: .. code-block:: text @@ -378,7 +379,7 @@ files based on changes to the ``.pot`` file, so that the new and changed messages can also be translated or re-translated. First, regenerate the ``.pot`` file as per :ref:`extracting_messages`. -Then use the ``msgmerge`` command. +Then use the ``msgmerge`` command from Gettext. .. code-block:: text @@ -395,7 +396,8 @@ Compiling a Message Catalog File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Finally, to prepare an application for performing actual runtime -translations, compile ``.po`` files to ``.mo`` files use the ``msgfmt``: +translations, compile ``.po`` files to ``.mo`` files use the ``msgfmt`` +command from Gettext: .. code-block:: text -- cgit v1.2.3 From 832c2e8967fa1904fb1a0d3e5d707a11c32aa543 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 21:49:44 +0200 Subject: Remove Babel from all setup.cfg files --- docs/narr/MyProject/setup.cfg | 21 --------------------- docs/quick_tour/awesome/setup.cfg | 22 ---------------------- docs/quick_tour/package/setup.cfg | 22 ---------------------- docs/quick_tour/sqla_demo/setup.cfg | 21 --------------------- docs/quick_tutorial/scaffolds/setup.cfg | 21 --------------------- docs/tutorials/wiki/src/authorization/setup.cfg | 22 ---------------------- docs/tutorials/wiki/src/basiclayout/setup.cfg | 21 --------------------- docs/tutorials/wiki/src/models/setup.cfg | 22 ---------------------- docs/tutorials/wiki/src/tests/setup.cfg | 22 ---------------------- docs/tutorials/wiki/src/views/setup.cfg | 22 ---------------------- docs/tutorials/wiki2/src/authorization/setup.cfg | 21 --------------------- docs/tutorials/wiki2/src/basiclayout/setup.cfg | 21 --------------------- docs/tutorials/wiki2/src/models/setup.cfg | 21 --------------------- docs/tutorials/wiki2/src/tests/setup.cfg | 21 --------------------- docs/tutorials/wiki2/src/views/setup.cfg | 21 --------------------- .../test_scaffolds/fixture_scaffold/setup.cfg_tmpl | 21 --------------------- 16 files changed, 342 deletions(-) diff --git a/docs/narr/MyProject/setup.cfg b/docs/narr/MyProject/setup.cfg index 332e80a60..229a686f8 100644 --- a/docs/narr/MyProject/setup.cfg +++ b/docs/narr/MyProject/setup.cfg @@ -4,24 +4,3 @@ nocapture = 1 cover-package = myproject with-coverage = 1 cover-erase = 1 - -[compile_catalog] -directory = myproject/locale -domain = MyProject -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = myproject/locale/MyProject.pot -width = 80 - -[init_catalog] -domain = MyProject -input_file = myproject/locale/MyProject.pot -output_dir = myproject/locale - -[update_catalog] -domain = MyProject -input_file = myproject/locale/MyProject.pot -output_dir = myproject/locale -previous = true diff --git a/docs/quick_tour/awesome/setup.cfg b/docs/quick_tour/awesome/setup.cfg index b1cd90d2c..14f322085 100644 --- a/docs/quick_tour/awesome/setup.cfg +++ b/docs/quick_tour/awesome/setup.cfg @@ -4,25 +4,3 @@ nocapture = 1 cover-package = awesome with-coverage = 1 cover-erase = 1 - -[compile_catalog] -directory = awesome/locale -domain = awesome -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = awesome/locale/awesome.pot -width = 80 -mapping_file = message-extraction.ini - -[init_catalog] -domain = awesome -input_file = awesome/locale/awesome.pot -output_dir = awesome/locale - -[update_catalog] -domain = awesome -input_file = awesome/locale/awesome.pot -output_dir = awesome/locale -previous = true diff --git a/docs/quick_tour/package/setup.cfg b/docs/quick_tour/package/setup.cfg index 186e796fc..ac8bb6e21 100644 --- a/docs/quick_tour/package/setup.cfg +++ b/docs/quick_tour/package/setup.cfg @@ -4,25 +4,3 @@ nocapture = 1 cover-package = hello_world with-coverage = 1 cover-erase = 1 - -[compile_catalog] -directory = hello_world/locale -domain = hello_world -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = hello_world/locale/hello_world.pot -width = 80 -mapping_file = message-extraction.ini - -[init_catalog] -domain = hello_world -input_file = hello_world/locale/hello_world.pot -output_dir = hello_world/locale - -[update_catalog] -domain = hello_world -input_file = hello_world/locale/hello_world.pot -output_dir = hello_world/locale -previous = true diff --git a/docs/quick_tour/sqla_demo/setup.cfg b/docs/quick_tour/sqla_demo/setup.cfg index 9f91cd122..27dbd2377 100644 --- a/docs/quick_tour/sqla_demo/setup.cfg +++ b/docs/quick_tour/sqla_demo/setup.cfg @@ -4,24 +4,3 @@ nocapture=1 cover-package=sqla_demo with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = sqla_demo/locale -domain = sqla_demo -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = sqla_demo/locale/sqla_demo.pot -width = 80 - -[init_catalog] -domain = sqla_demo -input_file = sqla_demo/locale/sqla_demo.pot -output_dir = sqla_demo/locale - -[update_catalog] -domain = sqla_demo -input_file = sqla_demo/locale/sqla_demo.pot -output_dir = sqla_demo/locale -previous = true diff --git a/docs/quick_tutorial/scaffolds/setup.cfg b/docs/quick_tutorial/scaffolds/setup.cfg index c980261e3..16e18719c 100644 --- a/docs/quick_tutorial/scaffolds/setup.cfg +++ b/docs/quick_tutorial/scaffolds/setup.cfg @@ -4,24 +4,3 @@ nocapture = 1 cover-package = scaffolds with-coverage = 1 cover-erase = 1 - -[compile_catalog] -directory = scaffolds/locale -domain = scaffolds -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = scaffolds/locale/scaffolds.pot -width = 80 - -[init_catalog] -domain = scaffolds -input_file = scaffolds/locale/scaffolds.pot -output_dir = scaffolds/locale - -[update_catalog] -domain = scaffolds -input_file = scaffolds/locale/scaffolds.pot -output_dir = scaffolds/locale -previous = true diff --git a/docs/tutorials/wiki/src/authorization/setup.cfg b/docs/tutorials/wiki/src/authorization/setup.cfg index 3d7ea6e23..807ea6b0e 100644 --- a/docs/tutorials/wiki/src/authorization/setup.cfg +++ b/docs/tutorials/wiki/src/authorization/setup.cfg @@ -4,25 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true - diff --git a/docs/tutorials/wiki/src/basiclayout/setup.cfg b/docs/tutorials/wiki/src/basiclayout/setup.cfg index 23b2ad983..807ea6b0e 100644 --- a/docs/tutorials/wiki/src/basiclayout/setup.cfg +++ b/docs/tutorials/wiki/src/basiclayout/setup.cfg @@ -4,24 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true diff --git a/docs/tutorials/wiki/src/models/setup.cfg b/docs/tutorials/wiki/src/models/setup.cfg index 3d7ea6e23..807ea6b0e 100644 --- a/docs/tutorials/wiki/src/models/setup.cfg +++ b/docs/tutorials/wiki/src/models/setup.cfg @@ -4,25 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true - diff --git a/docs/tutorials/wiki/src/tests/setup.cfg b/docs/tutorials/wiki/src/tests/setup.cfg index 3d7ea6e23..807ea6b0e 100644 --- a/docs/tutorials/wiki/src/tests/setup.cfg +++ b/docs/tutorials/wiki/src/tests/setup.cfg @@ -4,25 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true - diff --git a/docs/tutorials/wiki/src/views/setup.cfg b/docs/tutorials/wiki/src/views/setup.cfg index 3d7ea6e23..807ea6b0e 100644 --- a/docs/tutorials/wiki/src/views/setup.cfg +++ b/docs/tutorials/wiki/src/views/setup.cfg @@ -4,25 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true - diff --git a/docs/tutorials/wiki2/src/authorization/setup.cfg b/docs/tutorials/wiki2/src/authorization/setup.cfg index 23b2ad983..807ea6b0e 100644 --- a/docs/tutorials/wiki2/src/authorization/setup.cfg +++ b/docs/tutorials/wiki2/src/authorization/setup.cfg @@ -4,24 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true diff --git a/docs/tutorials/wiki2/src/basiclayout/setup.cfg b/docs/tutorials/wiki2/src/basiclayout/setup.cfg index 23b2ad983..807ea6b0e 100644 --- a/docs/tutorials/wiki2/src/basiclayout/setup.cfg +++ b/docs/tutorials/wiki2/src/basiclayout/setup.cfg @@ -4,24 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true diff --git a/docs/tutorials/wiki2/src/models/setup.cfg b/docs/tutorials/wiki2/src/models/setup.cfg index 23b2ad983..807ea6b0e 100644 --- a/docs/tutorials/wiki2/src/models/setup.cfg +++ b/docs/tutorials/wiki2/src/models/setup.cfg @@ -4,24 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true diff --git a/docs/tutorials/wiki2/src/tests/setup.cfg b/docs/tutorials/wiki2/src/tests/setup.cfg index 23b2ad983..807ea6b0e 100644 --- a/docs/tutorials/wiki2/src/tests/setup.cfg +++ b/docs/tutorials/wiki2/src/tests/setup.cfg @@ -4,24 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true diff --git a/docs/tutorials/wiki2/src/views/setup.cfg b/docs/tutorials/wiki2/src/views/setup.cfg index 23b2ad983..807ea6b0e 100644 --- a/docs/tutorials/wiki2/src/views/setup.cfg +++ b/docs/tutorials/wiki2/src/views/setup.cfg @@ -4,24 +4,3 @@ nocapture=1 cover-package=tutorial with-coverage=1 cover-erase=1 - -[compile_catalog] -directory = tutorial/locale -domain = tutorial -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = tutorial/locale/tutorial.pot -width = 80 - -[init_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale - -[update_catalog] -domain = tutorial -input_file = tutorial/locale/tutorial.pot -output_dir = tutorial/locale -previous = true diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl b/pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl index 04c738049..1bc9ec437 100644 --- a/pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl +++ b/pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl @@ -4,24 +4,3 @@ nocapture = 1 cover-package = {{package}} with-coverage = 1 cover-erase = 1 - -[compile_catalog] -directory = {{package}}/locale -domain = {{project}} -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = {{package}}/locale/{{project}}.pot -width = 80 - -[init_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale - -[update_catalog] -domain = {{project}} -input_file = {{package}}/locale/{{project}}.pot -output_dir = {{package}}/locale -previous = true -- cgit v1.2.3 From 90600c7484d7e3ec8620e9fbe42f3449ffa6feb2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 15:54:25 -0400 Subject: add changenote --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index fdf2ac644..32881ef8a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,9 @@ Unreleased ``reissue_time=None`` would cause an exception when modifying the session. See https://github.com/Pylons/pyramid/issues/1247 +- Updated docs and scaffolds to keep in step with new 2.0 release of + ``Lingua``. + 1.5b1 (2014-02-08) ================== -- cgit v1.2.3 From eab0eb5068754da33123d5a7bc3faf025a3fc14e Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 8 Apr 2014 22:04:47 +0200 Subject: Drop setup.cfg from scaffolds Since setup.cfg is no longer needed for Babel, and no scaffold or documentation references nose there is no need to keep them. --- docs/narr/MyProject/setup.cfg | 6 ------ docs/narr/project.rst | 22 ---------------------- docs/quick_tour/awesome/setup.cfg | 6 ------ docs/quick_tour/package/setup.cfg | 6 ------ docs/quick_tour/sqla_demo/setup.cfg | 6 ------ docs/quick_tutorial/scaffolds/setup.cfg | 6 ------ docs/tutorials/wiki/src/authorization/setup.cfg | 6 ------ docs/tutorials/wiki/src/basiclayout/setup.cfg | 6 ------ docs/tutorials/wiki/src/models/setup.cfg | 6 ------ docs/tutorials/wiki/src/tests/setup.cfg | 6 ------ docs/tutorials/wiki/src/views/setup.cfg | 6 ------ docs/tutorials/wiki2/src/authorization/setup.cfg | 6 ------ docs/tutorials/wiki2/src/basiclayout/setup.cfg | 6 ------ docs/tutorials/wiki2/src/models/setup.cfg | 6 ------ docs/tutorials/wiki2/src/tests/setup.cfg | 6 ------ docs/tutorials/wiki2/src/views/setup.cfg | 6 ------ pyramid/scaffolds/alchemy/setup.cfg_tmpl | 6 ------ pyramid/scaffolds/starter/setup.cfg_tmpl | 6 ------ pyramid/scaffolds/zodb/setup.cfg_tmpl | 6 ------ .../test_scaffolds/fixture_scaffold/setup.cfg_tmpl | 6 ------ 20 files changed, 136 deletions(-) delete mode 100644 docs/narr/MyProject/setup.cfg delete mode 100644 docs/quick_tour/awesome/setup.cfg delete mode 100644 docs/quick_tour/package/setup.cfg delete mode 100644 docs/quick_tour/sqla_demo/setup.cfg delete mode 100644 docs/quick_tutorial/scaffolds/setup.cfg delete mode 100644 docs/tutorials/wiki/src/authorization/setup.cfg delete mode 100644 docs/tutorials/wiki/src/basiclayout/setup.cfg delete mode 100644 docs/tutorials/wiki/src/models/setup.cfg delete mode 100644 docs/tutorials/wiki/src/tests/setup.cfg delete mode 100644 docs/tutorials/wiki/src/views/setup.cfg delete mode 100644 docs/tutorials/wiki2/src/authorization/setup.cfg delete mode 100644 docs/tutorials/wiki2/src/basiclayout/setup.cfg delete mode 100644 docs/tutorials/wiki2/src/models/setup.cfg delete mode 100644 docs/tutorials/wiki2/src/tests/setup.cfg delete mode 100644 docs/tutorials/wiki2/src/views/setup.cfg delete mode 100644 pyramid/scaffolds/alchemy/setup.cfg_tmpl delete mode 100644 pyramid/scaffolds/starter/setup.cfg_tmpl delete mode 100644 pyramid/scaffolds/zodb/setup.cfg_tmpl delete mode 100644 pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl diff --git a/docs/narr/MyProject/setup.cfg b/docs/narr/MyProject/setup.cfg deleted file mode 100644 index 229a686f8..000000000 --- a/docs/narr/MyProject/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match = ^test -nocapture = 1 -cover-package = myproject -with-coverage = 1 -cover-erase = 1 diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 3631a9782..39e55706f 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -492,7 +492,6 @@ structure: │   ├── tests.py │   └── views.py ├── production.ini - ├── setup.cfg └── setup.py The ``MyProject`` :term:`Project` @@ -515,9 +514,6 @@ describe, run, and test your application. #. ``production.ini`` is a :term:`PasteDeploy` configuration file that can be used to execute your application in a production configuration. -#. ``setup.cfg`` is a :term:`setuptools` configuration file used by - ``setup.py``. - #. ``MANIFEST.in`` is a :term:`distutils` "manifest" file, naming which files should be included in a source distribution of the package when ``python setup.py sdist`` is run. @@ -745,24 +741,6 @@ This will create a tarball of your application in a ``dist`` subdirectory named ``MyProject-0.1.tar.gz``. You can send this tarball to other people who want to install and use your application. -.. index:: - single: setup.cfg - -``setup.cfg`` -~~~~~~~~~~~~~ - -The ``setup.cfg`` file is a :term:`setuptools` configuration file. It -contains various settings related to testing and internationalization: - -Our generated ``setup.cfg`` looks like this: - -.. literalinclude:: MyProject/setup.cfg - :language: guess - :linenos: - -The values in the default setup file make the testing commands to work more -smoothly. - .. index:: single: package diff --git a/docs/quick_tour/awesome/setup.cfg b/docs/quick_tour/awesome/setup.cfg deleted file mode 100644 index 14f322085..000000000 --- a/docs/quick_tour/awesome/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match = ^test -nocapture = 1 -cover-package = awesome -with-coverage = 1 -cover-erase = 1 diff --git a/docs/quick_tour/package/setup.cfg b/docs/quick_tour/package/setup.cfg deleted file mode 100644 index ac8bb6e21..000000000 --- a/docs/quick_tour/package/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match = ^test -nocapture = 1 -cover-package = hello_world -with-coverage = 1 -cover-erase = 1 diff --git a/docs/quick_tour/sqla_demo/setup.cfg b/docs/quick_tour/sqla_demo/setup.cfg deleted file mode 100644 index 27dbd2377..000000000 --- a/docs/quick_tour/sqla_demo/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=sqla_demo -with-coverage=1 -cover-erase=1 diff --git a/docs/quick_tutorial/scaffolds/setup.cfg b/docs/quick_tutorial/scaffolds/setup.cfg deleted file mode 100644 index 16e18719c..000000000 --- a/docs/quick_tutorial/scaffolds/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match = ^test -nocapture = 1 -cover-package = scaffolds -with-coverage = 1 -cover-erase = 1 diff --git a/docs/tutorials/wiki/src/authorization/setup.cfg b/docs/tutorials/wiki/src/authorization/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki/src/authorization/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki/src/basiclayout/setup.cfg b/docs/tutorials/wiki/src/basiclayout/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki/src/basiclayout/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki/src/models/setup.cfg b/docs/tutorials/wiki/src/models/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki/src/models/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki/src/tests/setup.cfg b/docs/tutorials/wiki/src/tests/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki/src/tests/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki/src/views/setup.cfg b/docs/tutorials/wiki/src/views/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki/src/views/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki2/src/authorization/setup.cfg b/docs/tutorials/wiki2/src/authorization/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki2/src/authorization/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki2/src/basiclayout/setup.cfg b/docs/tutorials/wiki2/src/basiclayout/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki2/src/basiclayout/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki2/src/models/setup.cfg b/docs/tutorials/wiki2/src/models/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki2/src/models/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki2/src/tests/setup.cfg b/docs/tutorials/wiki2/src/tests/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki2/src/tests/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/docs/tutorials/wiki2/src/views/setup.cfg b/docs/tutorials/wiki2/src/views/setup.cfg deleted file mode 100644 index 807ea6b0e..000000000 --- a/docs/tutorials/wiki2/src/views/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package=tutorial -with-coverage=1 -cover-erase=1 diff --git a/pyramid/scaffolds/alchemy/setup.cfg_tmpl b/pyramid/scaffolds/alchemy/setup.cfg_tmpl deleted file mode 100644 index 8bf5d22c1..000000000 --- a/pyramid/scaffolds/alchemy/setup.cfg_tmpl +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package={{package}} -with-coverage=1 -cover-erase=1 diff --git a/pyramid/scaffolds/starter/setup.cfg_tmpl b/pyramid/scaffolds/starter/setup.cfg_tmpl deleted file mode 100644 index 1bc9ec437..000000000 --- a/pyramid/scaffolds/starter/setup.cfg_tmpl +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match = ^test -nocapture = 1 -cover-package = {{package}} -with-coverage = 1 -cover-erase = 1 diff --git a/pyramid/scaffolds/zodb/setup.cfg_tmpl b/pyramid/scaffolds/zodb/setup.cfg_tmpl deleted file mode 100644 index 8bf5d22c1..000000000 --- a/pyramid/scaffolds/zodb/setup.cfg_tmpl +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -nocapture=1 -cover-package={{package}} -with-coverage=1 -cover-erase=1 diff --git a/pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl b/pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl deleted file mode 100644 index 1bc9ec437..000000000 --- a/pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match = ^test -nocapture = 1 -cover-package = {{package}} -with-coverage = 1 -cover-erase = 1 -- cgit v1.2.3 From aef68bf93127265134ebf63dca0403cf9c1955a8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 17:14:42 -0400 Subject: add changenote --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 32881ef8a..0e452d011 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,8 @@ Unreleased See https://github.com/Pylons/pyramid/issues/1247 - Updated docs and scaffolds to keep in step with new 2.0 release of - ``Lingua``. + ``Lingua``. This included removing all ``setup.cfg`` files from scaffolds + and documentation environments. 1.5b1 (2014-02-08) ================== -- cgit v1.2.3 From 610b85ab54452568728fc6390e6cd18670036ba2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 17:20:32 -0400 Subject: fix typo and update whatsnew --- CHANGES.txt | 2 +- docs/whatsnew-1.5.rst | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0e452d011..2e3996b3e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,7 @@ Unreleased ========== -- Avoid crash in ``pserve --reload`` under Py3k, when iterating over posiibly +- Avoid crash in ``pserve --reload`` under Py3k, when iterating over possibly mutated ``sys.modules``. - ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained diff --git a/docs/whatsnew-1.5.rst b/docs/whatsnew-1.5.rst index 2f73af661..65e8393f8 100644 --- a/docs/whatsnew-1.5.rst +++ b/docs/whatsnew-1.5.rst @@ -511,6 +511,9 @@ Scaffolding Enhancements - All scaffolds have a new HTML + CSS theme. +- Updated docs and scaffolds to keep in step with new 2.0 release of + ``Lingua``. This included removing all ``setup.cfg`` files from scaffolds + and documentation environments. Dependency Changes ------------------ -- cgit v1.2.3 From b66661a72ea2f0fe4bd6aacb83c6c5487401141b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 17:44:36 -0400 Subject: i have no idea why we do this in here, but let's make it at least correct --- docs/conf.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a447c9968..eba776628 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -138,17 +138,21 @@ if book: # Add and use Pylons theme if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers from subprocess import call, Popen, PIPE - - p = Popen('which git', shell=True, stdout=PIPE) cwd = os.getcwd() - _themes = os.path.join(cwd, '_themes') + p = Popen('which git', shell=True, stdout=PIPE) + here = os.path.abspath(os.path.dirname(__file__)) + parent = os.path.abspath(os.path.dirname(here)) + _themes = os.path.join(here, '_themes') git = p.stdout.read().strip() - if not os.listdir(_themes): - call([git, 'submodule', '--init']) - else: - call([git, 'submodule', 'update']) - - sys.path.append(os.path.abspath('_themes')) + try: + os.chdir(parent) + if not os.listdir(_themes): + call([git, 'submodule', '--init']) + else: + call([git, 'submodule', 'update']) + sys.path.append(_themes) + finally: + os.chdir(cwd) html_theme_path = ['_themes'] html_theme = 'pyramid' -- cgit v1.2.3 From c3ef4170b195f08f9563256a3cbdd614d786acef Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 17:51:30 -0400 Subject: make pdf build again --- docs/narr/project.rst | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 39e55706f..0ada1a379 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -476,23 +476,23 @@ structure: .. code-block:: text MyProject/ - ├── CHANGES.txt - ├── MANIFEST.in - ├── README.txt - ├── development.ini - ├── myproject - │   ├── __init__.py - │   ├── static - │   │   ├── pyramid-16x16.png - │   │   ├── pyramid.png - │   │   ├── theme.css - │   │   └── theme.min.css - │   ├── templates - │   │   └── mytemplate.pt - │   ├── tests.py - │   └── views.py - ├── production.ini - └── setup.py + |-- CHANGES.txt + |-- development.ini + |-- MANIFEST.in + |-- myproject + | |-- __init__.py + | |-- static + | | |-- pyramid-16x16.png + | | |-- pyramid.png + | | |-- theme.css + | | `-- theme.min.css + | |-- templates + | | `-- mytemplate.pt + | |-- tests.py + | `-- views.py + |-- production.ini + |-- README.txt + `-- setup.py The ``MyProject`` :term:`Project` --------------------------------- -- cgit v1.2.3 From 2ecc60e1f55e42a99d8d5339e0724babb4c82a2e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 18:30:29 -0400 Subject: no idea how this ever worked without pyramid being installed into the python being used to run the tests first --- pyramid/scaffolds/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyramid/scaffolds/tests.py b/pyramid/scaffolds/tests.py index d913d022a..dfbf9b6cf 100644 --- a/pyramid/scaffolds/tests.py +++ b/pyramid/scaffolds/tests.py @@ -1,6 +1,5 @@ import sys import os -import pkg_resources import shutil import subprocess import tempfile @@ -26,7 +25,8 @@ class TemplateTest(object): self.old_cwd = os.getcwd() self.directory = tempfile.mkdtemp() self.make_venv(self.directory) - os.chdir(pkg_resources.get_distribution('pyramid').location) + here = os.path.abspath(os.path.dirname(__file__)) + os.chdir(os.path.dirname(os.path.dirname(here))) subprocess.check_call( [os.path.join(self.directory, 'bin', 'python'), 'setup.py', 'develop']) -- cgit v1.2.3 From 0cb759758c97feba48c0bbba149a774f85f2606a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 19:09:47 -0400 Subject: prep for 1.5 release --- CHANGES.txt | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2e3996b3e..900eb116d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Unreleased -========== +1.5 (2014-04-08) +================ - Avoid crash in ``pserve --reload`` under Py3k, when iterating over possibly mutated ``sys.modules``. diff --git a/setup.py b/setup.py index bb443330d..2214611b7 100644 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ testing_extras = tests_require + [ ] setup(name='pyramid', - version='1.5b1', + version='1.5', description='The Pyramid Web Framework, a Pylons project', long_description=README + '\n\n' + CHANGES, classifiers=[ -- cgit v1.2.3 From c61755f77b4f945057522a9f4d4360ed6e5504d7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 19:16:23 -0400 Subject: vb master to 1.6dev --- CHANGES.txt | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 900eb116d..264497f5b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +Next release +============ + +- ... + 1.5 (2014-04-08) ================ diff --git a/setup.py b/setup.py index 2214611b7..0ace211d7 100644 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ testing_extras = tests_require + [ ] setup(name='pyramid', - version='1.5', + version='1.6dev', description='The Pyramid Web Framework, a Pylons project', long_description=README + '\n\n' + CHANGES, classifiers=[ -- cgit v1.2.3 From 0117573edbc5dff565868187f8841859b3e36a51 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 20:07:23 -0400 Subject: add bdist_wheel unversality --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index d7622683f..a877ffb7f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,7 @@ cover-erase=1 [aliases] dev = develop easy_install pyramid[testing] docs = develop easy_install pyramid[docs] + +[bdist_wheel] +universal = 1 + -- cgit v1.2.3