merge 3.23 changes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 29 Jun 2016 15:07:55 +0200
changeset 11397 eccb5c1e58c2
parent 11388 88446b0c6ea1 (current diff)
parent 11396 79bc50f8d2ba (diff)
child 11406 8ed625765a5c
merge 3.23 changes
--- a/.hgtags	Mon Jun 27 13:51:58 2016 +0200
+++ b/.hgtags	Wed Jun 29 15:07:55 2016 +0200
@@ -566,3 +566,6 @@
 4b07f2a79021697f8a88a4665a6c957d540147bb centos/3.23.0-1
 93b0f836cb075df970236b14f2128478c8b4bcbc debian/3.23.0-1
 4b07f2a79021697f8a88a4665a6c957d540147bb debian/3.23.0-1
+8f035d5d595301a335e005516c5ab1b124897d8c 3.23.1
+8f035d5d595301a335e005516c5ab1b124897d8c centos/3.23.1-1
+8f035d5d595301a335e005516c5ab1b124897d8c debian/3.23.1-1
--- a/cubicweb.spec	Mon Jun 27 13:51:58 2016 +0200
+++ b/cubicweb.spec	Wed Jun 29 15:07:55 2016 +0200
@@ -8,7 +8,7 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 Name:           cubicweb
-Version:        3.23.0
+Version:        3.23.1
 Release:        logilab.1%{?dist}
 Summary:        CubicWeb is a semantic web application framework
 Source0:        https://pypi.python.org/packages/source/c/cubicweb/cubicweb-%{version}.tar.gz
--- a/cubicweb/__pkginfo__.py	Mon Jun 27 13:51:58 2016 +0200
+++ b/cubicweb/__pkginfo__.py	Wed Jun 29 15:07:55 2016 +0200
@@ -27,7 +27,7 @@
 
 modname = distname = "cubicweb"
 
-numversion = (3, 23, 0)
+numversion = (3, 23, 1)
 version = '.'.join(str(num) for num in numversion)
 
 description = "a repository of entities / relations for knowledge management"
--- a/cubicweb/dataimport/importer.py	Mon Jun 27 13:51:58 2016 +0200
+++ b/cubicweb/dataimport/importer.py	Wed Jun 29 15:07:55 2016 +0200
@@ -216,7 +216,9 @@
                     if (rschema.final and eschema.has_metadata(rtype, 'format')
                             and not rtype + '_format' in entity_dict):
                         entity_dict[rtype + '_format'] = u'text/plain'
-                    if rschema.final and eschema.rdef(rtype).object.type == 'Bytes':
+                    if (rschema.final
+                            and eschema.rdef(rtype).object.type == 'Bytes'
+                            and not isinstance(entity_dict[rtype], Binary)):
                         entity_dict[rtype] = Binary(entity_dict[rtype])
                 else:
                     del entity_dict[key]
--- a/cubicweb/dataimport/test/unittest_importer.py	Mon Jun 27 13:51:58 2016 +0200
+++ b/cubicweb/dataimport/test/unittest_importer.py	Wed Jun 29 15:07:55 2016 +0200
@@ -18,7 +18,7 @@
 
 from logilab.common.testlib import TestCase, unittest_main
 
-from cubicweb import ValidationError
+from cubicweb import Binary, ValidationError
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.dataimport import RQLObjectStore, ucsvreader
 from cubicweb.dataimport.importer import (ExtEntity, ExtEntitiesImporter, RelationMapping,
@@ -74,6 +74,18 @@
             entity = cnx.find('Personne').one()
             self.assertEqual(entity.photo.getvalue(), b'poilu')
 
+    def test_binary_in_values(self):
+        with self.admin_access.repo_cnx() as cnx:
+            importer = self.importer(cnx)
+            # Use a list to put a Binary in "values" (since Binary is not
+            # hashable, a set cannot be used).
+            personne = ExtEntity('Personne', 1, {'photo': [Binary(b'poilu')],
+                                                 'nom': set([u'alf'])})
+            importer.import_entities([personne])
+            cnx.commit()
+            entity = cnx.find('Personne').one()
+            self.assertEqual(entity.photo.getvalue(), b'poilu')
+
     def test_import_missing_required_attribute(self):
         """Check import of ext entity with missing required attribute"""
         with self.admin_access.repo_cnx() as cnx:
--- a/cubicweb/server/sqlutils.py	Mon Jun 27 13:51:58 2016 +0200
+++ b/cubicweb/server/sqlutils.py	Wed Jun 29 15:07:55 2016 +0200
@@ -584,7 +584,6 @@
 def _init_postgres_connection(cnx):
     """Internal function that will be called to init a postgresql connection"""
     cnx.cursor().execute('SET TIME ZONE UTC')
-    cnx.cursor().execute("SET lc_messages to 'C'")
     # commit is needed, else setting are lost if the connection is first
     # rolled back
     cnx.commit()
--- a/debian/changelog	Mon Jun 27 13:51:58 2016 +0200
+++ b/debian/changelog	Wed Jun 29 15:07:55 2016 +0200
@@ -1,3 +1,9 @@
+cubicweb (3.23.1-1) unstable; urgency=medium
+
+  * new upstream release.
+
+ -- Sylvain Thenault <sylvain.thenault@logilab.fr>  Wed, 29 Jun 2016 13:50:34 +0200
+
 cubicweb (3.23.0-1) unstable; urgency=medium
 
   * New upstream release.
--- a/debian/rules	Mon Jun 27 13:51:58 2016 +0200
+++ b/debian/rules	Wed Jun 29 15:07:55 2016 +0200
@@ -11,7 +11,7 @@
 	NO_SETUPTOOLS=1 python setup.py build
 	# cubicweb.foo needs to be importable by sphinx, so create a cubicweb symlink to the source dir
 	mkdir -p debian/pythonpath
-	ln -sf $(CURDIR) debian/pythonpath/cubicweb
+	ln -sf $(CURDIR)/cubicweb debian/pythonpath
 	# documentation build is now made optional since it can break for old
 	# distributions and we don't want to block a new release of Cubicweb
 	# because of documentation issues.
--- a/doc/changes/changelog.rst	Mon Jun 27 13:51:58 2016 +0200
+++ b/doc/changes/changelog.rst	Wed Jun 29 15:07:55 2016 +0200
@@ -2,6 +2,7 @@
  Changelog history
 ===================
 
+.. include:: 3.23.rst
 .. include:: 3.22.rst
 .. include:: 3.21.rst
 .. include:: 3.20.rst
--- a/doc/changes/index.rst	Mon Jun 27 13:51:58 2016 +0200
+++ b/doc/changes/index.rst	Wed Jun 29 15:07:55 2016 +0200
@@ -4,6 +4,7 @@
 .. toctree::
     :maxdepth: 1
 
+    3.23
     3.22
     3.21
     3.20
--- a/tox.ini	Mon Jun 27 13:51:58 2016 +0200
+++ b/tox.ini	Wed Jun 29 15:07:55 2016 +0200
@@ -44,11 +44,10 @@
 
 [testenv:doc]
 changedir = doc
-whitelist_externals =
-  sphinx-build
 deps =
   sphinx
-commands = sphinx-build -b html -d {envtmpdir}/doctrees .  {envtmpdir}/html
+commands =
+  {envpython} -c 'import sphinx; sphinx.main()' -b html -d {envtmpdir}/doctrees .  {envtmpdir}/html
 
 [pytest]
 python_files = *test_*.py