# HG changeset patch # User Philippe Pepiot # Date 1551270991 -3600 # Node ID 04348101688a9d62f66c66f390624f3e9f8b042b # Parent 9dcb5e4e705b21722584de1aaf0f5a112c0f790b# Parent 15a068b2def5f452e1cff83e26fc6fc2001f397c Merge 3.26 diff -r 9dcb5e4e705b -r 04348101688a .hgignore --- a/.hgignore Fri Feb 22 15:48:34 2019 +0100 +++ b/.hgignore Wed Feb 27 13:36:31 2019 +0100 @@ -32,3 +32,4 @@ ^doc/_build ^doc/js_api/ test-results.xml +ve diff -r 9dcb5e4e705b -r 04348101688a .hgtags --- a/.hgtags Fri Feb 22 15:48:34 2019 +0100 +++ b/.hgtags Wed Feb 27 13:36:31 2019 +0100 @@ -630,3 +630,4 @@ 76d7b0aa94d2ac2e4b431949f20fe1fc51b1a6b1 3.26.5 8362503a92482e74a674c78fe009cf6ff346c817 3.26.6 8362503a92482e74a674c78fe009cf6ff346c817 debian/3.26.6-1 +ee4ad63c91e5406e29f079f1f2d3774361798ac8 3.26.7 diff -r 9dcb5e4e705b -r 04348101688a README --- a/README Fri Feb 22 15:48:34 2019 +0100 +++ b/README Wed Feb 27 13:36:31 2019 +0100 @@ -28,6 +28,9 @@ Details at https://cubicweb.readthedocs.io/en/3.26/tutorials/base/blog-in-five-minutes +You can also look at the latest builds on Logilab's jenkins: +https://jenkins.logilab.org/ + Documentation ------------- @@ -47,4 +50,17 @@ *in the message body* of emails. When submitting a revised version of a patch series, a prefix indicating the iteration number ```` of the series should be added to email subject prefixes; this can be achieved by specifying a -``--flag v`` option to ``hg email`` command. +``--flag v`` option to ``hg email`` command. If needed you can also use the +--in-reply-to option. + +Examples: + + hg email --to cubicweb-devel@lists.cubicweb.org --intro -r :: + hg email --flag V2 --to cubicweb-devel@lists.cubicweb.org -r :: + +If you have any questions you can also come on Logilab's public XMPP room using +a XMPP client: public@conference.jabber.logilab.org + +Mailing list: https://lists.cubicweb.org/mailman/listinfo/cubicweb-devel +Patchbomb extension: https://www.mercurial-scm.org/wiki/PatchbombExtension +Good practice on sending email patches: https://www.mercurial-scm.org/wiki/ContributingChanges#Emailing_patches diff -r 9dcb5e4e705b -r 04348101688a cubicweb/__pkginfo__.py diff -r 9dcb5e4e705b -r 04348101688a cubicweb/etwist/twconfig.py --- a/cubicweb/etwist/twconfig.py Fri Feb 22 15:48:34 2019 +0100 +++ b/cubicweb/etwist/twconfig.py Wed Feb 27 13:36:31 2019 +0100 @@ -76,7 +76,7 @@ ('uid', {'type' : 'string', 'default': None, - 'help': 'if this option is set, use the specified user to start \ + 'help': 'unix user, if this option is set, use the specified user to start \ the repository rather than the user running the command', 'group': 'main', 'level': WebConfiguration.mode == 'system' }), diff -r 9dcb5e4e705b -r 04348101688a cubicweb/pyramid/auth.py --- a/cubicweb/pyramid/auth.py Fri Feb 22 15:48:34 2019 +0100 +++ b/cubicweb/pyramid/auth.py Wed Feb 27 13:36:31 2019 +0100 @@ -214,6 +214,11 @@ YOU SHOULD STOP THIS INSTANCE unless your really know what you are doing !! + Please refer to to cubicweb-pyramid documentation on how to + write this pyramid.ini file: + https://cubicweb.readthedocs.io/en/latest/book/pyramid/settings/#pyramid-settings-file + Without it authentication WON'T work. + ''') policies.append( diff -r 9dcb5e4e705b -r 04348101688a cubicweb/pyramid/core.py --- a/cubicweb/pyramid/core.py Fri Feb 22 15:48:34 2019 +0100 +++ b/cubicweb/pyramid/core.py Wed Feb 27 13:36:31 2019 +0100 @@ -413,8 +413,12 @@ cwcfg = config.registry['cubicweb.config'] for cube in cwcfg.cubes(): - pkgname = 'cubes.' + cube - mod = __import__(pkgname) - mod = getattr(mod, cube) + try: + pkgname = 'cubicweb_{}'.format(cube) + mod = __import__(pkgname) + except ImportError: + pkgname = 'cubes.{}'.format(cube) + mod = __import__(pkgname) + mod = getattr(mod, cube) if hasattr(mod, 'includeme'): - config.include('cubes.' + cube) + config.include(pkgname) diff -r 9dcb5e4e705b -r 04348101688a cubicweb/server/serverconfig.py --- a/cubicweb/server/serverconfig.py Fri Feb 22 15:48:34 2019 +0100 +++ b/cubicweb/server/serverconfig.py Wed Feb 27 13:36:31 2019 +0100 @@ -115,7 +115,7 @@ ('uid', {'type' : 'string', 'default': None, - 'help': 'if this option is set, use the specified user to start \ + 'help': 'unix user, if this option is set, use the specified user to start \ the repository rather than the user running the command', 'group': 'main', 'level': (CubicWebConfiguration.mode == 'installed') and 0 or 1, }), diff -r 9dcb5e4e705b -r 04348101688a cubicweb/web/formfields.py --- a/cubicweb/web/formfields.py Fri Feb 22 15:48:34 2019 +0100 +++ b/cubicweb/web/formfields.py Wed Feb 27 13:36:31 2019 +0100 @@ -1074,10 +1074,10 @@ :class:`~cubicweb.web.formwidgets.Select`. """ - @staticmethod - def fromcardinality(card, **kwargs): + @classmethod + def fromcardinality(cls, card, **kwargs): kwargs.setdefault('widget', fw.Select(multiple=card in '*+')) - return RelationField(**kwargs) + return cls(**kwargs) def choices(self, form, limit=None): """Take care, choices function for relation field instance should take @@ -1267,7 +1267,9 @@ if isinstance(cstr, SizeConstraint) and cstr.max is not None: kwargs['max_length'] = cstr.max return fieldclass(**kwargs) - return RelationField.fromcardinality(card, **kwargs) + else: + fieldclass = kwargs.pop('fieldclass', RelationField) + return fieldclass.fromcardinality(card, **kwargs) FIELDS = { diff -r 9dcb5e4e705b -r 04348101688a cubicweb/web/views/autoform.py --- a/cubicweb/web/views/autoform.py Fri Feb 22 15:48:34 2019 +0100 +++ b/cubicweb/web/views/autoform.py Wed Feb 27 13:36:31 2019 +0100 @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . """ -.. autodocstring:: cubicweb.web.views.autoform::AutomaticEntityForm +.. autoclass:: AutomaticEntityForm Configuration through uicfg ``````````````````````````` diff -r 9dcb5e4e705b -r 04348101688a doc/book/admin/config.rst --- a/doc/book/admin/config.rst Fri Feb 22 15:48:34 2019 +0100 +++ b/doc/book/admin/config.rst Wed Feb 27 13:36:31 2019 +0100 @@ -28,7 +28,7 @@ Cubicweb resources configuration -------------------------------- -.. autodocstring:: cubicweb.cwconfig +.. automodule:: cubicweb.cwconfig .. _DatabaseInstallation: diff -r 9dcb5e4e705b -r 04348101688a doc/book/admin/setup.rst --- a/doc/book/admin/setup.rst Fri Feb 22 15:48:34 2019 +0100 +++ b/doc/book/admin/setup.rst Wed Feb 27 13:36:31 2019 +0100 @@ -64,6 +64,12 @@ apt-get update apt-get install cubicweb cubicweb-dev + # if you want pyramid, the recommended application server + apt-get install pyramid-cubicweb + + # or if you want twisted (considered deprecated) + apt-get install cubicweb-twisted + ``cubicweb`` installs the framework itself, allowing you to create new instances. ``cubicweb-dev`` installs the development environment allowing you to develop new cubes. @@ -155,7 +161,11 @@ Finally, install |cubicweb| and its dependencies, by running:: - pip install cubicweb + # for pyramid, the recommended application server + pip install cubicweb[pyramid] + + # or for twisted, considered deprecated (used by "cubicweb-ctl") + pip install cubicweb[etwist] Many other :ref:`cubes ` are available. A list is available at `PyPI `_ diff -r 9dcb5e4e705b -r 04348101688a doc/book/devrepo/repo/hooks.rst --- a/doc/book/devrepo/repo/hooks.rst Fri Feb 22 15:48:34 2019 +0100 +++ b/doc/book/devrepo/repo/hooks.rst Wed Feb 27 13:36:31 2019 +0100 @@ -4,7 +4,7 @@ Hooks and Operations ==================== -.. autodocstring:: cubicweb.server.hook +.. automodule:: cubicweb.server.hook Example using dataflow hooks diff -r 9dcb5e4e705b -r 04348101688a doc/conf.py --- a/doc/conf.py Fri Feb 22 15:48:34 2019 +0100 +++ b/doc/conf.py Wed Feb 27 13:36:31 2019 +0100 @@ -54,7 +54,6 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', - 'logilab.common.sphinx_ext', ] autoclass_content = 'both' diff -r 9dcb5e4e705b -r 04348101688a doc/index.rst --- a/doc/index.rst Fri Feb 22 15:48:34 2019 +0100 +++ b/doc/index.rst Wed Feb 27 13:36:31 2019 +0100 @@ -117,6 +117,7 @@ :maxdepth: 1 :glob: + How to contribute to the code base dev/* Indexes diff -r 9dcb5e4e705b -r 04348101688a doc/tutorials/base/blog-in-five-minutes.rst --- a/doc/tutorials/base/blog-in-five-minutes.rst Fri Feb 22 15:48:34 2019 +0100 +++ b/doc/tutorials/base/blog-in-five-minutes.rst Wed Feb 27 13:36:31 2019 +0100 @@ -8,11 +8,17 @@ For Debian or Ubuntu users, first install the following packages (:ref:`DebianInstallation`):: - cubicweb, cubicweb-dev, cubicweb-blog + cubicweb, cubicweb-dev, cubicweb-twisted, cubicweb-blog Windows or Mac OS X users must install |cubicweb| from source (see :ref:`SourceInstallation` and :ref:`WindowsInstallation`). +You can also install those packages using pip in a virtualenv:: + + virtualenv venv + source venv/bin/activate + pip install cubicweb[etwist] cubicweb-dev cubicweb-blog + Then create and initialize your instance:: cubicweb-ctl create blog myblog @@ -39,7 +45,12 @@ The `-D` option activates the debugging mode. Removing it will launch the instance as a daemon in the background, and ``cubicweb-ctl stop myblog`` will stop -it in that case. +it in that case. + +.. Note:: + + If you get a traceback when going on the web interface make sure your + version of twisted is **inferior** to 17. .. _AboutFileSystemPermissions: @@ -76,4 +87,3 @@ You'll have to restart the instance after modification in one of those files. This is it. Your blog is functional and running. Visit http://localhost:8080 and enjoy it! - diff -r 9dcb5e4e705b -r 04348101688a requirements/test-misc.txt --- a/requirements/test-misc.txt Fri Feb 22 15:48:34 2019 +0100 +++ b/requirements/test-misc.txt Wed Feb 27 13:36:31 2019 +0100 @@ -25,6 +25,7 @@ waitress >= 0.8.9 wsgicors >= 0.3 pyramid_multiauth +repoze.lru ## cubicweb/sobject/test cubicweb-comment == 1.12.2 diff -r 9dcb5e4e705b -r 04348101688a tox.ini