# HG changeset patch # User Denis Laxalde # Date 1563974096 -7200 # Node ID 280c9db410389579f94ee835dca2342fa7d44207 # Parent eb83daa6949545bb81bcac6b5fda41d73a37837a# Parent db906fc4412ddefea2c14159cd0754d55134e463 Merge with 3.26 diff -r eb83daa69495 -r 280c9db41038 .hgtags --- a/.hgtags Mon Jul 22 11:21:10 2019 +0200 +++ b/.hgtags Wed Jul 24 15:14:56 2019 +0200 @@ -638,3 +638,8 @@ 0ce26fb5ab48e1a7a3e9d0b6f05fae24f18442b5 debian/3.26.10-1 633ca84bea584c89c0d4f1cd4961b3f5f45c8e31 3.26.11 633ca84bea584c89c0d4f1cd4961b3f5f45c8e31 debian/3.26.11-1 +e7eb914df71dc35c81515e8f04912678aa13c2b1 debian/3.26.11-2 +4531a266f8b20fa6fd33df32453f77a0141856ae 3.26.12 +4531a266f8b20fa6fd33df32453f77a0141856ae debian/3.26.12-1 +1fc684253207b7989ab25ed68468420185f28e59 debian/3.26.13-1 +1fc684253207b7989ab25ed68468420185f28e59 3.26.13 diff -r eb83daa69495 -r 280c9db41038 MANIFEST.in --- a/MANIFEST.in Mon Jul 22 11:21:10 2019 +0200 +++ b/MANIFEST.in Wed Jul 24 15:14:56 2019 +0200 @@ -80,3 +80,6 @@ recursive-include cubicweb/skeleton *.py *.css *.js *.po compat *.tmpl format options pytest control prune cubicweb/misc/cwfs + +prune debian +prune cubicweb.spec diff -r eb83daa69495 -r 280c9db41038 cubicweb/__pkginfo__.py diff -r eb83daa69495 -r 280c9db41038 cubicweb/cwconfig.py --- a/cubicweb/cwconfig.py Mon Jul 22 11:21:10 2019 +0200 +++ b/cubicweb/cwconfig.py Wed Jul 24 15:14:56 2019 +0200 @@ -1243,6 +1243,8 @@ except Exception as ex: self.exception("can't connect to smtp server %s:%s (%s)", server, port, ex) + if self.mode == 'test': + raise return False for msg, recipients in msgs: try: @@ -1250,6 +1252,8 @@ except Exception as ex: self.exception("error sending mail to %s (%s)", recipients, ex) + if self.mode == 'test': + raise smtp.close() finally: SMTP_LOCK.release() diff -r eb83daa69495 -r 280c9db41038 cubicweb/devtools/devctl.py diff -r eb83daa69495 -r 280c9db41038 cubicweb/devtools/test/unittest_devctl.py diff -r eb83daa69495 -r 280c9db41038 cubicweb/skeleton/debian/control.tmpl diff -r eb83daa69495 -r 280c9db41038 cubicweb/skeleton/debian/rules.tmpl diff -r eb83daa69495 -r 280c9db41038 cubicweb/skeleton/debian/tests/pytest diff -r eb83daa69495 -r 280c9db41038 cubicweb/web/test/unittest_views_editforms.py --- a/cubicweb/web/test/unittest_views_editforms.py Mon Jul 22 11:21:10 2019 +0200 +++ b/cubicweb/web/test/unittest_views_editforms.py Wed Jul 24 15:14:56 2019 +0200 @@ -181,6 +181,37 @@ [rschema.type for rschema, _ in mform.editable_attributes()]) + def test_editable_attributes(self): + with self.admin_access.web_request() as req: + entity = self.vreg['etypes'].etype_class('Personne')(req) + form = self.vreg['forms'].select('edition', req, entity=entity) + expected = [ + ('nom', 'subject'), + ('prenom', 'subject'), + ('sexe', 'subject'), + ('promo', 'subject'), + ('titre', 'subject'), + ('ass', 'subject'), + ('web', 'subject'), + ('tel', 'subject'), + ('fax', 'subject'), + ('datenaiss', 'subject'), + ('tzdatenaiss', 'subject'), + ('test', 'subject'), + ('description', 'subject'), + ('salary', 'subject'), + ] + self.assertEqual( + [(rschema.type, role) for rschema, role in form.editable_attributes()], + expected) + + # now with display_fields attribute set + form.display_fields = [('nom', 'subject')] + expected = [('nom', 'subject')] + self.assertEqual( + [(rschema.type, role) for rschema, role in form.editable_attributes()], + expected) + def test_inlined_relations(self): with self.admin_access.web_request() as req: with self.temporary_permissions(EmailAddress={'add': ()}): diff -r eb83daa69495 -r 280c9db41038 cubicweb/web/views/autoform.py --- a/cubicweb/web/views/autoform.py Mon Jul 22 11:21:10 2019 +0200 +++ b/cubicweb/web/views/autoform.py Wed Jul 24 15:14:56 2019 +0200 @@ -308,7 +308,7 @@ if form.form_previous_values: cdvalues = self._cw.list_form_param(eid_param(self.rtype, self.peid), form.form_previous_values) - if unicode(entity.eid) not in cdvalues: + if str(entity.eid) not in cdvalues: return False return True @@ -697,8 +697,8 @@ """ % (hidden and 'hidden' or '', divid, selectid, - xml_escape(json_dumps(entity.eid)), is_cell and 'true' or 'null', - relname, '\n'.join(options)) + xml_escape(json_dumps(entity.eid)), is_cell and 'true' or 'null', + relname, '\n'.join(options)) def _get_select_options(self, entity, rschema, role): """add options to search among all entities of each possible type""" @@ -813,8 +813,8 @@ if self.formtype == 'main': # add the generic relation field if necessary if entity.has_eid() and ( - self.display_fields is None or - '_cw_generic_field' in self.display_fields): + self.display_fields is None + or '_cw_generic_field' in self.display_fields): try: field = self.field_by_name('_cw_generic_field') except f.FieldNotFound: @@ -868,6 +868,7 @@ schema = self._cw.vreg.schema for rtype, role in self.display_fields: yield (schema[rtype], role) + return if self.edited_entity.has_eid() and not self.edited_entity.cw_has_perm('update'): return action = 'update' if self.edited_entity.has_eid() else 'add' @@ -954,9 +955,9 @@ relation. """ return (self.should_display_add_new_relation_link( - rschema, existing, card) and - self.check_inlined_rdef_permissions( - rschema, role, tschema, ttype)) + rschema, existing, card) + and self.check_inlined_rdef_permissions( + rschema, role, tschema, ttype)) def check_inlined_rdef_permissions(self, rschema, role, tschema, ttype): """return true if permissions are granted on the inlined object and diff -r eb83daa69495 -r 280c9db41038 debian/changelog --- a/debian/changelog Mon Jul 22 11:21:10 2019 +0200 +++ b/debian/changelog Wed Jul 24 15:14:56 2019 +0200 @@ -1,5 +1,6 @@ cubicweb (3.27.0~dev0-1) UNRELEASED; urgency=medium + [ Jérémy Bobbio ] * Switch all Debian packages to Python 3. * Switch to Debian source format 3.0 (quilt). * Run test suite as part of autopkgtest. @@ -15,8 +16,42 @@ * Fix spelling mistake in doc-base abstract. * Remove transitional packages. + [ Denis Laxalde ] + * Let cubicweb-ctl replace cubicweb-ctl3 + -- Jérémy Bobbio Wed, 29 May 2019 16:06:20 +0200 +cubicweb (3.26.13-1) unstable; urgency=medium + + [ Denis Laxalde ] + * Introduce a cubicweb-ctl3 binary package, conflicting with cubicweb-ctl. + * New upstream release. + + [ Jérémy Bobbio ] + * Switch to Debian source format 3.0 (quilt). + * Specify priority “optional” instead of the obsolete “extra”. + * Tidy substvars usage in control file. + * Move lintian-overrides file to debian/source directory. + * Fix doc-base section. + * Fix spelling mistake in doc-base abstract. + + -- Denis Laxalde Wed, 24 Jul 2019 12:21:55 +0200 + +cubicweb (3.26.12-1) unstable; urgency=medium + + * New upstream release. + + -- Denis Laxalde Tue, 02 Jul 2019 11:32:39 +0200 + +cubicweb (3.26.11-2) unstable; urgency=medium + + * Remove build dependency on dh-systemd + * Build python3 basic packages + * Actually install something in cubicweb-ctl binary package + * Fix a couple of Lintian warnings + + -- Denis Laxalde Wed, 26 Jun 2019 15:00:53 +0200 + cubicweb (3.26.11-1) unstable; urgency=medium * New upstream release. diff -r eb83daa69495 -r 280c9db41038 debian/control --- a/debian/control Mon Jul 22 11:21:10 2019 +0200 +++ b/debian/control Wed Jul 24 15:14:56 2019 +0200 @@ -35,6 +35,7 @@ Package: python3-cubicweb Architecture: all +Section: python Depends: ${misc:Depends}, ${python3:Depends}, @@ -85,7 +86,7 @@ Conflicts: cubicweb-multisources, cubicweb-core, -Description: the complete CubicWeb framework +Description: CubicWeb framework CubicWeb is a semantic web application framework. . This metapackage will install all the components you need to run cubicweb on a @@ -96,6 +97,7 @@ Package: python3-cubicweb-postgresql-support Architecture: all +Section: python # postgresql-client packages for backup/restore of non local database Replaces: cubicweb-postgresql-support (<< 3.24.0-1~) Breaks: cubicweb-postgresql-support (<< 3.24.0-1~) @@ -117,12 +119,15 @@ Depends: ${misc:Depends}, python3-cubicweb (= ${source:Version}) +Conflicts: + cubicweb-ctl3, +Replaces: + cubicweb-ctl3 (<< 3.27.0), Description: tool to manage the CubicWeb framework CubicWeb is a semantic web application framework. . - This package provides a control script to manage (create, upgrade, start, - stop, etc) CubicWeb applications. It also include the init.d script - to automatically start and stop CubicWeb applications on boot or shutdown. + This package provides a control script to manage (e.g. create, upgrade) + CubicWeb applications. Package: python3-cubicweb-documentation diff -r eb83daa69495 -r 280c9db41038 debian/cubicweb-ctl.dirs --- a/debian/cubicweb-ctl.dirs Mon Jul 22 11:21:10 2019 +0200 +++ b/debian/cubicweb-ctl.dirs Wed Jul 24 15:14:56 2019 +0200 @@ -1,7 +1,6 @@ etc/init.d etc/cubicweb.d usr/bin -usr/share/doc/cubicweb-ctl var/log/cubicweb var/lib/cubicweb/backup var/lib/cubicweb/instances diff -r eb83daa69495 -r 280c9db41038 debian/python3-cubicweb.lintian-overrides diff -r eb83daa69495 -r 280c9db41038 debian/rules diff -r eb83daa69495 -r 280c9db41038 debian/tests/control diff -r eb83daa69495 -r 280c9db41038 debian/tests/skeleton-packaging diff -r eb83daa69495 -r 280c9db41038 flake8-ok-files.txt --- a/flake8-ok-files.txt Mon Jul 22 11:21:10 2019 +0200 +++ b/flake8-ok-files.txt Wed Jul 24 15:14:56 2019 +0200 @@ -126,6 +126,7 @@ cubicweb/web/test/unittest_views_cwsources.py cubicweb/web/test/unittest_views_json.py cubicweb/web/views/authentication.py +cubicweb/web/views/autoform.py cubicweb/web/views/cwuser.py cubicweb/web/views/editcontroller.py cubicweb/web/views/json.py