Julien Cristau <julien.cristau@logilab.fr> [Thu, 23 Jul 2015 17:56:32 +0200] rev 11583
[pkg] add debian/watch
Julien Cristau <julien.cristau@logilab.fr> [Thu, 23 Jul 2015 17:48:39 +0200] rev 11582
[pkg] 0.4.0
Julien Cristau <julien.cristau@logilab.fr> [Thu, 23 Jul 2015 17:45:37 +0200] rev 11581
[pkg] add python-pyramid-multiauth dependency to debian package
Closes #5576182
Julien Cristau <julien.cristau@logilab.fr> [Thu, 25 Jun 2015 09:51:32 +0200] rev 11580
[core] adjust cnx handling for cubicweb 3.21
Closes #5731814
Julien Cristau <julien.cristau@logilab.fr> [Tue, 30 Jun 2015 11:15:03 +0200] rev 11579
set httponly on session cookie
Julien Cristau <julien.cristau@logilab.fr> [Tue, 30 Jun 2015 11:15:54 +0200] rev 11578
[bwcompat] use cubicweb error views (closes #4545130)
David Douard <david.douard@logilab.fr> [Thu, 18 Jun 2015 10:49:34 +0200] rev 11577
Added tag 0.3.1, debian/0.3.1-1 for changeset 6df91cb85ecc
David Douard <david.douard@logilab.fr> [Thu, 18 Jun 2015 10:46:09 +0200] rev 11576
[pkg] 0.3.1
Denis Laxalde <denis@laxalde.org> [Wed, 29 Apr 2015 22:46:17 +0200] rev 11575
Handle absence of anonymous user
Set cw_session and then cw_cnx request attributes to None in case anonymous
connection is not allowed (i.e. no "anon" user in config).
Then catch AuthenticationError in CubicWebPyramidHandler and return the 'login'
view.
Closes #4751862.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 19 May 2015 08:38:08 +0200] rev 11574
[debian] Add python-wsgicors dependency as it is now available
Christophe de Vienne <christophe@unlish.com> [Mon, 11 May 2015 17:06:36 +0200] rev 11573
Update Changes for version 0.3.0
Christophe de Vienne <christophe@unlish.com> [Mon, 11 May 2015 15:45:14 +0200] rev 11572
Added tag pyramid-cubicweb-version-0.3.0, pyramid-cubicweb-debian-version-0.3.0-1 for changeset a80e076d3f42
Christophe de Vienne <christophe@unlish.com> [Mon, 11 May 2015 15:34:05 +0200] rev 11571
Fix debugtoolbar pkg name
Christophe de Vienne <christophe@unlish.com> [Mon, 11 May 2015 15:22:24 +0200] rev 11570
Set version 0.3.0
Christophe de Vienne <christophe@unlish.com> [Tue, 24 Feb 2015 17:19:58 +0100] rev 11569
[doc] update changes list
Christophe de Vienne <christophe@unlish.com> [Fri, 08 May 2015 11:38:07 +0200] rev 11568
Rollback 'uncommitable' cnx
Closes #5343870
Christophe de Vienne <christophe@unlish.com> [Wed, 29 Apr 2015 13:09:06 +0200] rev 11567
[debug] The debug mode now set pyramid.reload_templates
Christophe de Vienne <christophe@unlish.com> [Sat, 25 Apr 2015 20:50:57 +0200] rev 11566
Use pyramid flash queue for messages
Use a 'cubicweb' flash queue and make sure it contains only one message
so that the behavior is the same as cubicweb.
Also, the 'message' property now returns both the cubicweb flash queue and
the default flash queue.
One big difference with the former behaviour is that messages set with
set_message will survive a redirection, making set_redirect_message useless in
most case.
Closes #5298654
Christophe de Vienne <christophe@unlish.com> [Wed, 25 Feb 2015 22:40:39 +0100] rev 11565
[doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com> [Tue, 28 Apr 2015 11:04:03 +0200] rev 11564
Allow tests to override pyramid_settings
Closes #5307426
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Apr 2015 11:39:35 +0200] rev 11563
Make debug mode usable without pyramid_debugtoolbar
Add the latter in Debian recommends along the way.
Closes #5310434.
Christophe de Vienne <christophe@unlish.com> [Thu, 26 Feb 2015 00:56:32 +0100] rev 11562
[auth] Use a second authtkt policy for 'rememberme'
The former solution was buggy because the expire time of the auth cookie, if
set through 'remember', was lost on the first cookie reissuing.
The new approach, make possible thanks to multiauth, use two different cookies.
One for session bounded authentication (no 'rememberme'), and one for long
lasting authentication (w 'rememberme').
The choice between the two of them is done by adding a 'persistent' argument
to the top-level 'security.remember' call. Passing this argument will inhibate
a policy or the other.
The two policies are (a little) configurable through the
'cubicweb.auth.authtkt.[session|persistent].*' variables.
Related to #4985962
Christophe de Vienne <christophe@unlish.com> [Thu, 12 Feb 2015 19:21:39 +0100] rev 11561
[auth] Use pyramid_multiauth
It makes it easier to finely tune what parts of the default authentication stack
we want to use or not.
It also makes it possible for any cube to add its own policy in addition to the
others.
Related to #4985962
David Douard <david.douard@logilab.fr> [Thu, 09 Apr 2015 23:58:38 +0200] rev 11560
[auth] remove dead code (closes #5230746)
Christophe de Vienne <christophe@unlish.com> [Mon, 23 Feb 2015 17:17:43 +0100] rev 11559
[login] Test the login views
Christophe de Vienne <christophe@unlish.com> [Tue, 24 Feb 2015 17:19:37 +0100] rev 11558
Fix project homepage url
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 14:31:30 +0100] rev 11557
Replace the '_' with '-' in the package name
The change was made manually on pypi (see
https://sourceforge.net/p/pypi/support-requests/459/)
Christophe de Vienne <christophe@unlish.com> [Tue, 10 Feb 2015 16:35:06 +0100] rev 11556
On exceptions from CW, copy headers
Closes #4939219
Christophe de Vienne <christophe@unlish.com> [Tue, 10 Feb 2015 10:23:20 +0100] rev 11555
[doc] fix pyramid-auth-secret conf sample
Christophe de Vienne <christophe@unlish.com> [Mon, 02 Feb 2015 13:46:28 +0100] rev 11554
[doc] Update change list
Christophe de Vienne <christophe@unlish.com> [Wed, 28 Jan 2015 00:00:05 +0100] rev 11553
[core] Protect session data from unwanted loading.
Use specialised Session and Connection types that forward their 'data' and
'session_data' attributes to the pyramid request.session attribute.
This forwarding is done with properties, instead of copying a reference, which
allow to access request.session (and the session factory) if and only if
Session.data or Connection.session_data is accessed.
In some cases, most notably the static resources requests, it can mean no
access the session during the request handling, which saves a request to the
session persistence layer.
Closes #4891437
Christophe de Vienne <christophe@unlish.com> [Mon, 26 Jan 2015 18:06:58 +0100] rev 11552
[core] Use tools.cached_user_build for better performances
Closes #4870347
Christophe de Vienne <christophe@unlish.com> [Mon, 26 Jan 2015 18:04:57 +0100] rev 11551
[doc] Document tools
Related to #4870347
Christophe de Vienne <christophe@unlish.com> [Mon, 26 Jan 2015 17:59:10 +0100] rev 11550
[tools] Provide a faster build_user
The main trick is to use a cache of user entities.
To do so, a few tools are needed since the entities are not supposed to be
copied around between connexions.
Related to #4870347
Christophe de Vienne <christophe@unlish.com> [Fri, 23 Jan 2015 14:00:02 +0100] rev 11549
Added tag pyramid_cubicweb-version-0.2.1, pyramid_cubicweb-debian-version-0.2.1-1 for changeset 1ae61c25299a
Christophe de Vienne <christophe@unlish.com> [Fri, 23 Jan 2015 12:57:16 +0100] rev 11548
Prepare version 0.2.1
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 17:28:30 +0100] rev 11547
[cors] Fix 'headers' and 'methods' parameters
Closes #4849874
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 15:14:11 +0100] rev 11546
Fix the 0.2.0 release date
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 15:13:43 +0100] rev 11545
Change project url
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 13:45:35 +0100] rev 11544
Added tag pyramid_cubicweb-version-0.2.0, pyramid_cubicweb-debian-version-0.2.0-1 for changeset cd8308245d20
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 13:27:54 +0100] rev 11543
set debian version
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 11:11:28 +0100] rev 11542
Prepare version 0.2.0
Christophe de Vienne <christophe@unlish.com> [Wed, 21 Jan 2015 10:24:42 +0100] rev 11541
Document the changes
Christophe de Vienne <christophe@unlish.com> [Fri, 16 Jan 2015 22:50:05 +0100] rev 11540
Fix configuration loading when 'cubicweb.includes' is not set
Closes #4849314
Christophe de Vienne <christophe@unlish.com> [Mon, 05 Jan 2015 15:54:12 +0100] rev 11539
pep8
Christophe de Vienne <christophe@unlish.com> [Sun, 04 Jan 2015 00:12:29 +0100] rev 11538
Provides requirements for rtd
Related to #4849313
Christophe de Vienne <christophe@unlish.com> [Sat, 03 Jan 2015 22:06:03 +0100] rev 11537
Initial documentation.
Closes #4849313
Christophe de Vienne <christophe@unlish.com> [Mon, 05 Jan 2015 12:02:01 +0100] rev 11536
Remove dead code
Christophe de Vienne <christophe@unlish.com> [Sat, 03 Jan 2015 16:51:32 +0100] rev 11535
[profile] Add a profiling tool
Christophe de Vienne <christophe@unlish.com> [Sat, 03 Jan 2015 02:36:06 +0100] rev 11534
[config] Read pyramid settings in a 'pyramid.ini' file
If a 'pyramid-debug.ini' file is present, it will be used
instead when debugmode is on.
Closes #4811298
Christophe de Vienne <christophe@unlish.com> [Sat, 03 Jan 2015 01:24:38 +0100] rev 11533
Move auth-related configuration to a dedicated module.
Christophe de Vienne <christophe@unlish.com> [Tue, 23 Dec 2014 10:22:49 +0100] rev 11532
Fix cors 'origin' parameter passing
Closes #4783343
Christophe de Vienne <christophe@unlish.com> [Sat, 03 Jan 2015 00:14:06 +0100] rev 11531
[auth] Fix the config option name in the warning message
Aurelien Campeas <aurelien.campeas@logilab.fr> [Tue, 02 Dec 2014 15:21:29 +0100] rev 11530
session -> cnx
Christophe de Vienne <christophe@unlish.com> [Mon, 08 Dec 2014 20:38:32 +0100] rev 11529
Added tag pyramid_cubicweb-debian-version-0.1.3-1, pyramid_cubicweb-version-0.1.3 for changeset 0a7769e583c2
Christophe de Vienne <christophe@unlish.com> [Mon, 08 Dec 2014 20:25:31 +0100] rev 11528
Set version 0.1.3
Christophe de Vienne <christophe@unlish.com> [Mon, 08 Dec 2014 20:21:55 +0100] rev 11527
Cookie 'max_age' must be a integer, not a string.
If not, the value is used verbatim for the 'expires' of the cookie, which is
invalid.
Closes #4731764.
Christophe de Vienne <christophe@unlish.com> [Sat, 15 Nov 2014 21:07:25 +0100] rev 11526
Added tag pyramid_cubicweb-version-0.1.2, pyramid_cubicweb-debian-version-0.1.2-1 for changeset 5eb4e27e9998
Christophe de Vienne <christophe@unlish.com> [Sat, 15 Nov 2014 20:26:15 +0100] rev 11525
Update debian changelog
Christophe de Vienne <christophe@unlish.com> [Sat, 08 Nov 2014 23:07:20 +0100] rev 11524
Don't rollback if exception is HTTPSuccessful or HTTPRedirection
In the request finishing, the 'cleanup' callback set by _cw_cnx
automatically commit the transaction except is an exception is set
on the request.
Problem is, redirections and successul http return code can raise
exceptions.
This patch detects such exceptions and avoid rolling back the transaction.
Closes #4566482
Christophe de Vienne <christophe@unlish.com> [Thu, 06 Nov 2014 22:26:16 +0100] rev 11523
Set version to 0.1.2
Christophe de Vienne <christophe@unlish.com> [Thu, 06 Nov 2014 22:08:57 +0100] rev 11522
Provides a full wsgi cubicweb application builder
Christophe de Vienne <christophe@unlish.com> [Sun, 02 Nov 2014 23:36:22 +0100] rev 11521
Added tag pyramid_cubicweb-version-0.1.1, pyramid_cubicweb-debian-0.1.1-1 for changeset 9f3b9e610c3d
Christophe de Vienne <christophe@unlish.com> [Sun, 02 Nov 2014 23:31:34 +0100] rev 11520
Set version 0.1.1
Christophe de Vienne <christophe@unlish.com> [Sun, 02 Nov 2014 22:54:24 +0100] rev 11519
[auth] Make last_login_time updated.
The update is done when the user logs in, then every time the authentication is
reissued.
Closes #4549891
Christophe de Vienne <christophe@unlish.com> [Thu, 23 Oct 2014 16:29:44 +0200] rev 11518
Added tag pyramid_cubicweb-version-0.1.0, pyramid_cubicweb-debian-version-0.1.0-1 for changeset 3d60138100d6
Christophe de Vienne <christophe@unlish.com> [Thu, 23 Oct 2014 16:15:58 +0200] rev 11517
Add a description to the debian package
Christophe de Vienne <christophe@unlish.com> [Thu, 23 Oct 2014 15:41:43 +0200] rev 11516
Set version to 0.1.0
Julien Cristau <julien.cristau@logilab.fr> [Mon, 06 Oct 2014 10:32:38 +0200] rev 11515
Initial debian packaging
missing at least a long description and wsgicors dependency.
Christophe de Vienne <christophe@unlish.com> [Wed, 22 Oct 2014 16:15:54 +0200] rev 11514
Move PyramidCWTest to pyramid_cubicweb.tests
Christophe de Vienne <christophe@unlish.com> [Mon, 22 Sep 2014 12:15:31 +0200] rev 11513
Optimise repo_connect by skipping authenticate_user
The authentication being handled by pyramid itself, going through the
authentication stack to recreate the temporary session at each request is very
costly.
On my desktop, for a mostly static front page, the total time for delivering
the page drops from 100ms to 47ms.
Christophe de Vienne <christophe@unlish.com> [Mon, 22 Sep 2014 09:40:43 +0200] rev 11512
Use lightweight sessions
Provides a lightweight version of repo.connect() that does not keep track of
opened sessions.
The speed gain on a mostly static front page is about 5%
Warning ! This means that, for now, the "session_open" and "session_close"
hooks are NOT called anymore.
Christophe de Vienne <christophe@unlish.com> [Fri, 19 Sep 2014 19:17:50 +0200] rev 11511
Use 'wsgicors' for CORS handling.
The CW CORS handling (in web/cors.py) is only able to work on cubicweb requests.
When a request is not handled by bwcompat, we need a proper solution.
The `wsgicors` library provides what we need as a wsgi middleware.
Christophe de Vienne <christophe@unlish.com> [Thu, 18 Sep 2014 17:18:09 +0200] rev 11510
Add requirements
Christophe de Vienne <christophe@unlish.com> [Thu, 18 Sep 2014 16:51:55 +0200] rev 11509
Handle '__setauthcookie'
'__setauthcookie' is a form parameter added by the 'rememberme' cube.
If present and equals to '1', the cookie max_age will be set to 7 days instead
of being a session cookie.
To make sure the auth cookie is renewed, the reissue_time is set to 1h.
Christophe de Vienne <christophe@unlish.com> [Thu, 18 Sep 2014 15:07:02 +0200] rev 11508
Fix POST handling.
The issues where revealed by the unittests, which are ported from
the cubicweb wsgi tests.
Christophe de Vienne <christophe@unlish.com> [Thu, 18 Sep 2014 11:43:45 +0200] rev 11507
Use AuthTktAuthenticationPolicy
Christophe de Vienne <christophe@unlish.com> [Fri, 19 Sep 2014 14:26:55 +0200] rev 11506
DB-saved session data
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 02 Sep 2014 20:50:33 +0200] rev 11505
Handle properly the '/https/*' urls
CW uses a url prefix to detect https behing a reverse-proxy.
A more proper way to do that is documented here in the waitress documentation
(waitress is the default pyramid wsgi server):
https://waitress.readthedocs.org/en/latest/#using-behind-a-reverse-proxy
A later version should implement this, or use waitress in the 'pyramid'
command.
Related to #4291181
Christophe de Vienne <christophe@unlish.com> [Tue, 02 Sep 2014 20:49:57 +0200] rev 11504
Correctly pass the multiple parameters to the cubicweb request
When naively converted to a dict, the webob MultiDict will not set the multiple
parameters (a same name with several values) in a way CW can understand.
MultiDict.mixed() however, does exactly what CW needs: list values for keys
with multiple values, and single value for the others.
Related to #4291181
Christophe de Vienne <christophe@unlish.com> [Thu, 28 Aug 2014 15:42:51 +0200] rev 11503
Add a wsgi application factory suitable for wsgi servers.
This factory can generate a wsgi application for a cubicweb instance.
It reads the instance name from the CW_INSTANCE environment variable, and
activates the debugmode if CW_DEBUG is defined in environment.
It is usable by uwsgi as the 'module' parameter :
CW_INSTANCE=test uwsgi --plugins python,http --http 0.0.0.0:8080 --module pyramid_cubicweb:wsgi_application()
Christophe de Vienne <christophe@unlish.com> [Wed, 27 Aug 2014 19:26:44 +0200] rev 11502
If any cube has a 'includeme' attribute, call config.include on it
Related to #4291181
Christophe de Vienne <christophe@unlish.com> [Thu, 21 Aug 2014 21:55:58 +0200] rev 11501
Add a make_cubicweb_application function
This function will be used by the 'pyramid' cubicweb-ctl command.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Thu, 21 Aug 2014 22:26:42 +0200] rev 11500
Fix session closing for cubicweb 3.19
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Thu, 21 Aug 2014 21:43:24 +0200] rev 11499
Convert cubicweb.NotFound to HTTPNotFound
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Wed, 06 Aug 2014 19:06:32 +0200] rev 11498
Use registry['cubicweb.registry'] instead of registry['cubicweb.appli'].vreg because the application may not be present.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Thu, 21 Aug 2014 22:16:51 +0200] rev 11497
Use a predicate based view selection for handling /login
This will allow easy addition of login handlers from the application or cubes
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Wed, 06 Aug 2014 19:04:25 +0200] rev 11496
Use a tween application instead of a catchall route.
Using a catchall route has some drawbacks. Especially, we have no mean to have
a route that would match only if no other one does AND no view matches either.
Said differently, our default handler cannot be plugged on the route level nor
the view level, because it is has to be activated only if nothing else works in
the pyramid application.
Using a tween application allow to handle requests that raises a HTTPNotFound
error, while having the pyramid error handler still active between our tween
app and the outside world.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Mon, 04 Aug 2014 15:52:04 +0200] rev 11495
Document the view problem hypothesis.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Mon, 04 Aug 2014 13:06:32 +0200] rev 11494
If the postlogin_path is 'login', redirect to '/' instead
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Mon, 04 Aug 2014 13:04:19 +0200] rev 11493
Put the login view in a separate module.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Thu, 31 Jul 2014 17:48:32 +0200] rev 11492
Separate into 4 modules
* init_instance: load the cubicweb repository from the
`pyramid_cubicweb.instance` configuration key
* defaults: provides cw-like defaults for the authentication and session
management
* core: make cubicweb use the authentication and session management of
pyramid.
It assumes the application provides the auth policies and session factory,
and that the `cubicweb.*` registry entries are correctly initialised.
This is this only required module or pyramid_cubicweb, the other
ones are optional if the application provides its own versions of what they
do.
* bwcompat: provides a catchall route that delegate the request handling to
an old-fashion cubicweb publisher (ie using url_resolver and controllers).
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 22 Jul 2014 23:46:09 +0200] rev 11491
Update the TODO list
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 22 Jul 2014 23:45:11 +0200] rev 11490
Provide instructions and a requirements list to quickly start the sample
application.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 15 Jul 2014 18:25:48 +0200] rev 11489
Use the pyramid session object as the cubiweb session.data (needs a patched cw 3.19)
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 15 Jul 2014 18:13:57 +0200] rev 11488
Add comments on parts we want to reconsider later
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 15 Jul 2014 17:37:50 +0200] rev 11487
Skip core_handle, add a context manager to handle cubicweb errors
The context manager is also used to catch errors in render_view.
It handles the 'external' errors raised by cubicweb code.
The more internal errors, the one that should occur only in url resolving and
cubicweb controllers, are handled directly in CubicWebPyramidHandler.
ValidationError is handled by CubicWebPyramidHandler for now, but should
probably be handled by cw_to_pyramid
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 15 Jul 2014 15:30:49 +0200] rev 11486
Documents dependencies on a ubuntu system
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Tue, 15 Jul 2014 14:25:15 +0200] rev 11485
Use short-lived cubicweb sessions to let pyramid actually handle the web sessions
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Wed, 09 Jul 2014 17:14:32 +0200] rev 11484
Isolate the default handler and extend its role
The handler now does the job of CubicWebPublisher.main_handle_request() and calls
CubicWebPublisher.core_handle().
Instead of using config.add_notfound_view, a catchall route is defined and the
handler plugged to it.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Sun, 06 Jul 2014 18:25:31 +0200] rev 11483
Add a basic sample application
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Sun, 06 Jul 2014 18:06:10 +0200] rev 11482
Integration pyramid and cubicweb authentication.
We use pyramid sessions to store the cubicweb sessionid so we can reuse it when needed,
or regenerate it if it was lost.
The cubicweb sessionid is obtained from a login in the repo OR directly from
the user identified by pyramid.
Related to #4291173
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 12 Sep 2014 09:28:32 +0200] rev 11481
[doc] Escape _ in README.md
So that the Markdown is okay.
Christophe de Vienne <christophe@unlish.com> [Thu, 28 Aug 2014 11:20:57 +0200] rev 11480
Initial implementation
Set up a default route that passes requests to a cubicweb instance.
The requests are wrapped in an adequate adapter so that cubicweb works with no change.
Related to #4291173
Christophe de Vienne <christophe@unlish.com> [Wed, 02 Jul 2014 19:07:39 +0200] rev 11479
Project Structure
Related to #4291173
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 23 Sep 2016 16:04:32 +0200] rev 11478
[tox] Have less test environments
This is to reduce the load on CI server because of parallel clones of the
repository in Docker containers. Only keep "server", and "web" environments
separated. All other prior environments are in "misc".
To avoid duplicate entries in requirements files, move them all in a
"requirements" directory (this appears to be a "common" practice, see e.g.
Celery).
Adjustments in tests:
* Rename cubicweb/hooks/test/unittest_notification.py so that it does not
conflict with cubicweb/sobjects/test/unittest_notification.py during test
discovery as they would have the same module name but different __file__
attribute.
* Add "comment" cube to the list of expected cubes in unittest_cwconfig.py as
this cube is pulled by requirements/test-mist.txt.
Closes #15440662.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 26 May 2016 15:38:39 +0200] rev 11477
[repo] Don't crash on start when fs schema is missing some db schema entities
This occurs usually while developping and we don't want systematically to
rebuild the database to start the instance or run e.g. i18ninstance.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 23 Sep 2016 13:36:06 +0200] rev 11476
Let configuration option be overridden by environment variables
Related to #13889793.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 23 Sep 2016 09:51:10 +0200] rev 11475
[tox] Add a dummy test-results.xml file in check-manifest and flake8 environments
This is to work around Jenkins Junit plugin that does not apparently
account for the absence of this file (though it accepts it to be empty).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 23 Sep 2016 09:50:16 +0200] rev 11474
[tox] Basic flake8 config
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 15 Sep 2016 21:22:53 +0200] rev 11473
Use pkgutil.ImpLoader instead of a custom loader for cubes import redirection
It just works fine (same implementation of load_module method as _CubesLoader
introduced in d404fd8499dd) and is complete w.r.t. PEP 302 (all methods
implemented).
Related to #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 13 Sep 2016 10:16:00 +0200] rev 11472
[config] Make available_cubes aware of cubes installed as packages
For this add a "cubicweb.cubes" entry points group which will be scanned
through to find out installed cubes. Entries in this group are expected to
expose the module name of a cube (i.e. `cubicweb_foo`).
Note that CubicWebConfiguration's available_cubes method will return the
module name of cubes as packages (cubicweb_foo), so we had to add a special
"key" sorting function to keep cubes sorted as before, despite possible
different distribution schemes. This makes it possible to handle loading of
CTL plugins in an almost similar manner as before (just tweaking the package
name from cube name in load_cwctl_plugins method).
I had to tweak (again?) the test_cubes_path method in unittest_cwconfig.py but
did not find out why.
Apart from unforeseen bugs and pending documentation, this finishes the work
on porting cubes to standard Python packages. Closes #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 14 Sep 2016 17:12:37 +0200] rev 11471
[skeleton] Use distname directly in setup.py
distname is part of required metadata and modname cannot actually be used in
place of it.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 14 Sep 2016 17:03:46 +0200] rev 11470
[skeleton] Fix modname in __pkginfo__
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 12 Sep 2016 09:13:22 +0200] rev 11469
[test] Use plain unittest in unittest_cwctl.py
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 12 Sep 2016 09:03:07 +0200] rev 11468
[devctl] Remove commented LiveServerCommand
The code got commented in 2010 (changeset 5ab3f63b06ad)...
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 12 Sep 2016 09:01:47 +0200] rev 11467
[pkg] Inline call to setup() in setup.py
The point of having this "install" function, called in "main" mode is not
clear. Better stick to standard practices.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 12 Sep 2016 08:41:33 +0200] rev 11466
[pkg] Drop old checks in setup.py
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 13 Sep 2016 17:06:35 +0200] rev 11465
[tox] Exclude symlinks from check-manifest call
These are not handled by check-manifest, see https://github.com/mgedmin/check-manifest/issues/69.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 21 Jul 2016 15:32:36 +0200] rev 11464
Drop the only reference to an '__insert' form key
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 08 Jul 2016 10:13:15 +0200] rev 11463
Drop bits from the past (no more dbapi isolated installation)
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 29 Aug 2016 12:05:11 +0200] rev 11462
[devtools] CWTC.request is gone, don't attempt to use it in CWTC.view
So one will have to provide at least one of `rset` or `req` argument of the `view`
method.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 08 Sep 2016 11:40:50 +0200] rev 11461
Merge 3.22 into 3.23
Some fixes there are necessary for client work depending on cubicweb 3.23.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 08 Jun 2016 21:59:34 +0200] rev 11460
[devtools] Handle i18ncube command for "cubes as packages"
And add a test so that both layouts are tested.
Move the test cube into a package.
Related to #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 07 Jun 2016 18:21:13 +0200] rev 11459
Handle cubes as packages in cwconfig
Rely on importlib.import_module in several places in cwconfig.py, so this
would not work with python 2.6.
Method available_cubes will not list cubes installed as package for now. I'm
not sure it's worth implementing this method (used in `cubicweb-ctl list
cubes` command) for new cubes layout as the same result can basically be
obtained with `pip freeze | grep cubicweb_`.
In unittest_cwconfig.py, duplicate CubicWebConfigurationTC test case to test
both the "cubes as packages" layout and the "legacy cubes" layout. The former
having a custom sys.path set (pointing to datapath('libpython') where all
cubes' packages live) and the latter having the previous config attribute
setup.
All test data cubes are moved to packages in libpython directory and symlinks
are introduced in the cubes directory.
Related to #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Jul 2016 16:17:57 +0200] rev 11458
[cwconfig] Reorder imports by alphabetic order
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 31 Aug 2016 11:53:21 +0200] rev 11457
Add an import redirect hook from "cubes.<name>" to "cubicweb_<name>"
The hook consists of a finder and a loader implemented following PEP-302; it
is responsible for loading cubes distributed as packages (i.e. installed as
``cubicweb_<name>`` in site-packages) but imported (in client code) as ``from
cubes.<name> import ...``. So this is a transitional mechanism allowing cubes
following the new layout to be used by old-style cubes/applications.
The importer is installed upon calling CubicWebConfiguration's
cls_adjust_sys_path method (also called in cubicweb.devtools.__init__.py,
which is a prerequisite for importing any "legacy" cube. The loading of
old-style cubes is still handled by the CubicWeb configuration, based on
adjustment of sys.path etc.
Related to #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Jul 2016 17:46:39 +0200] rev 11456
[devtools] Update skeleton's setup.py to install cube as a package
Most of the prior logic of skeleton's setup.py gets dropped as installing a
cube as a "classic package" (i.e. in site-packages) is just the default
behavior of distutils.
Also add a test checking installation of new cube.
Related to #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 May 2016 14:57:41 +0200] rev 11455
[devtools] Adjust skeleton setup.py to have it read information from __pkginfo__.py
Since the later is now installed in cubicweb_<CUBENAME> directory.
Add a test ensuring that `python setup.py sdist` works on newly created cube
(which should at least verify that setup.py is valid).
Related to #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 May 2016 14:27:28 +0200] rev 11454
[devtools] Update skeleton and newcube command to cube as package layout
Related to #13001466.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 08 Sep 2016 11:57:46 +0200] rev 11453
[pkg] Add missing entries to MANIFEST.in
Detected by running `check-manifest
<https://github.com/mgedmin/check-manifest>`_. Add a tox environment
accordingly.
Closes #15229018.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 26 Aug 2016 14:31:25 +0200] rev 11452
[test] Add a test for toolsutils.read_config
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 26 Aug 2016 13:56:59 +0200] rev 11451
[test] Use plain unittest in unittest_toolsutils
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 30 May 2016 21:35:50 +0200] rev 11450
[skeleton] Remove test/pytestconf.py
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 08 Jun 2016 22:49:21 +0200] rev 11449
[pkg] Make it clearer which entries of __pkginfo__ are actually used
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Jul 2016 15:30:07 +0200] rev 11448
[test] Avoid usage of lgc.testlib TestCase in unittest_cwconfig.py
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 18 Jul 2016 13:59:47 +0200] rev 11447
[test] Move setup of spa2rql tests into setUpClass method
Thus avoiding cryptic errors upon unittest discovery.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 18 Jul 2016 20:08:48 +0200] rev 11446
[schema] Set CubicWebSchemaLoader's extrapath using config eponymous property
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 16 Aug 2016 14:26:41 +0200] rev 11445
[doc] Document change of instances location in virtualenv installation
Closes #14789440.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 16 Aug 2016 14:16:10 +0200] rev 11444
[cwconfig] Do not override user-defined CW_MODE in virtualenv setup
And thus consider `_forced_mode` first.
Related to #14789440.
David Douard <david.douard@logilab.fr> [Fri, 22 Jul 2016 19:02:52 +0200] rev 11443
Added tag 3.22.4, debian/3.22.4-1, centos/3.22.4-1 for changeset 92db0bb8e26d
David Douard <david.douard@logilab.fr> [Fri, 22 Jul 2016 18:26:17 +0200] rev 11442
[pkg] remove .dev0 from version
David Douard <david.douard@logilab.fr> [Thu, 21 Jul 2016 21:03:25 +0200] rev 11441
[pkg] 3.22.4
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 06 Jul 2016 20:14:55 +0200] rev 11440
[session] Ensure access to rql varmaker always mark the session as dirty
When one accesses the rql_varmaker, that's usually to use it. The pb was that when
the varmaker was already in page's data (which is stored as session data),
session storage such as redis won't see that the session data is dirty and has
to be stored back at the end of the request.
To fix this, systematically call set_page_data.
(grafted from 3432f0e2540d)
Julien Cristau <julien.cristau@logilab.fr> [Wed, 16 Mar 2016 00:42:40 +0100] rev 11439
[test] fix test_printable_value_bytes with current pygments
An empty span was added in
https://bitbucket.org/birkenfeld/pygments-main/commits/164574c13533195a555181a2b9c685fea2470403
(grafted from 74b04a88d28a)
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 19:30:10 +0200] rev 11438
[webctl] set uid of file produced by gen-static-datadir (closes #11298794)
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 19:54:59 +0200] rev 11437
[webconfig] ensure uicache content has correct uid (related to #11298794)
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 19:50:48 +0200] rev 11436
[cwconfig] add the CubicWebConfiguration.ensure_uid_directory() method (related to #11298794)
that recursively enforce uid on files.
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 19:26:20 +0200] rev 11435
[cwconfig] extract uid file setting code from check_writeable_uid_directory (related to #11298794)
into an ensure_uid() method
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 19 Jul 2016 15:53:58 +0200] rev 11434
[web] Fix bug with usage of os.rename under windows environment
In 7c386161ebd6 we removed cache handling from property sheet and introduced
usage of a tempfile + os.rename to get atomic generation of files. The pb is
that this is not portable, since under windows os.rename will raise an exception
if the file already exists (because there is no way to write a file atomatically
in such case).
This kind of thing should be out of the CW scope anyway, so implements a quick &
dirty fix in the mean time.
Closes #14214794
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 06 Jul 2016 20:28:51 +0200] rev 11433
[migration] More resilient migration script
Query the information schema to retrieve existing constraint (primary key and
unique) and drop them.
Thus don't use anymore DROP CONSTRAINT IF EXISTS (not implemented by e.g. old
versions of sqlserver). To do so a missing DISTINCT was necessary to avoid
duplicates.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 06 Jul 2016 20:14:55 +0200] rev 11432
[session] Ensure access to rql varmaker always mark the session as dirty
When one accesses the rql_varmaker, that's usually to use it. The pb was that when
the varmaker was already in page's data (which is stored as session data),
session storage such as redis won't see that the session data is dirty and has
to be stored back at the end of the request.
To fix this, systematically call set_page_data.
David Douard <david.douard@logilab.fr> [Wed, 20 Jul 2016 09:40:04 +0200] rev 11431
typo
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 20 Jul 2016 09:21:51 +0200] rev 11430
[native] Use cnx.system_sql instead of doexec method in syntax_tree_search
The latter handles connection issues and tries to reconnect. Method
syntax_tree_search appears to be called from quite a few place where it seems
useful to be resilient to connection issues (authentication for instance).
This reconnection logic appears to have disappeared at some point when working
on https://www.cubicweb.org/2919309. Could not find the exact reason though...
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 20 Jul 2016 09:09:34 +0200] rev 11429
Remove usage of cnx.ensure_cnx_set context manager
It has been deprecated since 3.21, no reason to keep using it internally.
Aurelien Campeas <aurelien.campeas@pythonian.fr> [Fri, 26 Jun 2015 10:26:00 +0200] rev 11428
[hooks/test/synschema] remove an unneeded skipTest.
Related to #5557633.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 19 Jul 2016 10:47:29 +0200] rev 11427
[test] Check retcode of subprocesses in devctl tests
And display decoded stdout in case of failure.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 20 Jul 2016 17:58:49 +0200] rev 11426
merge 3.23
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 08 Jul 2016 13:40:50 +0200] rev 11425
[pkg] Bump version to 3.24.0.dev0
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Jun 2016 10:35:22 +0200] rev 11424
[pkg] Drop NO_SETUPTOOLS option
setuptools is the defacto standard nowadays. The only place where
NO_SETUPTOOLS option was used is during packaging (RPM, Debian) and even in
this context, it seems that setuptools is the way to go
(see https://wiki.debian.org/Python/LibraryStyleGuide).
David Douard <david.douard@logilab.fr> [Tue, 12 Jul 2016 12:21:41 +0200] rev 11423
[debian] update cubicweb-dev.lintian-overrides
cubicweb/skeleton/debian/rules.tmpl is now cubicweb/skeleton/debian/rules
prevent lintian from complaining
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 05 Jul 2016 13:27:19 +0200] rev 11422
[pkg] Properly export data files in setup.py and adjust "newcube" test
With the new package layout (everything under "cubicweb" package), the custom
install_lib rule which makes use of include_dirs defined in __pkginfo__.py did
not prepend the package name to source directories to be copied. Fixing this.
Also, in setup.py's export() function, the destination directories' path to be
created during source tree walk was wrong.
All this makes cubicweb/skeleton directory (which is not a package) properly
installed by setup.py.
The test in cubicweb/devtools/test/unittest_devctl.py wasn't properly
implemented because it used an installation of cubicweb in "develop" mode
which shadows such packaging issues. Also it used "python -m cubicweb" instead
of directly "cubicweb-ctl" and the former appears to fall back to using the
cubicweb package *from sources* instead of the installed one.
Now that this test runs against the installed version of cubicweb, fix
MANIFEST.in to include tox.ini files (cubicweb's and skeleton's) as this is
expected from the test.
Closes #14127941.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 05 Jul 2016 10:44:05 +0200] rev 11421
[pkg] Handle verbose option in setup.py's export function
Make debugging easier.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 05 Jul 2016 10:20:33 +0200] rev 11420
[pkg] Drop unused EMPTY_FILE global variable
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 05 Jul 2016 13:00:38 +0200] rev 11419
[tox] Do not install package in "develop"
This might shadow so packaging issues.
And user can still pass --develop to tox.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 05 Jul 2016 13:02:14 +0200] rev 11418
[pkg] Bump version to 3.23.2
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 08 Jul 2016 09:59:18 +0200] rev 11417
pep8 bits
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 08 Jul 2016 10:17:42 +0200] rev 11416
[schema] Add a method on yams constraints to compute its unique name
used to identify it in the DB backend.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 08 Jul 2016 10:17:14 +0200] rev 11415
[migration] Test and fix case of addition of an attribute with some serialized constraint
It was crashing on attempt to remove an unexisting constraint. This code may be
removed safely as it's expected to be handled by the constraint removal hook.
Notice that adding a vocabulary on shortpara makes yams change the varchar max
size. This is arguable but not the point of this test, so simply adapt the max
size defined in the schema coherently so we don't have to bother with that at
this point.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 07 Jul 2016 14:10:45 +0200] rev 11414
[test] Add a migration test for update of a static vocabulary constraint
This is a constraint serialized to be checked by the DB backend, hence ensure
the old constraint is dropped and the new one is created.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Jun 2016 13:42:16 +0200] rev 11413
[schema2sql] Avoid "parsing" SQL statements for database initialization
A big SQL string was generated, then splitted. This caused bug if some value in
the schema (eg vocabulary, default) contained the separator (';').
To properly fix this, yield each individual statement instead of generating a
string.
Closes #14050899
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Jun 2016 11:18:01 +0200] rev 11412
[schema2sql] Drop most of the DB DROP related code
This code is dead for a while, it has been superseded by
`sql_drop_all_user_tables`.
Related to #14050899
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Jun 2016 11:00:08 +0200] rev 11411
[hooks] Use already imported module alias
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 13 Jul 2016 12:18:32 +0200] rev 11410
[schema2sql] Rename as_sql to constraint_value_as_sql
which is easier to grasp independantly of the context.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 13 Jul 2016 12:17:37 +0200] rev 11409
[schema2sql] Drop unused indent argument on aschema2sql
Related to #14050899
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Jun 2016 13:26:36 +0200] rev 11408
[schema2sql] More docstrings and minor API improvements
Along the way, renamed local `column` variable to `attr` where we're NOT manipulating a DB
column name but a schema attribute.
Related to #14050899
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Jun 2016 10:47:03 +0200] rev 11407
[schema2sql] inline eschema_attrs method
* not a public API
* doesn't makes things easier to grasp
-> useless
Related to #14050899
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 30 Jun 2016 13:25:43 +0200] rev 11406
[schema2sql] Give a rdef to check_constraint
This simplifies the API.
Related to #14050899
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 18:08:06 +0200] rev 11405
merge 3.20.16 in 3.22
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 16:13:12 +0200] rev 11404
merge 3.20.16 in 3.21
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 15:59:02 +0200] rev 11403
Added tag 3.20.16, debian/3.20.16-1, centos/3.20.16-1 for changeset e60a8e5d29ef
David Douard <david.douard@logilab.fr> [Tue, 12 Jul 2016 12:29:29 +0200] rev 11402
[debian] add a lintian override for source-is-missing about jquery.flot.js
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 12:49:19 +0200] rev 11401
[pkg] 3.20.16
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 12:47:28 +0200] rev 11400
[dataimport] fix count_lines function (closes #14407650)
ensure i allways exists whatever f content is
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 13:50:56 +0200] rev 11399
[captcha] improve a bit the redability of generated captcha images (closes #13500378)
David Douard <david.douard@logilab.fr> [Tue, 19 Jul 2016 13:56:40 +0200] rev 11398
3.20 branch
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Jun 2016 15:07:55 +0200] rev 11397
merge 3.23 changes
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Jun 2016 13:52:25 +0200] rev 11396
Added tag 3.23.1, centos/3.23.1-1, debian/3.23.1-1 for changeset 8f035d5d5953
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 29 Jun 2016 13:51:25 +0200] rev 11395
prepare 3.23.1
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Jun 2016 11:06:25 +0200] rev 11394
[debian] Adjust symlink to cubicweb package so that documention builds fine
Broken since source tree re-organization.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Jun 2016 09:12:02 +0200] rev 11393
[dataimport] Restore handling of Binary in ExtEntity's values
Broken since 62a7100d774b.
Closes #13973741.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 28 Jun 2016 15:02:04 +0200] rev 11392
[tox] Ensure virtualenv's python is used to build the documentation