1. 08 Feb, 2020 1 commit
  2. 11 Mar, 2019 1 commit
    • Philippe Pepiot's avatar
      [schema] drop monkeypatch "name_for" on BaseConstraint · 661dd0436c01
      Philippe Pepiot authored
      BaseConstraint doesn't have "name_for" method, this is just an addition for
      cubicweb needs.
      
      Implement this as a function instead of a monkeypatch to avoid having
      "name_for" not defined because cubicweb.schema hasn't been imported.
      
      In particular this fix running cubicweb/server/test/unittest_schema2sql.py::SQLSchemaTC::test_known_values alone.
      661dd0436c01
  3. 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
  4. 13 Apr, 2017 1 commit
    • Sylvain Thénault's avatar
      [entities] Fix backward compat of IDublinCore adapter wrt dc_long_title · 608481168432
      Sylvain Thénault authored
      `entity.dc_long_title()` used to fallback to `dc_title()`, and most entity types
      were relying on this, thus only implementing the later.
      
      Since introduction of the IDublinCore adapter, if one call
      `entity.dc_long_title()` on an entity that only implements `dc_title()`, it will retrieve
      the adapter which will then call its own `title()` method instead of the
      `dc_title()` method of the entity as expected.
      
      Fix this by calling instead `entity.dc_title()` which will eventually kick in the
      backward compat layer if necessary.
      
      --HG--
      branch : 3.25
      608481168432
  5. 30 Sep, 2016 2 commits
  6. 08 Jul, 2016 1 commit
  7. 10 Jan, 2017 1 commit
    • Denis Laxalde's avatar
      [entities] Introduce an IDublinCore adapter · 8de62610cea2
      Denis Laxalde authored
      Move all dc_ methods from AnyEntity to the new IDublinCore adapter and proxy
      them through a __getattr__ method on AnyEntity.
      
      Current test suite should be enough.
      
      Closes #3119992.
      8de62610cea2
  8. 22 Jun, 2016 1 commit
  9. 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
  10. 17 Feb, 2015 1 commit
  11. 13 Jan, 2014 1 commit
  12. 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]
      8e88576787c3
  13. 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
  14. 25 Apr, 2013 1 commit
  15. 23 Apr, 2013 1 commit
  16. 27 Mar, 2013 1 commit
  17. 22 Aug, 2012 1 commit
  18. 03 Jul, 2013 1 commit
    • Aurelien Campeas's avatar
      [constraint] more robust unicity constraint failures reporting for end-users · 0f1504a9fb51
      Aurelien Campeas authored
      Postgres or Sqlserver have limits on the index names (around resp. 64
      and 128 characters). Because `logilab.database` encodes the `unique
      together` constraint rtypes in the index names, we sometimes get
      truncated index names, from which it is impossible to retrieve all
      rtypes.
      
      In the long run, the way such index are named should be changed.
      
      In the short term, we try to reduce the end-user confusion resulting
      from this design flaw:
      
      * in source/native, the regex filtering ``IntegrityError`` message does
        not impose an `_idx` suffix, which indeed may be absent (the result being an
        UI message that resembles a catastrophic failure),
      
      * also we avoid including a trailing " (double quote) from the error
        message
      
      * in entities/adapters, the well-named ``IUserFriendly`` adapter is made a
        bit smarter about how to handle missing rtypes.
      
      * the adapter also always produces a global message explaining the
        issue (and the fact that sometimes, the user is not shown all the
        relevant info)
      
      * i18n is updated
      
      Closes #2793789
      
      --HG--
      branch : stable
      0f1504a9fb51
  19. 23 Jan, 2012 1 commit
    • Sylvain Thénault's avatar
      [vreg] move base registry implementation to logilab.common. Closes #1916014 · 2a3c1b787688
      Sylvain Thénault authored
      A new logilab.common.registry module has been created with content from
      
      * cw.vreg (the whole things that was in there)
      * cw.appobject (base selectors and all).
      
      In the process, we've done some renaming:
      
      * former selector functions are now known as "predicate", though you still
        use predicates to build an object'selector
      
      * hence `objectify_selector` decorator is now `objectify_predicate`
      
      * the top level registry is now `RegistryStore` (was `VRegistry`)
      
      Also there is no more need for the @lltrace decorator.
      
      On the CubicWeb side, the `selectors` module has been renamed to `predicates`.
      
      There should be full backward compat with proper deprecation warnings.
      2a3c1b787688
  20. 28 Oct, 2011 1 commit
  21. 28 Sep, 2011 1 commit
  22. 21 Sep, 2011 1 commit
  23. 10 Feb, 2011 1 commit
  24. 21 Jan, 2011 1 commit
  25. 21 Dec, 2010 1 commit
  26. 22 Oct, 2010 1 commit
  27. 12 Oct, 2010 1 commit
  28. 26 Aug, 2010 1 commit
  29. 26 Jul, 2010 1 commit
  30. 16 Jul, 2010 1 commit
  31. 05 Jul, 2010 2 commits
  32. 17 Jun, 2010 1 commit
  33. 10 Jun, 2010 4 commits
  34. 09 Jun, 2010 1 commit