1. 18 Jan, 2017 1 commit
  2. 15 Feb, 2016 1 commit
  3. 18 Nov, 2015 3 commits
    • Julien Muchembled's avatar
      Release 2.9 · f0e16ee0
      Julien Muchembled authored
      f0e16ee0
    • Kirill Smelkov's avatar
      jinja2: Don't hardcode utf-8 encoding for imported files · 3a43536a
      Kirill Smelkov authored
      UTF-8 encoding for template imports was hardcoded from the beginning -
      from 320f29b2 (Add jinja2 "import" directive support.)
      
      Since in the previous patch we added option for input/output encoding,
      it makes sense to also use it, instead of hardcoding utf-8.
      
      /reviewed-by @vpelletier  (on nexedi/slapos.recipe.template!1)
      3a43536a
    • Kirill Smelkov's avatar
      jinja2: Handle non-ascii input/output · c901c411
      Kirill Smelkov authored
      Currently slapos.recipe.template:jinja2 fails if source contains
      non-ascii input:
      
          <BLANKLINE>
          An internal error occurred due to a bug in either zc.buildout or in a
          recipe being used:
          Traceback (most recent call last):
            File ".../site-packages/zc/buildout/buildout.py", line 1992, in main
              getattr(buildout, command)(args)
            File ".../site-packages/zc/buildout/buildout.py", line 550, in install
              [self[part]['recipe'] for part in install_parts]
            File ".../site-packages/zc/buildout/buildout.py", line 1135, in __getitem__
              options._initialize()
            File ".../site-packages/zc/buildout/buildout.py", line 1239, in _initialize
              self.initialize()
            File ".../site-packages/zc/buildout/buildout.py", line 1248, in initialize
              self.recipe = recipe_class(buildout, name, self)
            File ".../slapos.recipe.template/slapos/recipe/template/jinja2_template.py", line 208, in __init__
              env.compile(source, filename=template),
            File ".../site-packages/jinja2/environment.py", line 551, in compile
              source = self._parse(source, name, filename)
            File ".../site-packages/jinja2/environment.py", line 470, in _parse
              return Parser(self, source, name, encode_filename(filename)).parse()
            File ".../site-packages/jinja2/parser.py", line 31, in __init__
              self.stream = environment._tokenize(source, name, filename, state)
            File ".../site-packages/jinja2/environment.py", line 501, in _tokenize
              source = self.preprocess(source, name, filename)
            File ".../site-packages/jinja2/environment.py", line 495, in preprocess
              self.iter_extensions(), text_type(source))
          UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 219: ordinal not in range(128)
      
      it also fails writing-out non-ascii input (which could originate even
      programmatically even if source was purely ascii):
      
          <BLANKLINE>
          An internal error occurred due to a bug in either zc.buildout or in a
          recipe being used:
          Traceback (most recent call last):
            File ".../site-packages/zc/buildout/buildout.py", line 1992, in main
              getattr(buildout, command)(args)
            File ".../site-packages/zc/buildout/buildout.py", line 666, in install
              installed_files = self[part]._call(recipe.install)
            File ".../site-packages/zc/buildout/buildout.py", line 1407, in _call
              return f()
            File ".../slapos/slapos.recipe.template/slapos/recipe/template/jinja2_template.py", line 227, in install
              out.write(self.template.render(**self.context))
          UnicodeEncodeError: 'ascii' codec can't encode characters in position 206-211: ordinal not in range(128)
      
      Fix it.
      
      @vpelletier suggested to add `encoding` option so it is flexible and
      'utf-8' is not hardcoded.
      
      /reviewed-by @vpelletier  (on nexedi/slapos.recipe.template!1)
      c901c411
  4. 25 Jun, 2015 1 commit
  5. 18 May, 2015 1 commit
  6. 08 Dec, 2014 1 commit
  7. 30 Oct, 2014 1 commit
  8. 07 Aug, 2013 1 commit
  9. 02 Aug, 2013 2 commits
  10. 20 Sep, 2012 1 commit
  11. 21 Aug, 2012 6 commits
  12. 17 Aug, 2012 2 commits
  13. 16 Aug, 2012 1 commit
  14. 08 Aug, 2012 3 commits
  15. 01 Aug, 2012 3 commits
  16. 01 Jun, 2012 3 commits
  17. 18 Apr, 2012 1 commit
  18. 02 Apr, 2012 2 commits
  19. 29 Mar, 2012 2 commits
  20. 28 Mar, 2012 1 commit
  21. 14 Mar, 2012 2 commits
    • Vincent Pelletier's avatar
      Use repository-root-relative ignore paths. · c582a98c
      Vincent Pelletier authored
      Also, fix pyc files gitignore globing.
      c582a98c
    • Vincent Pelletier's avatar
      Switch to "setup.py test" to run tests. · 577fb26a
      Vincent Pelletier authored
      Buildout way couldn't install some (dependency) eggs for an unknown reason
      (zope.exception on some python environments, Jinja2 needed by a future
      extension...) and "setup.py test" just works, with fewer lines at this.
      Also, drop zope.testing dependency altogether:
      - zope.testing.doctest is deprecated
      - zope.testing.renormalizing is not really needed for this test
      577fb26a
  22. 09 Mar, 2012 1 commit