merge with 3.21.3
The change in unittest_serverctl.py is needed because of daef7ce08fea
(from 3.20.11) and 3914388b2d0f (from the 3.22 branch). Due to both
changes, CubicWebTC.config.repository no longer creates a new repository
(and thus, a new connection). Since both DBDumpCommand and
CubicWebTC.tearDown try to shutdown the repo, tearDown breaks apart.
The solution is to temporarily disable ServerConfiguration's config
cache. By forcing DBDumpCommand to get a new configuration object, it
then gets its own Repo object, allowing tearDown and DBDumpCommand to
work independently.
--- a/.hgtags Tue Sep 08 09:05:31 2015 +0200
+++ b/.hgtags Thu Dec 10 12:34:15 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
@@ -514,3 +517,6 @@
a5428e1ab36491a8e6d66ce09d23b708b97e1337 3.21.2
a5428e1ab36491a8e6d66ce09d23b708b97e1337 debian/3.21.2-1
a5428e1ab36491a8e6d66ce09d23b708b97e1337 centos/3.21.2-1
+9edfe9429209848e31d1998df48da7a84db0c819 3.21.3
+9edfe9429209848e31d1998df48da7a84db0c819 debian/3.21.3-1
+9edfe9429209848e31d1998df48da7a84db0c819 centos/3.21.3-1
--- a/cubicweb.spec Tue Sep 08 09:05:31 2015 +0200
+++ b/cubicweb.spec Thu Dec 10 12:34:15 2015 +0100
@@ -7,7 +7,7 @@
%endif
Name: cubicweb
-Version: 3.21.2
+Version: 3.21.3
Release: logilab.1%{?dist}
Summary: CubicWeb is a semantic web application framework
Source0: http://download.logilab.org/pub/cubicweb/cubicweb-%{version}.tar.gz
--- a/debian/changelog Tue Sep 08 09:05:31 2015 +0200
+++ b/debian/changelog Thu Dec 10 12:34:15 2015 +0100
@@ -1,3 +1,9 @@
+cubicweb (3.21.3-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Rémi Cardona <remi.cardona@logilab.fr> Wed, 09 Dec 2015 18:29:39 +0100
+
cubicweb (3.21.2-1) unstable; urgency=medium
* New upstream release.
@@ -16,6 +22,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/debian/cubicweb-dev.install Tue Sep 08 09:05:31 2015 +0200
+++ b/debian/cubicweb-dev.install Thu Dec 10 12:34:15 2015 +0100
@@ -1,6 +1,7 @@
usr/lib/python2*/*-packages/cubicweb/devtools/
usr/lib/python2*/*-packages/cubicweb/skeleton/
usr/lib/python2*/*-packages/cubicweb/test
+usr/lib/python2*/*-packages/cubicweb/dataimport/test
usr/lib/python2*/*-packages/cubicweb/entities/test
usr/lib/python2*/*-packages/cubicweb/ext/test
usr/lib/python2*/*-packages/cubicweb/server/test
--- a/debian/cubicweb-server.install Tue Sep 08 09:05:31 2015 +0200
+++ b/debian/cubicweb-server.install Thu Dec 10 12:34:15 2015 +0100
@@ -1,3 +1,4 @@
+usr/lib/python2*/*-packages/cubicweb/dataimport/
usr/lib/python2*/*-packages/cubicweb/server/
usr/lib/python2*/*-packages/cubicweb/hooks/
usr/lib/python2*/*-packages/cubicweb/sobjects/
--- a/devtools/__init__.py Tue Sep 08 09:05:31 2015 +0200
+++ b/devtools/__init__.py Thu Dec 10 12:34:15 2015 +0100
@@ -405,6 +405,7 @@
"""Factory method to create a new Repository Instance"""
config._cubes = None
repo = config.repository()
+ config.repository = lambda x=None: repo
# extending Repository class
repo._has_started = False
repo._needs_refresh = False
--- a/devtools/test/unittest_testlib.py Tue Sep 08 09:05:31 2015 +0200
+++ b/devtools/test/unittest_testlib.py Thu Dec 10 12:34:15 2015 +0100
@@ -75,6 +75,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/ext/rest.py Tue Sep 08 09:05:31 2015 +0200
+++ b/ext/rest.py Thu Dec 10 12:34:15 2015 +0100
@@ -34,6 +34,7 @@
"""
__docformat__ = "restructuredtext en"
+import sys
from itertools import chain
from logging import getLogger
from os.path import join
@@ -51,7 +52,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
@@ -70,6 +71,7 @@
LOGGER = getLogger('cubicweb.rest')
+
def eid_reference_role(role, rawtext, text, lineno, inliner,
options={}, content=[]):
try:
@@ -99,6 +101,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>```
@@ -132,6 +135,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>```
@@ -189,6 +193,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.
@@ -254,6 +259,7 @@
winclude_directive.options = {'literal': directives.flag,
'encoding': directives.encoding}
+
class RQLTableDirective(Directive):
"""rql-table directive
@@ -416,6 +422,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 Tue Sep 08 09:05:31 2015 +0200
+++ b/ext/test/unittest_rest.py Thu Dec 10 12:34:15 2015 +0100
@@ -33,7 +33,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')
@@ -60,6 +60,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:
--- a/server/test/unittest_serverctl.py Tue Sep 08 09:05:31 2015 +0200
+++ b/server/test/unittest_serverctl.py Thu Dec 10 12:34:15 2015 +0100
@@ -1,7 +1,7 @@
import os.path as osp
import shutil
-from cubicweb.devtools import testlib
+from cubicweb.devtools import testlib, ApptestConfiguration
from cubicweb.server.serverctl import _local_dump, DBDumpCommand
from cubicweb.server.serverconfig import ServerConfiguration
@@ -9,7 +9,8 @@
def setUp(self):
super(ServerCTLTC, self).setUp()
self.orig_config_for = ServerConfiguration.config_for
- ServerConfiguration.config_for = staticmethod(lambda appid: self.config)
+ config_for = lambda appid: ApptestConfiguration(appid, apphome=self.datadir)
+ ServerConfiguration.config_for = staticmethod(config_for)
def tearDown(self):
ServerConfiguration.config_for = self.orig_config_for
--- a/web/data/cubicweb.htmlhelpers.js Tue Sep 08 09:05:31 2015 +0200
+++ b/web/data/cubicweb.htmlhelpers.js Thu Dec 10 12:34:15 2015 +0100
@@ -39,7 +39,7 @@
*/
function resetCursor(result) {
var body = document.getElementsByTagName('body')[0];
- body.style.cursor = 'default';
+ body.style.cursor = '';
// pass result to next callback in the callback chain
return result;
}