# HG changeset patch # User Sylvain Thénault # Date 1467205675 -7200 # Node ID eccb5c1e58c2b1af2d1a2a7904294f93875efc28 # Parent 88446b0c6ea111a00b69db8407eade5966620f01# Parent 79bc50f8d2bab793a18348a0b43f3632aaf1881f merge 3.23 changes diff -r 88446b0c6ea1 -r eccb5c1e58c2 .hgtags --- 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 diff -r 88446b0c6ea1 -r eccb5c1e58c2 cubicweb.spec --- 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 diff -r 88446b0c6ea1 -r eccb5c1e58c2 cubicweb/__pkginfo__.py --- 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" diff -r 88446b0c6ea1 -r eccb5c1e58c2 cubicweb/dataimport/importer.py --- 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] diff -r 88446b0c6ea1 -r eccb5c1e58c2 cubicweb/dataimport/test/unittest_importer.py --- 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: diff -r 88446b0c6ea1 -r eccb5c1e58c2 cubicweb/server/sqlutils.py --- 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() diff -r 88446b0c6ea1 -r eccb5c1e58c2 debian/changelog --- 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 Wed, 29 Jun 2016 13:50:34 +0200 + cubicweb (3.23.0-1) unstable; urgency=medium * New upstream release. diff -r 88446b0c6ea1 -r eccb5c1e58c2 debian/rules --- 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. diff -r 88446b0c6ea1 -r eccb5c1e58c2 doc/changes/changelog.rst --- 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 diff -r 88446b0c6ea1 -r eccb5c1e58c2 doc/changes/index.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 diff -r 88446b0c6ea1 -r eccb5c1e58c2 tox.ini --- 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