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!
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 20 Apr 2017 18:05:06 +0200] rev 12175
[rqlrewrite] Enhance detection of need for Exists node
We actually want one only if this is not a (`And` / `Or`) binary tree of `Not` or
`Exists` nodes, so write a recursive function to tell so.
Related to #17074119
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 21 Apr 2017 09:57:04 +0200] rev 12174
[rqlrewrite] Fix rewrite on ambiguities introduced by NOT relation or "is IN" type restriction
When some inserted RQL snippet generate more solutions than the original RQL,
the rewriter attempt to duplicate the snippet for each newly introduced
solution. There are though some cases where we do not want this behaviour in
case of ambiguities introduced by:
* NOT(X relation Y) expression, since it won't be
equivalent to NOT(X relation Y1, Y1 is Type1) OR NOT(X relation Y2, Y2 is
Type2) ;
* EXISTS(X relation Y, Y is IN (Type1, Type2) expression, since it's not
actually necessary to split an explicitly introduced ambiguity (and it crash
if we attempt to do so, so...).
In test, we've to modify the `rewrite()` function because in the newly
introduced test we need the same constraint to be applied to two variables in
the original query, and this was not supported before.
Notice the generated RQL in test is still *NOT CORRECT* "(EXISTS(NOT EXISTS() OR
EXISTS(...))", or at least isn't optimal. This will be fixed in a forthcoming
changeset.
Related to #17074119
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 19 Apr 2017 09:05:10 +0200] rev 12173
[dataimport] Add explanation about why external entities can't be inserted
By default after the import processed the importer indicates which external
entities can't be inserted because they are missing dependency data (other
entities, used in inlined or mandatory relations).
It usually helps there to find out which extids / relations are missing, so add
this to the log.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 20 Apr 2017 17:22:36 +0200] rev 12172
[querier] Fix typo in Unauthorized message exception
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 19 Apr 2017 15:09:31 +0200] rev 12171
[massive store] Ensure temporary metadata table get dropped
even if there is some integrity errors while inserting entity values or setting
back index/constraints, or any other errors. In case of exception, rollback to
ensure we're not committing undesired intermediate state.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 19 Apr 2017 10:09:25 +0200] rev 12170
[test] Stop using lgc.testlib.unittest_main in dataimport's test_sqlgenstore.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 19 Apr 2017 10:08:59 +0200] rev 12169
[test/cleanup] Cleanup flake8 errors in dataimport's test_sqlgenstore
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 19 Apr 2017 10:18:47 +0200] rev 12168
[pkg] Fix path error in flake8-ok-files
'sources' is a subpackage of 'server'.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 19 Apr 2017 15:16:10 +0200] rev 12167
[cleanup] Fix undetected pep8 error
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 19 Apr 2017 11:10:58 +0200] rev 12166
[doc] Set release date of 3.25 in changelog
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 14 Apr 2017 17:17:12 +0200] rev 12165
[cwconfig] load appobjects subpackages recursively
This is a regression appeared in 3.25.0. Appobjects (entities, views etc)
subpackages should be loaded recursively, this is the historical behavior,
relevant code is in logilab.common.registry._toload_info().
To keep historical behavior schema subpackages should not be loaded, relevant
code is in yams.reader.get_schema_files().
We may want to have a consistent behavior later on...
Closes #17073706.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 14 Apr 2017 15:40:49 +0200] rev 12164
[pkg] Set version to 3.26.0.dev0
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 14 Apr 2017 15:40:15 +0200] rev 12163
Merge with 3.25 branch
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 14 Apr 2017 15:32:17 +0200] rev 12162
Added tag 3.25.0, debian/3.25.0-1, centos/3.25.0-1 for changeset dacc5b168e29
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 14 Apr 2017 15:15:27 +0200] rev 12161
[pkg] Version 3.25.0
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 13 Apr 2017 15:04:45 +0200] rev 12160
[entities] Fix backward compat of IDublinCore adapter wrt dc_long_title
`entity.dc_long_title()` used to fallback to `dc_title()`, and most entity types
were relying on this, thus only implementing the later.
Since introduction of the IDublinCore adapter, if one call
`entity.dc_long_title()` on an entity that only implements `dc_title()`, it will retrieve
the adapter which will then call its own `title()` method instead of the
`dc_title()` method of the entity as expected.
Fix this by calling instead `entity.dc_title()` which will eventually kick in the
backward compat layer if necessary.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 13 Apr 2017 13:57:32 +0200] rev 12159
[web] Do not try to rmtree symlinks in rmtreecontent()
There is a symlink in data directory (created by generate_static_dir() method)
and trying to rmtree() it will fail with an OSError. So we unlink() it
instead.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 13 Apr 2017 12:20:30 +0200] rev 12158
[pkg] Version 3.25.0rc3
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 16:14:46 +0200] rev 12157
[test] Stop using lgc.testlib
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 16:14:10 +0200] rev 12156
Fix some flake8 errors
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 16:12:51 +0200] rev 12155
[sources] Turn classmethod into standard method
No need for a class method and easier to get proper logger including source's
name.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 16:11:56 +0200] rev 12154
[test] Add some tests for hooks.syncsources
for parts which are not located in some source's check_config / check_urls
method.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 16:10:57 +0200] rev 12153
[sources] Check source's url attribute value on creation/modification
Similarly as for config. Now, ldap source validation is properly done there
instead of at initialization time.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 16:07:25 +0200] rev 12152
[sources] Check sources configuration is fine on creation/modification
Reintroduce usage of 'source.check_config' which had almost disappeared, as
well as tests for the currently detected errors.
Part of the system source specific checking done in syncsources reimplemented in
a specific check_config implementation.
Tests are dispatched among ldap / datafeed and syncsources tests but are not
strictly correctly located (notably syncsources tests behaviour of the native
source's check_config).
The system source url checking part which disappears from syncsources will be
reintroduced in a follow-up.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 17:26:27 +0200] rev 12151
[test] Fix option name in ldap wrong group test
which wasn't actually testing what it expected (and nothing guarantee it does now, but that's another story).
Fixing this will avoid failure once we properly check the configuration.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 15:55:26 +0200] rev 12150
[sources] Enhance prototype of check_conf_dict
* mark it private
* explicit name
* update docstring
Private function is still called from syncsources but this will be updated in a
follow-up.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 15:38:32 +0200] rev 12149
[sources] Stop translating validation error
this should be done later in the web ui, where lang is properly set.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 12 Apr 2017 15:49:05 +0200] rev 12148
[sources] Simplify source's init method
Only call it when enabled instead of giving a boolean flag indicating whether it
is or not (which were not correctly considered).
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 12 Apr 2017 14:54:10 +0200] rev 12147
[server] Deprecate Repository.sources_by_eid
It's not used anymore within cubicweb itself.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 05 Apr 2017 14:59:09 +0200] rev 12146
[server] Add source_by_eid and source_by_uri methods to repository
Most of the times we only need to retrieve one source (either by uri or eid)
and querying sources_by_eid and sources_by_uri properties on repository just
for one item is costly. So these methods query what's needed. We issue a
ValueError (instead of KeyError for sources_by_{eid,uri} dict) in case the key
is not found.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 04 Apr 2017 17:43:56 +0200] rev 12145
[hooks] Remove list() around repo.sources_by_uri
There's no need to convert it as a list anymore since sources_by_uri is a
property and will not be modified.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 05 Apr 2017 14:31:44 +0200] rev 12144
[server] Inline _entity_update method into init method of AbstractSource
This _entity_update method does not make sense now that we do not update
source from database information but always build them afresh.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 05 Apr 2017 14:02:58 +0200] rev 12143
[server] Drop update_config method of source
It does not make sense anymore to update the config of a source instance
(subclass of cubicweb.server.sources.AbstractSource) now that they are always
built from database information (CWSource). In datafeed and ldapfeed, we
move all code from "update_config" method in "init" method.
This changeset fixes LDAPFeedUserDeletionTC.test_a_filter_inactivate() failure
(unittest_ldapsource.py) introduces in previous changeset.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 04 Apr 2017 16:28:50 +0200] rev 12142
[server] Make "sources_by_uri" and "sources_by_eid" properties of repository
I.e. do not populate these dict as repo initialization (bootstrap step) but
always use information from database. This is needed because when multiple
instances of the same application run, if one instance adds a CWSource the
other ones will not see it. In particular, when using a scheduler instance,
new CWSource will be added by the web instance and not seen by the scheduler
which is supposed to update them.
We thus define properties for sources_by_eid and sources_by_uri instead
attributes on repository instance. CWSource entities are thus retrieved from
database every time these properties are accessed. We factor out
initialization of the "source" instance (subclass of
cubicweb.server.source.AbstractSource) in a _sources() method. Note that this
method takes care of calling "init" method on the source as well as
"set_schema" (previously done in repo.set_schema(), which now only touches
system_source). Accordingly the "init_sources_from_database" method is dropped
along with "add_source"/"remove_source" methods.
In syncsources hook, we thus drop:
* SourceAddedOp operation which called repo.add_source() so that the
SourceAddedHook only cares about checking source configuration now;
* SourceRemovedOp and SourceRenamedOp operations for the same reason;
* SourceConfigUpdatedOp as updating the live config of source is
meaningless once we rely on them being retrieved from the database;
* SourceHostConfigUpdatedHook hook which is now useless without call to
SourceConfigUpdatedOp;
In 3.10 migration script, remove usage of sources_by_uri repo attribute which,
unless I'm missing something, appears useless (at least now).
In tests:
* unittest_datafeed: remove test_update_url method since we dropped respective
hook;
* unittest_ldapsource: LDAPFeedUserDeletionTC.test_a_filter_inactivate()
currently fails because it still relies on live config being updated, this
will be fixed in the next changeset once all "live source" logic will be
removed.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 21 Feb 2017 11:04:19 +0100] rev 12141
Add a "Contributing" section to README with patch submission guidelines
For the CubicWeb project and its dependencies, we now prefer patches
submission and review by email on a public mailing list. We are thus moving
away from the previous vcreview-based workflow taking place on the forge.
This change is motivated by the following points:
- the current reviewer assignment mechanism (pick a random reviewer, rely on
reviewer availability rather than on willingness to review, send related
patches to distinct people, etc.) is inefficient if not counter-productive;
- most of the times, discussion only happens between the patch submitter and a
reviewer with no easy way to increase the audience;
- cubicweb-vcreview has no concept of patch series;
- cubicweb-vcreview is not actively maintained anymore and its usability keeps
deteriorating.
We expect that email-based submission and review of patches will circumvent
these limitations. Anybody interested in the project is welcome to subscribed
to the mailing list and participate to the review process.
This patch documents the basic workflow of patches submissions by email.
David Douard <david.douard@logilab.fr> [Tue, 04 Apr 2017 11:41:23 +0200] rev 12140
[cwctl] do only clean static data dir content (closes #17069762)
deleting the directory itself is useless and may be a problem in automated
deployment environments (user may not have permissions to delete or create
that directory).
David Douard <david.douard@logilab.fr> [Mon, 03 Apr 2017 14:43:44 +0200] rev 12139
[cwctl] add a no-config-update option to the upgrade command (closes #17069607)
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 07 Apr 2017 14:31:41 +0200] rev 12138
[cwconfig] Add "pyramid" config type to MCOMPAT dict
I don't know what this is for exactly, but the accept_mode method below
queries this dict with the configuration type name. And if the latter is
"pyramid", it crashes since there's no key in MCOMPAT dict. So add one with
the same value as "all-in-one". This code is called during "upgrade"
migration in particular.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 07 Apr 2017 15:23:38 +0200] rev 12137
[pyramid] Avoid shutting down the repository at exit if it's already shutting down
For install `cubicweb-ctl pyramid` command will explicitly call
`repo.shutdown()` so the atexit hook is redundant. Prevent the latter to be
executed when the repository is already shutting down (otherwise one gets an
assertion error).
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 05 Apr 2017 14:42:30 +0200] rev 12136
[server/test] Extract a "ldapsource" function in unittest_ldapsource.py
We will add more use of this pattern in forthcoming changesets,
so avoid repetition.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 04 Apr 2017 16:07:52 +0200] rev 12135
[server] Move "system" source initialization into its own method
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 05 Apr 2017 13:28:33 +0200] rev 12134
[entities] Make CWSource's dictconfig method clearer
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 05 Apr 2017 08:37:22 +0200] rev 12133
[entities] Move CWSource update_config method as a function in 3.15 migration script
This script is the only caller of this method. In the code of the function,
drop "skip_unknown" argument and continue accordingly upon OptionError.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 05 Apr 2017 10:34:04 +0200] rev 12132
[server/test] Turn "pull" method of LDAPFeedTestBase into a staticmethod
Because it does not use reference to "self" (which should be "cls" for
classmethod).
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 04 Apr 2017 18:47:13 +0200] rev 12131
[py3] Use six.text_type instead of unicode in _CWSourceCfgMixIn.update_config()
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 04 Apr 2017 16:06:44 +0200] rev 12130
[server] Drop condition on "3.10" migration in repo.init_sources_from_database()
We'll duplicate the code of this method in forthcoming changeset so clean it
up a bit of old stuff.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 30 Mar 2017 16:18:12 +0200] rev 12129
[pkg] Version 3.25.0rc2
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Mar 2017 11:59:37 +0200] rev 12128
[doc] More release note about session data handling
mentionning deprecation of _cw.data and removal of get/set_shared_data.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Mar 2017 11:59:01 +0200] rev 12127
[session] Drop long deprecated [get/set]_shared_data methods
they are deprecated since 3.19 and access to the .data attribute itself
deprecated in 3.25, so it's time to drop them.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Mar 2017 11:58:02 +0200] rev 12126
[session] Drop the user session synchronization machinery
which should not be necessary anymore since groups and properties are fetched
for each request (cache lives in transaction_data).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Mar 2017 11:56:09 +0200] rev 12125
[session] Avoid deprecation warning on access to Connection.data
this attribute has been deprecated during the session related rework, remove
warning by explicitly storing data in .transaction_data since session data is
not anymore reachable through Connection object.
This will allows simplification of session synchronization hooks in a later
cset.
Also since we do not rely anymore on session data here, we may at some point
rewrite those properties to rely on the ORM instead of such custom caching.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Mar 2017 10:43:49 +0200] rev 12124
[doc] Add release note about change in uicfg
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Mar 2017 10:37:55 +0200] rev 12123
merge 3.25 heads
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Mar 2017 14:56:04 +0200] rev 12122
[hg] Add generated slapd.conf to hgignore
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Mar 2017 11:17:37 +0200] rev 12121
Fix flake8 errors in unittest_cwctl
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Mar 2017 11:14:53 +0200] rev 12120
[cwctl] Drop 'cubicweb_' prefix when displaying cubes with 'cubicweb-ctl list'
consistently with newcube / create commands. This is an alternate implementation
to backed out changeset fe995d56c949.
Closes #17054738
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 28 Mar 2017 17:12:47 +0200] rev 12119
Fix flake8 errors in unittest_cwconfig
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Mar 2017 10:34:39 +0200] rev 12118
[config] Test loading of ccplugin modules
to ensure ccplugin modules of cube as package aren't loaded twice, once as
`cubicweb_<cube>.ccplugin`, once as `cubes.<cube>.ccplugin`. This test used to
fail until fe995d56c949 has been backout.
It requires calling `cleanup_sys_module` in `CubicWebConfigurationTC.tearDown`
to remove any cube's submodule loaded during tests, so content of `sys.modules`
may be tested.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Mar 2017 10:34:16 +0200] rev 12117
[test] Extract out method-which-is-not-a-method mocking iter_entry_points
to ease reuse and improve readability.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Mar 2017 10:32:24 +0200] rev 12116
[cwconfig] Add a docstring on available_cubes method
a renaming could be better at some point, but that's a start.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 28 Mar 2017 15:03:15 +0200] rev 12115
Backed out changeset fe995d56c949
available_cubes should not strip cubicweb_prefix but return actual package name
for cube as package, since its output is also used to e.g. get ccplugin or
site_cubicweb module name.
Original aim of this set was to fix output of the "cubicweb-ctl list" command.
This will be done by an alternate implementation in a later cset.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 13:29:41 +0200] rev 12114
[hooks] Drop "logstats" hook
It is now useless as its looping task would not run on a web instance because
respective repository has no scheduler.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 11:46:17 +0200] rev 12113
[hooks] Do not register "logstats" if repository has no scheduler
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 11:45:19 +0200] rev 12112
[server] Introduce an `has_scheduler` method on Repository
This is to be used by client application to determine if looping tasks may be
registered in the current process. By checking this, one will avoid the
warning in looping_task method when the repository has no scheduler.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 11:37:31 +0200] rev 12111
[server] Warn instead of failing when a looping task is registered and repo has no scheduler
We should provide a way for client code to detect if they should register the
looping task or not. See next patch for that.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 11:31:02 +0200] rev 12110
[server] Exit quickly when a looping task is registered in maintenance mode
In such cases the repository will not have a scheduler on purpose because the
repository will not be kept running and will quickly shutdown after migration
so that it's undesirable to have looping tasks being executed.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 24 Mar 2017 14:56:48 +0100] rev 12109
[config] Drop unused init_available_cubes method
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 28 Mar 2017 11:26:48 +0200] rev 12108
[doc] Move content of former README.pyramid into relevant modules
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Mar 2017 16:57:05 +0100] rev 12107
Drop README.pyramid.rst file
It has been kept since 3.24 when we merged pyramid-cubicweb and
cubicweb-pyramid repositories into cubicweb's one waiting for someone to move
the information in some canonical place but this never happened and this
information is probably not so useful or already existing elsewhere. So just
drop the file.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Mar 2017 17:22:02 +0100] rev 12106
Make entypo link a true URL in README
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Mar 2017 17:21:37 +0100] rev 12105
Refer to cubicweb.readthedocs.io in README
docs.cubicweb.org contains outdated documentation at the moment (and for quite
some time); until it gets update, refer to the up-to-date documentation on
readthedocs.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Mon, 27 Mar 2017 17:57:27 +0200] rev 12104
[server] don't catch exception from postcommit_event() if we are in test mode
The historic behavior is to hide potential exception occurring in
postcommit_event(). Unfortunately logging statements are hidden by default
during tests and it become very hard to debug. At least raise if we are in test
mode.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Mar 2017 14:18:17 +0100] rev 12103
[pkg] Version 3.25.0rc1
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 14:36:05 +0100] rev 12102
[tox] Simplify command line to build the doc
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Mar 2017 09:37:51 +0100] rev 12101
[pyramid] Drop warning about pyramid_debugtoolbar not found in debug mode
Some people way want to run a pyramid server in debug mode without the
toolbar. This warning is annoying for them. Others should just install and
*include* the toolbar by hand.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Mar 2017 11:21:39 +0100] rev 12100
[pkg] Add development.ini.tmpl to "cubicweb.pyramid" package data
Otherwise the file is not installed and `cubicweb-ctl create -c pyramid` does
not work.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Mar 2017 10:30:48 +0100] rev 12099
[skeleton] Don't use system site packages in tox environment
As we changed this in cubicweb, there is a consensus that this
is not the best practice so let us change it as well for
skeleton.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 14:38:10 +0100] rev 12098
[doc] Update "settings" pyramid documentation
Document that without "bwcompat" we can use a development.ini file directly
and add a dedicated section to list configuration options.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 14:37:04 +0100] rev 12097
[doc] Update the "quickstart" page of pyramid documentation
Again mentioning the two modes of operations and dropping references to prior
implementation.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 14:34:51 +0100] rev 12096
[doc] Rewrite "pyramid" index page in the book
We drop references to pyramid-cubicweb and cubicweb-pyramid, remaining of the
merge in 3.24. We now mention the two possible operation modes
(with bwcompat being true or false).
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 15:05:04 +0100] rev 12095
[doc] Drop documentation for cubicweb.pyramid.tools module
Which, as documented, mostly consists of internals.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 14:49:04 +0100] rev 12094
[doc] Drop reference to "make_cubicweb_application" in pyramid doc
This function got renamed into config_from_cwconfig and this is arguably an
internal detail so should not appear in the API documentation.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 14:06:03 +0100] rev 12093
[doc] Remove trailing whitespaces in doc/book/pyramid/index.rst
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 15:43:20 +0100] rev 12092
[tox] Install "pyramid" dependencies in "doc" environment
Otherwise most of the cubicweb.pyramid API doc fails to build. For this we
skip installation in the "doc" environment and source the new
requirements/doc.txt which will install cubicweb[pyramid], thus pulling
cubicweb plus pyramid's dependencies.
Furthermore this requirements/doc.txt would be useful to build to
documentation on readthedocs.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 07 Mar 2017 13:13:23 +0100] rev 12091
[web/views] fix bad html in deleteconf with show_composite=True
On an entity with no composite an additional item "None" was displayed.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 23 Mar 2017 12:09:59 +0100] rev 12090
[web/views] display unique composite entities in deleteconf
When the entity has two relations to the same composite, display it only once.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Mar 2017 11:47:59 +0100] rev 12089
Really make rqlrewrite flake8 compliant
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 22 Mar 2017 14:18:54 +0100] rev 12088
[pyramid] disable bwcompat by default in PyramidCWTest
To avoid cubicweb exceptions handling.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 17 Mar 2017 10:15:16 +0100] rev 12087
Fix flake8 errors in rqlrewrite.py
Arthur Lutz <arthur.lutz@logilab.fr> [Wed, 01 Mar 2017 18:07:49 +0100] rev 12086
[rqlrewrite/schema] Avoid parsing computed relations for each query
The RQLRelationRewriter is instanciated for each RQL query, it should
avoid parsing computed relations formula by using a cache, which seems rightly
located on the instance's schema.
This brings a *huge* performance boost to some pages on application with a few
computed relations (x4 observed on a client app).
Kudos to Adrien, David and Sylvain.
Closes #17059828
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 22 Mar 2017 17:14:18 +0100] rev 12085
[pkg] Restrict yams version to be less than 0.45.0
This is a backport of 10d3bf220be2 on 3.23 branch
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Mar 2017 13:58:28 +0100] rev 12084
[pyramid] Remove pyramid_debugtoolbar from "pyramid.includes"
Most of the times, the package is not installed (not pulled by
cubicweb[pyramid] nor pyramid itself) in a fresh environment so that first
start of a new instance will fail.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 22 Mar 2017 09:44:53 +0100] rev 12083
[doc] Add some details about rtag derivation and server api cleanup in release notes
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 22 Mar 2017 09:41:19 +0100] rev 12082
[doc] Simplify release notes section
Those are all about backward incompatibilities, keep only one section about that.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 11:35:58 +0100] rev 12081
[doc] Fill release notes for 3.25
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 12:13:04 +0100] rev 12080
[devtools] Create "newcube" in current directory by default
Instead of using "cubes path", which in many cases will be something wrong
(like <prefix>/share/cubicweb/cubes) now that cubes are regular Python
packages.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 14:39:22 +0100] rev 12079
[pyramid] Do not register repository.shutdown atexit in test mode
It seems that there already is a special shutdown step for repository in test
mode and pyramid's atexit handler interferes with it leading to assertion
error about 'shutting_down' attribute being True in Repository.shutdown().
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 21 Mar 2017 14:17:26 +0100] rev 12078
[cwconfig] don't rely on _CubeImporter while loading cubes
_CubeImporter can load cube subpackages twice (there is a test for submodules
in cubicweb.test.unittest_cubes.test_no_double_import() but not with a
subpackage).
Since _CubeImporter is for backward compatibility and is supposed to be
deprecated as soon as possible, don't rely on it when loading cube schema or
appobjects and always load the real modname (eg. cubicweb_<cube> if exists else
cubes.<cube>).
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 17:38:43 +0100] rev 12077
Added tag 3.24.7, debian/3.24.7-1, centos/3.24.7-1 for changeset 58f1e8545a77
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 17:04:10 +0100] rev 12076
[pkg] Version 3.24.7
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 16:51:41 +0100] rev 12075
[pkg] Restrict yams version to be less than 0.45.0
Because of reader's API changes x and other subtle but hard to debug changes
in appobjects registration in version 0.45.0.
Closes #17065626.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 17 Mar 2017 16:29:38 +0100] rev 12074
[pkg] Version 3.25.0rc0
Let's make a release candidate version of CubicWeb 3.25.0 (only for the Python
package), in the hope that some issues that we usually discover after release
will be sorted out before.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 11:16:11 +0100] rev 12073
[pyramid] Rename paste app factory to pyramid_main
Making it clearer that this would build a Pyramid application, just in case we
eventually provide other means to create a WSGI application than Pyramid.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 09:08:44 +0100] rev 12072
[tox] Do not use site packages in testenv
This is the normal way of running tox. We used to set this because
some people liked to run tests using packages installed by other
means (i.e. system-wide). Now, there seems to be a consensus that
running tox without site packages is a better idea, in particular
since many of our dependencies are now available as wheels and thus
would install quickly provided one uses a recent pip/virtualenv.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 10:25:04 +0100] rev 12071
[test] Add user-site to PYTHONPATH before installation of new cube in test_newcube_install
Otherwise, setuptools complains that the target installation directory (i.e.
"user site" is not in PYTHONPATH). This is probably because we use a fake HOME
with --user install option. Failure shows up when running tests through tox
without system site packages (see next patch).
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 17 Mar 2017 17:32:04 +0100] rev 12070
[pkg] Depends on yams >= 0.45.0
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 17 Mar 2017 17:31:10 +0100] rev 12069
[pkg] Depends on logilab-common >= 1.4.0
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 10:28:01 +0100] rev 12068
Merge with 3.24 branch
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 09:40:24 +0100] rev 12067
Added tag 3.24.6, debian/3.24.6-1, centos/3.24.6-1 for changeset 4029fb83a67d
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 08:58:25 +0100] rev 12066
[pkg] Version 3.24.6
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 08:57:17 +0100] rev 12065
Merge public heads
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 15 Mar 2017 12:01:14 +0100] rev 12064
[web/views] deleteconf: ignore workflow when displaying composite entities
This hide TrInfo composite entities when deleting an workflowable entity.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Mar 2017 14:06:27 +0100] rev 12063
[rset] Use RQL cache in syntax_tree method
This avoid several unnecessary parsings per HTTP request, since in most case
rset's rql is in the rql cache (since it has just been executed), while yapps
based parsing is known to be slow.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 17 Mar 2017 07:32:48 +0100] rev 12062
[repo] Introduce a clear_caches method on the Querier class
that is called from repository's clear_caches.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:30:27 +0100] rev 12061
[repo] Consistent API for cache clearing
clear_caches, reset_caches, clear_eid_caches are now all named 'clear_caches'
with optional eids/etypes arguments to clear eid specific cache entry,
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Mar 2017 13:09:11 +0100] rev 12060
[repo] Extract rql cache handling to a dedicated class
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 16 Mar 2017 17:25:07 +0100] rev 12059
[sobjects] Fix a trivial flake8 error
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:27:45 +0100] rev 12058
[repo] Drop cache clearing methods from the source interface
Those are actually system source specific.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:04:58 +0100] rev 12057
[repo] Move and rename repo._clear_planning_cache
to make it clearer it's clearing the @cache of source_defs method.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 10:10:44 +0100] rev 12056
[sobjects] Fix flake8 errors in services.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:39:51 +0100] rev 12055
[test] Rename BaseQuerierTC._access to BaseQuerierTC.admin_access
so it's consistent with CubicWebTC and avoid access to a protected attribute
which has been exposed by the removal of the 'session' property a few csets
earlier.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 09:15:32 +0100] rev 12054
[repo] Fix flake8 error
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 09 Mar 2017 16:36:33 +0100] rev 12053
[pyramid] Add a "pyramid" instance configuration type
In a new module 'cubicweb.pyramid.config' we define a "pyramid" instance
configuration type. The noticeable feature of this configuration is that it
manages a 'development.ini' file that gets installed in application home
(along with `.conf` file). This file is templated and includes generated
values for secrets of session and authtk tokens.
This means that we can just call:
pserve etc/cubicweb.d/<appname>/development.ini
or
gunicorn --paste etc/cubicweb.d/<appname>/development.ini -b :8080
just after instance creation to get a pyramid instance running without having
to hack around a 'pyramid.ini' file.
This patch drops 'development.ini' from skeleton and moves it in
cubicweb/pyramid so that it gets installed at instance creation which is more
appropriate than in cube creation.
The new configuration class sets "cubicweb.bwcompat" setting to false so it is
not intended to replace the "all-in-one" configuration type (which would
require a bit more work). This configuration is close to the the 'repository'
configuration type with just a couple of options from WebConfiguration that
are needed for Pyramid (anonymous user/password plus some miscellaneous
options that I'm not so sure are really needed). Note, in particular, that we
do not pull CORS settings to be injected as a WSGI middleware like in
wsgi_application_from_cwconfig() since I believe this should be left as an
end-user responsibility and since this can be defined in a standard way in
paste configuration. This configuration inherits from ServerConfiguration but
registers the same appobjects as WebConfiguration.
In cubicweb.web.request._CubicWebRequestBase, we guard against access to
"uiprops" and "datadir_url" of the config because this new "pyramid" config
does not have these (this does not make sense without bwcompat mode). At some
point, we should either avoid using `cw_request`'s pyramid request attribute
or make cubicweb's web request really independant of existing implementation
and drop these assumptions.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 10 Mar 2017 12:02:41 +0100] rev 12052
[pyramid] Call repository's shutdown method atexit
This way when run through a WSGI server (pserve, gunicorn, etc.) we make sure
that the repository is properly shut down. In particular, this would wait for
threads to terminate (otherwise, they'll be killed).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Mar 2017 11:13:03 +0100] rev 12051
[querier] Turn repo.querier_cache_key into a private function
of the querier module, only place where it's used.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 14 Mar 2017 10:34:03 +0100] rev 12050
[cleanup] Fix flake8 errors in web/application.py and associated test
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 14 Mar 2017 10:33:24 +0100] rev 12049
[test] Simplify CWTC's init_authentication and assertAuthSuccess
which shouldn't rely on removed .session attribute while it's not necessary and
could be written in a simpler way.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:26:05 +0100] rev 12048
[cleanup] Drop non sense sentence in docstring
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:23:29 +0100] rev 12047
[repo] Drop Session at last
This is not used at all anymore.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:21:22 +0100] rev 12046
Fix flake8 some errors
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:18:51 +0100] rev 12045
[test] Use existing reference to repo_source
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:04:25 +0100] rev 12044
[repo] Drop repo.new_session method
we should not go through Session to create Connection anymore.
This is unofficial API, no backward compat for now.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 14 Mar 2017 11:07:58 +0100] rev 12043
Stop using Session on the repository side
Only expect session on web request, and let the web session/authentication
managers provide them.
Access to cnx.data, which used to return session data, is deprecated: there is
no more access to session data from the repository side, and they should be
access from req.session.data from the web side.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:00:13 +0100] rev 12042
[test] Drop unnecessary call to new_session
This is not unittest, the above call is enough.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:58:25 +0100] rev 12041
[user] Drop ugly hack on CWUser entity class
which should be not necessary anymore, beside two remaining usage in our own
test suite.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:57:13 +0100] rev 12040
[test] Use user_session_cache_key function
to generate cache key.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:52:44 +0100] rev 12039
[session+test] Stop storing / accessing session when it's not necessary
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:46:06 +0100] rev 12038
[devtools] Stop relying on Session to create connection in RepoAccess
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:44:03 +0100] rev 12037
[devtools] Stop using repo.new_session
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:25:35 +0100] rev 12036
[session] Kill support for a 'session_open' hook event
To be consistent with dropping of the 'session_close' event, and also because
this is already not called when using pyramid.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:03:28 +0100] rev 12035
[devtools] Rename FakeSession into FakeConnection
because it is what it is.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:55:57 +0100] rev 12034
[cleanup] Drop references to the old internal_session method
dropped a while ago, no need to talk about it in a docstring nor to fake it.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:31:08 +0100] rev 12033
[session] Drop unused class
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:14:05 +0100] rev 12032
[cleanup] Drop no more used parse_repo_uri function
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:07:15 +0100] rev 12031
[server] Fix flake8 error of test/data/hooks.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:02:31 +0100] rev 12030
[repo] Drop repo.connect backward compat
use new_session instead (introduced in 3.19 iirc)
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:01:45 +0100] rev 12029
[session] Drop no more necessary Session.sessionid and Connection.connectionid
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:04:26 +0100] rev 12028
[repo] Kill repo._sessions
and with it the need to have a looping task to clean it up, and with that all
the session's timestamping machinery.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:24:40 +0100] rev 12027
[repo] Stop closing session
The only point in "closing" session is to call the `session_close` event. Since
I'm not aware of any application relying on it, I think this is too costly (in
term of code) to maintain and propose to drop it.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 12:07:29 +0100] rev 12026
[views] Stop giving stats / debug information relying on _sessions
This is already broken when using pyramid anyway.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:41:10 +0100] rev 12025
[session] Stop relying on _sessions to synchronize living session
by doing what we currently do in pyramid. Also, attempt to synchronize CWUser's
class sounds like a dark corner case handling that should be removed in favor of
short lived user objects (beside it shouldn't occur except during migration).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 12:01:31 +0100] rev 12024
[test] Drop useless access to repo._sessions
test still succeed afterwards.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 11:27:01 +0100] rev 12023
[repo] Fix flake8 errors in server/__init__.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 11:25:24 +0100] rev 12022
[repo] Drop no more used ShuttingDown exception
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 11:55:16 +0100] rev 12021
[repo] Drop _get_session method
it's not actually necessary but holds underlying _sessions dict handling.
Drop backward compat relying on it (which IMO should not be a problem).
Drop import of unused QueryError along the way.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 09 Mar 2017 18:02:16 +0100] rev 12020
[test] Drop call to CubicWebConfiguration.load_cwctl_plugins in unittest_cwctl.py
This is no longer need now that we call load_available_configurations() in the
"list" command (see 5e7282bdf140).