Laurent Peuch <cortex@worlddomination.be> [Tue, 12 Feb 2019 14:58:50 +0100] rev 12367
[doc] respect pep8 in code examples
Laurent Peuch <cortex@worlddomination.be> [Tue, 12 Feb 2019 14:58:26 +0100] rev 12366
[doc] serie a small improvments
Laurent Peuch <cortex@worlddomination.be> [Tue, 12 Feb 2019 14:55:02 +0100] rev 12365
[doc] typo, the field is "name" not "title"
Laurent Peuch <cortex@worlddomination.be> [Tue, 12 Feb 2019 14:53:48 +0100] rev 12364
[doc] fix, command "create" is missing base cube
Laurent Peuch <cortex@worlddomination.be> [Tue, 12 Feb 2019 14:48:52 +0100] rev 12363
[doc] improve blog tutorial first steps and explain common errors
Laurent Peuch <cortex@worlddomination.be> [Tue, 12 Feb 2019 14:43:45 +0100] rev 12362
[doc] how to install pyramid or twisted application server
Laurent Peuch <cortex@worlddomination.be> [Tue, 12 Feb 2019 11:38:19 +0100] rev 12361
[doc] new behavior in virtualenv since 3.26
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 29 Jan 2019 14:04:28 +0100] rev 12360
[skeleton] use python3 flake8
In tox "flake8" environment, use python 3 virtualenv, so we can check for
python3 incompatible syntax.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 29 Jan 2019 14:02:19 +0100] rev 12359
[skeleton] drop whitelist_externals for flake8
whitelist_externals makes sense when used with sitepackages=true.
In this case it will always rely on $VIRTUAL_ENV/bin/flake8 so, the
whitelist_externals has no effect.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Mon, 29 Oct 2018 16:39:21 +0100] rev 12358
Add changelog note for running tests with pytest-xdist
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 26 Oct 2018 17:12:26 +0200] rev 12357
Make test database template creation concurrent
build_db_cache() is used in tests to create test database templates, i.e.
DEFAULT_EMPTY_DB_ID (which is __default_empty_db__) and custom template
database using CubicwebTC test_db_id/pre_setup_database API.
When running tests in parallel using multiple processes, build_db_cache() may
try to build the same database twice. Avoid this by adding synchronisation of
process by using a file lock.
So when two processes require the same template database, one build the
database and others wait it to be created.
Use filelock (https://github.com/benediktschmitt/py-filelock) library to have a
portable (unix / windows) way for handling locks.
Also filelock is packaged in debian: https://packages.debian.org/source/python-filelock
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 26 Oct 2018 17:00:05 +0200] rev 12356
Make test database cache lookup concurrent
has_cache() is used to dertermine if the template database already exists or
not.
When running tests accross multiple process, has_cache() wasn't aware of
databases created by other processes because it used a cache to generate the
cache...
Since the discovering discover_cached_db() time is quite reasonable (it's just
about listing file in a directory), let re-generate the cache on cache miss.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Mon, 29 Oct 2018 10:04:31 +0100] rev 12355
Fix flake8 issues since release 3.6.0
Flake8 had a new release which raise new issues, namely:
W504: line break after binary operator
F841: local variable 'ex' is assigned to but never used
W605: invalid escape sequence
F821: undefined name 'buffer' (noqa seems the only way to avoid this false positive)
Also pin flake8>=3.6 in our tests and make explicit that we use python3 to run
flake8 tests.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Mon, 29 Oct 2018 10:09:19 +0100] rev 12354
Stabilize flake8 tests on 3.26 branch
Use basepython=python2 or flake8 installed with python3 will raise "[F821]
undefined name 'buffer'"
Pin flake8 < 3.6 which has new checks that doesn't pass on our current code base.
Laurent Wouters <lwouters@cenotelie.fr> [Tue, 09 Oct 2018 16:24:12 +0200] rev 12353
Fix typo in RDFS URI
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 02 Oct 2018 16:04:52 +0200] rev 12352
[doc] Do not rely on lgc's sphinx_ext
This module is broken (getting an ImportError) and I don't want to fix
it. The only usage we make of it is for the "autodocstring" directive,
and I don't know what it does.
Based on the context, replacing autodocstring with either automodule or
autoclass and removing sphinx_ext from required Sphinx extensions.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 06 Sep 2018 13:44:06 +0200] rev 12351
Added tag 3.26.7 for changeset ee4ad63c91e5
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 06 Sep 2018 13:43:56 +0200] rev 12350
[pkg] Version 3.26.7
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 24 Aug 2018 17:19:02 +0200] rev 12349
Fix possible double import of cubes
For a new-style cube, if we import "cubicweb_<name>" and then import
"cubes.<name>", the cube will be imported twice. cubes.<name> and then
cubicweb_name is ok though...
When using pyramid, we try to find which cube define a "includeme" by importing
them with the name "cubes.<name>", so we (possibly ?) double import all new-style cube.
This case may also occur in tests with PyramidCWTest.
Touching the import loader to fix this scares me, so let's fix this by testing
"cubicweb_<name>" *before* "cubes.name" (for old style cubes, importing
cubicweb_<name> raise ImportError).
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Aug 2018 16:04:39 +0200] rev 12348
[autoform] Make RelationField.fromcardinality a class method factory
Instead of having the "RelationField" class hard-coded in this factory
method (thus preventing any subclass to properly use it), we make that
method a classmethod and instantiate the actual class instead of the
base one.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Aug 2018 16:02:30 +0200] rev 12347
[autoform] Use fieldclass from kwargs in guess_field for non-final relations
This follows up on af969080e7e6 in which a "fieldclass" kwarg has been
added in EntityFieldsForm.field_by_name() before calling guess_field().
In this changeset, this value was only used for final relation but the
way non-final relation actually also changed since we also use
guess_field from these relation (previously, the field class specified
through uicfg was instantiated directly in
EntityFieldsForm.field_by_name()). So in the non-final case in
guess_field() we simply try to retrieve "fieldclass" from kwargs and
fall back to RelationField.
Samuel Trégouët <samuel.tregouet@logilab.fr> [Thu, 16 Aug 2018 12:31:44 +0200] rev 12346
[py37] `async` is now a reserved keyword
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 18 Jul 2018 13:53:00 +0200] rev 12345
Merge 3.26
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 18 Jul 2018 13:48:13 +0200] rev 12344
Added tag 3.26.6, debian/3.26.6-1 for changeset 8362503a9248
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 18 Jul 2018 13:47:45 +0200] rev 12343
[pkg] version 3.26.6
Olivier Giorgis <olivier.giorgis@logilab.fr> [Wed, 18 Jul 2018 11:27:05 +0200] rev 12342
[py3] Replace unicode keyword which is unknown in python3
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 11 Jul 2018 09:18:57 +0200] rev 12341
[skeleton] Use "py3" as tox environment instead of "py34"
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 18:19:08 +0200] rev 12340
Added tag 3.26.5 for changeset 76d7b0aa94d2
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 18:18:33 +0200] rev 12339
[pkg] Version 3.26.5
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 28 Jun 2018 16:49:57 +0200] rev 12338
Merge with 3.26
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 12:19:16 +0200] rev 12337
[py3] Use "utf-8" as input encoding for docutils in rest extension
Docutils says that "unicode" is an unknown encoding on Python3. Not sure
where "unicode" as an encoding comes (it's there since showtime) but
"utf-8" seems more appropriate.
From now on, rendering of CubicWeb's rst directive (e.g. ..winclude)
works on Python 3. Accordingly, we extend wdoc's test to demonstrate
this. For this we need to install docutils in tox's web environment.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 11:19:14 +0200] rev 12336
[py3] Avoid setting attribute on Element instance in wdoc view
This change is needed to make "wdoc" view work on Python 3. Indeed,
before this patch, we used to set a "parent" attribute on Element
instances, which is not permitted since Python 3.3 as
xml.etree.ElementTree uses the C implementation by default.
To get rid of this "parent" attribute, we rework the XML nodes
processing logic to return and retrieve a node along with its parent in
several place of the code. Namely, build_toc_index() now accepts the
"parent" value for "node" and inserts it in the "index" dict (thus avoid
`node.parent = <value>`). Respectively, every query to the "index" dict
is updated to also retrieve the "parent" (thus avoiding `<value> =
node.parent`). Later in InlineHelpView class, the "index" dict is bound
to "tocindex" attribute so we adjust how it is queried in respective
methods.
Tests cubicweb/web/test/unittest_views_wdoc.py now pass on Python 3.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 10:07:20 +0200] rev 12335
[test] Add a trivial test for "wdoc" view
We just make sure it gets rendered without errors (which wasn't the case
before the previous patch).
It does not work on Python 3; this will be fixed in next changeset.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 10:06:26 +0200] rev 12334
[py3] Open rst file in text mode in wdoc view
Otherwise, UStringIO complains that it receives bytes.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 11:11:10 +0200] rev 12333
[ext/rest] Drop "handle_io_errors" argument to docutils' FileInput
This argument is deprecated and ignore in docutils since version 0.10.
Besides, its default value is None which is the same as we passed.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 10:38:04 +0200] rev 12332
[wdoc] Remove fallback about xml.etree module
Module xml.etree exists since python 2.5.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 10:15:33 +0200] rev 12331
[wdoc] Avoid usage of deprecated xlm elementree getchildren() method
Use list(node) as suggested by the deprecation warning.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 09:43:23 +0200] rev 12330
[style] Make cubicweb/web/views/wdoc.py flake8-clean
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 28 Jun 2018 09:38:38 +0200] rev 12329
[py3] Use six.text_type instead of unicode in wdoc views
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 28 Jun 2018 10:17:15 +0200] rev 12328
[views/startup] drop a duplicate rql query in manage view
Counting entities in `nb` is already done above this code, regression introduced by a85db6fa
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 19 Jun 2018 09:13:40 +0200] rev 12327
Merge with 3.26
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 18 Jun 2018 10:04:08 +0200] rev 12326
Added tag 3.26.4, debian/3.26.4-1 for changeset e1c1af68db86
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 18 Jun 2018 08:58:47 +0200] rev 12325
[pkg] Version 3.26.4
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 15 Jun 2018 17:45:26 +0200] rev 12324
[py3] ensure AjaxController return bytes
publish() must return bytes, when the @ajaxfunc decorated method return None, this raised:
TypeError: You cannot set Response.body to a text object (use Response.text)
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 13 Jun 2018 11:09:17 +0200] rev 12323
[py3] Let InstanceCommand.run_arg() always return an int
The caller of this method (which is method "run_args") does `max(status,
self.run_arg(appid))` and run_arg might return None if the underlying
<cmdname>_instance method returns None. On python3 max(1, None) breaks
with "TypeError: unorderable types: int() > NoneType()". So we enforce
run_arg() method to return an integer even if the underlying method
returns None.
This fixes call of "cubicweb-ctl i18ninstance" with Python3.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 18 Jun 2018 08:47:03 +0200] rev 12322
[test] Use cubicweb-file < 2.0.0
From version 2.0.0, cubicweb-file moved to new-style layout (Python
package) but we still expect it to be an old-style cube in CubicWeb's
tests (WebconfigTC in web/test/unittest_webconfig.py).
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Jun 2018 11:56:15 +0200] rev 12321
[py3] Decode subprocess stdout in toolsutils.show_diffs()
On Python 3, subprocess' pipes are bytes stream so we must decode them
before printing. Without this change, diff of configuration files (e.g.
all-in-one.conf as displayed upon instance upgrade) will rendered as a
single line on Python 3.
Adrien Di Mascio <Adrien.DiMascio@logilab.fr> [Thu, 03 May 2018 16:47:51 +0200] rev 12320
[python3] make sure staticcontroller returns a bytes instance
The ``publish()`` method of controller is supposed to return a
bytes intsance. Returning a text_type instance will crash later
on in the Pyramid response handler when assigning content to
``response.body`` (at least in Python3)::
>>> from pyramid.response import Response
>>> r = Response()
>>> r.body = ''
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/adim/.virtualenvs/…/response.py", line 562, in _body__set
raise TypeError(msg)
TypeError: You cannot set Response.body to a text object (use Response.text)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr> [Thu, 03 May 2018 14:05:26 +0200] rev 12319
[python3] use inspect.getfullargspec instead of inspect.getargspec
The latter is now deprecated
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 15 Jun 2018 17:45:26 +0200] rev 12318
[py3] ensure AjaxController return bytes
publish() must return bytes, when the @ajaxfunc decorated method return None, this raised:
TypeError: You cannot set Response.body to a text object (use Response.text)
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 13 Jun 2018 11:09:17 +0200] rev 12317
[py3] Let InstanceCommand.run_arg() always return an int
The caller of this method (which is method "run_args") does `max(status,
self.run_arg(appid))` and run_arg might return None if the underlying
<cmdname>_instance method returns None. On python3 max(1, None) breaks
with "TypeError: unorderable types: int() > NoneType()". So we enforce
run_arg() method to return an integer even if the underlying method
returns None.
This fixes call of "cubicweb-ctl i18ninstance" with Python3.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 15 Jun 2018 17:42:50 +0200] rev 12316
Depend on cubicweb-file >= 2.0.0
I applied V1 of the patch, but V2 contained this extra hunk...
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 11 Jun 2018 16:50:38 +0200] rev 12315
[test] Update webconfig's tests accounting for cubicweb-file being now a package
WebconfigTC.test_locate_all_files and WebconfigTC.test_locate_resource
assumed that cubicweb-file was installed in <share>/cubes/file whereas,
from the latest release, it is now a standard Python package thus
installed in site-packages as cubicweb_file. We simply update base
directory of these two tests.
Nicolas Chauvat <nicolas.chauvat@logilab.fr> [Wed, 06 Jun 2018 18:54:24 +0200] rev 12314
[widgets.js] fix obvious bug detected by sonar
Nicolas Chauvat <nicolas.chauvat@logilab.fr> [Wed, 06 Jun 2018 18:37:16 +0200] rev 12313
[views/uicfg] obvious bug detected by sonar
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Jun 2018 14:20:16 +0200] rev 12312
[style] Make toolsutils.py flake8-clean
Run `autopep8 --max-line-length 100 -i cubicweb/toolsutils.py` and fixed
unused imports.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Jun 2018 11:56:15 +0200] rev 12311
[py3] Decode subprocess stdout in toolsutils.show_diffs()
On Python 3, subprocess' pipes are bytes stream so we must decode them
before printing. Without this change, diff of configuration files (e.g.
all-in-one.conf as displayed upon instance upgrade) will rendered as a
single line on Python 3.
Adrien Di Mascio <Adrien.DiMascio@logilab.fr> [Thu, 03 May 2018 16:47:51 +0200] rev 12310
[python3] make sure staticcontroller returns a bytes instance
The ``publish()`` method of controller is supposed to return a
bytes intsance. Returning a text_type instance will crash later
on in the Pyramid response handler when assigning content to
``response.body`` (at least in Python3)::
>>> from pyramid.response import Response
>>> r = Response()
>>> r.body = ''
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/adim/.virtualenvs/…/response.py", line 562, in _body__set
raise TypeError(msg)
TypeError: You cannot set Response.body to a text object (use Response.text)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr> [Thu, 03 May 2018 14:05:26 +0200] rev 12309
[python3] use inspect.getfullargspec instead of inspect.getargspec
The latter is now deprecated
Laurent Wouters <lwouters@cenotelie.fr> [Wed, 25 Apr 2018 15:29:25 +0200] rev 12308
[utils] Fixes compatiblity of QueryCache with expected dict interface
QueryCache is expected to mimick the interface of the dict built-in. The current
__iter__ implementation breaks this expectation by iterating over key, value
pairs instead of only the keys.
This changeset fixes this issue by changing the __iter__ implementation to
iterate over the keys in the cache and providing an implementation of the items
method with a contract identical to the dict build-in (return a copy of the key-
value pairs within the dictionary as a list).
David Douard <david.douard@logilab.fr> [Tue, 24 Apr 2018 15:21:18 +0200] rev 12307
[test/statsd] add tests for cubicweb.statsd_logger
Laurent Wouters <lwouters@cenotelie.fr> [Tue, 24 Apr 2018 17:16:44 +0200] rev 12306
[utils] Implements __iter__ on QueryCache
In order to be able to iterate over the currently cached queries (so that they
may be inspected and invalidated), this changeset implementes __iter__ on
QueryCache.
Laurent Wouters <lwouters@cenotelie.fr> [Tue, 24 Apr 2018 17:30:43 +0200] rev 12305
[utils] Added new get method to QueryCache
The new get method enables the retrieval an item in the cache by specifying a
default value so that in the absence of an item for the key, the default value
is returned.
David Douard <david.douard@logilab.fr> [Tue, 24 Apr 2018 15:21:38 +0200] rev 12304
[test/rset] typo
Laurent Wouters <lwouters@cenotelie.fr> [Tue, 24 Apr 2018 11:22:17 +0200] rev 12303
[utils] Fixed issue in clearing QueryCache
When trying to add an item in a full QueryCache, the cache tries to make room.
It tries to list and remove non-permanent items with a transient counter (number
of times it has been requested). However, there is a pathological case where
items could be non-permanent but still not have a transient counter because they
were added, but never requested. In some cases, the full cache could be flushed,
including the permanent items.
This changeset attempts to fix this issue by only dropping the non-permanent
items that did not hav a transient counter.
David Douard <david.douard@logilab.fr> [Mon, 13 Nov 2017 16:08:58 +0100] rev 12302
[statsd] add a statsd_timethis context manager
This context manager allows to report to statsd the execution time of any
piece of code, without the need for it to be a function or a method, like::
def some_function():
do_stuff()
with statsd_timethis('some context message'):
do_that()
ensure_this()
David Douard <david.douard@logilab.fr> [Tue, 24 Apr 2018 14:16:14 +0200] rev 12301
[test/rset] add tests for ResultSet.first() and .last() methods
David Douard <david.douard@logilab.fr> [Tue, 24 Apr 2018 14:04:43 +0200] rev 12300
[test/rset] flake8
David Douard <david.douard@logilab.fr> [Tue, 24 Apr 2018 13:55:20 +0200] rev 12299
[rset] update copyright
David Douard <david.douard@logilab.fr> [Thu, 21 Sep 2017 16:29:26 +0200] rev 12298
[rset] add convenient first() and last() methods on ResultSet
These make life easier for the heavy user of the CW shell.
Also aliases entities() with all(); so we end with a pretty consistant set:
- .one()
- .first()
- .last()
- .all()
Laurent Wouters <lwouters@cenotelie.fr> [Tue, 24 Apr 2018 10:19:42 +0200] rev 12297
[server] Fixed issue with the adapters cache of a cloned EditedEntity
The adapters' cache of the entity within an EditedEntity used to be copied along
the entity itself during a cloning operation of the EditedEntity. This raises
an issue when the adapters' cache is not empty and contains cached values
linking to transaction-specific data (or the transaction itself). This prevents
the clone EditedEntity being used in a transaction outside the one that created
it.
This change resets the adapters' cache of the new copy so that no cached value
remain. The new copy can then be used in a new transaction afterwards.
David Douard <david.douard@logilab.fr> [Thu, 12 Oct 2017 15:22:00 +0200] rev 12296
[rql2sql] fix handling of the ORDERBY clause when the aggregation function is "embedded"
ie. a situation like:
Any X GROUPBY X ORDERBY COUNT(Y) WHERE ...
works fine since the aggregation function (COUNT) if the first one, whereas a situation like the proposed test:
Any X GROUPBY X ORDERBY ABS(COUNT(Y)) WHERE ...
failed due to the fact we only checked the top aggratation function (ABS).
Closes #17108671
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 23 Apr 2018 15:23:55 +0200] rev 12295
Merge 3.26
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 23 Apr 2018 13:50:50 +0200] rev 12294
[pkg] Set version to 3.27.0.dev0
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 23 Apr 2018 15:19:19 +0200] rev 12293
Added tag 3.26.3, debian/3.26.3-1 for changeset f7067be5f69c
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 23 Apr 2018 15:17:36 +0200] rev 12292
[pkg] Version 3.26.3
David Douard <david.douard@logilab.fr> [Mon, 16 Oct 2017 12:10:19 +0200] rev 12291
[utils/statsd_logger] flake8
David Douard <david.douard@logilab.fr> [Wed, 13 Dec 2017 01:23:39 +0100] rev 12290
[source/native] do NOT do anything with fti if do_fti is False
ensure no fti related process is done when fti is disabled on a db source.
David Douard <david.douard@logilab.fr> [Thu, 19 Apr 2018 15:55:33 +0200] rev 12289
[test/web] flake8 unittest_propertysheet.py
David Douard <david.douard@logilab.fr> [Thu, 19 Apr 2018 12:47:48 +0200] rev 12288
[web] fix css file generation permission bug (closes #17143773)
PropertySheet.process_resource() uses mkstemp which enforce a 0600 mode on the
output file, which is not the file permission we want for css files.
David Douard <david.douard@logilab.fr> [Thu, 19 Apr 2018 12:45:24 +0200] rev 12287
[test/web] add a test for css generation file permission problem (related to #17143773)
David Douard <david.douard@logilab.fr> [Thu, 19 Apr 2018 15:05:55 +0200] rev 12286
[doc] include the 3.26 changelog in changes's index
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 22 Mar 2018 14:45:11 +0100] rev 12285
[server] set PGPASSWORD when running pg commands for backup and restore
For db-dump (implied by upgrade) and db-restore with postgres with non-trusted
authentication, the db password is asked by pg tools (pg_dump, pg_restore,
createdb, dropdb).
Avoid this behavior by setting the PGPASSWORD environment variable when
database driver is postgres and db-password is set in sources file.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 22 Mar 2018 14:17:40 +0100] rev 12284
Added tag 3.26.2, centos/3.26.2-1, debian/3.26.2-1 for changeset 9bee3134d304
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 22 Mar 2018 13:53:33 +0100] rev 12283
[pkg] Version 3.26.2
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 22 Mar 2018 10:02:59 +0100] rev 12282
Flake8 cubicweb/web/webctl.py
Having the file flake8 clean makes it easier to catch basic programming
errors (e.g. name errors).
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 22 Mar 2018 10:04:54 +0100] rev 12281
[web] Add missing import of _DATA_DIR in webctl
Followup on d84bc85f7f70 which introduced usage of this name in
_datadirs method of GenStaticDataDirMixIn but resulted into a NameError
at runtime and makes migrations crash.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 11:04:20 +0100] rev 12280
[server] unicode → text_type in utils
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 11:02:48 +0100] rev 12279
[views] unicode → six.text_type in views/authentication.py
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 05 Mar 2018 10:32:58 +0100] rev 12278
[pyramid] Recreate CWSession entity when eid no longer exists
As noted in comment, it might occur that we receive a "sessioneid" from
a valid cookie while respective CWSession got dropped (typical case is
db being recreated while users got preserved). In such case, we just
recreate the CWSession entity as if it did not exist.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 22 Feb 2018 16:22:55 +0100] rev 12277
Added tag 3.26.1, debian/3.26.1-1, centos/3.26.1-1 for changeset 027676243aaa
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 22 Feb 2018 16:13:45 +0100] rev 12276
[pkg] Drop non-existant files from MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 21 Feb 2018 18:07:24 +0100] rev 12275
[pkg] Version 3.26.1
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 14:20:11 +0100] rev 12274
[test] Drop an unused function in cwconfig tests
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 14:19:15 +0100] rev 12273
[cwconfig] Always use "sys.prefix" to determine installation prefix
We drop all legacy logic implemented in _find_prefix() which now happens
to be buggy since we cleaned up setup.py in 3.26 (noticeably because
virtualenv is no longer properly detected).
Closes #17132990.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 10:55:49 +0100] rev 12272
[cwconfig] Look for migration scripts directory relatively to code
Thus getting rid of the last piece of data in "shared" directory.
As a consequence, we can drop data_files from __pkginfo__.py.
Related to #17132990.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 10:26:55 +0100] rev 12271
[pkg] Get rid of "pydir" in __pkginfo__.py
Nothing uses this.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 10:24:13 +0100] rev 12270
[pkg] Get rid of "shared" data
These are not used anymore per previous changesets.
Related to #17132990.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 10:11:16 +0100] rev 12269
[cwconfig] Drop shared_dir method
There's no more users of this method.
Related to #17132990.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 13:45:06 +0100] rev 12268
[config] Avoid relying on shared_dir method when possible
From 3.26, some "data" directories (like web/data and i18n or wdoc) are
installed along with CubicWeb in site packages. So we can retrieve them
relatively to the module that needs them (namely "cubicweb" for "i18n"
and "cubicweb.web" for "web/data" and "wdoc"). Reason for doing this is
that "share_dir()" is not working when cubicweb is installed in
"develop" mode and we are about to drop this method.
Related to #17132990.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 14:11:18 +0100] rev 12267
[test] Add a test for WebConfiguration.locate_all_files()
We are going to change the implementation, make sure there's no
regression.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 09:35:48 +0100] rev 12266
[cwconfig] Get rid of _forced_mode global
And compute CubicWebNoAppConfiguration.mode within the class namespace.
Related to #17132990.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 09:27:15 +0100] rev 12265
[cwconfig] Get rid of CWDEV
This is in preparation of a fix for #17132990 to cleanup legacy (and
probably no longer working) behaviors.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Feb 2018 09:26:02 +0100] rev 12264
[doc] Set release date of 3.26
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 06 Feb 2018 16:31:49 +0100] rev 12263
[web] Fix UnboundLocalError about "exc" in ajax controller
Introduced in 159dce89a145.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 07 Feb 2018 09:20:32 +0100] rev 12262
Link to "3.26" docs in README
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 01 Feb 2018 09:49:56 +0100] rev 12261
Added tag 3.26.0, debian/3.26.0-1, centos/3.26.0-1 for changeset 199851fcddd4
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 01 Feb 2018 09:24:52 +0100] rev 12260
[pkg] Version 3.26.0
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 25 Jan 2018 12:10:48 +0100] rev 12259
[pkg] Version 3.26.0rc0
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 12 Jan 2018 10:17:10 +0100] rev 12258
[schema] Define a decorator to handle methods override
There is a number of external classes (from yams/rql) methods overridden
"by hand" in cubicweb/schema.py. Define a single decorator to factor out
the pattern. It handles specifying the method name (to avoid conflict
with the local namespace) and passing the original method to the new
definition when needed.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 12:03:21 +0100] rev 12257
[pkg] Use setuptools.find_packages()
We drop the custom get_packages() function in setup.py that used to look
for test files (not discovered automatically since test directories are
not packages) and replace it by explicit entries in MANIFEST.in.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 11:51:23 +0100] rev 12256
[pkg] Drop SandboxViolation verification cracking
Dunno what this is for. Let's see if this work without.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 11:43:13 +0100] rev 12255
[pkg] Drop custom "install_data" command
Not sure what this is for, the comment mentions "egg" directory, but
this is quite likely an old hack that should be unnecessary when using a
recent setuptools.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 11:40:12 +0100] rev 12254
[pkg] Replace custom "scripts" handling by a setuptools entry points
http://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 13:30:50 +0100] rev 12253
Set a default value for arguments of cubicweb.cwctl:run()
This will help making a console script entry point from this to get rid
of the custom installation of scripts in setup.py.
Accordingly, update all calls of this function.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 11:34:44 +0100] rev 12252
[pkg] Drop custom install_lib command and use include_package_data instead
The custom install_lib command appeared to be meant to install package
data, as declared in __pkginfo__.py. Let's rely on setuptools'
include_package_data[1] option to handle this.
[1]: http://setuptools.readthedocs.io/en/latest/setuptools.html#including-data-files
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 14:45:26 +0100] rev 12251
[py3] Replace a unicode() occurrence in workflow views
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 14:41:01 +0100] rev 12250
[py3] Drop a couple of unicode() in devtools.testlib
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 24 Jan 2018 14:38:39 +0100] rev 12249
[py3] Alias long to int in pgstore tests
The previous version of handling PY2/PY3 made flake8 complain.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 12 Jan 2018 11:02:52 +0100] rev 12248
Merge with 3.25
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 12 Jan 2018 10:56:30 +0100] rev 12247
Added tag 3.25.4, centos/3.25.4-1, debian/3.25.4-1 for changeset b8567725c473
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 12 Jan 2018 10:48:34 +0100] rev 12246
[pkg] Version 3.25.4
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Dec 2017 11:17:25 +0100] rev 12245
[pyramid] Let logging be configured through .ini file
We do not initialize logging in CubicWebPyramidConfiguration thus
preventing logging to be started with cubicweb's configuration. On the
other hand, any logging configuration defined in ``development.ini``
file will be loaded by whatever start the instance using this file (i.e.
pserve, gunicorn, etc.). The benefit is that logging can now be
configured per "qualified name" in this file (i.e. one can easily set
the DEBUG level for the application cube while keeping all dependencies'
level to WARNING). In the development.ini template, we add logger
configurations for "logilab" and "cubicweb" qualified names (along with
those of the application cube).
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 01 Dec 2017 11:19:19 +0100] rev 12244
Disable pytest's logs reporting
CubicWeb already prints captured logs in stderr upon test failure, so we
get them twice. Until we fix our logging management, disabling pytest
capture and restore brings the output level back to sanity.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 01 Dec 2017 11:12:09 +0100] rev 12243
[pyramid] Do not issue security warnings in test mode
When some session or authtk secret is missing in Pyramid settings,
scary "!! SECURITY WARNING !!" are issued. This is arguably pointless in
tests. So disable them in this case.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 30 Nov 2017 11:55:35 +0100] rev 12242
[ssplanner] Prevent execution of write queries involving computed relations
Previously, setting a computed relation upon entity creation or
modification (using the ORM or an RQL query) would usually fail with an
operational error in the backend ("no such table"). However, under some
mysterious circumstances (like passing a string as value in cw_set for a
computed relation), the RQL to SQL transformation would simply drop the
clause.
To prevent this to happen, we add a check for computed relation before
adding a relation to an execution plan. This check raises a QueryError.
It happens in several places:
* in querier.InsertPlan.add_relation_def() (called from several places
in ssplanner steps) for INSERT queries,
* in ssplanner.UpdateStep.execute() for SET queries and,
* in ssplanner.SSplanner.build_delete_plan() for DELETE queries.
Tests added to unittest_querier.py because unittest_sslplanner.py looked
inappropriate (it has only unit tests) and the former already had a
NonRegressionTC class.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 30 Nov 2017 11:00:01 +0100] rev 12241
[querier] Expand 'rdef' argument in InsertPlan.add_relation_def()
Expand the 'rdef' tuple to improve readability. The 'rtype' value is not
used at the moment, but will in the next changeset.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 30 Nov 2017 11:20:58 +0100] rev 12240
[server] Use dict.setdefault() instead of if/else in repo.glob_add_relations()
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Nov 2017 15:26:32 +0100] rev 12239
[cleanup] Fix some flake8 errors
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Nov 2017 15:26:04 +0100] rev 12238
[test] Stop using lgc.testlib in unittest_migractions
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Nov 2017 16:31:59 +0100] rev 12237
[test] Drop no more used "maxeid" based deletion in BaseQuerierTC and derived tests
This is probably only necessary for QuerierTC itself, move it there and drop
incantation from other derived classes to deactivate this feature.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 15 Sep 2017 16:31:33 +0200] rev 12236
[rql2sql/test] Remove dead setUpModule tearDownModule
they are overwritten a few lines below , hence this code is dead and not
necessary for test success, drop it.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 15 Sep 2017 16:25:51 +0200] rev 12235
[rql2sql/test] Move base class from repotest to unittest_rql2sql
It's only used there, so move it closer to its usage.
Along the way, stop using lgc.testlib.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 15 Sep 2017 16:59:13 +0200] rev 12234
[rql2sql/test] Set maxDiff to None to see full diffs
this is usually useful to compare SQL strings
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 15 Sep 2017 17:01:04 +0200] rev 12233
[rql2sql] Use string_type instead of unicode for py3k support
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Nov 2017 17:08:05 +0100] rev 12232
[gcdebug] Only ignore weakref.WeakKeyDictionary class on Python 2
From Python 3.5, this class fails isinstance check with the following
error:
::
cls = <class 'weakref.WeakKeyDictionary'>, instance = <functools._lru_list_elem object at 0x7f4331859a48>
def __instancecheck__(cls, instance):
"""Override for isinstance(instance, cls)."""
# Inline the cache checking
> subclass = instance.__class__
E AssertionError: [<class 'AttributeError'> in gc] 'functools._lru_list_elem' object has no attribute '__class__'
/usr/lib/python3.5/abc.py:181: AssertionError
I have no clue why this happens, but it makes
cubicweb.web.test.test_views.AutomaticWebTest.test_startup_views fail on
Python 3.5. So only consider this class for Python 2.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Nov 2017 16:14:57 +0100] rev 12231
[wsgi] Convert "code" passed to WSGIResponse as integer
WSGIResponse is passed a Request.status_out in
CubicWebWSGIApplication._render(), which, starting from Python 3.5, is
an instance of HTTPStatus.
However, webtest still expects a 3-digits value as status string.
Fortunately, calling int() on an HTTPStatus works.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Nov 2017 15:50:07 +0100] rev 12230
[test] Add a "version" to cubicweb_mycube/__pkginfo__.py
Starting from Python 3.5, unittest_cwctl.py::CubicWebCtlTC.test_list()
would fail without this.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 28 Nov 2017 15:43:55 +0100] rev 12229
[tox] Use py3 environment instead of py34
The former would select any Python 3 interpreter.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Nov 2017 15:02:03 +0100] rev 12228
[querier] Allow usage of computed relation into WHERE clause of write queries
This used to crash because of an attempt to access unexisting table.
Closes #17113286
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Nov 2017 12:27:51 +0100] rev 12227
[cleanup] Fix some flake8 errors
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:37:20 +0100] rev 12226
[tox] Bump flake8 version to 3.5
Previous patches fixed new errors raised in this version.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:32:26 +0100] rev 12225
[pyramid] Get rid of a couple of bare "except"
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:28:52 +0100] rev 12224
[pyramid] Get rid of a bare "except" in UpdateLoginTimeAuthenticationPolicy
Also refactor a bit the method to restrict the try/except block to the
code for which we actually want to catch an exception (i.e. the
cnx.execute() + cnx.commit()).
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:25:22 +0100] rev 12223
[web] Avoid bare "except" in ConcatFilesHandler.concat_cached_filepath()
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:16:07 +0100] rev 12222
[test] Use ignore_errors=True in shutil.rmtree instead of try/except/pass
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:13:02 +0100] rev 12221
[server] Get rid of a bare except in sqlutils
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:14:36 +0100] rev 12220
[server] Do not use logilab.common.date.strptime in sqlutils
This function is aliased to datetime.datetime.strptime() and exists only
for compatibility with Python <= 2.5 which we no longer support.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:08:35 +0100] rev 12219
[dataimport/test] Ignore flake8 error E741 in test_pgstore.py
This error is about "l" being an ambiguous variable name. Here, it's
arguably acceptable.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:18:20 +0100] rev 12218
[test] Avoid ambiguous variable name "l" in unittest_req.py
This is an error (E741) from flake8 3.5.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 Oct 2017 09:04:34 +0100] rev 12217
[tox] Bound flake8 version to >=3.4, <3.5
The code base is not clean with 3.5, so keep using 3.4 in *stable*
branches.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 24 Oct 2017 09:50:29 +0200] rev 12216
[pyramid] set waitress url_scheme to https when base-url scheme is https
See https://docs.pylonsproject.org/projects/waitress/en/latest/#using-behind-a-reverse-proxy
Since we do not configure trusted_proxy waitress ignore X-Forwarded-Proto
header and may generate http urls (pyramid request.url) when the instance is
behind a https reverse proxy. This cause cubicweb-signredrequest to not work
with since it rely on the url (including scheme).
Set url_scheme to 'https' when CubicWeb base-url scheme is https as a
workaround.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 17 Oct 2017 11:59:55 +0200] rev 12215
Added tag 3.25.3, centos/3.25.3-1, debian/3.25.3-1 for changeset d238badfc268
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 17 Oct 2017 11:58:35 +0200] rev 12214
[pkg] version 3.25.3
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 06 Oct 2017 15:14:18 +0200] rev 12213
[uicfg] Fix autoform_section rtags wrt derivation
cw 3.25 introduced the 'derived rtags' feature, but missed that
`autoform_section` implementation was overriding several methods where this was
implemented in the base class. The following problems are tested and fixed:
* during init, we should not attempt to call `_initfunc_step2` if there is some
parent,
* but we should handle expansion of wildcard ('*' used as subject or object of a
tag) since this is handled during init step for this class, unlike others
which handle this in `get` method (i.e. at lookup time),
* fix overrided `get` method to consider parent rtag if any.
Closes #17107020
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 06 Oct 2017 10:00:36 +0200] rev 12212
[rtags] Enhance repr of rtags
* we don't care of the class, the registry id is enough (never seen a case of
sub-classing)
* add the module from which the rtag is coming as well as parent rtag if any.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 06 Oct 2017 14:23:40 +0200] rev 12211
[web/test] Use bare unittest main instead of lgc.main
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 06 Oct 2017 14:24:35 +0200] rev 12210
[cleanup] Fix some flake8 errors
and drop upper bound of copyright along the way.
autoform module is not added to flake8-ok-files since there are some remaining
errors to be handled, but that's still a start.
Olivier Giorgis <olivier.giorgis@logilab.fr> [Fri, 15 Sep 2017 14:14:46 +0200] rev 12209
[doc] Update the advanced tutorial
to follow the new style layout of cubes among others.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Sep 2017 15:05:22 +0200] rev 12208
[views] Respond with 400 Bad Request in case of validation error in ajax request
Previously, we raised a plain RemoteCallFailed without a status code, in which
case it defaults to "500 Internal Server Error". Now, for validation
errors, we issue a 400 Bad Request since these are clearly client errors.
Adrien Di Mascio <Adrien.DiMascio@logilab.fr> [Fri, 06 Oct 2017 11:45:52 +0200] rev 12207
[web] fix session /cnx mix in anonymized_request
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 06 Oct 2017 16:59:10 +0200] rev 12206
[test] Pin some test dependencies
We currently have CI failures because cubes used as test dependencies have been
updated to new-style cube layout. To avoid this, pin them to previous released.
Those dependencies should be removed but in the mean time this should be enough
(and backported in all active branches).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 06 Oct 2017 16:59:10 +0200] rev 12205
[test] Pin some test dependencies
We currently have CI failures because cubes used as test dependencies have been
updated to new-style cube layout. To avoid this, pin them to previous released.
Those dependencies should be removed but in the mean time this should be enough
(and backported in all active branches).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 05 Oct 2017 17:24:29 +0200] rev 12204
[web/form] Relax condition for non-translating field names
we should test true condition instead of None, so if one raise a ValidationError
using an empty string as 'no-field' marker instead of None, we don't get the PO
file header that gettext likes to return when one attempt to translate an empty
string.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 12 Sep 2017 09:49:30 +0200] rev 12203
Merge with 3.25 branch
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 26 Sep 2017 10:46:43 +0200] rev 12202
[entities] Restore dc_ methods instead of __getattr__ proxy
In 8de62610cea2, a __getattr__ proxy was introduced to handle compatibility
with dc_* methods being called on entity instances instead of through the
IDublinCore adapter. Unfortunately, __getattr__ does not play well with
super() and since the latter is often used by, we here restore all dc_ methods
with an explicit proxy to the adapter. More verbose but should work.
Closes #17103999.
Samuel Trégouët <samuel.tregouet@logilab.fr> [Wed, 13 Sep 2017 17:19:42 +0200] rev 12201
[pkg] add missing unittest2 dependency to spec file
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 12 Sep 2017 09:48:02 +0200] rev 12200
Added tag 3.25.2, debian/3.25.2-1, centos/3.25.2-1 for changeset 5010381099f1
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 11 Sep 2017 16:19:00 +0200] rev 12199
[pkg] Prepare version 3.25.2
Arthur Lutz <arthur.lutz@logilab.fr> [Thu, 22 Jun 2017 16:39:48 +0200] rev 12198
[cubicweb/pyramid] take into account two ignored CORS configuration items from all-in-one.conf
David Douard <david.douard@logilab.fr> [Tue, 04 Apr 2017 10:50:49 +0200] rev 12197
[cwctl] upgrade: do delete the static data dir if verbosity is 0 (closes #17069749)
Jérôme Roy <jerome.roy@logilab.fr> [Fri, 28 Jul 2017 08:35:01 +0000] rev 12196
[doc] Fix option_*() migration commands in doc
The function signature in the doc is not the same as in the code. Also option_removed should probably be removed from the doc since the function in migration.py is empty
David Douard <david.douard@logilab.fr> [Wed, 03 May 2017 21:58:48 +0200] rev 12195
[massive store] ensure the cwmassive_initialized table is deleted if needed
This may be necessary if a previous import did badly crached, leaving the
cwmassive_initialized behind.
David Douard <david.douard@logilab.fr> [Wed, 03 May 2017 21:55:41 +0200] rev 12194
[server] fix deserialize_schema to handle properly pg schema (closes 17076486)
Postgres behaviour is to look first for a table in the configured schema then
fall back to 'public' if no table is found.
This must be implemented in deserialize_schema when listing existing tables
to check for computed relations (cw_cwcomputedrtype) otherwise computed
relations may not work when using non-default pg schema.
David Douard <david.douard@logilab.fr> [Wed, 10 May 2017 15:07:18 +0200] rev 12193
[server/utils] update passlib API to 1.7 (closes #17054805)
while keeping bw-compat with 1.6 - 2.7 is not available for all distributions,
e.g. jessie.
The dependancy has been bumped in 6186cd15a46d because of a change in
bc9d901cb9e6. We may easily use the appropriate method depending on the version
installed.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 10 Jul 2017 11:43:18 +0200] rev 12192
Merge with 3.25 branch
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 10 Jul 2017 11:41:20 +0200] rev 12191
Added tag 3.25.1, debian/3.25.1-1, centos/3.25.1-1 for changeset 5fe62978801a
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 10 Jul 2017 11:23:45 +0200] rev 12190
[pkg] Version 3.25.1
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 21 Apr 2017 14:01:46 +0200] rev 12189
[facets] Fix disappearance of navtop component on facet filtering
which is because facets are replacing the whole #pageContent div, while this one
contains other stuff than the view:
* a type selector component that should be dropped for a while,
* a computed title,
* the page navigation.
Then the view content itself is in a #contentmain div. The thing is that the
navigation should be rebuilded on filtering (this is not the case for other
bullets in the list above). This is currently handled specifically in the
ajaxcontroller (except for the type selector which will disappear... who said it
should be dropped at once?).
So to fix this we:
* put the page navigation into the "contentmain" div
* don't replace anymore "pageContent" but "contentmain"
After that we can even remove from the ajax controller the code that
reimplements title handling similarly to the main template.
Notice the part that changes the main template has to be ported to squareui.
Closes #17074195
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 19 Jun 2017 18:15:28 +0200] rev 12188
[web] Set response status to 400 when appropriate in ajax controller
When this is clearly a client error, set status to 400. Otherwise, keep the
default value for RemoteCallFailed (status=500).
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 19 Jun 2017 18:00:26 +0200] rev 12187
[web] Only log exceptions in debug mode in Ajax controllers
When we raise a RemoteCallFailed error (erroneously turned into a '500
Internal Server Error' response, but that's another business). In production
environment, we do not want to log the exception in most cases where it's
actually a client error. So only log the exception in debug mode.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 06 Jun 2017 12:20:17 +0200] rev 12186
[pyramid] Only expose 'cubicweb.bwcompat' setting for "all-in-one" configuration type
The "pyramid" instance configuration does not work with "cubiwceb.bwcompat"
mode (on purpose). Yet, having the setting exposed in development.ini file
(generate by `cubicweb-ctl create --config pyramid <cube> <instance>` command)
is misleading and we want to remove it.
Thus, we only query this setting when cubicweb configuration is "all-in-one" and
drop the setting line from templated development.ini file. If the option is
found and True for any other configuration type, we issue a user warning (and
ignore the option).
Yann Voté <yann.vote@logilab.fr> [Thu, 27 Apr 2017 10:16:39 +0200] rev 12185
[migration] Only drop moved table entities if it does not exists
For very old instances (namely docaster), this table has never been created.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 05 May 2017 17:57:10 +0200] rev 12184
[web/views] delete: show composite entities in predictible order
Iterate over relations type in alphabetical order, so the order is predictible
dans does not depend on PYTHONHASHSEED.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 28 Apr 2017 09:49:37 +0200] rev 12183
[req] fix find() generating non-rewritable rql on non final relations
When filtering on a relation, find() was generating rql like
'Any X WHERE X is ETYPE, X relation EID' which work without being rewritten (it
should probably not), but when applying some rewrite (eg. permissions) it raise
in rqlrewrite code.
def _use_orig_term(self, snippet_varname, term):
...
> self.rewritten[key] = term.name
E AttributeError: 'Constant' object has no attribute 'name'
Generate valid rql instead 'Any X WHERE X is ETYPE, X relation Y, Y eid EID'.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 26 Apr 2017 15:04:40 +0200] rev 12182
[req] raise KeyError instead of AssertionError in req.find()
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 25 Apr 2017 17:31:24 +0200] rev 12181
[req] use format() instead of % substitution
For readability, avoid escaping using %% and use format() instead.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 25 Apr 2017 17:11:18 +0200] rev 12180
[test] make assertions on exception message
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 25 Apr 2017 17:10:16 +0200] rev 12179
[req] clearer exception message
Display what attribute trigger the NotImplementedError
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 21 Apr 2017 10:29:44 +0200] rev 12178
[cleanup] Drop useless fake function
actually not necessary.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 21 Apr 2017 10:29:07 +0200] rev 12177
[cleanup] Use plain unittest main in unittest_rqlrewrite
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 25 Apr 2017 17:35:29 +0200] rev 12176
[cleanup] Fix flake8 error unittest_rqlrewrite
hard one!