Skip to content
Myr

Update jinja2 to fix deprecation warnings on building website (#2711)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by itchyny · committed by GitHub · parent 689a4e6 · Browse files · 3 files+8 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+8 added−7 removed

  • other:+8 added−7 removed

3 files+8 added−7 removed

modified:docs/build_website.py+3 added-2 removed
1#!/usr/bin/env python32import glob3import itertools4from jinja2 import Environment, FileSystemLoader, Markup, select_autoescape, contextfunction4from jinja2 import Environment, FileSystemLoader, select_autoescape, pass_context5from markdown import markdown6from markupsafe import Markup7import os8import os.path9import re10import shutil
15 unmodified lines
26env.filters['entry_id'] = lambda input: re.sub(r"[ `]", '', input)27env.filters['markdownify'] = lambda input: Markup(markdown(input))28env.filters['no_paragraph'] = lambda input: Markup(re.sub(r"</?p>", '', input))2929env.globals['unique_id'] = contextfunction(30env.globals['unique_id'] = pass_context(31 lambda ctx: str(next(ctx['unique_ctr'])))3233env.globals.update(load_yml_file('site.yml'))34
44 unmodified lines
modified:docs/Pipfile+1 added-1 removed
4 unmodified lines
56[dev-packages]78[packages]9jinja2 = "==3.0.2" # FIXME: stop using deprecated features9jinja2 = "*"10pyyaml = "*"11markdown = "*"12lxml = "*"
modified:docs/Pipfile.lock+4 added-4 removed
1{2 "_meta": {3 "hash": {4 "sha256": "3446f193e08e6a3c8f1d88af308dd7f8a668cccc270bc8374a4e95527f415a35"4 "sha256": "16a9ef323592a417142c30be17e58c3cf36dc2bfdbf4757106a796b22262a1ce"5 },6 "pipfile-spec": 6,7 "requires": {},8 "sources": [
6 unmodified lines
15 },16 "default": {17 "jinja2": {18 "hashes": [19 "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45",20 "sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c"19 "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",20 "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"21 ],22 "index": "pypi",23 "version": "==3.0.2"23 "version": "==3.1.2"24 },25 "lxml": {26 "hashes": [27 "sha256:05186a0f1346ae12553d66df1cfce6f251589fea3ad3da4f3ef4e34b2d58c6a3",
208 unmodified lines