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. 03 May, 2022 1 commit
  3. 29 Apr, 2021 1 commit
  4. 11 Dec, 2020 1 commit
  5. 21 May, 2019 1 commit
    • Vincent Pelletier's avatar
      IdTool: Add poisoning support. · 564cca95
      Vincent Pelletier authored
      Allows for safe migration to another id generator, by preventing silent
      success of any piece of code still using the former generator, allowing
      its detection and resolution before duplicate ids are emitted.
      As a consequence, also allows on-demand and partial migration of id
      generators.
      564cca95
  6. 12 Jan, 2016 1 commit
  7. 14 Aug, 2015 1 commit
  8. 17 Nov, 2014 1 commit
  9. 23 Apr, 2012 1 commit
  10. 01 Mar, 2011 2 commits
  11. 28 Feb, 2011 1 commit
  12. 15 Jul, 2010 1 commit
    • Sebastien Robin's avatar
      sync with trunk@37114 · c1ae57b0
      Sebastien Robin authored
      Conflicts:
      	bt5/erp5_base/bt/revision
      	bt5/erp5_simulation/DocumentTemplateItem/InvoiceSimulationRule.py
      	bt5/erp5_simulation/bt/revision
      	bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary.xml
      	bt5/erp5_trade/bt/change_log
      	bt5/erp5_trade/bt/revision
      	products/ERP5/Document/BusinessPath.py
      	products/ERP5/Document/SimulationMovement.py
      	products/ERP5/Document/TradeCondition.py
      	products/ERP5/Document/TradeModelLine.py
      	products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
      	products/ERP5Type/ERP5Type.py
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37129 20353a03-c40f-0410-a6d1-a30d3c3de9de
      c1ae57b0
  13. 12 Jun, 2010 1 commit
  14. 27 Apr, 2010 1 commit
  15. 16 Apr, 2010 1 commit
  16. 14 Apr, 2010 2 commits
  17. 04 Mar, 2010 1 commit
  18. 07 Oct, 2009 1 commit
  19. 21 Sep, 2009 1 commit
  20. 17 Sep, 2009 5 commits
  21. 13 Nov, 2008 1 commit
  22. 03 Nov, 2008 3 commits
  23. 22 Oct, 2008 1 commit
  24. 28 Aug, 2008 1 commit
  25. 27 Aug, 2008 2 commits
  26. 25 Apr, 2008 1 commit
  27. 17 Dec, 2007 1 commit
  28. 08 Nov, 2007 1 commit
  29. 29 Oct, 2007 1 commit
  30. 29 Sep, 2007 1 commit
  31. 28 Sep, 2007 1 commit