1. 01 Aug, 2019 1 commit
  2. 31 Jul, 2019 1 commit
  3. 29 May, 2019 1 commit
    • Laurent Peuch's avatar
      [pyramid/ctl] add a new option to activate the debugtoolbar (-t) · 30b205676182
      Laurent Peuch authored
      While this toolbar isn't yet very integrated with CW, it integrates an inline
      debugging shell like werkzeug for flask or django_extensions which greatly
      helps debugging on exception.
      
      It can already be manually activated by writting "pyramid.includes =
      pyramid_debugtoolbar" but it's hidden somewhere in the documentation and not
      very accessible and annoying to do.
      
      Closes #17219765
      30b205676182
  4. 27 Aug, 2019 1 commit
  5. 12 Jun, 2019 1 commit
    • Laurent Peuch's avatar
      [pyramid/debug] on every request display request path and selected controller · 90348f847b4b
      Laurent Peuch authored
      This will display lines like:
      
      2019-06-12 16:26:57 - (cubicweb.pyramid.bwcompat) INFO: REQUEST [view] '/wiki/334037' selected controller <cubicweb.web.views.basecontrollers.ViewController object at 0x7f133802ae90> at /root/.virtualenvs/abreton/local/lib/python2.7/site-packages/cubicweb/web/views/basecontrollers.py:120
      
      2019-06-12 16:26:59 - (cubicweb.pyramid.bwcompat) INFO: REQUEST [data] '/data/ea5eb3b6f89fba0ff4b671093c88d3dd/images/cartouche-mur.jpg' selected controller <cubicweb.web.views.staticcontrollers.DataController object at 0x7f1332a84d50> at /root/.virtualenvs/abreton/local/lib/python2.7/site-packages/cubicweb/web/views/staticcontrollers.py:179
      
      The make debugging easier as this isn't done already. Most other web frameworks
      do something similar for the developper to be able to understand what is
      happening right now.
      
      Closes #17219741
      90348f847b4b
  6. 21 May, 2019 3 commits
  7. 22 Aug, 2019 1 commit
  8. 15 May, 2019 4 commits
  9. 10 May, 2019 2 commits
  10. 08 May, 2019 4 commits
  11. 05 Apr, 2019 1 commit
  12. 26 Mar, 2019 1 commit
  13. 05 Apr, 2019 1 commit
    • Denis Laxalde's avatar
      Drop python2 support · 26744ad37953
      Denis Laxalde authored
      This mostly consists in removing the dependency on "six" and updating
      the code to use only Python3 idioms.
      
      Notice that we previously used TemporaryDirectory from
      cubicweb.devtools.testlib for compatibility with Python2. We now
      directly import it from tempfile.
      26744ad37953
  14. 28 Mar, 2019 1 commit
  15. 22 Mar, 2019 1 commit
    • Denis Laxalde's avatar
      Drop more deprecated code · 85194bd49119
      Denis Laxalde authored
      This follows up on changeset a8c1ea390400, in which code deprecated
      using logilab.common.deprecation got dropped. Now we also drop code
      deprecated using stdlib's warn(<msg>, DeprecationWarning).
      
      Notice that, as a consequence of dropping old/new etypes aliases in
      cubicweb/schema.py, we drop the import ETYPE_NAME_MAP (no longer
      needed); but since other modules imported that name from
      cubicweb.schema, we need to update the import statement to use
      "cubicweb" directly.
      85194bd49119
  16. 21 Mar, 2019 1 commit
    • Denis Laxalde's avatar
      Remove Twisted web server · 9d88e1177c35
      Denis Laxalde authored
      Twisted web server is not used anymore and has been superseded by
      pyramid many years ago. Furthermore, our usage is not compatible with
      Python 3. So we drop the "etwist" sub-package.
      
      As a consequence, "all-in-one" configuration type gets dropped as it was
      Twisted-specific. We resurrect it in cubicweb/pyramid/config.py by only
      keeping options used by the "pyramid". Similarly, we introduce a
      AllInOneCreateHandler in cubicweb/pyramid/pyramidctl.py that is
      basically the one that lived in cubicweb/etwist/twctl.py and is used to
      create the "all-in-one" instance. Added a TODO here about "pyramid.ini"
      that could be generated at the end of bootstrap() method.
      
      In cubicweb/devtools/httptest.py, CubicWebServerTC is now equivalent to
      CubicWebWsgiTC and the latter is dropped.
      9d88e1177c35
  17. 14 Mar, 2019 1 commit
    • Denis Laxalde's avatar
      Drop most of deprecated code · a8c1ea390400
      Denis Laxalde authored
      As in previous changesets, most code has been deprecated since a very
      long time. This changeset concerns "core" cubicweb modules
      (e.g. "server", "appobjects") for which it's not easy to handle change
      atomically.
      
      In cubicweb/server/querier.py, we adjust empty_rset() function as a
      result of "rqlst" argument of ResultSet being dropped. (There was no use
      of the keyword argument anyways.)
      a8c1ea390400
  18. 12 Feb, 2019 2 commits
  19. 29 Oct, 2018 2 commits
    • Philippe Pepiot's avatar
      Fix flake8 issues since release 3.6.0 · 2fcb53ee5178
      Philippe Pepiot authored
      Flake8 had a new release which raise new issues, namely:
      
      W504: line break after binary operator
      F841: local variable 'ex' is assigned to but never used
      W605: invalid escape sequence
      F821: undefined name 'buffer' (noqa seems the only way to avoid this false positive)
      
      Also pin flake8>=3.6 in our tests and make explicit that we use python3 to run
      flake8 tests.
      
      --HG--
      branch : 3.26
      2fcb53ee5178
    • Philippe Pepiot's avatar
      Fix flake8 issues since release 3.6.0 · c703dc95c82e
      Philippe Pepiot authored
      Flake8 had a new release which raise new issues, namely:
      
      W504: line break after binary operator
      F841: local variable 'ex' is assigned to but never used
      W605: invalid escape sequence
      F821: undefined name 'buffer' (noqa seems the only way to avoid this false positive)
      
      Also pin flake8>=3.6 in our tests and make explicit that we use python3 to run
      flake8 tests.
      c703dc95c82e
  20. 24 Aug, 2018 1 commit
    • Philippe Pepiot's avatar
      Fix possible double import of cubes · 7e670235174f
      Philippe Pepiot authored
      For a new-style cube, if we import "cubicweb_<name>" and then import
      "cubes.<name>", the cube will be imported twice. cubes.<name> and then
      cubicweb_name is ok though...
      
      When using pyramid, we try to find which cube define a "includeme" by importing
      them with the name "cubes.<name>", so we (possibly ?) double import all new-style cube.
      This case may also occur in tests with PyramidCWTest.
      
      Touching the import loader to fix this scares me, so let's fix this by testing
      "cubicweb_<name>" *before* "cubes.name" (for old style cubes, importing
      cubicweb_<name> raise ImportError).
      
      --HG--
      branch : 3.26
      7e670235174f
  21. 05 Mar, 2019 1 commit
  22. 05 Mar, 2018 1 commit
    • Denis Laxalde's avatar
      [pyramid] Recreate CWSession entity when eid no longer exists · 77a543e7878a
      Denis Laxalde authored
      As noted in comment, it might occur that we receive a "sessioneid" from
      a valid cookie while respective CWSession got dropped (typical case is
      db being recreated while users got preserved). In such case, we just
      recreate the CWSession entity as if it did not exist.
      
      --HG--
      branch : 3.26
      77a543e7878a
  23. 12 Dec, 2017 1 commit
    • Denis Laxalde's avatar
      [pyramid] Let logging be configured through .ini file · cd760c411242
      Denis Laxalde authored
      We do not initialize logging in CubicWebPyramidConfiguration thus
      preventing logging to be started with cubicweb's configuration. On the
      other hand, any logging configuration defined in ``development.ini``
      file will be loaded by whatever start the instance using this file (i.e.
      pserve, gunicorn, etc.). The benefit is that logging can now be
      configured per "qualified name" in this file (i.e. one can easily set
      the DEBUG level for the application cube while keeping all dependencies'
      level to WARNING). In the development.ini template, we add logger
      configurations for "logilab" and "cubicweb" qualified names (along with
      those of the application cube).
      cd760c411242
  24. 01 Dec, 2017 1 commit
  25. 24 Oct, 2017 1 commit
  26. 30 Oct, 2017 2 commits
  27. 22 Jun, 2017 1 commit
  28. 06 Jun, 2017 1 commit
    • Denis Laxalde's avatar
      [pyramid] Only expose 'cubicweb.bwcompat' setting for "all-in-one" configuration type · 36f1c7ab9010
      Denis Laxalde authored
      The "pyramid" instance configuration does not work with "cubiwceb.bwcompat"
      mode (on purpose). Yet, having the setting exposed in development.ini file
      (generate by `cubicweb-ctl create --config pyramid <cube> <instance>` command)
      is misleading and we want to remove it.
      
      Thus, we only query this setting when cubicweb configuration is "all-in-one" and
      drop the setting line from templated development.ini file. If the option is
      found and True for any other configuration type, we issue a user warning (and
      ignore the option).
      
      --HG--
      branch : 3.25
      36f1c7ab9010