Ralph Giles [Thu, 4 Jul 2019 20:24:51 +0000 (13:24 -0700)]
Register custom test category markers.
Since around pytest 3.6 it's been possible to register custom
markers, and since version 4.5.0 pytest warns about any which
are not registered. Register a list of such markers, extracted
from those warnings, so they don't clutter the test output.
David Lord [Sat, 20 Jul 2019 20:52:19 +0000 (13:52 -0700)]
ignore coverage parse errors
Azure has Python 2.7.15 and Python 3.5.5, which can't parse async code.
Later patch versions can parse it fine, so this can be removed if
Azure updates.
Florian Bruhin [Wed, 27 Jun 2018 13:30:54 +0000 (15:30 +0200)]
Import abstract base classes from collections.abc
In Python 3.7, importing ABCs directly from the `collections` module shows a
warning (and in Python 3.8 it will stop working) - see
https://github.com/python/cpython/commit/c66f9f8d3909f588c251957d499599a1680e2320
This fixes various DeprecationWarnings such as those:
```
.../jinja2/utils.py:485: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping
.../jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Mapping
```
Kevin Brown [Tue, 7 May 2019 14:38:32 +0000 (10:38 -0400)]
Add new maintenance branch format to Travis (#987)
* Added new maintenance branch format to Travis
The maintenance branch format appeared to change from
`[version]-maintenance` to `[version].x` in the recent months, and
this broke Travis CI builds made to those branches. Because they
no longer meet the branch regex, the pull requests builds against
these branches were no longer being run.
This ads the regex for any branch which ends in `.x`, which should
catch the new pattern for maintenance branches.
* Use the branch regex from werkzeug
This is more specific to only catch version number branches.
* Sync with master
Apparently the build configuration for this branch is very old and doesn't match master at all.
Terry N. Brown [Mon, 6 May 2019 16:33:13 +0000 (12:33 -0400)]
fixes #242, deletes link to Jinja 1 docs.
This just fixes a broken link by deleteing it.
I'm assuming Jinja 1 docs. aren't readily available anymore.
I looked for a git tag for version 1 as an alternative target,
but didn't see that either.
Kevin Brown [Mon, 6 May 2019 14:07:48 +0000 (10:07 -0400)]
Fix tox docs-html builds
These have been broken for about a month now because of the upgrade
to Sphinx 2. This upgrade happened automatically because we do not
have the version pinned.
Luckily this issue appears to only be from having Python 2 syntax in
the docs script, so making that compatible with Python 3 fixes the
error and allows the docs to pass.
Adrian Moennich [Tue, 22 Aug 2017 20:59:57 +0000 (22:59 +0200)]
Compile `elif` tag to `elif` instead of `else: if`
This avoids deep nesting in case of many `{% elif .. %}` blocks (which
would fail during execution) and also deep recursion (which may fail
during compilation)
Jack Wilsdon [Sun, 30 Oct 2016 21:57:12 +0000 (21:57 +0000)]
Don't skip an erroneous comma when parsing from
Currently we skip an extra comma when "with context" is not provided to
the "from" statement. This allows invalid code such as this:
{% from "functions.html" import my_function,, %}
The primary issue with this is that it is not consistent when providing
"with context". The following code throws an error, contrary to the
previous example:
{% from "functions.html" import my_function,, with context %}
It seems that the comma skipping was originally found in 0611e49 and was
accidentally put inside the "with context" check in ea847c5. It was then
updated to use "skip_if" in fdf9530.
There doesn't seem to be any reason for this check existing, as
double commas should never be allowed and serve no purpose in the
statement.
James Tanner [Thu, 27 Apr 2017 21:14:42 +0000 (17:14 -0400)]
Add support for the Environment to optionally return native types.
This works by having an alternate CodeGenerator that avoids doing to_string
after the yield statement and a new version of concat that handles the returned
generator with a bit more "intelligence".
David Lord [Fri, 20 Jan 2017 04:40:31 +0000 (20:40 -0800)]
allow using comparison operator symbols as tests
add tests and aliases for all comparison operators
adjust docs to prefer short names for compare tests
closes #664
David Lord [Tue, 4 Jul 2017 16:54:18 +0000 (09:54 -0700)]
go back to generating regex, simplified
new version uses ~2KB vs 200KB memory, is ~100x faster to load
move script to generate pattern to scripts directory
add more tests