David Douard <david.douard@logilab.fr> [Thu, 26 Sep 2013 15:15:09 +0200] rev 9244
[pkg] prepare 3.17.7
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 23 Sep 2013 15:12:52 +0200] rev 9243
i18n update
David Douard <david.douard@logilab.fr> [Thu, 26 Sep 2013 15:18:59 +0200] rev 9242
fix typos in workflow constraint error messages
Aurelien Campeas <aurelien.campeas@logilab.fr> [Tue, 17 Sep 2013 17:44:15 +0200] rev 9241
[migractions] rschema.final.inlined -> rschema.inlined
Closes #3153086.
Julien Cristau <julien.cristau@logilab.fr> [Thu, 26 Sep 2013 11:53:13 +0200] rev 9240
[server] Make internal sessions not reset 'safe'-ness on first commit
Increment the ctx_count when disabling integrity hooks so the next
commit/rollback doesn't reset our transaction and magically turn us into
a safe session.
Closes #3168027
Rémi Cardona <remi.cardona@logilab.fr> [Mon, 23 Sep 2013 11:13:28 +0200] rev 9239
[facets] Correctly replace old 'edit box' HTML on facet-induced page refresh (closes #3161100)
Julien Cristau <julien.cristau@logilab.fr> [Mon, 23 Sep 2013 15:03:03 +0200] rev 9238
[debian] replace find | xargs rm with find -delete in cube skeleton. Closes #3161797
Julien Cristau <julien.cristau@logilab.fr> [Mon, 23 Sep 2013 15:02:45 +0200] rev 9237
[debian] don't require (fake)root to run the clean target. Closes #3161797
It works just fine as a normal user.
Julien Cristau <julien.cristau@logilab.fr> [Mon, 23 Sep 2013 15:01:59 +0200] rev 9236
[debian] Add ${misc:Depends} to cube packaging skeleton. Closes #3161797
Best current practice is to have that in Depends in all packages using
debhelper.
Julien Cristau <julien.cristau@logilab.fr> [Fri, 06 Sep 2013 11:01:20 +0200] rev 9235
[devtools] fix race when creating backupdir
If somebody else creates backupdir between our stat() and mkdir() (like,
say, another test running in parallel), we shouldn't crash.
Julien Cristau <julien.cristau@logilab.fr> [Thu, 19 Sep 2013 18:11:12 +0200] rev 9234
[staticcontrollers] Raise Forbidden, not Unauthorized
Unauthorized means "log in to get access", as it results in a HTTP 401.
Here, the error is pretty much permanent, and returning 401 instead of
403 confuses things terribly.
(This seems to be a pretty widespread confusion :/)
David Douard <david.douard@logilab.fr> [Thu, 19 Sep 2013 18:03:09 +0200] rev 9233
[web] allow /data/ url again (closes #2464798)
This feature was broken by 65fecbeb9c3a (which fixed another one itself).
Julien Cristau <julien.cristau@logilab.fr> [Mon, 16 Sep 2013 10:59:59 +0200] rev 9232
[utils] fix typos in make_uid docstring
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 28 Aug 2013 17:15:12 +0200] rev 9231
[c-c i18ncubicweb] fix crash, closes #3096647
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 30 Aug 2013 09:57:38 +0200] rev 9230
[rql2sql] fix bad sql generated when outer joining 'identity' relation and lhs var comes from a subquery. Closes #3099418
The generated SQL was attempting to access table.cw_eid which doesn't exist.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 29 Aug 2013 16:21:52 +0200] rev 9229
[web] stop using deprecated StatusResponse. Closes #3098215
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 29 Aug 2013 16:20:33 +0200] rev 9228
[deprecation] add (approximate) version number to deprecation message and set proper stacklevel
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 29 Aug 2013 12:55:27 +0200] rev 9227
[schema] fix spurious warning when rqlexpr/constraint mainvars specify a non predefined variable. Closes #3098165
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 23 Sep 2013 12:47:12 +0200] rev 9226
[repository] properly use IUserFriendlyError when UniqueTogetherError is raised during entity update. Closes #3096638
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 28 Aug 2013 12:08:31 +0200] rev 9225
[deprecation] add cw version number to the deprecation message and help user to understand the change
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 28 Aug 2013 11:56:07 +0200] rev 9224
[datafeed] fix crash due to bad http_timeout handling. Closes #3096585
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 28 Aug 2013 11:36:44 +0200] rev 9223
[date picker widgets] properly distinguish DOM id and input name. Closes #3096575
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 28 Aug 2013 11:29:58 +0200] rev 9222
[date picker widgets] use bare jquery expression rather than jqNode
Julien Cristau <julien.cristau@logilab.fr> [Wed, 12 Jun 2013 12:28:01 +0200] rev 9221
Use return in CnxSetTracker context manager methods
Just in case.
Julien Cristau <julien.cristau@logilab.fr> [Mon, 15 Jul 2013 11:45:37 +0200] rev 9220
[web/views] make PrimaryView.entity_call accept kwargs
It's useful when using this view in a different context to have it not
crash on random arguments.
Aurelien Campeas <aurelien.campeas@logilab.fr> [Mon, 02 Sep 2013 12:47:12 +0200] rev 9219
[ldapparser] demote some logs from warning to debug (closes #2713671)
David Douard <david.douard@logilab.fr> [Fri, 09 Aug 2013 10:00:40 +0200] rev 9218
[doc] add a what's new file for 3.18
David Douard <david.douard@logilab.fr> [Wed, 07 Aug 2013 09:02:47 +0200] rev 9217
merge stable in default (3.18) branch
David Douard <david.douard@logilab.fr> [Tue, 06 Aug 2013 16:53:53 +0200] rev 9216
Added tag cubicweb-centos-version-3.17.6-1, cubicweb-version-3.17.6, cubicweb-debian-version-3.17.6-1 for changeset 5b9fedf67a29
David Douard <david.douard@logilab.fr> [Tue, 06 Aug 2013 11:49:33 +0200] rev 9215
[pkg] prepare 3.17.6
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 06 Aug 2013 11:20:07 +0200] rev 9214
Do not use cubicweb-card in rest_path tests
Card overrides the rest_path method, so it does not make sense to use it in cw
tests.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 01 Aug 2013 13:55:11 +0200] rev 9213
[inlined form field] fix regression introduced in 3.16.4/570208f74a84. Closes #3064653
In the above changeset, we changed ordered entities to be edited according to
mandatory inlined constraints, though this leads to unpredictable order in
cases where there are no constraint. This leads to case where inlined relation
field may think there is no value related to a mandatory relation, while this
is simply because there is a value specified but to an entity that will be
created later (together with the relation).
To fix this, we've to use the fact that the RelationField.process_form_value
return None in cases where there is some entity to be created, while an empty
set when there are no linked entity. The new no_value() method allows to
differentiate between those different notion of 'no-value'.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 01 Aug 2013 10:59:52 +0200] rev 9212
[testlib] temporary_appobjects should call __registered__ if it exists. Closes #3064075
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 01 Aug 2013 15:51:22 +0200] rev 9211
[entities] properly escape in EmailAddress.printable_value when format is html. Closes #3064025
David Douard <david.douard@logilab.fr> [Wed, 31 Jul 2013 21:59:13 +0200] rev 9210
Added tag cubicweb-version-3.17.5, cubicweb-debian-version-3.17.5-1, cubicweb-centos-version-3.17.5-1 for changeset 15dd5b37998b
David Douard <david.douard@logilab.fr> [Wed, 31 Jul 2013 16:58:44 +0200] rev 9209
[pkg] prepare 3.17.5
David Douard <david.douard@logilab.fr> [Wed, 31 Jul 2013 14:48:34 +0200] rev 9208
[pkg] fix debian packaging (closes #3058542)
- remove useless Python 2.4 reference,
- simplify dh_install configuration to install files consistently instead of
having half in /usr/lib/pythonXX and half in /usr/share/pyshared,
- incidentally, this makes the package work on squeeze.
Regression from eaa58d1c7d5f
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 31 Jul 2013 16:04:10 +0200] rev 9207
[testing] add missing generate_bigint method to ValueGenerator. Closes #3059327
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 31 Jul 2013 13:56:00 +0200] rev 9206
[rql / querier] fix bad interpretation of some RQL SET query
when some neged relation is involved. Closes #3058527.
David Douard <david.douard@logilab.fr> [Tue, 30 Jul 2013 20:31:57 +0200] rev 9205
merge stable in default (3.18) branch
David Douard <david.douard@logilab.fr> [Tue, 30 Jul 2013 20:12:20 +0200] rev 9204
Added tag cubicweb-version-3.17.4, cubicweb-debian-version-3.17.4-1, cubicweb-centos-version-3.17.4-1 for changeset c7ba8e5d2e45
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 30 Jul 2013 17:09:02 +0200] rev 9203
[i18n] cleanup dead code
also fix small bug introduced in b0f6e8c14e7f
David Douard <david.douard@logilab.fr> [Tue, 30 Jul 2013 16:48:57 +0200] rev 9202
[i18n test] hack to make i18n tests run using a Python interpreter
they used to work fine when executed via pytest only.
This should be removed as soon as logilab.common.registry is fixed.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 30 Jul 2013 10:06:06 +0200] rev 9201
[i18ncube] fix crash due to duplicated messages in generated schema.pot
Add a test case and fix regression introduced in e713c47a993d.
Relates to #2811282
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 30 Jul 2013 10:05:58 +0200] rev 9200
[i18n test] load_po: fix bug in case of multi-lines msgid and ensure there are no duplicated messages
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 30 Jul 2013 08:23:17 +0200] rev 9199
[i18n test] simplify test cube a bit by only providing a views module, no package
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 29 Jul 2013 16:01:18 +0200] rev 9198
[web] consider inlined relations in has_editable_relation. Closes #3049970
In some cases where the user can only add/edit inlined relations (though
actually edit perms of the inlined relation doesn't seem checked), the "modify"
action doesn't appear while it should.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 29 Jul 2013 16:00:40 +0200] rev 9197
[web test] silent 3.13 warning
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 26 Jul 2013 13:47:52 +0200] rev 9196
[editcontrollers] Account for role in the ordering of entities (Complements #3031719)
Only role='object' was correctly accounted for by 570208f74a84
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 25 Jul 2013 18:14:56 +0200] rev 9195
[migration.sync_schema_props_perms] ensure all participants to a unique together constraint are there
before adding CWUniqueConstraint. Closes #3038345
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 25 Jul 2013 18:12:28 +0200] rev 9194
[session commit] save back exception context to avoid potentiel cluttering if some revert operation raise an exception
David Douard <david.douard@logilab.fr> [Mon, 29 Jul 2013 14:22:40 +0200] rev 9193
[pkg] python-central has been removed from Debian
David Douard <david.douard@logilab.fr> [Fri, 26 Jul 2013 09:46:30 +0200] rev 9192
[pkg] prepare 3.17.4
David Douard <david.douard@logilab.fr> [Fri, 26 Jul 2013 09:49:53 +0200] rev 9191
[pkg] merge centos 3.17.1-2 in stable (prepare 3.17.4)
David Douard <david.douard@logilab.fr> [Fri, 26 Jul 2013 09:47:22 +0200] rev 9190
Added tag cubicweb-centos-version-3.17.1-2 for changeset 965f894b63cb
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 25 Jul 2013 09:07:25 +0200] rev 9189
[rqlrewrite] fix rqlrewrite unpredictability vs relation sharing. Closes #3036144
The relations index used to determine if relation may be shared only
considered a single relation node per relation type. So when the same
relation type occurs several time, dict order give unpredictable result.
We shall properly consider all relations instead.
Tentative test case included (but bug reproduction is by definition
unpredictable...)
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 24 Jul 2013 16:55:24 +0200] rev 9188
[rqlrewrite] rewrite doesn't need a solutions argument, always use the Select'ones
Also, do a copy systematically else it may lead to empty solutions depending on
the rewrite path.
Test case tentative included in the following changeset.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 24 Jul 2013 16:49:40 +0200] rev 9187
[rql rewrite] equivalent but much simpler flow
Rémi Cardona <remi.cardona@logilab.fr> [Thu, 25 Jul 2013 10:42:33 +0200] rev 9186
[pkg] Prepare a new RPM release
Rémi Cardona <remi.cardona@logilab.fr> [Thu, 25 Jul 2013 10:25:49 +0200] rev 9185
[pkg] Add log directory to rpm
David Douard <david.douard@logilab.fr> [Thu, 25 Jul 2013 08:52:15 +0200] rev 9184
[repo] normalize ValidationError on edited entity (closes #2509729)
In CubicWeb, ValidationError.entity MUST be the eid of the involved entity,
not the entity iteself (as done by yams).
David Douard <david.douard@logilab.fr> [Wed, 24 Jul 2013 13:59:08 +0200] rev 9183
[doc] one must now manipulate the req.session.data dict (closes #2842345)
instead of deprecated get/set/del_session_data methods.
David Douard <david.douard@logilab.fr> [Wed, 24 Jul 2013 08:20:22 +0200] rev 9182
[datafeed] add a timeout config option (closes #2745677)
So a HTTP GET do not hang forever in the datafeed looping task.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 24 Jul 2013 11:54:35 +0200] rev 9181
[dataimport] ucsvreader should skip empty lines unless specified otherwise. Closes #3035944
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 22 Jul 2013 12:08:37 +0200] rev 9180
[querier] Add timings to debug prints (DBG_RQL)
this may ease to spot some problematic queries
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 24 Jul 2013 08:43:16 +0200] rev 9179
[editcontrollers] Ensure entities are created in an order satisfying schema constraints. Closes #3031719
changes below are also necessary to make the whole thing works:
* stop considering InlinedFormFile as eidparam field since they don't
hold any value
* rework 'pendingfields' handling to have separate processing of inlined fields
whose subject entity is created during the edition
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 22 Jul 2013 12:07:46 +0200] rev 9178
[editcontroller] extract RQLQuery.set_attribute/set_inlined methods from handle_field/handle_inlined_relation
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 22 Jul 2013 11:38:48 +0200] rev 9177
[editcontroller] req=self._cw makes things easier to read
David Douard <david.douard@logilab.fr> [Mon, 22 Jul 2013 15:38:11 +0200] rev 9176
[facets,js] fix bogus checkbox icon appearing after the first interaction (closes #2790332)
This is because of the hardcoding of the data/ url.
Julien Cristau <julien.cristau@logilab.fr> [Mon, 22 Jul 2013 14:57:37 +0200] rev 9175
fix typos in docstring, doc and comments
Julien Cristau <julien.cristau@logilab.fr> [Wed, 17 Jul 2013 15:02:28 +0200] rev 9174
[debian] remove workaround for broken sphinx/jquery combination
sphinx in squeeze was updated:
http://packages.qa.debian.org/s/sphinx/news/20130112T154737Z.html
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 18 Jul 2013 22:18:50 +0200] rev 9173
[schema] mark CWDataImport as an internal type. Closes #3025536
Paul Tonelli <paul.tonelli@logilab.fr> [Fri, 19 Jul 2013 15:52:06 +0200] rev 9172
[pkg] remove deprecated dependency on pysqlite2
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 18 Jul 2013 12:36:56 +0200] rev 9171
Fix two crashes in db-check (closes #3024964)
Also improves various debugging messages.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 22 Jul 2013 11:09:28 +0200] rev 9170
[rql rewrite] may_be_shared_with should consider relation's scope (closes #3024730)
When a relation's scope is not the current statement, it must not be shared
(instead of comparing the statement).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 18 Jul 2013 10:19:06 +0200] rev 9169
[rql rewrite] fix may_be_shared_with method so that it actually considers all variable infos and not only the first one
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 22 Jul 2013 14:26:33 +0200] rev 9168
[schema/security] add __hash__ to rql expression. Closes #3013535
This is required so that when some rql expression participate to a dictionary
key, only the expression is considered (consistent with comparison). This
behaviour is expected in security at least, see the related bug for instance.
This scramble msplanner unit tests a bit.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 15 Jul 2013 10:59:34 +0200] rev 9167
[rql rewrite] move some code from querier to rqlrewrite where it makes more sense.
Also, make some minor cleanup/refactoring on the way and try to enhance
docstrings.
Relates to #3013535
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 12 Jul 2013 10:39:01 +0200] rev 9166
Do not compute actions list in TableLayout view when display_actions attribute is unset
Closes #3007281
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 12 Jul 2013 09:55:26 +0200] rev 9165
Use the list of cubes from the filesystem when reading the schema from the filesystem
Closes #3007259
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 22 Jul 2013 10:55:45 +0200] rev 9164
[migration] when adding a cube, skip infered relations (closes #3005576)
Skipped infered relations are recalculated later.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 11 Jul 2013 17:40:28 +0200] rev 9163
[3.17 migration] when some cube is missing, add_cube raise ConfigurationError, not ImportError. Closes #2981477
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 11 Jul 2013 10:20:42 +0200] rev 9162
[migraction] rename_entity_type simply warn if old entity type isn't in the schema. Closes #3004069
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 11 Jul 2013 10:15:25 +0200] rev 9161
[deprecation] fix uihelper deprecation warning, use the rtag name, not the class, so it may be copy/pasted
Aurelien Campeas <aurelien.campeas@logilab.fr> [Thu, 11 Jul 2013 18:43:29 +0200] rev 9160
[test] makes fti test order-agnostic (closes #3005633)
Julien Cristau <julien.cristau@logilab.fr> [Thu, 11 Jul 2013 17:16:49 +0200] rev 9159
[web/views/staticcontrollers] Make ConcatFilesHandler write to a tempfile
In order to be more resistant to errors such as ENOSPC, and against different
threads accessing the same static data, we:
- concatenate data files to a temporary file, and rename it once we're done
- delete the tempfile in case of errors
- protect the creation of the cache_concat file with a lock
Closes #3005547
David Douard <david.douard@logilab.fr> [Fri, 12 Jul 2013 18:03:11 +0200] rev 9158
[test] make unittest_schema.py compatible with cubicweb-file 0.14
David Douard <david.douard@logilab.fr> [Mon, 22 Jul 2013 09:47:56 +0200] rev 9157
merge 3.16.6 branch in 3.17
Florent Cayre <florent.cayre@logilab.fr> [Mon, 15 Jul 2013 17:34:54 +0200] rev 9156
Added tag cubicweb-centos-version-3.16.6-1, cubicweb-debian-version-3.16.6-1, cubicweb-version-3.16.6 for changeset b4ccaf13081d
Florent Cayre <florent.cayre@logilab.fr> [Sat, 13 Jul 2013 05:10:55 +0200] rev 9155
Prepare 3.16.6
David Douard <david.douard@logilab.fr> [Mon, 15 Jul 2013 16:55:13 +0200] rev 9154
[devctl] properly generate i18n messsages for cubes that uses uicfg instances (closes #2811282)
David Douard <david.douard@logilab.fr> [Mon, 15 Jul 2013 16:55:03 +0200] rev 9153
[test/devctl] add a test case for i18ncube command
Florent Cayre <florent.cayre@logilab.fr> [Mon, 15 Jul 2013 10:40:49 +0200] rev 9152
Protect against crash in the `relation_possible` predicate with ambiguous relations.
It was still possible to get a KeyError when using relations that are ambiguous
at both ends, like (Executable, version_of, Program) & (Version, version_of, Project).
Closes #3010148.
Aurelien Campeas <aurelien.campeas@logilab.fr> [Wed, 10 Jul 2013 15:03:50 +0200] rev 9151
[test] give a non-ambiguous order to sync_schema assertion (closes #3001959)
Sorting by ordernum alone is unstable since several values have the
same ordernum.
ordernum + name should be stable.
David Douard <david.douard@logilab.fr> [Tue, 09 Jul 2013 17:33:43 +0200] rev 9150
Added tag cubicweb-version-3.17.3, cubicweb-debian-version-3.17.3-1, cubicweb-centos-version-3.17.3-1 for changeset 32b4d5314fd9
Dimitri Papadopoulos <dimitri.papadopoulos@cea.fr> [Thu, 04 Jul 2013 09:26:59 +0200] rev 9149
[test] typo
Aurelien Campeas <aurelien.campeas@logilab.fr> [Tue, 25 Jun 2013 12:11:42 +0200] rev 9148
[schema,server] add a security debugging aid (closes #2920304)
- Add a DGB_SEC debugging flag (to be used with set_debug/debugged).
- Add a context manager (tunesecurity) to filter security assertions.
Note: this does not address all read-security mecanisms.
Aurelien Campeas <aurelien.campeas@logilab.fr> [Mon, 24 Jun 2013 19:00:40 +0200] rev 9147
[etwist] fix handling of multiple files per field
html5 permits multiple files uploads, which can be expressed as::
<input type='file' multiple='multiple' />
This changeset avoids previous crash. Nothing is changed when a single file is
uploaded (backward compat is thus preserved). When multiple files are uploaded
for a single html input tag, the corresponding web request form key receives a
list of tuples like [('filename-1', IStream1), ('filename-2', IStream2), ...].
closes #2847207.
David Douard <david.douard@logilab.fr> [Tue, 09 Jul 2013 15:58:26 +0200] rev 9146
[merge] start 3.18 development
David Douard <david.douard@logilab.fr> [Tue, 09 Jul 2013 15:11:23 +0200] rev 9145
[pkg] prepare 3.17.3
Julien Cristau <julien.cristau@logilab.fr> [Mon, 08 Jul 2013 20:48:54 +0200] rev 9144
[pkg] Remove obsolete ubuntu hardy packaging
It's been EOL for a while.
Julien Cristau <julien.cristau@logilab.fr> [Mon, 08 Jul 2013 15:24:43 +0200] rev 9143
[book] fix sphinx documentation generation (closes #2991997)
changeset 17994bf95d6a ([doc] update Session documentation) added
cubicweb.server.session.Session autodoc to the book. This caused errors
from sphinx due to a section title not being allowed in the class's
docstring.
David Douard <david.douard@logilab.fr> [Mon, 08 Jul 2013 12:41:08 +0200] rev 9142
[test/ldap] fix ldap tests
- make sure the url is properly updated on database setup (when the test
database already exists and the ldap URI has changed)
- fix the ldapuser test setup process.
David Douard <david.douard@logilab.fr> [Fri, 05 Jul 2013 10:40:57 +0200] rev 9141
[test] fix unittest_schemaserial.py
A spurious add permission has been added in expected result by d988eec2d5d3
David Douard <david.douard@logilab.fr> [Fri, 05 Jul 2013 10:35:14 +0200] rev 9140
[test] make unittest_schemaserial.py runnable with python
used to run fine only when launched using pytest
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 08 Jul 2013 17:38:10 +0200] rev 9139
[facet] use facet name as input name for text widget (eg has_text)
we need to ba able to distinguish between text-inputs so we can write
a widget for a single facet that uses more than one text input.
This fix consists in the diff in cubicweb.facts.js; modifications in
facet.py result from this former.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 02 Jul 2013 09:36:20 +0200] rev 9138
[web doctype] don't give through reset_xmldecl to avoid double deprecation warning
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 02 Jul 2013 09:35:58 +0200] rev 9137
[web doctype test] don't give reset_xmldecl to avoid deprecation warning
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 03 Jul 2013 14:52:10 +0200] rev 9136
[devtool] randomise available ports search in http test
This lowers the chance of parallel tests to race for the same port.
Katia Saurfelt <katia.saurfelt@logilab.fr> [Wed, 03 Jul 2013 14:48:34 +0200] rev 9135
[facet] don't crash if no title specified on a facet and filtered rset is empty. Closes #2587883
Katia Saurfelt <katia.saurfelt@logilab.fr> [Wed, 03 Jul 2013 14:43:21 +0200] rev 9134
[css, html] add a css_class attribute on Button, allowing to change easily default CSS class for buttons
(think orbui integration)
Katia Saurfelt <katia.saurfelt@logilab.fr> [Wed, 27 Jun 2012 11:53:46 +0200] rev 9133
[view] add 2 missing spaces before the previous link
Julien Cristau <julien.cristau@logilab.fr> [Wed, 26 Jun 2013 09:35:54 +0200] rev 9132
[server/repository] Go through the repo to close pyro sessions
Turns out session.close() doesn't DTRT.
Julien Cristau <julien.cristau@logilab.fr> [Fri, 31 May 2013 11:13:06 +0200] rev 9131
fix migration from pre-3.13.1 versions (closes #2846978)
Need to check the existence of the asource column before the first call
to eid_type_source.
Aurelien Campeas <aurelien.campeas@logilab.fr> [Wed, 03 Jul 2013 14:33:27 +0200] rev 9130
[constraint] more robust unicity constraint failures reporting for end-users
Postgres or Sqlserver have limits on the index names (around resp. 64
and 128 characters). Because `logilab.database` encodes the `unique
together` constraint rtypes in the index names, we sometimes get
truncated index names, from which it is impossible to retrieve all
rtypes.
In the long run, the way such index are named should be changed.
In the short term, we try to reduce the end-user confusion resulting
from this design flaw:
* in source/native, the regex filtering ``IntegrityError`` message does
not impose an `_idx` suffix, which indeed may be absent (the result being an
UI message that resembles a catastrophic failure),
* also we avoid including a trailing " (double quote) from the error
message
* in entities/adapters, the well-named ``IUserFriendly`` adapter is made a
bit smarter about how to handle missing rtypes.
* the adapter also always produces a global message explaining the
issue (and the fact that sometimes, the user is not shown all the
relevant info)
* i18n is updated
Closes #2793789
Aurelien Campeas <aurelien.campeas@logilab.fr> [Wed, 03 Jul 2013 14:16:21 +0200] rev 9129
[hooks/security] Streamline attributes default permission check.
The current default permission on attributes delegates the check to
the entity permission update policy.
Since this is already checked it can be skipped.
The equality comparison will work, even with a deserialized schema,
because the default update perm is::
('managers', ERQLExpression(Any X WHERE U has_update_permission X, X eid %(x)s, U eid %(u)s))
which will always be deserialized in this order (groups first).
However this is a slight semantic change: entity type level 'update'
permissions can now be effectively used to encode update-time rules if
the default attribute permissions are used (before this change, the
'update' rules at entity type level were fired at creation time).
Closes #2930861.
Aurelien Campeas <aurelien.campeas@logilab.fr> [Wed, 26 Jun 2013 14:22:22 +0200] rev 9128
[test/schemaserial] swap got/expected to get nicer unittest2 diagnostics
Prepares #2965518.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 02 Jul 2013 17:09:04 +0200] rev 9127
[repository] drop safe attribute on ``internal_cnx``
People that need to disable hook can do it explicitly anyway.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 19:18:54 +0200] rev 9126
[dbapi] deprecated the dbapi
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 19:26:14 +0200] rev 9125
[repoapi] deprecate dbapi compat method
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 19:14:22 +0200] rev 9124
[testlib] deprecated the older api to access the repo.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 19:09:23 +0200] rev 9123
[connection] deprecated free_cnset and set_cnxset
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 19:02:06 +0200] rev 9122
[session] deprecate all Connection related method on session
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 18:53:06 +0200] rev 9121
[session] drop dead _current_cnx_id
Not used anymore for a few commit.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 18:47:08 +0200] rev 9120
[session] privatise get_cnx and close_cnx
The only user, repoapi now use ``new_cnx``
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 18:14:35 +0200] rev 9119
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 15:28:15 +0200] rev 9118
[testlib] add an default testcase.adminaccess (and use it for default session)
This adminaccess is the new offical way to get connection, and request on a
repo.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 18:15:57 +0200] rev 9117
[testlib] introduce a RepoAccess class to easily create connection and request
Each RepoAccess hold a session for a user and three helper function to help
create Connection, ClientConnection of WebRequest related to this session.
related to #2920299
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 15:13:47 +0200] rev 9116
[repoapi] make ClientConnection.__enter__ return self
This allow the standard idiom::
with repoapi.connect(repo, login='babar', passwork='elephant') as cnx:
cnx.execute(…)
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 18:16:06 +0200] rev 9115
[documentation] describe repoapi and web side change.
Short version explaining what object replace what and that BC existes for a few
version.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 12:28:17 +0200] rev 9114
[testlib] use internal_cnx instead of internal_session
internal_session is deprecated.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 14:12:00 +0200] rev 9113
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Accessing the repo through a Session is deprecated. We need an easy replacement
for ``internal_session``.
This API change was a good occasion to stop disabling integrity hook by default.
This is huge source of bug in user-code.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 12:02:38 +0200] rev 9112
[connection] enforce that a connection must be open to be used
The same than for ClientConnection, we ensure the connection is used inside a
its context.
.. note:: We may rely on that for ClientConnection and remove de dedicated code
in Client Connection but I prefer the current explicite and duplicated
version for now.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 15:11:22 +0200] rev 9111
use standalone Connection to Client Connection
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:46:24 +0200] rev 9110
[session] add a new_cnx factory
Having user-code importing cubicweb.server.session.Connection is inconvenient.
We add a simple factory fonction on the session.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:26:06 +0200] rev 9109
[connection] allow simple instantiation of standalone Connection
Such connection will automatically pick a connection id. Note, They are not
automatically closed on session close. But they will fails to grab new cnxset
once the session is closed.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:35:55 +0200] rev 9108
[connection] handle and explicitly life cycle on Connection
Like ClientConnection, Connection object need to be explicitly started and stop.
They aims to be used as context manager.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:00:32 +0200] rev 9107
[sesion] distinction between Connection handled by the session and other.
Not mixing the new and backward compat approach seems a good idea. Let's enforce
it.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:58:34 +0200] rev 9106
[session] replace _clear_thread_storage with close_cnx
There is not good reason to keep two distinct method.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:01:07 +0200] rev 9105
[session] explicitly take Connection object in close_cnx
Now that ClientConnection explicitly reference and use the Connection object we
do not need to use connectionid here.
We can safely change this signature, ClientConnection is the only use of
close_cnx for now.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:41:53 +0200] rev 9104
[session] drop the Session._clear_cnx_storage method
It is just cnx.clear() now.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:39:41 +0200] rev 9103
[session] wrap too long line
Too long line is too long.
(Confucius 503 BC)
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:39:01 +0200] rev 9102
[session] gather close_cnx with get_cnx and set_cnx
They do the same kind of operation and deserve to be grouped together.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:13:18 +0200] rev 9101
[client-connection] remove the _srv_cnx usage
It does not do anything special now that we use explicite Connection object with
automatic cnx_set handling.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:04:31 +0200] rev 9100
[client-connection] explicitly check that the client-connection is open
The check is also perform by the _srv_cnx property. But we do not need those
property anymore.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:02:30 +0200] rev 9099
[client-connection] handle the lack of connection id while not open
the connection id is computed at opening and forgotten when closing. We can't
rely on it in various messages … like the "connection closed" exception.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:21:39 +0200] rev 9098
[connection] transparent cnx_set handling
Connection object while take cares of there cnxset themself (as dbapi connection
does).
The ``set_cnxset`` and ``free_cnxset`` operation are still available for
backward compatibility purpose. The ``_auto_free_cnx_set`` is introduced to
handle mixed usage.
A new context manager ``connection.ensure_cnx_set`` is added for code that
access ``cnx.cnxset`` directly and are not wrapped in any specific
``Connection`` method.
A ``_with_cnx_set`` decorator is used on all Connection method that need a
cnxset.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 10:44:40 +0200] rev 9097
[client-connection] explicit the client part in __repr__
Now that we have real server side connection we need to remove ambiguity.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 19:50:16 +0200] rev 9096
[ClientConnection] directly use the Connection object to access the database
Now that Connection are a full featured standalone object we can directly
reference and use it in the ClientConnection instead of using the session.
The session object is kept around for a while to perform various utility role.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 18:15:45 +0200] rev 9095
[connection] invert __init__ parameter
Takes session first. At some point, the connection_id will become optional for Connection
created explicitly.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 13:43:22 +0200] rev 9094
[service] enforce that Service argument and return are json-serialisable
The call_service API need to be able to run through RPC. So we ensure front
start that it is possible serialise both input and output.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 18:04:08 +0200] rev 9093
[connection] move call_service on Connection
This is the last step toward standalone transaction.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:21:14 +0200] rev 9092
[connection] move the commit method on Connection object
One step closer of standalone Connection!
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:21:09 +0200] rev 9091
[connection] move the rollback method on Connection object
One step closer of standalon Connection.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:20:46 +0200] rev 9090
[connection] pass a Connection object to RQLRewriter
RQLRewriter can now directly use a Connection object. No need for specific
handling session side.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:20:14 +0200] rev 9089
[connection] Connection.execute touch Session timestamp
This allow to keep Session alive while using Connection object only for database
access.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 17:42:12 +0200] rev 9088
[connection] Connection now call _set_user to CWUser object linked to itseld
Session.user is linked to the session.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 14:13:50 +0200] rev 9087
[server/session] better faking of user for InternalManager
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:19:58 +0200] rev 9086
[connection] move execute
All necessary method are now available on the Connection object. So the
Connection can handle RQL execution itself.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 17:10:52 +0200] rev 9085
[connection] mark Connection as "not a request"
The ORM use this information. Having a wrong value will lead to crash.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 14:04:46 +0200] rev 9084
[server/session] ensure appobject obtained from the session are linked to the session
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 12:25:52 +0200] rev 9083
[connection] have rql_rewriter accession on Connection
Code expecting a session search the RQLRewriter on this attribute.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:19:42 +0200] rev 9082
[connection] move local_perm_cache management on Connection
It belongs here anyway.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:19:37 +0200] rev 9081
[session] use a rich object for timestamp
This allows the Transaction to keep a reference to it
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:19:32 +0200] rev 9080
[migraction] do not access session.data directly
use set_shared_data and get_shared_data instead
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:19:28 +0200] rev 9079
[connection] move relation management method
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:19:24 +0200] rev 9078
[connection] give access to shared data method
A reference to session data are kept
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:19:17 +0200] rev 9077
[connection] move relation cache method to Connection
needed for execute (and need execute themself...)
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 15 May 2013 16:09:31 +0200] rev 9076
[connection] give access to session execute from connection
This allows multiple function that both requires an execute method and are
required by the execute method.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 23 May 2013 14:17:46 +0200] rev 9075
[connection] move last part of undo logic in connection
Now that Connection have a reference to the repo it can handle all of it itself
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 17:28:41 +0200] rev 9074
[connection] initialize connection.user and connection.lang
A RequestSessionBase need a user and lang. For now we use the session ones.
Later the Connection will have it's own.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 29 Mar 2013 17:43:18 +0100] rev 9073
[Connection] inherit from RequestSessionBase
This contains a lot method. We need them to move more code from Session
to connection.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 13:48:18 +0200] rev 9072
[multi-sources] drop multi-sources related test.
another branch is removing the multi-source itself. We do not want to bother
fixing those test.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 18:21:04 +0200] rev 9071
Use new repoapi for the web stack
The publisher now link repoapi.ClientConnection to request. and explicitly
control there scope.
Web side, appobject._cw.cnx is now a repoapi.ClientConnection.
This actually kill webonly possibility until the repoapi is able to use some
RPC.
The change in the authentication stack is very hasty and need cleanup
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 10:59:01 +0200] rev 9070
PARTIAL: Using the repoapi in test
Test now use the repoapi.ClientConnection to access the repo. This is very big
change. The current method to access the repo are kept for backward
compatibility. The new methods will be introduced much later.
The TestCase keep a ClientConnection To an admin session for the whole test.
This changeset does not makes all tests pass without the next one that change
set htt without the next one that change the http stack
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 14:45:16 +0200] rev 9069
[web/test] drop proff of concept Facebook login in test
The authentication stack will change. The change in API will requires rework of
user cube anyway.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 10:46:35 +0200] rev 9068
[test/dbapi] do not rely on the Testcase provided cnx
We plan to use the repoapi in the test. So we need the DBAPI test to explicitly
create a DBAPI connection.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 10:45:44 +0200] rev 9067
[dbapi] explicitly use the DBAPI version of CubicwebRequestBase
As we plan to use a ConnectionCubicwebRequestBase by default we better have the
dbapi explicitly asking for a DBAPI implementation.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 18:33:41 +0200] rev 9066
[web/application] drop unused import
unused since 3c85e734ce00
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 18:35:22 +0200] rev 9065
[web/test] properly reset the request connection related attribute
A new request does not have those attribute to None. There have special value
that we now properly reinstall.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 18:23:48 +0200] rev 9064
[web/test] drop two undocumented suspicious regression test
Those two test are not documented and use the API in the wrong way. They do not
raise exception by chance.
the current request signature is::
def request(self, rollbackfirst=False, url=None, headers={}, **kwargs):
So the RQL have nothing to do here.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 19:27:31 +0200] rev 9063
[webrequest] introduce an alternative implementation using the repoapi
DBAPI specific parts of ``CubicWebRequestBase`` are extracted in a
``DBAPICubicWebRequestBase`` decicated class and a new
``ConnectionCubicWebRequestBase`` is introduced that provide the same services
but using a repoapi.ClientConnection as data source. For now the
``DBAPICubicWebRequestBase`` is still used by default.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 18:18:51 +0200] rev 9062
[repoapi] add an anonymous_cnx function
This function return an anonymous ClientConnection. It aims to replace
``dbapi.anonymous_session``.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 16:40:12 +0200] rev 9061
[repoapi] add a connect function
This function takes a repo and authentication information to open a new Session
and return a ClientConnection associated to it.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 17:26:13 +0200] rev 9060
[client-connection] add an auto-close property for ClientConnection
The next commit introduce a connect function that open a new Session and return
an associated ClientConnection. The Session should not be used by anything else
than the created ClientConnection, so we want to close it at the same time than
the ClientConnection. The implementation in this changeset is simplistic. We
probably want to move this notion in the session itself. This be improved once
we have server side Connection
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 12:08:06 +0200] rev 9059
[cwuser] make CWUser callable, returning self for dbapi compatibility
In the dbapi, Connection and Session have a ``user`` method to
generated a user for a request In the repo api, Connection and Session
have a user attribute inherited from SessionRequestBase prototype. This
ugly hack allows to not break user of the user method.
To ease transition from dbapi to repoapi we need the ClientConnection to be as
compatible as possible with the dbapi. Adding this method goes in this
direction.
It'll get deprecated in the deprecation wave that will conclude the repoapi
refactoring.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 15:26:03 +0200] rev 9058
[client-connect] drop rqlst on rset returned client side
The DBAPI used to drop the RQL syntax tree on rset to save bandwidth. We could
stop doing it for In-memory client connection. However keeping the syntax tree
leads to multiple tests failures. So we keep dropping it as the DBAPI always
did.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 15:25:47 +0200] rev 9057
[client-connection] add a repo property for dbapi compatibility
To ease transition from dbapi to repoapi we need the ClientConnection to be as
compatible as possible with the dbapi. Adding this method goes in this
direction.
It'll get deprecated in the deprecation wave that will conclude the repoapi
refactoring.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 13:49:13 +0200] rev 9056
[client-connection] add a connection property for dbapi compatibility
To ease transition from dbapi to repoapi we need the ClientConnection to be as
compatible as possible with the dbapi. Adding this method goes in this
direction.
It'll get deprecated in the deprecation wave that will conclude the repoapi
refactoring.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 13:42:19 +0200] rev 9055
[client-connection] add a sessionid property for dbapi compatibility
To ease transition from dbapi to repoapi we need the ClientConnection to be as
compatible as possible with the dbapi. Adding this method goes in this
direction.
It'll get deprecated in the deprecation wave that will conclude the repoapi
refactoring.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 12:12:58 +0200] rev 9054
[client-connection] add a cursor() method for dbapi compatibility
To ease transition from dbapi to repoapi we need the ClientConnection to be as
compatible as possible with the dbapi. Adding this method goes in this
direction.
It'll get deprecated in the deprecation wave that will conclude the repoapi
refactoring.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 11:39:34 +0200] rev 9053
[client-connection] add a request() method for dbapi compatibility
To ease transition from dbapi to repoapi we need the ClientConnection to be as
compatible as possible with the dbapi. Adding this method goes in this
direction.
It'll get deprecated in the deprecation wave that will conclude the repoapi
refactoring.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 11:06:57 +0200] rev 9052
[repoapi] introduce a basic ClientConnection class
This is the new official way to access the repo from client side.
It still access Session object directly as the server side connection is not up
yet (and it's not up because it would have no user).
Multiple follow up commit will install compatibility with the DBAPI. This will
ease the migration from dbapi to repoapi.
ClientConnection has no user yet but later commit will use it in the whole Web
stack.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 25 Jun 2013 17:25:47 +0200] rev 9051
[req] add a _set_user method
RequestSessionBase usally need to recreate a new CWuser appobject linked to
themself. We add it to the base class to avoid multiple redifinition.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 18:00:20 +0200] rev 9050
[server/session] add a login property
session.login is a DBAPISession attribute. Having it on server side session
will helps the rework of the API to access repository. The new schema drop the
concept of DBAPISession and use server side session for the same purpose.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 15:47:01 +0200] rev 9049
[server/session] allow access to session id using sessionid
session.sessionid is a DBAPISession attribute. Having it on server side session
will helps the rework of the API to access repository. The new schema drop the
concept of DBAPISession and use server side session for the same purpose.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 17 Jun 2013 17:27:08 +0200] rev 9048
[server/session] Implement anonymous_session
Now we have a simple rule to compute if a session is anonymous we can implement
the property for server session too. Having it on server side session will helps
the rework of the API to access repository. The new schema drop the concept of
DBAPISession and use server side session for the same purpose.
Related to #2953943
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 16:07:45 +0200] rev 9047
[server/session] do not clear session.cnx if unrelated to cnx actually cleared
The cnx parameter may be different from the one actually loaded for the current
thread. This will be possible in future commit when you close a client connection
for example.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 14:55:26 +0200] rev 9046
[dbapi] move ProgrammingError into cubicweb module
A new ``repoapi`` will be introduced as a replacement for the dbapi. It will
need ProgrammingError too.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 17 Jun 2013 15:00:41 +0200] rev 9045
[repoapi] move get_repository function into a new repoapi module
This new module aims to host the function of the new API replacing the old
DBAPI. `get_repository` is still needed hence moved to the new module.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 20 Jun 2013 16:19:27 +0200] rev 9044
[testlib] gather all repository access logic in one place
Refactoring of the repository access API in test is imminent. We plan to move
from the "old" dbapi to the new repoapi.
Gathering all impacted method in one place help to understand how all those
method interact and help readability for both patch and resulting code.
No code change is done at all in this changeset. The refactoring will code
later.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 20 Jun 2013 16:00:07 +0200] rev 9043
[testlib] move repo and related attribute back on Instance instead of Class
The repo and cnx was hold by the TestCase class to work as a cache and avoid
recreation of the repo from scratch of each test. However since bad26a22fe29 the
caching is done by the DatabaseHandler object and it is not necessary have a
second layer of cache on the TestCase itself.
We move the repo and cnx attribute back on the TestCase instance itself and make
several class methods instance methods again.
This will helps to change dbapi access in test from dbapi to repoapi.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 14:53:19 +0200] rev 9042
[dbapi] makes anonymous_connection a computed property
The current implementation is a boolean flag set manually by client code after
connection creation. This led to different way to decide a anonymous_connection
should be True (eg. different in the test than in the actual application code).
It should not be client responsibility to set this flag.
``cnx.anonymous_connection`` is now a purely computed property. Connection with user in the
"guests" group are anonymous, the other ain't.
``Session.anonymous_session`` is computed from ``cnx.anonymous_connection`` and get
the updated behavior transparently.
Closes #2953943
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 11:31:47 +0200] rev 9041
[webrequest] simplify set_session code
Thanks to the previous changeset we are assured that session handed to
set_session is full featured one. This allows a simpler code for this method.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Jun 2013 16:28:16 +0200] rev 9040
[webrequest] set DBAPISession without cnx at initialisation time
Such session are necessary for minimal use of a Request. Setting on by default
allow simplification later linking with a full featured DBAPISession or
equivalent. This was not possible before as all session was tracked by session
manager. They are not tracked anymore since aa709bc6b6c1 and we can safely
create them by default.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:41:27 +0200] rev 9039
[testlib] rework request building in init_authentication
The previous code was building a full authenticated request and tried to undo
the authentication afterward. The new code just create a bare Request with no
authenticated session linked yet.
This is much closer of what the actual authentication process does.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:39:25 +0200] rev 9038
[request] drop the user argument for set_session
I see no code nor test that use this optional argument. removing it help to
clean the session code. The set_session function will soon be deprecated anyway (at the
same time than the dbapi)
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 19 Jun 2013 12:00:54 +0200] rev 9037
[web-request] handle default language earlier
We now read language negotiation header at initialisation time (previously done
during ``set_session``). This simplify the set_session code for later reworking.
There is no change in behavior, the user selected language continue to overwrite
the one picked from the header/default when applicable.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 18 Jun 2013 15:12:25 +0200] rev 9036
[etwist] pass the repository to the root resource
This is another step toward a cleaner instantiation scheme for the repo.
The http test now pass an already created object to the etwist server instead of
relying on the config cache.
Related to #2249513
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:03:37 +0200] rev 9035
[repo] move repo.gc_stats to Service API (closes #2951068)
We currently have a method on the repo that anyone can call. `call_service`
gives a similar thing, modulo:
* can be restricted access to manager only (thanks to selection on services),
* less unrelated code on the repository class,
* no need to fetch a reference to a repo object from the client side
* (`req._cnx.repo` is not an API and config.repository() is on its way out).
The old way to access this information (repo.gc_stats()) is deprecated.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:05:35 +0200] rev 9034
[repo] move repo stats to Service (closes #2951067)
We currently add a new method on repo that anyone can call. Call service allows
to reach the same result with:
* Restricted access to manager only (thanks to selection on services),
* Less unrelated code on the repo.
* No need to fetch a reference to a repo object from client side.
`req._cnx.repo` is not an API and config.repository() is on its way out.
The old way to access this information (repo.stats()) is deprecated.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 11:59:45 +0200] rev 9033
[service] drop the asynchronous execution possibility
Call_service was able of both sync and sync execution making the API confusing.
There is not user of the async case. We drop the async argument in favor of
synchronous execution only.
This makes call_service the official API to call server side code from the
client side. This is a remplacement for the usual monkey patching of the repo
object.
The zmq notification bus is a solid alternative for codes that needs to start an
async execution.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:00:03 +0200] rev 9032
[auth] pass `repo` instead of `vreg` to SessionManager and AuthenticationManager
Those object actually need a repo object to connect and create new session
object. They used to retrieve the repo object using
``vreg.config.repository()``. I'm trying to sanitise the initialisation stack
and get ride of ``config.repository()``, a function that mix factory and cache.
Retrieving the vreg from the repo is trivial (``repo.vreg``) so we now pass the
repo object instead of the vreg.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 23 Nov 2012 16:12:19 +0100] rev 9031
web/application: instantiate the repository outside of CubicWebPublisher
This improves decoupling and allows ``CubicWebPublisher`` user to choose which
argument are used during ``Repository`` instantiation. In particular is allows
caller to provide a ``TaskManager``.
The `vreg` argument of publisher is made mandatory. See CubicWebPublisher
docstring for details.
Related to #2249513
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 07 Dec 2012 17:23:04 +0100] rev 9030
remove vreg argument to CWPublisher
The passing a vreg to CWPublisher was used by test to allow reused of an
existing vreg. We dropped this feature two commit ago and can safely removes it.
Removing this argument allows later cleanup and improvement on the CWPublisher
and Repository front.
closes #2944813
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 07 Dec 2012 16:10:38 +0100] rev 9029
[devtools] vreg becomes a class ppty
After multiple devtools refactoring, the vreg used for test is now *always* got
from the repository. Making this explicit is a step toward simplification of the
vreg handling during various initialisation phases.
Related to #2944813
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 23 Nov 2012 16:33:00 +0100] rev 9028
[devtools] drop unused `reset_schema` and `reset_vreg` class attribute
They have no effect and no user...
Related to #2944813
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 27 May 2013 17:50:55 +0200] rev 9027
[connection] move security control logic on Connection
The _security_enabled context manager now operate on connection. We have to keep
a specific entry point in Session to ensure Connection object are properly
cleaned up when using session to "manage" Connection live cycle.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 12:11:42 +0200] rev 9026
[connection] move hook control logic on Connection
The _hook_control context manager now operate on connection. We have to keep a
specific entry point in Session to ensure Connection object are properly
cleaned up when using session to "manage" Connection live cycle.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 12:10:45 +0200] rev 9025
[session] update _hook_control docstring
pierre-yves [Mon, 27 May 2013 16:43:02 +0200] rev 9024
[connection] reinstall cnx.data as cnx.transaction_data
Too much code expects self._cw.data to be session data.
backout 9b2f68916474
Related to #2503918
Related to #2912807
pierre-yves [Mon, 27 May 2013 16:42:39 +0200] rev 9023
[connection] give access to is_internal_session boolean
Needed if we are to use this object like we currently do with session.
Related to #2503918
pierre-yves [Fri, 14 Jun 2013 13:39:49 +0200] rev 9022
[req] drop from_controller on non WebRequest object (Closes #2901079)
The `controller` concept is purely a web things. It does not belong to generic
`req` object.
The `build_url` code is slightly changed to handle that. This probably requires
extended cleanup later.
This is a barely used and very internal API. No deprecation period
pierre-yves [Tue, 14 May 2013 00:36:43 +0200] rev 9021
[connection] add logging method on connection
If we are to use this object like we currently do with session, we need to have
the logging method as a lot of code use them.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 15:12:06 +0200] rev 9020
rename server.session.transaction into server.session.connection
The ongoing rework of the API to access the database include the splitting of
Session in two objects:
The ``Session`` object will only hold credential (user) and global session data.
A new object will publicly emerge to handle a database access. This object is
named ``Connection`` since that the way database accessors with the same property
are named in other system. So we renamed the ``Transaction`` object into
``Connection``. The ``Transaction`` object have already grown in the direction
of something directly usable by generic code, but the name ``Transaction`` is
ill suited as such object can be used for multiple database transaction in a
row.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 13:43:29 +0200] rev 9019
[application] call req.set_session in application.main_handle_request
The Session handling chain is no more responsible for calling req.set_session.
It just returns a valid session and lets the caller link it to the Request.
This opens the way to explicitly creating and closing a connection/transaction
in ``application.main_handle_request``.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 18:46:39 +0200] rev 9018
[session-handler] use session directly to update last usage
We don't really need the WebRequest for that. Not using the WebRequest to access
the cubicweb repository here will allow a delayed set_session.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 18:50:19 +0200] rev 9017
[application/connect] simplify connection logic
``application.connect`` now either sets a full featured ``DBAPISession`` to the
``WebRequest`` object or raises ``AuthenticationError``. The creation and usage
of a fake DBAPISession is now handled by ``main_handle_request`` when needed.
This means that fake DBAPISession are no longer tracked by the session manager
and that user are not given anyway to retrieve them for a later request.
This fake DBAPISession is still passed to ``core_handle`` because multiple cubes
like registration or forgotten password need this behavior. We would like to get
ride of it in the future.
This clarification of the connection API greatly simplifies ``DBAPISession``
retrieval//creation process opening the
way to improvements in this area.
Related to #2503918
pierre-yves [Thu, 13 Jun 2013 15:36:10 +0200] rev 9016
Drop hijack user (closes #2901093)
Deprecated since 3.17.0. Dropping this function help the session cleanup
business.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 17:27:43 +0200] rev 9015
[sources] drop support for ldapuser source (closes #2936496)
The ldapfeed source is a replacement for ldapuser. Use it instead.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 17:13:17 +0200] rev 9014
merge stable back into default
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 16:26:25 +0200] rev 9013
3.17 is the new stable
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 16:13:24 +0200] rev 9012
Added tag cubicweb-version-3.16.5, cubicweb-debiann-version-3.16.5-1, cubicweb-centos-version-3.16.5-1 for changeset 810a05fba1a4
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 16:02:39 +0200] rev 9011
[pkg] prepare 3.16.5
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 14:41:50 +0200] rev 9010
Added tag cubicweb-version-3.17.2, cubicweb-debian-version-3.17.2-1 for changeset 195e519fe97c
David Douard <david.douard@logilab.fr> [Thu, 13 Jun 2013 17:32:49 +0200] rev 9009
[pkg] prepare 3.17.2
Julien Cristau <julien.cristau@logilab.fr> [Fri, 14 Jun 2013 11:53:40 +0200] rev 9008
repository: make tests pass again
The tests use mono-threaded pyro, which breaks assumptions made in
e27337dfec8c. To fix that, remove sessions from the _pyro_sessions dict
when they're closed, and force the test pyro client to actually
disconnect when it's done.
Julien Cristau <julien.cristau@logilab.fr> [Wed, 12 Jun 2013 18:33:50 +0200] rev 9007
repository: monkey patch pyro connection handling to detect clients going away
When a pyro client goes away we need to close their session (to release their
cnxset). Add a dict to the repository mapping pyro client threads to session
object.
Closes #2932058
Julien Cristau <julien.cristau@logilab.fr> [Thu, 13 Jun 2013 12:01:23 +0200] rev 9006
notification: use viewargs for notif_entity_updated instead of transaction_data
Now that notifications use separate sessions, they can't rely on the
original transaction_data being around, so pass the data through view
arguments instead, so the notification view knows what changed on
updated entities.
Closes #2936180
Julien Cristau <julien.cristau@logilab.fr> [Thu, 13 Jun 2013 12:03:59 +0200] rev 9005
notification: properly handle cnx and lifetime of the hijacked session
When we create a session for the notification rendering, we need to
1) give it a cnxset
2) commit and close it after we're done
3) restore the original session for subsequent notifications
This changes the ordering of actual mail sending, since there are
several different commits involved, but I don't see a way to fix that
short of restoring hijack_user.
Related to #2934523