Merge with 3.26
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 24 Jul 2019 15:14:56 +0200
changeset 12709 280c9db41038
parent 12696 eb83daa69495 (current diff)
parent 12708 db906fc4412d (diff)
child 12710 df1c74d84668
Merge with 3.26
MANIFEST.in
cubicweb/__pkginfo__.py
cubicweb/cwconfig.py
cubicweb/devtools/devctl.py
cubicweb/devtools/test/data/cubes/i18ntestcube/__init__.py
cubicweb/devtools/test/data/cubes/i18ntestcube/__pkginfo__.py
cubicweb/devtools/test/data/cubes/i18ntestcube/excludeme/somefile.py
cubicweb/devtools/test/data/cubes/i18ntestcube/i18n/en.po.ref
cubicweb/devtools/test/data/cubes/i18ntestcube/node_modules/cubes.somefile.js
cubicweb/devtools/test/data/cubes/i18ntestcube/schema.py
cubicweb/devtools/test/data/cubes/i18ntestcube/views.py
cubicweb/devtools/test/unittest_devctl.py
cubicweb/skeleton/debian/control.tmpl
cubicweb/skeleton/debian/rules.tmpl
cubicweb/skeleton/debian/tests/pytest
cubicweb/test/data/legacy_cubes/comment/__init__.py
cubicweb/test/data/legacy_cubes/comment/__pkginfo__.py
cubicweb/test/data/legacy_cubes/email/__init__.py
cubicweb/test/data/legacy_cubes/email/__pkginfo__.py
cubicweb/test/data/legacy_cubes/email/entities.py
cubicweb/test/data/legacy_cubes/email/hooks.py
cubicweb/test/data/legacy_cubes/email/views/__init__.py
cubicweb/test/data/legacy_cubes/file/__init__.py
cubicweb/test/data/legacy_cubes/file/__pkginfo__.py
cubicweb/test/data/legacy_cubes/file/entities/__init__.py
cubicweb/test/data/legacy_cubes/file/hooks/__init__.py
cubicweb/test/data/legacy_cubes/file/views.py
cubicweb/test/data/legacy_cubes/forge/__init__.py
cubicweb/test/data/legacy_cubes/forge/__pkginfo__.py
cubicweb/test/data/legacy_cubes/mycube/__init__.py
cubicweb/test/data/legacy_cubes/mycube/__pkginfo__.py
cubicweb/test/data/legacy_cubes/mycube/ccplugin.py
cubicweb/web/views/autoform.py
debian/changelog
debian/control
debian/cubicweb-ctl.dirs
debian/cubicweb-ctl3.dirs
debian/cubicweb-ctl3.manpages
debian/cubicweb-ctl3.postrm
debian/python3-cubicweb.lintian-overrides
debian/rules
debian/tests/control
debian/tests/skeleton-packaging
flake8-ok-files.txt
--- 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
--- 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
--- 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()
--- 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': ()}):
--- 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 @@
   </select>
 </div>
 """ % (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
--- 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 <jeremy.bobbio@irq7.fr>  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 <denis.laxalde@logilab.fr>  Wed, 24 Jul 2019 12:21:55 +0200
+
+cubicweb (3.26.12-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Denis Laxalde <denis.laxalde@logilab.fr>  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 <denis.laxalde@logilab.fr>  Wed, 26 Jun 2019 15:00:53 +0200
+
 cubicweb (3.26.11-1) unstable; urgency=medium
 
   * New upstream release.
--- 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
--- 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
--- 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