merge with 3.20.11
authorRémi Cardona <remi.cardona@logilab.fr>
Wed, 09 Dec 2015 18:24:09 +0100
changeset 10957 2fdf67ef3341
parent 10895 90c55e27aa87 (current diff)
parent 10955 2fe19ba68daa (diff)
child 10958 9edfe9429209
merge with 3.20.11
.hgtags
__pkginfo__.py
cubicweb.spec
debian/changelog
devtools/__init__.py
devtools/test/unittest_testlib.py
devtools/testlib.py
ext/rest.py
--- a/.hgtags	Fri Nov 13 14:29:48 2015 +0100
+++ b/.hgtags	Wed Dec 09 18:24:09 2015 +0100
@@ -505,6 +505,9 @@
 8f82e95239625d153a9f1de6e79820d96d9efe8a 3.20.10
 8f82e95239625d153a9f1de6e79820d96d9efe8a debian/3.20.10-1
 8f82e95239625d153a9f1de6e79820d96d9efe8a centos/3.20.10-1
+c44930ac9579fe4d526b26892954e56021af18be 3.20.11
+c44930ac9579fe4d526b26892954e56021af18be debian/3.20.11-1
+c44930ac9579fe4d526b26892954e56021af18be centos/3.20.11-1
 887c6eef807781560adcd4ecd2dea9011f5a6681 3.21.0
 887c6eef807781560adcd4ecd2dea9011f5a6681 debian/3.21.0-1
 887c6eef807781560adcd4ecd2dea9011f5a6681 centos/3.21.0-1
--- a/debian/changelog	Fri Nov 13 14:29:48 2015 +0100
+++ b/debian/changelog	Wed Dec 09 18:24:09 2015 +0100
@@ -16,6 +16,12 @@
 
  -- Julien Cristau <julien.cristau@logilab.fr>  Fri, 10 Jul 2015 17:04:11 +0200
 
+cubicweb (3.20.11-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- RĂ©mi Cardona <remi.cardona@logilab.fr>  Wed, 09 Dec 2015 16:27:45 +0100
+
 cubicweb (3.20.10-1) unstable; urgency=medium
 
   * New upstream release.
--- a/devtools/__init__.py	Fri Nov 13 14:29:48 2015 +0100
+++ b/devtools/__init__.py	Wed Dec 09 18:24:09 2015 +0100
@@ -402,6 +402,7 @@
         from cubicweb.repoapi import _get_inmemory_repo
         config._cubes = None
         repo = _get_inmemory_repo(config)
+        config.repository = lambda x=None: repo
         # extending Repository class
         repo._has_started = False
         repo._needs_refresh = False
--- a/devtools/test/unittest_testlib.py	Fri Nov 13 14:29:48 2015 +0100
+++ b/devtools/test/unittest_testlib.py	Wed Dec 09 18:24:09 2015 +0100
@@ -74,6 +74,16 @@
         clean_repo_test_cls(MyWebTest)
 
 
+class RepoInstancesConsistencyTC(CubicWebTC):
+    test_db_id = 'RepoInstancesConsistencyTC'
+
+    def pre_setup_database(self, cnx, config):
+        self.assertIs(cnx.repo, config.repository())
+
+    def test_pre_setup(self):
+        pass
+
+
 HTML_PAGE = u"""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
   <head><title>need a title</title></head>
--- a/devtools/testlib.py	Fri Nov 13 14:29:48 2015 +0100
+++ b/devtools/testlib.py	Wed Dec 09 18:24:09 2015 +0100
@@ -313,7 +313,6 @@
         login = unicode(db_handler.config.default_admin_config['login'])
         self.admin_access = self.new_access(login)
         self._admin_session = self.admin_access._session
-        self.config.repository = lambda x=None: self.repo
 
 
     # config management ########################################################
--- a/ext/rest.py	Fri Nov 13 14:29:48 2015 +0100
+++ b/ext/rest.py	Wed Dec 09 18:24:09 2015 +0100
@@ -34,6 +34,7 @@
 """
 __docformat__ = "restructuredtext en"
 
+import sys
 from itertools import chain
 from logging import getLogger
 from os.path import join
@@ -49,7 +50,7 @@
 from cubicweb import UnknownEid
 from cubicweb.ext.html4zope import Writer
 
-from cubicweb.web.views import vid_from_rset # XXX better not to import c.w.views here...
+from cubicweb.web.views import vid_from_rset  # XXX better not to import c.w.views here...
 
 # We provide our own parser as an attempt to get rid of
 # state machine reinstanciation
@@ -68,6 +69,7 @@
 
 LOGGER = getLogger('cubicweb.rest')
 
+
 def eid_reference_role(role, rawtext, text, lineno, inliner,
                        options={}, content=[]):
     try:
@@ -97,6 +99,7 @@
     return [nodes.reference(rawtext, utils.unescape(rest), refuri=ref,
                             **options)], []
 
+
 def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
     """``:rql:`<rql-expr>``` or ``:rql:`<rql-expr>:<vid>```
 
@@ -130,6 +133,7 @@
     set_classes(options)
     return [nodes.raw('', content, format='html')], []
 
+
 def bookmark_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
     """``:bookmark:`<bookmark-eid>``` or ``:bookmark:`<eid>:<vid>```
 
@@ -187,6 +191,7 @@
     set_classes(options)
     return [nodes.raw('', content, format='html')], []
 
+
 def winclude_directive(name, arguments, options, content, lineno,
                        content_offset, block_text, state, state_machine):
     """Include a reST file as part of the content of this reST file.
@@ -252,6 +257,7 @@
 winclude_directive.options = {'literal': directives.flag,
                               'encoding': directives.encoding}
 
+
 class RQLTableDirective(Directive):
     """rql-table directive
 
@@ -414,6 +420,8 @@
                 # (though try/except may be a better option...). May be the
                 # above traceback option will avoid this?
                 'halt_level': 10,
+                # disable stupid switch to colspan=2 if field name is above a size limit
+                'field_name_limit': sys.maxsize,
                 }
     if context:
         if hasattr(req, 'url'):
--- a/ext/test/unittest_rest.py	Fri Nov 13 14:29:48 2015 +0100
+++ b/ext/test/unittest_rest.py	Wed Dec 09 18:24:09 2015 +0100
@@ -31,7 +31,7 @@
             self.assertEqual(rest_publish(context, ':eid:`%s`' % context.eid),
                              '<p><a class="reference" href="http://testing.fr/cubicweb/cwuser/admin">'
                              '#%s</a></p>\n' % context.eid)
-            self.assertEqual(rest_publish(context, ':eid:`%s:some text`' %  context.eid),
+            self.assertEqual(rest_publish(context, ':eid:`%s:some text`' % context.eid),
                              '<p><a class="reference" href="http://testing.fr/cubicweb/cwuser/admin">'
                              'some text</a></p>\n')
 
@@ -58,6 +58,14 @@
 
 ''')
 
+    def test_disable_field_name_colspan(self):
+        with self.admin_access.web_request() as req:
+            context = self.context(req)
+            value = rest_publish(context, '''my field list:
+
+:a long dumb param name: value
+''')
+            self.assertNotIn('colspan', value)
 
     def test_rql_role_with_vid(self):
         with self.admin_access.web_request() as req: