Merge with 3.25 branch
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 12 Sep 2017 09:49:30 +0200
changeset 12203 c615f945b38a
parent 12192 cf5d11ac79fb (current diff)
parent 12200 457274b4e017 (diff)
child 12206 cfd25da225c2
Merge with 3.25 branch
cubicweb/__pkginfo__.py
cubicweb/dataimport/massive_store.py
--- a/.hgtags	Mon Jul 10 11:43:18 2017 +0200
+++ b/.hgtags	Tue Sep 12 09:49:30 2017 +0200
@@ -605,3 +605,6 @@
 5fe62978801a4ac19cb8764812226190db12bbd7 3.25.1
 5fe62978801a4ac19cb8764812226190db12bbd7 debian/3.25.1-1
 5fe62978801a4ac19cb8764812226190db12bbd7 centos/3.25.1-1
+5010381099f1227724261665f0843a60447991b2 3.25.2
+5010381099f1227724261665f0843a60447991b2 debian/3.25.2-1
+5010381099f1227724261665f0843a60447991b2 centos/3.25.2-1
--- a/cubicweb.spec	Mon Jul 10 11:43:18 2017 +0200
+++ b/cubicweb.spec	Tue Sep 12 09:49:30 2017 +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.25.1
+Version:        3.25.2
 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
@@ -27,7 +27,7 @@
 Requires:       %{python}-rql >= 0.34.0
 Requires:       %{python}-yams >= 0.45.0
 Requires:       %{python}-logilab-database >= 1.15.0
-Requires:       %{python}-passlib => 1.7.0
+Requires:       %{python}-passlib
 Requires:       %{python}-lxml
 Requires:       %{python}-twisted-web < 16.0.0
 Requires:       %{python}-markdown
--- a/cubicweb/dataimport/massive_store.py	Mon Jul 10 11:43:18 2017 +0200
+++ b/cubicweb/dataimport/massive_store.py	Tue Sep 12 09:49:30 2017 +0200
@@ -106,6 +106,7 @@
         """
         assert not self.slave_mode
         if self not in self._initialized:
+            self.sql('DROP TABLE IF EXISTS cwmassive_initialized')
             self.sql('CREATE TABLE cwmassive_initialized'
                      '(retype text, type varchar(128), uuid varchar(32))')
             self._initialized[self] = None
--- a/cubicweb/pyramid/__init__.py	Mon Jul 10 11:43:18 2017 +0200
+++ b/cubicweb/pyramid/__init__.py	Tue Sep 12 09:49:30 2017 +0200
@@ -111,7 +111,9 @@
         app,
         origin=' '.join(cwconfig['access-control-allow-origin']),
         headers=', '.join(cwconfig['access-control-allow-headers']),
+        expose_headers=', '.join(cwconfig['access-control-expose-headers']),
         methods=', '.join(cwconfig['access-control-allow-methods']),
+        maxage=cwconfig['access-control-max-age'],
         credentials='true')
 
     if profile:
--- a/cubicweb/server/schemaserial.py	Mon Jul 10 11:43:18 2017 +0200
+++ b/cubicweb/server/schemaserial.py	Tue Sep 12 09:49:30 2017 +0200
@@ -92,6 +92,9 @@
 
     # Computed Rtype
     tables = set(t.lower() for t in dbhelper.list_tables(cnx.cnxset.cu))
+    # on postgres, ensure the default schema name (public) is also checked
+    if dbhelper.backend_name == 'postgres':
+        tables.update(t.lower() for t in dbhelper.list_tables(cnx.cnxset.cu, 'public'))
     has_computed_relations = 'cw_cwcomputedrtype' in tables
     # computed attribute
     try:
--- a/cubicweb/server/utils.py	Mon Jul 10 11:43:18 2017 +0200
+++ b/cubicweb/server/utils.py	Tue Sep 12 09:49:30 2017 +0200
@@ -54,14 +54,15 @@
     def to_string(self):
         return to_hash_str(u'%s$%s' % (self.salt, self.checksum or u''))
 
-    # passlib 1.5 wants calc_checksum, 1.6 wants _calc_checksum
-    def calc_checksum(self, secret):
+    def _calc_checksum(self, secret):
         return md5crypt(secret, self.salt.encode('ascii')).decode('utf-8')
-    _calc_checksum = calc_checksum
 
 
 _CRYPTO_CTX = CryptContext(['sha512_crypt', CustomMD5Crypt, 'des_crypt', 'ldap_salted_sha1'],
                            deprecated=['cubicwebmd5crypt', 'des_crypt'])
+# for bw compat with passlib < 1.7
+if not hasattr(_CRYPTO_CTX, 'hash'):
+    _CRYPTO_CTX.hash = _CRYPTO_CTX.encrypt
 verify_and_update = _CRYPTO_CTX.verify_and_update
 
 
--- a/cubicweb/web/webctl.py	Mon Jul 10 11:43:18 2017 +0200
+++ b/cubicweb/web/webctl.py	Tue Sep 12 09:49:30 2017 +0200
@@ -76,7 +76,7 @@
         if not dest:
             dest = osp.join(config.appdatahome, 'data')
         if osp.exists(dest):
-            if (not ask_clean or
+            if config.verbosity and (not ask_clean or
                 not (config.verbosity and
                      ASK.confirm('Remove existing data directory %s?' % dest))):
                 raise ExecutionError('Directory %s already exists. '
--- a/debian/changelog	Mon Jul 10 11:43:18 2017 +0200
+++ b/debian/changelog	Tue Sep 12 09:49:30 2017 +0200
@@ -1,3 +1,9 @@
+cubicweb (3.25.2-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Sylvain Thenault <sylvain.thenault@logilab.fr>  Mon, 11 Sep 2017 16:17:49 +0200
+
 cubicweb (3.25.1-1) unstable; urgency=medium
 
   * New upstream release.
--- a/debian/control	Mon Jul 10 11:43:18 2017 +0200
+++ b/debian/control	Tue Sep 12 09:49:30 2017 +0200
@@ -25,7 +25,7 @@
  python-pyramid,
  python-pyramid-multiauth,
  python-waitress,
- python-passlib (>= 1.7.0),
+ python-passlib,
  python-repoze.lru,
  python-wsgicors,
  sphinx-common,
--- a/doc/book/devrepo/migration.rst	Mon Jul 10 11:43:18 2017 +0200
+++ b/doc/book/devrepo/migration.rst	Tue Sep 12 09:49:30 2017 +0200
@@ -197,9 +197,9 @@
 * `option_group_change(option, oldgroup, newgroup)`, indicates that an option does not
   belong anymore to the same group.
 
-* `option_added(oldname, newname)`, indicates that an option has been added.
+* `option_added(option)`, indicates that an option has been added.
 
-* `option_removed(oldname, newname)`, indicates that an option has been deleted.
+* `option_removed(option)`, indicates that an option has been deleted.
 
 The `config` variable is an object which can be used to access the
 configuration values, for reading and updating, with a dictionary-like
--- a/setup.py	Mon Jul 10 11:43:18 2017 +0200
+++ b/setup.py	Tue Sep 12 09:49:30 2017 +0200
@@ -199,7 +199,7 @@
         'yams >= 0.45.0',
         'lxml',
         'logilab-database >= 1.15.0',
-        'passlib >= 1.7.0',
+        'passlib',
         'pytz',
         'Markdown',
         'unittest2 >= 0.7.0',