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. 10 Feb, 2020 1 commit
  3. 27 Dec, 2019 1 commit
  4. 25 Dec, 2019 5 commits
  5. 19 Dec, 2019 1 commit
  6. 07 Oct, 2019 1 commit
  7. 12 Jan, 2016 1 commit
  8. 04 Sep, 2014 1 commit
  9. 28 Jun, 2013 1 commit
  10. 14 Jun, 2013 1 commit
  11. 09 Sep, 2011 4 commits
  12. 04 Apr, 2011 1 commit
  13. 10 Mar, 2010 1 commit
  14. 17 Nov, 2009 1 commit
    • Sebastien Robin's avatar
      - the possibility to pass --enable_full_indexing=portal_skins in · 2dd6ad08
      Sebastien Robin authored
       order to make optimisation configuration in unit test
      - isIndexable is not a property any more, it is a ConstantGetter
       instance, so it works like a property and like a method
      - same thing for isPredicate, isTemplate, isDelivery... we can
       start moving using only methods.
      - do not define isTemplate, isDelivery... when it is already
        available thanks to inheritance
      - new methods generated for all ERP5 objects : provides[InterfaceName].
       For instance, "providesIMovement()" will return True or False for
       any ERP5 object.
      - new method "is[Group]Type" generated for all ERP5 objects. The group
       here is group of portal types (like getPortalDeliveryTypeList()). So
       on any ERP5 object, you can do "isDeliveryType()", and this will
       returns True or False.
      - add tests
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30704 20353a03-c40f-0410-a6d1-a30d3c3de9de
      2dd6ad08
  15. 12 Jun, 2009 1 commit
  16. 10 Jun, 2009 1 commit
  17. 01 Jun, 2009 1 commit
  18. 15 Feb, 2007 1 commit
  19. 01 Nov, 2006 1 commit
  20. 08 May, 2006 1 commit
  21. 25 Mar, 2006 1 commit
  22. 06 Feb, 2006 1 commit
  23. 10 Jan, 2006 1 commit
  24. 23 Nov, 2005 1 commit
  25. 17 Oct, 2005 1 commit
    • Alexandre Boeglin's avatar
      Removed the CreditCard class. Modified the Coordinate class to allow using it · 5204504f
      Alexandre Boeglin authored
      as a portal type information.
      
      The Coordinate class now provides methods that allow to do all the
      "presentation" specific part of a Coordinate in a set of python scripts.
      
      For example, to add a CreditCard portal type information :
      - go to portal_types, choose 'Add ERP5 Type Information', select 'ERP5
        Coordinate' and name your new type 'Credit Card'
      - go to your newly created 'Credit Card' type definition, and add 'CreditCard'
        to its list of Property Sheets.
      - create a new form for your CreditCard : CreditCard_view and add a field
        named my_text to it.
      - create two scripts, which will interact with the 'my_text' field :
        - CreditCard_fromText(text) : used to analyse the text entered by the user,
          and fill in the object's properties accordingly.
        - CreditCard_asText() : used to return a user-readable aggregation of the
          object's properties.
      
      These two python scripts can use regular expressions to analyse the text
      entered by the user, using the object's methods getRegularExpressionFindAll
      and getRegularExpressionGroups for example.
      
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4051 20353a03-c40f-0410-a6d1-a30d3c3de9de
      5204504f
  26. 18 Aug, 2004 1 commit
  27. 08 Feb, 2004 1 commit
  28. 10 Dec, 2002 1 commit