1. 08 Feb, 2020 1 commit
  2. 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
  3. 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
  4. 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
  5. 30 Sep, 2016 1 commit
    • Sylvain Thénault's avatar
      flake8 and all · 432f87a63057
      Sylvain Thénault authored
      * update some copyright
      * drop most __docformat__ declaration
      * fix some flake8 warnings / errors
      432f87a63057
  6. 06 Oct, 2016 1 commit
  7. 30 Sep, 2016 2 commits
    • Sylvain Thénault's avatar
      [entity] Stop returning source information in cw_metainformation() · 7518cb58ab4c
      Sylvain Thénault authored
      We should not need that. It has been introduced to handle things we should not
      do and probably don't do anymore (e.g. attempting to grasp recursive import of
      several sites).
      
      Related to #15538288.
      7518cb58ab4c
    • Sylvain Thénault's avatar
      [entity] Stop linking to external site for external entities · 7b7108eb8178
      Sylvain Thénault authored
      This behaviour was ok when we had "true" multi-sources but its rather painful
      with datafeed sources. Also, it makes absolute_url() costlier than what it
      should. Besides, it relies on cw_metainformation()['source'] that is pending for
      removal.
      
      Instead, add a link to the original object in the metadata view (the one that
      displays eid and source at the bottom right corner of the primary view).
      
      Related to #15538288.
      7b7108eb8178
  8. 19 Oct, 2016 1 commit
  9. 06 Jun, 2016 1 commit
  10. 15 Apr, 2016 2 commits
  11. 18 Nov, 2016 1 commit
    • Sylvain Thénault's avatar
      [entity/optimization] Cache rset when entity.related is called with entities=False · 67185e65f020
      Sylvain Thénault authored
      If fail to see why we couldn't cache in this case, while this is important for
      optimization reason: when doing a single HTTP request, some queries are done two
      or three times because of predicates / uicfg or alike.
      
      Also always store tuple and not list in the cache, because:
      * else we get some regression
      * and inconsistent result type (tuple or list)
      * and it simply feels better to cache an unmutable object.
      67185e65f020
  12. 25 Feb, 2016 1 commit
  13. 16 Jan, 2016 1 commit
    • Denis Laxalde's avatar
      Reorganize source tree to have a "cubicweb" top-level package · 0b59724cb3f2
      Denis Laxalde authored
      Basically:
      
      mkdir cubicweb
      hg mv *.py -X setup.py cubicweb
      hg mv dataimport devtools entities etwist ext hooks i18n misc schemas server skeleton sobjects test web wsgi cubicweb
      
      Other changes:
      
      * adjust path to cubicweb-ctl in devtools tests
      * update setup.py to avoid importing __pkginfo__ (exec it instead),
        replace os.path.walk by os.walk and prepend `modname` here and there
      * update tox.ini to account for new test locations
      * update doc/conf.py so that it still finds __pkginfo__.py and CWDIR in
        doc/Makefile
      0b59724cb3f2
  14. 14 Mar, 2014 1 commit
  15. 02 May, 2014 1 commit
    • Aurelien Campeas's avatar
      deprecate get/set_shared_data API · b7b71be569cf
      Aurelien Campeas authored
      Session or transaction data must be used instead.
      
      We must forward .transaction_data to web/request from
      which it was missing (this is indeed a _cw object API).
      
      Closes #3799036.
      b7b71be569cf
  16. 28 Apr, 2014 1 commit
  17. 10 Jun, 2014 2 commits
    • Aurelien Campeas's avatar
      [entity,storage] remove hackish code from the bfss path · 59a79300f213
      Aurelien Campeas authored
      The ClientConnection/Connection duality brought some painful hacks
      that are no longer needed.
      
      Hence we can send entity._cw_update_attr_cache and ._cw_dont_cache_attribute
      to the grave.
      
      Related to #3837233
      59a79300f213
    • Aurelien Campeas's avatar
      [repoapi] fold ClientConnection into Connection · 635cfac73d28
      Aurelien Campeas authored
      Connection replaces ClientConnection everywhere.
      
      Some notes:
      
      * testlib: .client_cnx and .repo_cnx become aliases of .cnx (we might
        not want to tell people to update their tests again for just no real
        benefit, so we'll live with these aliases for a while)
      
      * entity.as_rset must not be cached because we risk caching result
        sets having a Connection object as .req (helps unittest_breadcrumbs)
      
      * entity._cw_dont_cache_attributes loses its repo/request special
        paths and only keeps its storage/bfss user (this helps
        unittest_wfobjs)
      
      * moreover, entity.cw_instantiate and .cw_set stop overriding the
        attributes cache *after* the before_*_entity hooks have run, because
        there is no need to (it is now actually harmful to do it and
        unittest_hooks.test_html_tidy* tests remain green because of this)
      
      * rset._build_entity sticks its .req onto the entity just fetched from
        the cache, because otherwise it might carry a _cw that is a
        Connection object where a Request is expected (helps
        unittest_views_actions)
      
      * we get overall better cache usages (entity caches were split over
        Request + ClientConnection and Connection), hence the changes
        unittest_entity and unittest_wfobjs
      
      * void the ecache when providing the cnx to a request object
      
        Having the entity cache pre-filled when we bind it to the request
        object hurts because these entities are bound to Connection objects,
        that lack e.g. `.form` or `.add_js` and crash the views subsystem.
      
        Thus, the unittest_testlib.test_error_raised test will are kept
        green.
      
      
      Closes #3837233
      635cfac73d28
  18. 13 Jan, 2014 1 commit
  19. 12 Dec, 2013 1 commit
  20. 10 Oct, 2013 1 commit
  21. 23 Jan, 2014 1 commit
    • Sylvain Thénault's avatar
      [multi-sources-removal] Drop entities.source column · 032825bbacab
      Sylvain Thénault authored
      Since we remove federated multi-sources support, the same value ('system')
      is always stored in this column and so could be removed. Also, cleanup
      repository caches and a few api where the very same useless information could
      be removed.
      
      Closes #2919300, at last
      
      [jcr: restore sanity check of etype against schema in checkintegrity.has_eid]
      032825bbacab
  22. 17 Oct, 2013 1 commit
  23. 11 Jul, 2013 1 commit
  24. 08 Oct, 2013 1 commit
  25. 26 Aug, 2013 1 commit
    • Aurelien Campeas's avatar
      remove 3.9 bw compat · 697a8181ba30
      Aurelien Campeas authored
      In cw 3.9, interfaces are deprecated and replaced with adapters,
      yielding a lot of bw compat in many places -- most if this patch is
      concerned with the interface bw compat
      
      - cwvreg: interface cleanup
      
      - doc/adapters.rst: interface cleanup
      
      - entities/adapters.py, wfobjs.py: interfaces bw compat
      
      - entity.py: interfaces bw compat, also get_value, delete,
        attr_metadata, has_perm, set_related_cache, clear_related_cache,
        clear_related_cache, related_rql
      
      - predicates.py: score_interfaces & implements
      
      - interfaces.py & mixins.py: 100% gone
      
      - view.py: implement_adapter_compat, unwrap_adapter_compat
      
      - calendar.py, editcontroller.py, ibreadcrumbs.py, navigation.py, xmlrss.py:
        interface bw compat
      
      - treeview.py: salvage one function from mixins.py
      
      
      Related to #2782004.
      697a8181ba30
  26. 24 Jul, 2013 1 commit
  27. 17 May, 2013 1 commit
  28. 25 Apr, 2013 1 commit
  29. 22 Apr, 2013 1 commit
  30. 23 Apr, 2013 1 commit
  31. 13 Nov, 2014 1 commit
  32. 30 Jul, 2014 1 commit
  33. 02 May, 2014 1 commit
    • Aurelien Campeas's avatar
      remove most 3.10 bw compat · 8391bf718485
      Aurelien Campeas authored
      Related to #3799117.
      
      The boxes and entityvcomponent objects cannot really be removed as they
      are still used throughout the code base (and possible cubes).
      
      This may be caused by a non-working deprecation and needs some more
      work.
      8391bf718485
  34. 18 Jan, 2013 1 commit
    • Aurelien Campeas's avatar
      [entity,views/json] backout 353bbd17a8b6 (reopens #2559931) · 5ab6ec83d5ba
      Aurelien Campeas authored
      Calling .complete() unconditionnally from the json encoder is unsafe
      since on entity creation validation:
      
      * an eid may have been drawn (hence even .has_eid() would not help)
        while processing form data in the edit controller
      
      * a ValidationError may have been raised and the entity-creating
        transaction rollbacked
      
      This leads to a crash on the return path from the validation to the
      browser, where the json_dumps((status, args, entity)) call will
      stumble upon the .complete() call which will fail because the entity
      does not (any more) exist in the database.
      
      --HG--
      branch : stable
      5ab6ec83d5ba
  35. 17 Jan, 2013 1 commit
  36. 27 Mar, 2013 2 commits