An error occurred fetching the project authors.
  1. 04 May, 2022 1 commit
    • Arnaud Fontaine's avatar
      py2/py3: Make Products code compatible with both python2 and python3. · a17bb910
      Arnaud Fontaine authored
      Done through various 2to3 fixers (zope.fixers, modernize, future) and manual
      changes. This is a single commit so that we have a clearer picture of how code
      converted with my2to3 should look like.
      
      Except straightforward @implementer decorator 2to3 fixer, only product/ folder
      was considered as the goal was to be able to create an ERP5Site.
      
      * Use @implementer decorator introduced in zope.interface 3.6.0 (2010):
      
        The implements syntax used under Python 2.X does not work under 3.X, since it
        depends on how metaclasses are implemented and this has changed. Instead it
        now supports a decorator syntax (also under Python 2.X).
      
        Applied thanks to 2to3 `zope.fixers` package.
      
      * Use `six.moves` rather than `future` install_aliases() feature because the
        latter use unicode_literals and "wraps" module aliases so that unicode() are
        returned for text rather than str() (Python2 standard library). This notably
        breaks BusinessTemplate code which uses urllib quote() for filesystem paths...
      
      * No more unbound methods in python3 so use six.get_unbound_function().
      
      * dict.(iteritems,iterkeys,itervalues)() => six.\1(dict) thanks to `dict_six`
        2to3 fixer from `modernize`:
        $ python-modernize -w -f dict_six product/
      
      * Manually make sure that dict.{items,values,keys}() returns a real list when it
        is latter modified rather than a dict_{items,values,keys} (ensure_list()). By
        default, 2to3 blindly does list(dict.{items,values,keys}()) which is not
        acceptable from performances point of view. With my2to3, this will be possible
        to handle such case automatically.
      
      * Replace cStringIO.StringIO() by six.moves.cStringIO() (a module alias for
        cStringIO.StringIO() on py2 and io.StringIO() on py3).
      
      * Use six.text_type which maps to unicode() on py2 and str() on py3. This also
        makes a clearer difference between text and binary strings.
      
      * Replace map()/filter() with lambda function by list comprehension (this has
        the benefit to avoid casting to list for py3 as it returns iterators).
      a17bb910
  2. 29 Apr, 2021 1 commit
  3. 26 Mar, 2019 1 commit
  4. 03 Sep, 2018 1 commit
  5. 01 Sep, 2018 2 commits
    • Vincent Pelletier's avatar
      b0978eaf
    • Vincent Pelletier's avatar
      SQLExpression: Fold _getSelectDict into __init__, its only caller. · 028060e6
      Vincent Pelletier authored
      _getSelectDict was also calling itself on sub-sql_expressions, but this
      was useless: they would already have called it, and discarded one of its
      returned values. Instead, preserve both returned values in __init__ and
      access these attributes directly when iterating over sub-sql_expressions.
      Also, fold canMergeSelectDict back into its only 2 call places, saving one
      getattr and one call.
      Also, get rid of a few properties which were only used in _getSelectDict.
      Also, get rid of two iterable copies: sql_expression_list when it is
      already a list (no need to cast it again to a list, we just built one with
      the list comprehension), and select_dict being cast into a list when
      entering _getSelectDict, despite not being used (besides in extra
      _getSelectDict calls, which are now entirely avoided).
      028060e6
  6. 07 Oct, 2015 3 commits
  7. 04 Oct, 2015 1 commit
    • Kazuhiko Shiozaki's avatar
      Add auto_extend_select_list argument in buildSQLQuery() and use alias in... · bdcdaca8
      Kazuhiko Shiozaki authored
      Add auto_extend_select_list argument in buildSQLQuery() and use alias in group_by_expression and order_by_expression.
      
      If True, select_list is automatically extended to have columns used in
      group_by_list and order_by_list. It is useful when use
      select_expression in inner query and use group_by_expression or
      order_by_expression in outer query.
      bdcdaca8
  8. 19 Nov, 2014 1 commit
  9. 08 Nov, 2014 1 commit
    • Kazuhiko Shiozaki's avatar
      use fulltext search in title and description. · d47df833
      Kazuhiko Shiozaki authored
      * to quickly setup catalog_full_text table, you can use the following SQL.
      
        REPLACE INTO catalog_full_text SELECT uid, title, description FROM catalog;
      
      * non fulltext queries like '=abc', '>abc', '%abc%' are supported.
      
      * now erp5_full_text_mroonga_catalog is used for unit tests thus I recommend using it instead of erp5_full_text_myisam_catalog.
      
      * to migrate existing MyISAM full_text table into Mroonga, you can use the following SQL.
      
        ALTER TABLE full_text DROP KEY SearchableText,
          ENGINE = mroonga,
          ADD FULLTEXT KEY SearchableText (`SearchableText`) COMMENT 'parser "TokenBigramSplitSymbolAlpha"';
      
      * fulltext search score is no longer provided as (column_name) but now provided as (column_name)__score__.
      
      * (category)_title, like source_title, related keys are automatically generated. (category)_description keys as well.
      d47df833
  10. 16 Oct, 2014 1 commit
  11. 04 Sep, 2014 1 commit
  12. 08 Jul, 2014 1 commit
  13. 17 Oct, 2011 1 commit
  14. 21 Jan, 2011 1 commit
  15. 20 Jan, 2011 1 commit
  16. 13 Jan, 2011 1 commit
  17. 03 Jan, 2011 1 commit
  18. 14 Oct, 2010 1 commit
  19. 28 Jul, 2010 1 commit
  20. 12 Mar, 2010 1 commit
  21. 11 Mar, 2010 1 commit
    • Vincent Pelletier's avatar
      Fix regression introduced in r33653. · 450b448a
      Vincent Pelletier authored
      As the generated order-by expressions now (rightly) differ based on data, the
      exception generated when detecting the difference must be postponed to when
      expression is actualy used, as it might not be used.
      Also, test that postponing effectively works, and demonstrate another way to
      express the same condition, but which allows sorting.
      
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33660 20353a03-c40f-0410-a6d1-a30d3c3de9de
      450b448a
  22. 23 Nov, 2009 1 commit
  23. 20 Nov, 2009 1 commit
  24. 07 Oct, 2009 1 commit
  25. 01 Jun, 2009 1 commit
  26. 27 Mar, 2009 1 commit
  27. 24 Mar, 2009 2 commits
  28. 11 Mar, 2009 2 commits
  29. 25 Feb, 2009 1 commit