1. 30 Oct, 2023 1 commit
    • Kirill Smelkov's avatar
      jinja2: Fix zc.buildout related import · 7f340418
      Kirill Smelkov authored
      jinja2_template imports zc.buildout, but uses zc.buildout.buildout (note
      the double .buildout). As the result, when tried to use in standalone
      mode, importing slapos.recipe.template.jinja2_template fails:
      
          In [1]: import slapos.recipe.template.jinja2_template
          ---------------------------------------------------------------------------
          AttributeError                            Traceback (most recent call last)
          Cell In[1], line 1
          ----> 1 import slapos.recipe.template.jinja2_template
      
          File ~/src/wendelin/slapos/slapos.recipe.template/slapos/recipe/template/jinja2_template.py:56
               53     raise AssertionError(*args)
               54 DEFAULT_CONTEXT['assert'] = _assert
          ---> 56 _buildout_safe_dumps = getattr(zc.buildout.buildout, 'dumps', None)
               57 DUMPS_KEY = 'dumps'
               58 DEFAULT_IMPORT_DELIMITER = '/'
      
          AttributeError: module 'zc.buildout' has no attribute 'buildout'
      
      That happens because zc.buildout is just a package and does not import
      anything from its submodules:
      
      https://lab.nexedi.com/nexedi/slapos.buildout/blob/e9c39301/src/zc/buildout/__init__.py
      
      So the correct way of importing is, thus, import `zc.buildout.buildout`.
      
      -> Fix it.
      
      The bug was there since 65cd02ec (Add jinja2-based template recipe
      entry.)
      
      /cc @vpelletier, @jerome
      7f340418
  2. 12 Oct, 2023 1 commit
    • Jérome Perrin's avatar
      tests: don't use jinja2.ext.with_ in tests · 69a27287
      Jérome Perrin authored
      This extension is now builtin and no longer exist under the old name.
      Since the test was just verifying that we can load extensions and uses
      other extensions, we can just remove it from the test.
      69a27287
  3. 24 Oct, 2022 2 commits
  4. 02 Sep, 2022 1 commit
    • Julien Muchembled's avatar
      Allow an overriding section to unset 'url' in order to instead define 'inline' · edfb3766
      Julien Muchembled authored
      Example:
      
      foo.cfg:
      
        [foo]
        url = ...
      
      bar.cfg:
      
        [buildout]
        extends = foo.cfg
      
        [foo]
        url =
        inline = blablah
      
      Recipes must not distinguish the existence of an option from an empty
      option value. It's a common mistake in recipes because that's natural
      to do that in Python. However, buildout has no syntax to remove an
      option when overriding a section.
      edfb3766
  5. 03 Feb, 2022 2 commits
  6. 01 Feb, 2022 5 commits
  7. 14 Jan, 2022 3 commits
  8. 17 Dec, 2021 3 commits
  9. 08 Jun, 2021 1 commit
  10. 07 Jun, 2021 2 commits
  11. 29 Jan, 2021 1 commit
  12. 08 Jan, 2021 2 commits
  13. 10 Apr, 2020 1 commit
  14. 24 Jan, 2020 2 commits
  15. 29 Jan, 2018 1 commit
  16. 25 Jan, 2018 1 commit
  17. 22 Jan, 2018 4 commits
  18. 11 Dec, 2017 2 commits
  19. 18 Oct, 2017 1 commit
  20. 16 Oct, 2017 1 commit
  21. 13 Oct, 2017 2 commits
  22. 03 Jul, 2017 1 commit