# HG changeset patch # User Denis Laxalde # Date 1552311254 -3600 # Node ID 540904e0ff0fadafec02ed7d5e49e3fcc5a17c89 # Parent 3eddb59541359cedf5f054058485a0984a4aaa94# Parent 6311651c355f31218691892d6936afe6a2c9d2a9 Merge with branch 3.26 diff -r 3eddb5954135 -r 540904e0ff0f .hgtags --- a/.hgtags Tue Feb 26 16:28:17 2019 +0100 +++ b/.hgtags Mon Mar 11 14:34:14 2019 +0100 @@ -631,3 +631,4 @@ 8362503a92482e74a674c78fe009cf6ff346c817 3.26.6 8362503a92482e74a674c78fe009cf6ff346c817 debian/3.26.6-1 ee4ad63c91e5406e29f079f1f2d3774361798ac8 3.26.7 +91f75319a726b523a09103540d3bc6872aaf2ae4 3.26.8 diff -r 3eddb5954135 -r 540904e0ff0f cubicweb/__pkginfo__.py diff -r 3eddb5954135 -r 540904e0ff0f cubicweb/devtools/test/data/libpython/cubicweb_i18ntestcube/views.py --- a/cubicweb/devtools/test/data/libpython/cubicweb_i18ntestcube/views.py Tue Feb 26 16:28:17 2019 +0100 +++ b/cubicweb/devtools/test/data/libpython/cubicweb_i18ntestcube/views.py Mon Mar 11 14:34:14 2019 +0100 @@ -21,10 +21,12 @@ from cubicweb.web.views import primary, baseviews, uicfg from cubicweb.web.views.uicfg import autoform_section as afs + class MyAFS(uicfg.AutoformSectionRelationTags): __select__ = is_instance('ForumThread') -_myafs = MyAFS() + +_myafs = MyAFS(__module__=__name__) _myafs.tag_object_of(('*', 'in_forum', 'Forum'), 'main', 'inlined') @@ -57,5 +59,6 @@ _('Last answered') _('This forum does not have any thread yet.') + class ForumThreadPrimaryView(primary.PrimaryView): __select__ = primary.PrimaryView.__select__ & is_instance('ForumThread') diff -r 3eddb5954135 -r 540904e0ff0f cubicweb/ext/test/unittest_rest.py --- a/cubicweb/ext/test/unittest_rest.py Tue Feb 26 16:28:17 2019 +0100 +++ b/cubicweb/ext/test/unittest_rest.py Mon Mar 11 14:34:14 2019 +0100 @@ -22,6 +22,7 @@ from cubicweb.ext.rest import rest_publish + class RestTC(CubicWebTC): def context(self, req): @@ -31,10 +32,12 @@ with self.admin_access.web_request() as req: context = self.context(req) self.assertEqual(rest_publish(context, ':eid:`%s`' % context.eid), - '

' + '

' '#%s

\n' % context.eid) self.assertEqual(rest_publish(context, ':eid:`%s:some text`' % context.eid), - '

' + '

' 'some text

\n') def test_bad_rest_no_crash(self): @@ -72,7 +75,8 @@ def test_rql_role_with_vid(self): with self.admin_access.web_request() as req: context = self.context(req) - out = rest_publish(context, ':rql:`Any X ORDERBY XL WHERE X is CWUser, X login XL:table`') + out = rest_publish(context, + ':rql:`Any X ORDERBY XL WHERE X is CWUser, X login XL:table`') self.assertTrue(out.endswith('anon\n' '

\n')) @@ -89,7 +93,7 @@ context = self.context(req) out = rest_publish(context, ':rql:`Any X WHERE X is CWUser:toto`') self.assertTrue(out.startswith("

an error occurred while interpreting this " - "rql directive: ObjectNotFound(%s'toto',)

" % + "rql directive: ObjectNotFound(%s'toto'" % ('' if PY3 else 'u')), out) @@ -122,7 +126,7 @@ out = rest_publish(context, """.. rql-table::""") self.assertIn("System Message: ERROR", out) self.assertIn("Content block expected for the "rql-table" " - "directive; none found" , out) + "directive; none found", out) def test_rqltable_norset(self): with self.admin_access.web_request() as req: @@ -231,10 +235,11 @@ :colvids: %(colvids)s %(rql)s - """ % {'rql': rql, - 'colvids': ', '.join(["%d=%s" % (k, v) - for k, v in colvids.items()]) - }) + """ + % {'rql': rql, + 'colvids': ', '.join(["%d=%s" % (k, v) + for k, v in colvids.items()])} + ) view = self.vreg['views'].select('table', req, rset=req.execute(rql)) view.cellvids = colvids self.assertEqual(view.render(w=None)[49:], out[49:]) diff -r 3eddb5954135 -r 540904e0ff0f cubicweb/pyramid/__init__.py --- a/cubicweb/pyramid/__init__.py Tue Feb 26 16:28:17 2019 +0100 +++ b/cubicweb/pyramid/__init__.py Mon Mar 11 14:34:14 2019 +0100 @@ -24,6 +24,7 @@ import os import warnings +from six.moves.configparser import SafeConfigParser import wsgicors from cubicweb.cwconfig import CubicWebConfiguration as cwcfg @@ -31,11 +32,6 @@ from pyramid.exceptions import ConfigurationError from pyramid.settings import asbool, aslist -try: - from configparser import SafeConfigParser -except ImportError: - from ConfigParser import SafeConfigParser - def config_from_cwconfig(cwconfig, settings=None): """Return a Pyramid Configurator instance built from a CubicWeb config and diff -r 3eddb5954135 -r 540904e0ff0f cubicweb/pyramid/core.py diff -r 3eddb5954135 -r 540904e0ff0f cubicweb/test/unittest_rset.py diff -r 3eddb5954135 -r 540904e0ff0f doc/tutorials/base/blog-in-five-minutes.rst diff -r 3eddb5954135 -r 540904e0ff0f flake8-ok-files.txt --- a/flake8-ok-files.txt Tue Feb 26 16:28:17 2019 +0100 +++ b/flake8-ok-files.txt Mon Mar 11 14:34:14 2019 +0100 @@ -13,6 +13,7 @@ cubicweb/dataimport/test/test_stores.py cubicweb/dataimport/test/unittest_importer.py cubicweb/devtools/test/data/cubes/i18ntestcube/__init__.py +cubicweb/devtools/test/data/cubes/i18ntestcube/views.py cubicweb/devtools/test/data/cubes/__init__.py cubicweb/devtools/test/data/schema.py cubicweb/devtools/testlib.py @@ -27,6 +28,7 @@ cubicweb/etwist/request.py cubicweb/etwist/service.py cubicweb/ext/__init__.py +cubicweb/ext/test/unittest_rest.py cubicweb/hooks/synccomputed.py cubicweb/hooks/syncsources.py cubicweb/hooks/test/data/hooks.py diff -r 3eddb5954135 -r 540904e0ff0f requirements/test-server.txt --- a/requirements/test-server.txt Tue Feb 26 16:28:17 2019 +0100 +++ b/requirements/test-server.txt Mon Mar 11 14:34:14 2019 +0100 @@ -4,6 +4,6 @@ cubicweb-basket cubicweb-card cubicweb-comment -cubicweb-file +cubicweb-file >= 2.2.2 cubicweb-localperms cubicweb-tag diff -r 3eddb5954135 -r 540904e0ff0f requirements/test-web.txt diff -r 3eddb5954135 -r 540904e0ff0f tox.ini