1. 20 Mar, 2020 1 commit
    • Laurent Wouters's avatar
      [rql] Store selected variables for RQL select queries in ResultSet (#17218476) · 6eae252361e5
      Laurent Wouters authored
      By storing the name of the selected variables for RQL select queries in the
      ResultSet (within the "variables" attribute), the information can be passed
      down to specific protocols, e.g. rqlio that may wish to pass is down further
      to clients.
      In turn, clients can then choose to present the results of RQL select queries
      as symbolic bindings using the names used in the query's projection, instead of
      ordinal arrays.
  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.
  3. 22 Mar, 2019 1 commit
  4. 30 Nov, 2017 1 commit
    • Denis Laxalde's avatar
      [ssplanner] Prevent execution of write queries involving computed relations · 68ca7fe0ca29
      Denis Laxalde authored
      Previously, setting a computed relation upon entity creation or
      modification (using the ORM or an RQL query) would usually fail with an
      operational error in the backend ("no such table"). However, under some
      mysterious circumstances (like passing a string as value in cw_set for a
      computed relation), the RQL to SQL transformation would simply drop the
      To prevent this to happen, we add a check for computed relation before
      adding a relation to an execution plan. This check raises a QueryError.
      It happens in several places:
      * in querier.InsertPlan.add_relation_def() (called from several places
        in ssplanner steps) for INSERT queries,
      * in ssplanner.UpdateStep.execute() for SET queries and,
      * in ssplanner.SSplanner.build_delete_plan() for DELETE queries.
      Tests added to unittest_querier.py because unittest_sslplanner.py looked
      inappropriate (it has only unit tests) and the former already had a
      NonRegressionTC class.
  5. 03 Nov, 2017 2 commits
  6. 15 Mar, 2017 1 commit
  7. 10 Mar, 2017 2 commits
  8. 05 Oct, 2016 1 commit
    • Sylvain Thénault's avatar
      [repository] Drop the entities.extid column and associated cache · 51c160677afe
      Sylvain Thénault authored
      This was not necessary anymore with promoted usage of the new data import API.
      Turn repository's _type_extid_cache to _type_cache with only the entity's type
      as key.
      This introduces an backward incompatible change: entity_metas dict doesn't
      contains anymore the extid key, but it doesn't seem used at all anywhere, so
      this sounds acceptable.
      Closes #15538317
  9. 11 Oct, 2016 1 commit
  10. 06 Oct, 2016 1 commit
  11. 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
  12. 20 May, 2016 1 commit
    • Sylvain Thénault's avatar
      [devtools] Simplify test configuration's init · 73ac69970047
      Sylvain Thénault authored
      Specify module's __file__ instead of apphome. __file__ is saved on the class as
      it will be used later (eg to find the proper pg cluster without relying on
      shared dictionnary modifications).
      This will require some tests update, but it should be less common in cubes than
      in cubicweb itself.
  13. 16 Jan, 2016 1 commit
    • Denis Laxalde's avatar
      Reorganize source tree to have a "cubicweb" top-level package · 0b59724cb3f2
      Denis Laxalde authored
      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
  14. 11 Jun, 2014 1 commit
  15. 10 Jun, 2014 1 commit
    • 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
      * 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
      * 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
      Closes #3837233
  16. 28 Jan, 2014 1 commit
    • Aurelien Campeas's avatar
      [hooks/security] allow edition of attributes with permissive permissions · 7099bbd685aa
      Aurelien Campeas authored
      If an attribute has more permissive security rules than the entity
      type itself, we should be green and not deny action because of an
      early global entity permission check (with the more restrictive
      Only if one attribute with the entity-level permission rules is edited
      will the global check be performed.
      * the "if action == 'delete'" check at the entry of
        check_entity_attributes is a guard for a condition currently not
        happening in cubicweb itself (but application hooks could
        conceivably call this function with a 'delete' action)
      Closes #3489895.
      branch : stable
  17. 20 Dec, 2013 1 commit
    • Sylvain Thénault's avatar
      [rql2sql] remove special behaviour of symmetric relation vs DISTINCT · 54ead5f372bb
      Sylvain Thénault authored
      0542a85fe667 replacing SQL OR by hooks for symmetric relations allows that.
      This involve a single test value change for a border case: when querying a
      symmetric relation without specifying the subject nor the object, you may get
      some duplicated result. IMO this is fine to let the user explicitly use DISTINCT
      or not and to remove the dedicated handling we had which didn't let any choice.
      Related to #3259713
  18. 08 Jan, 2014 1 commit
    • Aurelien Campeas's avatar
      [schema] fix unique together index handling · 8e88576787c3
      Aurelien Campeas authored
      We now provide a more compact indexname, using the schema constraint
      entity type and the position of the columns set in the entity type
      unique constraints list.
      This avoids a nasty name truncation issue.
      The UniqueTogetherError object is made smarter: it computes the
      rtypes, abstracting the underlying backend (pg/sqlserver vs sqlite).
      The `user friendly` adapter is much simplified since there is no
      longer any truncation issue.
      Uses a new logilab.database version (ticket #151507) and a new yams
      version (ticket #189299)
      Closes #2514939
      [jcr: disable hooks when temporarily dropping CWUniqueTogetherConstraint entities]
  19. 03 Dec, 2013 1 commit
  20. 09 Oct, 2013 1 commit
  21. 29 Jan, 2014 1 commit
  22. 24 Oct, 2013 1 commit
  23. 31 Jul, 2013 1 commit
  24. 01 Jul, 2013 1 commit
  25. 22 Jan, 2014 1 commit
  26. 08 Apr, 2013 1 commit
  27. 28 Aug, 2014 1 commit
    • Lea Capgen's avatar
      [CWEP002] properly handle serialization of computed relations · 19a683a0047c
      Lea Capgen authored
      We now:
      * have CWComputedRelation in the bootstrap schema to store computed relations
      * properly serialize/deserialize it
      * test first if the database has been migrated and contains the related table
      Related to #3546717
      [jcr: adjust unittest_querier to pass with the added entity type]
  28. 14 Feb, 2013 1 commit
  29. 26 Nov, 2012 1 commit
  30. 10 Sep, 2012 1 commit
  31. 10 Apr, 2012 2 commits
  32. 05 Apr, 2012 1 commit
  33. 26 Mar, 2012 1 commit
  34. 16 Mar, 2012 1 commit
  35. 13 Feb, 2012 1 commit
  36. 12 Dec, 2011 1 commit
  37. 05 Dec, 2011 1 commit