1. 13 Jun, 2024 1 commit
  2. 31 Oct, 2023 1 commit
    • Kirill Smelkov's avatar
      jinja2: Fix zc.buildout related import · 17e6f449
      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
      /reviewed-by @jerome
      /reviewed-on nexedi/slapos.recipe.template!9
      17e6f449
  3. 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
  4. 24 Oct, 2022 2 commits
  5. 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
  6. 03 Feb, 2022 2 commits
  7. 01 Feb, 2022 5 commits
  8. 14 Jan, 2022 3 commits
  9. 17 Dec, 2021 3 commits
  10. 08 Jun, 2021 1 commit
  11. 07 Jun, 2021 2 commits
  12. 29 Jan, 2021 1 commit
  13. 08 Jan, 2021 2 commits
  14. 10 Apr, 2020 1 commit
  15. 24 Jan, 2020 2 commits
  16. 29 Jan, 2018 1 commit
  17. 25 Jan, 2018 1 commit
  18. 22 Jan, 2018 4 commits
  19. 11 Dec, 2017 2 commits
  20. 18 Oct, 2017 1 commit
  21. 16 Oct, 2017 1 commit
  22. 13 Oct, 2017 2 commits