-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into render_time_only_filter_decorator
- Loading branch information
Showing
40 changed files
with
462 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[flake8] | ||
extend-select = | ||
# bugbear | ||
B | ||
# bugbear opinions | ||
B9 | ||
# implicit str concat | ||
ISC | ||
extend-ignore = | ||
# slice notation whitespace, invalid | ||
E203 | ||
# line length, handled by bugbear B950 | ||
E501 | ||
# bare except, handled by bugbear B001 | ||
E722 | ||
# zip with strict=, requires python >= 3.10 | ||
B905 | ||
# string formatting opinion, B028 renamed to B907 | ||
B028 | ||
B907 | ||
# up to 88 allowed by bugbear B950 | ||
max-line-length = 80 | ||
per-file-ignores = | ||
# __init__ exports names | ||
src/jinja2/__init__.py: F401 | ||
# not relevant to jinja's compiler | ||
src/jinja2/compiler.py: B906 | ||
src/jinja2/idtracking.py: B906 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
name: 'Lock threads' | ||
# Lock closed issues that have not received any further activity for | ||
# two weeks. This does not close open issues, only humans may do that. | ||
# We find that it is easier to respond to new issues with fresh examples | ||
# rather than continuing discussions on old issues. | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: lock | ||
|
||
jobs: | ||
lock: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dessant/lock-threads@v3 | ||
- uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 | ||
with: | ||
github-token: ${{ github.token }} | ||
issue-inactive-days: 14 | ||
pr-inactive-days: 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
hash: ${{ steps.hash.outputs.hash }} | ||
steps: | ||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | ||
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 | ||
with: | ||
python-version: '3.x' | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- run: pip install -r requirements/build.txt | ||
# Use the commit date instead of the current date during the build. | ||
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV | ||
- run: python -m build | ||
# Generate hashes used for provenance. | ||
- name: generate hash | ||
id: hash | ||
run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT | ||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce | ||
with: | ||
path: ./dist | ||
provenance: | ||
needs: ['build'] | ||
permissions: | ||
actions: read | ||
id-token: write | ||
contents: write | ||
# Can't pin with hash due to how this workflow works. | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0 | ||
with: | ||
base64-subjects: ${{ needs.build.outputs.hash }} | ||
create-release: | ||
# Upload the sdist, wheels, and provenance to a GitHub release. They remain | ||
# available as build artifacts for a while as well. | ||
needs: ['provenance'] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | ||
- name: create release | ||
run: > | ||
gh release create --draft --repo ${{ github.repository }} | ||
${{ github.ref_name }} | ||
*.intoto.jsonl/* artifact/* | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
publish-pypi: | ||
needs: ['provenance'] | ||
# Wait for approval before attempting to upload to PyPI. This allows reviewing the | ||
# files in the draft release. | ||
environment: 'publish' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | ||
- uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf | ||
with: | ||
packages-dir: artifact/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
[project] | ||
name = "Jinja2" | ||
description = "A very fast and expressive template engine." | ||
readme = "README.rst" | ||
license = {file = "LICENSE.rst"} | ||
maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
"Topic :: Text Processing :: Markup :: HTML", | ||
] | ||
requires-python = ">=3.7" | ||
dependencies = ["MarkupSafe>=2.0"] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Donate = "https://palletsprojects.com/donate" | ||
Documentation = "https://jinja.palletsprojects.com/" | ||
Changes = "https://jinja.palletsprojects.com/changes/" | ||
"Source Code" = "https://github.com/pallets/jinja/" | ||
"Issue Tracker" = "https://github.com/pallets/jinja/issues/" | ||
Chat = "https://discord.gg/pallets" | ||
|
||
[project.optional-dependencies] | ||
i18n = ["Babel>=2.7"] | ||
|
||
[project.entry-points."babel.extractors"] | ||
|
||
[build-system] | ||
requires = ["flit_core<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[tool.flit.module] | ||
name = "jinja2" | ||
|
||
[tool.flit.sdist] | ||
include = [ | ||
"docs/", | ||
"examples/", | ||
"requirements/", | ||
"tests/", | ||
"CHANGES.rst", | ||
"tox.ini", | ||
] | ||
exclude = [ | ||
"docs/_build/", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
filterwarnings = [ | ||
"error", | ||
] | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["jinja2", "tests"] | ||
|
||
[tool.coverage.paths] | ||
source = ["src", "*/site-packages"] | ||
|
||
[tool.mypy] | ||
python_version = "3.7" | ||
files = ["src/jinja2"] | ||
show_error_codes = true | ||
pretty = true | ||
strict = true | ||
local_partial_types = true | ||
warn_unreachable = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = [ | ||
"jinja2.defaults", | ||
"markupsafe", | ||
] | ||
no_implicit_reexport = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# SHA1:80754af91bfb6d1073585b046fe0a474ce868509 | ||
# | ||
# This file is autogenerated by pip-compile-multi | ||
# To update, run: | ||
# | ||
# pip-compile-multi | ||
# | ||
build==0.10.0 | ||
# via -r requirements/build.in | ||
packaging==23.1 | ||
# via build | ||
pyproject-hooks==1.0.0 | ||
# via build | ||
tomli==2.0.1 | ||
# via build |
Oops, something went wrong.