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.
Kevin Brown [Tue, 25 Jun 2019 00:07:01 +0000 (20:07 -0400)]
Unpin pytest in tox.ini
This was "temporarily" pinned many months back, given that this is not pinned on the stable branch and tests appear to be passing, we should be able to remove it here.
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.
Lindsay Young [Mon, 6 May 2019 17:10:17 +0000 (13:10 -0400)]
Create CODE_OF_CONDUCT.md
Ticket is referenced in [#Issue 1](https://github.com/pallets/meta/issues/1) in the Meta repo.
I spoke with @davidism and the decision was to use Contributor Covenant. It has easy GitHub integration and quality content.
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.
Raul Tambre [Thu, 2 May 2019 17:23:56 +0000 (20:23 +0300)]
Fix use of 'is' operator for comparison
The 'is' operator is not meant to be used for comparisons. It currently working is an implementation detail of CPython.
CPython 3.8 has added a SyntaxWarning for this.
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.
Mark Amery [Sun, 25 Nov 2018 17:49:22 +0000 (17:49 +0000)]
Fix broken nl2br filter example
This example attempts to handle both Windows-style and Unix-style line endings, but does it wrong; as noted at https://stackoverflow.com/q/12521127/1709587, the regex here will match a single \r\n as if it were a double line-break, which results in all single Windows-style line-breaks getting converted into <p> breaks instead of <br> breaks as intended.
This patch fixes that by applying Alan Moore's proposed fix from https://stackoverflow.com/a/12521544/1709587 of using a negative lookahead so that a \r cannot be counted as a line break if it is followed by a \n (while still allowing the \r\n combination to count as a line break).
Jon Dufresne [Thu, 30 Aug 2018 03:58:03 +0000 (20:58 -0700)]
Trim trailing white space throughout the project
Many editors clean up trailing white space on save. By removing it all
in one go, it helps keep future diffs cleaner by avoiding spurious white
space changes on unrelated lines.
> If your project only runs on certain Python versions, setting the
> python_requires argument to the appropriate PEP 440 version specifier
> string will prevent pip from installing the project on other Python
> versions.
> python_requires
>
> A string corresponding to a version specifier (as defined in PEP 440)
> for the Python version, used to specify the Requires-Python defined in
> PEP 345.
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
```